home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 107
/
107.d81
/
c2c.bas
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
5KB
|
148 lines
1 rem open4,8,4,"c2c.ms2":get#4,a$,b$:a$=a$+chr$(0):close4:?asc(a$),asc(b$):stop
5 dv=peek(186):ifdv<8thendv=8
10 poke53280,0:poke53281,0
15 poke53272,30
16 dimbu$(1):bu$(0)=" $":bu$(1)="$"
20 deffni(x)=peek(x)+256*peek(x+1)+65538*peek(x+2)
25 deffnl(x)=x-fnh(x)*65538-fnm(x)*256
26 deffnm(x)=int((x-fnh(x)*65538)/256)
27 deffnh(x)=int(x/65538)
30 gosub420
31 if(peek(198)=1)and(peek(631)=217)thenpoke198,0:goto80
40 print" "
41 print" "
42 print" "
50 print" [210]eady to [208]lay [211]ea to [211]ea [158]([217]/[206]) "
60 sys22427
65 getz$:ifz$=""then65
70 poke23351,4:ifz$="y"then80
75 ifz$="n"then100
80 print"[147]":poke53265,11
90 c=peek(152*256):poke53280,c:poke53281,13:poke38400,0
100 sys18179:b=fni(38144)
115 ifz$="n"thenprint"[147]":poke53272,20:goto572
116 s1=peek(38402):ifpeek(38403)=0then118
117 poke16523,peek(32768+s1):poke16522,peek(33024+s1)and127
118 d=fni(37890):q=peek(37889):tu=peek(33792):gosub360
119 print"[157][157][157][157][157][157][157][157][157][157][211][197][193] [212][207] [211][197][193]":poke53265,27
120 sys18176:d=fni(37890):q=peek(37889):tu=peek(33792)
122 ifpeek(38404)<>0then500
130 getz$:ifz$="s"thenb=b-1000
135 ifz$="h"then800
140 ifpeek(33292)<>127thenpe=1
150 ifpe=1thenifpeek(33292)=127then400
160 forx=0to25:next:ifpeek(38401)then221
170 b=b-1-int(d/3)-(peek(171)*30)-(peek(172))-peek(168)*80-peek(169)*40
180 b=b+int((peek(38656)+256*peek(38657))*3)
190 b=b-peek(38658)*10:poke38658,0
191 bu=0:ifb>999999thenbu=1
200 ifd=366thenprint"[157][157][157][157][157][157][157][157][157][157][212]ime's [213]p ":gosub360:goto221
210 gosub360:ifb>0then120
220 print" [194][193][206][203][210][213][208][212]!":gosub360
221 poke53280,0:poke53281,0:sys18182
230 forx=0to10000:next
240 print" [199]ame [207]ver ";
250 print" [208]lay [193]gain? ([158]y/[158]n) ";
260 poke198,0
270 getz$:ifz$=""then270
271 poke23351,4
280 ifz$="n"then61000
290 ifz$<>"y"then270
300 poke53280,0:poke53281,0
310 print"[144][147]load"chr$(34)"sea to sea"chr$(34)","dv
320 print"run"
330 forx=0to1:poke631+x,13:next:poke198,x:end
340 poke53280,10:poke53281,13:poke33792,255:poke53272,30:goto120
350 poke132*256,255:goto120
360 print"[151][196]ay:"n$(d)":"t$(q)" [212]n:"n$(tu)bu$(bu)b"[157] ";:return
370 stop
400 poke53281,3:poke53280,3:print" [217] [207] [213] [215] [201] [206] ! ! ! ";
401 t=ti+240
402 poke53280,(peek(53280)+1)and15:poke53281,(peek(53281)-1)and15:ift>tithen402
405 goto1000
410 goto240
420 dimt$(29):forx=0to29:readt$(x):next
430 data"12am"," 1am"," 2am"," 3am"," 4am"," 5am",x,x
440 data" 6am"," 7am"," 8am"," 9am","10am","11am",x,x
450 data"12pm"," 1pm"," 2pm"," 3pm"," 4pm"," 5pm",x,x
460 data" 6pm"," 7pm"," 8pm"," 9pm","10pm","11pm",x,x
470 dimn$(366):forx=0to366:n$(x)=right$(" "+mid$(str$(x),2),3):next
480 forx=1to11:poke16635+x,6:next
490 return
500 ifpeek(38404)=2then700
501 c=peek(53280)and15
502 print"[147][159]":poke53280,0:poke53281,0:forx=0to20:next:poke53272,20
505 print" save game (choose one)"
510 forx=1to3:a$(x)="c2c.mp"+mid$(str$(x),2,1)
520 open15,dv,15,"r0:"+a$(x)+"="+a$(x):input#15,en(x):close15
540 ifen(x)<>62thenprint" "x"[146]replace game"x:goto550
545 print" "x"[146]save game"x
550 print:next
551 print" r[146]eturn
552 [153]:[153]" ewaitxit to loadstar
555 poke198,0
560 getz$:ifz$=""then560
570 z=val(z$):if(z>0)and(z<4)thensv=1:goto580
571 ifz$<>"e"thensv=0:print"[147] [210]eturning to [211]ea to [211]ea":goto579
572 print"[158] exit sea to sea
573 [153]"open are you sure (y/n)"
574 [161]z$:[139]z$[178]""[167]574
575 [139]z$[179][177]"y"[167]578
576 [151]53280,0:[151]53281,0:[137]61000
578 [153]"load "
579 [151]198,1:[151]631,217
580 [151]38144,[165]l(b):[151]38145,[165]m(b):[151]38146,[165]h(b):[151]152[172]256,c
581 [139]sv[178]0[167][138]
582 [139]en(z)[178]62[167][141]1100:[139]nr[178]1[167]555
590 [153]" saving on game"z
600 [159]15,dv,15,"s0:"[170]a$(z):[160]15
610 [159]4,dv,4,a$(z)[170]",p,w":[152]4,[199](0)[199](126);
620 a$[178]"":[129]x[178]32256[164]53248[171]128[169]128:[158]16780,a$,x,128:[152]4,a$;:[130]
630 [160]4:[153]"load":[137]551
700 [153]"loadopen":[151]53280,0:[151]53281,0:[129]x[178]0[164]20:[130]
710 [161]z$:[139]z$[179][177]""[167]720
720 [153]" (NULL)oad chr$ame ((NULL)/(NULL))";
730 [161]z$:[139]z$[178]""[167]730
740 [139]z$[179][177]"y"[167]571
741 [159]15,8,15,"r0:c2c.bt2=c2c.bt2":[132]15,en:[160]15
742 [139]en[178]63[167]745
743 [153]:[153]"right$nsert (NULL)valatn (NULL)(NULL) (NULL)valatn opendisk and (NULL)ress (NULL)ey":[151]198,0:[146]198,1
744 [151]631,89:[153]"loadopen":[137]720
745 [153]"cmdcmdcmdcmd(NULL)
750 print"[144]load"chr$(34)"c2c.bt2"chr$(34)","dv
760 print"run3":goto330
800 poke53265,peek(53265)and239:print"[147]":poke53281,14:poke53280,14
810 print" [200][197][204][208] [211][195][210][197][197][206]
820 [153]" sysmid$oystick -- (NULL)ove "[199](239)" (NULL)rain
830 print " [158][198]ire -- [204]ay or [210]emove [212]rack
840 [153] " sysasc7 -- (NULL)oggle (NULL)ay & (NULL)emove
850 print " [158][211] -- [194]uild [211]tation [158][204] -- [204]oad [212]rack
870 [153] " sysasc3 -- (NULL)ave chr$ame sysasc5-- (NULL)oad chr$ame
890 print " [158][198]1 -- [195]ontrol [195]ursor
891 [153] " sys(NULL)hift-(NULL)rain # -- ascollow (NULL)rain
892 print " [158][195]ontrol-[212]rain # -- [215]arm [213]p [212]rain
893 [153] " syslenommodore -- (NULL)top ascollow
894 print " [197][216][201][212] to [204]oadstar: [158][198]3, [197]
900 [153]" stop(NULL)ress atnny (NULL)ey to (NULL)eturn
901 poke53265,peek(53265)or16
910 poke198,0
920 getz$:ifz$=""then920
930 print"[147] [211][197][193][160][212][207][160][211][197][193]":poke53280,13:poke53281,13:goto120
1000 print"[147]":poke53281,0:poke53280,0:poke646,0
1001 print"l[207]"chr$(34)"c2c.end"chr$(34)","dv
1002 print"run":poke631,13:poke632,13:poke198,2:end
1100 nr=0:open4,dv,0,"$<":forx=0to33:get#4,a$:next:get#4,a1$,a2$
1101 close4:a3$=chr$(0):a1=asc(a1$+a3$)+256*asc(a2$+a3$)
1102 ifa1>84thenreturn
1103 print" no room on this disk. try again "
1104 nr=1:return
2000 end
60000 dv=peek(186):n$="c2c.bas":open15,dv,15,"s0:"+n$:close15:saven$,dv:end
61000 a$="hello connect":fori=8to9:close2:open2,i,2:close2:ifstthen61020
61010 close15:open15,i,15,"r0:"+a$+"="+a$:input#15,er:close15:ifer=63then61030
61020 next:print"[147]":poke2048,0:poke44,8:poke53272,23:poke186,8:end
61030 poke646,peek(53281):print"[147]load"chr$(34)a$chr$(34)","i
61040 print"run":poke44,8:poke2048,0:poke631,13:poke632,13:poke198,2:end
61999 end
63000 open15,8,15,"s0:?":input#15,en,en$:close15:printen$