home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1990 November / 1990-11.d64 / right_side (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1990-01-01  |  4.4 KB  |  129 lines

  1. 0 rem copyright 1990 compute publications, intl., ltd. - all rights reserved
  2. 100 gosub302:rem initialize
  3. 102 gosub264:rem main screen
  4. 104 poke198,0:wait198,1:getg$:g=asc(g$)-132:ifg<1org>4then104
  5. 106 onggosub114,158,206,108:goto102
  6. 108 poke53280,14:poke53281,6:poke53272,(peek(53272)and240)or4
  7. 110 print"[154][147]":end
  8. 112 rem  create file
  9. 114 ps=1:gosub266:ps=0
  10. 116 printtab(7)"'########################%"
  11. 118 printtab(7)"'[146] create [144][210][146]ight/[211][146]ide file [144] "
  12. 120 printtab(7)"'$$$$$$$$$$$$$$$$$$$$$$$$[144] "
  13. 122 printtab(9)"[144]                        "
  14. 124 poke214,10:print"  [198][146]ile to be read? "bf$;
  15. 126 ln=16:gosub218:f1$=in$:iff1$=""thenreturn
  16. 128 de=63:gosub232:ifen<>63then124
  17. 130 de=0:gosub234:ifen>19then124
  18. 132 poke214,13:print"  [198][146]ile to be created? r/s."mid$(bf$,5,24);
  19. 134 ln=12:gosub218:in$="r/s."+in$:f2$=in$:iff2$="r/s."thenreturn
  20. 136 de=62:gosub232:iff2$=f1$then132
  21. 138 ifde=enthen146
  22. 140 print"[145]  [207][146]verwrite file? [y/n] ";:in=1:gosub218
  23. 142 ifin$<>"y"thenprint"[145]"bl$:goto132
  24. 144 open15,8,15,"s0:"+f2$:close15
  25. 146 poke214,19:printtab(7)"[156][171][171][171][171][171] creating  file [171][171][171][171][171]"
  26. 148 sa=49152:forl=1to2
  27. 150 open8,8,8,f1$+",s,r":sys sa:sa=49194:close8:next:rem read & convert
  28. 152 open8,8,8,f2$+",s,w":sys49285:close8:rem write to disk
  29. 154 return
  30. 156 rem print file
  31. 158 ps=1:gosub266:ps=0:np=0
  32. 160 printtab(7)"'#######################%"
  33. 162 printtab(7)"'[146] print [144][210][146]ight/[211][146]ide file [144] "
  34. 164 printtab(7)"'$$$$$$$$$$$$$$$$$$$$$$$[144] "
  35. 166 printtab(9)"[144]                       "
  36. 168 poke214,10:print"  [198][146]ile to be printed? r/s."mid$(bf$,5,24);
  37. 170 ln=12:gosub218:in$="r/s."+in$:f1$=in$:iff1$="r/s."thenreturn
  38. 172 de=63:gosub232:ifen<>63then168
  39. 174 de=0:gosub234:ifen>19then168
  40. 176 poke214,13:print"  [206][146]ormal or high density? [n/h] ";
  41. 178 in=1:ln=1:gosub218:gm=80:ifin$="h"thengm=81
  42. 180 ifin$=""thenreturn
  43. 182 open15,4,15:close15:on-(st=0)goto188:ifnp=1thenreturn
  44. 184 poke214,16:print"  [195][146]onnect printer then press a key":gosub258:np=1
  45. 186 poke198,0:wait198,1:getq$:goto182
  46. 188 poke214,16:print"  [156][208][146]ress any key to begin printing ":gosub252
  47. 190 poke198,0:wait198,1
  48. 192 poke214,19:print"[156]  [171][171][171][171][171] press [211][208][193][195][197][194][193][210][146] [156]to abort [171][171][171][171][171]"
  49. 194 open 4,4,7:print#4,chr$(27)chr$(gm)
  50. 196 print#4,chr$(8):rem graphics mode
  51. 198 open 8,8,8,f1$+",s,r":sys49356:close8:close4
  52. 200 open 4,4,7:print#4,chr$(15):close 4
  53. 202 return
  54. 204 rem directory
  55. 206 print"[147][196][146]irectory"
  56. 208 sys57812"$",8:poke43,1:poke44,48:poke768,174:poke769,167:sys47003,1
  57. 210 poke782,48:sys65493:sys42291:list:poke44,8:poke768,139:poke769,227
  58. 212 print:print"  press any key to return "
  59. 214 poke198,0:wait198,1:return
  60. 216 rem input
  61. 218 cp=0:in$="":gosub252
  62. 220 poke204,0:poke198,0:wait198,1:getq$
  63. 222 ifq$=chr$(20)andcp>0thencp=cp-1:in$=left$(in$,cp):printq$;
  64. 224 ifq$=>" "andq$<="z"andcp<lnthencp=cp+1:in$=in$+q$:printq$;
  65. 226 poke212,0:ifq$<>chr$(13)then220
  66. 228 poke204,1:print"[146] ":return
  67. 230 rem disk check
  68. 232 open15,8,15,"r0:"+in$+"="+in$:close15:goto236
  69. 234 open8,8,8,in$+",s,r":close8
  70. 236 open15,8,15:input#15,en,em$:close15
  71. 238 ifde=enoren<20thenreturn
  72. 240 print"  [129][196][146]isk error: [144]"en;em$:gosub258:poke198,0
  73. 242 forl=0to1500:getq$:ifq$=""thennext
  74. 244 print"[145]"bl$
  75. 246 return
  76. 248 rem sounds
  77. 250 rem bing
  78. 252 pokeat,10:pokesr,73:pokewv,17:pokehf,50:pokell,0
  79. 254 fori=1to333:next:pokewv,16:return
  80. 256 rem buzz
  81. 258 pokehf,5:pokeat,0:pokesr,240:pokewv,33
  82. 260 fori=1to500:next:pokewv,32:return
  83. 262 rem screen
  84. 264 poke53280,3:poke53281,1:poke53272,(peek(53272)and240)or10
  85. 266 print"[159][147][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163][162][163]";
  86. 268 print"[155]----------------------------------------"
  87. 270 poke214,22:print"[155][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]";
  88. 272 print"[159][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160][161][160]":poke2023,97
  89. 274 ifpsthenreturn
  90. 276 printtab(12)"[150][167][168][168][168][168][168][168][168][168][168][168][168][168][168][168][169]"
  91. 278 printtab(12)"[165]              [166][144] "
  92. 280 printtab(12)"[150][165]  [144][210][146]ight/[211][146]ide  [166][144] "
  93. 282 printtab(12)"[150][165]              [166][144] "
  94. 284 printtab(12)"[170][171][171][171][171][171][171][171][171][171][171][171][171][171][171][172][144] "
  95. 286 printtab(13)"                "
  96. 288 printtab(7)"f 1  [195][146]reate [144][210][146]ight/[211][146]ide file"
  97. 290 printtab(7)"f 3  [208][146]rint [144][210][146]ight/[211][146]ide file"
  98. 292 printtab(7)"f 5  [196][146]isk directory"
  99. 294 printtab(7)"[198] 7  [209][146]uit program"
  100. 296 forl=1to4:poke214,6+l*3:printtab(6)"[152][173][174][174][174][175][157][157][157][157][157][176][177][157][157][157][157][157][178][179][179][179][180]":next
  101. 298 return
  102. 300 rem initialize
  103. 302 ifpeek(10240)+peek(49152)=222then322
  104. 304 ifa=0thena=1:load"right/side.ml",8,1
  105. 306 print"[147]reading data...."
  106. 308 poke56334,0:poke1,51
  107. 310 poke781,9:poke782,1:poke88,0:poke89,48:poke90,0:poke91,224
  108. 312 sys41964:poke1,55:poke56334,1
  109. 314 forl=0to255:poke11776+l,peek(10752+l):next
  110. 316 forl=0to255:poke10752+l,peek(10240+l):next
  111. 318 forl=0to247:poke11528+l,peek(11016+l):next
  112. 320 forl=11008to11175:readk:pokel,k:next
  113. 322 lf=54272:hf=54273:wv=54276:at=54277:sr=54278:vl=54296:pokevl,15
  114. 324 bl$="                                      "
  115. 326 bf$="                [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]"
  116. 328 return
  117. 330 rem custom characters
  118. 332 data 3,7,7,7,3,0,0,0,192,224,224,224,192,0,0,0
  119. 334 data 0,0,0,3,7,7,7,3,0,0,0,192,224,224,224,192
  120. 336 data 0,0,0,0,126,0,0,0,170,170,170,170,170,170,170,170
  121. 338 data 85,85,85,85,85,85,85,85,255,128,191,160,175,168,171,170
  122. 340 data 255,0,255,0,255,0,255,0,255,1,253,5,245,21,213,85
  123. 342 data 170,171,168,175,160,191,128,255,0,255,0,255,0,255,0,255
  124. 344 data 85,213,21,245,5,253,1,255,0,0,0,15,24,20,19,19
  125. 346 data 0,0,0,255,0,0,255,0,0,0,0,240,24,56,248,248
  126. 348 data 18,18,18,18,18,18,18,18,120,120,120,120,120,120,120,120
  127. 350 data 19,19,23,31,15,0,0,0,0,255,255,255,255,0,0,0
  128. 352 data 248,184,216,248,240,0,0,0
  129.