This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ADD R3, R1, R3 ;if R2, is negative, the program will be branched here. Add value in R1 to R3 and store in R3 ADD R3, R3, #1 ;since R2 is negative add 1 to R3 ADD R1, R3, #0 ;Add R3 and 0 to put the amount R3 into R1 ADD R2, R2, #1 ;add 1 to the value of counter that was placed in R2 BRn x-00C ;if R2 is still negative, branch to x3003 and repeat instructions BRz x-00E ;if R2 is now zero, branch to x3003 and repeat instructions ST R1, xF1 ;Store rotated answer R1 into x3102 TRAP x25 ;Halt the program .END ;End the program...
View Full Document
This note was uploaded on 10/27/2011 for the course BME 14015 taught by Professor Dr.ren during the Fall '10 term at University of Texas at Austin.
- Fall '10