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

  1. 1 rem ********************************
  2. 2 rem *                              *
  3. 3 rem *  'screenmaker 64' (c) 1985   *
  4. 4 rem *                              *
  5. 5 rem *      doug smoak              *
  6. 6 rem *      303 heyward st.         *
  7. 7 rem *      columbia, s.c.  29201   *
  8. 8 rem *                              *
  9. 9 rem ********************************
  10. 10 bo=53280:bg=bo+1:poke56296,12:poke56297,12
  11. 20 pokebo,12:pokebg,12:print"[147][151]setting up";:dimb$(63)
  12. 30 reada:ifa>-1thenpoke680+i,a:i=i+1:print".";:goto30
  13. 40 print"[147]":poke252,4:poke254,192:sys680
  14. 50 gosub1980
  15. 60 dn$="":bl$="                                    "
  16. 70 dn$=dn$+bl$+dn$:nl$=chr$(0)
  17. 80 mn$="[221]                                    [221]"
  18. 90 t1$="[147][151]             screenmaker 64             [146]"
  19. 100 printt1$
  20. 110 pokebo,12:pokebg,12
  21. 120 print"choose one:"
  22. 130 print"c_create a screen"
  23. 140 print"l_load/edit a screen"
  24. 150 print"e_end"
  25. 160 getg$
  26. 170 ifg$="c"then240
  27. 180 ifg$="l"then1510
  28. 190 ifg$="e"thenprint"[147]":end
  29. 200 goto160
  30. 210 :
  31. 220 rem -------- create menu -----------
  32. 230 :
  33. 240 print"[147][151]             create a screen            [146]"
  34. 250 pokebo,12:pokebg,12
  35. 260 print"choose one:"
  36. 270 print"c_custom screen mode"
  37. 280 print"l_large text mode"
  38. 290 print"v_view menu"
  39. 300 print"m_main menu"
  40. 310 getg$
  41. 320 ifg$="v"then370
  42. 330 ifg$="m"then100
  43. 340 ifg$="c"thengosub790:goto570
  44. 350 ifg$="l"thengosub790:goto1750
  45. 360 goto310
  46. 370 print"[147][151]               view menu                [146]"
  47. 380 pokebo,12:pokebg,12
  48. 390 print"v_ view current screen"
  49. 400 print"c_ return to create menu"
  50. 410 print"m_ return to main menu"
  51. 420 print"[176][192][192][192][192][192][151] available from view mode[151] [192][192][192][192][192][174]":printmn$
  52. 430 print"[221] f1[155]_ change character color [151]        [221]":printmn$
  53. 440 print"[221] f3[155]_ change background color[151]        [221]":printmn$
  54. 450 print"[221] f5[155]_ change border color    [151]        [221]":printmn$
  55. 460 print"[221] f7[155]_ 1x printout   [151]f8[155]_ 2x printout[151]  [221]":printmn$
  56. 470 print"[221] s[155] _ save current screen   [151]         [221]"
  57. 480 print"[173][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][192][192][192][192][192][192][192][192][192][192][192][189]"
  58. 490 getg$
  59. 500 ifg$="v"thengosub790:gosub930:goto370
  60. 510 ifg$="m"then100
  61. 520 ifg$="c"then240
  62. 530 goto490
  63. 540 :
  64. 550 rem -------- cursor routine --------
  65. 560 :
  66. 570 print"";
  67. 580 p=1024+peek(214)*40+peek(211)+(peek(211)>39)*40
  68. 590 ch=peek(p):k=128*(ch>127)-128*(ch<128)
  69. 600 pokep,ch+k:pokep+54272,peek(646):t=ti+2
  70. 610 ifti>tthenk=-128*(k=0)*(ch>127)+128*(k=0)*(ch<128):goto600
  71. 620 getz$:ifz$=""then610
  72. 630 ifz$="\"thenpokep,ch:gosub860:goto240
  73. 640 pokep,ch:printz$;
  74. 650 ifz$=chr$(34)thenpoke212,0
  75. 660 ifz$="[148]"thenpoke216,0
  76. 670 goto580
  77. 680 :
  78. 690 rem ------- error channel read -----
  79. 700 :
  80. 710 open15,8,15
  81. 720 input#15,a,b$,c,d:close15
  82. 730 return
  83. 740 geta$:ifa$=""then740
  84. 750 return
  85. 760 :
  86. 770 rem ---------- get screen ----------
  87. 780 :
  88. 790 poke252,192:poke254,4:sys680
  89. 800 poke252,196:poke254,216:sys680
  90. 810 pokebo,peek(56296):pokebg,peek(56297)
  91. 820 return
  92. 830 :
  93. 840 rem ---------- put screen ----------
  94. 850 :
  95. 860 poke252,4:poke254,192:sys680
  96. 870 poke56296,peek(bo):poke56297,peek(bg)
  97. 880 poke252,216:poke254,196:sys680
  98. 890 return
  99. 900 :
  100. 910 rem -------- view options ----------
  101. 920 :
  102. 930 getg$:ifg$=""then930
  103. 940 ifg$="s"thengosub860:goto1040
  104. 950 ifg$="[133]"thensys703:goto930
  105. 960 ifg$="[134]"thenpokebg,(peek(bg)+1)and15:poke56297,peek(bg):goto930
  106. 970 ifg$="[135]"thenpokebo,(peek(bo)+1)and15:poke56296,peek(bo):goto930
  107. 980 ifg$="[136]"thentx$=chr$(15):gosub1190
  108. 990 ifg$="[140]"thentx$=chr$(14):gosub1190
  109. 1000 gosub860:return
  110. 1010 :
  111. 1020 rem --------- save screen ---------
  112. 1030 :
  113. 1040 f1$="":f2$="":pokebo,12:pokebg,12
  114. 1050 open15,8,15,"ui":close15
  115. 1060 print"[147][151]screen name";
  116. 1070 inputf1$:iff1$=""thenreturn
  117. 1080 iflen(f1$)>14then1060
  118. 1090 print"save color too? [y/n]"
  119. 1100 geta$:ifa$<>"y"anda$<>"n"then1100
  120. 1110 gosub790
  121. 1120 fs=1:ifa$="y"thenfs=2:f2$=f1$+".c"
  122. 1130 f$=f1$:s=1024:e=2024:gosub1330:gosub1390:ifathenreturn
  123. 1140 iffs=2thenf$=f2$:s=55296:e=56298:gosub1330:gosub1390
  124. 1150 return
  125. 1160 :
  126. 1170 rem --------- screen dump ---------
  127. 1180 :
  128. 1190 r$=chr$(145):v$=chr$(146):open4,4:cmd4:g=peek(648)*256
  129. 1200 printr$+tx$;
  130. 1210 forp=gtog+999
  131. 1220 c=peek(p):c$=""
  132. 1230 if(p-g)/40=int((p-g)/40)thenprintchr$(8)+chr$(13)+tx$;
  133. 1240 ifc>128thenc=c-128:c$=chr$(18)
  134. 1250 ifc<32orc>95thenc=c+64:goto1270
  135. 1260 ifc>63andc<96thenc=c+128
  136. 1270 c$=c$+chr$(c):iflen(c$)>1thenc$=c$+v$+r$
  137. 1280 printc$;:next:print#4:close4
  138. 1290 return
  139. 1300 :
  140. 1310 rem -------- put filename ---------
  141. 1320 :
  142. 1330 fori=1tolen(f$):poke749+i,asc(mid$(f$,i,1)):next
  143. 1340 poke183,len(f$):poke187,238:poke188,2:poke186,8:poke185,1
  144. 1350 return
  145. 1360 :
  146. 1370 rem --------- save sub ------------
  147. 1380 :
  148. 1390 sh=int(s/256):sl=s-sh*256
  149. 1400 eh=int(e/256):el=e-eh*256
  150. 1410 poke251,sl:poke252,sh
  151. 1420 poke780,251:poke781,el:poke782,eh
  152. 1430 sys65496
  153. 1440 gosub710:ifa=0thenreturn
  154. 1450 print"[147]"dn$"disk error "a;b$""
  155. 1460 gosub740
  156. 1470 return
  157. 1480 :
  158. 1490 rem --------- load screen ---------
  159. 1500 :
  160. 1510 f1$="":f2$=""
  161. 1520 print"[147]exact screen name";
  162. 1530 inputf1$:iff1$=""then100
  163. 1540 iflen(f1$)>14then1520
  164. 1550 print"load color too? [y/n]"
  165. 1560 geta$:ifa$<>"y"anda$<>"n"then1560
  166. 1570 fs=1:ifa$="y"thenfs=2:f2$=f1$+".c"
  167. 1580 f$=f1$:gosub1330:poke780,0:sys65493
  168. 1590 gosub710:ifa=0then1630
  169. 1600 printdn$"disk error"a;b$""
  170. 1610 gosub740
  171. 1620 goto100
  172. 1630 iffs=2thenf$=f2$:gosub1330:poke780,0:sys65493
  173. 1640 gosub710:ifa=0then1690
  174. 1650 gosub860
  175. 1660 printdn$"color file not loaded"
  176. 1670 gosub740
  177. 1680 goto370
  178. 1690 pokebo,peek(56296):pokebg,peek(56297)
  179. 1700 gosub860
  180. 1710 goto370
  181. 1720 :
  182. 1730 rem ------- large text ------------
  183. 1740 :
  184. 1750 print"";
  185. 1760 gosub1910
  186. 1770 ifleft$(m$,1)="\"thengosub860:goto240
  187. 1780 ifleft$(m$,1)="_"thenm$=right$(m$,len(m$)-1):goto1810
  188. 1790 ml=(40-len(m$)*4)/2
  189. 1800 ifml>0thenfori=1toml:print"";:next
  190. 1810 fori=1tolen(m$)
  191. 1820 a$=mid$(m$,i,1)
  192. 1830 a=asc(a$+nl$)+64*(asc(a$+nl$)>63)
  193. 1840 printb$(a);:next:print""
  194. 1850 getg$:ifg$=""then1850
  195. 1860 ifg$="\"thengosub860:goto240
  196. 1870 print:goto1760
  197. 1880 :
  198. 1890 rem ------- get text line ---------
  199. 1900 :
  200. 1910 m$="":printdn$"[166][157]";
  201. 1920 getg$:ifg$=""then1920
  202. 1930 ifasc(g$)>31andasc(g$)<96thenm$=m$+g$
  203. 1940 ifg$=chr$(20)org$=chr$(157)thenm$=left$(m$,len(m$)+1*(len(m$)>0))
  204. 1950 ifg$<>chr$(13)thenprint" [157]"g$"[166][157]";:goto1920
  205. 1960 ifm$=""thenm$=" "
  206. 1970 printdn$"[145]":return
  207. 1980 b$(0)=""
  208. 1990 b$(1)="[169] [223][157][157][157]  [157][157][157] [162] [157][157][157]  [145][145][145]"
  209. 2000 b$(2)="  [223][157][157][157]  [157][157][157] [162] [157][157][157] [146][162] [145][145][145]"
  210. 2010 b$(3)="   [157][157][157] [162][157][157][157] [157] [146][162] [145][145][145]"
  211. 2020 b$(4)="  [223][157][157][157]  [157][157][157]  [157][157][157] [146][162] [145][145][145]"
  212. 2030 b$(5)="   [157][157][157] [157][157] [162][157][157] [146][162][162][145][145][145]"
  213. 2040 b$(6)="   [157][157][157] [157][157] [162][157][157] [146]  [145][145][145]"
  214. 2050 b$(7)="   [157][157][157] [162][157][157][157] [146][172][162][157][157][157] [146][162] [145][145][145]"
  215. 2060 b$(8)="  [157][157][157]  [157][157][157] [162] [157][157][157]  [145][145][145]"
  216. 2070 b$(9)="[161][146][161][157][157][161][146][161][157][157][161][146][161][157][157][161][146][161][145][145][145]"
  217. 2080 b$(10)=" [157] [157] [157][157][157] [146][162] [145][145][145]"
  218. 2090 b$(11)="  [157][157][157] [169][146][169][157][157][157] [146][223][223][157][157][157]  [145][145][145]"
  219. 2100 b$(12)=" [157] [157][157] [157] [146][162][162][145][145][145]"
  220. 2110 b$(13)=" [223][169] [157][157][157][157] [146][223][169] [157][157][157][157]  [157][157][157][157]  [145][145][145]"
  221. 2120 b$(14)=" [223] [157][157][157] [146][223] [157][157][157]  [157][157][157]  [145][145][145]"
  222. 2130 b$(15)="   [157][157][157]  [157][157][157]  [157][157][157] [146][162] [146][145][145][145]"
  223. 214