home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 107 / 107.d81 / c2c.bas (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  5KB  |  148 lines

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