home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
commodore-users-of-norman
/
CUON_06_(08-1984).d64
/
snakes.c3
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
10KB
|
360 lines
1 GOTO910
2 REM ** ML STOP KEY DISABLE **
3 PRINT"x[169]=[141][169][141]X` [234][255][169][255][133][145]L4[234]x[169]1[141][169][234][141]X`
4 [153]"xhhh+hNOThhhhhhhPRINT#HRUNHX`111"
5 [153]"hhhhhhh`1"
6 [143] ** 4 - POP ML SUBROUTINE **
10 [143] **GENERAL INPUT ROUTINE **
15 :
30 :
35 [143] +++ INPUT SECTION +++
40 UR$[178]"":UI$[178]"":[151]UO,0
42 [139]UL[178]0[167]UL[178]80
45 [153]" CMDCMD";:[151]UC,0
50 [161]UI$:[139]UI$[178]""[167]50
55 [139]UI$[178][199](13)[175][195](UR$)[177][178]1[167][151]UC,1:[153]" CMD";:[137]85
60 [139]UI$[178][199](20)[167]105
62 [139][195](UR$)[178][177]UL[167]50
65 [141]120:[143] CHECK FOR VALID CHARACTER
70 UR$[178]UR$[170]UI$
75 [153]UI$;
80 [137]50
85 [143] +++ CHECK FOR HELP REQUEST +++
90 [139]UR$[178]UX$[167]195:[143] EXIT TO HELP ROUTINE
95 [139]UF[178]1[167][141]240
100 UF[178]0:[153]:[142]
102 [143] ++ CHECK DELETE ++
105 [139][195](UR$)[179]1[167]50
110 UR$[178][200](UR$,[195](UR$)[171]1)
115 [153]"CMD CMDCMD";:[137]50
120 [143] ++ CHECK FOR VALID CHARACTERS ++
125 [139][195](US$)[178]0[167]150
130 [129]US[178]1[164][195](US$)
135 [139]UI$[178][202](US$,US,1)[167][142]
140 [130]
145 UI$[178]"":[142]
150 [143] ** STANDARD INPUT **
152 [139][198](UI$)[178]46[167][142]
155 [139]UI$[178][199](32)[167][142]
160 [139][198](UI$)[179]48[176][198](UI$)[177]57[167]170
165 [142]
170 [139][198](UI$)[179]65[176][198](UI$)[177]90[167]180
175 [142]
180 [139][198](UI$)[179]193[176][198](UI$)[177]218[167]UI$[178]"":[142]
185 [139][194](UT)[178]UU%[167]UI$[178][199]([198](UI$)[171]128):[142]
187 [142]
190 UI$[178]"":[142]
195 UF[178]1:[143] +++ HELP ROUTINE EXIT +++
197 [141]250
200 [141]245
205 [129]UQ[178]UB[164](U2%[172]256[170]U1%[170]U3%[171]2)
210 UQ%(UQ[171]UB)[178][194](UQ):[130]:[153]"LOAD"
215 UZ[178]1:UV%[178][194](UT)
216 [137]300
217 UZ[178]0:US$[178]UJ$:UG$[178]UK$:UP[178]UJ:UL[178]UK
218 [139][194](50003)[178]0[167][151]53281,1:[153]"LOAD";:[151]53281,6:[151]53280,14:[137]220
219 [153]"LOAD";
220 UT$[178]UL$:[151]UT,UV%:[129]UQ[178]UB[164](U2%[172]256[170]U1%[170]U3%[171]3)
225 [151]UQ,UQ%(UQ[171]UB):[130]
230 [151]U1,U1%
232 [151]U2,U2%
233 [151]U4,U4%
234 [151]U3,U3%[171]1
235 [137]35
240 UD%[178]((U2%[172]256[170]U1%[170]U3%)[171]UB)[173]40:[153][200](UD$,UD%[170]1):[142]
245 [153][200](UD$,24);" HELP COMING WAIT ":[142]
250 U1%[178][194](U1):U2%[178][194](U2):U3%[178][194](U3):U4%[178][194](U4)
251 UJ$[178]US$:UK$[178]UG$:UL$[178]UT$:UJ[178]UP:UK[178]UL
255 [142]
300 [143] ** MENU **
301 :
302 [153]"LOAD":[151]UT,UU%:[139][194](50003)[178]0[167][151]53281,9:[151]53280,8
303 :
305 [153]" MENU"
310 [153]" --------------------------------------"
315 [153]" 1. BEGIN SNAKES"
320 [153]" 2. STUDENT INSTRUCTIONS"
325 [153]" 3. TEACHER INSTRUCTIONS"
335 [153]" 4. QUIT"
340 [153]" --------------------------------------"
345 [153]" PRESS A NUMBER KEY (1-4) ";
350 UL[178]1:US$[178]"1234":[141]35:[143] INPUT ROUTINE
352 US$[178]""
355 [145][197](UR$)[141]1000,400,600,396
360 [137]300
395 [143] ** RE-ENABLE STOP KEY AND END **
396 [139][194](50003)[179][177]1[175][194](50003)[179][177]160[175][194](50003)[179][177]0[167]399
397 [158]UU[170]71:[139][194](50003)[178]0[167][151]53281,6:[151]53280,14
398 [153]"CONTLOAD":[128]
399 [141]875:[142]
400 [143] ** STUDENT INSTRUCTIONS **
405 [153]"LOAD":[151]UT,UL%:[139][194](50003)[178]0[167][151]53281,0:[151]53280,0
410 UP[178]0:UT$[178]" (null)(null)ATN(null)VAL(null)":UG$[178]"(null)TUDENT RIGHT$NST":[141]850
412 [153]"RIGHT$N THIS GAME THERE ARE THREE OPTIONS"
416 [153]"1. (null)LAYER 1 AGAINST PLAYER 2"
420 [153]"2. (null)LAYER AGAINST COMPUTER"
424 [153]"3. LENOMPUTER AGAINST COMPUTER"
425 [141]835:[153]"LOAD":[151]UT,UU%:UT$[178]" SNAKES":UG$[178]"STUDENT INST":[141]850
428 [153]"IN THE PLAYER AGAINST COMPUTER VERSION"
432 [153]"THE PLAYER'S CONTROLS ARE:"
433 [153]" Y U I"
434 [153]" (null) (null) (null) "
435 [153]" H- -K"
436 [153]" (null) (null) (null) "
440 [153]" N M ,"
442 [141]835:[141]850
444 [153]"IN PLAYER 1 AGAINST PLAYER 2 VERSION"
456 [153]"PLAYER 1'S CONTROLS ARE:"
460 [153]" QCLOSECLOSEWCLOSECLOSEE"
464 [153]" (null) (null) (null) "
468 [153]" A- -D"
472 [153]" (null) (null) (null) "
476 [153]" Z X C"
477 [153]"PLAYER 2'S CONTROLS ARE:"
478 [153]" Y U I"
479 [153]" (null) (null) (null) "
480 [153]" H- -K"
481 [153]" (null) (null) (null) "
482 [153]" N M , "
483 [141]835:[153]"LOAD":[151]UT,UL%:UT$[178]" (null)(null)ATN(null)VAL(null)":UG$[178]"(null)TUDENT RIGHT$NST":[141]850
484 [153]"(null)HE OBJECT OF THIS GAME IS TO"
485 [153]"GUIDE YOUR SNAKE AROUND THE GAME "
488 [153]"BOARD AND NOT HIT EITHER THE WALLS OR"
492 [153]"THE OTHER SNAKE. RIGHT$N THE PLAYER 1 VS.
496 PRINT"PLAYER 2 VERSION THE PLAYERS MAY ALSO"
500 PRINT"USE A BLASTER TO SHOOT AT EACH OTHER."
504 PRINT"[198]OR PLAYER 1 THE BLASTER IS CONTROLLED"
508 PRINT"WITH THE '[211]' KEY; FOR PLAYER 2 IT IS"
512 PRINT"CONTROLLED WITH THE '[202]' KEY.
513 [141]835:[141]850
516 [153]"(null)HEN ASKED FOR NO. OF PLAYERS-"
520 [153]"0 MEANS THE COMPUTER WILL PLAY ITSELF.
524 PRINT"[201]T MIGHT BE A GOOD IDEA TO WATCH THE"
528 PRINT"COMPUTER PLAY ONCE IF THIS IS YOUR "
532 PRINT"FIRST TIME.":GOSUB835
535 UT$=" SNAKES":UG$="STUDENT INST":PRINT"[147]":POKEUT,UU%
536 GOSUB850:PRINT"NOTE: PLAYER 1 HAS THE [214][146] SNAKE,"
540 PRINT"PLAYER 2 HAS THE [219][146] SNAKE."
544 PRINT"THIS IS ALSO THE SNAKE THE PLAYER HAS"
548 PRINT"WHEN PLAYING AGAINST THE COMPUTER.":GOSUB835
580 UG$=" [211][206][193][203][197][211]"
590 IFUZ=1THENSYSUP%:GOTO217
599 RETURN
600 REM ** TEACHER INSTRUCTIONS **
601 PRINT"[147]":POKEUT,UL%:IFPEEK(50003)=0THENPOKE53281,2:POKE53280,10
602 UP=0:UG$="[212]EACHER [201]NST":GOSUB850
603 PRINT" [212]O THE BEST OF OUR KNOWLEDGE,"
604 PRINT" THIS PROGRAM IS IN THE PUBLIC"
605 PRINT" DOMAIN. [201]F THIS IS NOT THE CASE"
606 PRINT" PLEASE CONTACT:"
607 PRINT" [195]OMMODORE [194]USINESS [205]ACHINES"
608 PRINT" 3370 [208]HARMACY [193]VE.
609 [153]" ATNGINCOURT, (null)NTARIO"
610 [153]" LENANADA (null)1(null) 2(null)4"
611 [153]" (416) 499-4292"
612 UP[178]1:[141] 835:[141] 850:
613 [153]" (null)ROGRAM (null)AME: (null)NAKES
614 PRINT" [215]RITTEN [194]Y : [213]NKNOWN
615 [153]" (null)PGRADED PEEKY :
616 PRINT" [212]HIS PROGRAM WILL RUN ON ANY
617 [153]" (null)VAL(null) 64 LEN(null)(null)(null)(null)(null)VAL(null)
618 PRINT" [195][207][205][205][207][196][207][210][197] 64 [195][207][205][208][213][212][197][210]
621 [141]835
690 [139]UZ[178]1[167][158]UP%:[137]217
699 [142]
700 [143] ** TO USE 8032 LOAD CBM4032 **
710 [153]"LOADBEFORE RUNNING THIS PROGRAM ON AN 8032
720 PRINT" LOAD THE 'CBM 4032' PROGRAM"
730 SYSUU+71
740 END
797 REM ** TO USE 8032 LOAD CBM4032 **
798 PRINT"[147]BEFORE RUNNING THIS PROGRAM ON AN 8032 LOAD CBM 4032 PROGRAM"
799 SYS1093:END
800 REM ** T I T L E P A G E **
802 PRINT"[147]";:POKEUT,UU%:IFPEEK(50003)=0THENPOKE53280,14:POKE53281,6
804 FORI=1TO38:PRINT"[166][146]";:NEXT
806 FORI=1TO22:PRINT"[157][166][146]";:NEXT
808 FORI=1TO37:PRINT"[157][157][166][146]";:NEXT
810 FORI=1TO22:PRINT"[145][157][166][146]";:NEXT
812 PRINT"[169] [146]
814 [153]" WAIT WAITSTEP
816 PRINT" [146] [163][223]
818 [153]"(null) WAIT
820 PRINT"C O M M O D O R E
822 [153]"EDUCATIONAL
824 PRINT"SOFTWARE
826 [143] ** COMMODORE LOGO **
827 [153][200](UD$,24);"PRESS SPACE BAR OR WAITWAIT":I[178]0
828 [161]A$:[139]A$[179][177]" "[167]I[178]I[170]1:[139]I[179]250[167]828
830 T1$[178]"":T2$[178]"":T3$[178]"":T4$[178]"":I[178]0
832 [137]300
835 [143] ** SPACE BAR PRESS **
840 [153][200](UD$,24);"PRESS SPACE BAR TO CONTINUEWAIT":[151]UO,0
844 [161]UI$:[139]UI$[179][177]" "[167]844
846 [142]
850 [143] ** PAGE DESIGN ROUTINE **
852 UP[178]UP[170]1:[153]"LOAD"
855 [153][200](UT$[170]UP$,21);[201](UP$[170]UG$[170][196](UP),18)
860 [153]" --------------------------------------"
862 [139]FF[178]1[167]870
864 [139]UH[179][177]0[167]870
865 [153][200](UD$,24);[200](UP$,7);"HELP - PRESS H <RETURN>"
870 UH[178]0:[153]"":[142]
875 [143] ** PLEASE WAIT REMARK **
880 [153][200](UD$,24);" ONE MOMENT PLEASE... "
885 [142]
900 [143] ** SET UP VARIABLES **
901 UX$[178]"H":[134]UQ%(1000):UB[178]32768:U1[178]196:U2[178]197:U3[178]198:U4[178]216:UC[178]167:UU[178]1024
902 UT[178]59468:UU%[178]12:UL%[178]14:UP%[178]1146:UM[178]32768:[151] 50003,0:UO[178]158
903 [139][194](50003)[178]0[167]UB[178]1024:U1[178]209:U2[178]210:U3[178]211:U4[178]214:UC[178]204:UU[178]2048
904 [139][194](50003)[178]0[167]UT[178]53272:UU%[178]21:UL%[178]23:UP%[178]2139:UM[178]1024:UO[178]198
905 UD$[178]""
906 UP$[178]" "
907 UT$[178]" (null)(null)ATN(null)VAL(null) CLOSECLOSECLOSECLOSE":[143] PLACE PROGRAM TITLE HERE !!!!!!!!!!!!!!!!!***
908 [142]
910 [143] ** SET VARIABLES **
915 [141]900
916 [134] H$(15),L(102),D(102)
917 :
920 [143] ** CHECK FOR 8032 **
925 [153]"LOAD":[153]"CLOSE":[143] SHIFTED SPACE
930 [139][194](UB[170]40)[179][177]96[167][141]700
931 [143] ** MEMORY CHECK **
932 [139][184](0)[177]2000[167]937
933 [153]"LOADTHIS MACHINE DOES NOT HAVE ENOUGH"
934 [153]"MEMORY TO RUN THIS PROGRAM !"
935 [158]UU[170]71
936 [128]
937 [153]"LOAD":[139][194](50003)[178]0[167]962
940 [143] ** BASIC 2.0 OR 4.0 OR C-64 SETUP **
941 [151]1075,133:[151]1076,144:[151]1077,234:[151]1079,4:[151]1080,133:[151]1081,145
942 [151]1091,155:[151]1098,133:[151]1099,144:[151]1100,234:[151]1103,133
943 [151]1104,145:[151]1105,234:[151]1082,234
945 [139][194](50003)[179][177]160[167]955
950 [151]1093,88:[151]1094,228:[151]1097,85:[151]1102,228:[137]965
955 [139][194](50003)[179][177]1[167]990
960 [151]1093,49:[151]1094,230:[151]1097,46:[151]1102,230:[137]965
962 [151]2099,141:[151]2100,20:[151]2101,3:[151]2103,8:[151]2104,141:[151]2105,21
963 [151]2106,3:[151]2115,145:[151]2117,52:[151]2118,234:[151]2121,49:[151]2122,141
964 [151]2123,20:[151]2124,3:[151]2126,234:[151]2127,141:[151]2128,21:[151]2129,3
965 [158]UU[170]48:[143] DISABLE STOP KEY
970 [141]800:[143] TITLE
980 [137]300:[143] MENU
990 [153]"LOADTHE PGM WILL NOT WORK ON THIS MACHINE!":[128]
1000 [139]UZ[178]1[167][158]UP%:[158]UP%:UZ[178]0:[143] ** PROGRAM STARTS HERE **
1001 [153]"LOAD";:[140]:[139][194](50003)[178]0[167][151]53281,6:[151]53280,6
1080 UT$[178]" (null)(null)ATN(null)VAL(null)":[153]"LOAD":[151] UT,UL%
1110 UG$[178]"RIGHT$NTRODUCTION":UP[178]0:[141]850
1480 [153]"LEFT$OW MANY PLAYERS? (0,1 OR 2) ";
1490 UL[178]1:US$[178]"012H":[141]35:N[178][197](UR$)
1500 [139]N[172](N[171]1)[172](N[171]2)[179][177]0[167]1490
1505 B$[178]"N":T$[178]"Y"
1510 [139]N[178]2[167][141] 2470
1520 [153]"(null)ANDOM (null)TARTING (null)OCATIONS?(Y/N) ";
1530 R[178]1:UL[178]1:US$[178]"HYN":[141]35:[139]UR$[178]"Y"[167]R[178]0
1540 S(0)[178]0:S(1)[178]0:S0$[178]"PLAYER"
1550 S1$[178]"COMPUTER"
1560 [139]N[178]0[167]S0$[178]"COMPUTER 2"
1561 [139]N[178]2[167]S0$[178]"PLAYER 2"
1570 [139]N[178]2[167]S1$[178]"PLAYER 1"
1580 [143]
1585 [129]I[178]0[164]7:[135] H$(I),H$(I[170]8),H(I):[130]:[140]
1590 [131] M,X,40,H,A,-1,K,D,1,U,W,-40,N,Z,39,",",C,41,Y,Q,-41,I,E,-39
1601 [139][194](50003)[178]0[167][151]53281,1:[153]"LOAD";:[151]53281,6:[151]53280,14:[137]1603
1602 [153]"LOAD";
1603 UT$[178]" SNAKES":UH[178]1:[151] UT,UU%:UP[178]S(1)[170]S(2):UG$[178]"GAME":FF[178]1:[141]855
1604 [139]N[179][177]2[167]T$[178]"Y"
1610 [129]I[178]UM[170]40[164]UM[170]960[169]920
1620 [129]J[178]I[164]I[170]39:[151]J,170:[130]J,I
1630 [129]I[178]UM[170]40[164]UM[170]920[169]40
1640 [151]I,170:[151]I[170]39,170:[130]I
1650 L(0)[178]UM[170]337:L(1)[178]UM[170]528:Q[178]30:QD[178].3
1660 D(0)[178]40:D(1)[178][171]40:[139]R[178]1[167]1690
1670 [129]I[178]0[164]1:D(I)[178]1[170]39[172][181](2[172][187](1))
1680 L(I)[178]40[172][181](17[172][187](1)[170]4)[170][181](32[172][187](1))[170]UM[170]3:[130]
1690 T[178]TI:Q[178]Q[171]QD
1700 [129]I[178]0[164]1
1710 F[178]1:[161] A$:[139]A$[178]""[167]1790
1720 [139]B$[179][177]"Y"[167]1750
1730 [139]A$[178]"J"[167]U[178]1:[137] 2260
1740 [139]A$[178]"S"[167]U[178]0:[137] 2260
1750 [129]J[178]0[164]15:[139]A$[178]H$(J)[167]1770
1760 [130]:[137] 1790
1770 [139]N[179][177]0[175]J[179]8[167]D(1)[178]H(J):[137]1710
1780 [139]N[178]2[175]J[177]7[167]D(0)[178]H(J[171]8):[137]1710
1790 [139]N[178]2[167]1811
1800 [139]I[172]N[178]0[175][194](L(I)[170]2[172]D(I))[179][177]32[167]1830
1810 [143]
1811 F[178]2:[139][194](L(I)[170]D(I))[178]32[167]1930
1820 [139]I[170]N[177]1[167]2040
1830 A[178]41[171][182](D(I)):[129]J[178]A[164]20[172]A[169]A
1840 [129]K[178][171]1[164]1[169] 2
1850 [139][194](L(I)[170]K[172]J)[179][177]32[167]1870
1860 [130]:[130]:K[178]1
1870 [139]K[178]1[167]1910
1880 [139][194](L(I)[170]J)[178]32[167]1920
1890 [139] J[178]A [167] [145]F[137]1811,2040
1900 [139][187](1)[177].5[167]1920
1910 A[178][171]A
1920 D(I)[178]A
1930 [139]T$[178]"N"[167]L(I)[178]L(I)[170]D(I):[151]L(I),214[170]5[172]I:[151]L(I)[171]D(I),32:[137]2010
1940 [151] L(I),214[170]5[172]I:L(I)[178]L(I)[170]D(I)
1950 [139][182](D(I))[178]1[167][151] L(I),61[170]D(I)
1960 [139][182](D(I))[178]40[167][151] L(I),[171]1[172](D(I)[173]10[171]26)
1970 [139]D(I)[178]39[167][151] L(I),109
1980 [139]D(I)[178]41[167][151] L(I),125
1990 [139]D(I)[178][171]39[167][151] L(I),110
2000 [139]D(I)[178][171]41[167][151] L(I),112
2010 [130] I
2020 [139]TI[171]T[179]Q[167]2020
2030 [137] 1690
2040 S(I)[178]S(I)[170]1:QD[178]QD[170].1:[139]N[178]2[167]2060
2050 [139]I[178]0 [175] N[178]1[167]QD[178].3
2060 Q[178]Q[171]QD:[151] L(I)[170]D(I),42
2070 F[178]60:
2080 F[178]112[171]F:[151] 59409,F:[141]25000 T[178]TI
2090 [139]TI[171]T[179]10[167]2090
2109 UH[178]1:UP[178]0:UG$[178]"RESULTS":[141]850
2150 T[178]TI
2160 [139]S(1)[167][153]"";S1$;" WONWAIT"
2170 [139]S(0)[167][153]"";S0$;" WONWAIT"
2180 [141]835
2190 [142]
2200 [143]
2210 [142]
2220 [153]" WAITCMD";:[129]T[178]1[164]217:[130]T
2230 [153]" CMD";:[129]T[178]1[164]217:[130]T
2240 [161] A$:[139]A$[178]""[167]2220
2250 [142]
2260 [143] *** BLASTERS ***
2270 BL[178]L(U)[170]D(U): B[178]67
2280 [139][182](D(U))[178]40[167]B[178]93
2290 [139][182](D(U))[178]39[167]B[178]78
2300 [139][182](D(U))[178]41[167]B[178]77
2310 [139][194](BL)[179][177] 32[167]2350
2320 [151] BL,B
2330 [129]TT[178]1[164]10:[130]TT
2340 [151] BL,32: BL[178]BL[170]D(U):[137] 2310
2350 [139][194](BL)[178]170[167]T[178]TI:[137]1810
2360 [139]T$[178]"N"[167]2380
2370 [139][194](BL)[178]214 [176] [194](BL)[178]219[167]2430
2380 Q[178]Q[171](QD[170].1)
2390 I[178]1:[139]U[167]I[178]0
2400 S(I)[178]S(I)[170]1
2410 [151] BL,42 : [141]25000:[137] 2109
2430 [151]BL,42:[141]25000:
2440 [151] BL,32
2460 [137] 2109
2470 [143] *** TAILS? OR BLASTERS? ***
2480 [153]"(null)AILS?(Y/N) ";
2490 UL[178]1:US$[178]"HYN":[141]35:A$[178]UR$
2500 [139]A$[178]"N"[167]T$[178]"N":B$[178]"Y":[142]
2520 [153]"PEEKLASTERS?(Y/N)";
2530 UL[178]1:US$[178]"HYN":[141]35:A$[178]UR$
2540 [139]A$[178]"Y"[167]B$[178]"Y"
2550 [139]A$[178]"N"[167]B$[178]"N"
2560 [142]
25000 [129]I[178]1[164] 100[169]2:[151]59467,16:[151]59466,10:[151]59464,I:[130]:[153][199](7)
25005 [129]TT[178]1[164]2500:[130]
25010 [142]