Guest User

CASL2 たらい関数

a guest
May 6th, 2020
37
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;
  2. ; CASL2 たらい関数
  3. ;
  4. TARAI START
  5. LAD GR1,12
  6. LAD GR2,6
  7. LAD GR3,0
  8. CALL PROC
  9. DREG MSG
  10. RET
  11. PROC CPA GR2,GR1
  12. JMI NEXT
  13. RET
  14. NEXT PUSH 0,GR1 ; x
  15. PUSH 0,GR2 ; y
  16. PUSH 0,GR3 ; z
  17. LAD GR1,-1,GR1
  18. CALL PROC
  19. LAD GR4,0,GR2
  20. POP GR2 ; z
  21. POP GR1 ; y
  22. POP GR3 ; x
  23. PUSH 0,GR4 ; X
  24. PUSH 0,GR3 ; x
  25. PUSH 0,GR1 ; y
  26. PUSH 0,GR2 ; z
  27. LAD GR1,-1,GR1
  28. CALL PROC
  29. LAD GR4,0,GR2
  30. POP GR1 ; z
  31. POP GR3 ; y
  32. POP GR2 ; x
  33. PUSH 0,GR4 ; Y
  34. LAD GR1,-1,GR1
  35. CALL PROC
  36. LAD GR3,0,GR2 ; Z
  37. POP GR2 ; Y
  38. POP GR1 ; X
  39. CALL PROC
  40. RET
  41. MSG DC 'OWARI'
  42. END
RAW Paste Data Copied