Home » CEEFAX disks » telesoftware4.adl » 04-01-88/LINCOMP

04-01-88/LINCOMP

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 » telesoftware4.adl
Filename: 04-01-88/LINCOMP
Read OK:
File size: 0F43 bytes
Load address: FFFF1900
Exec address: FFFF8023
File contents
   10REM ************************
   20REM *MULTI-LINE  COMPRESSOR*
   30REM *    By John Kelk      *
   40REM *                      *
   50REM ************************
   60MODE7
   70PROCassemble
   80PRINT
   90PROCcheck
  100END
  110:
  120DEFPROCassemble
  130base1=&70:base2=&72
  140top=&74
  150linelo=&76:linehi=&77
  160yold=&78:ynew=&79
  170flag=&7A:work=&7B
  180FOR pass=0 TO 2 STEP 2
  190P%=&B00
  200[OPT pass
  210.main
  220LDA &12:SEC:SBC #2:STA top
  230LDA &13:SBC #0:STA top+1
  240LDA &18:STA base1+1
  250LDY #0:STY base1
  260STY flag
  270JSR scan1
  280LDA &18:STA base1+1:STA base2+1
  290LDY #0:STY base1:STY base2
  300JSR scan2
  310JSR end
  320RTS
  330:
  340.scan1
  350JSR checktop:BEQ endscan1
  360JSR scanline
  370LDY #0:BEQ scan1
  380.endscan1
  390RTS
  400:
  410.scanline
  420INY
  430LDX flag:BEQ nochange
  440LDX #0:STX flag
  450LDA (base1),Y
  460ORA #&80:STA (base1),Y
  470.nochange
  480INY:INY
  490.nextbyte
  500INY:LDA (base1),Y
  510CMP #13:BNE teststring
  520.nextline
  530TYA:CLC:ADC base1:STA base1
  540BCC s2
  550INC base1+1
  560.s2
  570RTS
  580.teststring
  590CMP #34:BNE testrem
  600JSR string:BEQ nextbyte
  610.testrem
  620CMP #&F4:BEQ flagline
  630.teststar
  640CMP #ASC"*":BNE testdata
  650JSR checkos:BEQ flagline
  660BNE nextbyte
  670.testdata
  680CMP #&DC:BNE testif
  690JSR markline
  700.flagline
  710INC flag
  720LDY #3:LDA (base1),Y:TAY
  730BNE nextline
  740.testif
  750CMP #&E7:BEQ flagupdate
  760.teston
  770CMP #&EE:BNE testdef
  780.flagupdate
  790INC flag:BNE nextbyte
  800.testdef
  810CMP #&DD:BNE testlinetoken
  820JSR markline:BNE nextbyte
  830.testlinetoken
  840CMP #&8D:BNE nextbyte
  850JSR linetoken
  860JMP nextbyte
  870:
  880.markline
  890STY ynew
  900LDY #1:LDA (base1),Y
  910ORA #&80:STA (base1),Y
  920LDY ynew
  930RTS
  940:
  950.string
  960INY:LDA (base1),Y
  970CMP #13:BEQ nextline
  980CMP #34:BNE string
  990RTS
 1000:
 1010.checkos
 1020CPY #4:BEQ endcheckos
 1030STY yold:DEY
 1040.c1
 1050LDA (base1),Y
 1060CMP #58:BEQ c2
 1070CMP #32:BNE c2
 1080DEY:CPY #3:BNE c1
 1090.c2
 1100PHP:LDY yold:PLP
 1110.endcheckos
 1120RTS
 1130:
 1140.linetoken
 1150INY:LDA(base1),Y:STA work
 1160AND #&30:ASL A:ASL A:STA work+1
 1170INY:LDA(base1),Y
 1180EOR work+1:STA linelo
 1190LDA work
 1200ASL A:ASL A:ASL A:ASL A:STA work+1
 1210INY:LDA (base1),Y
 1220EOR work+1:ORA #&80:STA linehi
 1230LDA base1:STA base2
 1240LDA base1+1:STA base2+1
 1250STY yold:LDY #2
 1260LDA (base1),Y:CMP linelo
 1270DEY:LDA (base1),Y:ORA #&80
 1280SBC linehi:BCC no
 1290LDA &18:STA base1+1
 1300DEY:STY base1
 1310.match
 1320LDY #2
 1330LDA (base1),Y:CMP linelo:BNE no
 1340DEY:LDA (base1),Y:ORA #&80
 1350CMP linehi:BEQ yes
 1360.no
 1370LDY #3:LDA (base1),Y:TAY
 1380JSR nextline:JMP match
 1390.yes
 1400STA (base1),Y
 1410LDY yold
 1420LDA base2:STA base1
 1430LDA base2+1:STA base1+1
 1440RTS
 1450:
 1460.scan2
 1470JSR checktop:BNE linebuild
 1480RTS
 1490.linebuild
 1500LDY #0:STY ynew:LDA (base1),Y
 1510JSR update
 1520AND #&7F
 1530JSR update:JSR update
 1540.code
 1550JSR wholeline
 1560JSR checktop:BEQ endline
 1570LDY #1:LDA (base1),Y
 1580BMI stopline
 1590LDY #3:LDA (base1),Y
 1600SEC:SBC #4:ADC ynew:BCS stopline
 1610LDA #ASC":":BNE code
 1620.stopline
 1630JSR endline:JMP scan2
 1640:
 1650.endline
 1660LDA ynew:LDY #3:STA (base2),Y
 1670CLC:ADC base2:STA base2:BCC e1
 1680INC base2+1
 1690.e1
 1700RTS
 1710:
 1720.wholeline
 1730JSR update
 1740CMP #13:BNE wholeline
 1750JMP nextline
 1760:
 1770.update
 1780INY:STY yold:LDY ynew
 1790STA (base2),Y
 1800INY:STY ynew:LDY yold
 1810LDA (base1),Y
 1820RTS
 1830:
 1840.checktop
 1850LDA base1:CMP top:BNE notequal
 1860LDA base1+1:CMP top+1
 1870.notequal
 1880RTS
 1890:
 1900.end
 1910LDY #0:LDA #&0D:STA (base2),Y
 1920INY   :LDA #&FF:STA (base2),Y
 1930TYA:SEC:ADC base2:STA &12
 1940LDA base2+1:ADC #0:STA &13
 1950RTS
 1960.fin
 1970]:NEXT
 1980ENDPROC
 1990:
 2000DEF PROCcheck
 2010LOCAL A$,B$,A%,B%,C%,T%
 2020RESTORE 2160
 2030READ A$:A%=EVAL(A$)
 2040REPEAT
 2050READ B$:IF B$="*" GOTO 2130
 2060B%=EVAL(B$):T%=0
 2070FORJ%=A%TOB%-1:T%=T%+?J%:NEXT
 2080PRINT A$;" to ";B$;
 2090PRINTSPC(25-LEN(A$+B$));
 2100READ C%
 2110IF T%=C% PRINT"O.K." ELSE PRINT "ERROR!"
 2120A$=B$:A%=B%
 2130UNTIL B$="*"
 2140ENDPROC
 2150:
 2160DATA main,scanline,5633
 2170DATA testdata,7581
 2180DATA markline,6677
 2190DATA linetoken,6656
 2200DATA match,7661
 2210DATA scan2,4659
 2220DATA endline,5286
 2230DATA fin,9116
 2240DATA *

� ************************
� *MULTI-LINE  COMPRESSOR*
� *    By John Kelk      *
(� *                      *
2� ************************
<�7
F
�assemble
P�
Z
�check
d�
n:
x��assemble
�base1=&70:base2=&72
�top=&74
�linelo=&76:linehi=&77
�yold=&78:ynew=&79
�flag=&7A:work=&7B
�� pass=0 � 2 � 2
�P%=&B00
�
[OPT pass
�	.main
�LDA &12:SEC:SBC #2:STA top
�LDA &13:SBC #0:STA top+1
�LDA &18:STA base1+1
�LDY #0:STY base1
STY flag

JSR scan1
#LDA &18:STA base1+1:STA base2+1
"LDY #0:STY base1:STY base2
,
JSR scan2
6JSR end
@RTS
J:
T
.scan1
^JSR checktop:BEQ endscan1
hJSR scanline
rLDY #0:BEQ scan1
|
.endscan1
�RTS
�:
�
.scanline
�INY
�LDX flag:BEQ nochange
�LDX #0:STX flag
�LDA (base1),Y
��A #&80:STA (base1),Y
�
.nochange
�INY:INY
�
.nextbyte
�INY:LDA (base1),Y
�CMP #13:BNE teststring

.nextline
TYA:CLC:ADC base1:STA base1

BCC s2
&INC base1+1
0.s2
:RTS
D.teststring
NCMP #34:BNE testrem
XJSR string:BEQ nextbyte
b.testrem
lCMP #&F4:BEQ flagline
v
.teststar
�CMP #�"*":BNE testdata
�JSR checkos:BEQ flagline
�BNE nextbyte
�
.testdata
�CMP #&DC:BNE testif
�JSR markline
�
.flagline
�INC flag
�LDY #3:LDA (base1),Y:TAY
�BNE nextline
�.testif
�CMP #&E7:BEQ flagupdate
�.teston
CMP #&EE:BNE testdef
.flagupdate
INC flag:BNE nextbyte
 .testdef
*CMP #&DD:BNE testlinetoken
4JSR markline:BNE nextbyte
>.testlinetoken
HCMP #&8D:BNE nextbyte
RJSR linetoken
\JMP nextbyte
f:
p
.markline
zSTY ynew
�LDY #1:LDA (base1),Y
��A #&80:STA (base1),Y
�LDY ynew
�RTS
�:
�.string
�INY:LDA (base1),Y
�CMP #13:BEQ nextline
�CMP #34:BNE string
�RTS
�:
�.checkos
�CPY #4:BEQ endcheckos
STY yold:DEY
.c1
LDA (base1),Y
$CMP #58:BEQ c2
.CMP #32:BNE c2
8DEY:CPY #3:BNE c1
B.c2
LPHP:LDY yold:PLP
V.endcheckos
`RTS
j:
t.linetoken
~INY:LDA(base1),Y:STA work
�!� #&30:ASL A:ASL A:STA work+1
�INY:LDA(base1),Y
�� work+1:STA linelo
�LDA work
�&ASL A:ASL A:ASL A:ASL A:STA work+1
�INY:LDA (base1),Y
�� work+1:�A #&80:STA linehi
�LDA base1:STA base2
�LDA base1+1:STA base2+1
�STY yold:LDY #2
�LDA (base1),Y:CMP linelo
�DEY:LDA (base1),Y:�A #&80
SBC linehi:BCC no

LDA &18:STA base1+1
DEY:STY base1

.match
(
LDY #2
2#LDA (base1),Y:CMP linelo:BNE no
<DEY:LDA (base1),Y:�A #&80
FCMP linehi:BEQ yes
P.no
ZLDY #3:LDA (base1),Y:TAY
dJSR nextline:JMP match
n.yes
xSTA (base1),Y
�LDY yold
�LDA base2:STA base1
�LDA base2+1:STA base1+1
�RTS
�:
�
.scan2
�JSR checktop:BNE linebuild
�RTS
�.linebuild
�!LDY #0:STY ynew:LDA (base1),Y
�JSR update
�
� #&7F
�JSR update:JSR update
	.code
JSR wholeline
JSR checktop:BEQ endline
"LDY #1:LDA (base1),Y
,BMI stopline
6LDY #3:LDA (base1),Y
@$SEC:SBC #4:ADC ynew:BCS stopline
JLDA #�":":BNE code
T
.stopline
^JSR endline:JMP scan2
h:
r.endline
|!LDA ynew:LDY #3:STA (base2),Y
�"CLC:ADC base2:STA base2:BCC e1
�INC base2+1
�.e1
�RTS
�:
�.wholeline
�JSR update
�CMP #13:BNE wholeline
�JMP nextline
�:
�.update
�INY:STY yold:LDY ynew
�STA (base2),Y
INY:STY ynew:LDY yold
LDA (base1),Y
RTS
&:
0
.checktop
:"LDA base1:CMP top:BNE notequal
DLDA base1+1:CMP top+1
N
.notequal
XRTS
b:
l.end
v!LDY #0:LDA #&0D:STA (base2),Y
�!INY   :LDA #&FF:STA (base2),Y
�TYA:SEC:ADC base2:STA &12
�LDA base2+1:ADC #0:STA &13
�RTS
�.fin
�]:�
��
�:
�� �check
�� A$,B$,A%,B%,C%,T%
�
� �DpH
�� A$:A%=�(A$)
��
� B$:� B$="*" � �DRH
B%=�(B$):T%=0
�J%=A%�B%-1:T%=T%+?J%:�
 � A$;" to ";B$;
*�(25-�(A$+B$));
4� C%
> � T%=C% �"O.K." � � "ERROR!"
HA$=B$:A%=B%
R� B$="*"
\�
f:
p� main,scanline,5633
z� testdata,7581
�� markline,6677
�� linetoken,6656
�� match,7661
�� scan2,4659
�� endline,5286
�� fin,9116
�� *
�
00000000  0d 00 0a 1e f4 20 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |..... **********|
00000010  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 0d 00  |**************..|
00000020  14 1e f4 20 2a 4d 55 4c  54 49 2d 4c 49 4e 45 20  |... *MULTI-LINE |
00000030  20 43 4f 4d 50 52 45 53  53 4f 52 2a 0d 00 1e 1e  | COMPRESSOR*....|
00000040  f4 20 2a 20 20 20 20 42  79 20 4a 6f 68 6e 20 4b  |. *    By John K|
00000050  65 6c 6b 20 20 20 20 20  20 2a 0d 00 28 1e f4 20  |elk      *..(.. |
00000060  2a 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |*               |
00000070  20 20 20 20 20 20 20 2a  0d 00 32 1e f4 20 2a 2a  |       *..2.. **|
00000080  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00000090  2a 2a 2a 2a 2a 2a 0d 00  3c 06 eb 37 0d 00 46 0d  |******..<..7..F.|
000000a0  f2 61 73 73 65 6d 62 6c  65 0d 00 50 05 f1 0d 00  |.assemble..P....|
000000b0  5a 0a f2 63 68 65 63 6b  0d 00 64 05 e0 0d 00 6e  |Z..check..d....n|
000000c0  05 3a 0d 00 78 0e dd f2  61 73 73 65 6d 62 6c 65  |.:..x...assemble|
000000d0  0d 00 82 17 62 61 73 65  31 3d 26 37 30 3a 62 61  |....base1=&70:ba|
000000e0  73 65 32 3d 26 37 32 0d  00 8c 0b 74 6f 70 3d 26  |se2=&72....top=&|
000000f0  37 34 0d 00 96 19 6c 69  6e 65 6c 6f 3d 26 37 36  |74....linelo=&76|
00000100  3a 6c 69 6e 65 68 69 3d  26 37 37 0d 00 a0 15 79  |:linehi=&77....y|
00000110  6f 6c 64 3d 26 37 38 3a  79 6e 65 77 3d 26 37 39  |old=&78:ynew=&79|
00000120  0d 00 aa 15 66 6c 61 67  3d 26 37 41 3a 77 6f 72  |....flag=&7A:wor|
00000130  6b 3d 26 37 42 0d 00 b4  14 e3 20 70 61 73 73 3d  |k=&7B..... pass=|
00000140  30 20 b8 20 32 20 88 20  32 0d 00 be 0b 50 25 3d  |0 . 2 . 2....P%=|
00000150  26 42 30 30 0d 00 c8 0d  5b 4f 50 54 20 70 61 73  |&B00....[OPT pas|
00000160  73 0d 00 d2 09 2e 6d 61  69 6e 0d 00 dc 1e 4c 44  |s.....main....LD|
00000170  41 20 26 31 32 3a 53 45  43 3a 53 42 43 20 23 32  |A &12:SEC:SBC #2|
00000180  3a 53 54 41 20 74 6f 70  0d 00 e6 1c 4c 44 41 20  |:STA top....LDA |
00000190  26 31 33 3a 53 42 43 20  23 30 3a 53 54 41 20 74  |&13:SBC #0:STA t|
000001a0  6f 70 2b 31 0d 00 f0 17  4c 44 41 20 26 31 38 3a  |op+1....LDA &18:|
000001b0  53 54 41 20 62 61 73 65  31 2b 31 0d 00 fa 14 4c  |STA base1+1....L|
000001c0  44 59 20 23 30 3a 53 54  59 20 62 61 73 65 31 0d  |DY #0:STY base1.|
000001d0  01 04 0c 53 54 59 20 66  6c 61 67 0d 01 0e 0d 4a  |...STY flag....J|
000001e0  53 52 20 73 63 61 6e 31  0d 01 18 23 4c 44 41 20  |SR scan1...#LDA |
000001f0  26 31 38 3a 53 54 41 20  62 61 73 65 31 2b 31 3a  |&18:STA base1+1:|
00000200  53 54 41 20 62 61 73 65  32 2b 31 0d 01 22 1e 4c  |STA base2+1..".L|
00000210  44 59 20 23 30 3a 53 54  59 20 62 61 73 65 31 3a  |DY #0:STY base1:|
00000220  53 54 59 20 62 61 73 65  32 0d 01 2c 0d 4a 53 52  |STY base2..,.JSR|
00000230  20 73 63 61 6e 32 0d 01  36 0b 4a 53 52 20 65 6e  | scan2..6.JSR en|
00000240  64 0d 01 40 07 52 54 53  0d 01 4a 05 3a 0d 01 54  |d..@.RTS..J.:..T|
00000250  0a 2e 73 63 61 6e 31 0d  01 5e 1d 4a 53 52 20 63  |..scan1..^.JSR c|
00000260  68 65 63 6b 74 6f 70 3a  42 45 51 20 65 6e 64 73  |hecktop:BEQ ends|
00000270  63 61 6e 31 0d 01 68 10  4a 53 52 20 73 63 61 6e  |can1..h.JSR scan|
00000280  6c 69 6e 65 0d 01 72 14  4c 44 59 20 23 30 3a 42  |line..r.LDY #0:B|
00000290  45 51 20 73 63 61 6e 31  0d 01 7c 0d 2e 65 6e 64  |EQ scan1..|..end|
000002a0  73 63 61 6e 31 0d 01 86  07 52 54 53 0d 01 90 05  |scan1....RTS....|
000002b0  3a 0d 01 9a 0d 2e 73 63  61 6e 6c 69 6e 65 0d 01  |:.....scanline..|
000002c0  a4 07 49 4e 59 0d 01 ae  19 4c 44 58 20 66 6c 61  |..INY....LDX fla|
000002d0  67 3a 42 45 51 20 6e 6f  63 68 61 6e 67 65 0d 01  |g:BEQ nochange..|
000002e0  b8 13 4c 44 58 20 23 30  3a 53 54 58 20 66 6c 61  |..LDX #0:STX fla|
000002f0  67 0d 01 c2 11 4c 44 41  20 28 62 61 73 65 31 29  |g....LDA (base1)|
00000300  2c 59 0d 01 cc 19 84 41  20 23 26 38 30 3a 53 54  |,Y.....A #&80:ST|
00000310  41 20 28 62 61 73 65 31  29 2c 59 0d 01 d6 0d 2e  |A (base1),Y.....|
00000320  6e 6f 63 68 61 6e 67 65  0d 01 e0 0b 49 4e 59 3a  |nochange....INY:|
00000330  49 4e 59 0d 01 ea 0d 2e  6e 65 78 74 62 79 74 65  |INY.....nextbyte|
00000340  0d 01 f4 15 49 4e 59 3a  4c 44 41 20 28 62 61 73  |....INY:LDA (bas|
00000350  65 31 29 2c 59 0d 01 fe  1a 43 4d 50 20 23 31 33  |e1),Y....CMP #13|
00000360  3a 42 4e 45 20 74 65 73  74 73 74 72 69 6e 67 0d  |:BNE teststring.|
00000370  02 08 0d 2e 6e 65 78 74  6c 69 6e 65 0d 02 12 1f  |....nextline....|
00000380  54 59 41 3a 43 4c 43 3a  41 44 43 20 62 61 73 65  |TYA:CLC:ADC base|
00000390  31 3a 53 54 41 20 62 61  73 65 31 0d 02 1c 0a 42  |1:STA base1....B|
000003a0  43 43 20 73 32 0d 02 26  0f 49 4e 43 20 62 61 73  |CC s2..&.INC bas|
000003b0  65 31 2b 31 0d 02 30 07  2e 73 32 0d 02 3a 07 52  |e1+1..0..s2..:.R|
000003c0  54 53 0d 02 44 0f 2e 74  65 73 74 73 74 72 69 6e  |TS..D..teststrin|
000003d0  67 0d 02 4e 17 43 4d 50  20 23 33 34 3a 42 4e 45  |g..N.CMP #34:BNE|
000003e0  20 74 65 73 74 72 65 6d  0d 02 58 1b 4a 53 52 20  | testrem..X.JSR |
000003f0  73 74 72 69 6e 67 3a 42  45 51 20 6e 65 78 74 62  |string:BEQ nextb|
00000400  79 74 65 0d 02 62 0c 2e  74 65 73 74 72 65 6d 0d  |yte..b..testrem.|
00000410  02 6c 19 43 4d 50 20 23  26 46 34 3a 42 45 51 20  |.l.CMP #&F4:BEQ |
00000420  66 6c 61 67 6c 69 6e 65  0d 02 76 0d 2e 74 65 73  |flagline..v..tes|
00000430  74 73 74 61 72 0d 02 80  1a 43 4d 50 20 23 97 22  |tstar....CMP #."|
00000440  2a 22 3a 42 4e 45 20 74  65 73 74 64 61 74 61 0d  |*":BNE testdata.|
00000450  02 8a 1c 4a 53 52 20 63  68 65 63 6b 6f 73 3a 42  |...JSR checkos:B|
00000460  45 51 20 66 6c 61 67 6c  69 6e 65 0d 02 94 10 42  |EQ flagline....B|
00000470  4e 45 20 6e 65 78 74 62  79 74 65 0d 02 9e 0d 2e  |NE nextbyte.....|
00000480  74 65 73 74 64 61 74 61  0d 02 a8 17 43 4d 50 20  |testdata....CMP |
00000490  23 26 44 43 3a 42 4e 45  20 74 65 73 74 69 66 0d  |#&DC:BNE testif.|
000004a0  02 b2 10 4a 53 52 20 6d  61 72 6b 6c 69 6e 65 0d  |...JSR markline.|
000004b0  02 bc 0d 2e 66 6c 61 67  6c 69 6e 65 0d 02 c6 0c  |....flagline....|
000004c0  49 4e 43 20 66 6c 61 67  0d 02 d0 1c 4c 44 59 20  |INC flag....LDY |
000004d0  23 33 3a 4c 44 41 20 28  62 61 73 65 31 29 2c 59  |#3:LDA (base1),Y|
000004e0  3a 54 41 59 0d 02 da 10  42 4e 45 20 6e 65 78 74  |:TAY....BNE next|
000004f0  6c 69 6e 65 0d 02 e4 0b  2e 74 65 73 74 69 66 0d  |line.....testif.|
00000500  02 ee 1b 43 4d 50 20 23  26 45 37 3a 42 45 51 20  |...CMP #&E7:BEQ |
00000510  66 6c 61 67 75 70 64 61  74 65 0d 02 f8 0b 2e 74  |flagupdate.....t|
00000520  65 73 74 6f 6e 0d 03 02  18 43 4d 50 20 23 26 45  |eston....CMP #&E|
00000530  45 3a 42 4e 45 20 74 65  73 74 64 65 66 0d 03 0c  |E:BNE testdef...|
00000540  0f 2e 66 6c 61 67 75 70  64 61 74 65 0d 03 16 19  |..flagupdate....|
00000550  49 4e 43 20 66 6c 61 67  3a 42 4e 45 20 6e 65 78  |INC flag:BNE nex|
00000560  74 62 79 74 65 0d 03 20  0c 2e 74 65 73 74 64 65  |tbyte.. ..testde|
00000570  66 0d 03 2a 1e 43 4d 50  20 23 26 44 44 3a 42 4e  |f..*.CMP #&DD:BN|
00000580  45 20 74 65 73 74 6c 69  6e 65 74 6f 6b 65 6e 0d  |E testlinetoken.|
00000590  03 34 1d 4a 53 52 20 6d  61 72 6b 6c 69 6e 65 3a  |.4.JSR markline:|
000005a0  42 4e 45 20 6e 65 78 74  62 79 74 65 0d 03 3e 12  |BNE nextbyte..>.|
000005b0  2e 74 65 73 74 6c 69 6e  65 74 6f 6b 65 6e 0d 03  |.testlinetoken..|
000005c0  48 19 43 4d 50 20 23 26  38 44 3a 42 4e 45 20 6e  |H.CMP #&8D:BNE n|
000005d0  65 78 74 62 79 74 65 0d  03 52 11 4a 53 52 20 6c  |extbyte..R.JSR l|
000005e0  69 6e 65 74 6f 6b 65 6e  0d 03 5c 10 4a 4d 50 20  |inetoken..\.JMP |
000005f0  6e 65 78 74 62 79 74 65  0d 03 66 05 3a 0d 03 70  |nextbyte..f.:..p|
00000600  0d 2e 6d 61 72 6b 6c 69  6e 65 0d 03 7a 0c 53 54  |..markline..z.ST|
00000610  59 20 79 6e 65 77 0d 03  84 18 4c 44 59 20 23 31  |Y ynew....LDY #1|
00000620  3a 4c 44 41 20 28 62 61  73 65 31 29 2c 59 0d 03  |:LDA (base1),Y..|
00000630  8e 19 84 41 20 23 26 38  30 3a 53 54 41 20 28 62  |...A #&80:STA (b|
00000640  61 73 65 31 29 2c 59 0d  03 98 0c 4c 44 59 20 79  |ase1),Y....LDY y|
00000650  6e 65 77 0d 03 a2 07 52  54 53 0d 03 ac 05 3a 0d  |new....RTS....:.|
00000660  03 b6 0b 2e 73 74 72 69  6e 67 0d 03 c0 15 49 4e  |....string....IN|
00000670  59 3a 4c 44 41 20 28 62  61 73 65 31 29 2c 59 0d  |Y:LDA (base1),Y.|
00000680  03 ca 18 43 4d 50 20 23  31 33 3a 42 45 51 20 6e  |...CMP #13:BEQ n|
00000690  65 78 74 6c 69 6e 65 0d  03 d4 16 43 4d 50 20 23  |extline....CMP #|
000006a0  33 34 3a 42 4e 45 20 73  74 72 69 6e 67 0d 03 de  |34:BNE string...|
000006b0  07 52 54 53 0d 03 e8 05  3a 0d 03 f2 0c 2e 63 68  |.RTS....:.....ch|
000006c0  65 63 6b 6f 73 0d 03 fc  19 43 50 59 20 23 34 3a  |eckos....CPY #4:|
000006d0  42 45 51 20 65 6e 64 63  68 65 63 6b 6f 73 0d 04  |BEQ endcheckos..|
000006e0  06 10 53 54 59 20 79 6f  6c 64 3a 44 45 59 0d 04  |..STY yold:DEY..|
000006f0  10 07 2e 63 31 0d 04 1a  11 4c 44 41 20 28 62 61  |...c1....LDA (ba|
00000700  73 65 31 29 2c 59 0d 04  24 12 43 4d 50 20 23 35  |se1),Y..$.CMP #5|
00000710  38 3a 42 45 51 20 63 32  0d 04 2e 12 43 4d 50 20  |8:BEQ c2....CMP |
00000720  23 33 32 3a 42 4e 45 20  63 32 0d 04 38 15 44 45  |#32:BNE c2..8.DE|
00000730  59 3a 43 50 59 20 23 33  3a 42 4e 45 20 63 31 0d  |Y:CPY #3:BNE c1.|
00000740  04 42 07 2e 63 32 0d 04  4c 14 50 48 50 3a 4c 44  |.B..c2..L.PHP:LD|
00000750  59 20 79 6f 6c 64 3a 50  4c 50 0d 04 56 0f 2e 65  |Y yold:PLP..V..e|
00000760  6e 64 63 68 65 63 6b 6f  73 0d 04 60 07 52 54 53  |ndcheckos..`.RTS|
00000770  0d 04 6a 05 3a 0d 04 74  0e 2e 6c 69 6e 65 74 6f  |..j.:..t..lineto|
00000780  6b 65 6e 0d 04 7e 1d 49  4e 59 3a 4c 44 41 28 62  |ken..~.INY:LDA(b|
00000790  61 73 65 31 29 2c 59 3a  53 54 41 20 77 6f 72 6b  |ase1),Y:STA work|
000007a0  0d 04 88 21 80 20 23 26  33 30 3a 41 53 4c 20 41  |...!. #&30:ASL A|
000007b0  3a 41 53 4c 20 41 3a 53  54 41 20 77 6f 72 6b 2b  |:ASL A:STA work+|
000007c0  31 0d 04 92 14 49 4e 59  3a 4c 44 41 28 62 61 73  |1....INY:LDA(bas|
000007d0  65 31 29 2c 59 0d 04 9c  17 82 20 77 6f 72 6b 2b  |e1),Y..... work+|
000007e0  31 3a 53 54 41 20 6c 69  6e 65 6c 6f 0d 04 a6 0c  |1:STA linelo....|
000007f0  4c 44 41 20 77 6f 72 6b  0d 04 b0 26 41 53 4c 20  |LDA work...&ASL |
00000800  41 3a 41 53 4c 20 41 3a  41 53 4c 20 41 3a 41 53  |A:ASL A:ASL A:AS|
00000810  4c 20 41 3a 53 54 41 20  77 6f 72 6b 2b 31 0d 04  |L A:STA work+1..|
00000820  ba 15 49 4e 59 3a 4c 44  41 20 28 62 61 73 65 31  |..INY:LDA (base1|
00000830  29 2c 59 0d 04 c4 1f 82  20 77 6f 72 6b 2b 31 3a  |),Y..... work+1:|
00000840  84 41 20 23 26 38 30 3a  53 54 41 20 6c 69 6e 65  |.A #&80:STA line|
00000850  68 69 0d 04 ce 17 4c 44  41 20 62 61 73 65 31 3a  |hi....LDA base1:|
00000860  53 54 41 20 62 61 73 65  32 0d 04 d8 1b 4c 44 41  |STA base2....LDA|
00000870  20 62 61 73 65 31 2b 31  3a 53 54 41 20 62 61 73  | base1+1:STA bas|
00000880  65 32 2b 31 0d 04 e2 13  53 54 59 20 79 6f 6c 64  |e2+1....STY yold|
00000890  3a 4c 44 59 20 23 32 0d  04 ec 1c 4c 44 41 20 28  |:LDY #2....LDA (|
000008a0  62 61 73 65 31 29 2c 59  3a 43 4d 50 20 6c 69 6e  |base1),Y:CMP lin|
000008b0  65 6c 6f 0d 04 f6 1d 44  45 59 3a 4c 44 41 20 28  |elo....DEY:LDA (|
000008c0  62 61 73 65 31 29 2c 59  3a 84 41 20 23 26 38 30  |base1),Y:.A #&80|
000008d0  0d 05 00 15 53 42 43 20  6c 69 6e 65 68 69 3a 42  |....SBC linehi:B|
000008e0  43 43 20 6e 6f 0d 05 0a  17 4c 44 41 20 26 31 38  |CC no....LDA &18|
000008f0  3a 53 54 41 20 62 61 73  65 31 2b 31 0d 05 14 11  |:STA base1+1....|
00000900  44 45 59 3a 53 54 59 20  62 61 73 65 31 0d 05 1e  |DEY:STY base1...|
00000910  0a 2e 6d 61 74 63 68 0d  05 28 0a 4c 44 59 20 23  |..match..(.LDY #|
00000920  32 0d 05 32 23 4c 44 41  20 28 62 61 73 65 31 29  |2..2#LDA (base1)|
00000930  2c 59 3a 43 4d 50 20 6c  69 6e 65 6c 6f 3a 42 4e  |,Y:CMP linelo:BN|
00000940  45 20 6e 6f 0d 05 3c 1d  44 45 59 3a 4c 44 41 20  |E no..<.DEY:LDA |
00000950  28 62 61 73 65 31 29 2c  59 3a 84 41 20 23 26 38  |(base1),Y:.A #&8|
00000960  30 0d 05 46 16 43 4d 50  20 6c 69 6e 65 68 69 3a  |0..F.CMP linehi:|
00000970  42 45 51 20 79 65 73 0d  05 50 07 2e 6e 6f 0d 05  |BEQ yes..P..no..|
00000980  5a 1c 4c 44 59 20 23 33  3a 4c 44 41 20 28 62 61  |Z.LDY #3:LDA (ba|
00000990  73 65 31 29 2c 59 3a 54  41 59 0d 05 64 1a 4a 53  |se1),Y:TAY..d.JS|
000009a0  52 20 6e 65 78 74 6c 69  6e 65 3a 4a 4d 50 20 6d  |R nextline:JMP m|
000009b0  61 74 63 68 0d 05 6e 08  2e 79 65 73 0d 05 78 11  |atch..n..yes..x.|
000009c0  53 54 41 20 28 62 61 73  65 31 29 2c 59 0d 05 82  |STA (base1),Y...|
000009d0  0c 4c 44 59 20 79 6f 6c  64 0d 05 8c 17 4c 44 41  |.LDY yold....LDA|
000009e0  20 62 61 73 65 32 3a 53  54 41 20 62 61 73 65 31  | base2:STA base1|
000009f0  0d 05 96 1b 4c 44 41 20  62 61 73 65 32 2b 31 3a  |....LDA base2+1:|
00000a00  53 54 41 20 62 61 73 65  31 2b 31 0d 05 a0 07 52  |STA base1+1....R|
00000a10  54 53 0d 05 aa 05 3a 0d  05 b4 0a 2e 73 63 61 6e  |TS....:.....scan|
00000a20  32 0d 05 be 1e 4a 53 52  20 63 68 65 63 6b 74 6f  |2....JSR checkto|
00000a30  70 3a 42 4e 45 20 6c 69  6e 65 62 75 69 6c 64 0d  |p:BNE linebuild.|
00000a40  05 c8 07 52 54 53 0d 05  d2 0e 2e 6c 69 6e 65 62  |...RTS.....lineb|
00000a50  75 69 6c 64 0d 05 dc 21  4c 44 59 20 23 30 3a 53  |uild...!LDY #0:S|
00000a60  54 59 20 79 6e 65 77 3a  4c 44 41 20 28 62 61 73  |TY ynew:LDA (bas|
00000a70  65 31 29 2c 59 0d 05 e6  0e 4a 53 52 20 75 70 64  |e1),Y....JSR upd|
00000a80  61 74 65 0d 05 f0 0a 80  20 23 26 37 46 0d 05 fa  |ate..... #&7F...|
00000a90  19 4a 53 52 20 75 70 64  61 74 65 3a 4a 53 52 20  |.JSR update:JSR |
00000aa0  75 70 64 61 74 65 0d 06  04 09 2e 63 6f 64 65 0d  |update.....code.|
00000ab0  06 0e 11 4a 53 52 20 77  68 6f 6c 65 6c 69 6e 65  |...JSR wholeline|
00000ac0  0d 06 18 1c 4a 53 52 20  63 68 65 63 6b 74 6f 70  |....JSR checktop|
00000ad0  3a 42 45 51 20 65 6e 64  6c 69 6e 65 0d 06 22 18  |:BEQ endline..".|
00000ae0  4c 44 59 20 23 31 3a 4c  44 41 20 28 62 61 73 65  |LDY #1:LDA (base|
00000af0  31 29 2c 59 0d 06 2c 10  42 4d 49 20 73 74 6f 70  |1),Y..,.BMI stop|
00000b00  6c 69 6e 65 0d 06 36 18  4c 44 59 20 23 33 3a 4c  |line..6.LDY #3:L|
00000b10  44 41 20 28 62 61 73 65  31 29 2c 59 0d 06 40 24  |DA (base1),Y..@$|
00000b20  53 45 43 3a 53 42 43 20  23 34 3a 41 44 43 20 79  |SEC:SBC #4:ADC y|
00000b30  6e 65 77 3a 42 43 53 20  73 74 6f 70 6c 69 6e 65  |new:BCS stopline|
00000b40  0d 06 4a 16 4c 44 41 20  23 97 22 3a 22 3a 42 4e  |..J.LDA #.":":BN|
00000b50  45 20 63 6f 64 65 0d 06  54 0d 2e 73 74 6f 70 6c  |E code..T..stopl|
00000b60  69 6e 65 0d 06 5e 19 4a  53 52 20 65 6e 64 6c 69  |ine..^.JSR endli|
00000b70  6e 65 3a 4a 4d 50 20 73  63 61 6e 32 0d 06 68 05  |ne:JMP scan2..h.|
00000b80  3a 0d 06 72 0c 2e 65 6e  64 6c 69 6e 65 0d 06 7c  |:..r..endline..||
00000b90  21 4c 44 41 20 79 6e 65  77 3a 4c 44 59 20 23 33  |!LDA ynew:LDY #3|
00000ba0  3a 53 54 41 20 28 62 61  73 65 32 29 2c 59 0d 06  |:STA (base2),Y..|
00000bb0  86 22 43 4c 43 3a 41 44  43 20 62 61 73 65 32 3a  |."CLC:ADC base2:|
00000bc0  53 54 41 20 62 61 73 65  32 3a 42 43 43 20 65 31  |STA base2:BCC e1|
00000bd0  0d 06 90 0f 49 4e 43 20  62 61 73 65 32 2b 31 0d  |....INC base2+1.|
00000be0  06 9a 07 2e 65 31 0d 06  a4 07 52 54 53 0d 06 ae  |....e1....RTS...|
00000bf0  05 3a 0d 06 b8 0e 2e 77  68 6f 6c 65 6c 69 6e 65  |.:.....wholeline|
00000c00  0d 06 c2 0e 4a 53 52 20  75 70 64 61 74 65 0d 06  |....JSR update..|
00000c10  cc 19 43 4d 50 20 23 31  33 3a 42 4e 45 20 77 68  |..CMP #13:BNE wh|
00000c20  6f 6c 65 6c 69 6e 65 0d  06 d6 10 4a 4d 50 20 6e  |oleline....JMP n|
00000c30  65 78 74 6c 69 6e 65 0d  06 e0 05 3a 0d 06 ea 0b  |extline....:....|
00000c40  2e 75 70 64 61 74 65 0d  06 f4 19 49 4e 59 3a 53  |.update....INY:S|
00000c50  54 59 20 79 6f 6c 64 3a  4c 44 59 20 79 6e 65 77  |TY yold:LDY ynew|
00000c60  0d 06 fe 11 53 54 41 20  28 62 61 73 65 32 29 2c  |....STA (base2),|
00000c70  59 0d 07 08 19 49 4e 59  3a 53 54 59 20 79 6e 65  |Y....INY:STY yne|
00000c80  77 3a 4c 44 59 20 79 6f  6c 64 0d 07 12 11 4c 44  |w:LDY yold....LD|
00000c90  41 20 28 62 61 73 65 31  29 2c 59 0d 07 1c 07 52  |A (base1),Y....R|
00000ca0  54 53 0d 07 26 05 3a 0d  07 30 0d 2e 63 68 65 63  |TS..&.:..0..chec|
00000cb0  6b 74 6f 70 0d 07 3a 22  4c 44 41 20 62 61 73 65  |ktop..:"LDA base|
00000cc0  31 3a 43 4d 50 20 74 6f  70 3a 42 4e 45 20 6e 6f  |1:CMP top:BNE no|
00000cd0  74 65 71 75 61 6c 0d 07  44 19 4c 44 41 20 62 61  |tequal..D.LDA ba|
00000ce0  73 65 31 2b 31 3a 43 4d  50 20 74 6f 70 2b 31 0d  |se1+1:CMP top+1.|
00000cf0  07 4e 0d 2e 6e 6f 74 65  71 75 61 6c 0d 07 58 07  |.N..notequal..X.|
00000d00  52 54 53 0d 07 62 05 3a  0d 07 6c 08 2e 65 6e 64  |RTS..b.:..l..end|
00000d10  0d 07 76 21 4c 44 59 20  23 30 3a 4c 44 41 20 23  |..v!LDY #0:LDA #|
00000d20  26 30 44 3a 53 54 41 20  28 62 61 73 65 32 29 2c  |&0D:STA (base2),|
00000d30  59 0d 07 80 21 49 4e 59  20 20 20 3a 4c 44 41 20  |Y...!INY   :LDA |
00000d40  23 26 46 46 3a 53 54 41  20 28 62 61 73 65 32 29  |#&FF:STA (base2)|
00000d50  2c 59 0d 07 8a 1d 54 59  41 3a 53 45 43 3a 41 44  |,Y....TYA:SEC:AD|
00000d60  43 20 62 61 73 65 32 3a  53 54 41 20 26 31 32 0d  |C base2:STA &12.|
00000d70  07 94 1e 4c 44 41 20 62  61 73 65 32 2b 31 3a 41  |...LDA base2+1:A|
00000d80  44 43 20 23 30 3a 53 54  41 20 26 31 33 0d 07 9e  |DC #0:STA &13...|
00000d90  07 52 54 53 0d 07 a8 08  2e 66 69 6e 0d 07 b2 07  |.RTS.....fin....|
00000da0  5d 3a ed 0d 07 bc 05 e1  0d 07 c6 05 3a 0d 07 d0  |]:..........:...|
00000db0  0c dd 20 f2 63 68 65 63  6b 0d 07 da 17 ea 20 41  |.. .check..... A|
00000dc0  24 2c 42 24 2c 41 25 2c  42 25 2c 43 25 2c 54 25  |$,B$,A%,B%,C%,T%|
00000dd0  0d 07 e4 0a f7 20 8d 44  70 48 0d 07 ee 11 f3 20  |..... .DpH..... |
00000de0  41 24 3a 41 25 3d a0 28  41 24 29 0d 07 f8 05 f5  |A$:A%=.(A$).....|
00000df0  0d 08 02 18 f3 20 42 24  3a e7 20 42 24 3d 22 2a  |..... B$:. B$="*|
00000e00  22 20 e5 20 8d 44 52 48  0d 08 0c 11 42 25 3d a0  |" . .DRH....B%=.|
00000e10  28 42 24 29 3a 54 25 3d  30 0d 08 16 1b e3 4a 25  |(B$):T%=0.....J%|
00000e20  3d 41 25 b8 42 25 2d 31  3a 54 25 3d 54 25 2b 3f  |=A%.B%-1:T%=T%+?|
00000e30  4a 25 3a ed 0d 08 20 13  f1 20 41 24 3b 22 20 74  |J%:... .. A$;" t|
00000e40  6f 20 22 3b 42 24 3b 0d  08 2a 14 f1 89 28 32 35  |o ";B$;..*...(25|
00000e50  2d a9 28 41 24 2b 42 24  29 29 3b 0d 08 34 08 f3  |-.(A$+B$));..4..|
00000e60  20 43 25 0d 08 3e 20 e7  20 54 25 3d 43 25 20 f1  | C%..> . T%=C% .|
00000e70  22 4f 2e 4b 2e 22 20 8b  20 f1 20 22 45 52 52 4f  |"O.K." . . "ERRO|
00000e80  52 21 22 0d 08 48 0f 41  24 3d 42 24 3a 41 25 3d  |R!"..H.A$=B$:A%=|
00000e90  42 25 0d 08 52 0c fd 20  42 24 3d 22 2a 22 0d 08  |B%..R.. B$="*"..|
00000ea0  5c 05 e1 0d 08 66 05 3a  0d 08 70 18 dc 20 6d 61  |\....f.:..p.. ma|
00000eb0  69 6e 2c 73 63 61 6e 6c  69 6e 65 2c 35 36 33 33  |in,scanline,5633|
00000ec0  0d 08 7a 13 dc 20 74 65  73 74 64 61 74 61 2c 37  |..z.. testdata,7|
00000ed0  35 38 31 0d 08 84 13 dc  20 6d 61 72 6b 6c 69 6e  |581..... marklin|
00000ee0  65 2c 36 36 37 37 0d 08  8e 14 dc 20 6c 69 6e 65  |e,6677..... line|
00000ef0  74 6f 6b 65 6e 2c 36 36  35 36 0d 08 98 10 dc 20  |token,6656..... |
00000f00  6d 61 74 63 68 2c 37 36  36 31 0d 08 a2 10 dc 20  |match,7661..... |
00000f10  73 63 61 6e 32 2c 34 36  35 39 0d 08 ac 12 dc 20  |scan2,4659..... |
00000f20  65 6e 64 6c 69 6e 65 2c  35 32 38 36 0d 08 b6 0e  |endline,5286....|
00000f30  dc 20 66 69 6e 2c 39 31  31 36 0d 08 c0 07 dc 20  |. fin,9116..... |
00000f40  2a 0d ff                                          |*..|
00000f43
04-01-88/LINCOMP.m0
04-01-88/LINCOMP.m1
04-01-88/LINCOMP.m2
04-01-88/LINCOMP.m4
04-01-88/LINCOMP.m5