Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .text
- .global _start
- _start:
- LDR R4, =RESULT
- LDR R2, N // point to N
- ADD R3, R4, #8
- LDR R0, [R3]
- LOOP: SUBS R2, R2, #1
- BEQ DONE
- ADD R3, R3, #4
- LDR R1, [R3]
- CMP R0, R1
- BGE LOOP
- MOV R0, R1
- B LOOP
- DONE: STR R0, [R4]
- END: B END
- RESULT: .word 0
- N: .word 7
- NUMBERS: .word 4, 5, 3, 6, 8
- .word 1, 12
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement