Guest User

Untitled

a guest
Nov 19th, 2019
179
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PRG START
  2. RPUSH
  3. ;
  4. LD GR1,DATA
  5. LAD GR2,0
  6. LAD GR3,CHAR
  7. LAD GR4,NSTR
  8. LOOP ADDL GR2,=1
  9. CPL GR2,=16
  10. JPL FIN
  11. SLL GR1,1 ;0 0010 0100 0110 100 0
  12. JOV CASE1 ;OFが1ならJUMP
  13. LD GR3,CHAR0
  14. ST GR3,0,GR4
  15. ADDL GR4,=1
  16. JUMP LOOP
  17. CASE1 LD GR3,CHAR1
  18. ST GR3,0,GR4
  19. ADDL GR4,=1
  20. JUMP LOOP
  21. ;
  22. FIN OUT NSTR,LENNSTR
  23. RPOP
  24. RET
  25. ;
  26. DATA DC #1234 ;0001 0010 0011 0100
  27. CHAR DS 1
  28. NSTR DS 16
  29. LENNST DC 16
  30. CHAR0 DC '0'
  31. CHAR1 DC '1'
  32. ;
  33. END
RAW Paste Data