Home » CEEFAX disks » telesoftware5.adl » 07-02-88/LISTER3 » Compare

Compare 07-02-88/LISTER3 with 07-02-88/LISTER2

File: CEEFAX disks » telesoftware5.adl » 07-02-88/LISTER3
Compared with: CEEFAX disks » telesoftware5.adl » 07-02-88/LISTER2
Similarity: 51% of bytes duplicated

265 of 428 lines (75.0%) are identical in the two listings. Duplicated Different

Line numbers are ignored when comparing lines, so that renumbered programs still match.

07-02-88/LISTER3 07-02-88/LISTER2
10REM BASIC PROGRAM LISTER 10REM BASIC PROGRAM LISTER
20REM This program will list any 20REM This program will list any
30REM BASIC program from disc/net to 30REM BASIC program from disc/net to
40REM screen or printer. It will 40REM screen or printer. It will
50REM properly indent program lines, 50REM properly indent program lines,
60REM split multiple statements, 60REM split multiple statements,
70REM split and indent IF statements 70REM split and indent IF statements
80REM and emphasise the DEFinitions 80REM and emphasise the DEFinitions
90REM of all procedures and 90REM of all procedures and
100REM functions. 100REM functions.
110 110
120REM (c) Derek Grainge 120REM (c) Derek Grainge
130REM 18th April , 1987 130REM 18th April , 1987
140REM Loretto School, Musselburgh 140REM Loretto School, Musselburgh
150 150
160 160
170REM set up section 170REM set up section
171REM Lines 190,200,240,300 180ON ERROR GOTO 1920
172REM are NET/ADFS - specific.
173REM Get rid of them if using disc.
174REM Line 200 refers to a program
175REM called PUTGET available
176REM through MUSE or SJ research.
180ON ERROR GOTO 1910
190*NET 190*NET
200*PUTGET2 200*PUTGET2
210MODE7 210MODE7
220PRINT"SETTING UP. PLEASE WAIT ..." 220PRINT"SETTING UP. PLEASE WAIT ..."
230DIM A% 40 ,NAME$(127),linebuffer 256 230DIM A% 40 ,NAME$(127),linebuffer 256
240*DIR $ 240*DIR $
241REM The file called "FILE"
242REM contains a list of all the
243REM BASIC keywords. This avoids
244REM problems with differences
245REM between BASIC versions 1,2 etc
246REM However, In BASIC1 you will
247REM find that OPENIN appears as
248REM OPENUP. If this is a problem
249REM remove the REM on line 301.
250X=OPENUP("FILE") 250X=OPENUP("FILE")
260FOR I=0 TO 127 260FOR I=0 TO 127
270INPUT#X,NAME$(I) 270INPUT#X,NAME$(I)
280NEXT 280NEXT
290CLOSE#X 290CLOSE#X
300*NET 300*NET
301REM IF ?&8015=49 THEN NAME$(45)="OPENIN"
310indent=0:margin=6:fornext=0:repuntil=0:space=32:return=13:remark=&F4:quote=34:comma=44:for=&E3:repeat=&F5:until=&FD:next=&ED:lineno=141:define=221:printable=127:colon=58:then=&8C:else=&8B 310indent=0:margin=6:fornext=0:repuntil=0:space=32:return=13:remark=&F4:quote=34:comma=44:for=&E3:repeat=&F5:until=&FD:next=&ED:lineno=141:define=221:printable=127:colon=58:then=&8C:else=&8B
320if=&E7:test1$=CHR$(quote)+CHR$(remark)+CHR$(for)+CHR$(else)+CHR$(repeat)+CHR$(next)+CHR$(until) 320if=&E7:test1$=CHR$(quote)+CHR$(remark)+CHR$(for)+CHR$(else)+CHR$(repeat)+CHR$(next)+CHR$(until)
330test2$=CHR$(then)+CHR$(if)+CHR$(else)+CHR$(colon) 330test2$=CHR$(then)+CHR$(if)+CHR$(else)+CHR$(colon)
340single=1:double=2 340single=1:double=2
350 350
360 360
370REM THE MAIN PROGRAM REPEATS ITSELF 370REM THE MAIN PROGRAM REPEATS ITSELF
380REPEAT 380REPEAT
390REM CHOOSE A DIRECTORY 390REM CHOOSE A DIRECTORY
391REM To select a different directory
392REM just type in its name. If you
393REM are happy with the current one,
394REM press return.
395REM If you are using the DFS there's
396REM is no point in doing all this,
397REM so delete lines 400 to 450.
400*DIR 400*DIR
410REPEAT 410REPEAT
420*CAT 420*CAT
430INPUT"WHICH DIRECTORY",A$ 430INPUT"WHICH DIRECTORY",A$
440IF A$<>"" THEN PROCoscli("DIR "+A$) 440IF A$<>"" THEN PROCoscli("DIR "+A$)
450UNTIL A$="" 450UNTIL A$=""
460REM CHOOSE A PROGRAM 460REM CHOOSE A PROGRAM
470CLS:*CAT 470CLS:*CAT
480INPUT"NAME OF PROGRAM",P$:P%=linebuffer 480INPUT"NAME OF PROGRAM",P$:P%=linebuffer
490REM CHOOSE OUTPUT PARAMETERS
491REM 1. You can start from any line
492REM in the program by typing a
493REM line number.
494REM 2. I have arbitrarily limited
495REM the printing width to lie
496REM between 20 and 78. Change
497REM these if you wish.
498REM 3. Any word starting with Y
499REM will switch the printer on.
500INPUT"STARTING AT LINE NO",startno 490INPUT"STARTING AT LINE NO",startno
500REM CHOOSE OUTPUT PARAMETERS
510INPUT''"WIDTH OF LISTING ON SCREEN OR PAPER",R% 510INPUT''"WIDTH OF LISTING ON SCREEN OR PAPER",R%
520IF R%<20 OR R%>78 THEN GOTO 510 520IF R%<20 OR R%>78 THEN GOTO 510
530INPUT ''"PRINTER ON (Y/N) ",Y1$ 530INPUT ''"PRINTER ON (Y/N) ",Y1$
540IF LEFT$(Y1$,1)="Y" THEN INPUT"ECONET PRINTER (Y/N)",Y2$ ELSE Y2$="N" 540IF LEFT$(Y1$,1)="Y" THEN INPUT"ECONET PRINTER (Y/N)",Y2$ ELSE Y2$="N"
550*FX 5,1 550*FX 5,1
560IF LEFT$(Y2$,1)="Y" THEN *FX 5,4 560IF LEFT$(Y2$,1)="Y" THEN *FX 5,4
570PRINT''''' 570PRINT'''''
580IF LEFT$(Y1$,1)="Y" THEN VDU 2,1,27,1,40 580IF LEFT$(Y1$,1)="Y" THEN VDU 2,1,27,1,40
581REM The VDU sequence 1,27,1,40 590IF R%<40 THEN MODE 7 ELSE MODE 3
582REM selects NLQ printing on my
583REM CANON. Stick in your own
584REM code to select your
585REM preferred printing style.
590REM IF R%<40 THEN MODE 7 ELSE MODE 3
591REM If you remove all the REM state-
592REM ments there will probably be
593REM enough room for the program
594REM to run in a mode with 80
595REM characters to the line. In
596REM which case, remove the REM from
597REM line 590, but leave the IF
598REM statement behind!
600 600
610REM THE MAIN PROGRAM ITSELF 610REM THE MAIN PROGRAM ITSELF
611REM Open the file, and process each
612REM line until we reach the end.
614margin=6:fornext=0:repuntil=0 620margin=6:fornext=0:repuntil=0
615decode=TRUE:mode=single 630decode=TRUE:mode=single
620PRINT'P$' 640PRINT'P$'
630theend=FALSE 650theend=FALSE
640X=OPENUP(P$) 660X=OPENUP(P$)
650REPEAT 670REPEAT
660PROCloadline(linebuffer) 680PROCloadline(linebuffer)
670PROCcheck(linebuffer) 690PROCcheck(linebuffer)
680IF (NOT theend) AND highenough THEN PROClistline(linebuffer+4) 700IF (NOT theend) AND highenough THEN PROClistline(linebuffer+4)
690UNTIL theend 710UNTIL theend
700CLOSE#X 720CLOSE#X
710PRINT'' 730PRINT''
720IF Y2$="N" THEN VDU 1,12 740IF Y2$="N" THEN VDU 1,12
730VDU 3 750VDU 3
740 760
750REM ANOTHER GO ? 770REM ANOTHER GO ?
751REM The program repeats until you
752REM reply with a word starting with
753REM N.
760INPUT''"ANOTHER GO",Y$ 780INPUT''"ANOTHER GO",Y$
770UNTIL LEFT$(Y$,1)="N" 790UNTIL LEFT$(Y$,1)="N"
780END 800END
790REM END OF MAIN PROGRAM 810REM END OF MAIN PROGRAM
800 820
810 830
820REM CHECK A LINE FOR LEGALITY 840REM CHECK A LINE FOR LEGALITY
821REM The 1st char must be 13, and
822REM the 2nd less than 128. Check
823REM if within range for listing.
824REM Calculate the correct margin
825REM and print the line number.
830 850
840DEFPROCcheck(A%) 860DEFPROCcheck(A%)
850IF ?A%<>13 THEN theend=TRUE:VDU 3:PRINT"ILLEGAL BASIC STORAGE":ENDPROC 870IF ?A%<>13 THEN theend=TRUE:VDU 3:PRINT"ILLEGAL BASIC STORAGE":ENDPROC
860IF A%?1>127 THEN theend=TRUE:ENDPROC 880IF A%?1>127 THEN theend=TRUE:ENDPROC
870highenough=TRUE 890highenough=TRUE
880IF (A%?1)*256+A%?2<startno THEN highenough=FALSE:ENDPROC 900IF (A%?1)*256+A%?2<startno THEN highenough=FALSE:ENDPROC
890@%=5:margin=6+2*fornext+2*repuntil:IF margin<6 THEN margin=6 910@%=5:margin=6+2*fornext+2*repuntil:IF margin<6 THEN margin=6
900PRINT(A%?1)*256 + (A%?2) ;STRING$(margin-5," ");:@%=0:Q%=margin 920PRINT(A%?1)*256 + (A%?2) ;STRING$(margin-5," ");:@%=0:Q%=margin
910mode=single 930mode=single
920ENDPROC 940ENDPROC
930 950
940 960
950REM PRINT A PROGRAM LINE 970REM PRINT A PROGRAM LINE
951REM B% points the the line's text.
952REM Reset indent because IF state-
953REM ments are only indented while
954REM on the current line.
955REM calculate the line length.
956REM Calculate the margin and
957REM print each statement until
958REM finished.
960 980
970DEFPROClistline(B%) 990DEFPROClistline(B%)
980indent=0 1000indent=0
990L%=?(B%-1)-4 1010L%=?(B%-1)-4
1000K%=-1 1020K%=-1
1010margin=6+2*fornext+2*repuntil:IF margin<6 THEN margin=6 1030margin=6+2*fornext+2*repuntil:IF margin<6 THEN margin=6
1020Q%=margin 1040Q%=margin
1030REPEAT 1050REPEAT
1040PROCstatement 1060PROCstatement
1050UNTIL K%>=L%-1 1070UNTIL K%>=L%-1
1060PRINT 1080PRINT
1070ENDPROC 1090ENDPROC
1080 1100
1090 1110
1100REM PRINT ONE PROGRAM STATEMENT 1120REM PRINT ONE PROGRAM STATEMENT
1101REM Deal with each program state-
1102REM ment. BASIC doesn't have a
1103REM CASE statement , so ON .. GOTO
1104REM is the most efficient way of
1105REM selecting options.
1110 1130
1120DEF PROCstatement 1140DEF PROCstatement
1130PROCstripspaces 1150PROCstripspaces
1150REPEAT 1160REPEAT
1160PROCnextchar 1170PROCnextchar
1170a=INSTR(test1$,CHR$(char)) 1180a=INSTR(test1$,CHR$(char))
1180ON a+1 GOTO 1260,1190,1200,1210,1220,1230,1240,1250 1190ON a+1 GOTO 1270,1200,1210,1220,1230,1240,1250,1260
1181REM line 1190 deals with a quote, 1200PROCtext:GOTO 1340
1182REM 1200 with REM, 1210 with FOR 1210PROCrem:GOTO 1340
1183REM 1220 with THEN, 1230 with 1220fornext=fornext+1:PROCprint(space,decode):PROCprint(space,decode):GOTO 1270
1184REM REPEAT, 1240 with NEXT, and 1230indent=indent-2:PROCstartline:GOTO 1270
1185REM 1150 with UNTIL. 1240repuntil=repuntil+1:PROCprint(space,decode):PROCprint(space,decode):GOTO 1270
1190PROCtext:GOTO 1320 1250PROCcheck_commas:GOTO 1270
1200PROCrem:GOTO 1320
1210fornext=fornext+1:PROCprint(space,decode):PROCprint(space,decode):GOTO 1260
1220indent=indent-2:PROCstartline:GOTO 1260
1230repuntil=repuntil+1:PROCprint(space,decode):PROCprint(space,decode):GOTO 1260
1240PROCcheck_commas:GOTO 1260
1250repuntil=repuntil-1:IF repuntil<0 THEN repuntil=0 1260repuntil=repuntil-1:IF repuntil<0 THEN repuntil=0
1260IF char=lineno THEN PROClineno(B%+K%+1) ELSE PROCprint(char,decode) 1270IF char=lineno THEN PROClineno(B%+K%+1) ELSE PROCprint(char,decode)
1270a=INSTR(test2$,CHR$(char)) 1280a=INSTR(test2$,CHR$(char))
1280ON a+1 GOTO 1320,1310,1290,1300,1305 1290ON a+1 GOTO 1340,1330,1300,1310,1320
1281REM 1290 deals with IF, 1300 with 1300indent=indent+2:GOTO 1340
1282REM ELSE, 1310 THEN, 1305 colon
1290indent=indent+2:GOTO 1320
1300indent=indent+2 1310indent=indent+2
1305IF a=4 THEN PROCstripspaces:IF K%>=L%-1 THEN 1320 1320IF a=4 THEN PROCstripspaces:IF K%>=L%-1 THEN 1340
1310PROCstartline 1330PROCstartline
1320UNTIL K%>=L%-1 OR char=colon 1340UNTIL K%>=L%-1 OR char=colon
1330ENDPROC 1350ENDPROC
1340 1360
1350 1370
1360REM EXECUTE A * INSTRUCTION 1380REM EXECUTE A * INSTRUCTION
1361REM A% point to a small text
1362REM buffer where the * command
1363REM is placed.
1370 1390
1380DEFPROCoscli(A$) 1400DEFPROCoscli(A$)
1390$A%=A$ 1410$A%=A$
1400X%=A% MOD 256 1420X%=A% MOD 256
1410Y%=A% DIV 256 1430Y%=A% DIV 256
1420CALL &FFF7 1440CALL &FFF7
1430ENDPROC 1450ENDPROC
1440 1460
1450 1470
1460REM DECODE A LINE NUMBER 1480REM DECODE A LINE NUMBER
1461REM Line numbers used by GOTO
1462REM GOSUB are stored in a
1463REM special format of a line
1464REM number flag followed by three
1465REM bytes. This is to avoid each
1466REM byte being >127 or <32 and
1467REM hence possibly being decoded
1468REM by BASIC as a control code or
1469REM a BASIC keyword!
1470 1490
1480DEFPROClineno(A%) 1500DEFPROClineno(A%)
1490LOCAL D1%,D2%,D3%,L 1510LOCAL D1%,D2%,D3%,L
1500D1%= ((A%?1)AND &3F) 1520D1%= ((A%?1)AND &3F)
1510D2%= ((A%?2)AND &3F) 1530D2%= ((A%?2)AND &3F)
1520D3%= (?A%) EOR &54 1540D3%= (?A%) EOR &54
1530L= D2%*256+D1%+(D3%AND 4)*256*16 +(D3% AND 48)*4 1550L= D2%*256+D1%+(D3%AND 4)*256*16 +(D3% AND 48)*4
1540IF Q%+LEN(STR$(L))*mode>R% THEN PROCstartline 1560IF Q%+LEN(STR$(L))*mode>R% THEN PROCstartline
1550PRINT L; 1570PRINT L;
1560K%=K%+3 1580K%=K%+3
1570Q%=Q%+LEN(STR$(L))*mode 1590Q%=Q%+LEN(STR$(L))*mode
1580ENDPROC 1600ENDPROC
1590 1610
1600 1620
1610REM CHECK A NEXT STATEMENT FOR COMMAS 1630REM CHECK A NEXT STATEMENT FOR COMMAS
1611REM A next statement may be
1612REM followed by one or more
1613REM variables, separated by commas.
1614REM By counting forwards through
1615REM the commas we know how many
1616REM NEXTs have beeen implied.
1617REM PS take care to avoid
1618REM 'outdenting' !
1620 1640
1630DEF PROCcheck_commas 1650DEF PROCcheck_commas
1640fornext=fornext-1 1660fornext=fornext-1
1650pos=K% 1670pos=K%
1660REPEAT 1680REPEAT
1670pos=pos+1 1690pos=pos+1
1680IF B%?pos=comma THEN fornext=fornext-1 1700IF B%?pos=comma THEN fornext=fornext-1
1690UNTIL B%?pos=colon OR pos=L%-1 OR B%?pos=return 1710UNTIL B%?pos=colon OR pos=L%-1 OR B%?pos=return
1700IF fornext<0 THEN fornext=0 1720IF fornext<0 THEN fornext=0
1710ENDPROC 1730ENDPROC
1720 1740
1730 1750
1740REM INDENT THE MARGIN THE CORRECT # OF SPACES 1760REM INDENT THE MARGIN THE CORRECT # OF SPACES
1741REM Used to split multiple state-
1742REM ments or long lines.
1743REM FOR/NEXT REPEAT/UNTIL and
1744REM IF/THEN/ELSE statements
1745REM are all indented by two spaces.
1746REM The effects of indenting an
1747REM IF statement are only effective
1748REM for the current program line.
1750 1770
1760DEF PROCstartline 1780DEF PROCstartline
1770PRINT 1790PRINT
1780IF indent<0 THEN indent=0 1800IF indent<0 THEN indent=0
1790margin=6+2*fornext+2*repuntil+indent 1810margin=6+2*fornext+2*repuntil+indent
1800IF margin<6 THEN margin=6 1820IF margin<6 THEN margin=6
1810PRINT STRING$(margin," "); 1830PRINT STRING$(margin," ");
1820Q%=margin 1840Q%=margin
1830PROCstripspaces 1850PROCstripspaces
1850mode=single 1860mode=single
1860ENDPROC 1870ENDPROC
1870 1880
1880 1890
1890REM ERROR SECTION 1900REM ERROR SECTION
1891REM Escape will cause an exit to
1892REM this section, as will an error
1893REM in the program - which will be
1894REM reported. You are asked if
1895REM you wish another go. Because
1896REM an error might happen while
1897REM setting things up, the program
1898REM will have to be RUN again if
1899REM the error happened there.
1900 1910
1910CLOSE#0 1920CLOSE#0
1920VDU 12,3 1930VDU 12,3
1930IF ERR<>17 THEN REPORT:PRINT" at line ";ERL 1940IF ERR<>17 THEN REPORT:PRINT" at line ";ERL
1940INPUT''"ANOTHER GO ?",Y$ 1950INPUT''"ANOTHER GO ?",Y$
1950IF LEFT$(Y$,1)="N" THEN END 1960IF LEFT$(Y$,1)="N" THEN END
1960IF ERL<370 THEN RUN 1970IF ERL<370 THEN RUN
1970GOTO 380 1980GOTO 380
1980 1990
1990 2000
2000REM GET A LINE FROM THE FILE 2010REM GET A LINE FROM THE FILE
2001REM The line format is char. 13
2002REM followed by line no (hi byte)
2003REM If the hi byte is >127 that
2004REM marks the end of the program.
2005REM If all is well, the line no
2006REM (lo byte) and line length
2007REM follow, and then the code for
2008REM that line of program.
2010 2020
2020DEFPROCloadline(buf) 2030DEFPROCloadline(buf)
2030LOCAL a,b 2040LOCAL a,b
2040a=BGET#X 2050a=BGET#X
2050?buf=a 2060?buf=a
2060b=BGET#X 2070b=BGET#X
2070buf?1=b 2080buf?1=b
2080IF a<>13 THEN ENDPROC 2090IF a<>13 THEN ENDPROC
2090IF b>127 THEN ENDPROC 2100IF b>127 THEN ENDPROC
2100buf?2=BGET#X 2110buf?2=BGET#X
2110a=BGET#X 2120a=BGET#X
2120buf?3=a 2130buf?3=a
2130FOR b=4 TO a-1 2140FOR b=4 TO a-1
2140buf?b=BGET#X 2150buf?b=BGET#X
2150NEXT b 2160NEXT b
2160buf?a=13 2170buf?a=13
2170ENDPROC 2180ENDPROC
2180 2190
2190 2200
2200REM IGNORE ANY LEADING SPACES 2210REM IGNORE ANY LEADING SPACES
2210REM AT THE START OF A LINE 2220REM AT THE START OF A LINE
2211REM The program organises its own
2212REM indentation so it ignores yours
2220 2230
2230DEF PROCstripspaces 2240DEF PROCstripspaces
2235IF Q%>margin THEN ENDPROC 2250IF Q%>margin THEN ENDPROC
2240REPEAT 2260REPEAT
2250K%=K%+1 2270K%=K%+1
2260UNTIL K%>=L%-1 OR B%?K%>space 2280UNTIL K%>L%-1 OR B%?K%>space
2265K%=K%-1 2290K%=K%-1
2270ENDPROC 2300ENDPROC
2280 2310
2290 2320
2300REM GET THE NEXT CHARACTER 2330REM GET THE NEXT CHARACTER
2301REM Return a space if off the end
2302REM of the line, or if the char.
2303REM was a control code. Thus many
2304REM unlistable programs are now
2305REM listable!
2310 2340
2320DEF PROCnextchar 2350DEF PROCnextchar
2330K%=K%+1 2360K%=K%+1
2340IF K%>L%-1 THEN char=space ELSE char=B%?K% 2370IF K%>L%-1 THEN char=space ELSE char=B%?K%
2350IF char<space THEN char=space 2380IF char<space THEN char=space
2360ENDPROC 2390ENDPROC
2370 2400
2380 2410
2390REM DEAL WITH A REM STATEMENT 2420REM DEAL WITH A REM STATEMENT
2391REM The rest of the line will be
2392REM treated as text, but it may
2393REM include BASIC keywords, which
2394REM have to be decoded.
2400 2430
2410DEF PROCrem 2440DEF PROCrem
2420PROCprint(char,decode) 2450PROCprint(char,decode)
2430REPEAT 2460REPEAT
2440PROCnextchar 2470PROCnextchar
2450IF char=quote THEN PROCtext ELSE PROCprint(char,decode) 2480IF char=quote THEN PROCtext ELSE PROCprint(char,decode)
2460UNTIL K%>=L%-1 2490UNTIL K%>=L%-1
2470ENDPROC 2500ENDPROC
2480 2510
2490 2520
2500REM DEAL WITH TEXT BETWEEN QUOTES 2530REM DEAL WITH TEXT BETWEEN QUOTES
2501REM print the first quote, then
2502REM keep on printing until the
2503REM end of the string is found.
2504REM Guard against missing quotes
2505REM at the end of line!
2506REM Double quotes are no problem -
2507REM we toggle out and in to text
2508REM mode again. Codes >128 are
2509REM teletext control - ignore them.
2510 2540
2520DEF PROCtext 2550DEF PROCtext
2530PROCprint(char,NOT decode) 2560PROCprint(char,NOT decode)
2540REPEAT 2570REPEAT
2550PROCnextchar 2580PROCnextchar
2560PROCprint(char,NOT decode) 2590PROCprint(char,NOT decode)
2570UNTIL K%>=L%-1 OR char=quote 2600UNTIL K%>=L%-1 OR char=quote
2580ENDPROC 2610ENDPROC
2590 2620
2600 2630
2610REM PRINT A CHARACTER OR 2640REM PRINT A CHARACTER OR
2620REM COMPRESSED CODE 2650REM COMPRESSED CODE
2621REM Logical variable decode
2622REM indicates whether in program
2623REM or text mode - teletext codes
2624REM >128 can clog up the printer,
2625REM so for neatness' sake, replace
2626REM them by spaces.
2627REM DEF PROC and FN statements are
2628REM printed double width, so be
2629REM careful about the line length.
2630 2660
2640DEF PROCprint(char,decode) 2670DEF PROCprint(char,decode)
2650LOCAL l,A$ 2680LOCAL l,A$
2660A$=CHR$(char) 2690A$=CHR$(char)
2670l=1 2700l=1
2680IF decode THEN IF char>printable THEN A$=NAME$(char-128):l=LEN(A$) 2710IF decode THEN IF char>printable THEN A$=NAME$(char-128):l=LEN(A$)
2690IF NOT decode THEN IF (char MOD 128)<space THEN A$=" " 2720IF NOT decode THEN IF (char MOD 128)<space THEN A$=" "
2700IF Q%+l*mode>R% THEN PROCstartline 2730IF Q%+l*mode>R% THEN PROCstartline
2710IF char=define THEN VDU 8,129:IF LEFT$(Y1$,1)="Y" THEN mode=double:VDU 1,32,1,14 2740IF char=define THEN VDU 8,129:IF LEFT$(Y1$,1)="Y" THEN mode=double:VDU 1,32,1,14
2720PRINT A$; 2750PRINT A$;
2730Q%=Q%+l*mode 2760Q%=Q%+l*mode
2740ENDPROC 2770ENDPROC
2750 2780
2760 2790