Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AREA gcd,code,readonly
- ENTRY
- main
- push {r4-r6, lr}
- mov r4, #10
- mov r5, #15
- gcd_loop
- cmp r4, r5
- beq done
- cmp r4, r5
- blt swap
- mov r6, r4
- mov r4, r5
- mov r5, r6
- swap
- sub r5, r5, r4
- b gcd_loop
- done
- mov r0, r4
- pop {r4-r6, pc}
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement