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 >
Wrap
Commodore BASIC
|
2023-02-26
|
3KB
|
116 lines
1000 rem miniwordpro.4
1010 rem r macnaughton
1015 rem modified for commodore-64
1017 rem by w. m. strome
1020 rem west humber c i
1030 rem march 1982
1035 rem revised february 1983
1040 dim a$(25),c$(255)
1042 poke53272,23:rem upper/lower case
1045 id=8:rem input 8-disk 1-tape
1050 od=8:rem output 8-disk 1-tape
1052 qc=204:ql=209:qh=210:qp=211:qq=212:wd=40:ls=25:sc=1024
1055 n$="file"
1070 print"[147][212]hinking... ":gosub1870
1100 cu=sc+wd*2:cr=sc+wd:cx=cr+(ls-1)*wd-3:ct=cr+(ls-2)*wd
1120 cm=sc+wd*2
1130 pokeqq,0:print"\[215]rite[146] \[211]ave \[204]oad \[208]rint";:pokeqc,0
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]";
1150 getc$:ifc$=""then1150
1160 c=asc(c$)
1170 cp=peek(ql)+256*peek(qh)+peek(qp):pokeqc,1:pokecp,peek(cp)and127
1180 ifcp>cmthencm=cp:ifcm>cxthencm=cx
1190 ifc$="\"then1460
1200 if(cand127)>31then1310
1210 if(c=13orc=141)andcp<ct-wdthenpokeqc,1:c$=chr$(13):goto1310
1220 ifc$=""thenprint"";:pokeqc,0:goto1150
1230 ifc=20andcp>cu thenprint"[157]";:gosub1350:pokeqc,0:goto1150
1240 ifc=29then1310
1250 ifc=157andcp>cu then1320
1260 ifc=148andcp<cx thengosub1380:pokeqc,0:goto1150
1270 ifc$="[147]"then1410
1280 ifc$=""andcp<ct-2then1310
1290 ifc$="[145]"andcp>cu+wd-1then1320
1300 pokeqc,0:goto1150
1310 ifcp>cxthenpokeqc,0:goto1150
1320 printc$;:pokeqc,0
1330 ifc=34thenpoke qq,0
1340 goto1150
1350 fori=cp-1tocm:pokei,peek(i+1)
1360 nexti:cm=cm-1
1370 pokei,32:return
1380 fori=cm+1tocpstep-1:pokei,peek(i-1)
1390 nexti
1400 pokecp,32:cm=cm+1:return
1410 print"\[195]lear?([217]/[206])[146]\[211]ave \[204]oad \[208]rint";
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]";
1430 getc$:ifc$=""then1430
1440 ifc$<>"y"then1130
1450 print"[147]":goto1120
1460 pokeqq,0:print"\[215]rite \[211]ave \[204]oad \[208]rint";
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]";
1480 getcc$:ifcc$=""then1480
1482 ifcc$="p"then1790
1485 ifcc$="w"then1130
1490 ifcc$="s"then1525
1500 ifcc$="l"then1655
1520 goto1480
1525 ifid=8orod=8then gosub6000
1530 print"\[215]rite \[211]ave[146] \[204]oad \[208]rint";
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]";
1550 ln=int((cm-cr)/40)
1560 ifcm-cr=40then1130
1570 forl=1toln:a$(l)=""
1580 form=0towd-1:c=cr+wd*l+m
1590 ifc>cxthen1610
1600 a$(l)=a$(l)+c$(peek(c)):pokec,32:nextm,l
1610 print"":ifod=1thenopen3,1,1
1620 ifod=8thenopen3,8,3,"@0:"+n$+",s,w"
1630 print#3,ln;chr$(13);:forl=1toln:print#3,a$(l);:nextl
1640 close3
1645 print"[147]":forl=1toln:printa$(l);:nextl
1650 goto1460
1655 ifid=8orod=8then gosub6000
1660 print"\[215]rite \[211]ave \[204]oad[146] \[208]rint";
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]";
1680 ifid=1thenopen3,1,0
1690 ifid=8thenopen3,8,3,"0:"+n$+",s,r"
1700 print"";:input#3,ln
1710 forl=1toln
1720 form=1towd
1725 ifl=23andm>=wd-1then1750
1730 get#3,c$:printc$;:poke qq,0
1750 nextm,l
1760 close3
1770 cm=ln*40+cr:ifcm>cxthencm=cx
1780 goto1130
1790 print"\[215]rite \[211]ave \[204]oad \[208]rint[146]";
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]";
1810 open4,4,7
1820 ln=int(.5+(cm-cr)/40)
1830 forl=1toln:print#4,""tab(20);:ifpeek(53272)=23thenprint#4,"[147]";
1840 form=0to39:c=cr+40*l+m
1850 print#4,c$(peek(c));:nextm:print#4:nextl:print#4:print#4:close4
1860 goto1130
1870 fori=0to31:c$(i)=chr$(i+64):next
1885 fori=32to63:c$(i)=chr$(i):next
1890 fori=64to95:c$(i)=chr$(i+128):next
1900 fori=96to127:c$(i)=chr$(i+64):next
1910 return
6000 print" ";
6010 print"[215]hat is the file name";:gosub60000
6020 iflen(in$)=0then in$=n$:printn$:fori=1to500:next
6030 n$=in$:return
60000 rem input routine #1
60010 tf=20:tt=0:in$="":print"? [166][157]";
60020 getc$:tt=tt+1:iftt>tfthenprint" [157]";
60030 iftt>tf*2thenprint"[166][157]";:tt=0
60040 ifc$=""then60020
60050 le=len(in$)
60060 ifc$="[146]"andpeek(788)=88thenpoke788,85:goto60020:rem re-enable stop key
60070 if(asc(c$)and127)>31andc$<>chr$(34)andle<16then60110
60080 ifc$=chr$(13)then in=val(in$):print" ";:return
60090 ifc$=chr$(20)andle>0thenin$=left$(in$,le-1):print"[157][166] [157][157]";
60100 goto60020
60110 in$=in$+c$:printc$"[166][157]";:goto60020