home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 67 / 067.d81 / edstar (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  7KB  |  278 lines

  1. 5 poke650,255:print"";:goto30
  2. 10 xx=0:ifxy<760thenreturn
  3. 15 print"[207]ut of lines!!!":fort=1to500:next:print"[145]                 "
  4. 20 xx=-1
  5. 25 return
  6. 30 poke53280,6:poke53281,0:print"[147]"
  7. 35 ifpeek(49408)<>1thenprint"[158]loading":load"edstar 5.o",8,1
  8. 40 gosub50:poke55,0:poke56,39:clr:s=10000:poke53272,23:tb=1503:goto60
  9. 45 rem *rst scr wd*
  10. 50 poke1020,1:poke1021,19:poke1022,0:poke1023,39:return
  11. 55 rem *sys #s*
  12. 60 iprc=49448:lsav=49430
  13. 65 mttp=49433:mbot=49436
  14. 70 sdwn=49415:scup=49412
  15. 75 sfil=49418:lfil=49421
  16. 80 lmov=49442:mwip=49439
  17. 85 dchr=49424:ichr=49427
  18. 90 wwrp=49445:clsm=49409
  19. 95 mdel=49451:mins=49454
  20. 100 wchk=49457:prnt=49460
  21. 105 splt=49463:cata=49466
  22. 110 g1lu=49469:g2lu=49472
  23. 115 g3lu=49475:g4li=49478
  24. 120 g5lu=49481:rdel=49484
  25. 125 sys mwip
  26. 130 gosub765
  27. 135 deffns(x)=x*40+9960
  28. 140 poke646,12:sys clsm:gosub300:gosub405:ln=1:goto145
  29. 145 ps=1465:poke53272,23:t$="x":gosub715:goto155
  30. 150 rem*
  31. 155 getc$:ifc$<>"" then175
  32. 160 pokeps,peek(ps)or128
  33. 165 getc$
  34. 166 if((ln-1)/19)<>(int((ln-1)/19))thenpoke53280,6
  35. 167 if((ln-1)/19)=(int((ln-1)/19))thenpoke53280,1
  36. 169 ifc$<>""then175
  37. 170 gosub303:goto155
  38. 175 poke150,asc(c$):sysiprc:if peek(150)=0then270
  39. 180 onpeek(151)goto190,205,210,215,220,225,230,235,240,245,250,255,260,265
  40. 185 goto165
  41. 190 xy=ln:gosub10:ifxxthen200:rem cr
  42. 195 gosub303:ps=1465:syslsav,ln:ln=ln+1:sys scup:sys mbot,ln+8
  43. 200 goto280
  44. 205 gosub395:goto165:ins char
  45. 210 gosub330:goto165:crs lt
  46. 215 gosub345:goto165:crs rt
  47. 220 gosub355:goto165:crs up
  48. 225 gosub380:goto165:crs dn
  49. 230 gosub475:goto165:^d line del
  50. 235 gosub530:goto165:^i line ins
  51. 240 gosub303:gosub635:gosub410:gosub725:gosub985:goto165:save
  52. 245 gosub805:gosub720:goto165:^p printer
  53. 250 gosub310:goto165:del char
  54. 255 gosub1315:goto165:^x exit
  55. 260 gosub910:goto165:^h help
  56. 265 gosub1025:goto165:^f functions
  57. 270 lp=peek(49151+asc(c$))
  58. 275 pokeps,lp:ps=ps+1:ifps=tbthen ps=1465:gosub430:syslsav,ln:sys mbot,ln+8
  59. 280 ifln>nlthennl=ln
  60. 285 goto155
  61. 290 :
  62. 295 rem*rstr clr ln*
  63. 300 fort=55736to55775:poket,7:nextt:return
  64. 303 pokeps,peek(ps)and127:return
  65. 305 rem*dl ch*
  66. 310 if ps<1466 then return
  67. 315 poke150,ps-1465:gosub303:sys dchr
  68. 320 ps=ps-1:return
  69. 325 rem*cr lf*
  70. 330 if ps>1465thengosub303:pokeps,peek(ps)or128:gosub303:ps=ps-1
  71. 335 return
  72. 340 rem*cr rt*
  73. 345 if ps<1502thengosub303:pokeps,peek(ps)or128:gosub303:ps=ps+1
  74. 350 return
  75. 355 rem*cr up*
  76. 360 ifln=1thenprint"             [211]tart of text[152]":gosub585:return
  77. 365 gosub303:syslsav,ln:ln=ln-1:syssdwn
  78. 370 if ln>10then sysmttp,ln-10
  79. 375 return
  80. 380 rem*crsr dn*
  81. 385 ifln>=nlthengosub575:return
  82. 390 gosub303:syslsav,ln:ln=ln+1:sys scup:sys mbot,ln+8:return
  83. 395 rem*ins cpokear*
  84. 400 pokeps,peek(ps)and127:poke150,ps-1463:sys ichr:return
  85. 405 rem*clr menu*
  86. 410 print"[155] [176][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][174]"
  87. 415 gosub303
  88. 420 fort=1to3:print" [221]                                    [221]":nextt
  89. 425 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][145][145][145][145]";:return
  90. 430 rem*wrap*
  91. 435 xy=ln:gosub10:ifxxthenreturn
  92. 440 xf=0:ifpeek(tb-1)=32thenxf=-1
  93. 445 sm=fns(ln+1):poke251,int(sm/256):poke250,sm-peek(251)*256
  94. 450 fm=fns(nl):poke253,int(fm/256):poke252,fm-peek(253)*256
  95. 455 syswchk:ifpeek(150)<>0thenpoke1020,12:syssdwn:sysmins:nl=nl+1:poke1020,1
  96. 460 sys wwrp:ps=peek(150)+1464:syslsav,ln:sys scup:ln=ln+1
  97. 465 ifxf=-1thenps=1465
  98. 470 return
  99. 475 rem*line del*
  100. 480 if nl=0 then return
  101. 485 print"[196]eleting a line..."
  102. 490 sm=fns(ln):poke251,int(sm/256):poke250,sm-peek(251)*256
  103. 495 sm=fns(nl+1):poke253,int(sm/256):poke252,sm-peek(253)*256:sys mdel
  104. 500 poke1020,11:sys scup:gosub50:ps=1465:nl=nl-1
  105. 505 syslsav,ln:sys mbot,ln+8
  106. 510 print"                   ":poke150,0:poke151,0
  107. 515 poke152,0:poke153,o
  108. 520 if nl<ln then gosub355
  109. 525 return
  110. 530 rem*line ins*
  111. 535 xy=nl:gosub10:ifxxthenreturn
  112. 540 print"[201]nserting a line..."
  113. 545 sm=fns(ln):poke251,int(sm/256):poke250,sm-peek(251)*256
  114. 550 fm=fns(nl):poke253,int(fm/256):poke252,fm-peek(253)*256:sys mins
  115. 555 :nl=nl+1
  116. 560 gosub303:poke1020,11:syssdwn:gosub50:ps=1465
  117. 565 print"                    ":poke150,0:poke151,0:poke152,0
  118. 570 poke153,0:return
  119. 575 rembzz
  120. 580 print"[197]nd of text"
  121. 585 fort=1to40:nextt:goto605
  122. 590 poke54296,15:poke54277,45:poke54278,165
  123. 595 poke54276,33:poke54273,6:poke54272,5
  124. 600 fort=1to200:next:poke54276,32:poke54273,0:poke54272,0:poke198,0:return
  125. 605 print"                            ":return
  126. 610 :
  127. 615 rem*exit*
  128. 620 gosub410:print"[193]re you sure you want to exit?(y/n)"
  129. 625 getd$:ifd$="" then625
  130. 630 ifd$<>"y"then ow=0:return
  131. 635 syslsav,ln:fx=17:open15,8,15,"i0":close15
  132. 640 gosub410:print"save as what? "fi$:printtab(16)"[145]";:inputfs$
  133. 645 iffs$=""orfs$=chr$(221)thenprint"[147]":syscata:print"":goto640
  134. 650 fx=fx-1:fs$=left$(fs$,fx):ifright$(fs$,1)=" "then645:iffs$=fi$then655
  135. 655 fi$=fs$:gosub410:print"saving '"fi$"'":open15,8,15
  136. 660 print#15,"r0:"fi$"=0:"fi$
  137. 665 ow=-1:input#15,a$:if a$<>"63"then690
  138. 670 print"[145]file exists! replace?(y/n)";:gosub590
  139. 675 get r$:ifr$="" then675
  140. 680 if r$<>"y"then close15:return
  141. 685 print" [156][207].[203].[152]":print#15,"s0:"+fi$:close15
  142. 690 f$=fi$+",p,w"
  143. 695 poke827,len(f$):forc=1tolen(f$):poke827+c,asc(mid$(f$,c)):next
  144. 700 fi$=f$
  145. 705 poke251,(nl)/256:poke250,256*((nl)/256-peek(251)):sys sfil
  146. 710 sv=-1:return
  147. 715 rem*menu*
  148. 720 gosub303:syslsav,ln:gosub410
  149. 725 print"<ctrl>[159][201][152][146]nsert line   <ctrl>[159][211][152][146]ave text"
  150. 730 print"<ctrl>[159][196][152][146]elete line   <ctrl>[159][208][152][146]rinter"
  151. 735 print"<ctrl>[159][200][152][146]elp          <ctrl>e[159][216][152][146]it"
  152. 740 if t$="x"then return
  153. 745 get me$:ifme$="" then745
  154. 750 if me$="d"orme$="i"orme$="p"orme$="h"orme$="s"orme$="x"then return
  155. 755 goto745
  156. 760 rem*load*
  157. 765 print"[147][204]oad:":gosub1260
  158. 770 sysmwip
  159. 775 poke250,17:poke251,39:poke252,nl/256:poke253,256*((nl/256)-peek(252))
  160. 780 sys lfil:t$="x":gosub1295:ifnl<>0then795
  161. 785 :
  162. 790 open15,8,15:input#15,s$:close15:return
  163. 795 gosub300:return
  164. 800 rem*print*
  165. 805 syslsav,ln:gosub410
  166. 810 print"       ===== [208][210][201][206][212][197][210][152] ====="
  167. 815 print"[210]eady printer and hit space bar."
  168. 820 print"[216] to cancel.                    "
  169. 825 getp$:ifp$="" then825
  170. 830 ifp$<>" "then print"[145][207].[203]., don't print.":fort=1to699::nextt:return
  171. 835 open4,4,7:cmd4
  172. 840 lc=0:lp=1
  173. 845 ifnl-lp<120then865
  174. 850 fori=lptolp+59:rs=60:gosub885:next
  175. 855 ifpeek(203)=23then875
  176. 860 print:print:print:print:print:print:lp=lp+120:goto845
  177. 865 rs%=(nl-lp+2)/2:rs=rs%:fori=lptolp+rs-1:gosub885
  178. 870 next
  179. 875 print"";:getk$:print#4:close4:return
  180. 880 :
  181. 885 m1=fns(i):m2=fns(i+rs)
  182. 890 poke151,m1/256:poke150,256*(m1/256-peek(151)):sysprnt
  183. 895 poke151,m2/256:poke150,256*(m2/256-peek(151)):sysprnt
  184. 900 return
  185. 905 :
  186. 910 rem*help*
  187. 915 gosub303:syslsav,ln:print"[147]"
  188. 920 print"[158][197][196][211][212][193][210]"
  189. 925 print" [212]o access functions press ^f."
  190. 930 print" [212]he next key does the job."
  191. 935 print" f1 = top of text, f7 = bottom"
  192. 940 print" f3 = up 10 lines, f5 = down.
  193. 945 [153]" ^s splits lines,  ^g glues."
  194. 950 [153]" ^w wipes leading spaces."
  195. 955 [153]" ^a appends a file."
  196. 960 [153]" ^z zaps between \ flags."
  197. 962 [153]" ^d double spaces lines."
  198. 965 [153]"                                      "
  199. 970 [153]" (NULL)ow press the (NULL) key to exit help.   "
  200. 975 [161] t$:[139] t$ [178] "" [167]975
  201. 980 [139] t$[179][177]"x" [167]975
  202. 985 [153]"load":[151]646,12:[158] clsm
  203. 990 [141]410:[141]725:[141]300
  204. 995 [129]p[178]ln[171]10[164]ln[170]7
  205. 1000 [139] p[179]1[167]1010
  206. 1005 [158] mbot,p:[158] scup
  207. 1010 [130]p:[158] mbot,p
  208. 1015 [141]300:[142]
  209. 1020 functs
  210. 1025 [141]303:[153]"ascunct:";:[158]lsav,ln
  211. 1030 [161]f$:[139]f$[178]""[167]1030
  212. 1035 [153]"      ";
  213. 1040 [139]f$[178]""[167][141]1100:[142]:glue
  214. 1045 [139]f$[178]""[167][141]1160:[142]:split
  215. 1050 [139]f$[178]"let"[167][141]1180:[142]:[128] of te