home *** CD-ROM | disk | FTP | other *** search
/ Publication 5 / Publication_05_19xx_High-Tech_de_Side_B.d64 / ultra-seq-reader (.txt) < prev   
Commodore BASIC  |  2023-02-26  |  11KB  |  238 lines

  1. 1 md=10916:sp=12094:gp=12156:oc=12230:cc=12233:cr=12465:ww=12592:rp=12628
  2. 2 poke53280,.:poke53281,.:poke788,52:dima$(112):printchr$(142):so=12955:ez=13047
  3. 3 s=1:a=0:rem set sound & ascii convert defaults   1=on - 0=off
  4. 4 print"[147][158]":k=7:a$="[213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]":gosub10
  5. 5 k=8:a$="[221]    ultra seq-print    [221]":gosub10
  6. 6 k=9:a$="[221]      version 5.5      [221]":gosub10
  7. 7 k=10:a$="[221]  r.w. (bob k7) kober  [221]":gosub10
  8. 8 k=11:a$="[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]":gosub10
  9. 9 gosub229:on-(peek(2025)=7)goto13:goto25
  10. 10 m=len(a$):fori=1tom/2:print"":forj=1tok:print"";:next
  11. 11 printspc(20-i)left$(a$,i)right$(a$,i):next
  12. 12 return
  13. 13 fori=1to1000:next:fori=1to8:sys59626:next:poke2025,2
  14. 14 k=6:a$="[150]these m/l routines are used ":gosub10
  15. 15 k=7:a$="[155][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196] ":gosub237:gosub10:gosub229
  16. 16 k=9:a$="[159]read/print/scroll":gosub237:gosub10:gosub229
  17. 17 k=11:a$="[153]mi's  directory":gosub237:gosub10:gosub229
  18. 18 k=13:a$="[156]it's curtains":gosub237:gosub10:gosub229
  19. 19 k=15:a$="[129]2-col. read":gosub237:gosub10:gosub229
  20. 20 k=17:a$="[154]snap-shot":gosub237:gosub10:gosub229
  21. 21 k=19:a$="[158]ezdir":gosub237:gosub10:gosub229
  22. 22 k=23:a$="[151]any key to start[145]":gosub10:poke198,.:wait198,1:poke198,0
  23. 23 poke150,160:syssp:goto25
  24. 24 poke150,160:sysgp:poke198,.:wait198,1:poke198,.
  25. 25 poke53280,.:poke53281,.
  26. 26 syscc:poke53272,21:print"[147]"tab(8)"[144][213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
  27. 27 printtab(8)"[221]      main menu      [221]"
  28. 28 printtab(8)"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
  29. 29 fori=1to300:next:poke2,5:poke878,20:sysoc
  30. 30 ifbobthenpoke150,168:sysgp:goto49
  31. 31 printtab(43)"use      embedded <cr>      ignore"
  32. 32 printtab(2)"[150][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  33. 33 printtab(3)"[158][169]  [223][146][150]                         [158][129][169]  [223][155][146]"
  34. 34 printtab(3)"[158] f1 [146][150]  send output to screen  [129] f2 [146]"
  35. 35 printtab(3)"[158][223]  [146][169][150]                        [158] [129][223]  [146][169]"
  36. 36 printtab(42)"[154][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  37. 37 printtab(3)"[149][169]  [223][146]                         [156][169]  [223]"
  38. 38 printtab(3)"[149] f3 [146]  [154]40 columns to printer  [156] f4 [146]"
  39. 39 printtab(3)"[149][223]  [146][169]                         [156][223]  [146][169]"
  40. 40 printtab(42)"[153][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  41. 41 printtab(3)"[152][169]  [223][146]                         [150][169]  [223]"
  42. 42 printtab(3) "[152] f5 [146] [153] 80 columns to printer  [150] f6 [146]"
  43. 43 printtab(3)"[152][223]  [146][169]                         [150][223]  [146][169]"
  44. 44 printtab(42)"[156][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  45. 45 printtab(3)"[169]  [223][146]                         [169]  [223]"
  46. 46 printtab(3) " f7 [146][156] disk housekeeping  [129]quit  f8 [146]"
  47. 47 printtab(3)"[223]  [146][169]                         [223]  [146][169]"
  48. 48 ifbo=0thenbob=1:poke150,168:syssp
  49. 49 poke198,.:close15:open15,8,15:goto231
  50. 50 geta$:on-(a$="a")goto99:on-(a$="s")goto230:ifa$<"[133]"ora$>chr$(141)then50
  51. 51 f$=right$(str$(asc(a$)-132),1)
  52. 52 on(asc(a$)-132)goto53,55,57,128,54,56,58,123,228:goto50
  53. 53 gosub75:gosub59:goto71
  54. 54 f$="2":goto53
  55. 55 f$="3":poke600,0:gosub76:gosub59:oncolgoto70,195
  56. 56 f$="4":poke600,1:gosub76:gosub59:oncolgoto70,195
  57. 57 f$="5":gosub77:gosub59:goto70
  58. 58 f$="6":gosub77:gosub59:goto70
  59. 59 print"":poke214,x-2:print:print"[152]  ($=directory m=menu)[145][145]"
  60. 60 poke19,32:input"[158]  enter seq filename [153]$[157]";ff$
  61. 61 ifff$="m"then30
  62. 62 ifff$<>"$"thensyscc:x1=34:return
  63. 63 close15:open15,8,15:ifff$="$"thenprint#15,"i":input#15,e,e$:ifethenprint"[147]":gosub119
  64. 64 ifethen26
  65. 65 syscc:printchr$(142):sysmd:print:close15:open15,8,15:syscc
  66. 66 ifpeek(598)=34then26
  67. 67 x1=0:ff$=""
  68. 68 ff=peek(580+x1):ifff=34thenreturn
  69. 69 ff$=ff$+chr$(ff):x1=x1+1:goto68
  70. 70 open4,4,7:gosub112:ifqqthen26
  71. 71 open2,8,2,ff$:gosub118:on-(e<>0)goto26:gosub84
  72. 72 close2:close4:sys65511:open15,8,15:x1=0
  73. 73 gosub81:poke214,23:print:print"        [150] [208]ress f5 for the [205]enu [146]        [145]"
  74. 74 geta$:on-(a$<>chr$(135))goto74:goto26
  75. 75 forx=6to8:poke781,x:sys59903:next:return
  76. 76 forx=11to13:poke781,x:sys59903:next:gosub78:return
  77. 77 forx=16to18:poke781,x:sys59903:next:return
  78. 78 poke214,11:print:printtab(6)"1[146] or [154]2[146] columns?"
  79. 79 getcol$:ifcol$<"1"orcol$>"2"then79
  80. 80 col=val(col$):return
  81. 81 on-(s=0)goto236:forl=54272to54295:pokel,0:next:poke54296,15:poke54277,8:poke54278,255
  82. 82 poke54276,23:fory=1to3:f2=8:poke54273,2:forx=1to5:poke54287,f2:f2=f2*1.4
  83. 83 next:next:forw=1to8:poke54287,f2:f2=f2*1.07:next:poke54278,15:return
  84. 84 rp$="[208][210][201][206][212][197][210]":iff$="1"orf$="2"thenrp$="[210][197][193][196][197][210] "
  85. 85 syscc:printchr$(14):print"[147]"tab(2)"[144]***********************************"
  86. 86 printtab(2)"*    [198]"f$" [213][204][212][210][193][160][211][197][209]-[198][201][204][197][160]"rp$"    *"
  87. 87 printtab(2)"***********************************"
  88. 88 poke214,23:print:print"[200]old shift to pause - [208]ress f6 to abort[145][145]"
  89. 89 fori=1to300:next:poke2,12:poke878,20:sysoc
  90. 90 poke214,23:print:print"[150][200]old shift to pause - [158][208]ress f6 to abort[145][145]"
  91. 91 onval(f$)goto92,93,94,95,96,97
  92. 92 sysrp,40,0,0:x1=0:return
  93. 93 sysrp,39,1,0:x1=0:return
  94. 94 gosub98:sysrp,40,0,1:x1=0:return
  95. 95 gosub98:sysrp,39,1,1:x1=0:return
  96. 96 gosub98:sysrp,80,0,1:xi=0:return
  97. 97 gosub98:sysrp,79,1,1:xi=0:return
  98. 98 fori=1to5:print#4:next:return
  99. 99 a=1-a:poke820,a
  100. 100 goto234
  101. 101 poke198,.:wait198,1:forx=11to13:poke781,x:sys59903:next:print"[145][145][145][145]":goto310
  102. 102 on-(s=0)goto236:forl=54272to54295:pokel,0:next:poke54296,15:poke54277,8:poke54278,255
  103. 103 poke54276,21:poke54287,40:forz=1tot:forf1=255to0step-6:poke54273,f1:nextf1
  104. 104 forf1=0to255step50:poke54273,f1:nextf1:nextz:forf2=15to0step-.1
  105. 105 poke54296,f2:next:poke54277,128:poke54278,250:return
  106. 106 on-(s=0)goto236:forl=54272to54295:pokel,0:next:poke54296,15
  107. 107 poke54277,8:poke54278,255:poke54276,23
  108. 108 forz=1to1:f1=10:fory=1to6:f2=30:poke54273,f1:forx=1to3:poke54287,f2
  109. 109 f2=f2/1.2:nextx:f1=f1*1.5:nexty:forw=1to30:poke54273,f1
  110. 110 poke54287,5:forv=1to5:nextv
  111. 111 f1=f1/1.5:nextw:nextz:poke54278,15:return
  112. 112 close4:ifst=0thenopen4,4,7:qq=0:return
  113. 113 print"[150]      the printer is not on line"
  114. 114 print"     turn it on, and press any key"
  115. 115 print"        [128]rh_s[255][255][135][255][255][255]Y[255][255][255][255] menu":gosub106
  116. 116 wait198,1:geta$:ifa$="[135]"thenqq=1:return
  117. 117 open4,4,7:goto112
  118. 118 input#15,e,e$:ife=0thenreturn
  119. 119 print"[147]         disk error encountered"
  120. 120 printtab(20-len(e$)/2)e$:gosub106
  121. 121 print"          any key to continue"
  122. 122 wait198,1:close2:close4:return
  123. 123 k=21:a$=" [158]     are you sure?     ":gosub10
  124. 124 wait198,1:geta$:on-(a$="y")goto126:print"[145][145][145]"
  125. 125 goto30
  126. 126 print"[150]";:printtab(8)" use ultra again, soon "
  127. 127 poke198,.:t=3:gosub102:sys65126
  128. 128 ff=0
  129. 129 print"[155]":poke214,8:print
  130. 130 printtab(6)"[213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
  131. 131 printtab(6)"[221]                         [221]"
  132. 132 printtab(6)"[221] disk house keeping menu [221]"
  133. 133 printtab(6)"[221] [183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183] [221]"
  134. 134 printtab(6)"[221]                         [221]"
  135. 135 printtab(6)"[221] 1. scratch a file       [221]"
  136. 136 printtab(6)"[221] 2. re-name a file       [221]"
  137. 137 printtab(6)"[221] 3. format (new) a disk  [221]"
  138. 138 printtab(6)"[221] 4. view directory       [221]"
  139. 139 printtab(6)"[221] 5. return to main menu  [221]"
  140. 140 printtab(6)"[221]                         [221]"
  141. 141 printtab(6)"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
  142. 142 poke198,.:wait198,1:geta$:on-(a$="[135]")goto30:ifa$<"1"ora$>"5"then142
  143. 143 k=val(a$)
  144. 144 onkgoto150,175,188,240,30
  145. 145 poke512,32:return
  146. 150 print"[147][129]":poke53280,.:poke53281,.
  147. 151 printtab(40)"                                        ";
  148. 152 print"    this routine will scratch a file    ";
  149. 153 print"                                        "
  150. 154 printtab(42)"enter 'm' to return to the menu."
  151. 155 printtab(42)"enter '$' to list the file directory."
  152. 156 print"[158]----------------------------------------";
  153. 157 ifff=34then161
  154. 158 poke19,32:input"[155] enter filename [150]$[157]";ff$:poke19,.:print
  155. 159 ifff$="$"thengosub63:goto150
  156. 160 ifff$="m"then26
  157. 161 b$="[155]scratch seq file [150]"+chr$(34)+ff$+chr$(34)
  158. 162 ff=0:print""tab(21-len(b$)/2)b$
  159. 163 printtab(90)"[158]are you sure?? (y/n)"
  160. 164 getk$:ifk$=""then164
  161. 165 ifk$<>"y"thenff$="":goto150
  162. 166 b$=" scratching  "+ff$+" ":printtab(20-len(b$)/2)b$
  163. 167 print#15,"s0:"ff$
  164. 168 input#15,er,er$,t,b:ifk=2ork=3thenreturn
  165. 169 g9$=left$(er$,4)+right$(er$,10)
  166. 170 e9$=" "+ff$+" [146] "+g9$
  167. 171 ift=.thenprinttab(48)"**** file not found ****":gosub106:goto150
  168. 172 ift=.thenfori=1to1500:next:goto150
  169. 173 printtab(60-len(e9$)/2)e9$
  170. 174 gosub81:fori=1to1000:next:goto26
  171. 175 forx=20to23:poke781,x:sys59903:next
  172. 176 print"":poke214,20:print:printtab(9)"old name = ";
  173. 177 ifff=34thenff=0:print""ff$;:pn$=ff$:poke783,.:goto180
  174. 178 poke19,32:input"$[157]";pn$:poke19,.:print:ifpn$="4"then30
  175. 179 ifpn$="$"thenff$=pn$:poke150,96:syssp:gosub63:poke150,96:sysgp:goto176
  176. 180 poke214,21:print
  177. 181 printtab(9)"new name = ";
  178. 182 poke19,32:input" [157]";nn$:poke19,.:poke781,21:sys59903:poke214,21:print
  179. 183 ifnn$="4"then30
  180. 184 cn$ =" "+pn$+" [146] is "+nn$+" [146]":iflen(cn$)<33thencn$ = cn$+"      "
  181. 185 print "[158]"tab(22-len(cn$)/2)cn$"[145][145]":print#15,"r0:"+nn$+"="+pn$
  182. 186 gosub118:ifethen26:remrwk
  183. 187 gosub81:goto26
  184. 188 print tab(2)"[158]          ---warning!!!---          "
  185. 189 print"  all data on the disk to be formatted"
  186. 190 print"  will be destroyed - ok to continue?"
  187. 191 poke198,.:wait198,1:geta$:poke198,.:ifa$<>"y"then30
  188. 192 print"[145][154]   okay - formatting takes 90 seconds"
  189. 193 print#15,"n:ultra seq-files,rk":gosub168:ifer<>0thengosub119
  190. 194 goto30
  191. 195 close4:open4,4,7:gosub112:ifqqthen26
  192. 196 l=0:print"[147][151]":poke53280,11:poke53281,11
  193. 197 poke53272,23:print""tab(3)"                                  "
  194. 198 printtab(3)" << [210]eading [198]ile [201]nto an [193]rray >> "
  195. 199 printtab(3)"                                  "
  196. 200 poke787,25:poke2,15:sysoc
  197. 201 iflthenprint""tab(43)"[155] << [210]eading [198]ile [201]nto an [193]rray >> "
  198. 202 poke214,23:print
  199. 203 print"  [150][200][207][204][196] [211][200][201][198][212][153] to [208]ause ---- [158][198]6[153] to [193]bort[145][145][145][159]":iflthenl=0:goto206
  200. 204 open2,8,2,ff$:gosub118:ifethen25
  201. 205 yy=1:pokecr-2,0:syscr
  202. 206 fork=1to112:a$(k)="":next:u=0
  203. 207 on-(peek(cr-3)<>0)goto215:ifpeek(cr-2)>80thenpoke(cr-2),0
  204. 208 forx=0topeek(cr-2):aa$=chr$(peek(512+x))
  205. 209 a$(yy)=a$(yy)+aa$:iflen(a$(yy))>40thenyy=yy+1
  206. 210 next:sysso:poke214,19:print:printa$(yy):yy=yy+1:on-(peek(600)=0)gosub145:sysww
  207. 211 ifpeek(653)=1thenpoke214,23:print:print"  [150][210][197][204][197][193][211][197][153] to [195]ontinue [145]":u=1
  208. 212 ifpeek(653)=1thenon-(peek(197)=6)goto226:goto211
  209. 213 ifuthenprint"  [150][200][207][204][196] [211][200][201][198][212][153] to [208]ause ---- [158][198]6[153] to [193]bort[145][145][145][159]":u=0
  210. 214 on-(yy=112)goto217:print:goto207
  211. 215 forx=0topeek(cr-2)-1:aa$=chr$(peek(512+x)):a$(yy)=a$(yy)+aa$:next
  212. 216 sysso:poke214,19:print:printa$(yy):close2:sys65511:open4,4,7
  213. 217 print""tab(44)"[155]      << [196]ata to [208]rinter >>     "
  214. 218 fori=1to5:print#4:next
  215. 219 ifyy/2<>int(yy/2)thenyy=yy+1
  216. 220 i1=yy/2:forii=1toi1
  217. 221 print#4,a$(ii);tab(40-len(a$(ii)));a$(ii+i1)
  218. 222 ifpeek(653)=1thenpoke214,23:print:print"  [150][210][197][204][197][193][211][197][153] to [195]ontinue [145]":u=1
  219. 223 ifpeek(653)=1thenon-(peek(197)=6)goto226:goto222
  220. 224 ifuthenprint"  [150][200][207][204][196] [211][200][201][198][212][153] to [208]ause ---- [158][198]6[153] to [193]bort[145][145][145][159]":u=0
  221. 225 next:fori=1to5:print#4:next:ifyy>111thenyy=1::l=1:goto201
  222. 226 t=1:gosub102:close2:syscc:print"[147]":poke53280,.:poke53281,.:sys65511
  223. 227 open15,8,15:bob=0:goto26
  224. 228 poke2025,7:run
  225. 229 ford=1to1200:next:return
  226. 230 s=1-s:gosub237
  227. 231 print"[158] sound":ifsthenprint"  on "
  228. 232 ifs=0thenprint"  off"
  229. 234 print""tab(33)"[145][145]ascii":ifathenprint""tab(34)"[145]on "
  230. 235 on-(a=1)goto50:print""tab(34)"[145]off":goto50
  231. 236 return
  232. 237 on-(ns=1)goto236:fori=54272toi+23:pokei,.:next
  233. 238 si=54272:pokesi+1,106:pokesi+5,12:pokesi+6,15
  234. 239 pokesi+24,15:pokesi+15,30:pokesi+4,21:return
  235. 240 sysez
  236. 241 poke214,23:print:printtab(10)"[158] any key to continue ";:wait198,1:poke198,.
  237. 242 goto25
  238.