Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BRA main
- main INP R0
- MOV R1, #0
- PSH {R0, R1}
- MOV R2, PC
- ADD R2, #2
- JMS mirror
- OUT R1
- HLT
- mirror POP {R0, R1}
- CMP R0, #0
- BEQ done
- MOV R3, R0
- MOD R3, #10
- UDV R0, #10
- MUL R1, #10
- ADD R1, R3
- PSH {R0, R1}
- JMS mirror
- done MOV PC, R2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement