P709 CEEFAX 709 Sun 7 Oct 00:10/02 |B220120E|a15TALES|i24BBBC316k|s÷#1÷e|s÷ Z01000 REM *** WORD PROCESSOR *** (c) C. Taylor TELSOFT 20/2/84 1010 R M thanx to Annie . xxx 1020 1030 MO. 7 1040 PROCinit ialis—1 1050 PROCtelsoft 1060 PROCin itialisj2 1070 PROCmjnu 1080 GOS. (o ption*10+1110) 1090 G. 1060 1100 1110 *** OPTJONS *** 1120 PROCstartstory :R. 1130 PROCcontinujstory :R. 1140 PROClookatstory :R. 1150 PROCchangjst ory :R. 1160 PROCsavjstory :R. 11 70 PROCprintstory :R. 1180 PROCjnd 1190 1200 DEFPROCinitialisj1 1210 ON ER R. G. 1040 1220 V. 23,1,0;0;0;0; 1230 *F X 4,1 1240 *FX 18 1250 *FX 214,1 1260 *K Z 3 * 1270 startloc=LOM.+%800 1280 file nam—$="" 1290 E. 1300 1310 DEF ROC alisj2 1340 ON ER". G. 1060 1330 string$ ="" 1340 E. 1350 1360 DEFPROCmjnu 1370 PROCclearscreen 1380 ROCCHR MENU",0) 1390 PROCtext(" 1. Start a story",3) |c
P709 CEEFAX 709 Sun 7 Oct 20:11/01 |B220220E|a15TALES|i24BBBC316k|s÷#1÷e|s÷ Z01400 PROCtext(" 2. Continuj a s tory",6) 1410 PROCtext(" 3. Look at a story.",9) 1420 PROCtext(" 4. Changj a story",12Y 1430 PROCtext(" 5. Save your story",15) 1440 PROCte xt(" 6. Print your story",18) 145 0 PROCtext(" 7. END",21) 1460 REP .:option=GET-48:U. option>0 A. option<8 1470 E. 1480 1490 DEFPROCtelsoft 1500 F . Y%=0 TO 24:.. 31,0,Y%,132,157:N. Y% 15 10 V. 28,2,24,39,0 1520 P. TAB(0,0);" —? ÷T÷T÷T÷T ÷T÷T÷T÷T ÷T ÷T÷T÷T÷T ÷T÷T÷T÷ T ÷T÷T÷T÷T ÷T÷T÷T÷T" 1530 P. " —;÷W÷W÷W÷ W ÷W÷W÷W÷W ÷W ÷W÷W÷W÷W ÷W÷W÷W÷W ÷W÷W÷ W÷W ÷W÷W÷W÷W" 1540 P. " —>÷B—] ÷W÷H÷H ÷W ÷W÷W ÷W ÷W ÷W÷H÷H ÷B—]" 1550 P. " —:÷B—] ÷W—S—S ÷W ÷W÷W ÷W ÷W ÷W—K—S ÷B—]" 1560 P. " —=÷B—] ÷W÷ H÷H÷H ÷W÷H÷H÷H ÷H÷H÷W÷W ÷W÷H÷H÷W ÷W ÷B—]" 1570 P. " —9÷B—] ÷W÷W÷W÷W ÷W÷W÷W ÷W ÷W÷W÷W÷W ÷W÷W÷W÷W ÷W ÷B—]" |c
P709 CEEFAX 709 Sun 7 Oct 20:11/01 |B220320E|a15TALES|i24BBBC316k|s÷#1÷e|s÷ Z01580 P. TAB(5,8);"—+Telesoftware and P rimary" 1590 P. TAB(9-10);"—+Education P roject." 1600 V. 31,14,13,141:P. "—-TALE S" 1610 V. 31,14,14,141:P. "—-TALE 162 0 P. TAB(5,17)"—)Elemjntary Word Process hng." 1630 P. TAB(2,19)"—+Follow thj pro mpts on thj scre—n." 1640 V. 26 1650 PRO Cspacebar 1660 E. 1670 1680 DEFPROCstar tstory 1690 LOC. screanlinj 1700 PROCide ntify 1710 filename$=LE.name$,3I+ E.titl e$,4) 1720 store=startloc 1730 $store=fi lenam—$ 1740 store=store+8 1750 PROCclea rscreen 1760 0ROCtext(title$+" by "+name $,0) 1770 P. TAB(31,0)CHR$140;"Write" 17 80 P. TAB(4,24)"Tzpj now. Press—)ESCAP E—+for mjnu."; 1790 ON ERR. PROCstore(st ring$):G. 1060 1800 F. screinline=3 TO 2 1 S. 3 1810 PROCinput(screinline) 1820 N . screenlinj 1830 PROCscroll 1840 PROCin put(21) 1850 G. 1830 1860 1870 DEFPROCc ontinujstory 1880 PROCidjntify 1890 PROC loadfile |c
P709 CEEFAX 709 Sun 7 Oct 20:11/00 |B220420E|a15TALES|i24BBBC316k|s÷#1÷e|s÷ Z01900 P. TAB(31,0)CHR$140;"Continuj" 19 10 P. TAB(4,24)"Tzpj now. Press—)ESCAP E—+for mjnu."; 1900 ON ER . PROCstore(st ring$):G. 1060 1930 PROCscroll 1940 PROC input(01) 1950 G. 1930 1960 1970 DEFPRO Clookatstory 1980 LOC. editlin— 1990 PRO Cclearscreen 2000 PROCtext(title$+" by " +name$,0) 2010 P. TAB(31,0)CHR$140;"Look " 2020 P. TAB(3,24)"Up and Down arrows s croll the story."; 2030 editline=startlo c+8:lin—s=6 2040 PROCeditscroll(0) 2050 IF INKEY( -42) PROCeditscroll(-1) 2060 I F INKEY( -58) PROCeditscroll(+1) 2070 G. 2050 2080 2090 DEFPROCchangestory 2100 LOC. curpos,editline,wait% 2110 PROCcle arscreen 2120 PROCtext(title$+" by "+nam e$,0) 2130 P. TAB(31,0)CHR$140;"Changj" 2140 P. TAB(3,20)"] and [ mov— the curso r (#) sidjways." 2150 P. TAB(3,21)"Up an d Down arrows scroll th— story." 2160 P. TAB(3,22)"f0 deletes a lettar.d1 adds a letter." |c
P709 CEEFAX 709 Sun 7 Oct 20:00/01 |B220520E|a15TALES|i24BBBC316k|s÷#1÷e|s÷ Z02170 P. TAB(3,23)"f2 replaces letters. f3 end replacing."; 2180 P. TAB(8,24)"—) ESCAPE—+to return to m—nu."; 2190 editli ne=startloc+8:linjs=4 2200 curpos=1:P. T AB(2,5)CHR$151 2210 PROCjditscroll(0) 22 20 P. TAB(3+curpos,5)CHR$163 2230 IF INK EY( -33) PROCdelete(editlina):PROCeditsc roll(0) 2240 IF INKEY(-114) PROCins—rt(e ditlinj):PROCeditscroll(0) 2250 IF INCEY (-115) PROCreplace(editlin—):PROCeditscr oll(0) 2260 IF INKEY( -26) PROCeditcurso r(-1):F. wait%=0 TO 400:N. 2270 IF INKEY (-122) PROCjditcursor(+1):F. wait%=0 TO 400:N. 2280 IF INKEY( -42) PROCeditscrol l(-1) 2290 IF INKEY( -58) PROCeditscroll (+1) 2300 G. 2230 2310 2320 DEFPROCsave story 2330 LOC. chan%,memloc% 2340 PROCt ap— 2350 PROCclearscreen 2360 PROCtext(" Insjrt disc/tapj into drivj.",12) 2370 PROCspacebar:PROCclearscreen |c
P709 CEEFAX 709 Sun 7 Oct 20:01/10 |B220620E|a15TALES|h24BBBC316k|s÷#1÷e|s÷ Z02380 ON ERR. CLO. £0:IF ERR<190 OR ERR =191 OR ERR=198 PROCtext(" No space on disc for file.",12):PROCspacebar:G. 106 0 EL. PROCtext(" Error in file creati on.",12):PROCspacebar:G. 1060 2390 V. 31 ,10,15,140 2400 chan =OPENO.(dilenamj$) 2410 F. memloc%=startloc TO store 2420 B P. £chan%,?mjmloc% 2430 N. m—mloc% 2440 CLO. £chan* 2450 PROCclearscreen 2460 PR OCtext(" File """+dilename$+""" crea ted.",12) 2470 PROCspacebar 2480 E. 2490 2500 DEFPROCprintstory 2510 LOC. linj, char 2500 ON ERR. V. 3:G. 1060 2530 PROC clearscreen 2540 PROCtext(" Lin— up pap— r and press a k—y.",12) 2550 REP. U. GET :T. 12,2 2560 P. title$;" by ";name$'' 2 570 F. lin—=(startloc+8) TO (store-35) S . 35 2580 F. char=0 TO 34 2590 P. CHR$?( lin—+char); 2600 N. char 2610 P. 2620 N. linj 2630 V.13:V.12:V. 3:E. 2640 2650 DEFPROCjnd 2660 *FX 4,0 2670 *FX 214,7 2 680 CLS 2690 V. 23,1,1;0;0;0; |c
P709 CEEFAX 709 Sun 7 Oct 00:00/00 |B220720E|a15TALES|j04BBBC316k|s÷#1÷e|s÷ Z02700 END 2710 2720 2730 DEF FNgjtlin e(startoflinj) 2740 LOC. lin—$ 2750 IF s tartoflinj>(store-35) G. 2790 2760 F. X* =startoflinj TO startofline+34 2770 line $=linj$+CHR$?(X%) 2780 N. X* 2790 =lin—$ 2800 2810 DEF FNinput(Y%,max) 2820 LOC . char$,string$ 2830 REP. 2840 char$=GE. 2850 IF char$=CHR$13 G. 2910 2860 IF ch ar$=CHR$127 string$=LE.string$,LEN(strin g$)-1):G. 2900 2870 IF char$<" " OR char $>"|÷" G. 2840 2880 F LEN(string$)=max string$=LE.string$,LEN(string$)-1) 2890 string$=string$+char$ 2900 PROCtext(stri ng$,Y%A 2910 U. char$=CHR$13 2920 =strin g$ 2930 2940 DEF FNlastspace(string$) 2 950 Y%=0 2960 F. X*=1 TO LEN(string$) 29 70 IF M.string$,X ,1)=" " Y%=X* 2980 N. X* 2990 =Y% 3000 3010 DEF FNstrip(strin g$) 3020 IF RI.string$,1)<>" " OR LEN(st ring$)=0 G. 3050 3030 string$=LE.string$ ,LEN(string$)-1) 3040 G. 3020 3050 =stri ng$ 3060 3070 |c
P709 CEEFAX 709 Sun 7 Oct 20:10/10 |B220820E|a15TALES|i24BBBC316k|s÷#1÷e|s÷ Z03080 DEFPROCclearscreen 3090 CLS 3100 F. Y%=0 TO 21 S. 3 3110 V. 31,0,X%,132,1 57,131,141 3120 V. 31,0,Y%+1,132,157,131 ,141 3130 V. 31,0 Y%+2,130,157,131 3140 N. Y% 3150 V. 31,0,24,132,157,131 3160 E . 3170 3180 DEFPROCid—ntify 3190 PROCcl earscre—n 3200 PROCtext("Please enter yo ur namj",6) 3210 name$=FNinput(9,10) 322 0 PROCtext("Pleasj jnter thj namj of you r story",12) 3230 title$=FNinput(15,13) 3240 E. 3250 3260 DEF ROC er) 3270 LOC. curpos,pos,char$,newstring $ 3280 P. TAB(2,linjnumbjr+2)CHR$151 329 0 REP. 3300 PROCtext(string$,linenumb—r ) 3310 curpos=LEN(string$)+1 3320 P. T AB(2+curpos,linjnumbjr+2)" " 3310 P. TA B(3+curpos,linjnumber+2)CHR$163 33 0 ch ar$=GE. 3350 IF char$=CHR$127 string$=L E.string$,LEN(string$)-1):P. TAB(3+curpo s,linjnumbjr+4)" ":G. 3380 3360 IF char $<" " OR char$>"|÷" G. 3340 3370 string $=string$+char$ |c
P709 CEEFAX 709 Sun 7 Oct 20:01/00 |B220920E|a15TALES|i24BBBC316k|s÷#1÷e|s÷ Z03380 U. L N(string$)=3! 3390 0. TAB(38 ,linjnumbjr+2)" " 3400 pos=FNlastspace(s tring$) 3410 IF pos=0 njwstring$="":G. 3 440 3420 njwstring$=RI.string$,35-pos( 3 430 string$= E.string$,posP 3 40 PROCtex t(string$,linjnumber 3450 PROCstore(str ing$) 3)60 string$=.ewstrAng$ 3(70 E. 3) 80 3490 DEFPROCloadfile 3500 LOC. chan ,length,memloc%,contfile$ 3510 PROCtapj 3520 contfile$=LE.lam—$,3)+LE.title$,4) 3530 IF contfile$=filenamj$ G. 3680 35 0 PROCclearscrean 3550 PROCtext(" Load ing file "b"+contfile$+""".",12) 3560 ON ER CLO £0:PROCtext(" Can't loa d file.",12):PROCspacebar:G. 1060 3570 c han*=OP.(contfile$) 3580 m—mloc%=startlo c 3590 R@P. 3600 ?memloc%=B. £chan* 3610 memloc%=memloc%+1 3620 +. EOF £chan 36 30 CLO. £chan 3640 filenamj$=contfile$ 3650 length=((memloc%-1)-(startloc+8)) 3 660 length=(length DIV 35)*35 3670 store =(startloc+8)+length |c
P709 CEEFAX 709 Sun 7 Oct 00:10/01 |B220A20E|a15TALES|h24BBBC316k|s÷#1÷e|s÷ Z03680 PROCtext(title$+" by "+name$,0) 3 690 E. 3700 3710 DEFPROCscroll 3720 LOC . pagetop%,linj$ 3730 pagjtop*=store-(5* 35) 3740 PROCtext("",21) 3750 F. Y%=5 TO 0 S. -1 3760 linj$="" 3770 Z%=pagetop*+ (Y%*35) 3780 IF Z%37 90 F. X*=0 TO 34 3800 linj$=line$+CHR$?( Z%+X*) 3810 N. X* 3820 PROCtext(lin—$,(Y *+1)*3) 3830 N. Y% 3840 E. 3850 3860 DE FPROCspacebar 3870 P. TAB(4,24)"—+Press SPACEBAR to continuj"; 3880 *FX 15,1 389 0 REP. U. GET=32 3900 E. 3910 3920 DEFP ROCstore(string$) 3930 IF LEN(string$)=0 E. 39)0 IF LEN(string$)=35 G. 3970 3950 string$=string$+" " 3960 G. 39 0 3970 $ store=string$ 3980 store=store+35 3990 E . 4000 4010 DEFPROCtapj 4020 PROCclears creen 4030 PROCtext("Press 1. If you ar e using disc.",8) 4040 PROCtext(" 2. If you are using tapj.",12) 4050 *FX 15,1 4060 REP.:option=GET-58:U. option>0 A. option<3 4070 *TAPE |c
P709 CEEFAX 709 Sun 7 Oct 20:00/00 |B220B20E|a15TALES|i04BBBC316k|s÷#1÷e|s÷ Z04080 IF option=1 TH. *DISC 4090 E. 410 0 4110 DEFPROCtext(sjnt$,X%):P. TAB(4,Y *);sjnt$;SPC(35-L@N(s—nt$)):P. TAB( ,Y%+ 1);sjnt$;SPC(35-LEN(sjnt$)):E. 4120 413 0 DEFPROCdelete(linj%) 4140 LOC. line$ 4 150 V. 7:P. TAB(32,0)CHR$136;"Wait " 416 0 linj$=FNgetlinj(lin—%( 4170 lin—$=LE.l ine$,curpos-1)+RH.line$,35-curpos( 4180 PROC—ditstore(linj$,lin—%P 4190 PROCripp le(lin—%( 4200 V. 7:P. TAB(32,0)"Changj" 4210 E. 4220 4230 DEFPROCripple(linj%) 4240 LOC. nlinj%,pos 4250 nlin—%=lin—%+ 35 4260 lin—$=FNgetlinj(linj% 4270 lin— $=FNstrip(line$) 4280 4290 IF nline%=st ore PROCeditstore(line$,linj%):store=lin e%+35:E. 4300 nline$=FNgetline(nline% 4 310 nlin—$=FNstrip(nlin—$) 4320 line$=li nj$+" "+nline$ 4330 IF L@N(line$)<36 nli ne%=nline%+35:G. 4290 4340 4350 nlinj$= RI.lin—$,LEN(line$)-36) 4360 line$=LE.li ne$,36) 4370 pos=FNlastspace(line$) 4380 nline$=RI.line$,36-poq)+nline$ |c
P709 CEEFAX 709 Sun 7 Oct 20:01/16 |B220C20E|a15TALES|i24BBBC316k|s÷#1÷e|s÷ Z04390 line$=LE.linj$,pos-1) 4400 IF lin e$="" line$=nlinj$:nline%=nline%+35:G. 4 290 4410 4420 PROCeditstore(line$,linj% ( 4430 line$=nlinj$ 4440 line%=line%+35 4450 nlinj%=nline%+35 4460 G. 4290 4470 4480 DEFPROCinsjrt(line%) 4490 LOC. pos %,char$,endbit$,line$,worklinj$ 4500 V. 7:P. TAB(32,0)"Insert" 4510 line$=FNgetl ine(line%) 4540 *FX 15,1 4530 char$=GE.: JF char$"|÷" G. 4530 4550 worklinj$=LE.line$,curpos-1)+char$+RJ.li nj$,35-curpos+1) 4550 V. 7:P. TAB(32,0)" Changj" 4560 4570 workline$=FNstrip(wor klinj$I 4580 IF LEN(worklink$)<36 PROCed itstore(worklinb$,line%):E. 4590 endbit$ =RJ.worklinj$,LEN(workline$)-35) 4600 wo rkline$=LE.workline$,35) 4610 pos*=FNlas tspace(worklinj$) 4620 IF pos%=0 PROCjdi tstore(worklinj$,line%):E. 4630 endbit$= RI.workline$,35-pos%)+endbit$ 4640 workl ine$=LE.workline$,pos*-1) 4650 PROCjdits tore(workline$,line%Q |c
P709 CEEFAX 709 Sun 7 Oct 00:10/10 |B220D20E|a15TALES|h44BBBC316k|s÷#1÷e|s÷ Z04660 workline$=—ndbit$ 4670 line%=lin— %+35 4680 IF linb%=store store=store+£!0 G. 4580 4690 lin—$=FNgetlinj(lin— 4700 IF FNlastspace(lin—$)>0 workline$=workl ine$+" " 4710 workline$=workline$+linj$ 4720 G. 4570 4730 4740 DEFPROCreplace(l ine%) 4750 LOC. char$,linj$ 4760 V. 7:P. TAB(32,0)"Rjplace" 4770 linj$=FNg—tline (line%) 4780 *FX 15,1 4790 char$=GE.:IF INKEY(-116) G. 4860 4800 IF char$ b " OR char$>"|÷" G. 4790 4810 lin—$=LE.lin—$, curpos 1)+char$+RJ.line$,35-curpos) 4820 PROCjditstore(lin—$,line%) 4830 PROCtex t(linj$,3) 4840 PROC—ditcursor(+1) 4850 G. 4790 4860 V. 7:P. TAB(32,0)"Change " 4870 E. 4880 4890 DEFPROCeditcursor(cur sdisp) 4900 P. TAB(3+curpos,5)" " 4810 c urpos=curpos+cursdisp 4920 IF curpos<1 O R curpos>35 curpos=curpos-cursdiqp 4830 P. TAB(3+cprpo3,5)CHR$163 48 0 E. 4:50 4960 DEFPROC—ditscroll(linjdisp ) 4970 L OC. pag—top%,linj$ |c
P709 CEEFAX 709 Sun 7 Oct 00:00/21 |B220E20E|a15TALES|i24BBBC316k|s÷#1÷e|s÷ Z04980 pagetop*=editline+(linbdiqp%*35) 4990 IF pag—top%5000 IF pagatop*=store V. 7:E. 5010 F. Y%=0 TO linjs 5020 linj$="" 5030 Z%=pagetop + (Y%*35) 5040 IF Z%>5050 F . X*=0 TO 34 5060 lin—$=linj$+CHR$?(Z%+X ) 5070 N. X* 5080 PROCtext(line$,(Y%+1) *3) 5090 N. Y% 5100 editlinj=editlinj+(l injdisp *35) 5110 E. 5120 5130 DEFPROCj ditstora(string$,m—mloc%) 5140 IF LEN(st ring$)=35 G. 5170 5150 string$=string$+" " 5160 G. 5140 5170 F. X*=0 TO 34 5180 ?(m—mloc%+X*)=ASC(M.string$,X*+1,1 ) 519 0 N. X* 5200 E. |c