Advertisement
antiquekid3

Tennis for Two - A Front Panel Game for PDP-8

Jun 16th, 2013
452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. /THIS PROGRAM PLAYS TWO-PLAYER TENNIS ON THE FRONT PANEL
  2. /LEFT PLAYER: TOGGLE 0 WHEN BALL IS IN 0 TO REGISTER A HIT
  3. /RIGHT PLAYER: TOGGLE 11 WHEN BALL IS IN 11 TO REGISTER A HIT
  4.  
  5. *0000
  6. LSCORE, 0 /LEFT PERSON SCORE
  7. RSCORE, 0 /RIGHT PERSON SCORE
  8. DELVAL, 7774 /INCREASE FOR MORE DIFFICULT GAME
  9. DEL1, 0 /12-BIT DELAY
  10. DEL2, 0 /MORE DELAY
  11. DELSTO, 0
  12. ACC, 0 /A STORE
  13.  
  14. *0200
  15. CLA /INITIALIZE SCORES
  16. DCA LSCORE
  17. DCA RSCORE
  18.  
  19. STARTL, CLA CLL CML RTR /CLEAR L AND SET A=2000
  20. LOOPR, JMS DELAY
  21. RTR /MOVE BALL TWICE RIGHT
  22. SZL /CHECK IF BALL IS IN L
  23. JMP TSTR /TEST RIGHT FLIPPER
  24. RAL /PUT BALL BACK ONE
  25. JMP LOOPR
  26.  
  27. STARTR, CLA CLL CML RTL
  28. LOOPL, JMS DELAY
  29. RTL
  30. SZL
  31. JMP TSTL
  32. RAR
  33. JMP LOOPL
  34.  
  35. TSTR, RAL
  36. DCA ACC /SAVE A
  37. OSR /GET PADDLE STATUS
  38. AND (0001) /ONLY GET RIGHT PADDLE
  39. SZA /IS THE PADDLE DOWN?
  40. JMP SCOREL /YOU MISSED IT
  41. CLA
  42. TAD ACC
  43. JMS DELAY
  44. DCA ACC
  45. OSR /GET PADDLE STATUS
  46. AND (0001) /ONLY GET RIGHT PADDLE
  47. SNA /IS THE PADDLE UP?
  48. JMP SCOREL /LEFT SCORES!
  49. CLA /RESTORE A
  50. TAD ACC
  51. RAL
  52. JMP LOOPL /CONTINUE PLAYING
  53.  
  54. TSTL, RAR
  55. DCA ACC /SAVE A
  56. OSR /GET PADDLE STATUS
  57. AND (4000) /ONLY GET LEFT PADDLE
  58. SZA /IS THE PADDLE DOWN?
  59. JMP SCORER /YOU MISSED IT
  60. CLA
  61. TAD ACC
  62. JMS DELAY
  63. DCA ACC
  64. OSR /GET PADDLE STATUS
  65. AND (4000) /ONLY GET LEFT PADDLE
  66. SNA /IS THE PADDLE UP?
  67. JMP SCORER /RIGHT SCORES!
  68. CLA /RESTORE A
  69. TAD ACC
  70. RAR
  71. JMP LOOPR /CONTINUE PLAYING
  72.  
  73. SCOREL, CLA
  74. TAD ACC
  75. JMS DELAY
  76. RAR
  77. JMS DELAY
  78. ISZ LSCORE
  79. NOP /OPTIMISTIC ABOUT SCORING ABOVE 7777
  80. JMP STARTL
  81.  
  82. SCORER, CLA
  83. TAD ACC
  84. JMS DELAY
  85. RAL
  86. JMS DELAY
  87. ISZ RSCORE
  88. NOP /OPTIMISTIC ABOUT SCORING ABOVE 7777
  89. JMP STARTR
  90.  
  91. DELAY, 0000
  92. DCA DELSTO
  93. TAD DELVAL
  94. DCA DEL2
  95. TAD DELSTO
  96. ISZ DEL1
  97. JMP .-1
  98. ISZ DEL2
  99. JMP .-3
  100. JMP I DELAY
  101.  
  102. $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement