Home » CEEFAX disks » telesoftware8.adl » 08-07-88/LISTER1

08-07-88/LISTER1

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » CEEFAX disks » telesoftware8.adl
Filename: 08-07-88/LISTER1
Read OK:
File size: 1497 bytes
Load address: FFFF1B00
Exec address: FFFF8023
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10REM BASIC PROGRAM LISTER
   20REM This program will list any
   30REM BASIC program from disc/net to
   40REM screen or printer.   It will
   50REM properly indent program lines,
   60REM split multiple statements,
   70REM split and indent IF statements
   80REM and emphasise the DEFinitions
   90REM of all procedures and
  100REM functions.
  110 
  120REM     (c) Derek Grainge
  130REM     18th April , 1987
  140REM Loretto School, Musselburgh
  150 
  160 
  170REM set up section
  180ON ERROR GOTO 1820
  190REM This version customised for DFS
  200MODE7
  210PRINT"SETTING UP. PLEASE WAIT ..."
  220DIM A% 40 ,NAME$(127),linebuffer 256
  230X=OPENUP("FILE")
  240FOR I=0 TO 127
  250INPUT#X,NAME$(I)
  260NEXT
  270CLOSE#X
  280indent=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
  290if=&E7:test1$=CHR$(quote)+CHR$(remark)+CHR$(for)+CHR$(else)+CHR$(repeat)+CHR$(next)+CHR$(until)
  300test2$=CHR$(then)+CHR$(if)+CHR$(else)+CHR$(colon)
  310single=1:double=2
  320 
  330 
  340REM THE MAIN PROGRAM REPEATS ITSELF
  350REPEAT
  360REM CHOOSE A PROGRAM
  370CLS:*CAT
  380INPUT"NAME OF PROGRAM",P$:P%=linebuffer
  390INPUT"STARTING AT LINE NO",startno
  400REM CHOOSE OUTPUT PARAMETERS
  410INPUT''"WIDTH OF LISTING ON SCREEN OR PAPER",R%
  420IF R%<20 OR R%>78 THEN GOTO 410
  430INPUT ''"PRINTER ON (Y/N) ",Y1$
  440IF LEFT$(Y1$,1)="Y" THEN INPUT"ECONET PRINTER (Y/N)",Y2$ ELSE Y2$="N"
  450*FX 5,1
  460IF LEFT$(Y2$,1)="Y" THEN *FX 5,4
  470PRINT'''''
  480IF LEFT$(Y1$,1)="Y" THEN VDU 2,1,27,1,40
  490IF R%<40 THEN MODE 7 ELSE MODE 3
  500 
  510REM THE MAIN PROGRAM ITSELF
  520margin=6:fornext=0:repuntil=0
  530decode=TRUE:mode=single
  540PRINT'P$'
  550theend=FALSE
  560X=OPENUP(P$)
  570REPEAT
  580PROCloadline(linebuffer)
  590PROCcheck(linebuffer)
  600IF (NOT theend) AND highenough THEN PROClistline(linebuffer+4)
  610UNTIL theend
  620CLOSE#X
  630PRINT''
  640IF Y2$="N" THEN VDU 1,12
  650VDU 3
  660 
  670REM ANOTHER GO ?
  680INPUT''"ANOTHER GO",Y$
  690UNTIL LEFT$(Y$,1)="N"
  700END
  710REM END OF MAIN PROGRAM
  720 
  730 
  740REM CHECK A LINE FOR LEGALITY
  750 
  760DEFPROCcheck(A%)
  770IF ?A%<>13 THEN theend=TRUE:VDU 3:PRINT"ILLEGAL BASIC STORAGE":ENDPROC
  780IF A%?1>127 THEN theend=TRUE:ENDPROC
  790highenough=TRUE
  800IF (A%?1)*256+A%?2<startno THEN highenough=FALSE:ENDPROC
  810@%=5:margin=6+2*fornext+2*repuntil:IF margin<6 THEN margin=6
  820PRINT(A%?1)*256 + (A%?2) ;STRING$(margin-5," ");:@%=0:Q%=margin
  830mode=single
  840ENDPROC
  850 
  860 
  870REM PRINT A PROGRAM LINE
  880 
  890DEFPROClistline(B%)
  900indent=0
  910L%=?(B%-1)-4
  920K%=-1
  930margin=6+2*fornext+2*repuntil:IF margin<6 THEN margin=6
  940Q%=margin
  950REPEAT
  960PROCstatement
  970UNTIL K%>=L%-1
  980PRINT
  990ENDPROC
 1000 
 1010 
 1020REM PRINT ONE PROGRAM STATEMENT
 1030 
 1040DEF PROCstatement
 1050PROCstripspaces
 1060REPEAT
 1070PROCnextchar
 1080a=INSTR(test1$,CHR$(char))
 1090ON a+1 GOTO 1170,1100,1110,1120,1130,1140,1150,1160
 1100PROCtext:GOTO 1240
 1110PROCrem:GOTO 1240
 1120fornext=fornext+1:PROCprint(space,decode):PROCprint(space,decode):GOTO 1170
 1130indent=indent-2:PROCstartline:GOTO 1170
 1140repuntil=repuntil+1:PROCprint(space,decode):PROCprint(space,decode):GOTO 1170
 1150PROCcheck_commas:GOTO 1170
 1160repuntil=repuntil-1:IF repuntil<0 THEN repuntil=0
 1170IF char=lineno THEN PROClineno(B%+K%+1) ELSE PROCprint(char,decode)
 1180a=INSTR(test2$,CHR$(char))
 1190ON a+1 GOTO 1240,1230,1200,1210,1220
 1200indent=indent+2:GOTO 1240
 1210indent=indent+2
 1220IF a=4 THEN PROCstripspaces:IF K%>=L%-1 THEN 1240
 1230PROCstartline
 1240UNTIL K%>=L%-1 OR char=colon
 1250ENDPROC
 1260 
 1270 
 1280REM EXECUTE A * INSTRUCTION
 1290 
 1300DEFPROCoscli(A$)
 1310$A%=A$
 1320X%=A% MOD 256
 1330Y%=A% DIV 256
 1340CALL &FFF7
 1350ENDPROC
 1360 
 1370 
 1380REM DECODE A LINE NUMBER
 1390 
 1400DEFPROClineno(A%)
 1410LOCAL D1%,D2%,D3%,L
 1420D1%= ((A%?1)AND &3F)
 1430D2%= ((A%?2)AND &3F)
 1440D3%= (?A%) EOR &54
 1450L= D2%*256+D1%+(D3%AND 4)*256*16 +(D3% AND 48)*4
 1460IF Q%+LEN(STR$(L))*mode>R% THEN PROCstartline
 1470PRINT L;
 1480K%=K%+3
 1490Q%=Q%+LEN(STR$(L))*mode
 1500ENDPROC
 1510 
 1520 
 1530REM CHECK A NEXT STATEMENT FOR COMMAS
 1540 
 1550DEF PROCcheck_commas
 1560fornext=fornext-1
 1570pos=K%
 1580REPEAT
 1590pos=pos+1
 1600IF B%?pos=comma THEN fornext=fornext-1
 1610UNTIL B%?pos=colon OR pos=L%-1 OR B%?pos=return
 1620IF fornext<0 THEN fornext=0
 1630ENDPROC
 1640 
 1650 
 1660REM INDENT THE MARGIN THE CORRECT # OF SPACES
 1670 
 1680DEF PROCstartline
 1690PRINT
 1700IF indent<0 THEN indent=0
 1710margin=6+2*fornext+2*repuntil+indent
 1720IF margin<6 THEN margin=6
 1730PRINT STRING$(margin," ");
 1740Q%=margin
 1750PROCstripspaces
 1760mode=single
 1770ENDPROC
 1780 
 1790 
 1800REM ERROR SECTION
 1810 
 1820CLOSE#0
 1830VDU 12,3
 1840IF ERR<>17 THEN REPORT:PRINT" at line ";ERL
 1850INPUT''"ANOTHER GO ?",Y$
 1860IF LEFT$(Y$,1)="N" THEN END
 1870IF ERL<370 THEN RUN
 1880GOTO 350
 1890 
 1900 
 1910REM GET A LINE FROM THE FILE
 1920 
 1930DEFPROCloadline(buf)
 1940LOCAL a,b
 1950a=BGET#X
 1960?buf=a
 1970b=BGET#X
 1980buf?1=b
 1990IF a<>13 THEN ENDPROC
 2000IF b>127 THEN ENDPROC
 2010buf?2=BGET#X
 2020a=BGET#X
 2030buf?3=a
 2040FOR b=4 TO a-1
 2050buf?b=BGET#X
 2060NEXT b
 2070buf?a=13
 2080ENDPROC
 2090 
 2100 
 2110REM IGNORE ANY LEADING SPACES
 2120REM AT THE START OF A LINE
 2130 
 2140DEF PROCstripspaces
 2150IF Q%>margin THEN ENDPROC
 2160REPEAT
 2170K%=K%+1
 2180UNTIL K%>L%-1 OR B%?K%>space
 2190K%=K%-1
 2200ENDPROC
 2210 
 2220 
 2230REM GET THE NEXT CHARACTER
 2240 
 2250DEF PROCnextchar
 2260K%=K%+1
 2270IF K%>L%-1 THEN char=space ELSE char=B%?K%
 2280IF char<space THEN char=space
 2290ENDPROC
 2300 
 2310 
 2320REM DEAL WITH A REM STATEMENT
 2330 
 2340DEF PROCrem
 2350PROCprint(char,decode)
 2360REPEAT
 2370PROCnextchar
 2380IF char=quote THEN PROCtext ELSE PROCprint(char,decode)
 2390UNTIL K%>=L%-1
 2400ENDPROC
 2410 
 2420 
 2430REM DEAL WITH TEXT BETWEEN QUOTES
 2440 
 2450DEF PROCtext
 2460PROCprint(char,NOT decode)
 2470REPEAT
 2480PROCnextchar
 2490PROCprint(char,NOT decode)
 2500UNTIL K%>=L%-1 OR char=quote
 2510ENDPROC
 2520 
 2530 
 2540REM PRINT A CHARACTER OR
 2550REM COMPRESSED CODE
 2560 
 2570DEF PROCprint(char,decode)
 2580LOCAL l,A$
 2590A$=CHR$(char)
 2600l=1
 2610IF decode THEN IF char>printable THEN A$=NAME$(char-128):l=LEN(A$)
 2620IF NOT decode THEN IF (char MOD 128)<space THEN A$=" "
 2630IF Q%+l*mode>R% THEN PROCstartline
 2640IF char=define THEN VDU 8,129:IF LEFT$(Y1$,1)="Y" THEN mode=double:VDU 1,32,1,14
 2650PRINT A$;
 2660Q%=Q%+l*mode
 2670ENDPROC
 2680 
 2690 

� BASIC PROGRAM LISTER
 � This program will list any
$� BASIC program from disc/net to
("� screen or printer.   It will
2$� properly indent program lines,
< � split multiple statements,
F$� split and indent IF statements
P#� and emphasise the DEFinitions
Z� of all procedures and
d� functions.
n 
x�     (c) Derek Grainge
��     18th April , 1987
�!� Loretto School, Musselburgh
� 
� 
�� set up section
�� � � �T\G
�%� This version customised for DFS
��7
�"�"SETTING UP. PLEASE WAIT ..."
�&� A% 40 ,NAME$(127),linebuffer 256
�X=�("FILE")
�� I=0 � 127
��#X,NAME$(I)
�
�#X
�indent=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
"Nif=&E7:test1$=�(quote)+�(remark)+�(for)+�(else)+�(repeat)+�(next)+�(until)
,)test2$=�(then)+�(if)+�(else)+�(colon)
6single=1:double=2
@ 
J 
T%� THE MAIN PROGRAM REPEATS ITSELF
^�
h� CHOOSE A PROGRAM
r
�:*CAT
|'�"NAME OF PROGRAM",P$:P%=linebuffer
�"�"STARTING AT LINE NO",startno
�� CHOOSE OUTPUT PARAMETERS
�/�''"WIDTH OF LISTING ON SCREEN OR PAPER",R%
�� R%<20 � R%>78 � � �tZA
�� ''"PRINTER ON (Y/N) ",Y1$
�9� �Y1$,1)="Y" � �"ECONET PRINTER (Y/N)",Y2$ � Y2$="N"
�*FX 5,1
�� �Y2$,1)="Y" � *FX 5,4
�
�'''''
�!� �Y1$,1)="Y" � � 2,1,27,1,40
�� R%<40 � � 7 � � 3
� 
�� THE MAIN PROGRAM ITSELF
!margin=6:fornext=0:repuntil=0
decode=�:mode=single
	�'P$'
