Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape12a_acorn_eu_1990_june.wav » PACKER

PACKER

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 » Personal collection » Acorn tapes » Electron_User » Electron_User_tape12a_acorn_eu_1990_june.wav
Filename: PACKER
Read OK:
File size: 1600 bytes
Load address: 2000
Exec address: 1900
Duplicates

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

File contents
   10REM *********************
   20REM * BASIC Packer 0.3  *
   30REM *  by Chris Nixon   *
   40REM * (c) Electron User *
   50REM *********************
   60REM
   70MODE7:ptr=&70:ptr1=&72:ptr2=&74
   80len=&76:len1=&77:num1=&78:num2=&79
   90num3=&7A:lo=&7B:hi=&7C:tenthou=&7D
  100thou=&7E:hund=&7F:ten=&80:num=&81
  110size=&82:charptr=&84:top=&12
  120FORPASS=0TO2STEP2:P%=&900
  130[OPT PASS
  140LDA #intro MOD 256:STA &50
  150LDA #intro DIV 256:STA &51
  160JSR message:JSR &FFE7
  170LDA #mess1 MOD 256:STA &50
  180LDA #mess1 DIV 256:STA &51
  190JSR message:JSR setup:JSR strip
  200LDA #13:JSR &FFEE
  210LDA #mess2 MOD 256:STA &50
  220LDA #mess2 DIV 256:STA &51
  230JSR message:JSR setup:JMP pack
  240.strip
  250JSR getlen:BCC doline:RTS
  260.doline
  270JSR getchar:CMP #32
  280BNE checkcolon:JSR findlead
  290BCC nextchar:JSR findtrail
  300JMP nextchar
  310.checkcolon
  320CMP #ASC":":BNE checksemi
  330JSR findcolon:JMP nextchar
  340.checksemi
  350CMP #ASC";":BNE nextchar
  360JSR findsemi
  370.nextchar
  380INC charptr:LDA charptr:CMP len
  390BCC doline:CLC:ADC ptr:STA ptr
  400LDA ptr+1:ADC #0:STA ptr+1
  410JMP strip
  420.getlen
  430LDY #1:LDA (ptr),Y:CMP #&FF
  440BNE notend:SEC:RTS
  450.notend
  460LDY #3:LDA (ptr),Y:STA len:INY
  470STY charptr:CLC:RTS
  480.getchar
  490LDY charptr:LDA (ptr),Y:RTS
  500.findlead
  510INC charptr:JSR getchar
  520DEC charptr:CMP #&80
  530BCS leadfound:SEC:RTS
  540.leadfound
  550JSR compress:CLC:RTS
  560.findtrail
  570LDA charptr:CMP #4:BNE trail1:RTS
  580.trail1
  590DEC charptr:JSR getchar
  600INC charptr:CMP #&80
  610BCS trailfound:RTS
  620.trailfound
  630JMP compress
  640.findcolon
  650DEC charptr:JSR getchar
  660INC charptr:CMP #&F5
  670BEQ colonfound:RTS
  680.colonfound
  690JMP compress
  700.findsemi
  710INC charptr:JSR getchar
  720DEC charptr:CMP #&8A
  730BNE findquote1:JMP compress
  740.findquote1
  750CMP #34:BEQ compress:RTS
  760.compress
  770DEC len:LDY #3:LDA (ptr),Y:SEC
  780SBC #1:STA (ptr),Y:CLC
  790LDA charptr:ADC ptr:STA ptr1
  800LDA ptr+1:ADC #0:STA ptr1+1
  810.squash
  820LDY #1:LDA (ptr1),Y:DEY
  830STA (ptr1),Y:INC ptr1:BNE skip
  840INC ptr1+1
  850.skip
  860LDA ptr1+1:CMP top+1:BNE squash
  870LDA ptr1:CMP top:BNE squash:SEC
  880LDA top:SBC #1:STA top:LDA top+1
  890SBC #0:STA top+1:RTS
  900.setup
  910LDA #0:STA ptr:LDA &18:STA ptr+1
  920RTS
  930.pack
  940LDY #1:LDA (ptr),Y:CMP #255
  950BNE cont:JMP &FFE7
  960.cont
  970LDY #3:LDA (ptr),Y:STA len:CLC
  980ADC ptr:STA ptr1:LDA ptr+1:ADC #0
  990STA ptr1+1:LDY #1:LDA (ptr1),Y
 1000CMP #255:BNE cont1:JMP &FFE7
 1010.cont1
 1020LDY #2:LDA (ptr1),Y:STA lo
 1030DEY:LDA (ptr1),Y:STA hi:JSR print
 1040LDY #3:LDA (ptr1),Y:STA len1
 1050CLC:ADC len:STA size:LDA #0:ADC #0:STA size+1:LDA size+1:BNE newline:LDA size:CMP #238:BCS newline
 1060INY:LDA (ptr),Y:CMP #&DC
 1070BEQ newline:CMP #42:BEQ newline
 1080CMP #&F4:BEQ newline:LDA (ptr1),Y
 1090CMP #&DD:BEQ newline
 1100.checkDATA
 1110CMP #&DC:BEQ reject
 1120PHA:JSR findIF:PLA:BCS newline
 1130.checkREM
 1140CMP #&F4:BNE checkREF
 1150.reject
 1160JSR findendline:JSR findendline
 1170JMP pack
 1180.checkREF
 1190JSR findGOTO:BCS newline
 1200JSR concatenate:JMP pack
 1210.newline
 1220CLC:LDA len:ADC ptr:STA ptr
 1230LDA ptr+1:ADC #0:STA ptr+1
 1240JMP pack
 1250.concatenate
 1260CLC:LDA len:ADC len1:SEC:SBC #3
 1270LDY #3:STA (ptr),Y:LDA #ASC":"
 1280LDY #0:STA (ptr1),Y:CLC:LDA ptr1
 1290ADC #1:STA ptr1:LDA ptr1+1:ADC #0
 1300STA ptr1+1:JSR packit
 1310JSR packit:JMP packit
 1320.findendline
 1330LDY #3:LDA (ptr),Y:CLC:ADC ptr
 1340STA ptr:LDA ptr+1:ADC #0
 1350STA ptr+1:RTS
 1360.packit
 1370LDA ptr1:STA ptr2
 1380LDA ptr1+1:STA ptr2+1
 1390.shunt
 1400LDY #1:LDA (ptr2),Y:DEY
 1410STA (ptr2),Y:INC ptr2:BNE skip1
 1420INC ptr2+1
 1430.skip1
 1440LDA ptr2+1:CMP top+1:BNE shunt
 1450LDA ptr2:CMP top:BNE shunt
 1460SEC:LDA top:SBC #1:STA top
 1470LDA top+1:SBC #0:STA top+1:RTS
 1480.findIF
 1490LDY #4
 1500.ifloop
 1510LDA (ptr),Y:CMP #&E7:BEQ foundIF
 1520CMP #42:BEQ foundIF:CMP #&F4
 1530BEQ foundIF:INY:CPY len:BCC ifloop
 1540CLC:RTS
 1550.foundIF
 1560SEC:RTS
 1570.findGOTO
 1580LDY #1:LDA (ptr1),Y:STA hi:INY
 1590LDA (ptr1),Y:STA lo:LDA #64
 1600STA num1:STA num2:STA num3
 1610LDA lo:AND #63:ORA num2:STA num2
 1620LDA hi:AND #63:ORA num3:STA num3
 1630LDA lo:AND #192:EOR #64:LSR A
 1640LSR A:ORA num1:STA num1
 1650LDA hi:AND #192:EOR #64:LSR A
 1660LSR A:LSR A:LSR A:ORA num1
 1670STA num1:LDA #0:STA ptr2
 1680LDA &18:STA ptr2+1
 1690.findmatch
 1700LDY #0:LDA (ptr2),Y:CMP #&8D
 1710BNE next:INY:LDA (ptr2),Y
 1720CMP num1:BNE next:INY:LDA (ptr2),Y
 1730CMP num2:BNE next:INY:LDA (ptr2),Y
 1740CMP num3:BNE next:SEC:RTS
 1750.next
 1760CLC:LDA ptr2:ADC #1:STA ptr2
 1770LDA ptr2+1:ADC #0:STA ptr2+1
 1780CMP top+1:BNE findmatch:LDA ptr2
 1790CMP top:BNE findmatch:CLC:RTS
 1800.print
 1810LDA #8:JSR &FFEE:JSR &FFEE
 1820JSR &FFEE:JSR &FFEE:JSR &FFEE
 1830LDA #0:STA tenthou:STA thou
 1840STA hund:STA ten
 1850.dotenthou
 1860SEC:LDA lo:SBC #10000 MOD 256
 1870STA num:LDA hi:SBC #10000 DIV 256
 1880BCC dothou:STA hi:LDA num:STA lo
 1890INC tenthou:JMP dotenthou
 1900.dothou
 1910SEC:LDA lo:SBC #1000 MOD 256
 1920STA num:LDA hi:SBC #1000 DIV 256
 1930BCC dohund:STA hi:LDA num:STA lo
 1940INC thou:JMP dothou
 1950.dohund
 1960SEC:LDA lo:SBC #100:STA num
 1970LDA hi:SBC #0:BCC doten:STA hi
 1980LDA num:STA lo:INC hund:JMP dohund
 1990.doten
 2000SEC:LDA lo:SBC #10:STA num
 2010LDA hi:SBC #0:BCC output:STA hi
 2020LDA num:STA lo:INC ten:JMP doten
 2030.output
 2040LDA tenthou:CLC:ADC #48:JSR &FFEE
 2050LDA thou:CLC:ADC #48:JSR &FFEE
 2060LDA hund:CLC:ADC #48:JSR &FFEE
 2070LDA ten:CLC:ADC #48:JSR &FFEE
 2080LDA lo:CLC:ADC #48:JMP &FFEE
 2090.message
 2100LDY #0
 2110.messloop
 2120LDA (&50),Y:CMP #13:BEQ exitmess
 2130JSR &FFEE:INY:JMP messloop
 2140.exitmess
 2150RTS
 2160.intro:OPT FNequs("BASIC packer version 0.3")
 2170.mess1:OPT FNequs("Stripping spaces...")
 2180.mess2:OPT FNequs("Packing line: 00000")
 2190]:NEXT
 2200$&7000="SAVE PACK 900 "+STR$~P%
 2210X%=0:Y%=&70:CALL&FFF7
 2220END
 2230DEF FNequs(A$)
 2240$P%=A$:P%=P%+LENA$+1
 2250=PASS

� *********************
� * BASIC Packer 0.3  *
� *  by Chris Nixon   *
(� * (c) Electron User *
2� *********************
<�
F �7:ptr=&70:ptr1=&72:ptr2=&74
P&len=&76:len1=&77:num1=&78:num2=&79
Z&num3=&7A:lo=&7B:hi=&7C:tenthou=&7D
d%thou=&7E:hund=&7F:ten=&80:num=&81
n size=&82:charptr=&84:top=&12
x�PASS=0�2�2:P%=&900
�
[OPT PASS
�LDA #intro � 256:STA &50
�LDA #intro � 256:STA &51
�JSR message:JSR &FFE7
�LDA #mess1 � 256:STA &50
�LDA #mess1 � 256:STA &51
�#JSR message:JSR setup:JSR strip
�LDA #13:JSR &FFEE
�LDA #mess2 � 256:STA &50
�LDA #mess2 � 256:STA &51
�"JSR message:JSR setup:JMP pack
�
.strip
�JSR getlen:BCC doline:RTS
.doline
JSR getchar:CMP #32
BNE checkcolon:JSR findlead
"BCC nextchar:JSR findtrail
,JMP nextchar
6.checkcolon
@CMP #�":":BNE checksemi
JJSR findcolon:JMP nextchar
T.checksemi
^CMP #�";":BNE nextchar
hJSR findsemi
r
.nextchar
|#INC charptr:LDA charptr:CMP len
�"BCC doline:CLC:ADC ptr:STA ptr
�LDA ptr+1:ADC #0:STA ptr+1
�
JMP strip
�.getlen
�LDY #1:LDA (ptr),Y:CMP #&FF
�BNE notend:SEC:RTS
�.notend
�"LDY #3:LDA (ptr),Y:STA len:INY
�STY charptr:CLC:RTS
�.getchar
�LDY charptr:LDA (ptr),Y:RTS
�
.findlead
�INC charptr:JSR getchar
DEC charptr:CMP #&80
BCS leadfound:SEC:RTS
.leadfound
&JSR compress:CLC:RTS
0.findtrail
:%LDA charptr:CMP #4:BNE trail1:RTS
D.trail1
NDEC charptr:JSR getchar
XINC charptr:CMP #&80
bBCS trailfound:RTS
l.trailfound
vJMP compress
�.findcolon
�DEC charptr:JSR getchar
�INC charptr:CMP #&F5
�BEQ colonfound:RTS
�.colonfound
�JMP compress
�
.findsemi
�INC charptr:JSR getchar
�DEC charptr:CMP #&8A
�BNE findquote1:JMP compress
�.findquote1
�CMP #34:BEQ compress:RTS
�
.compress
"DEC len:LDY #3:LDA (ptr),Y:SEC
SBC #1:STA (ptr),Y:CLC
 LDA charptr:ADC ptr:STA ptr1
 LDA ptr+1:ADC #0:STA ptr1+1
*.squash
4LDY #1:LDA (ptr1),Y:DEY
>"STA (ptr1),Y:INC ptr1:BNE skip
HINC ptr1+1
R	.skip
\#LDA ptr1+1:CMP top+1:BNE squash
f#LDA ptr1:CMP top:BNE squash:SEC
p$LDA top:SBC #1:STA top:LDA top+1
zSBC #0:STA top+1:RTS
�
.setup
�$LDA #0:STA ptr:LDA &18:STA ptr+1
�RTS
�	.pack
�LDY #1:LDA (ptr),Y:CMP #255
�BNE cont:JMP &FFE7
�	.cont
�"LDY #3:LDA (ptr),Y:STA len:CLC
�%ADC ptr:STA ptr1:LDA ptr+1:ADC #0
�"STA ptr1+1:LDY #1:LDA (ptr1),Y
� CMP #255:BNE cont1:JMP &FFE7
�
.cont1
�LDY #2:LDA (ptr1),Y:STA lo
%DEY:LDA (ptr1),Y:STA hi:JSR print
 LDY #3:LDA (ptr1),Y:STA len1
fCLC:ADC len:STA size:LDA #0:ADC #0:STA size+1:LDA size+1:BNE newline:LDA size:CMP #238:BCS newline
$INY:LDA (ptr),Y:CMP #&DC
.#BEQ newline:CMP #42:BEQ newline
8%CMP #&F4:BEQ newline:LDA (ptr1),Y
BCMP #&DD:BEQ newline
L.checkDATA
VCMP #&DC:BEQ reject
`"PHA:JSR findIF:PLA:BCS newline
j
.checkREM
tCMP #&F4:BNE checkREF
~.reject
�#JSR findendline:JSR findendline
�JMP pack
�
.checkREF
�JSR findGOTO:BCS newline
�JSR concatenate:JMP pack
�.newline
�CLC:LDA len:ADC ptr:STA ptr
�LDA ptr+1:ADC #0:STA ptr+1
�JMP pack
�.concatenate
�#CLC:LDA len:ADC len1:SEC:SBC #3
� LDY #3:STA (ptr),Y:LDA #�":"
$LDY #0:STA (ptr1),Y:CLC:LDA ptr1

%ADC #1:STA ptr1:LDA ptr1+1:ADC #0
STA ptr1+1:JSR packit
JSR packit:JMP packit
(.findendline
2"LDY #3:LDA (ptr),Y:CLC:ADC ptr
<STA ptr:LDA ptr+1:ADC #0
FSTA ptr+1:RTS
P.packit
ZLDA ptr1:STA ptr2
dLDA ptr1+1:STA ptr2+1
n
.shunt
xLDY #1:LDA (ptr2),Y:DEY
�#STA (ptr2),Y:INC ptr2:BNE skip1
�INC ptr2+1
�
.skip1
�"LDA ptr2+1:CMP top+1:BNE shunt
�LDA ptr2:CMP top:BNE shunt
�SEC:LDA top:SBC #1:STA top
�"LDA top+1:SBC #0:STA top+1:RTS
�.findIF
�
LDY #4
�.ifloop
�$LDA (ptr),Y:CMP #&E7:BEQ foundIF
� CMP #42:BEQ foundIF:CMP #&F4
�&BEQ foundIF:INY:CPY len:BCC ifloop
CLC:RTS
.foundIF
SEC:RTS
"
.findGOTO
,"LDY #1:LDA (ptr1),Y:STA hi:INY
6LDA (ptr1),Y:STA lo:LDA #64
@STA num1:STA num2:STA num3
J!LDA lo:� #63:�A num2:STA num2
T!LDA hi:� #63:�A num3:STA num3
^LDA lo:� #192:� #64:LSR A
hLSR A:�A num1:STA num1
rLDA hi:� #192:� #64:LSR A
|LSR A:LSR A:LSR A:�A num1
�STA num1:LDA #0:STA ptr2
�LDA &18:STA ptr2+1
�.findmatch
� LDY #0:LDA (ptr2),Y:CMP #&8D
�BNE next:INY:LDA (ptr2),Y
�&CMP num1:BNE next:INY:LDA (ptr2),Y
�&CMP num2:BNE next:INY:LDA (ptr2),Y
�CMP num3:BNE next:SEC:RTS
�	.next
� CLC:LDA ptr2:ADC #1:STA ptr2
� LDA ptr2+1:ADC #0:STA ptr2+1
�$CMP top+1:BNE findmatch:LDA ptr2
�!CMP top:BNE findmatch:CLC:RTS

.print
LDA #8:JSR &FFEE:JSR &FFEE
!JSR &FFEE:JSR &FFEE:JSR &FFEE
&LDA #0:STA tenthou:STA thou
0STA hund:STA ten
:.dotenthou
DSEC:LDA lo:SBC #10000 � 256
N#STA num:LDA hi:SBC #10000 � 256
X$BCC dothou:STA hi:LDA num:STA lo
bINC tenthou:JMP dotenthou
l.dothou
vSEC:LDA lo:SBC #1000 � 256
�"STA num:LDA hi:SBC #1000 � 256
�$BCC dohund:STA hi:LDA num:STA lo
�INC thou:JMP dothou
�.dohund
�SEC:LDA lo:SBC #100:STA num
�"LDA hi:SBC #0:BCC doten:STA hi
�&LDA num:STA lo:INC hund:JMP dohund
�
.doten
�SEC:LDA lo:SBC #10:STA num
�#LDA hi:SBC #0:BCC output:STA hi
�$LDA num:STA lo:INC ten:JMP doten
�.output
�%LDA tenthou:CLC:ADC #48:JSR &FFEE
"LDA thou:CLC:ADC #48:JSR &FFEE
"LDA hund:CLC:ADC #48:JSR &FFEE
!LDA ten:CLC:ADC #48:JSR &FFEE
  LDA lo:CLC:ADC #48:JMP &FFEE
*.message
4
LDY #0
>
.messloop
H$LDA (&50),Y:CMP #13:BEQ exitmess
RJSR &FFEE:INY:JMP messloop
\
.exitmess
fRTS
p0.intro:OPT �equs("BASIC packer version 0.3")
z+.mess1:OPT �equs("Stripping spaces...")
�+.mess2:OPT �equs("Packing line: 00000")
�]:�
� $&7000="SAVE PACK 900 "+�~P%
�X%=0:Y%=&70:�&FFF7
��
�� �equs(A$)
�$P%=A$:P%=P%+�A$+1
�	=PASS
�
00000000  0d 00 0a 1b f4 20 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |..... **********|
00000010  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 0d 00 14 1b f4  |***********.....|
00000020  20 2a 20 42 41 53 49 43  20 50 61 63 6b 65 72 20  | * BASIC Packer |
00000030  30 2e 33 20 20 2a 0d 00  1e 1b f4 20 2a 20 20 62  |0.3  *..... *  b|
00000040  79 20 43 68 72 69 73 20  4e 69 78 6f 6e 20 20 20  |y Chris Nixon   |
00000050  2a 0d 00 28 1b f4 20 2a  20 28 63 29 20 45 6c 65  |*..(.. * (c) Ele|
00000060  63 74 72 6f 6e 20 55 73  65 72 20 2a 0d 00 32 1b  |ctron User *..2.|
00000070  f4 20 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |. **************|
00000080  2a 2a 2a 2a 2a 2a 2a 0d  00 3c 05 f4 0d 00 46 20  |*******..<....F |
00000090  eb 37 3a 70 74 72 3d 26  37 30 3a 70 74 72 31 3d  |.7:ptr=&70:ptr1=|
000000a0  26 37 32 3a 70 74 72 32  3d 26 37 34 0d 00 50 26  |&72:ptr2=&74..P&|
000000b0  6c 65 6e 3d 26 37 36 3a  6c 65 6e 31 3d 26 37 37  |len=&76:len1=&77|
000000c0  3a 6e 75 6d 31 3d 26 37  38 3a 6e 75 6d 32 3d 26  |:num1=&78:num2=&|
000000d0  37 39 0d 00 5a 26 6e 75  6d 33 3d 26 37 41 3a 6c  |79..Z&num3=&7A:l|
000000e0  6f 3d 26 37 42 3a 68 69  3d 26 37 43 3a 74 65 6e  |o=&7B:hi=&7C:ten|
000000f0  74 68 6f 75 3d 26 37 44  0d 00 64 25 74 68 6f 75  |thou=&7D..d%thou|
00000100  3d 26 37 45 3a 68 75 6e  64 3d 26 37 46 3a 74 65  |=&7E:hund=&7F:te|
00000110  6e 3d 26 38 30 3a 6e 75  6d 3d 26 38 31 0d 00 6e  |n=&80:num=&81..n|
00000120  20 73 69 7a 65 3d 26 38  32 3a 63 68 61 72 70 74  | size=&82:charpt|
00000130  72 3d 26 38 34 3a 74 6f  70 3d 26 31 32 0d 00 78  |r=&84:top=&12..x|
00000140  17 e3 50 41 53 53 3d 30  b8 32 88 32 3a 50 25 3d  |..PASS=0.2.2:P%=|
00000150  26 39 30 30 0d 00 82 0d  5b 4f 50 54 20 50 41 53  |&900....[OPT PAS|
00000160  53 0d 00 8c 1c 4c 44 41  20 23 69 6e 74 72 6f 20  |S....LDA #intro |
00000170  83 20 32 35 36 3a 53 54  41 20 26 35 30 0d 00 96  |. 256:STA &50...|
00000180  1c 4c 44 41 20 23 69 6e  74 72 6f 20 81 20 32 35  |.LDA #intro . 25|
00000190  36 3a 53 54 41 20 26 35  31 0d 00 a0 19 4a 53 52  |6:STA &51....JSR|
000001a0  20 6d 65 73 73 61 67 65  3a 4a 53 52 20 26 46 46  | message:JSR &FF|
000001b0  45 37 0d 00 aa 1c 4c 44  41 20 23 6d 65 73 73 31  |E7....LDA #mess1|
000001c0  20 83 20 32 35 36 3a 53  54 41 20 26 35 30 0d 00  | . 256:STA &50..|
000001d0  b4 1c 4c 44 41 20 23 6d  65 73 73 31 20 81 20 32  |..LDA #mess1 . 2|
000001e0  35 36 3a 53 54 41 20 26  35 31 0d 00 be 23 4a 53  |56:STA &51...#JS|
000001f0  52 20 6d 65 73 73 61 67  65 3a 4a 53 52 20 73 65  |R message:JSR se|
00000200  74 75 70 3a 4a 53 52 20  73 74 72 69 70 0d 00 c8  |tup:JSR strip...|
00000210  15 4c 44 41 20 23 31 33  3a 4a 53 52 20 26 46 46  |.LDA #13:JSR &FF|
00000220  45 45 0d 00 d2 1c 4c 44  41 20 23 6d 65 73 73 32  |EE....LDA #mess2|
00000230  20 83 20 32 35 36 3a 53  54 41 20 26 35 30 0d 00  | . 256:STA &50..|
00000240  dc 1c 4c 44 41 20 23 6d  65 73 73 32 20 81 20 32  |..LDA #mess2 . 2|
00000250  35 36 3a 53 54 41 20 26  35 31 0d 00 e6 22 4a 53  |56:STA &51..."JS|
00000260  52 20 6d 65 73 73 61 67  65 3a 4a 53 52 20 73 65  |R message:JSR se|
00000270  74 75 70 3a 4a 4d 50 20  70 61 63 6b 0d 00 f0 0a  |tup:JMP pack....|
00000280  2e 73 74 72 69 70 0d 00  fa 1d 4a 53 52 20 67 65  |.strip....JSR ge|
00000290  74 6c 65 6e 3a 42 43 43  20 64 6f 6c 69 6e 65 3a  |tlen:BCC doline:|
000002a0  52 54 53 0d 01 04 0b 2e  64 6f 6c 69 6e 65 0d 01  |RTS.....doline..|
000002b0  0e 17 4a 53 52 20 67 65  74 63 68 61 72 3a 43 4d  |..JSR getchar:CM|
000002c0  50 20 23 33 32 0d 01 18  1f 42 4e 45 20 63 68 65  |P #32....BNE che|
000002d0  63 6b 63 6f 6c 6f 6e 3a  4a 53 52 20 66 69 6e 64  |ckcolon:JSR find|
000002e0  6c 65 61 64 0d 01 22 1e  42 43 43 20 6e 65 78 74  |lead..".BCC next|
000002f0  63 68 61 72 3a 4a 53 52  20 66 69 6e 64 74 72 61  |char:JSR findtra|
00000300  69 6c 0d 01 2c 10 4a 4d  50 20 6e 65 78 74 63 68  |il..,.JMP nextch|
00000310  61 72 0d 01 36 0f 2e 63  68 65 63 6b 63 6f 6c 6f  |ar..6..checkcolo|
00000320  6e 0d 01 40 1b 43 4d 50  20 23 97 22 3a 22 3a 42  |n..@.CMP #.":":B|
00000330  4e 45 20 63 68 65 63 6b  73 65 6d 69 0d 01 4a 1e  |NE checksemi..J.|
00000340  4a 53 52 20 66 69 6e 64  63 6f 6c 6f 6e 3a 4a 4d  |JSR findcolon:JM|
00000350  50 20 6e 65 78 74 63 68  61 72 0d 01 54 0e 2e 63  |P nextchar..T..c|
00000360  68 65 63 6b 73 65 6d 69  0d 01 5e 1a 43 4d 50 20  |hecksemi..^.CMP |
00000370  23 97 22 3b 22 3a 42 4e  45 20 6e 65 78 74 63 68  |#.";":BNE nextch|
00000380  61 72 0d 01 68 10 4a 53  52 20 66 69 6e 64 73 65  |ar..h.JSR findse|
00000390  6d 69 0d 01 72 0d 2e 6e  65 78 74 63 68 61 72 0d  |mi..r..nextchar.|
000003a0  01 7c 23 49 4e 43 20 63  68 61 72 70 74 72 3a 4c  |.|#INC charptr:L|
000003b0  44 41 20 63 68 61 72 70  74 72 3a 43 4d 50 20 6c  |DA charptr:CMP l|
000003c0  65 6e 0d 01 86 22 42 43  43 20 64 6f 6c 69 6e 65  |en..."BCC doline|
000003d0  3a 43 4c 43 3a 41 44 43  20 70 74 72 3a 53 54 41  |:CLC:ADC ptr:STA|
000003e0  20 70 74 72 0d 01 90 1e  4c 44 41 20 70 74 72 2b  | ptr....LDA ptr+|
000003f0  31 3a 41 44 43 20 23 30  3a 53 54 41 20 70 74 72  |1:ADC #0:STA ptr|
00000400  2b 31 0d 01 9a 0d 4a 4d  50 20 73 74 72 69 70 0d  |+1....JMP strip.|
00000410  01 a4 0b 2e 67 65 74 6c  65 6e 0d 01 ae 1f 4c 44  |....getlen....LD|
00000420  59 20 23 31 3a 4c 44 41  20 28 70 74 72 29 2c 59  |Y #1:LDA (ptr),Y|
00000430  3a 43 4d 50 20 23 26 46  46 0d 01 b8 16 42 4e 45  |:CMP #&FF....BNE|
00000440  20 6e 6f 74 65 6e 64 3a  53 45 43 3a 52 54 53 0d  | notend:SEC:RTS.|
00000450  01 c2 0b 2e 6e 6f 74 65  6e 64 0d 01 cc 22 4c 44  |....notend..."LD|
00000460  59 20 23 33 3a 4c 44 41  20 28 70 74 72 29 2c 59  |Y #3:LDA (ptr),Y|
00000470  3a 53 54 41 20 6c 65 6e  3a 49 4e 59 0d 01 d6 17  |:STA len:INY....|
00000480  53 54 59 20 63 68 61 72  70 74 72 3a 43 4c 43 3a  |STY charptr:CLC:|
00000490  52 54 53 0d 01 e0 0c 2e  67 65 74 63 68 61 72 0d  |RTS.....getchar.|
000004a0  01 ea 1f 4c 44 59 20 63  68 61 72 70 74 72 3a 4c  |...LDY charptr:L|
000004b0  44 41 20 28 70 74 72 29  2c 59 3a 52 54 53 0d 01  |DA (ptr),Y:RTS..|
000004c0  f4 0d 2e 66 69 6e 64 6c  65 61 64 0d 01 fe 1b 49  |...findlead....I|
000004d0  4e 43 20 63 68 61 72 70  74 72 3a 4a 53 52 20 67  |NC charptr:JSR g|
000004e0  65 74 63 68 61 72 0d 02  08 18 44 45 43 20 63 68  |etchar....DEC ch|
000004f0  61 72 70 74 72 3a 43 4d  50 20 23 26 38 30 0d 02  |arptr:CMP #&80..|
00000500  12 19 42 43 53 20 6c 65  61 64 66 6f 75 6e 64 3a  |..BCS leadfound:|
00000510  53 45 43 3a 52 54 53 0d  02 1c 0e 2e 6c 65 61 64  |SEC:RTS.....lead|
00000520  66 6f 75 6e 64 0d 02 26  18 4a 53 52 20 63 6f 6d  |found..&.JSR com|
00000530  70 72 65 73 73 3a 43 4c  43 3a 52 54 53 0d 02 30  |press:CLC:RTS..0|
00000540  0e 2e 66 69 6e 64 74 72  61 69 6c 0d 02 3a 25 4c  |..findtrail..:%L|
00000550  44 41 20 63 68 61 72 70  74 72 3a 43 4d 50 20 23  |DA charptr:CMP #|
00000560  34 3a 42 4e 45 20 74 72  61 69 6c 31 3a 52 54 53  |4:BNE trail1:RTS|
00000570  0d 02 44 0b 2e 74 72 61  69 6c 31 0d 02 4e 1b 44  |..D..trail1..N.D|
00000580  45 43 20 63 68 61 72 70  74 72 3a 4a 53 52 20 67  |EC charptr:JSR g|
00000590  65 74 63 68 61 72 0d 02  58 18 49 4e 43 20 63 68  |etchar..X.INC ch|
000005a0  61 72 70 74 72 3a 43 4d  50 20 23 26 38 30 0d 02  |arptr:CMP #&80..|
000005b0  62 16 42 43 53 20 74 72  61 69 6c 66 6f 75 6e 64  |b.BCS trailfound|
000005c0  3a 52 54 53 0d 02 6c 0f  2e 74 72 61 69 6c 66 6f  |:RTS..l..trailfo|
000005d0  75 6e 64 0d 02 76 10 4a  4d 50 20 63 6f 6d 70 72  |und..v.JMP compr|
000005e0  65 73 73 0d 02 80 0e 2e  66 69 6e 64 63 6f 6c 6f  |ess.....findcolo|
000005f0  6e 0d 02 8a 1b 44 45 43  20 63 68 61 72 70 74 72  |n....DEC charptr|
00000600  3a 4a 53 52 20 67 65 74  63 68 61 72 0d 02 94 18  |:JSR getchar....|
00000610  49 4e 43 20 63 68 61 72  70 74 72 3a 43 4d 50 20  |INC charptr:CMP |
00000620  23 26 46 35 0d 02 9e 16  42 45 51 20 63 6f 6c 6f  |#&F5....BEQ colo|
00000630  6e 66 6f 75 6e 64 3a 52  54 53 0d 02 a8 0f 2e 63  |nfound:RTS.....c|
00000640  6f 6c 6f 6e 66 6f 75 6e  64 0d 02 b2 10 4a 4d 50  |olonfound....JMP|
00000650  20 63 6f 6d 70 72 65 73  73 0d 02 bc 0d 2e 66 69  | compress.....fi|
00000660  6e 64 73 65 6d 69 0d 02  c6 1b 49 4e 43 20 63 68  |ndsemi....INC ch|
00000670  61 72 70 74 72 3a 4a 53  52 20 67 65 74 63 68 61  |arptr:JSR getcha|
00000680  72 0d 02 d0 18 44 45 43  20 63 68 61 72 70 74 72  |r....DEC charptr|
00000690  3a 43 4d 50 20 23 26 38  41 0d 02 da 1f 42 4e 45  |:CMP #&8A....BNE|
000006a0  20 66 69 6e 64 71 75 6f  74 65 31 3a 4a 4d 50 20  | findquote1:JMP |
000006b0  63 6f 6d 70 72 65 73 73  0d 02 e4 0f 2e 66 69 6e  |compress.....fin|
000006c0  64 71 75 6f 74 65 31 0d  02 ee 1c 43 4d 50 20 23  |dquote1....CMP #|
000006d0  33 34 3a 42 45 51 20 63  6f 6d 70 72 65 73 73 3a  |34:BEQ compress:|
000006e0  52 54 53 0d 02 f8 0d 2e  63 6f 6d 70 72 65 73 73  |RTS.....compress|
000006f0  0d 03 02 22 44 45 43 20  6c 65 6e 3a 4c 44 59 20  |..."DEC len:LDY |
00000700  23 33 3a 4c 44 41 20 28  70 74 72 29 2c 59 3a 53  |#3:LDA (ptr),Y:S|
00000710  45 43 0d 03 0c 1a 53 42  43 20 23 31 3a 53 54 41  |EC....SBC #1:STA|
00000720  20 28 70 74 72 29 2c 59  3a 43 4c 43 0d 03 16 20  | (ptr),Y:CLC... |
00000730  4c 44 41 20 63 68 61 72  70 74 72 3a 41 44 43 20  |LDA charptr:ADC |
00000740  70 74 72 3a 53 54 41 20  70 74 72 31 0d 03 20 1f  |ptr:STA ptr1.. .|
00000750  4c 44 41 20 70 74 72 2b  31 3a 41 44 43 20 23 30  |LDA ptr+1:ADC #0|
00000760  3a 53 54 41 20 70 74 72  31 2b 31 0d 03 2a 0b 2e  |:STA ptr1+1..*..|
00000770  73 71 75 61 73 68 0d 03  34 1b 4c 44 59 20 23 31  |squash..4.LDY #1|
00000780  3a 4c 44 41 20 28 70 74  72 31 29 2c 59 3a 44 45  |:LDA (ptr1),Y:DE|
00000790  59 0d 03 3e 22 53 54 41  20 28 70 74 72 31 29 2c  |Y..>"STA (ptr1),|
000007a0  59 3a 49 4e 43 20 70 74  72 31 3a 42 4e 45 20 73  |Y:INC ptr1:BNE s|
000007b0  6b 69 70 0d 03 48 0e 49  4e 43 20 70 74 72 31 2b  |kip..H.INC ptr1+|
000007c0  31 0d 03 52 09 2e 73 6b  69 70 0d 03 5c 23 4c 44  |1..R..skip..\#LD|
000007d0  41 20 70 74 72 31 2b 31  3a 43 4d 50 20 74 6f 70  |A ptr1+1:CMP top|
000007e0  2b 31 3a 42 4e 45 20 73  71 75 61 73 68 0d 03 66  |+1:BNE squash..f|
000007f0  23 4c 44 41 20 70 74 72  31 3a 43 4d 50 20 74 6f  |#LDA ptr1:CMP to|
00000800  70 3a 42 4e 45 20 73 71  75 61 73 68 3a 53 45 43  |p:BNE squash:SEC|
00000810  0d 03 70 24 4c 44 41 20  74 6f 70 3a 53 42 43 20  |..p$LDA top:SBC |
00000820  23 31 3a 53 54 41 20 74  6f 70 3a 4c 44 41 20 74  |#1:STA top:LDA t|
00000830  6f 70 2b 31 0d 03 7a 18  53 42 43 20 23 30 3a 53  |op+1..z.SBC #0:S|
00000840  54 41 20 74 6f 70 2b 31  3a 52 54 53 0d 03 84 0a  |TA top+1:RTS....|
00000850  2e 73 65 74 75 70 0d 03  8e 24 4c 44 41 20 23 30  |.setup...$LDA #0|
00000860  3a 53 54 41 20 70 74 72  3a 4c 44 41 20 26 31 38  |:STA ptr:LDA &18|
00000870  3a 53 54 41 20 70 74 72  2b 31 0d 03 98 07 52 54  |:STA ptr+1....RT|
00000880  53 0d 03 a2 09 2e 70 61  63 6b 0d 03 ac 1f 4c 44  |S.....pack....LD|
00000890  59 20 23 31 3a 4c 44 41  20 28 70 74 72 29 2c 59  |Y #1:LDA (ptr),Y|
000008a0  3a 43 4d 50 20 23 32 35  35 0d 03 b6 16 42 4e 45  |:CMP #255....BNE|
000008b0  20 63 6f 6e 74 3a 4a 4d  50 20 26 46 46 45 37 0d  | cont:JMP &FFE7.|
000008c0  03 c0 09 2e 63 6f 6e 74  0d 03 ca 22 4c 44 59 20  |....cont..."LDY |
000008d0  23 33 3a 4c 44 41 20 28  70 74 72 29 2c 59 3a 53  |#3:LDA (ptr),Y:S|
000008e0  54 41 20 6c 65 6e 3a 43  4c 43 0d 03 d4 25 41 44  |TA len:CLC...%AD|
000008f0  43 20 70 74 72 3a 53 54  41 20 70 74 72 31 3a 4c  |C ptr:STA ptr1:L|
00000900  44 41 20 70 74 72 2b 31  3a 41 44 43 20 23 30 0d  |DA ptr+1:ADC #0.|
00000910  03 de 22 53 54 41 20 70  74 72 31 2b 31 3a 4c 44  |.."STA ptr1+1:LD|
00000920  59 20 23 31 3a 4c 44 41  20 28 70 74 72 31 29 2c  |Y #1:LDA (ptr1),|
00000930  59 0d 03 e8 20 43 4d 50  20 23 32 35 35 3a 42 4e  |Y... CMP #255:BN|
00000940  45 20 63 6f 6e 74 31 3a  4a 4d 50 20 26 46 46 45  |E cont1:JMP &FFE|
00000950  37 0d 03 f2 0a 2e 63 6f  6e 74 31 0d 03 fc 1e 4c  |7.....cont1....L|
00000960  44 59 20 23 32 3a 4c 44  41 20 28 70 74 72 31 29  |DY #2:LDA (ptr1)|
00000970  2c 59 3a 53 54 41 20 6c  6f 0d 04 06 25 44 45 59  |,Y:STA lo...%DEY|
00000980  3a 4c 44 41 20 28 70 74  72 31 29 2c 59 3a 53 54  |:LDA (ptr1),Y:ST|
00000990  41 20 68 69 3a 4a 53 52  20 70 72 69 6e 74 0d 04  |A hi:JSR print..|
000009a0  10 20 4c 44 59 20 23 33  3a 4c 44 41 20 28 70 74  |. LDY #3:LDA (pt|
000009b0  72 31 29 2c 59 3a 53 54  41 20 6c 65 6e 31 0d 04  |r1),Y:STA len1..|
000009c0  1a 66 43 4c 43 3a 41 44  43 20 6c 65 6e 3a 53 54  |.fCLC:ADC len:ST|
000009d0  41 20 73 69 7a 65 3a 4c  44 41 20 23 30 3a 41 44  |A size:LDA #0:AD|
000009e0  43 20 23 30 3a 53 54 41  20 73 69 7a 65 2b 31 3a  |C #0:STA size+1:|
000009f0  4c 44 41 20 73 69 7a 65  2b 31 3a 42 4e 45 20 6e  |LDA size+1:BNE n|
00000a00  65 77 6c 69 6e 65 3a 4c  44 41 20 73 69 7a 65 3a  |ewline:LDA size:|
00000a10  43 4d 50 20 23 32 33 38  3a 42 43 53 20 6e 65 77  |CMP #238:BCS new|
00000a20  6c 69 6e 65 0d 04 24 1c  49 4e 59 3a 4c 44 41 20  |line..$.INY:LDA |
00000a30  28 70 74 72 29 2c 59 3a  43 4d 50 20 23 26 44 43  |(ptr),Y:CMP #&DC|
00000a40  0d 04 2e 23 42 45 51 20  6e 65 77 6c 69 6e 65 3a  |...#BEQ newline:|
00000a50  43 4d 50 20 23 34 32 3a  42 45 51 20 6e 65 77 6c  |CMP #42:BEQ newl|
00000a60  69 6e 65 0d 04 38 25 43  4d 50 20 23 26 46 34 3a  |ine..8%CMP #&F4:|
00000a70  42 45 51 20 6e 65 77 6c  69 6e 65 3a 4c 44 41 20  |BEQ newline:LDA |
00000a80  28 70 74 72 31 29 2c 59  0d 04 42 18 43 4d 50 20  |(ptr1),Y..B.CMP |
00000a90  23 26 44 44 3a 42 45 51  20 6e 65 77 6c 69 6e 65  |#&DD:BEQ newline|
00000aa0  0d 04 4c 0e 2e 63 68 65  63 6b 44 41 54 41 0d 04  |..L..checkDATA..|
00000ab0  56 17 43 4d 50 20 23 26  44 43 3a 42 45 51 20 72  |V.CMP #&DC:BEQ r|
00000ac0  65 6a 65 63 74 0d 04 60  22 50 48 41 3a 4a 53 52  |eject..`"PHA:JSR|
00000ad0  20 66 69 6e 64 49 46 3a  50 4c 41 3a 42 43 53 20  | findIF:PLA:BCS |
00000ae0  6e 65 77 6c 69 6e 65 0d  04 6a 0d 2e 63 68 65 63  |newline..j..chec|
00000af0  6b 52 45 4d 0d 04 74 19  43 4d 50 20 23 26 46 34  |kREM..t.CMP #&F4|
00000b00  3a 42 4e 45 20 63 68 65  63 6b 52 45 46 0d 04 7e  |:BNE checkREF..~|
00000b10  0b 2e 72 65 6a 65 63 74  0d 04 88 23 4a 53 52 20  |..reject...#JSR |
00000b20  66 69 6e 64 65 6e 64 6c  69 6e 65 3a 4a 53 52 20  |findendline:JSR |
00000b30  66 69 6e 64 65 6e 64 6c  69 6e 65 0d 04 92 0c 4a  |findendline....J|
00000b40  4d 50 20 70 61 63 6b 0d  04 9c 0d 2e 63 68 65 63  |MP pack.....chec|
00000b50  6b 52 45 46 0d 04 a6 1c  4a 53 52 20 66 69 6e 64  |kREF....JSR find|
00000b60  47 4f 54 4f 3a 42 43 53  20 6e 65 77 6c 69 6e 65  |GOTO:BCS newline|
00000b70  0d 04 b0 1c 4a 53 52 20  63 6f 6e 63 61 74 65 6e  |....JSR concaten|
00000b80  61 74 65 3a 4a 4d 50 20  70 61 63 6b 0d 04 ba 0c  |ate:JMP pack....|
00000b90  2e 6e 65 77 6c 69 6e 65  0d 04 c4 1f 43 4c 43 3a  |.newline....CLC:|
00000ba0  4c 44 41 20 6c 65 6e 3a  41 44 43 20 70 74 72 3a  |LDA len:ADC ptr:|
00000bb0  53 54 41 20 70 74 72 0d  04 ce 1e 4c 44 41 20 70  |STA ptr....LDA p|
00000bc0  74 72 2b 31 3a 41 44 43  20 23 30 3a 53 54 41 20  |tr+1:ADC #0:STA |
00000bd0  70 74 72 2b 31 0d 04 d8  0c 4a 4d 50 20 70 61 63  |ptr+1....JMP pac|
00000be0  6b 0d 04 e2 10 2e 63 6f  6e 63 61 74 65 6e 61 74  |k.....concatenat|
00000bf0  65 0d 04 ec 23 43 4c 43  3a 4c 44 41 20 6c 65 6e  |e...#CLC:LDA len|
00000c00  3a 41 44 43 20 6c 65 6e  31 3a 53 45 43 3a 53 42  |:ADC len1:SEC:SB|
00000c10  43 20 23 33 0d 04 f6 20  4c 44 59 20 23 33 3a 53  |C #3... LDY #3:S|
00000c20  54 41 20 28 70 74 72 29  2c 59 3a 4c 44 41 20 23  |TA (ptr),Y:LDA #|
00000c30  97 22 3a 22 0d 05 00 24  4c 44 59 20 23 30 3a 53  |.":"...$LDY #0:S|
00000c40  54 41 20 28 70 74 72 31  29 2c 59 3a 43 4c 43 3a  |TA (ptr1),Y:CLC:|
00000c50  4c 44 41 20 70 74 72 31  0d 05 0a 25 41 44 43 20  |LDA ptr1...%ADC |
00000c60  23 31 3a 53 54 41 20 70  74 72 31 3a 4c 44 41 20  |#1:STA ptr1:LDA |
00000c70  70 74 72 31 2b 31 3a 41  44 43 20 23 30 0d 05 14  |ptr1+1:ADC #0...|
00000c80  19 53 54 41 20 70 74 72  31 2b 31 3a 4a 53 52 20  |.STA ptr1+1:JSR |
00000c90  70 61 63 6b 69 74 0d 05  1e 19 4a 53 52 20 70 61  |packit....JSR pa|
00000ca0  63 6b 69 74 3a 4a 4d 50  20 70 61 63 6b 69 74 0d  |ckit:JMP packit.|
00000cb0  05 28 10 2e 66 69 6e 64  65 6e 64 6c 69 6e 65 0d  |.(..findendline.|
00000cc0  05 32 22 4c 44 59 20 23  33 3a 4c 44 41 20 28 70  |.2"LDY #3:LDA (p|
00000cd0  74 72 29 2c 59 3a 43 4c  43 3a 41 44 43 20 70 74  |tr),Y:CLC:ADC pt|
00000ce0  72 0d 05 3c 1c 53 54 41  20 70 74 72 3a 4c 44 41  |r..<.STA ptr:LDA|
00000cf0  20 70 74 72 2b 31 3a 41  44 43 20 23 30 0d 05 46  | ptr+1:ADC #0..F|
00000d00  11 53 54 41 20 70 74 72  2b 31 3a 52 54 53 0d 05  |.STA ptr+1:RTS..|
00000d10  50 0b 2e 70 61 63 6b 69  74 0d 05 5a 15 4c 44 41  |P..packit..Z.LDA|
00000d20  20 70 74 72 31 3a 53 54  41 20 70 74 72 32 0d 05  | ptr1:STA ptr2..|
00000d30  64 19 4c 44 41 20 70 74  72 31 2b 31 3a 53 54 41  |d.LDA ptr1+1:STA|
00000d40  20 70 74 72 32 2b 31 0d  05 6e 0a 2e 73 68 75 6e  | ptr2+1..n..shun|
00000d50  74 0d 05 78 1b 4c 44 59  20 23 31 3a 4c 44 41 20  |t..x.LDY #1:LDA |
00000d60  28 70 74 72 32 29 2c 59  3a 44 45 59 0d 05 82 23  |(ptr2),Y:DEY...#|
00000d70  53 54 41 20 28 70 74 72  32 29 2c 59 3a 49 4e 43  |STA (ptr2),Y:INC|
00000d80  20 70 74 72 32 3a 42 4e  45 20 73 6b 69 70 31 0d  | ptr2:BNE skip1.|
00000d90  05 8c 0e 49 4e 43 20 70  74 72 32 2b 31 0d 05 96  |...INC ptr2+1...|
00000da0  0a 2e 73 6b 69 70 31 0d  05 a0 22 4c 44 41 20 70  |..skip1..."LDA p|
00000db0  74 72 32 2b 31 3a 43 4d  50 20 74 6f 70 2b 31 3a  |tr2+1:CMP top+1:|
00000dc0  42 4e 45 20 73 68 75 6e  74 0d 05 aa 1e 4c 44 41  |BNE shunt....LDA|
00000dd0  20 70 74 72 32 3a 43 4d  50 20 74 6f 70 3a 42 4e  | ptr2:CMP top:BN|
00000de0  45 20 73 68 75 6e 74 0d  05 b4 1e 53 45 43 3a 4c  |E shunt....SEC:L|
00000df0  44 41 20 74 6f 70 3a 53  42 43 20 23 31 3a 53 54  |DA top:SBC #1:ST|
00000e00  41 20 74 6f 70 0d 05 be  22 4c 44 41 20 74 6f 70  |A top..."LDA top|
00000e10  2b 31 3a 53 42 43 20 23  30 3a 53 54 41 20 74 6f  |+1:SBC #0:STA to|
00000e20  70 2b 31 3a 52 54 53 0d  05 c8 0b 2e 66 69 6e 64  |p+1:RTS.....find|
00000e30  49 46 0d 05 d2 0a 4c 44  59 20 23 34 0d 05 dc 0b  |IF....LDY #4....|
00000e40  2e 69 66 6c 6f 6f 70 0d  05 e6 24 4c 44 41 20 28  |.ifloop...$LDA (|
00000e50  70 74 72 29 2c 59 3a 43  4d 50 20 23 26 45 37 3a  |ptr),Y:CMP #&E7:|
00000e60  42 45 51 20 66 6f 75 6e  64 49 46 0d 05 f0 20 43  |BEQ foundIF... C|
00000e70  4d 50 20 23 34 32 3a 42  45 51 20 66 6f 75 6e 64  |MP #42:BEQ found|
00000e80  49 46 3a 43 4d 50 20 23  26 46 34 0d 05 fa 26 42  |IF:CMP #&F4...&B|
00000e90  45 51 20 66 6f 75 6e 64  49 46 3a 49 4e 59 3a 43  |EQ foundIF:INY:C|
00000ea0  50 59 20 6c 65 6e 3a 42  43 43 20 69 66 6c 6f 6f  |PY len:BCC ifloo|
00000eb0  70 0d 06 04 0b 43 4c 43  3a 52 54 53 0d 06 0e 0c  |p....CLC:RTS....|
00000ec0  2e 66 6f 75 6e 64 49 46  0d 06 18 0b 53 45 43 3a  |.foundIF....SEC:|
00000ed0  52 54 53 0d 06 22 0d 2e  66 69 6e 64 47 4f 54 4f  |RTS.."..findGOTO|
00000ee0  0d 06 2c 22 4c 44 59 20  23 31 3a 4c 44 41 20 28  |..,"LDY #1:LDA (|
00000ef0  70 74 72 31 29 2c 59 3a  53 54 41 20 68 69 3a 49  |ptr1),Y:STA hi:I|
00000f00  4e 59 0d 06 36 1f 4c 44  41 20 28 70 74 72 31 29  |NY..6.LDA (ptr1)|
00000f10  2c 59 3a 53 54 41 20 6c  6f 3a 4c 44 41 20 23 36  |,Y:STA lo:LDA #6|
00000f20  34 0d 06 40 1e 53 54 41  20 6e 75 6d 31 3a 53 54  |4..@.STA num1:ST|
00000f30  41 20 6e 75 6d 32 3a 53  54 41 20 6e 75 6d 33 0d  |A num2:STA num3.|
00000f40  06 4a 21 4c 44 41 20 6c  6f 3a 80 20 23 36 33 3a  |.J!LDA lo:. #63:|
00000f50  84 41 20 6e 75 6d 32 3a  53 54 41 20 6e 75 6d 32  |.A num2:STA num2|
00000f60  0d 06 54 21 4c 44 41 20  68 69 3a 80 20 23 36 33  |..T!LDA hi:. #63|
00000f70  3a 84 41 20 6e 75 6d 33  3a 53 54 41 20 6e 75 6d  |:.A num3:STA num|
00000f80  33 0d 06 5e 1d 4c 44 41  20 6c 6f 3a 80 20 23 31  |3..^.LDA lo:. #1|
00000f90  39 32 3a 82 20 23 36 34  3a 4c 53 52 20 41 0d 06  |92:. #64:LSR A..|
00000fa0  68 1a 4c 53 52 20 41 3a  84 41 20 6e 75 6d 31 3a  |h.LSR A:.A num1:|
00000fb0  53 54 41 20 6e 75 6d 31  0d 06 72 1d 4c 44 41 20  |STA num1..r.LDA |
00000fc0  68 69 3a 80 20 23 31 39  32 3a 82 20 23 36 34 3a  |hi:. #192:. #64:|
00000fd0  4c 53 52 20 41 0d 06 7c  1d 4c 53 52 20 41 3a 4c  |LSR A..|.LSR A:L|
00000fe0  53 52 20 41 3a 4c 53 52  20 41 3a 84 41 20 6e 75  |SR A:LSR A:.A nu|
00000ff0  6d 31 0d 06 86 1c 53 54  41 20 6e 75 6d 31 3a 4c  |m1....STA num1:L|
00001000  44 41 20 23 30 3a 53 54  41 20 70 74 72 32 0d 06  |DA #0:STA ptr2..|
00001010  90 16 4c 44 41 20 26 31  38 3a 53 54 41 20 70 74  |..LDA &18:STA pt|
00001020  72 32 2b 31 0d 06 9a 0e  2e 66 69 6e 64 6d 61 74  |r2+1.....findmat|
00001030  63 68 0d 06 a4 20 4c 44  59 20 23 30 3a 4c 44 41  |ch... LDY #0:LDA|
00001040  20 28 70 74 72 32 29 2c  59 3a 43 4d 50 20 23 26  | (ptr2),Y:CMP #&|
00001050  38 44 0d 06 ae 1d 42 4e  45 20 6e 65 78 74 3a 49  |8D....BNE next:I|
00001060  4e 59 3a 4c 44 41 20 28  70 74 72 32 29 2c 59 0d  |NY:LDA (ptr2),Y.|
00001070  06 b8 26 43 4d 50 20 6e  75 6d 31 3a 42 4e 45 20  |..&CMP num1:BNE |
00001080  6e 65 78 74 3a 49 4e 59  3a 4c 44 41 20 28 70 74  |next:INY:LDA (pt|
00001090  72 32 29 2c 59 0d 06 c2  26 43 4d 50 20 6e 75 6d  |r2),Y...&CMP num|
000010a0  32 3a 42 4e 45 20 6e 65  78 74 3a 49 4e 59 3a 4c  |2:BNE next:INY:L|
000010b0  44 41 20 28 70 74 72 32  29 2c 59 0d 06 cc 1d 43  |DA (ptr2),Y....C|
000010c0  4d 50 20 6e 75 6d 33 3a  42 4e 45 20 6e 65 78 74  |MP num3:BNE next|
000010d0  3a 53 45 43 3a 52 54 53  0d 06 d6 09 2e 6e 65 78  |:SEC:RTS.....nex|
000010e0  74 0d 06 e0 20 43 4c 43  3a 4c 44 41 20 70 74 72  |t... CLC:LDA ptr|
000010f0  32 3a 41 44 43 20 23 31  3a 53 54 41 20 70 74 72  |2:ADC #1:STA ptr|
00001100  32 0d 06 ea 20 4c 44 41  20 70 74 72 32 2b 31 3a  |2... LDA ptr2+1:|
00001110  41 44 43 20 23 30 3a 53  54 41 20 70 74 72 32 2b  |ADC #0:STA ptr2+|
00001120  31 0d 06 f4 24 43 4d 50  20 74 6f 70 2b 31 3a 42  |1...$CMP top+1:B|
00001130  4e 45 20 66 69 6e 64 6d  61 74 63 68 3a 4c 44 41  |NE findmatch:LDA|
00001140  20 70 74 72 32 0d 06 fe  21 43 4d 50 20 74 6f 70  | ptr2...!CMP top|
00001150  3a 42 4e 45 20 66 69 6e  64 6d 61 74 63 68 3a 43  |:BNE findmatch:C|
00001160  4c 43 3a 52 54 53 0d 07  08 0a 2e 70 72 69 6e 74  |LC:RTS.....print|
00001170  0d 07 12 1e 4c 44 41 20  23 38 3a 4a 53 52 20 26  |....LDA #8:JSR &|
00001180  46 46 45 45 3a 4a 53 52  20 26 46 46 45 45 0d 07  |FFEE:JSR &FFEE..|
00001190  1c 21 4a 53 52 20 26 46  46 45 45 3a 4a 53 52 20  |.!JSR &FFEE:JSR |
000011a0  26 46 46 45 45 3a 4a 53  52 20 26 46 46 45 45 0d  |&FFEE:JSR &FFEE.|
000011b0  07 26 1f 4c 44 41 20 23  30 3a 53 54 41 20 74 65  |.&.LDA #0:STA te|
000011c0  6e 74 68 6f 75 3a 53 54  41 20 74 68 6f 75 0d 07  |nthou:STA thou..|
000011d0  30 14 53 54 41 20 68 75  6e 64 3a 53 54 41 20 74  |0.STA hund:STA t|
000011e0  65 6e 0d 07 3a 0e 2e 64  6f 74 65 6e 74 68 6f 75  |en..:..dotenthou|
000011f0  0d 07 44 1f 53 45 43 3a  4c 44 41 20 6c 6f 3a 53  |..D.SEC:LDA lo:S|
00001200  42 43 20 23 31 30 30 30  30 20 83 20 32 35 36 0d  |BC #10000 . 256.|
00001210  07 4e 23 53 54 41 20 6e  75 6d 3a 4c 44 41 20 68  |.N#STA num:LDA h|
00001220  69 3a 53 42 43 20 23 31  30 30 30 30 20 81 20 32  |i:SBC #10000 . 2|
00001230  35 36 0d 07 58 24 42 43  43 20 64 6f 74 68 6f 75  |56..X$BCC dothou|
00001240  3a 53 54 41 20 68 69 3a  4c 44 41 20 6e 75 6d 3a  |:STA hi:LDA num:|
00001250  53 54 41 20 6c 6f 0d 07  62 1d 49 4e 43 20 74 65  |STA lo..b.INC te|
00001260  6e 74 68 6f 75 3a 4a 4d  50 20 64 6f 74 65 6e 74  |nthou:JMP dotent|
00001270  68 6f 75 0d 07 6c 0b 2e  64 6f 74 68 6f 75 0d 07  |hou..l..dothou..|
00001280  76 1e 53 45 43 3a 4c 44  41 20 6c 6f 3a 53 42 43  |v.SEC:LDA lo:SBC|
00001290  20 23 31 30 30 30 20 83  20 32 35 36 0d 07 80 22  | #1000 . 256..."|
000012a0  53 54 41 20 6e 75 6d 3a  4c 44 41 20 68 69 3a 53  |STA num:LDA hi:S|
000012b0  42 43 20 23 31 30 30 30  20 81 20 32 35 36 0d 07  |BC #1000 . 256..|
000012c0  8a 24 42 43 43 20 64 6f  68 75 6e 64 3a 53 54 41  |.$BCC dohund:STA|
000012d0  20 68 69 3a 4c 44 41 20  6e 75 6d 3a 53 54 41 20  | hi:LDA num:STA |
000012e0  6c 6f 0d 07 94 17 49 4e  43 20 74 68 6f 75 3a 4a  |lo....INC thou:J|
000012f0  4d 50 20 64 6f 74 68 6f  75 0d 07 9e 0b 2e 64 6f  |MP dothou.....do|
00001300  68 75 6e 64 0d 07 a8 1f  53 45 43 3a 4c 44 41 20  |hund....SEC:LDA |
00001310  6c 6f 3a 53 42 43 20 23  31 30 30 3a 53 54 41 20  |lo:SBC #100:STA |
00001320  6e 75 6d 0d 07 b2 22 4c  44 41 20 68 69 3a 53 42  |num..."LDA hi:SB|
00001330  43 20 23 30 3a 42 43 43  20 64 6f 74 65 6e 3a 53  |C #0:BCC doten:S|
00001340  54 41 20 68 69 0d 07 bc  26 4c 44 41 20 6e 75 6d  |TA hi...&LDA num|
00001350  3a 53 54 41 20 6c 6f 3a  49 4e 43 20 68 75 6e 64  |:STA lo:INC hund|
00001360  3a 4a 4d 50 20 64 6f 68  75 6e 64 0d 07 c6 0a 2e  |:JMP dohund.....|
00001370  64 6f 74 65 6e 0d 07 d0  1e 53 45 43 3a 4c 44 41  |doten....SEC:LDA|
00001380  20 6c 6f 3a 53 42 43 20  23 31 30 3a 53 54 41 20  | lo:SBC #10:STA |
00001390  6e 75 6d 0d 07 da 23 4c  44 41 20 68 69 3a 53 42  |num...#LDA hi:SB|
000013a0  43 20 23 30 3a 42 43 43  20 6f 75 74 70 75 74 3a  |C #0:BCC output:|
000013b0  53 54 41 20 68 69 0d 07  e4 24 4c 44 41 20 6e 75  |STA hi...$LDA nu|
000013c0  6d 3a 53 54 41 20 6c 6f  3a 49 4e 43 20 74 65 6e  |m:STA lo:INC ten|
000013d0  3a 4a 4d 50 20 64 6f 74  65 6e 0d 07 ee 0b 2e 6f  |:JMP doten.....o|
000013e0  75 74 70 75 74 0d 07 f8  25 4c 44 41 20 74 65 6e  |utput...%LDA ten|
000013f0  74 68 6f 75 3a 43 4c 43  3a 41 44 43 20 23 34 38  |thou:CLC:ADC #48|
00001400  3a 4a 53 52 20 26 46 46  45 45 0d 08 02 22 4c 44  |:JSR &FFEE..."LD|
00001410  41 20 74 68 6f 75 3a 43  4c 43 3a 41 44 43 20 23  |A thou:CLC:ADC #|
00001420  34 38 3a 4a 53 52 20 26  46 46 45 45 0d 08 0c 22  |48:JSR &FFEE..."|
00001430  4c 44 41 20 68 75 6e 64  3a 43 4c 43 3a 41 44 43  |LDA hund:CLC:ADC|
00001440  20 23 34 38 3a 4a 53 52  20 26 46 46 45 45 0d 08  | #48:JSR &FFEE..|
00001450  16 21 4c 44 41 20 74 65  6e 3a 43 4c 43 3a 41 44  |.!LDA ten:CLC:AD|
00001460  43 20 23 34 38 3a 4a 53  52 20 26 46 46 45 45 0d  |C #48:JSR &FFEE.|
00001470  08 20 20 4c 44 41 20 6c  6f 3a 43 4c 43 3a 41 44  |.  LDA lo:CLC:AD|
00001480  43 20 23 34 38 3a 4a 4d  50 20 26 46 46 45 45 0d  |C #48:JMP &FFEE.|
00001490  08 2a 0c 2e 6d 65 73 73  61 67 65 0d 08 34 0a 4c  |.*..message..4.L|
000014a0  44 59 20 23 30 0d 08 3e  0d 2e 6d 65 73 73 6c 6f  |DY #0..>..messlo|
000014b0  6f 70 0d 08 48 24 4c 44  41 20 28 26 35 30 29 2c  |op..H$LDA (&50),|
000014c0  59 3a 43 4d 50 20 23 31  33 3a 42 45 51 20 65 78  |Y:CMP #13:BEQ ex|
000014d0  69 74 6d 65 73 73 0d 08  52 1e 4a 53 52 20 26 46  |itmess..R.JSR &F|
000014e0  46 45 45 3a 49 4e 59 3a  4a 4d 50 20 6d 65 73 73  |FEE:INY:JMP mess|
000014f0  6c 6f 6f 70 0d 08 5c 0d  2e 65 78 69 74 6d 65 73  |loop..\..exitmes|
00001500  73 0d 08 66 07 52 54 53  0d 08 70 30 2e 69 6e 74  |s..f.RTS..p0.int|
00001510  72 6f 3a 4f 50 54 20 a4  65 71 75 73 28 22 42 41  |ro:OPT .equs("BA|
00001520  53 49 43 20 70 61 63 6b  65 72 20 76 65 72 73 69  |SIC packer versi|
00001530  6f 6e 20 30 2e 33 22 29  0d 08 7a 2b 2e 6d 65 73  |on 0.3")..z+.mes|
00001540  73 31 3a 4f 50 54 20 a4  65 71 75 73 28 22 53 74  |s1:OPT .equs("St|
00001550  72 69 70 70 69 6e 67 20  73 70 61 63 65 73 2e 2e  |ripping spaces..|
00001560  2e 22 29 0d 08 84 2b 2e  6d 65 73 73 32 3a 4f 50  |.")...+.mess2:OP|
00001570  54 20 a4 65 71 75 73 28  22 50 61 63 6b 69 6e 67  |T .equs("Packing|
00001580  20 6c 69 6e 65 3a 20 30  30 30 30 30 22 29 0d 08  | line: 00000")..|
00001590  8e 07 5d 3a ed 0d 08 98  20 24 26 37 30 30 30 3d  |..]:.... $&7000=|
000015a0  22 53 41 56 45 20 50 41  43 4b 20 39 30 30 20 22  |"SAVE PACK 900 "|
000015b0  2b c3 7e 50 25 0d 08 a2  16 58 25 3d 30 3a 59 25  |+.~P%....X%=0:Y%|
000015c0  3d 26 37 30 3a d6 26 46  46 46 37 0d 08 ac 05 e0  |=&70:.&FFF7.....|
000015d0  0d 08 b6 0f dd 20 a4 65  71 75 73 28 41 24 29 0d  |..... .equs(A$).|
000015e0  08 c0 16 24 50 25 3d 41  24 3a 50 25 3d 50 25 2b  |...$P%=A$:P%=P%+|
000015f0  a9 41 24 2b 31 0d 08 ca  09 3d 50 41 53 53 0d ff  |.A$+1....=PASS..|
00001600
PACKER.m0
PACKER.m1
PACKER.m2
PACKER.m4
PACKER.m5