home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 June / Ahoy_Magazine_87-06_1987_Double_L.d64 / D-Snap (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  8KB  |  288 lines

  1. 0 dimsc$(255),qt(254),qs(254):goto60000
  2. 1 poketx,11:pokety,0:sys828:printtr"[157] ";
  3. 2 poketx,25:pokety,0:sys828:printsc"[157] ";
  4. 3 print"";
  5. 4 forx=0to255:printsc$(peek(base+x));:next
  6. 5 return
  7. 6 pokecb+lp+40,5:pokecb+ps+40,1
  8. 7 num=peek(base+ps):poketx,13:pokety,10:sys828:print"     [157][157][157][157][157][157]";ps
  9. 8 poketx,13:pokety,11:sys828:print"     [157][157][157][157][157]";sc$(num)
  10. 9 poketx,13:pokety,12:sys828:print"     [157][157][157][157][157]";mid$(hx$,(int(num/16))+1,1);
  11. 10 printmid$(hx$,num-16*(int(num/16))+1,1)
  12. 12 poketx,13:pokety,13:sys828:print"    [157][157][157][157][157]";num
  13. 15 return
  14. 16 ifa$<>"[145]"anda$<>""anda$<>""anda$<>"[157]"thengoto32
  15. 17 ifa$=""thenlp=ps:ps=ps+1:ifps>255thenps=0:gosub6:goto30
  16. 18 ifa$="[157]"thenlp=ps:ps=ps-1:ifps<0thenps=255:gosub6:goto30
  17. 19 ifa$="[157]"ora$=""thengosub6:goto30
  18. 20 ifa$="[145]"andps>39thenlp=ps:ps=ps-40:gosub6:goto30
  19. 21 ifa$=""andps<216thenlp=ps:ps=ps+40:gosub6:goto30
  20. 23 ifa$="[145]"andps>15thenlp=ps:ps=ps+200:gosub6:goto30
  21. 24 ifa$="[145]"andps<16thenlp=ps:ps=ps+240:gosub6:goto30
  22. 25 ifa$=""andps<240thenlp=ps:ps=ps-200:gosub6:goto30
  23. 26 ifa$=""andps>239thenlp=ps:ps=ps-240:gosub6:goto30
  24. 28 gosub59000:gosub50000:gosub1:gosub6
  25. 30 geta$:ifa$=""then30
  26. 31 goto16
  27. 32 ifa$="+"thengosub52500:gosub50000:gosub1:gosub6:goto30
  28. 33 ifa$="-"thengosub52600:gosub50000:gosub1:gosub6::goto30
  29. 34 ifa$="$"thengosub52000:goto28
  30. 35 ifa$="@"thengosub54000:goto28
  31. 36 ifa$="n"thengosub52700:gosub50000:gosub1:gosub6:goto30
  32. 37 ifa$="j"thengosub52800:gosub50000:gosub1:gosub6:goto30
  33. 38 ifa$=" "thengosub50000:gosub1:gosub6:goto30
  34. 39 ifa$="*"thengosub59000:gosub1:gosub6:goto30
  35. 41 ifa$="r"thengosub54500:gosub50000:gosub59000:gosub1:gosub6:goto30
  36. 42 ifa$="w"thengosub54596:gosub51000:gosub59000:gosub1:gosub6:goto30
  37. 43 ifa$="s"thengosub45900:gosub59000:gosub1:gosub6:goto30
  38. 44 ifa$="c"thengosub53000:gosub59000:gosub1:gosub6:goto30
  39. 45 ifa$="?"thengosub42000:goto30
  40. 46 ifa$="[209]"thenprint"[147]  [207][203]. [210]eady":end
  41. 99 goto30
  42. 100 in$=""
  43. 101 print" [146][157]";
  44. 102 geta$:ifa$=""then102
  45. 103 if(a$="[157]"ora$=chr$(20))andlen(in$)=0then102
  46. 104 ifa$=chr$(13)thenprint" ":return
  47. 105 ifa$="[157]"ora$=chr$(20)thenprint" [157] [157][157] [146][157]";:in$=mid$(in$,1,len(in$)-1):goto102
  48. 106 ifa$<chr$(32)ora$>"[218]"then102
  49. 107 in$=in$+a$
  50. 120 print" [157]";a$;" [146][157]";
  51. 121 goto102
  52. 199 stop
  53. 39999 end
  54. 42000 open3,4,7
  55. 42001 print#3,"[194]lock [196]ump of [212]rack# ";tr;"   [211]ector# ";sc
  56. 42002 forx=0to255
  57. 42003 ifx/80=int(x/80)thenprint#3,
  58. 42004 print#3,sc$(peek(base+x));
  59. 42005 next
  60. 42020 forx=0to255
  61. 42021 ifx/26=int(x/26)thenprint#3,
  62. 42022 nx=peek(base+x):b1$=mid$(hx$,int(nx/16)+1,1)
  63. 42023 b2$=mid$(hx$,nx-(16*int(nx/16))+1,1)
  64. 42024 print#3,b1$b2$" ";
  65. 42030 next
  66. 42035 print#3,"      [197][206][196] [207][198][160][196][213][205][208]":print#3
  67. 42066 close3:return
  68. 45900 print"[147][196]o you want [206][146]ormal text"
  69. 45901 print "         or [213][146]nstripped text?"
  70. 45902 geta$:ifa$<>"n"anda$<>"u"then45902
  71. 45903 sb=0:ifa$="u"thensb=128
  72. 45904 print"[197]nter the text string on the next line"
  73. 45905 gosub100
  74. 45906 ifps+len(in$)>=256thenin$=mid$(in$,1,256-ps)
  75. 45910 forx=1tolen(in$)
  76. 45911 vl=asc(mid$(in$,x,1))
  77. 45912 pokebase+ps+x-1,vlor sb
  78. 45913 next
  79. 45914 return
  80. 49599 stop
  81. 49999 stop
  82. 50000 open15,8,15:input#15,x:ifx<>0andx<>73then62000
  83. 50001 open2,8,2,"#"
  84. 50002 print#15,"u1";2;0;tr;sc
  85. 50003 sys49152
  86. 50004 close2
  87. 50005 close15
  88. 50006 sys65511
  89. 50007 return
  90. 51000 ifd$<>"[217]"andd$<>"y"thenreturn
  91. 51001 open15,8,15:input#15,rx:ifrx<>0andrx<>73then62000
  92. 51002 open2,8,2,"#"
  93. 51003 print#15,"b-p";2;0
  94. 51004 sys49175
  95. 51005 print#15,"u2";2;0;tr;sc
  96. 51006 close2
  97. 51007 close15
  98. 51009 return
  99. 52000 print"[147]            [196]irectory[146]":open2,8,0,"$0":get#2,a$,a$
  100. 52001 get#2,a$,a$
  101. 52002 get#2,a$,b$:sz=asc(a$+z$)+256*asc(b$+z$):ifsz=0thenprinttab(7);"";
  102. 52003 ifsz>0thenprintsz;:printtab(7);
  103. 52004 getg$:ifg$<>""then52101
  104. 52005 get#2,a$:ifst<>0then52100
  105. 52006 ifa$<>q$then52005
  106. 52007 get#2,a$:ifa$<>q$thenprinta$;:goto52007
  107. 52008 printtab(29);
  108. 52009 get#2,a$:ifa$=sp$then52008
  109. 52010 printa$;
  110. 52011 get#2,a$:ifa$<>""thenprinta$;:goto52011
  111. 52012 print:ifst=0then52001
  112. 52100 print"[157][157][157] [194]locks free."
  113. 52101 close2:print
  114. 52102 print"       [208][210][197][211][211] [193][206][217] [203][197][217] [212][207] [195][207][206][212][201][206][213][197]       [146]"
  115. 52103 geta$:ifa$=""then52103
  116. 52104 return
  117. 52500 sc=sc+1
  118. 52510 ifsc>16andtr>30thentr=tr+1:sc=0:goto52550
  119. 52520 ifsc>17andtr>24thentr=tr+1:sc=0:return
  120. 52530 ifsc>18andtr>17thentr=tr+1:sc=0:return
  121. 52540 ifsc>20thentr=tr+1:sc=0:return
  122. 52550 iftr>35thentr=1:return
  123. 52560 return
  124. 52600 sc=sc-1
  125. 52610 ifsc>=0thenreturn
  126. 52620 tr=tr-1:iftr<18andtr>0thensc=20:return
  127. 52625 iftr<1thentr=35:goto52650
  128. 52630 iftr<25thensc=18:return
  129. 52640 iftr<31thensc=17:return
  130. 52650 sc=16:return
  131. 52700 ot=tr:os=sc:e=0
  132. 52710 tr=peek(base):sc=peek(base+1)
  133. 52720 iftr<1ortr>35thene=1
  134. 52730 iftr>30andsc>16thene=1:goto52770
  135. 52740 iftr>24andsc>17thene=1:goto52770
  136. 52750 iftr>17andsc>18thene=1:goto52770
  137. 52760 ifsc>20thene=1
  138. 52770 ife=0thenreturn
  139. 52780 print"[147]    [197]rror.  [212]he block you attempted to "
  140. 52781 print"   read was at track"tr" sector"sc"
  141. 52782 [153]"   does not exist. right$t is an illegal"
  142. 52783 [153]"   track-sector reference."
  143. 52784 [153]"   (NULL)(NULL)val(NULL)(NULL) atn(NULL)(NULL) (NULL)val(NULL) (NULL)(NULL) len(NULL)(NULL)(NULL)right$(NULL)(NULL)valwait"
  144. 52785 [161]a$:[139]a$[178]""[167]52785
  145. 52786 tr[178]ot:sc[178]os:e[178]0:[141]59000:[142]
  146. 52800 ot[178]tr:os[178]sc:e[178]0
  147. 52810 tr[178][194](base[170]ps):sc[178][194](base[170]ps[170]1)
  148. 52820 [139]tr[179]1[176]tr[177]35[167]e[178]1
  149. 52830 [139]tr[177]30[175]sc[177]16[167]e[178]1:[137]52870
  150. 52840 [139]tr[177]24[175]sc[177]17[167]e[178]1:[137]52870
  151. 52850 [139]tr[177]17[175]sc[177]18[167]e[178]1:[137]52870
  152. 52860 [139]sc[177]20[167]e[178]1
  153. 52870 [139]e[178]0[167][142]
  154. 52880 [153]"load    valrror.  (NULL)he block you attempted to "
  155. 52881 [153]"   read was at track"tr" sector"sc"
  156. 52882 print"   does not exist. [201]t is an illegal"
  157. 52883 print"   track-sector reference."
  158. 52884 print"   [208][210][197][211][211] [193][206][217] [203][197][217] [212][207] [195][207][206][212][201][206][213][197][146]"
  159. 52885 geta$:ifa$=""then52885
  160. 52886 tr=ot:sc=os:e=0:gosub59000:return
  161. 53000 poketx,0:pokety,22:sys828
  162. 53001 print"                                       ";
  163. 53002 poketx,0:pokety,22:sys828
  164. 53003 print" [200][146]ex or [196][146]ecimal ? ([200]/[196])"
  165. 53004 geta$:ifa$<>"d"anda$<>"h"then53004
  166. 53005 poketx,0:pokety,22:sys828
  167. 53006 print"                                       ";
  168. 53007 poketx,0:pokety,22:sys828
  169. 53008 ifa$="d"then53100
  170. 53009 poketx,0:pokety,22:sys828
  171. 53010 hb$=mid$(hx$,int(num/16)+1,1)+mid$(hx$,num-16*int(num/16)+1,1)
  172. 53011 print" [197]nter new [200][197][216] value ==>"hb$"<==[157][157][157][157]"
  173. 53019 poketx,24:pokety,22:sys828
  174. 53020 poke204,0:poke207,0:geta$:ifa$=""then53020
  175. 53021 ifa$<"a"anda$>"9"thenpoke53281,1:poke53281,0:goto53020
  176. 53022 ifa$>"f"ora$<"0"thenpoke53281,1:poke53281,0:goto53020
  177. 53024 poketx,24:pokety,22:h1$=a$:sys828
  178. 53025 ifa$>":"thenhn=16*(9+asc(a$)-64):printchr$(128+asc(a$));:goto53030
  179. 53026 hn=16*val(a$):printa$;
  180. 53030 poke204,0:poke207,0:geta$:ifa$=""then53030
  181. 53040 ifa$=chr$(20)ora$=chr$(157)thenpoke207,1:poke204,0:goto53007
  182. 53041 ifa$<"a"anda$>"9"thenpoke53281,1:poke53281,0:goto53030
  183. 53042 ifa$>"f"ora$<"0"thenpoke53281,1:poke53281,0:goto53030
  184. 53044 poke204,1:poketx,25:pokety,22:h2$=a$:sys828
  185. 53045 ifa$>":"thenln=(9+asc(a$)-64):printchr$(128+asc(a$));:goto53050
  186. 53046 ln=val(a$):printa$;
  187. 53050 poketx,0:pokety,22:sys828
  188. 53051 print"                                       ";
  189. 53099 pokebase+ps,hn+ln:return
  190. 53100 poketx,0:pokety,22:sys828
  191. 53101 print"                                       ";
  192. 53102 poketx,0:pokety,22:sys828
  193. 53103 print" [197]nter [196][197][195][201][205][193][204] value ==> "num
  194. 53110 poketx,24:pokety,22:sys828
  195. 53111 inputa$
  196. 53112 ifval(a$)>255ormid$(a$,1,1)>"9"ormid$(a$,1,1)<"0"then53100
  197. 53198 poketx,0:pokety,22:sys828
  198. 53199 print"                                       ";
  199. 53200 num=val(a$)
  200. 53201 pokebase+ps,num:return
  201. 54000 pokety,22:poketx,0:sys828
  202. 54001 print"                                       "
  203. 54002 pokety,22:poketx,0:sys828
  204. 54010 print" [197]nter the [196][207][211] command>";
  205. 54011 gosub100:l$=mid$(in$,1,1):a$=in$
  206. 54012 iflen(a$)<1thengoto54097
  207. 54013 ifa$="$"thengosub52000:goto54036
  208. 54014 ifa$="@"then54036
  209. 54015 ifl$="u"orl$="m"orl$="b"then54000
  210. 54016 ifl$<>"n"then54020
  211. 54017 print"[196]o you [210][197][193][204][204][217] want to [206][197][215] this disk?"
  212. 54018 getp$:ifp$=""then54018
  213. 54019 ifp$<>"[217]"andp$<>"y"then54097
  214. 54020 open15,8,15,a$
  215. 54021 close15
  216. 54036 pokety,22:poketx,0:sys828
  217. 54037 print"                                       "
  218. 54038 pokety,22:poketx,0:sys828
  219. 54040 open15,8,15
  220. 54041 input#15,a,a$,et,es
  221. 54042 print" [211]tatus# ="a"-"a$" "et","es
  222. 54046 close15
  223. 54047 print"[208]ress any key to continue"
  224. 54048 geta$:ifa$=""then54048
  225. 54096 pokety,22:poketx,0:sys828
  226. 54097 print"                                       "
  227. 54098 print"                                       "
  228. 54099 return
  229. 54500 ot=tr:os=sc:print"[147] [212]rack ="tr"  [211]ector="sc:print"[210]ead from track=>"
  230. 54501 poketx,17:pokety,3:sys828:gosub100
  231. 54502 ifval(in$)=0then54501
  232. 54503 tr=val(in$)
  233. 54504 print:print" and sector=>"
  234. 54505 poketx,13:pokety,5:sys828:gosub100
  235. 54506 sc=val(in$)
  236. 54510 goto52720
  237. 54596 print"[147] [196][207] [217][207][213][160][210][197][193][204][204][217] [215][193][206][212] [212][207][160][215][210][201][212][197] [212][207] [196][201][211][203]?"
  238. 54597 geta$:ifa$=""then54597
  239. 54598 d$=a$:ifa$<>"y"anda$<>"[217]"thenreturn
  240. 54600 ot=tr:os=sc:print"[147] [212]rack ="tr"  [211]ector="sc:print"[215]rite to track=>"
  241. 54601 poketx,16:pokety,3:sys828:gosub100
  242. 54602 ifval(in$)=0then54601
  243. 54603 tr=val(in$)
  244. 54604 print:print" and sector=>"
  245. 54605 poketx,13:pokety,5:sys828:gosub100
  246. 54606 sc=val(in$)
  247. 54610 goto52720
  248. 59000 print"[147][158]     [212]rack=       [211]ector=               [146]"
  249. 59001 print"                [158]                        [146]";
  250. 59002 print"[158]                                        [146]";
  251. 59003 print"  [208]osition=>"
  252. 59004 print"     [193][211][195][201][201]=>"
  253. 59005 print"      [200][197][216]$=>"
  254. 59006 print"   [196]ecimal=>"
  255. 59007 print"       [210]ead [194]lock    [215]rite [194]lock    [146]"
  256. 59008 print"       +[206]ext [194]lock   -[208]revious [194]lock[146]"
  257. 59009 print"       [206]ext [198]-[204]ink   [202]ump crsr-link [146]"
  258. 59010 print"       [195]hange [194][217][212][197]    [210]e-[210]ead block [146]"
  259. 59011 print"       *[206]ew [211]creen   ?[208]rint [194]lock   [146]"
  260. 59012 print"       $[196]irectory    @[196][207][211] [195]ommand   [146]"
  261. 59013 print"       [211]tring [197]ntry  [209]uit [208]rogram   [146]"
  262. 59999 return
  263. 60000 poke53281,0:poke53280,4:print"[147]"
  264. 60001 gosub63000
  265. 60002 forx=0to45:ready:poke49152+x,y:next
  266. 60003 data162,2,32,198,255,162,0,32,207,255,134,253,234,234,234,234,157,80,195
  267. 60004 data232,208,241,96,162,2,32,201,255,162,0,189,80,195,134,253,234,234,234
  268. 60005 data234,32,210,255,232,208,241,96
  269. 60006 forx=0to255:sc$(x)=chr$(x):next
  270. 60007 sc$(0)="@[146]":forx=1to31:sc$(x)=chr$(x+64):next
  271. 60008 forx=129to159:sc$(x)=chr$(x-64):next
  272. 60009 sc$(128)="@[146]":sc$(34)="'":sc$(32)=" [146]"
  273. 60010 forx=828to835:ready:pokex,y:next
  274. 60011 data160,00,162,00,32,240,255,96
  275. 60012 tx=829:ty=831
  276. 60013 hx$="0123456789[193][194][195][196][197][198]"
  277. 60014 sp$=" ":z$=chr$(0):q$=chr$(34)
  278. 60015 base=50000:cb=55296:lp=0:ps=lp
  279. 60016 sc=00:tr=18
  280. 61999 goto28
  281. 62000 close2:close15:print"[158][196][201][211][203][146][159] [207]peration aborted."
  282. 62001 print"[197][210][210][207][210] #";x:end
  283. 63000 print"         [208]lease wait about five"
  284. 63001 print"       seconds while [201] perform the  "
  285. 63002 print"          necessary preliminary"
  286. 63003 print"              functions.           "
  287. 63199 return
  288.