&theend=�
0X=�(P$)
:�
D�loadline(linebuffer)
N�check(linebuffer)
X7� (� theend) � highenough � �listline(linebuffer+4)
b� theend
l�#X
v�''
�� Y2$="N" � � 1,12
�� 3
� 
�� ANOTHER GO ?
��''"ANOTHER GO",Y$
�� �Y$,1)="N"
��
�� END OF MAIN PROGRAM
� 
� 
�� CHECK A LINE FOR LEGALITY
� 
���check(A%)
7� ?A%<>13 � theend=�:� 3:�"ILLEGAL BASIC STORAGE":�
� A%?1>127 � theend=�:�
highenough=�
 .� (A%?1)*256+A%?2<startno � highenough=�:�
*<@%=5:margin=6+2*fornext+2*repuntil:� margin<6 � margin=6
48�(A%?1)*256 + (A%?2) ;�margin-5," ");:@%=0:Q%=margin
>mode=single
H�
R 
\ 
f� PRINT A PROGRAM LINE
p 
z��listline(B%)
�indent=0
�L%=?(B%-1)-4
�	K%=-1
�7margin=6+2*fornext+2*repuntil:� margin<6 � margin=6
�
Q%=margin
��
��statement
�� K%>=L%-1
��
��
� 
� 
�!� PRINT ONE PROGRAM STATEMENT
 
� �statement
�stripspaces
$�
.
�nextchar
8a=�test1$,�(char))
B3� a+1 � �tRD,�DLD,�DVD,�D`D,�DjD,�DtD,�D~D,�tHD
L�text:� �dXD
V�rem:� �dXD
`Ffornext=fornext+1:�print(space,decode):�print(space,decode):� �tRD
j%indent=indent-2:�startline:� �tRD
tHrepuntil=repuntil+1:�print(space,decode):�print(space,decode):� �tRD
~�check_commas:� �tRD
�1repuntil=repuntil-1:� repuntil<0 � repuntil=0
�:� char=lineno � �lineno(B%+K%+1) � �print(char,decode)
�a=�test2$,�(char))
�$� a+1 � �dXD,�dND,�tpD,�tzD,�dDD
�indent=indent+2:� �dXD
�indent=indent+2
�*� a=4 � �stripspaces:� K%>=L%-1 � �dXD
��startline
�� K%>=L%-1 � char=colon
��
� 
� 
� EXECUTE A * INSTRUCTION

 
��oscli(A$)

$A%=A$
(X%=A% � 256
2Y%=A% � 256
<� &FFF7
F�
P 
Z 
d� DECODE A LINE NUMBER
n 
x��lineno(A%)
�� D1%,D2%,D3%,L
�D1%= ((A%?1)� &3F)
�D2%= ((A%?2)� &3F)
�D3%= (?A%) � &54
�0L= D2%*256+D1%+(D3%� 4)*256*16 +(D3% � 48)*4
�%� Q%+�(�(L))*mode>R% � �startline
�� L;
�K%=K%+3
�Q%=Q%+�(�(L))*mode
��
� 
� 
�'� CHECK A NEXT STATEMENT FOR COMMAS
 
� �check_commas
fornext=fornext-1
"
pos=K%
,�
6
pos=pos+1
@&� B%?pos=comma � fornext=fornext-1
J-� B%?pos=colon � pos=L%-1 � B%?pos=return
T� fornext<0 � fornext=0
^�
h 
r 
|/� INDENT THE MARGIN THE CORRECT # OF SPACES
� 
�� �startline
��
�� indent<0 � indent=0
�(margin=6+2*fornext+2*repuntil+indent
�� margin<6 � margin=6
�� �margin," ");
�
Q%=margin
��stripspaces
�mode=single
��
� 
� 
� ERROR SECTION
 
�#0
&
� 12,3
0� �<>17 � �:�" at line ";�
:�''"ANOTHER GO ?",Y$
D� �Y$,1)="N" � �
N� �<370 � �
X
� �D^A
b 
l 
v� GET A LINE FROM THE FILE
� 
���loadline(buf)
�	� a,b
�	a=�#X
�
?buf=a
�	b=�#X
�buf?1=b
�� a<>13 � �
�� b>127 � �
�
buf?2=�#X
�	a=�#X
�buf?3=a
�� b=4 � a-1

buf?b=�#X
� b
buf?a=13
 �
* 
4 
>� IGNORE ANY LEADING SPACES
H� AT THE START OF A LINE
R 
\� �stripspaces
f� Q%>margin � �
p�
zK%=K%+1
�� K%>L%-1 � B%?K%>space
�K%=K%-1
��
� 
� 
�� GET THE NEXT CHARACTER
� 
�� �nextchar
�K%=K%+1
�'� K%>L%-1 � char=space � char=B%?K%
�� char<space � char=space
��
� 
	 
	� DEAL WITH A REM STATEMENT
	 
	$
� �rem
	.�print(char,decode)
	8�
	B
�nextchar
	L.� char=quote � �text � �print(char,decode)
	V� K%>=L%-1
	`�
	j 
	t 
	~#� DEAL WITH TEXT BETWEEN QUOTES
	� 
	�� �text
	��print(char,� decode)
	��
	�
�nextchar
	��print(char,� decode)
	�� K%>=L%-1 � char=quote
	��
	� 
	� 
	�� PRINT A CHARACTER OR
	�� COMPRESSED CODE
 

� �print(char,decode)

� l,A$
A$=�(char)
(l=1
2<� decode � � char>printable � A$=NAME$(char-128):l=�(A$)
<.� � decode � � (char � 128)<space � A$=" "
F� Q%+l*mode>R% � �startline
PC� char=define � � 8,129:� �Y1$,1)="Y" � mode=double:� 1,32,1,14
Z	� A$;
dQ%=Q%+l*mode
n�
x 
� 
�
00000000  0d 00 0a 1a f4 20 42 41  53 49 43 20 50 52 4f 47  |..... BASIC PROG|
00000010  52 41 4d 20 4c 49 53 54  45 52 0d 00 14 20 f4 20  |RAM LISTER... . |
00000020  54 68 69 73 20 70 72 6f  67 72 61 6d 20 77 69 6c  |This program wil|
00000030  6c 20 6c 69 73 74 20 61  6e 79 0d 00 1e 24 f4 20  |l list any...$. |
00000040  42 41 53 49 43 20 70 72  6f 67 72 61 6d 20 66 72  |BASIC program fr|
00000050  6f 6d 20 64 69 73 63 2f  6e 65 74 20 74 6f 0d 00  |om disc/net to..|
00000060  28 22 f4 20 73 63 72 65  65 6e 20 6f 72 20 70 72  |(". screen or pr|
00000070  69 6e 74 65 72 2e 20 20  20 49 74 20 77 69 6c 6c  |inter.   It will|
00000080  0d 00 32 24 f4 20 70 72  6f 70 65 72 6c 79 20 69  |..2$. properly i|
00000090  6e 64 65 6e 74 20 70 72  6f 67 72 61 6d 20 6c 69  |ndent program li|
000000a0  6e 65 73 2c 0d 00 3c 20  f4 20 73 70 6c 69 74 20  |nes,..< . split |
000000b0  6d 75 6c 74 69 70 6c 65  20 73 74 61 74 65 6d 65  |multiple stateme|
000000c0  6e 74 73 2c 0d 00 46 24  f4 20 73 70 6c 69 74 20  |nts,..F$. split |
000000d0  61 6e 64 20 69 6e 64 65  6e 74 20 49 46 20 73 74  |and indent IF st|
000000e0  61 74 65 6d 65 6e 74 73  0d 00 50 23 f4 20 61 6e  |atements..P#. an|
000000f0  64 20 65 6d 70 68 61 73  69 73 65 20 74 68 65 20  |d emphasise the |
00000100  44 45 46 69 6e 69 74 69  6f 6e 73 0d 00 5a 1b f4  |DEFinitions..Z..|
00000110  20 6f 66 20 61 6c 6c 20  70 72 6f 63 65 64 75 72  | of all procedur|
00000120  65 73 20 61 6e 64 0d 00  64 10 f4 20 66 75 6e 63  |es and..d.. func|
00000130  74 69 6f 6e 73 2e 0d 00  6e 05 20 0d 00 78 1b f4  |tions...n. ..x..|
00000140  20 20 20 20 20 28 63 29  20 44 65 72 65 6b 20 47  |     (c) Derek G|
00000150  72 61 69 6e 67 65 0d 00  82 1b f4 20 20 20 20 20  |rainge.....     |
00000160  31 38 74 68 20 41 70 72  69 6c 20 2c 20 31 39 38  |18th April , 198|
00000170  37 0d 00 8c 21 f4 20 4c  6f 72 65 74 74 6f 20 53  |7...!. Loretto S|
00000180  63 68 6f 6f 6c 2c 20 4d  75 73 73 65 6c 62 75 72  |chool, Musselbur|
00000190  67 68 0d 00 96 05 20 0d  00 a0 05 20 0d 00 aa 14  |gh.... .... ....|
000001a0  f4 20 73 65 74 20 75 70  20 73 65 63 74 69 6f 6e  |. set up section|
000001b0  0d 00 b4 0e ee 20 85 20  e5 20 8d 54 5c 47 0d 00  |..... . . .T\G..|
000001c0  be 25 f4 20 54 68 69 73  20 76 65 72 73 69 6f 6e  |.%. This version|
000001d0  20 63 75 73 74 6f 6d 69  73 65 64 20 66 6f 72 20  | customised for |
000001e0  44 46 53 0d 00 c8 06 eb  37 0d 00 d2 22 f1 22 53  |DFS.....7..."."S|
000001f0  45 54 54 49 4e 47 20 55  50 2e 20 50 4c 45 41 53  |ETTING UP. PLEAS|
00000200  45 20 57 41 49 54 20 2e  2e 2e 22 0d 00 dc 26 de  |E WAIT ..."...&.|
00000210  20 41 25 20 34 30 20 2c  4e 41 4d 45 24 28 31 32  | A% 40 ,NAME$(12|
00000220  37 29 2c 6c 69 6e 65 62  75 66 66 65 72 20 32 35  |7),linebuffer 25|
00000230  36 0d 00 e6 0f 58 3d ad  28 22 46 49 4c 45 22 29  |6....X=.("FILE")|
00000240  0d 00 f0 0f e3 20 49 3d  30 20 b8 20 31 32 37 0d  |..... I=0 . 127.|
00000250  00 fa 10 e8 23 58 2c 4e  41 4d 45 24 28 49 29 0d  |....#X,NAME$(I).|
00000260  01 04 05 ed 0d 01 0e 07  d9 23 58 0d 01 18 bf 69  |.........#X....i|
00000270  6e 64 65 6e 74 3d 30 3a  6d 61 72 67 69 6e 3d 36  |ndent=0:margin=6|
00000280  3a 66 6f 72 6e 65 78 74  3d 30 3a 72 65 70 75 6e  |:fornext=0:repun|
00000290  74 69 6c 3d 30 3a 73 70  61 63 65 3d 33 32 3a 72  |til=0:space=32:r|
000002a0  65 74 75 72 6e 3d 31 33  3a 72 65 6d 61 72 6b 3d  |eturn=13:remark=|
000002b0  26 46 34 3a 71 75 6f 74  65 3d 33 34 3a 63 6f 6d  |&F4:quote=34:com|
000002c0  6d 61 3d 34 34 3a 66 6f  72 3d 26 45 33 3a 72 65  |ma=44:for=&E3:re|
000002d0  70 65 61 74 3d 26 46 35  3a 75 6e 74 69 6c 3d 26  |peat=&F5:until=&|
000002e0  46 44 3a 6e 65 78 74 3d  26 45 44 3a 6c 69 6e 65  |FD:next=&ED:line|
000002f0  6e 6f 3d 31 34 31 3a 64  65 66 69 6e 65 3d 32 32  |no=141:define=22|
00000300  31 3a 70 72 69 6e 74 61  62 6c 65 3d 31 32 37 3a  |1:printable=127:|
00000310  63 6f 6c 6f 6e 3d 35 38  3a 74 68 65 6e 3d 26 38  |colon=58:then=&8|
00000320  43 3a 65 6c 73 65 3d 26  38 42 0d 01 22 4e 69 66  |C:else=&8B.."Nif|
00000330  3d 26 45 37 3a 74 65 73  74 31 24 3d bd 28 71 75  |=&E7:test1$=.(qu|
00000340  6f 74 65 29 2b bd 28 72  65 6d 61 72 6b 29 2b bd  |ote)+.(remark)+.|
00000350  28 66 6f 72 29 2b bd 28  65 6c 73 65 29 2b bd 28  |(for)+.(else)+.(|
00000360  72 65 70 65 61 74 29 2b  bd 28 6e 65 78 74 29 2b  |repeat)+.(next)+|
00000370  bd 28 75 6e 74 69 6c 29  0d 01 2c 29 74 65 73 74  |.(until)..,)test|
00000380  32 24 3d bd 28 74 68 65  6e 29 2b bd 28 69 66 29  |2$=.(then)+.(if)|
00000390  2b bd 28 65 6c 73 65 29  2b bd 28 63 6f 6c 6f 6e  |+.(else)+.(colon|
000003a0  29 0d 01 36 15 73 69 6e  67 6c 65 3d 31 3a 64 6f  |)..6.single=1:do|
000003b0  75 62 6c 65 3d 32 0d 01  40 05 20 0d 01 4a 05 20  |uble=2..@. ..J. |
000003c0  0d 01 54 25 f4 20 54 48  45 20 4d 41 49 4e 20 50  |..T%. THE MAIN P|
000003d0  52 4f 47 52 41 4d 20 52  45 50 45 41 54 53 20 49  |ROGRAM REPEATS I|
000003e0  54 53 45 4c 46 0d 01 5e  05 f5 0d 01 68 16 f4 20  |TSELF..^....h.. |
000003f0  43 48 4f 4f 53 45 20 41  20 50 52 4f 47 52 41 4d  |CHOOSE A PROGRAM|
00000400  0d 01 72 0a db 3a 2a 43  41 54 0d 01 7c 27 e8 22  |..r..:*CAT..|'."|
00000410  4e 41 4d 45 20 4f 46 20  50 52 4f 47 52 41 4d 22  |NAME OF PROGRAM"|
00000420  2c 50 24 3a 50 25 3d 6c  69 6e 65 62 75 66 66 65  |,P$:P%=linebuffe|
00000430  72 0d 01 86 22 e8 22 53  54 41 52 54 49 4e 47 20  |r..."."STARTING |
00000440  41 54 20 4c 49 4e 45 20  4e 4f 22 2c 73 74 61 72  |AT LINE NO",star|
00000450  74 6e 6f 0d 01 90 1e f4  20 43 48 4f 4f 53 45 20  |tno..... CHOOSE |
00000460  4f 55 54 50 55 54 20 50  41 52 41 4d 45 54 45 52  |OUTPUT PARAMETER|
00000470  53 0d 01 9a 2f e8 27 27  22 57 49 44 54 48 20 4f  |S.../.''"WIDTH O|
00000480  46 20 4c 49 53 54 49 4e  47 20 4f 4e 20 53 43 52  |F LISTING ON SCR|
00000490  45 45 4e 20 4f 52 20 50  41 50 45 52 22 2c 52 25  |EEN OR PAPER",R%|
000004a0  0d 01 a4 1c e7 20 52 25  3c 32 30 20 84 20 52 25  |..... R%<20 . R%|
000004b0  3e 37 38 20 8c 20 e5 20  8d 74 5a 41 0d 01 ae 1f  |>78 . . .tZA....|
000004c0  e8 20 27 27 22 50 52 49  4e 54 45 52 20 4f 4e 20  |. ''"PRINTER ON |
000004d0  28 59 2f 4e 29 20 22 2c  59 31 24 0d 01 b8 39 e7  |(Y/N) ",Y1$...9.|
000004e0  20 c0 59 31 24 2c 31 29  3d 22 59 22 20 8c 20 e8  | .Y1$,1)="Y" . .|
000004f0  22 45 43 4f 4e 45 54 20  50 52 49 4e 54 45 52 20  |"ECONET PRINTER |
00000500  28 59 2f 4e 29 22 2c 59  32 24 20 8b 20 59 32 24  |(Y/N)",Y2$ . Y2$|
00000510  3d 22 4e 22 0d 01 c2 0b  2a 46 58 20 35 2c 31 0d  |="N"....*FX 5,1.|
00000520  01 cc 1b e7 20 c0 59 32  24 2c 31 29 3d 22 59 22  |.... .Y2$,1)="Y"|
00000530  20 8c 20 2a 46 58 20 35  2c 34 0d 01 d6 0a f1 27  | . *FX 5,4.....'|
00000540  27 27 27 27 0d 01 e0 21  e7 20 c0 59 31 24 2c 31  |''''...!. .Y1$,1|
00000550  29 3d 22 59 22 20 8c 20  ef 20 32 2c 31 2c 32 37  |)="Y" . . 2,1,27|
00000560  2c 31 2c 34 30 0d 01 ea  17 e7 20 52 25 3c 34 30  |,1,40..... R%<40|
00000570  20 8c 20 eb 20 37 20 8b  20 eb 20 33 0d 01 f4 05  | . . 7 . . 3....|
00000580  20 0d 01 fe 1d f4 20 54  48 45 20 4d 41 49 4e 20  | ..... THE MAIN |
00000590  50 52 4f 47 52 41 4d 20  49 54 53 45 4c 46 0d 02  |PROGRAM ITSELF..|
000005a0  08 21 6d 61 72 67 69 6e  3d 36 3a 66 6f 72 6e 65  |.!margin=6:forne|
000005b0  78 74 3d 30 3a 72 65 70  75 6e 74 69 6c 3d 30 0d  |xt=0:repuntil=0.|
000005c0  02 12 18 64 65 63 6f 64  65 3d b9 3a 6d 6f 64 65  |...decode=.:mode|
000005d0  3d 73 69 6e 67 6c 65 0d  02 1c 09 f1 27 50 24 27  |=single.....'P$'|
000005e0  0d 02 26 0c 74 68 65 65  6e 64 3d a3 0d 02 30 0b  |..&.theend=...0.|
000005f0  58 3d ad 28 50 24 29 0d  02 3a 05 f5 0d 02 44 19  |X=.(P$)..:....D.|
00000600  f2 6c 6f 61 64 6c 69 6e  65 28 6c 69 6e 65 62 75  |.loadline(linebu|
00000610  66 66 65 72 29 0d 02 4e  16 f2 63 68 65 63 6b 28  |ffer)..N..check(|
00000620  6c 69 6e 65 62 75 66 66  65 72 29 0d 02 58 37 e7  |linebuffer)..X7.|
00000630  20 28 ac 20 74 68 65 65  6e 64 29 20 80 20 68 69  | (. theend) . hi|
00000640  67 68 65 6e 6f 75 67 68  20 8c 20 f2 6c 69 73 74  |ghenough . .list|
00000650  6c 69 6e 65 28 6c 69 6e  65 62 75 66 66 65 72 2b  |line(linebuffer+|
00000660  34 29 0d 02 62 0c fd 20  74 68 65 65 6e 64 0d 02  |4)..b.. theend..|
00000670  6c 07 d9 23 58 0d 02 76  07 f1 27 27 0d 02 80 16  |l..#X..v..''....|
00000680  e7 20 59 32 24 3d 22 4e  22 20 8c 20 ef 20 31 2c  |. Y2$="N" . . 1,|
00000690  31 32 0d 02 8a 07 ef 20  33 0d 02 94 05 20 0d 02  |12..... 3.... ..|
000006a0  9e 12 f4 20 41 4e 4f 54  48 45 52 20 47 4f 20 3f  |... ANOTHER GO ?|
000006b0  0d 02 a8 16 e8 27 27 22  41 4e 4f 54 48 45 52 20  |.....''"ANOTHER |
000006c0  47 4f 22 2c 59 24 0d 02  b2 10 fd 20 c0 59 24 2c  |GO",Y$..... .Y$,|
000006d0  31 29 3d 22 4e 22 0d 02  bc 05 e0 0d 02 c6 19 f4  |1)="N"..........|
000006e0  20 45 4e 44 20 4f 46 20  4d 41 49 4e 20 50 52 4f  | END OF MAIN PRO|
000006f0  47 52 41 4d 0d 02 d0 05  20 0d 02 da 05 20 0d 02  |GRAM.... .... ..|
00000700  e4 1f f4 20 43 48 45 43  4b 20 41 20 4c 49 4e 45  |... CHECK A LINE|
00000710  20 46 4f 52 20 4c 45 47  41 4c 49 54 59 0d 02 ee  | FOR LEGALITY...|
00000720  05 20 0d 02 f8 0f dd f2  63 68 65 63 6b 28 41 25  |. ......check(A%|
00000730  29 0d 03 02 37 e7 20 3f  41 25 3c 3e 31 33 20 8c  |)...7. ?A%<>13 .|
00000740  20 74 68 65 65 6e 64 3d  b9 3a ef 20 33 3a f1 22  | theend=.:. 3:."|
00000750  49 4c 4c 45 47 41 4c 20  42 41 53 49 43 20 53 54  |ILLEGAL BASIC ST|
00000760  4f 52 41 47 45 22 3a e1  0d 03 0c 1b e7 20 41 25  |ORAGE":...... A%|
00000770  3f 31 3e 31 32 37 20 8c  20 74 68 65 65 6e 64 3d  |?1>127 . theend=|
00000780  b9 3a e1 0d 03 16 10 68  69 67 68 65 6e 6f 75 67  |.:.....highenoug|
00000790  68 3d b9 0d 03 20 2e e7  20 28 41 25 3f 31 29 2a  |h=... .. (A%?1)*|
000007a0  32 35 36 2b 41 25 3f 32  3c 73 74 61 72 74 6e 6f  |256+A%?2<startno|
000007b0  20 8c 20 68 69 67 68 65  6e 6f 75 67 68 3d a3 3a  | . highenough=.:|
000007c0  e1 0d 03 2a 3c 40 25 3d  35 3a 6d 61 72 67 69 6e  |...*<@%=5:margin|
000007d0  3d 36 2b 32 2a 66 6f 72  6e 65 78 74 2b 32 2a 72  |=6+2*fornext+2*r|
000007e0  65 70 75 6e 74 69 6c 3a  e7 20 6d 61 72 67 69 6e  |epuntil:. margin|
000007f0  3c 36 20 8c 20 6d 61 72  67 69 6e 3d 36 0d 03 34  |<6 . margin=6..4|
00000800  38 f1 28 41 25 3f 31 29  2a 32 35 36 20 2b 20 28  |8.(A%?1)*256 + (|
00000810  41 25 3f 32 29 20 3b c4  6d 61 72 67 69 6e 2d 35  |A%?2) ;.margin-5|
00000820  2c 22 20 22 29 3b 3a 40  25 3d 30 3a 51 25 3d 6d  |," ");:@%=0:Q%=m|
00000830  61 72 67 69 6e 0d 03 3e  0f 6d 6f 64 65 3d 73 69  |argin..>.mode=si|
00000840  6e 67 6c 65 0d 03 48 05  e1 0d 03 52 05 20 0d 03  |ngle..H....R. ..|
00000850  5c 05 20 0d 03 66 1a f4  20 50 52 49 4e 54 20 41  |\. ..f.. PRINT A|
00000860  20 50 52 4f 47 52 41 4d  20 4c 49 4e 45 0d 03 70  | PROGRAM LINE..p|
00000870  05 20 0d 03 7a 12 dd f2  6c 69 73 74 6c 69 6e 65  |. ..z...listline|
00000880  28 42 25 29 0d 03 84 0c  69 6e 64 65 6e 74 3d 30  |(B%)....indent=0|
00000890  0d 03 8e 10 4c 25 3d 3f  28 42 25 2d 31 29 2d 34  |....L%=?(B%-1)-4|
000008a0  0d 03 98 09 4b 25 3d 2d  31 0d 03 a2 37 6d 61 72  |....K%=-1...7mar|
000008b0  67 69 6e 3d 36 2b 32 2a  66 6f 72 6e 65 78 74 2b  |gin=6+2*fornext+|
000008c0  32 2a 72 65 70 75 6e 74  69 6c 3a e7 20 6d 61 72  |2*repuntil:. mar|
000008d0  67 69 6e 3c 36 20 8c 20  6d 61 72 67 69 6e 3d 36  |gin<6 . margin=6|
000008e0  0d 03 ac 0d 51 25 3d 6d  61 72 67 69 6e 0d 03 b6  |....Q%=margin...|
000008f0  05 f5 0d 03 c0 0e f2 73  74 61 74 65 6d 65 6e 74  |.......statement|
00000900  0d 03 ca 0e fd 20 4b 25  3e 3d 4c 25 2d 31 0d 03  |..... K%>=L%-1..|
00000910  d4 05 f1 0d 03 de 05 e1  0d 03 e8 05 20 0d 03 f2  |............ ...|
00000920  05 20 0d 03 fc 21 f4 20  50 52 49 4e 54 20 4f 4e  |. ...!. PRINT ON|
00000930  45 20 50 52 4f 47 52 41  4d 20 53 54 41 54 45 4d  |E PROGRAM STATEM|
00000940  45 4e 54 0d 04 06 05 20  0d 04 10 10 dd 20 f2 73  |ENT.... ..... .s|
00000950  74 61 74 65 6d 65 6e 74  0d 04 1a 10 f2 73 74 72  |tatement.....str|
00000960  69 70 73 70 61 63 65 73  0d 04 24 05 f5 0d 04 2e  |ipspaces..$.....|
00000970  0d f2 6e 65 78 74 63 68  61 72 0d 04 38 16 61 3d  |..nextchar..8.a=|
00000980  a7 74 65 73 74 31 24 2c  bd 28 63 68 61 72 29 29  |.test1$,.(char))|
00000990  0d 04 42 33 ee 20 61 2b  31 20 e5 20 8d 74 52 44  |..B3. a+1 . .tRD|
000009a0  2c 8d 44 4c 44 2c 8d 44  56 44 2c 8d 44 60 44 2c  |,.DLD,.DVD,.D`D,|
000009b0  8d 44 6a 44 2c 8d 44 74  44 2c 8d 44 7e 44 2c 8d  |.DjD,.DtD,.D~D,.|
000009c0  74 48 44 0d 04 4c 10 f2  74 65 78 74 3a e5 20 8d  |tHD..L..text:. .|
000009d0  64 58 44 0d 04 56 0f f2  72 65 6d 3a e5 20 8d 64  |dXD..V..rem:. .d|
000009e0  58 44 0d 04 60 46 66 6f  72 6e 65 78 74 3d 66 6f  |XD..`Ffornext=fo|
000009f0  72 6e 65 78 74 2b 31 3a  f2 70 72 69 6e 74 28 73  |rnext+1:.print(s|
00000a00  70 61 63 65 2c 64 65 63  6f 64 65 29 3a f2 70 72  |pace,decode):.pr|
00000a10  69 6e 74 28 73 70 61 63  65 2c 64 65 63 6f 64 65  |int(space,decode|
00000a20  29 3a e5 20 8d 74 52 44  0d 04 6a 25 69 6e 64 65  |):. .tRD..j%inde|
00000a30  6e 74 3d 69 6e 64 65 6e  74 2d 32 3a f2 73 74 61  |nt=indent-2:.sta|
00000a40  72 74 6c 69 6e 65 3a e5  20 8d 74 52 44 0d 04 74  |rtline:. .tRD..t|
00000a50  48 72 65 70 75 6e 74 69  6c 3d 72 65 70 75 6e 74  |Hrepuntil=repunt|
00000a60  69 6c 2b 31 3a f2 70 72  69 6e 74 28 73 70 61 63  |il+1:.print(spac|
00000a70  65 2c 64 65 63 6f 64 65  29 3a f2 70 72 69 6e 74  |e,decode):.print|
00000a80  28 73 70 61 63 65 2c 64  65 63 6f 64 65 29 3a e5  |(space,decode):.|
00000a90  20 8d 74 52 44 0d 04 7e  18 f2 63 68 65 63 6b 5f  | .tRD..~..check_|
00000aa0  63 6f 6d 6d 61 73 3a e5  20 8d 74 52 44 0d 04 88  |commas:. .tRD...|
00000ab0  31 72 65 70 75 6e 74 69  6c 3d 72 65 70 75 6e 74  |1repuntil=repunt|
00000ac0  69 6c 2d 31 3a e7 20 72  65 70 75 6e 74 69 6c 3c  |il-1:. repuntil<|
00000ad0  30 20 8c 20 72 65 70 75  6e 74 69 6c 3d 30 0d 04  |0 . repuntil=0..|
00000ae0  92 3a e7 20 63 68 61 72  3d 6c 69 6e 65 6e 6f 20  |.:. char=lineno |
00000af0  8c 20 f2 6c 69 6e 65 6e  6f 28 42 25 2b 4b 25 2b  |. .lineno(B%+K%+|
00000b00  31 29 20 8b 20 f2 70 72  69 6e 74 28 63 68 61 72  |1) . .print(char|
00000b10  2c 64 65 63 6f 64 65 29  0d 04 9c 16 61 3d a7 74  |,decode)....a=.t|
00000b20  65 73 74 32 24 2c bd 28  63 68 61 72 29 29 0d 04  |est2$,.(char))..|
00000b30  a6 24 ee 20 61 2b 31 20  e5 20 8d 64 58 44 2c 8d  |.$. a+1 . .dXD,.|
00000b40  64 4e 44 2c 8d 74 70 44  2c 8d 74 7a 44 2c 8d 64  |dND,.tpD,.tzD,.d|
00000b50  44 44 0d 04 b0 1a 69 6e  64 65 6e 74 3d 69 6e 64  |DD....indent=ind|
00000b60  65 6e 74 2b 32 3a e5 20  8d 64 58 44 0d 04 ba 13  |ent+2:. .dXD....|
00000b70  69 6e 64 65 6e 74 3d 69  6e 64 65 6e 74 2b 32 0d  |indent=indent+2.|
00000b80  04 c4 2a e7 20 61 3d 34  20 8c 20 f2 73 74 72 69  |..*. a=4 . .stri|
00000b90  70 73 70 61 63 65 73 3a  e7 20 4b 25 3e 3d 4c 25  |pspaces:. K%>=L%|
00000ba0  2d 31 20 8c 20 8d 64 58  44 0d 04 ce 0e f2 73 74  |-1 . .dXD.....st|
00000bb0  61 72 74 6c 69 6e 65 0d  04 d8 1b fd 20 4b 25 3e  |artline..... K%>|
00000bc0  3d 4c 25 2d 31 20 84 20  63 68 61 72 3d 63 6f 6c  |=L%-1 . char=col|
00000bd0  6f 6e 0d 04 e2 05 e1 0d  04 ec 05 20 0d 04 f6 05  |on......... ....|
00000be0  20 0d 05 00 1d f4 20 45  58 45 43 55 54 45 20 41  | ..... EXECUTE A|
00000bf0  20 2a 20 49 4e 53 54 52  55 43 54 49 4f 4e 0d 05  | * INSTRUCTION..|
00000c00  0a 05 20 0d 05 14 0f dd  f2 6f 73 63 6c 69 28 41  |.. ......oscli(A|
00000c10  24 29 0d 05 1e 0a 24 41  25 3d 41 24 0d 05 28 0f  |$)....$A%=A$..(.|
00000c20  58 25 3d 41 25 20 83 20  32 35 36 0d 05 32 0f 59  |X%=A% . 256..2.Y|
00000c30  25 3d 41 25 20 81 20 32  35 36 0d 05 3c 0b d6 20  |%=A% . 256..<.. |
00000c40  26 46 46 46 37 0d 05 46  05 e1 0d 05 50 05 20 0d  |&FFF7..F....P. .|
00000c50  05 5a 05 20 0d 05 64 1a  f4 20 44 45 43 4f 44 45  |.Z. ..d.. DECODE|
00000c60  20 41 20 4c 49 4e 45 20  4e 55 4d 42 45 52 0d 05  | A LINE NUMBER..|
00000c70  6e 05 20 0d 05 78 10 dd  f2 6c 69 6e 65 6e 6f 28  |n. ..x...lineno(|
00000c80  41 25 29 0d 05 82 13 ea  20 44 31 25 2c 44 32 25  |A%)..... D1%,D2%|
00000c90  2c 44 33 25 2c 4c 0d 05  8c 16 44 31 25 3d 20 28  |,D3%,L....D1%= (|
00000ca0  28 41 25 3f 31 29 80 20  26 33 46 29 0d 05 96 16  |(A%?1). &3F)....|
00000cb0  44 32 25 3d 20 28 28 41  25 3f 32 29 80 20 26 33  |D2%= ((A%?2). &3|
00000cc0  46 29 0d 05 a0 14 44 33  25 3d 20 28 3f 41 25 29  |F)....D3%= (?A%)|
00000cd0  20 82 20 26 35 34 0d 05  aa 30 4c 3d 20 44 32 25  | . &54...0L= D2%|
00000ce0  2a 32 35 36 2b 44 31 25  2b 28 44 33 25 80 20 34  |*256+D1%+(D3%. 4|
00000cf0  29 2a 32 35 36 2a 31 36  20 2b 28 44 33 25 20 80  |)*256*16 +(D3% .|
00000d00  20 34 38 29 2a 34 0d 05  b4 25 e7 20 51 25 2b a9  | 48)*4...%. Q%+.|
00000d10  28 c3 28 4c 29 29 2a 6d  6f 64 65 3e 52 25 20 8c  |(.(L))*mode>R% .|
00000d20  20 f2 73 74 61 72 74 6c  69 6e 65 0d 05 be 08 f1  | .startline.....|
00000d30  20 4c 3b 0d 05 c8 0b 4b  25 3d 4b 25 2b 33 0d 05  | L;....K%=K%+3..|
00000d40  d2 16 51 25 3d 51 25 2b  a9 28 c3 28 4c 29 29 2a  |..Q%=Q%+.(.(L))*|
00000d50  6d 6f 64 65 0d 05 dc 05  e1 0d 05 e6 05 20 0d 05  |mode......... ..|
00000d60  f0 05 20 0d 05 fa 27 f4  20 43 48 45 43 4b 20 41  |.. ...'. CHECK A|
00000d70  20 4e 45 58 54 20 53 54  41 54 45 4d 45 4e 54 20  | NEXT STATEMENT |
00000d80  46 4f 52 20 43 4f 4d 4d  41 53 0d 06 04 05 20 0d  |FOR COMMAS.... .|
00000d90  06 0e 13 dd 20 f2 63 68  65 63 6b 5f 63 6f 6d 6d  |.... .check_comm|
00000da0  61 73 0d 06 18 15 66 6f  72 6e 65 78 74 3d 66 6f  |as....fornext=fo|
00000db0  72 6e 65 78 74 2d 31 0d  06 22 0a 70 6f 73 3d 4b  |rnext-1..".pos=K|
00000dc0  25 0d 06 2c 05 f5 0d 06  36 0d 70 6f 73 3d 70 6f  |%..,....6.pos=po|
00000dd0  73 2b 31 0d 06 40 26 e7  20 42 25 3f 70 6f 73 3d  |s+1..@&. B%?pos=|
00000de0  63 6f 6d 6d 61 20 8c 20  66 6f 72 6e 65 78 74 3d  |comma . fornext=|
00000df0  66 6f 72 6e 65 78 74 2d  31 0d 06 4a 2d fd 20 42  |fornext-1..J-. B|
00000e00  25 3f 70 6f 73 3d 63 6f  6c 6f 6e 20 84 20 70 6f  |%?pos=colon . po|
00000e10  73 3d 4c 25 2d 31 20 84  20 42 25 3f 70 6f 73 3d  |s=L%-1 . B%?pos=|
00000e20  72 65 74 75 72 6e 0d 06  54 1b e7 20 66 6f 72 6e  |return..T.. forn|
00000e30  65 78 74 3c 30 20 8c 20  66 6f 72 6e 65 78 74 3d  |ext<0 . fornext=|
00000e40  30 0d 06 5e 05 e1 0d 06  68 05 20 0d 06 72 05 20  |0..^....h. ..r. |
00000e50  0d 06 7c 2f f4 20 49 4e  44 45 4e 54 20 54 48 45  |..|/. INDENT THE|
00000e60  20 4d 41 52 47 49 4e 20  54 48 45 20 43 4f 52 52  | MARGIN THE CORR|
00000e70  45 43 54 20 23 20 4f 46  20 53 50 41 43 45 53 0d  |ECT # OF SPACES.|
00000e80  06 86 05 20 0d 06 90 10  dd 20 f2 73 74 61 72 74  |... ..... .start|
00000e90  6c 69 6e 65 0d 06 9a 05  f1 0d 06 a4 19 e7 20 69  |line.......... i|
00000ea0  6e 64 65 6e 74 3c 30 20  8c 20 69 6e 64 65 6e 74  |ndent<0 . indent|
00000eb0  3d 30 0d 06 ae 28 6d 61  72 67 69 6e 3d 36 2b 32  |=0...(margin=6+2|
00000ec0  2a 66 6f 72 6e 65 78 74  2b 32 2a 72 65 70 75 6e  |*fornext+2*repun|
00000ed0  74 69 6c 2b 69 6e 64 65  6e 74 0d 06 b8 19 e7 20  |til+indent..... |
00000ee0  6d 61 72 67 69 6e 3c 36  20 8c 20 6d 61 72 67 69  |margin<6 . margi|
00000ef0  6e 3d 36 0d 06 c2 13 f1  20 c4 6d 61 72 67 69 6e  |n=6..... .margin|
00000f00  2c 22 20 22 29 3b 0d 06  cc 0d 51 25 3d 6d 61 72  |," ");....Q%=mar|
00000f10  67 69 6e 0d 06 d6 10 f2  73 74 72 69 70 73 70 61  |gin.....stripspa|
00000f20  63 65 73 0d 06 e0 0f 6d  6f 64 65 3d 73 69 6e 67  |ces....mode=sing|
00000f30  6c 65 0d 06 ea 05 e1 0d  06 f4 05 20 0d 06 fe 05  |le......... ....|
00000f40  20 0d 07 08 13 f4 20 45  52 52 4f 52 20 53 45 43  | ..... ERROR SEC|
00000f50  54 49 4f 4e 0d 07 12 05  20 0d 07 1c 07 d9 23 30  |TION.... .....#0|
00000f60  0d 07 26 0a ef 20 31 32  2c 33 0d 07 30 1e e7 20  |..&.. 12,3..0.. |
00000f70  9f 3c 3e 31 37 20 8c 20  f6 3a f1 22 20 61 74 20  |.<>17 . .:." at |
00000f80  6c 69 6e 65 20 22 3b 9e  0d 07 3a 18 e8 27 27 22  |line ";...:..''"|
00000f90  41 4e 4f 54 48 45 52 20  47 4f 20 3f 22 2c 59 24  |ANOTHER GO ?",Y$|
00000fa0  0d 07 44 14 e7 20 c0 59  24 2c 31 29 3d 22 4e 22  |..D.. .Y$,1)="N"|
00000fb0  20 8c 20 e0 0d 07 4e 0f  e7 20 9e 3c 33 37 30 20  | . ...N.. .<370 |
00000fc0  8c 20 f9 0d 07 58 0a e5  20 8d 44 5e 41 0d 07 62  |. ...X.. .D^A..b|
00000fd0  05 20 0d 07 6c 05 20 0d  07 76 1e f4 20 47 45 54  |. ..l. ..v.. GET|
00000fe0  20 41 20 4c 49 4e 45 20  46 52 4f 4d 20 54 48 45  | A LINE FROM THE|
00000ff0  20 46 49 4c 45 0d 07 80  05 20 0d 07 8a 13 dd f2  | FILE.... ......|
00001000  6c 6f 61 64 6c 69 6e 65  28 62 75 66 29 0d 07 94  |loadline(buf)...|
00001010  09 ea 20 61 2c 62 0d 07  9e 09 61 3d 9a 23 58 0d  |.. a,b....a=.#X.|
00001020  07 a8 0a 3f 62 75 66 3d  61 0d 07 b2 09 62 3d 9a  |...?buf=a....b=.|
00001030  23 58 0d 07 bc 0b 62 75  66 3f 31 3d 62 0d 07 c6  |#X....buf?1=b...|
00001040  0f e7 20 61 3c 3e 31 33  20 8c 20 e1 0d 07 d0 0f  |.. a<>13 . .....|
00001050  e7 20 62 3e 31 32 37 20  8c 20 e1 0d 07 da 0d 62  |. b>127 . .....b|
00001060  75 66 3f 32 3d 9a 23 58  0d 07 e4 09 61 3d 9a 23  |uf?2=.#X....a=.#|
00001070  58 0d 07 ee 0b 62 75 66  3f 33 3d 61 0d 07 f8 0f  |X....buf?3=a....|
00001080  e3 20 62 3d 34 20 b8 20  61 2d 31 0d 08 02 0d 62  |. b=4 . a-1....b|
00001090  75 66 3f 62 3d 9a 23 58  0d 08 0c 07 ed 20 62 0d  |uf?b=.#X..... b.|
000010a0  08 16 0c 62 75 66 3f 61  3d 31 33 0d 08 20 05 e1  |...buf?a=13.. ..|
000010b0  0d 08 2a 05 20 0d 08 34  05 20 0d 08 3e 1f f4 20  |..*. ..4. ..>.. |
000010c0  49 47 4e 4f 52 45 20 41  4e 59 20 4c 45 41 44 49  |IGNORE ANY LEADI|
000010d0  4e 47 20 53 50 41 43 45  53 0d 08 48 1c f4 20 41  |NG SPACES..H.. A|
000010e0  54 20 54 48 45 20 53 54  41 52 54 20 4f 46 20 41  |T THE START OF A|
000010f0  20 4c 49 4e 45 0d 08 52  05 20 0d 08 5c 12 dd 20  | LINE..R. ..\.. |
00001100  f2 73 74 72 69 70 73 70  61 63 65 73 0d 08 66 13  |.stripspaces..f.|
00001110  e7 20 51 25 3e 6d 61 72  67 69 6e 20 8c 20 e1 0d  |. Q%>margin . ..|
00001120  08 70 05 f5 0d 08 7a 0b  4b 25 3d 4b 25 2b 31 0d  |.p....z.K%=K%+1.|
00001130  08 84 1b fd 20 4b 25 3e  4c 25 2d 31 20 84 20 42  |.... K%>L%-1 . B|
00001140  25 3f 4b 25 3e 73 70 61  63 65 0d 08 8e 0b 4b 25  |%?K%>space....K%|
00001150  3d 4b 25 2d 31 0d 08 98  05 e1 0d 08 a2 05 20 0d  |=K%-1......... .|
00001160  08 ac 05 20 0d 08 b6 1c  f4 20 47 45 54 20 54 48  |... ..... GET TH|
00001170  45 20 4e 45 58 54 20 43  48 41 52 41 43 54 45 52  |E NEXT CHARACTER|
00001180  0d 08 c0 05 20 0d 08 ca  0f dd 20 f2 6e 65 78 74  |.... ..... .next|
00001190  63 68 61 72 0d 08 d4 0b  4b 25 3d 4b 25 2b 31 0d  |char....K%=K%+1.|
000011a0  08 de 27 e7 20 4b 25 3e  4c 25 2d 31 20 8c 20 63  |..'. K%>L%-1 . c|
000011b0  68 61 72 3d 73 70 61 63  65 20 8b 20 63 68 61 72  |har=space . char|
000011c0  3d 42 25 3f 4b 25 0d 08  e8 1d e7 20 63 68 61 72  |=B%?K%..... char|
000011d0  3c 73 70 61 63 65 20 8c  20 63 68 61 72 3d 73 70  |<space . char=sp|
000011e0  61 63 65 0d 08 f2 05 e1  0d 08 fc 05 20 0d 09 06  |ace......... ...|
000011f0  05 20 0d 09 10 1f f4 20  44 45 41 4c 20 57 49 54  |. ..... DEAL WIT|
00001200  48 20 41 20 52 45 4d 20  53 54 41 54 45 4d 45 4e  |H A REM STATEMEN|
00001210  54 0d 09 1a 05 20 0d 09  24 0a dd 20 f2 72 65 6d  |T.... ..$.. .rem|
00001220  0d 09 2e 17 f2 70 72 69  6e 74 28 63 68 61 72 2c  |.....print(char,|
00001230  64 65 63 6f 64 65 29 0d  09 38 05 f5 0d 09 42 0d  |decode)..8....B.|
00001240  f2 6e 65 78 74 63 68 61  72 0d 09 4c 2e e7 20 63  |.nextchar..L.. c|
00001250  68 61 72 3d 71 75 6f 74  65 20 8c 20 f2 74 65 78  |har=quote . .tex|
00001260  74 20 8b 20 f2 70 72 69  6e 74 28 63 68 61 72 2c  |t . .print(char,|
00001270  64 65 63 6f 64 65 29 0d  09 56 0e fd 20 4b 25 3e  |decode)..V.. K%>|
00001280  3d 4c 25 2d 31 0d 09 60  05 e1 0d 09 6a 05 20 0d  |=L%-1..`....j. .|
00001290  09 74 05 20 0d 09 7e 23  f4 20 44 45 41 4c 20 57  |.t. ..~#. DEAL W|
000012a0  49 54 48 20 54 45 58 54  20 42 45 54 57 45 45 4e  |ITH TEXT BETWEEN|
000012b0  20 51 55 4f 54 45 53 0d  09 88 05 20 0d 09 92 0b  | QUOTES.... ....|
000012c0  dd 20 f2 74 65 78 74 0d  09 9c 19 f2 70 72 69 6e  |. .text.....prin|
000012d0  74 28 63 68 61 72 2c ac  20 64 65 63 6f 64 65 29  |t(char,. decode)|
000012e0  0d 09 a6 05 f5 0d 09 b0  0d f2 6e 65 78 74 63 68  |..........nextch|
000012f0  61 72 0d 09 ba 19 f2 70  72 69 6e 74 28 63 68 61  |ar.....print(cha|
00001300  72 2c ac 20 64 65 63 6f  64 65 29 0d 09 c4 1b fd  |r,. decode).....|
00001310  20 4b 25 3e 3d 4c 25 2d  31 20 84 20 63 68 61 72  | K%>=L%-1 . char|
00001320  3d 71 75 6f 74 65 0d 09  ce 05 e1 0d 09 d8 05 20  |=quote......... |
00001330  0d 09 e2 05 20 0d 09 ec  1a f4 20 50 52 49 4e 54  |.... ..... PRINT|
00001340  20 41 20 43 48 41 52 41  43 54 45 52 20 4f 52 0d  | A CHARACTER OR.|
00001350  09 f6 15 f4 20 43 4f 4d  50 52 45 53 53 45 44 20  |.... COMPRESSED |
00001360  43 4f 44 45 0d 0a 00 05  20 0d 0a 0a 19 dd 20 f2  |CODE.... ..... .|
00001370  70 72 69 6e 74 28 63 68  61 72 2c 64 65 63 6f 64  |print(char,decod|
00001380  65 29 0d 0a 14 0a ea 20  6c 2c 41 24 0d 0a 1e 0e  |e)..... l,A$....|
00001390  41 24 3d bd 28 63 68 61  72 29 0d 0a 28 07 6c 3d  |A$=.(char)..(.l=|
000013a0  31 0d 0a 32 3c e7 20 64  65 63 6f 64 65 20 8c 20  |1..2<. decode . |
000013b0  e7 20 63 68 61 72 3e 70  72 69 6e 74 61 62 6c 65  |. char>printable|
000013c0  20 8c 20 41 24 3d 4e 41  4d 45 24 28 63 68 61 72  | . A$=NAME$(char|
000013d0  2d 31 32 38 29 3a 6c 3d  a9 28 41 24 29 0d 0a 3c  |-128):l=.(A$)..<|
000013e0  2e e7 20 ac 20 64 65 63  6f 64 65 20 8c 20 e7 20  |.. . decode . . |
000013f0  28 63 68 61 72 20 83 20  31 32 38 29 3c 73 70 61  |(char . 128)<spa|
00001400  63 65 20 8c 20 41 24 3d  22 20 22 0d 0a 46 1f e7  |ce . A$=" "..F..|
00001410  20 51 25 2b 6c 2a 6d 6f  64 65 3e 52 25 20 8c 20  | Q%+l*mode>R% . |
00001420  f2 73 74 61 72 74 6c 69  6e 65 0d 0a 50 43 e7 20  |.startline..PC. |
00001430  63 68 61 72 3d 64 65 66  69 6e 65 20 8c 20 ef 20  |char=define . . |
00001440  38 2c 31 32 39 3a e7 20  c0 59 31 24 2c 31 29 3d  |8,129:. .Y1$,1)=|
00001450  22 59 22 20 8c 20 6d 6f  64 65 3d 64 6f 75 62 6c  |"Y" . mode=doubl|
00001460  65 3a ef 20 31 2c 33 32  2c 31 2c 31 34 0d 0a 5a  |e:. 1,32,1,14..Z|
00001470  09 f1 20 41 24 3b 0d 0a  64 10 51 25 3d 51 25 2b  |.. A$;..d.Q%=Q%+|
00001480  6c 2a 6d 6f 64 65 0d 0a  6e 05 e1 0d 0a 78 05 20  |l*mode..n....x. |
00001490  0d 0a 82 05 20 0d ff                              |.... ..|
00001497
08-07-88/LISTER1.m0
08-07-88/LISTER1.m1
08-07-88/LISTER1.m2
08-07-88/LISTER1.m4
08-07-88/LISTER1.m5