C64 Software  <  SCA: The C64 Software Collection / BITS UND BYTES

  Run
10 REM *** WRITTEN BY QUINCY LEE ***
15 REM          AUGUST 1982
20 IFPEEK(861)<>136THENPOKE861,136:LOAD"",8,1
30 DIMTX$(18),TS(18):V=53248
40 SP$="":DN$=""
50 GOTO900
100 REM ---PAGE ROUTINE---
105 POKE2040,237:POKEV+23,PEEK(V+23)AND254:POKEV+29,PEEK(V+29)AND254
110 POKE646,HC:REM HC IS THE HEADING COLOUR
115 IFCS=0THENPRINT""
120 CS=0:PRINT""H1$;H2$;H3$
130 SF$="":REM SF$ INDICATES IF THE PAGE HAS BEEN INTERRUPTED
140 POKE646,PEEK(V+33)
150 TL=0:FORI=1TO18:TS(I)=VAL(TX$(I)):IFTS(I)=0THEN170
160 PRINTLEFT$(SP$,TS(I));MID$(TX$(I),3);"";:BL=I:IFTL=0THENTL=I
170 PRINT:NEXTI
172 PRINTLEFT$(DN$,BL+4);LEFT$(SP$,TS(BL));MID$(TX$(BL),3)"";:GOSUB800
180 POKE646,HC:PRINT""
190 POKEV+39,PC:REM PC IS THE TEXT COLOUR
200 FORR=3+TLTO3+BL
210 POKEV+1,44+8*R
230 IFTS(R−3)=0THEN410
240 POKEV,8*TS(R−3)+2:POKEV+16,0:POKEV+21,1
260 FORX=TS(R−3)TO43STEP2:CP=1023+40*R+X:PK=PEEK(CP)
270 IFPK=0THEN410
310 IFX<32THENPOKEV,8*X+2:GOTO330
320 POKEV+16,1:POKEV,8*X−254
330 FORF=237TO242STEP4
340 POKE2040,F
350 IFF=237THENPOKE55294+40*R+X,PC:POKE55295+40*R+X,PC
370 NEXTF
400 NEXTX
410 POKEV+21,0:NEXTR
420 POKEV+21,0
430 FORI=1TO18:TX$(I)="":NEXTI
440 RETURN
450 REM ---CURSOR-LOCATED INPUT---
460 POKE209,C1%:POKE210,C2%:POKE211,C3%+1:POKE214,C4%
505 IFSF$<>""THENRS$="":POKE211,C3%
507 PRINTMID$("",9−IL,IL*2);
510 RF$="":POKE204,0:POKE646,CC:POKE647,CC:PRINT"";
520 GETIN$:IFIN$=""THEN520
530 GOSUB540:IFRF$<>""THEN520
535 RETURN
540 REM ---CHECK INPUT---
550 POKE646,CC:POKE647,CC
560 IFIN$=CHR$(13)ANDLEN(RS$)>0THENPOKE204,1:PRINT"":SF$="":RF$="":RETURN
570 IFIN$<>CHR$(20)ORLEN(RS$)=0THEN600
580 RS$=LEFT$(RS$,LEN(RS$)−1)
590 PRINT"";:RETURN
600 IFLEN(RS$)>=ILTHENRETURN
610 FORIZ=1TOLEN(IC$)
620 IFIN$=MID$(IC$,IZ,1)THENRS$=RS$+IN$:PRINTIN$;:RETURN
630 NEXTIZ:RETURN
650 REM ---SPACE BAR PRESS---
660 POKE646,HC
670 PRINT""
680 GETIN$:IFIN$<>""THEN680
690 RETURN
700 REM ---WAITING CURSOR---
705 POKE209,C1%:POKE210,C2%:POKE211,C3%:POKE214,C4%
707 PRINTMID$("",9−IL,IL*2);
710 RS$="":RF$="":POKE204,0:POKE646,CC:POKE647,CC:PRINT"";
730 GETIN$:IFIN$=""THEN730
740 GOSUB540:IFIN$=""THEN730
750 SF$="":POKE204,1:PRINT:RETURN
800 REM ---REMEMBER CURSOR---
810 C1%=PEEK(209):C2%=PEEK(210):C3%=PEEK(211):C4%=PEEK(214):RETURN
820 REM ---WAIT FOR RETURN KEY---
830 GOSUB800:POKE646,PC:PRINT"
840 POKE209,C1%:POKE210,C2%:POKE211,C3%:POKE214,C4%
845 POKE646,1:POKE647,1:POKE204,0
850 GETIN$:IFIN$<>CHR$(13)THEN850
860 PRINT"":POKE204,1:RETURN
900 REM----SET UP SPRITES----
910 POKEV+40,6:POKEV+41,2:POKEV+39,2
920 POKEV+23,7:POKEV+29,199
930 POKEV+3,137
940 POKE2042,250:POKEV+4,160:POKEV+5,176:POKEV+27,4
950 POKE2040,249:POKEV,72:POKEV+1,137
960 POKEV+2,80:POKEV+16,3
970 POKE2041,251
980 FORI=3TO7:POKE2040+I,248+I:POKEV+1+2*I,111:NEXTI
982 POKEV+6,140:POKEV+8,164:POKEV+10,188:POKEV+12,132:POKEV+14,180
984 POKEV+42,13:POKEV+43,13:POKEV+44,13:POKEV+45,9:POKEV+46,9
1000 REM----TITLE----
1001 V=53248:POKEV+21,0:POKE53272,21
1002 POKEV+32,12
1003 POKEV+33,12
1020 PRINT""TAB(15)""
1025 POKE 646,PEEK(V+33)
1030 PRINT""
1040 PRINT""
1050 PRINT""
1060 FORI=1TO4:PRINTTAB(17)"":NEXT:PRINT"";
1100 REM----ANIMATION----
1170 POKEV+21,7
1180 FORX=42TO6STEP−2
1190 :FORF=243TO248
1200 : IFF>243THEN1270
1210 :  POKE2041,243
1220 :  IFX>31THENPOKEV+2,X*8−256:GOTO1240
1230 :  POKEV+2,X*8:POKEV+16,1
1240 :  POKE55775+X,13:POKE55815+X,13:POKE55855+X,13
1250 :  POKE55774+X,13:POKE55814+X,13:POKE55854+X,13
1260 :  GOTO1280
1270 : POKE2041,F
1280 : FORT=1TO18:NEXTT
1290 :NEXTF
1300 :FORT=1TO30:NEXTT
1310 NEXTX
1320 POKE2041,243
1330 POKEV+2,40
1340 FORF=244TO246:POKE2041,F:NEXTF
1350 FORX1=330TO90STEP−40:X=X1−256
1355 IFX1<256THENX=X1:POKEV+16,0
1360 POKEV,X:POKEV+1,139:FORT=1TO100:NEXTT
1365 POKEV,X−10:POKEV+1,137
1370 POKEV,X−20:POKEV+1,136
1375 POKEV,X−30:POKEV+1,137
1380 NEXTX1
1385 POKEV,50:POKEV+1,139:FORT=1TO200
1387 POKEV,40:POKEV+1,137
1388 FORT=1TO500:NEXTT
1390 FORI=1TO4:PRINTTAB(17);"":NEXTI
1400 FORT=1TO200:NEXTT
1410 FORI=25TO5STEP−.5
1420 POKE1721+40*INT(RND(1)*4)+INT(RND(1)*5),32
1430 FORT=1TOI:NEXTT
1440 NEXTI
1450 POKEV+27,0
1460 PRINT""TAB(8)""
1490 POKEV+29,199:POKEV+21,255
1500 PRINT"";TAB(23);
1510 FOROJ=1TO8:PRINT"";:FORI=1TO200:NEXTI
1520 PRINT"";:FORI=1TO200:NEXTI:NEXTOJ
1530 POKEV+21,0
4000 REM *** TEXT ***
4010 PRINT"":POKE53272,23:POKEV+32,5:POKEV+33,9:HC=5
4020 H1$="
4022 H2$="
4024 H3$="
4030 TX$(6)=""
4035 TX$(8)=""
4040 TX$(10)=""
4042 TX$(12)=""
4045 TX$(14)=""
4047 PC=14:GOSUB100:GOSUB650
4050 TX$(6)=""
4055 TX$(8)=""
4060 TX$(10)=""
4070 TX$(14)="
4080 PC=13:GOSUB100:GOSUB650
4090 TX$(5)=""
4100 TX$(7)=""
4110 TX$(9)=""
4120 TX$(11)=""
4130 TX$(14)=""
4140 PC=10:GOSUB100:GOSUB650
4150 TX$(2)=""
4160 TX$(4)=""
4170 TX$(6)=""
4180 PC=3:GOSUB100
4190 IC$="":IL=1:CC=5:GOSUB450:IFRS$=""THEN4200
4191 PRINT"
4192 PRINT"
4193 PRINT"
4194 PRINT"":GOSUB700
4195 PRINT""
4196 PRINT""
4197 PRINT""
4198 PRINT"":GOTO4190
4200 PRINT""
4210 PRINT"":FORT=1TO100:NEXTT
4220 BN$=""
4230 FORI=1TO10STEP3:PRINTTAB(14)MID$(BN$,I,3):FORT=1TO50:NEXTT:NEXTI
4240 PRINT""
4250 FORI=13TO22STEP3:PRINTTAB(23)MID$(BN$,I,3):FORT=1TO100:NEXTT:NEXTI
4260 GOSUB650
4270 TX$(2)="":PC=7:GOSUB100
4280 PRINT""
4290 PRINT""
4300 PRINT""
4310 FORI=1TO7:J=2↑I
4320 FORT=1TO80:NEXTT:PRINTTAB(11);I;
4330 FORT=1TO30:NEXTT:PRINTTAB(27−LEN(STR$(J)));J:NEXTI:PRINTTAB(11);8
4340 PRINT""
4350 PRINT"";:GOSUB800
4360 IL=3:IC$="":CC=4:GOSUB450
4370 IFRS$=""THEN4410
4380 PRINT""
4382 PRINT""
4387 GOSUB700
4390 PRINT"":GOSUB450:GOTO4370
4410 TX$(2)=""
4430 TX$(5)=""
4440 TX$(7)=""
4450 TX$(9)=""
4460 TX$(11)=""
4500 PC=12:GOSUB100:CC=14
4510 GOSUB450:IFRS$=""THEN4550
4520 PRINT"":GOSUB700
4530 PRINT"":GOTO4510
4550 PRINT""
4560 PRINT"":GOSUB650
4570 TX$(4)=""
4580 TX$(6)=""
4590 TX$(9)=""
4600 TX$(11)=""
4610 PC=8:GOSUB100:IC$="":IL=2:CC=12
4620 GOSUB450:IFRS$=""THEN4660
4630 PRINT"":GOSUB700
4640 PRINT"":GOTO4620
4660 PRINT"
4670 PRINT"":GOSUB650
4680 TX$(4)="
4690 TX$(6)="
4700 TX$(8)="
4720 TX$(11)="
4730 TX$(13)="
4740 TX$(15)=""
4760 PC=14:GOSUB100:GOSUB650
4770 TX$(5)="
4780 TX$(7)="
4790 TX$(9)=""
4800 TX$(12)="
4820 PC=8:GOSUB100:GOSUB650
4830 TX$(2)="
4840 TX$(3)="
4850 TX$(5)="
4860 TX$(7)="
4870 PC=12:GOSUB100
4875 PL=INT(RND(1)*65536):PL$=MID$(STR$(PL),2):PN$=STR$(PEEK(PL))
4880 PRINT""PL$"";:GOSUB820
4890 PRINT""PN$:PRINT""
4900 TX$(15)=""+PN$+""
4910 TX$(17)=""+PL$+""
4920 CS=1:GOSUB100:GOSUB650
4930 TX$(5)="
4940 TX$(7)="
4950 PC=10:GOSUB100:PRINT""PL$"";:GOSUB800:GOSUB820
4960 PRINT"":PRINT"":GOSUB650
4970 TX$(1)="
4980 TX$(3)="
4990 TX$(5)=""
5000 PC=4:GOSUB100:PL=INT(RND(1)*4096)+49152:PL$=MID$(STR$(PL),2)
5010 PN=INT(RND(1)*256):PN$=MID$(STR$(PN),2):IFPN=PEEK(PL)THEN5010
5015 PRINT""PL$"";:GOSUB820
5020 PRINT""PEEK(PL):PRINT"":PRINT""PL$""PN$;:GOSUB820
5030 POKEPL,PN:PRINT"":PRINT""PL$"";:GOSUB820
5040 PRINT""PEEK(PL):PRINT"":GOSUB650
5050 TX$(1)="
5060 TX$(3)="
5070 TX$(5)="
5080 TX$(7)="
5090 TX$(9)="
5100 PC=14:GOSUB100:IC$="":IL=1
5110 CC=5:GOSUB450:IFRS$=""THEN5160
5120 PRINT"
5130 PRINT"":GOSUB700
5140 PRINT""
5150 PRINT"":GOTO5110
5160 PRINTTAB(26)"
5170 TX$(11)="":PC=15:CS=1:GOSUB100
5180 GOSUB450:IFRS$=""THEN5230
5190 PRINT"
5200 PRINT"":GOSUB700
5210 PRINT""
5220 PRINT"":GOTO5180
5230 PRINTTAB(26)"
5240 TX$(13)="":PC=14:CS=1:GOSUB100
5250 GOSUB450:IFRS$=""THEN5280
5260 PRINT"":GOSUB700
5270 PRINT"":GOTO5250
5280 PRINTTAB(26)"
5285 TX$(15)="
5290 TX$(17)="
5300 PC=15:CS=1:GOSUB100:GOSUB650
5310 TX$(4)="
5320 TX$(6)="
5330 TX$(8)="
5340 TX$(12)="
5350 TX$(14)="":PC=7:GOSUB100:GOSUB650
5360 TX$(2)="
5370 TX$(4)="
5380 TX$(6)="
5390 PC=10:GOSUB100:IL=1:IC$=""
5395 CC=10:GOSUB450:IFRS$=""THEN5420
5400 PRINT"
5405 PRINT"":GOSUB700
5410 PRINT""
5415 PRINT"":GOTO5395
5420 TX$(8)="
5430 TX$(10)="":CS=1:PC=13:GOSUB100
5440 CC=13:GOSUB450:IFRS$=""THEN5490
5450 PRINT"
5460 PRINT"":GOSUB700
5470 PRINT""
5480 PRINT"":GOTO5440
5490 TX$(12)="":CS=1:PC=10:GOSUB100
5500 CC=10:GOSUB450:IFRS$=""THEN5550
5510 PRINT"
5520 PRINT"":GOSUB700
5530 PRINT""
5540 PRINT"":GOTO5500
5550 TX$(14)="
5560 TX$(16)=""
5570 PC=13:CS=1:GOSUB100:GOSUB650
5580 TX$(1)="
5590 TX$(3)="
5600 TX$(5)="
5610 TX$(7)="
5620 TX$(9)="
5630 PC=12:GOSUB100:PRINT"";
5635 GOSUB800:IC$="":IL=1:CC=3
5640 GOSUB450:IFRS$<>""THEN5640
5650 PRINT"";:GOSUB800
5660 GOSUB450:IFRS$<>""THEN5660
5670 PRINT""TAB(14)"";:GOSUB800:IL=2
5680 GOSUB450:IFRS$<>""THEN5680
5690 PRINT""TAB(22)""
5700 TX$(14)="
5710 TX$(16)="
5720 CS=1:GOSUB100
5730 GOSUB450:IFRS$<>""THEN5730
5740 PRINT"":PRINTSP$
5750 TX$(16)="
5760 TX$(18)="
5770 CS=1:GOSUB100:GOSUB650
5780 H1$="":H2$="":H3$=""
5790 TX$(6)="
5800 TX$(9)="
5810 TX$(12)="
5820 PC=5:GOSUB100
5830 FORI=1TO3:POKEV+32,RND(1)*16:POKEV+33,RND(1)*16:NEXTI:PRINT""
5840 FORI=1TO7:POKEV+32,RND(1)*16:POKEV+33,RND(1)*16:NEXTI
5850 POKEV+32,14:POKEV+33,6:POKE53272,21
READY.