Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /THIS PROGRAM PLAYS TWO-PLAYER TENNIS ON THE FRONT PANEL
- /LEFT PLAYER: TOGGLE 0 WHEN BALL IS IN 0 TO REGISTER A HIT
- /RIGHT PLAYER: TOGGLE 11 WHEN BALL IS IN 11 TO REGISTER A HIT
- *0000
- LSCORE, 0 /LEFT PERSON SCORE
- RSCORE, 0 /RIGHT PERSON SCORE
- DELVAL, 7774 /INCREASE FOR MORE DIFFICULT GAME
- DEL1, 0 /12-BIT DELAY
- DEL2, 0 /MORE DELAY
- DELSTO, 0
- ACC, 0 /A STORE
- *0200
- CLA /INITIALIZE SCORES
- DCA LSCORE
- DCA RSCORE
- STARTL, CLA CLL CML RTR /CLEAR L AND SET A=2000
- LOOPR, JMS DELAY
- RTR /MOVE BALL TWICE RIGHT
- SZL /CHECK IF BALL IS IN L
- JMP TSTR /TEST RIGHT FLIPPER
- RAL /PUT BALL BACK ONE
- JMP LOOPR
- STARTR, CLA CLL CML RTL
- LOOPL, JMS DELAY
- RTL
- SZL
- JMP TSTL
- RAR
- JMP LOOPL
- TSTR, RAL
- DCA ACC /SAVE A
- OSR /GET PADDLE STATUS
- AND (0001) /ONLY GET RIGHT PADDLE
- SZA /IS THE PADDLE DOWN?
- JMP SCOREL /YOU MISSED IT
- CLA
- TAD ACC
- JMS DELAY
- DCA ACC
- OSR /GET PADDLE STATUS
- AND (0001) /ONLY GET RIGHT PADDLE
- SNA /IS THE PADDLE UP?
- JMP SCOREL /LEFT SCORES!
- CLA /RESTORE A
- TAD ACC
- RAL
- JMP LOOPL /CONTINUE PLAYING
- TSTL, RAR
- DCA ACC /SAVE A
- OSR /GET PADDLE STATUS
- AND (4000) /ONLY GET LEFT PADDLE
- SZA /IS THE PADDLE DOWN?
- JMP SCORER /YOU MISSED IT
- CLA
- TAD ACC
- JMS DELAY
- DCA ACC
- OSR /GET PADDLE STATUS
- AND (4000) /ONLY GET LEFT PADDLE
- SNA /IS THE PADDLE UP?
- JMP SCORER /RIGHT SCORES!
- CLA /RESTORE A
- TAD ACC
- RAR
- JMP LOOPR /CONTINUE PLAYING
- SCOREL, CLA
- TAD ACC
- JMS DELAY
- RAR
- JMS DELAY
- ISZ LSCORE
- NOP /OPTIMISTIC ABOUT SCORING ABOVE 7777
- JMP STARTL
- SCORER, CLA
- TAD ACC
- JMS DELAY
- RAL
- JMS DELAY
- ISZ RSCORE
- NOP /OPTIMISTIC ABOUT SCORING ABOVE 7777
- JMP STARTR
- DELAY, 0000
- DCA DELSTO
- TAD DELVAL
- DCA DEL2
- TAD DELSTO
- ISZ DEL1
- JMP .-1
- ISZ DEL2
- JMP .-3
- JMP I DELAY
- $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement