5
|
|
REM ZX81 REM "JOYSTICK PROGRAM WITH MEMORY SAVING METHOD":
|
---|
10 |
|
LET Q=1
|
---|
15 |
|
LET F = Q - Q
|
---|
20 |
|
LET R = Q + Q
|
---|
25 |
|
LET B = F
|
---|
30 |
|
LET X = F
|
---|
35 |
|
LET Y = F
|
---|
|
---|
50 |
|
PLOT X, Y
|
---|
55 |
|
UNPLOT X, Y
|
---|
60 |
|
IF INKEY$="4" THEN LET B = Q
|
---|
70 |
|
IF INKEY$="3" THEN LET B = R
|
---|
80 |
|
IF INKEY$="9" THEN LET D = A
|
---|
90 |
|
IF INKEY$="0" THEN LET D = Q
|
---|
100 |
|
IF B = Q THEN PLOT X, Y
|
---|
105 |
|
IF B = R THEN UNPLOT X, Y
|
---|
110 |
|
LET X = X + ((INKEY$="8" OR (INKEY$="7" AND D = F)) AND X < 62) - ((INKEY$="5" OR (INKEY$="6" AND D = Q)) AND X > F)
|
---|
115 |
|
LET Y = Y + ((INKEY$="7" OR (INKEY$="6" AND D = Q)) AND Y < 42) - ((INKEY$="6" OR (INKEY$="8" AND D = Q)) AND Y > F)
|
---|
120 |
|
IF INKEY$="G" THEN LLIST
|
---|
122 |
|
IF INKEY$="Z" THEN COPY
|
---|
124 |
|
IF INKEY$="B" THEN LPRINT
|
---|
130 |
|
GOTO 50
|
---|
140 |
|
STOP
|
---|
|
---|