Classic Computer Magazine Archive PROGRAM LISTING: 83-12/SKCHPAD.PLT


10 J:*TITLEPAGE
20 *PLAYER  [THE PLAYER IS AN "X"
30 C:#T=%T8 [KEEP TRIGGER VALUE AS A VARIABLE
40 GR(#T=0)+(@B1363=0):DRAWTO %X+#B,%Y-#A [DRAW IF TRIGGER NOT PRESSED OR PEN IS ERASE
50 GR(#T=1)*(@B1363<>0):FILLTO %X+#B,%Y-#A [FILL IF TRIGGER PRESSED AND NOT ERASE
60 C:#A=#A*2 [SCALING FACTOR
70 C:#J=#J+#A [COMPUTE NEW VERTICAL VALUE FOR PLAYER
80 C:#Y=#J [KEEP IT AS #Y
90 C:@B#Y=0  [THROUGH LINE 270 - MOVE PLAYER TO NEW VERTICAL POSITION
100 C:#Y=#J+1
110 C:@B#Y=0
120 C:#Y=#J+2
130 C:@B#Y=34
140 C:#Y=#J+3
150 C:@B#Y=20
160 C:#Y=#J+4
170 C:@B#Y=8
180 C:#Y=#J+5
190 C:@B#Y=8
200 C:#Y=#J+6
210 C:@B#Y=20
220 C:#Y=#J+7
230 C:@B#Y=34
240 C:#Y=#J+8
250 C:@B#Y=0
260 C:#Y=#J+9
270 C:@B#Y=0
280 C:#X=#X+#B [COMPUTE NEW HORIZONTAL POSITION
290 C:@B53248=#X [POKE IT INTO PLAYER/MISSLE BASE
300 C:#A=0 [RESET A
310 C:#B=0 [RESET B
320 C:@B1363=#C [POKE REMINDER OF WHICH PEN TO USE
330 *MAINLINE [CHECKS JOYSTICK
340 C:@B77=0 [SET ATTRACT FLAG TO KEEP SCREEN FROM CHANGING COLORS
350 U(@B764<255):*COLORCHANGE [CHANGE COLOR IF THERE IS KEYBOARD IMPUT
360 A:=%J0 [GRAB VALUE OF JOYSTICK
370 M: 1 , 9 , 8 , 10 , 2 , 6 , 4 , 5 [MATCH VALUE OF JOYSTICK
380 JM:*NORTH,*NE,*EAST,*SE,*SOUTH,*SW,*WEST,*NW [JUMP TO APPROPRIATE ROUTINE FOR DIRECTION TRAVELED
390 J:*MAINLINE    [THROUGH LINE 690-
400 *NORTH C:#A=-1 [COMPUTE NEW
410 J:*PLAYER      [POSITION IN
420 *NE C:#A=-1    [APPROPRIATE
430 C:#B=1         [DIRECTION
440 J:*PLAYER
450 *EAST C:#B=1
460 J:*PLAYER
470 *SE C:#A=1
480 C:#B=1
490 J:*PLAYER
500 *SOUTH C:#A=1
510 J:*PLAYER
520 *SW C:#A=1
530 C:#B=-1
540 J:*PLAYER
550 *WEST C:#B=-1
560 J:*PLAYER
570 *NW C:#A=-1
580 C:#B=-1
590 J:*PLAYER [JUMP BACK TO MOVE PLAYER AND DRAW LINE
600 *SETUP [SET UP PLAYER/MISSLE GRAPHICS
610 GR:CLEAR;GOTO 0,0;PEN YELLOW
620 C:#C=@B1363 [PUT CURRENT PEN VALUE IN #C
630 T:
640 T:  INITIALIZING ...... PLEASE WAIT
650 C:@B559=62 [ENABLE PMG(32)+ONE LINE PLAYER RES.(16)+USE PLAYERS & MISSILES(12)+STANDARD PLAYFIELD(2)
660 C:#I=@B106-24 [RESERVE 6K FOR PMG
670 C:@B54279=#I [PMBASE
680 C:@B53256=0  [SIZE OF PLAYER 0 - NORMAL, 1 - DOUBLE, 3 - QUAD. (2=0)
690 C:#J=#I*256+1024 [ADDRESS OF PLAYER'S 256 BYTES
700 C:#X=0 [#X IS TEMPORARILY A LOOP COUNTER
710 *CLEARPLAYER
720 C:@B#J=0
730 C:#X=#X+1
740 C:#J=#J+1
750 J(#X<256):*CLEARPLAYER
760 C:#J=#I*256+1024+124 [ADDRESS OF PLAYER 0 IN RAM
770 C:@B623=1 [PRIORITY SELECTION - PLAYER 0 -3 HAS PRIORITY OVER ALL THREE BACKGROUND COLORS
780 C:#X=124
790 C:@B53248=124 [PLAYER 0 HORIZONTAL POSITION
800 C:@B704=14
810 C:@B53277=3  [2 TURN ON PLAYER + 1 TURN ON MISSLES
820 T:}
830 U:*INSTRUCTIONS
840 J:*PLAYER
850 *COLORCHANGE
860 GR(@B764=11):PEN UP   [CHANGE PEN USED UPON KEYBOARD INPUT
870 GR(@B764=21):PEN BLUE
880 GR(@B764=40):PEN RED
890 GR(@B764=42):PEN ERASE
900 GR(@B764=43):PEN YELLOW
910 GR(@B764=146):PEN YELLOW;CLEAR
920 U(@B764=146):*INSTRUCTIONS
930 T(@B764=21)+(@B764=40)+(@B764=42)+(@B764=11)+(@B764=43)+(@B764=146):�\
940 C:#C=@B1363  [SAVE NEW PEN VALUE
950 C:@B764=255  [RESET KEYBOARD BUFFER
960 E:
970 *INSTRUCTIONS
980 T: R - PEN RED        U - PEN UP
990 T: B - PEN BLUE       E - ERASE
1000 T: Y - PEN YELLOW     CTRL C - CLEAR
1010 E:
1020 *TITLEPAGE
1030 GR:QUIT
1040 POS:11,5
1050 T:TURTLE SKETCHPAD
1060 POS:12,8
1070 T:ANTIC Volume 2
1080 POS:15,9
1090 T:Issue 9
1100 R:BY KATHY AND PHIL BERGH
1110 POS:2,14
1120 T:     DRAW using a joystick in Port 1. To FILL, press the trigger. You change the PEN colors by \
1130 T:pressing R for RED, B for BLUE, Y for YELLOW, U for UP, and E for ERASE. You need not press return. \
1140 T:To CLEAR the screen, press CONTROL and C.
1150 POS:6,22
1160 T:Press RETURN to continue \
1170 A:
1180 J:*SETUP
1190 R:*****************************
1200 R:������Ӻ
1210 R:   #X - HORIZONTAL POSITION OF                PLAYER
1220 R:   #Y - VERTICAL POSITION OF                  PLAYER
1230 R:   #I - PAGE NUMBER OF PMBASE
1240 R:   #J - ADDRESS OF PLAYER 0 IN                RAM
1250 R:   #A - VERTICAL POSITION                     INCREMENT
1260 R:   #B - HORIZONTAL POSITION                   INCREMENT
1270 R:   #C - SAVED VALUE OF THE                    COLOR REGISTER IN USE
1280 R:   #T - SAVED VALUE OF TRIGGER

Back to previous page