home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1985 Winter / rerun-1985-winter.d64 / screenviewer (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  192 lines

  1. 1 rem *********************************
  2. 2 rem *  'screen viewer' (c) 1985     *
  3. 3 rem *   by doug smoak               *
  4. 4 rem *      303 heyward st.          *
  5. 5 rem *      columbia, s.c. 29201     *
  6. 6 rem *                               *
  7. 7 rem * will load a series of screens *
  8. 8 rem * created by graphmaker 64 or   *
  9. 9 rem * screenmaker 64.               *
  10. 10 rem*********************************
  11. 15 poke53280,12:poke53281,11
  12. 20 t1$="[147][152]              screen viewer             [146]"
  13. 30 fori=0to23:reada
  14. 40 poke49152+i,a:ck=ck+a:next
  15. 50 ifck<>4077thenprintt1$"error in data statements!":end
  16. 60 dimf$(83)
  17. 70 printt1$
  18. 80 print"c_ create [146] a name file"
  19. 90 print"l_ load   [146] a name file"
  20. 100 print"e_ end    [146] "
  21. 110 getop$:ifop$<>"l"andop$<>"c"andop$<>"e"then110
  22. 120 ifop$="l"thengosub1550:ifsf$<>""then300
  23. 130 ifop$="e"thenprint"[147]":end
  24. 140 ifop$<>"c"then70
  25. 150 :
  26. 160 rem ------ input screen names -----
  27. 170 :
  28. 180 printt1$
  29. 190 ns$="":input"how many screens to view";ns$
  30. 200 ns=val(ns$):ifns<1then70
  31. 210 fori=1tons
  32. 220 sn$="":printt1$"screen name"i;
  33. 230 inputsn$:iflen(sn$)>14then220
  34. 240 ifsn$=""then220
  35. 250 f$(i)=sn$
  36. 260 next
  37. 270 :
  38. 280 rem --------- edit option ---------
  39. 290 :
  40. 300 printt1$:poke53280,12:poke53281,11
  41. 310 print"c_ continue   [146]"
  42. 320 print"e_ edit names [146]"
  43. 330 geta$:ifa$<>"c"anda$<>"e"anda$<>chr$(141)then330
  44. 340 ifa$="c"then530
  45. 350 ifa$=chr$(141)then70
  46. 360 print:gosub1260
  47. 370 :
  48. 380 rem ------- edit screen name ------
  49. 390 :
  50. 400 printt1$
  51. 410 print"screen number to edit? 1 -"ns;
  52. 420 e$="":inpute$:e=val(e$):ife$=""then300
  53. 430 ife<1ore>nsthen400
  54. 440 print"screen #"e"= "f$(e)
  55. 450 print"new screen #"e;
  56. 460 f$="":inputf$
  57. 470 iff$=""then400
  58. 480 iflen(f$)>14then450
  59. 490 f$(e)=f$:goto300
  60. 500 :
  61. 510 rem -------- save option ----------
  62. 520 :
  63. 530 printt1$
  64. 540 print"s_ save [146] name file"
  65. 550 print"v_ view [146] with no save"
  66. 560 geta$:ifa$=chr$(141)then300
  67. 570 ifa$<>"s"anda$<>"v"then560
  68. 580 ifa$="s"thengosub1390:goto300
  69. 590 :
  70. 600 rem -------- view menu 1 ----------
  71. 610 :
  72. 620 print"[147]             viewing options            "
  73. 630 print"1_ short  [146] delay between screens"
  74. 640 print"2_ medium [146] delay between screens"
  75. 650 print"3_ long   [146] delay between screens"
  76. 660 geta$:ifa$=chr$(141)then530
  77. 670 ifa$<"1"ora$>"3"then660
  78. 680 dl=val(a$)
  79. 690 :
  80. 700 rem -------- view menu 2 ----------
  81. 710 :
  82. 720 print"[147]             viewing options            "
  83. 730 print"1_show  once         "
  84. 740 print"2_show  continuously "
  85. 750 geta$:ifa$=chr$(141)then620
  86. 760 ifa$<"1"ora$>"2"then750
  87. 770 cy=val(a$)-1
  88. 780 printt1$"insert disk with screens..."
  89. 790 gosub1330:ifa$=chr$(141)then720
  90. 800 print"o.k."
  91. 810 :
  92. 820 rem ------ main display loop ------
  93. 830 :
  94. 840 forf=1tons
  95. 850 f$=f$(f)
  96. 860 gosub1050:ifathenf=ns:goto300
  97. 870 fork=1to2000*dl
  98. 880 getg$:ifg$<>""thenk=2000*dl:ifg$=chr$(141)then300
  99. 890 next:next
  100. 900 ifcythen840
  101. 910 goto300
  102. 920 :
  103. 930 rem -------- put filename ---------
  104. 940 :
  105. 950 fori=1tolen(f$)
  106. 960 poke749+i,asc(mid$(f$,i,1))
  107. 970 next
  108. 980 poke183,len(f$)
  109. 990 poke187,238:poke188,2
  110. 1000 poke186,8:poke185,1
  111. 1010 return
  112. 1020 :
  113. 1030 rem --------- load screen ---------
  114. 1040 :
  115. 1050 gosub950:fc=0:poke157,0
  116. 1060 poke780,0:sys65493
  117. 1070 gosub1150:ifathenreturn
  118. 1080 f$=f$+".c":gosub950:fc=1
  119. 1090 poke780,0:sys65493
  120. 1100 gosub1150:ifathena=0:sys49152:return
  121. 1110 poke53280,peek(56296)
  122. 1120 poke53281,peek(56297)
  123. 1130 return
  124. 1140 :
  125. 1150 rem ------ screen load error ------
  126. 1160 :
  127. 1170 open15,8,15
  128. 1180 input#15,a,b$,c,d
  129. 1190 close15
  130. 1200 iffcor(a=0)thenreturn
  131. 1210 printt1$"disk error"a;b$
  132. 1220 poke53280,12:poke53281,11
  133. 1230 print"on file "f$
  134. 1240 print"to display screen names ..."
  135. 1250 gosub1330
  136. 1260 fori=1tons
  137. 1270 print"screen #"i"= "f$(i)
  138. 1280 ifi/20=int(i/20)thengosub1330
  139. 1290 next:gosub1330:return
  140. 1300 :
  141. 1310 rem ------- prompt & wait --------
  142. 1320 :
  143. 1330 print"press [return][146]":print
  144. 1340 geta$:ifa$<>chr$(13)anda$<>chr$(141)then1340
  145. 1350 return
  146. 1360 :
  147. 1370 rem ------- save name file -------
  148. 1380 :
  149. 1390 printt1$" save name file "
  150. 1400 sf$="":input"filename";sf$
  151. 1410 ifsf$=""thenreturn
  152. 1420 iflen(sf$)>16then1390
  153. 1430 open15,8,15
  154. 1440 open8,8,8,"@0:"+sf$+",s,w"
  155. 1450 gosub1710
  156. 1460 ifathen1390
  157. 1470 print"o.k."
  158. 1480 print#8,ns$
  159. 1490 fori=1tons
  160. 1500 print#8,f$(i)
  161. 1510 next:close8:close15:return
  162. 1520 :
  163. 1530 rem ------ load name file -------
  164. 1540 :
  165. 1550 printt1$" load name file "
  166. 1560 sf$="":input"filename";sf$
  167. 1570 ifsf$=""thenreturn
  168. 1580 iflen(sf$)>16then1550
  169. 1590 open15,8,15
  170. 1600 open8,8,8,"0:"+sf$+",s,r"
  171. 1610 gosub1710
  172. 1620 ifathen1550
  173. 1630 print"o.k."
  174. 1640 input#8,ns$:ns=val(ns$)
  175. 1650 fori=1tons
  176. 1660 input#8,f$(i)
  177. 1670 next:close8:close15:return
  178. 1680 :
  179. 1690 rem -- error for name load/save --
  180. 1700 :
  181. 1710 input#15,a,b$,c,d
  182. 1720 ifa=0thenreturn
  183. 1730 close8:close15
  184. 1740 printt1$:print"disk error"a;b$
  185. 1750 gosub1330:return
  186. 1760 :
  187. 1770 rem -- m.l. data --
  188. 1780 :
  189. 1790 data160,0,132,251,169,216,133,252,162,4
  190. 1800 data173,134,2,145,251,200,208,251,230,252
  191. 1810 data202,208,246,96
  192.