home *** CD-ROM | disk | FTP | other *** search
/ Tiger Disk 59 / Tiger_Disk_059_19xx_Tiger-Crew-Disk_de_Side_B.d64 / wordpro.file (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  3KB  |  116 lines

  1. 1000 rem miniwordpro.4
  2. 1010 rem r macnaughton
  3. 1015 rem    modified for commodore-64
  4. 1017 rem by w. m. strome
  5. 1020 rem west humber c i
  6. 1030 rem march 1982
  7. 1035 rem revised february 1983
  8. 1040 dim a$(25),c$(255)
  9. 1042 poke53272,23:rem upper/lower case
  10. 1045 id=8:rem input 8-disk 1-tape
  11. 1050 od=8:rem output 8-disk 1-tape
  12. 1052 qc=204:ql=209:qh=210:qp=211:qq=212:wd=40:ls=25:sc=1024
  13. 1055 n$="file"
  14. 1070 print"[147][212]hinking... ":gosub1870
  15. 1100 cu=sc+wd*2:cr=sc+wd:cx=cr+(ls-1)*wd-3:ct=cr+(ls-2)*wd
  16. 1120 cm=sc+wd*2
  17. 1130 pokeqq,0:print"\[215]rite[146]      \[211]ave     \[204]oad       \[208]rint";:pokeqc,0
  18. 1140 print"[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][192][192][192][192]";
  19. 1150 getc$:ifc$=""then1150
  20. 1160 c=asc(c$)
  21. 1170 cp=peek(ql)+256*peek(qh)+peek(qp):pokeqc,1:pokecp,peek(cp)and127
  22. 1180 ifcp>cmthencm=cp:ifcm>cxthencm=cx
  23. 1190 ifc$="\"then1460
  24. 1200 if(cand127)>31then1310
  25. 1210 if(c=13orc=141)andcp<ct-wdthenpokeqc,1:c$=chr$(13):goto1310
  26. 1220 ifc$=""thenprint"";:pokeqc,0:goto1150
  27. 1230 ifc=20andcp>cu thenprint"[157]";:gosub1350:pokeqc,0:goto1150
  28. 1240 ifc=29then1310
  29. 1250 ifc=157andcp>cu then1320
  30. 1260 ifc=148andcp<cx thengosub1380:pokeqc,0:goto1150
  31. 1270 ifc$="[147]"then1410
  32. 1280 ifc$=""andcp<ct-2then1310
  33. 1290 ifc$="[145]"andcp>cu+wd-1then1320
  34. 1300 pokeqc,0:goto1150
  35. 1310 ifcp>cxthenpokeqc,0:goto1150
  36. 1320 printc$;:pokeqc,0
  37. 1330 ifc=34thenpoke qq,0
  38. 1340 goto1150
  39. 1350 fori=cp-1tocm:pokei,peek(i+1)
  40. 1360 nexti:cm=cm-1
  41. 1370 pokei,32:return
  42. 1380 fori=cm+1tocpstep-1:pokei,peek(i-1)
  43. 1390 nexti
  44. 1400 pokecp,32:cm=cm+1:return
  45. 1410 print"\[195]lear?([217]/[206])[146]\[211]ave     \[204]oad       \[208]rint";
  46. 1420 print"[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][192][192][192][192]";
  47. 1430 getc$:ifc$=""then1430
  48. 1440 ifc$<>"y"then1130
  49. 1450 print"[147]":goto1120
  50. 1460 pokeqq,0:print"\[215]rite      \[211]ave     \[204]oad       \[208]rint";
  51. 1470 print"[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][192][192][192][192]";
  52. 1480 getcc$:ifcc$=""then1480
  53. 1482 ifcc$="p"then1790
  54. 1485 ifcc$="w"then1130
  55. 1490 ifcc$="s"then1525
  56. 1500 ifcc$="l"then1655
  57. 1520 goto1480
  58. 1525 ifid=8orod=8then gosub6000
  59. 1530 print"\[215]rite      \[211]ave[146]     \[204]oad       \[208]rint";
  60. 1540 print"[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][192][192][192][192]";
  61. 1550 ln=int((cm-cr)/40)
  62. 1560 ifcm-cr=40then1130
  63. 1570 forl=1toln:a$(l)=""
  64. 1580 form=0towd-1:c=cr+wd*l+m
  65. 1590 ifc>cxthen1610
  66. 1600 a$(l)=a$(l)+c$(peek(c)):pokec,32:nextm,l
  67. 1610 print"":ifod=1thenopen3,1,1
  68. 1620 ifod=8thenopen3,8,3,"@0:"+n$+",s,w"
  69. 1630 print#3,ln;chr$(13);:forl=1toln:print#3,a$(l);:nextl
  70. 1640 close3
  71. 1645 print"[147]":forl=1toln:printa$(l);:nextl
  72. 1650 goto1460
  73. 1655 ifid=8orod=8then gosub6000
  74. 1660 print"\[215]rite      \[211]ave     \[204]oad[146]       \[208]rint";
  75. 1670 print"[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][192][192][192][192]";
  76. 1680 ifid=1thenopen3,1,0
  77. 1690 ifid=8thenopen3,8,3,"0:"+n$+",s,r"
  78. 1700 print"";:input#3,ln
  79. 1710 forl=1toln
  80. 1720 form=1towd
  81. 1725 ifl=23andm>=wd-1then1750
  82. 1730 get#3,c$:printc$;:poke qq,0
  83. 1750 nextm,l
  84. 1760 close3
  85. 1770 cm=ln*40+cr:ifcm>cxthencm=cx
  86. 1780 goto1130
  87. 1790 print"\[215]rite      \[211]ave     \[204]oad       \[208]rint[146]";
  88. 1800 print"[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][192][192][192][192]";
  89. 1810 open4,4,7
  90. 1820 ln=int(.5+(cm-cr)/40)
  91. 1830 forl=1toln:print#4,""tab(20);:ifpeek(53272)=23thenprint#4,"[147]";
  92. 1840 form=0to39:c=cr+40*l+m
  93. 1850 print#4,c$(peek(c));:nextm:print#4:nextl:print#4:print#4:close4
  94. 1860 goto1130
  95. 1870 fori=0to31:c$(i)=chr$(i+64):next
  96. 1885 fori=32to63:c$(i)=chr$(i):next
  97. 1890 fori=64to95:c$(i)=chr$(i+128):next
  98. 1900 fori=96to127:c$(i)=chr$(i+64):next
  99. 1910 return
  100. 6000 print"                                        ";
  101. 6010 print"[215]hat is the file name";:gosub60000
  102. 6020 iflen(in$)=0then in$=n$:printn$:fori=1to500:next
  103. 6030 n$=in$:return
  104. 60000 rem input routine #1
  105. 60010 tf=20:tt=0:in$="":print"? [166][157]";
  106. 60020 getc$:tt=tt+1:iftt>tfthenprint" [157]";
  107. 60030 iftt>tf*2thenprint"[166][157]";:tt=0
  108. 60040 ifc$=""then60020
  109. 60050 le=len(in$)
  110. 60060 ifc$="[146]"andpeek(788)=88thenpoke788,85:goto60020:rem re-enable stop key
  111. 60070 if(asc(c$)and127)>31andc$<>chr$(34)andle<16then60110
  112. 60080 ifc$=chr$(13)then in=val(in$):print" ";:return
  113. 60090 ifc$=chr$(20)andle>0thenin$=left$(in$,le-1):print"[157][166] [157][157]";
  114. 60100 goto60020
  115. 60110 in$=in$+c$:printc$"[166][157]";:goto60020
  116.