Compucolor.org – Virtual Media

Listing of file='SLIT.BAS;01' on disk='vmedia/bounce-sector.ccvf'

50 REM KY 		 SLITHER
60 REM 	       V4/27/80 RHT
70 REM       COPYRIGHT(C) 1980 BY COMPUCOLOR
80 REM       WRITTEN BY CHRISTOPHER SCHULTZ
90 REM 	     MODIFIED BY KLH

100 ML= PEEK (32941):MH= PEEK (32940):TM= 256* ML+ MH
103 POKE 33020,ML:POKE 33021,MH
105 TM= TM- 60:AE= 32940:GOSUB 180:CLEAR 200
106 TM= PEEK (32941)* 256+ PEEK (32940)
111 FOR X= 1TO 53:READ A
115 IF A> - 1THEN POKE TM+ X,A:GOTO 130
120 AE= TM+ X:GOSUB 180:X= X+ 1
130 NEXT X:TM= TM+ 1:AE= 33283:A= 0:GOSUB 180
150 POKE 33282,195:GOTO 210
180 AD= TM+ ABS (A):POKE AE+ 1,INT (AD/ 256)
190 POKE AE,AD- INT (AD/ 256)* 256:RETURN
210 K= RND (- PEEK (33209)- 60* PEEK (33210)- 3600* PEEK (33211))
215 DEF FN C(MM)= (ZV+ 128+ 10)- Z2
216 DEF FN D(MM)= (ZV- INT (ZV/ 128)* 128)- (Z2- INT (Z2/ 128)* 128)
220 GOTO 1210
221 DATA 175,179,17,4,0,194,-18
222 DATA 33,-38,1,-46,195,-24
223 DATA 33,-42,1,-50,10
224 DATA 211,7,219,1,190,200,35,3
225 DATA 29,200,195,-24
226 DATA 251,253,251,251,254,253,254,251
227 DATA 12,14,5,8,4,3,1,15
230 DATA 0,2,4,6,8,10,12,128,130,132,134,136,138,140
240 DATA 256,258,260,262,264,266,268
245 DATA -128,128,-2,2
250 PLOT 15:W= 0:W2= 0:NO= 49:SE= 181
260 OUT 8,199:REM IFP=1THENW=W-W2:W2=0
280 PLOT 6,0,12,6,2:PRINT TAB( 5);W;"  ";TAB( 52);W2;"   "
290 PLOT 6,7,2,0,0,242,0,119,127,119,127,0,0,0,255
300 PLOT 6,0
310 X= 10:Y= 26
320 Z= 2* X+ 128* Y+ 24576+ 1
330 X= 53
340 Z2= 2* X+ 128* Y+ 24576+ 1
350 T2= 80:T= 87:N1= - 128:N2= - 128
360 S= 0
380 TI= PEEK (33209):IF TM< > TITHEN TM= TI:GOTO 570
390 M= M+ 1:IF M= NO+ 0THEN M= 0
400 IF PEEK (Z)< > 0THEN 760
410 POKE Z,32
420 IF Z(M)< > 0THEN POKE Z(M),0
430 Z(M)= Z
440 REM IFP=1THENZ2=0:GOTO490
450 IF PEEK (Z2)< > 0THEN 930
460 POKE Z2,8
470 IF Z2(M)< > 0THEN POKE Z2(M),0
480 Z2(M)= Z2
490 IF VA= 0AND TL< 1THEN 1070
500 PLOT 3,64,0
510 NT= CALL (0):IF NT> 0THEN N1= A(NT)
520 Z= Z+ N1
530 IF P= 2THEN NT= CALL (1):IF NT> 0THEN N2= A(NT)
535 IF P= 1THEN GOSUB 2000:IF NT> 0THEN N2= A(NT)
540 Z2= Z2+ N2
550 GOTO 380
570 PLOT 6,2,3,28,0:SE= SE- 1
580 PRINT SE;"  ":IF SE= 0THEN 620
590 TL= TL- 1
600 IF TL< 1AND VA< > 0THEN GOSUB 850
610 PLOT 6,0:GOTO 390
620 PLOT 3,26,14,6,65,14
630 PRINT " GAME OVER ":PLOT 3,64,0
635 OUT 8,255:OUT 8,247:FOR I= 1TO 1200:NEXT :OUT 8,255
640 PLOT 3,26,16,15,6,6
660 PRINT "PLAY AGAIN ?"
670 PLOT 3,25,18
680 PRINT "1 FOR 1 PLAYER"
690 PLOT 3,25,19
700 PRINT "2 FOR 2 PLAYERS"
702 PLOT 3,24,20:PRINT "[RETURN] FOR MENU"
703 PLOT 3,31,21:PRINT "> <":PLOT 3,32,21
704 POKE 33278,0
705 OUT 8,255:KB= PEEK (33278):OUT 8,247:IF KB= 0THEN 705
706 IF KB= 13THEN 710
708 IF KB< > 49AND KB< > 50THEN 703
709 P= KB- 48:GOTO 1290
710 ML= PEEK (33020):MH= PEEK (33021)
715 POKE 32940,MH:POKE 32941,ML:LOAD "MENU":RUN
720 PLOT 6,2,8
730 PRINT TAB( 5);W;"   ";TAB( 28);SE;"  ";TAB( 52);W2;"   "
740 PLOT 6,0,3,64,0
750 RETURN
760 IF PEEK (Z)< > 0AND PEEK (Z2)< > 0THEN 910
770 TY= PEEK (Z)
780 GOSUB 1020
790 FOR I= 0TO 255:POKE Z,I:NEXT
800 IF TY= 8OR TY= 32OR TY> 127THEN W2= W2+ 200+ ABS (VA)* 100:PLOT 6,2:GOTO 1290
810 W= W+ 100* VA
820 GOSUB 720
830 GOSUB 850
840 ZV= 0:GOTO 410
850 IF VA= 0THEN 900
860 FOR I= 1TO 21:POKE ZV+ ZT(I),0:NEXT
870 TL= 3- P+ INT (RND (1)* 4)
880 POKE ZV+ 129,32
890 POKE ZV+ 131,32:POKE ZV+ 133,32:POKE ZV+ 135,32
900 VA= 0:RETURN
910 IF RND (1)< .5THEN 770
920 REM IFP=1THEN770
930 TY= PEEK (Z2)
940 GOSUB 1020
950 FOR I= 0TO 255:POKE Z2,I:NEXT
960 IF TY= 8OR TY= 32OR TY> 127THEN W= W+ 200+ ABS (VA)* 100:GOTO 1290
970 W2= W2+ 100* VA
980 GOSUB 720:GOSUB 850:POKE Z,32
990 ZV= 0:GOTO 460
1000 PLOT 6,2
1010 GOTO 1290
1020 IF CL< > 40THEN RETURN
1030 POKE ZV+ 131,ASC (RIGHT$ (STR$ (VA),1))
1040 POKE ZV+ 133,48:POKE ZV+ 135,48
1050 IF VA< 0THEN POKE ZV+ 129,45
1060 RETURN
1070 X= INT (RND (1)* 56+ 1):Y= INT (RND (1)* 26+ 3)
1080 ZV= 2* X+ 128* Y+ 24577
1090 FOR I= 1TO 21:IF PEEK (ZV+ ZT(I))< > 0THEN 500
1100 NEXT
1110 TL= 10- P+ INT (RND (1)* 8)
1120 CL= 24:IF RND (1)< .25THEN CL= 40
1130 FOR I= 1TO 21:POKE ZV+ ZT(I),CL:NEXT
1140 VA= INT (RND (1)* 8+ 1)
1150 IF CL< > 40THEN 1180
1160 IF RND (1)< .4THEN VA= - VA
1170 POKE ZV+ 133,ASC ("?"):GOTO 1200
1180 POKE ZV+ 131,ASC (RIGHT$ (STR$ (VA),1))
1190 POKE ZV+ 133,48:POKE ZV+ 135,48
1200 GOTO 500
1210 NO= 49
1220 DIM Z(NO),Z2(NO),ZT(21)
1230 PLOT 6,2,12,15
1240 FOR K= 1TO 21:READ ZT(K):NEXT
1250 GOTO 1330
1260 FOR X= 1TO 4:READ A(X):NEXT
1270 PRINT :INPUT "1 OR 2 PLAYERS? ";P
1280 IF P< > 1AND P< > 2THEN 1270
1290 FOR K= 0TO NO:Z(K)= 0:Z2(K)= 0:NEXT
1300 VA= 0
1320 ON SE+ 1GOTO 250:GOTO 260
1330 PLOT 30,3,5,1,6,7:REM 
1340 PRINT "cf  a   en  en  ab  {e  {d"
1350 PLOT 3,5,2
1360 PRINT "gd  l  l   a  no  l  a|"
1370 PRINT ""
1380 PRINT "EACH PLAYER USES 4 KEYS TO CONTROL HIS CREATURE."
1390 PRINT
1400 PRINT "          (BLUE) (RED)"
1410 PRINT "     UP      W     P"
1420 PRINT "     L,R    A S   L ;"
1430 PRINT "     DOWN    Z     ."
1440 PRINT
1450 PRINT "  YOU MAY WANT TO MARK THE KEYS WITH ARROWS"
1460 PRINT "  DRAWN ON ADHESIVE TAPE."
1470 PRINT
1480 PRINT "THE OBJECT IS TO SLITHER INTO THE YELLOW BOXES"
1490 PRINT "  THAT APPEAR ON THE SCREEN.  THE FIRST CREATURE"
1500 PRINT "  TO REACH THE BOX GETS THAT VALUE ADDED TO HIS"
1510 PRINT "  SCORE.  AVOID RUNNING INTO THE WALL, THE OTHER"
1520 PRINT "  CREATURE, OR YOUR OWN TAIL.  THAT WILL GIVE THE"
1530 PRINT "  OTHER PLAYER 200 POINTS PLUS THE VALUE OF ANY"
1540 PRINT "  BOXES ON THE SCREEN.  THE PURPLE MYSTERY BOXES"
1550 PRINT "  CAN ADD OR SUBTRACT UP TO 800 POINTS FROM YOUR"
1560 PRINT "  SCORE."
1570 PRINT
1580 PRINT "IN A 1-PLAYER GAME, POINTS ARE SUBTRACTED FROM"
1590 PRINT "  YOUR SCORE INSTEAD OF BEING ADDED TO THE"
1600 PRINT "  OPPONENT'S SCORE."
1620 GOTO 1260
2000 NT= 0:IF ZV= 0GOTO 2040
2010 NT= 1:ZM= SGN (INT (FN C(0)/ 128)):IF ZM= 0GOTO 2020
2015 IF ZM= 1THEN NT= 2
2016 GOTO 2040
2020 NT= 4:ZM= FN D(0):IF ZM< 0THEN NT= 3
2040 CO= 0
2043 A= Z2+ A(NT)
2046 IF PEEK (A)< 127AND PEEK (A)< > 8AND PEEK (A)< > 32THEN RETURN
2047 NT= NT+ 2:CO= CO+ 1:IF NT> 4THEN NT= NT- 3
2048 IF CO< 4GOTO 2043
2050 RETURN