Advertisement
STANAANDREY

mirror rec

Oct 28th, 2024
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         BRA main
  2. main    INP R0
  3.         MOV R1, #0
  4.         PSH {R0, R1}
  5.         MOV R2, PC
  6.         ADD R2, #2
  7.         JMS mirror
  8.         OUT R1
  9.         HLT
  10. mirror  POP {R0, R1}
  11.         CMP R0, #0
  12.         BEQ done
  13.         MOV R3, R0
  14.         MOD R3, #10
  15.         UDV R0, #10
  16.         MUL R1, #10
  17.         ADD R1, R3
  18.         PSH {R0, R1}
  19.         JMS mirror
  20. done    MOV PC, R2
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement