Home » CEEFAX disks » telesoftware3.adl » 06_11_87/VARCOMP
06_11_87/VARCOMP
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 » telesoftware3.adl |
Filename: | 06_11_87/VARCOMP |
Read OK: | ✔ |
File size: | 2233 bytes |
Load address: | 1900 |
Exec address: | 8023 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- AEW website » mu » mu_5_25_discs_Micro_User_04_12_D-MU04_12.ssd » VARCOMP
- CEEFAX disks » telesoftware3.adl » 06_11_87/VARCOMP
File contents
10REM ************************ 20REM * VARIABLE COMPRESSOR * 30REM * By John Kelk * 40REM * * 50REM ************************ 60MODE7:HIMEM=&7000 70PROCassemble 80PROCreadtable(66) 90PROCcheck 100END 110: 120DEFPROCassemble 130oswrch=&FFEE:osnewl=&FFE7 140osbyte=&FFF4 150base1=&70:base2=&72 160varlength=&74:shortname=&75 170yold=&76:ynew=&77:flag=&78 180varbase=&80:memcopy=&82 190bottom=&8A:top=&8B:mid=&8C 200FOR pass=0 TO 2 STEP 2 210P%=&7000 220[OPT pass 230.main 240JSR clearbuffer 250LDA &18:STA base1+1:STA base2+1 260LDY #0:STY base1:STY base2 270INY:STY ynew 280LDA (base1),Y 290.loop1 300JSR basicline 310CMP #&80:BCC loop1 320JSR update 330RTS 340: 350.basicline 360JSR update:JSR update:JSR update 370.checkspaces 380JSR nospaces 390CMP #ASC":":BEQ nocolon 400JMP testend 410.nocolon 420INY:LDA (base1),Y:JMP checkspaces 430.code 440CMP #65:BCC testspace 450CMP #91:BCC var 460CMP #95:BCC testassembler 470CMP #123:BCS testnext 480.var 490JSR varlist:JMP testend 500.testspace 510CMP #32:BNE teststring 520INY:LDA (base1),Y:JMP testend 530.teststring 540CMP #34:BNE testnumber 550JSR string:JMP testend 560.testnumber 570CMP #48:BCC testhex 580CMP #58:BCS carryon 590JSR number:JMP testend 600.testhex 610CMP #ASC"&":BNE teststar 620JSR hex:JMP testend 630.teststar 640CMP #ASC"*":BNE carryon 650JSR checkos:BNE carryon 660JMP wholeline 670.testnext 680CMP #&ED:BNE testdata 690JSR next:JMP testend 700.testdata 710CMP #&DC:BNE testrem 720JMP data 730.testrem 740CMP #&F4:BNE testlinetoken 750JSR rem:JMP testend 760.testlinetoken 770CMP #&8D:BNE carryon 780JSR update:JSR update 790JSR update:JSR update 800JMP testend 810.testassembler 820CMP #ASC"[":BNE carryon 830JSR assembler:JMP testend 840.carryon 850JSR update 860.testend 870CMP #13:BEQ lineincrement 880JMP code 890: 900.data 910JSR update 920JSR nospaces 930: 940.wholeline 950JSR update 960CMP #13:BNE wholeline 970: 980.lineincrement 990TYA 1000CLC:ADC base1:STA base1:BCC L1 1010INC base1+1 1020.L1 1030LDY ynew:CPY #4:BEQ L2 1040TYA:LDY #3 1050STA (base2),Y 1060CLC:ADC base2:STA base2:BCC L2 1070INC base2+1 1080.L2 1090LDA #13:LDY #0:STY ynew 1100: 1110.update 1120INY:STY yold:LDY ynew 1130STA (base2),Y 1140INY:STY ynew:LDY yold 1150LDA (base1),Y 1160RTS 1170: 1180.string 1190JSR update 1200CMP #34:BEQ update 1210CMP #13:BNE string 1220RTS 1230: 1240.nospaces 1250CMP #32:BNE endspaces 1260INY:LDA (base1),Y:JMP nospaces 1270.endspaces 1280RTS 1290: 1300.next 1310JSR update 1320.morenext 1330CMP #ASC",":BEQ next 1340CMP #ASC":":BEQ endnext 1350CMP #13 :BEQ endnext 1360INY:LDA (base1),Y 1370JMP morenext 1380.endnext 1390RTS 1400: 1410.rem 1420INY:LDA (base1),Y 1430CMP #13:BNE rem 1440RTS 1450: 1460.checkos 1470STA flag:STY yold:LDY ynew 1480CPY #4:BEQ endcheckos 1490DEY:LDA (base2),Y 1500CMP #58:BEQ endcheckos 1510CMP #139:BEQ endcheckos 1520CMP #140:BEQ endcheckos 1530INC flag 1540.endcheckos 1550LDY yold:LDA #ASC"*" 1560LDA #ASC"*":CMP flag 1570RTS 1580: 1590.varlist 1600LDX #0 1610.morevar 1620STA varbuffer,X 1630INX:INY 1640LDA (base1),Y 1650CMP #48:BCC endvar 1660CMP #58:BCC morevar 1670CMP #65:BCC endvar 1680CMP #91:BCC morevar 1690CMP #95:BCC endvar 1700CMP #123:BCC morevar 1710.endvar 1720CPX #1:BNE findplace 1730DEY:LDA (base1),Y 1740CMP #91:BCC leavealone 1750INY 1760.findplace 1770JSR lookupvar 1780JMP endhex 1790.leavealone 1800JSR update:JMP endhex 1810: 1820.lookupvar 1830STY yold:STX varlength 1840LDA #vartable MOD256:STA varbase 1850LDA #vartable DIV256:STA varbase+1 1860LDX #ASC"a"-1:STX shortname 1870.nextentry 1880LDY #0:INX 1890CPX #ASC"{":BNE noinc 1900LDX #ASC"a":INC shortname 1910.noinc 1920LDA (varbase),Y:BEQ emptyslot 1930STA setnextentry+1 1940CMP varlength:BEQ trymatch 1950.setnextentry 1960LDA #0 1970SEC:ADC varbase:STA varbase:BCC nextentry 1980INC varbase+1:BCS nextentry 1990.trymatch 2000TAY 2010.loop2 2020LDA (varbase),Y:CMP varbuffer-1,Y 2030BNE setnextentry 2040DEY:BNE loop2 2050JSR newname:JMP endlookupvar 2060.emptyslot 2070LDA varlength:STA (varbase),Y 2080.loop3 2090INY 2100LDA varbuffer-1,Y:STA (varbase),Y 2110JSR oswrch 2120CPY varlength:BNE loop3 2130JSR newname:JSR printnewname 2140JSR osnewl 2150.endlookupvar 2160LDY yold:LDA (base1),Y 2170RTS 2180: 2190.newname 2200LDA shortname 2210LDY ynew 2220CMP #ASC"a":BCC justone 2230STA (base2),Y:INY 2240.justone 2250TXA 2260STA (base2),Y 2270INY:STY ynew 2280RTS 2290: 2300.printnewname 2310STX single+1 2320LDA #134:JSR osbyte 2330LDA #31 :JSR oswrch 2340LDA #35 :JSR oswrch 2350TYA :JSR oswrch 2360LDA shortname 2370CMP #ASC"a":BCC single 2380JSR oswrch 2390.single 2400LDA #0:JSR oswrch 2410RTS 2420: 2430.assembler 2440JSR update:JSR nospaces 2450JSR testend2 2460.loop4 2470JSR assline 2480CMP #ASC"]":BNE loop4 2490JMP update 2500: 2510.assline 2520JSR update:JSR update:JSR update 2530.checkspaces2 2540JSR nospaces 2550CMP #ASC":":BEQ nocolon2 2560JMP testend2 2570.nocolon2 2580INY:LDA (base1),Y:JMP checkspaces2 2590.code2 2600CMP #65:BCC testspace2 2610CMP #91:BCC var2 2620CMP #95:BCC testrem2 2630CMP #123:BCS testORA 2640.var2 2650JSR memcheck:JMP testend2 2660.testspace2 2670CMP #32:BNE teststring2 2680INY:LDA (base1),Y:JMP testend2 2690.teststring2 2700CMP #34:BNE testnumber2 2710JSR string:JMP testend2 2720.testnumber2 2730CMP #48:BCC testhex2 2740CMP #58:BCS carryon2 2750JSR number:JMP testend2 2760.testhex2 2770CMP #38:BNE carryon2 2780JSR hex:JMP testend2 2790.testrem2 2800CMP #ASC"\":BNE testendass 2810JSR remassembly:JMP testend2 2820.testendass 2830CMP #ASC"]":BNE carryon2 2840RTS 2850.testORA 2860CMP #&84:BNE carryon2 2870JSR update 2880CMP #ASC"A":BNE carryon2 2890JSR update:JMP testend2 2900.carryon2 2910JSR update 2920.testend2 2930CMP #13:BNE code2 2940JMP lineincrement 2950: 2960.remassembly 2970INY:LDA(base1),Y 2980CMP #13:BEQ endremass 2990CMP #ASC":":BNE remassembly 3000.endremass 3010RTS 3020: 3030.memcheck 3040LDX #0 3050.morevar2 3060STA varbuffer,X 3070INY:INX 3080CPX #3:BNE morevar3 3090JSR mnemonic:BNE morevar3 3100LDA (base1),Y:RTS 3110.morevar3 3120LDA (base1),Y 3130CMP #48:BCC endvar2 3140CMP #58:BCC morevar2 3150CMP #65:BCC endvar2 3160CMP #91:BCC morevar2 3170CMP #95:BCC endvar2 3180CMP #123:BCC morevar2 3190.endvar2 3200CPX #1:BNE findplace2 3210DEY:LDA (base1),Y 3220CMP #91:BCC leavealone2 3230INY 3240.findplace2 3250JSR lookupvar 3260JMP endhex 3270.leavealone2 3280JSR update:JMP endhex 3290: 3300.mnemonic 3310STY yold 3320.loop5 3330LDA varbuffer-1,X 3340CMP #97:BCC uppercase 3350AND #&DF 3360.uppercase 3370STA memcopy-1,X 3380DEX:BNE loop5 3390LDA #1:STA bottom 3400LDA #66:STA top 3410.loop6 3420LDA top:CMP bottom:BCC notfound 3430CLC:ADC bottom 3440LSR A:STA mid 3450ASL A:ADC mid:TAY:LDX #0 3460.loop7 3470LDA table-3,Y:CMP memcopy,X 3480BNE keeplooking 3490INY:INX:CPX #3:BNE loop7 3500LDA mid:CMP #26:BNE found 3510LDY yold 3520LDA (base1),Y:STA memcopy,X 3530INX 3540CMP #97:BCC uppercase2 3550AND #&DF 3560.uppercase2 3570CMP #ASC"S":BEQ founda 3580CMP #ASC"B":BEQ founda 3590CMP #ASC"W":BEQ founda 3600CMP #ASC"D":BNE notfound 3610.founda 3620INY:STY yold 3630.found 3640STX xstore+1:LDX #0 3650LDY ynew 3660.loop8 3670LDA memcopy,X:STA (base2),Y 3680INY:INX 3690.xstore 3700CPX #0:BNE loop8 3710STY ynew:LDY yold 3720LDA #0 3730RTS 3740.keeplooking 3750BCS smaller 3760LDX mid:INX:STX bottom:BNE loop6 3770.smaller 3780LDX mid:DEX:STX top:BNE loop6 3790.notfound 3800LDA #&FF:LDX #3:LDY yold 3810RTS 3820: 3830.number 3840JSR update 3850CMP #48:BCC endhex 3860CMP #58:BCS endhex 3870BCC number 3880: 3890.hex 3900JSR update 3910CMP #48:BCC endhex 3920CMP #58:BCC hex 3930CMP #65:BCC endhex 3940CMP #71:BCC hex 3950.endhex 3960JSR nospaces 3970CMP #48:BCC ok 3980CMP #58:BCC spaceneeded 3990CMP #65:BCC ok 4000CMP #91:BCC spaceneeded 4010CMP #95:BCC ok 4020CMP #123:BCS ok 4030.spaceneeded 4040STY yold:LDY ynew 4050LDA #32:STA (base2),Y 4060INY:STY ynew:LDY yold 4070LDA (base1),Y 4080.ok 4090RTS 4100: 4110.clearbuffer 4120LDY #varbuffer MOD256 4130LDA #varbuffer DIV256:STA base1+1 4140LDA #0:STA base1 4150.loop9 4160STA (base1),Y:INY:BNE loop9 4170LDX base1+1:INX:STX base1+1 4180CPX #&7C:BNE loop9 4190RTS 4200: 4210.table 4220] 4230P%=P%+198 4240: 4250[OPT pass 4260.varbuffer 4270] 4280P%=P%+50 4290: 4300[OPT pass 4310.vartable 4320]:NEXT 4330ENDPROC 4340: 4350DEFPROCreadtable(N%) 4360LOCAL C%,A% 4370RESTORE 4440 4380A%=table 4390FORC%=1TON% 4400READ $A%:A%=A%+LEN($A%) 4410NEXT 4420ENDPROC 4430: 4440DATA ADC,AND,ASL,BCC,BCS,BEQ,BIT 4450DATA BMI,BNE,BPL,BRA,BRK,BVC,BVS 4460DATA CLC,CLD,CLI,CLV,CMP,CPX,CPY 4470DATA DEC,DEX,DEY,EOR,EQU,INC,INX 4480DATA INY,JMP,JSR,LDA,LDX,LDY,LSR 4490DATA NOP,OPT,ORA,PHA,PHP,PHX,PHY 4500DATA PLA,PLP,PLX,PLY,ROL,ROR,RTI 4510DATA RTS,SBC,SEC,SED,SEI,STA,STX 4520DATA STY,STZ,TAX,TAY,TRB,TSB,TSX 4530DATA TXA,TXS,TYA 4540: 4550DEF PROCcheck 4560LOCAL A$,B$,A%,B%,C%,T% 4570RESTORE 4710 4580READ A$:A%=EVAL(A$) 4590REPEAT 4600READ B$:IF B$="*" GOTO 4680 4610B%=EVAL(B$):T%=0 4620FORJ%=A%TOB%-1:T%=T%+?J%:NEXT 4630PRINT A$;" to ";B$; 4640PRINTSPC(25-LEN(A$+B$)); 4650READ C% 4660IF T%=C% PRINT"O.K." ELSE PRINT "ERROR!" 4670A$=B$:A%=B% 4680UNTIL B$="*" 4690ENDPROC 4700: 4710DATA main,testhex,13322 4720DATA data,10732 4730DATA rem,13742 4740DATA lookupvar,13704 4750DATA newname,14438 4760DATA assline,10029 4770DATA remassembly,16208 4780DATA mnemonic,10571 4790DATA number,19357 4800DATA table,13029 4810DATA varbuffer,15149 4820DATA *
� ************************ � * VARIABLE COMPRESSOR * � * By John Kelk * (� * * 2� ************************ <�7:�=&7000 F �assemble P�readtable(66) Z �check d� n: x��assemble �oswrch=&FFEE:osnewl=&FFE7 �osbyte=&FFF4 �base1=&70:base2=&72 �varlength=&74:shortname=&75 �yold=&76:ynew=&77:flag=&78 �varbase=&80:memcopy=&82 �bottom=&8A:top=&8B:mid=&8C �� pass=0 � 2 � 2 �P%=&7000 � [OPT pass � .main �JSR clearbuffer �#LDA &18:STA base1+1:STA base2+1 LDY #0:STY base1:STY base2 INY:STY ynew LDA (base1),Y " .loop1 ,JSR basicline 6CMP #&80:BCC loop1 @JSR update JRTS T: ^.basicline h$JSR update:JSR update:JSR update r.checkspaces |JSR nospaces �CMP #�":":BEQ nocolon �JMP testend �.nocolon �%INY:LDA (base1),Y:JMP checkspaces � .code �CMP #65:BCC testspace �CMP #91:BCC var �CMP #95:BCC testassembler �CMP #123:BCS testnext �.var �JSR varlist:JMP testend �.testspace �CMP #32:BNE teststring !INY:LDA (base1),Y:JMP testend .teststring CMP #34:BNE testnumber &JSR string:JMP testend 0.testnumber :CMP #48:BCC testhex DCMP #58:BCS carryon NJSR number:JMP testend X.testhex bCMP #�"&":BNE teststar lJSR hex:JMP testend v .teststar �CMP #�"*":BNE carryon �JSR checkos:BNE carryon �JMP wholeline � .testnext �CMP #&ED:BNE testdata �JSR next:JMP testend � .testdata �CMP #&DC:BNE testrem �JMP data �.testrem �CMP #&F4:BNE testlinetoken �JSR rem:JMP testend �.testlinetoken CMP #&8D:BNE carryon JSR update:JSR update JSR update:JSR update JMP testend *.testassembler 4CMP #�"[":BNE carryon >JSR assembler:JMP testend H.carryon RJSR update \.testend fCMP #13:BEQ lineincrement pJMP code z: � .data �JSR update �JSR nospaces �: �.wholeline �JSR update �CMP #13:BNE wholeline �: �.lineincrement �TYA �"CLC:ADC base1:STA base1:BCC L1 �INC base1+1 �.L1 LDY ynew:CPY #4:BEQ L2 TYA:LDY #3 STA (base2),Y $"CLC:ADC base2:STA base2:BCC L2 .INC base2+1 8.L2 BLDA #13:LDY #0:STY ynew L: V.update `INY:STY yold:LDY ynew jSTA (base2),Y tINY:STY ynew:LDY yold ~LDA (base1),Y �RTS �: �.string �JSR update �CMP #34:BEQ update �CMP #13:BNE string �RTS �: � .nospaces �CMP #32:BNE endspaces �"INY:LDA (base1),Y:JMP nospaces �.endspaces RTS : .next JSR update ( .morenext 2CMP #�",":BEQ next <CMP #�":":BEQ endnext FCMP #13 :BEQ endnext PINY:LDA (base1),Y ZJMP morenext d.endnext nRTS x: �.rem �INY:LDA (base1),Y �CMP #13:BNE rem �RTS �: �.checkos �STA flag:STY yold:LDY ynew �CPY #4:BEQ endcheckos �DEY:LDA (base2),Y �CMP #58:BEQ endcheckos �CMP #139:BEQ endcheckos �CMP #140:BEQ endcheckos �INC flag .endcheckos LDY yold:LDA #�"*" LDA #�"*":CMP flag "RTS ,: 6.varlist @ LDX #0 J.morevar TSTA varbuffer,X ^INX:INY hLDA (base1),Y rCMP #48:BCC endvar |CMP #58:BCC morevar �CMP #65:BCC endvar �CMP #91:BCC morevar �CMP #95:BCC endvar �CMP #123:BCC morevar �.endvar �CPX #1:BNE findplace �DEY:LDA (base1),Y �CMP #91:BCC leavealone �INY �.findplace �JSR lookupvar �JMP endhex �.leavealone JSR update:JMP endhex : .lookupvar &STY yold:STX varlength 0"LDA #vartable �256:STA varbase :$LDA #vartable �256:STA varbase+1 DLDX #�"a"-1:STX shortname N.nextentry XLDY #0:INX bCPX #�"{":BNE noinc lLDX #�"a":INC shortname v .noinc �!LDA (varbase),Y:BEQ emptyslot �STA setnextentry+1 �CMP varlength:BEQ trymatch �.setnextentry � LDA #0 �-SEC:ADC varbase:STA varbase:BCC nextentry �INC varbase+1:BCS nextentry � .trymatch �TAY � .loop2 �%LDA (varbase),Y:CMP varbuffer-1,Y �BNE setnextentry �DEY:BNE loop2 JSR newname:JMP endlookupvar .emptyslot !LDA varlength:STA (varbase),Y .loop3 *INY 4%LDA varbuffer-1,Y:STA (varbase),Y >JSR oswrch HCPY varlength:BNE loop3 R JSR newname:JSR printnewname \JSR osnewl f.endlookupvar pLDY yold:LDA (base1),Y zRTS �: �.newname �LDA shortname �LDY ynew �CMP #�"a":BCC justone �STA (base2),Y:INY �.justone �TXA �STA (base2),Y �INY:STY ynew �RTS �: �.printnewname STX single+1 LDA #134:JSR osbyte LDA #31 :JSR oswrch $LDA #35 :JSR oswrch .TYA :JSR oswrch 8LDA shortname BCMP #�"a":BCC single LJSR oswrch V.single `LDA #0:JSR oswrch jRTS t: ~.assembler �JSR update:JSR nospaces �JSR testend2 � .loop4 �JSR assline �CMP #�"]":BNE loop4 �JMP update �: �.assline �$JSR update:JSR update:JSR update �.checkspaces2 �JSR nospaces �CMP #�":":BEQ nocolon2 JMP testend2 .nocolon2 &INY:LDA (base1),Y:JMP checkspaces2 .code2 (CMP #65:BCC testspace2 2CMP #91:BCC var2 <CMP #95:BCC testrem2 FCMP #123:BCS testORA P .var2 ZJSR memcheck:JMP testend2 d.testspace2 nCMP #32:BNE teststring2 x"INY:LDA (base1),Y:JMP testend2 �.teststring2 �CMP #34:BNE testnumber2 �JSR string:JMP testend2 �.testnumber2 �CMP #48:BCC testhex2 �CMP #58:BCS carryon2 �JSR number:JMP testend2 � .testhex2 �CMP #38:BNE carryon2 �JSR hex:JMP testend2 � .testrem2 �CMP #�"\":BNE testendass � JSR remassembly:JMP testend2 .testendass CMP #�"]":BNE carryon2 RTS ".testORA ,CMP #&84:BNE carryon2 6JSR update @CMP #�"A":BNE carryon2 JJSR update:JMP testend2 T .carryon2 ^JSR update h .testend2 rCMP #13:BNE code2 |JMP lineincrement �: �.remassembly �INY:LDA(base1),Y �CMP #13:BEQ endremass �CMP #�":":BNE remassembly �.endremass �RTS �: � .memcheck � LDX #0 � .morevar2 �STA varbuffer,X �INY:INX CPX #3:BNE morevar3 JSR mnemonic:BNE morevar3 LDA (base1),Y:RTS & .morevar3 0LDA (base1),Y :CMP #48:BCC endvar2 DCMP #58:BCC morevar2 NCMP #65:BCC endvar2 XCMP #91:BCC morevar2 bCMP #95:BCC endvar2 lCMP #123:BCC morevar2 v.endvar2 �CPX #1:BNE findplace2 �DEY:LDA (base1),Y �CMP #91:BCC leavealone2 �INY �.findplace2 �JSR lookupvar �JMP endhex �.leavealone2 �JSR update:JMP endhex �: � .mnemonic �STY yold � .loop5 LDA varbuffer-1,X CMP #97:BCC uppercase � #&DF .uppercase *STA memcopy-1,X 4DEX:BNE loop5 >LDA #1:STA bottom HLDA #66:STA top R .loop6 \#LDA top:CMP bottom:BCC notfound fCLC:ADC bottom pLSR A:STA mid zASL A:ADC mid:TAY:LDX #0 � .loop7 �LDA table-3,Y:CMP memcopy,X �BNE keeplooking �INY:INX:CPX #3:BNE loop7 �LDA mid:CMP #26:BNE found �LDY yold �LDA (base1),Y:STA memcopy,X �INX �CMP #97:BCC uppercase2 � � #&DF �.uppercase2 �CMP #�"S":BEQ founda �CMP #�"B":BEQ founda CMP #�"W":BEQ founda CMP #�"D":BNE notfound .founda $INY:STY yold . .found 8STX xstore+1:LDX #0 BLDY ynew L .loop8 VLDA memcopy,X:STA (base2),Y `INY:INX j.xstore tCPX #0:BNE loop8 ~STY ynew:LDY yold � LDA #0 �RTS �.keeplooking �BCS smaller �$LDX mid:INX:STX bottom:BNE loop6 �.smaller �!LDX mid:DEX:STX top:BNE loop6 � .notfound �LDA #&FF:LDX #3:LDY yold �RTS �: �.number JSR update CMP #48:BCC endhex CMP #58:BCS endhex BCC number (: 2.hex <JSR update FCMP #48:BCC endhex PCMP #58:BCC hex ZCMP #65:BCC endhex dCMP #71:BCC hex n.endhex xJSR nospaces �CMP #48:BCC ok �CMP #58:BCC spaceneeded �CMP #65:BCC ok �CMP #91:BCC spaceneeded �CMP #95:BCC ok �CMP #123:BCS ok �.spaceneeded �STY yold:LDY ynew �LDA #32:STA (base2),Y �INY:STY ynew:LDY yold �LDA (base1),Y �.ok �RTS : .clearbuffer LDY #varbuffer �256 "#LDA #varbuffer �256:STA base1+1 ,LDA #0:STA base1 6 .loop9 @STA (base1),Y:INY:BNE loop9 JLDX base1+1:INX:STX base1+1 TCPX #&7C:BNE loop9 ^RTS h: r .table |] � P%=P%+198 �: � [OPT pass �.varbuffer �] �P%=P%+50 �: � [OPT pass � .vartable �]:� �� �: ���readtable(N%) � C%,A% � �DXQ A%=table &�C%=1�N% 0� $A%:A%=A%+�($A%) :� D� N: X!� ADC,AND,ASL,BCC,BCS,BEQ,BIT b!� BMI,BNE,BPL,BRA,BRK,BVC,BVS l!� CLC,CLD,CLI,CLV,CMP,CPX,CPY v!� DEC,DEX,DEY,EOR,EQU,INC,INX �!� INY,JMP,JSR,LDA,LDX,LDY,LSR �!� NOP,OPT,ORA,PHA,PHP,PHX,PHY �!� PLA,PLP,PLX,PLY,ROL,ROR,RTI �!� RTS,SBC,SEC,SED,SEI,STA,STX �!� STY,STZ,TAX,TAY,TRB,TSB,TSX �� TXA,TXS,TYA �: �� �check �� A$,B$,A%,B%,C%,T% � � �DfR �� A$:A%=�(A$) �� �� B$:� B$="*" � �DHR B%=�(B$):T%=0 �J%=A%�B%-1:T%=T%+?J%:� � A$;" to ";B$; �(25-�(A$+B$)); *� C% 4 � T%=C% �"O.K." � � "ERROR!" >A$=B$:A%=B% H� B$="*" R� \: f� main,testhex,13322 p� data,10732 z� rem,13742 �� lookupvar,13704 �� newname,14438 �� assline,10029 �� remassembly,16208 �� mnemonic,10571 �� number,19357 �� table,13029 �� varbuffer,15149 �� * �
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 20 56 41 52 49 41 42 4c 45 20 43 |... * VARIABLE C| 00000030 4f 4d 50 52 45 53 53 4f 52 20 20 2a 0d 00 1e 1e |OMPRESSOR *....| 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 0e eb 37 3a d3 3d 26 |******..<..7:.=&| 000000a0 37 30 30 30 0d 00 46 0d f2 61 73 73 65 6d 62 6c |7000..F..assembl| 000000b0 65 0d 00 50 12 f2 72 65 61 64 74 61 62 6c 65 28 |e..P..readtable(| 000000c0 36 36 29 0d 00 5a 0a f2 63 68 65 63 6b 0d 00 64 |66)..Z..check..d| 000000d0 05 e0 0d 00 6e 05 3a 0d 00 78 0e dd f2 61 73 73 |....n.:..x...ass| 000000e0 65 6d 62 6c 65 0d 00 82 1d 6f 73 77 72 63 68 3d |emble....oswrch=| 000000f0 26 46 46 45 45 3a 6f 73 6e 65 77 6c 3d 26 46 46 |&FFEE:osnewl=&FF| 00000100 45 37 0d 00 8c 10 6f 73 62 79 74 65 3d 26 46 46 |E7....osbyte=&FF| 00000110 46 34 0d 00 96 17 62 61 73 65 31 3d 26 37 30 3a |F4....base1=&70:| 00000120 62 61 73 65 32 3d 26 37 32 0d 00 a0 1f 76 61 72 |base2=&72....var| 00000130 6c 65 6e 67 74 68 3d 26 37 34 3a 73 68 6f 72 74 |length=&74:short| 00000140 6e 61 6d 65 3d 26 37 35 0d 00 aa 1e 79 6f 6c 64 |name=&75....yold| 00000150 3d 26 37 36 3a 79 6e 65 77 3d 26 37 37 3a 66 6c |=&76:ynew=&77:fl| 00000160 61 67 3d 26 37 38 0d 00 b4 1b 76 61 72 62 61 73 |ag=&78....varbas| 00000170 65 3d 26 38 30 3a 6d 65 6d 63 6f 70 79 3d 26 38 |e=&80:memcopy=&8| 00000180 32 0d 00 be 1e 62 6f 74 74 6f 6d 3d 26 38 41 3a |2....bottom=&8A:| 00000190 74 6f 70 3d 26 38 42 3a 6d 69 64 3d 26 38 43 0d |top=&8B:mid=&8C.| 000001a0 00 c8 14 e3 20 70 61 73 73 3d 30 20 b8 20 32 20 |.... pass=0 . 2 | 000001b0 88 20 32 0d 00 d2 0c 50 25 3d 26 37 30 30 30 0d |. 2....P%=&7000.| 000001c0 00 dc 0d 5b 4f 50 54 20 70 61 73 73 0d 00 e6 09 |...[OPT pass....| 000001d0 2e 6d 61 69 6e 0d 00 f0 13 4a 53 52 20 63 6c 65 |.main....JSR cle| 000001e0 61 72 62 75 66 66 65 72 0d 00 fa 23 4c 44 41 20 |arbuffer...#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 04 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 0e 10 49 4e 59 |STY base2....INY| 00000230 3a 53 54 59 20 79 6e 65 77 0d 01 18 11 4c 44 41 |:STY ynew....LDA| 00000240 20 28 62 61 73 65 31 29 2c 59 0d 01 22 0a 2e 6c | (base1),Y.."..l| 00000250 6f 6f 70 31 0d 01 2c 11 4a 53 52 20 62 61 73 69 |oop1..,.JSR basi| 00000260 63 6c 69 6e 65 0d 01 36 16 43 4d 50 20 23 26 38 |cline..6.CMP #&8| 00000270 30 3a 42 43 43 20 6c 6f 6f 70 31 0d 01 40 0e 4a |0:BCC loop1..@.J| 00000280 53 52 20 75 70 64 61 74 65 0d 01 4a 07 52 54 53 |SR update..J.RTS| 00000290 0d 01 54 05 3a 0d 01 5e 0e 2e 62 61 73 69 63 6c |..T.:..^..basicl| 000002a0 69 6e 65 0d 01 68 24 4a 53 52 20 75 70 64 61 74 |ine..h$JSR updat| 000002b0 65 3a 4a 53 52 20 75 70 64 61 74 65 3a 4a 53 52 |e:JSR update:JSR| 000002c0 20 75 70 64 61 74 65 0d 01 72 10 2e 63 68 65 63 | update..r..chec| 000002d0 6b 73 70 61 63 65 73 0d 01 7c 10 4a 53 52 20 6e |kspaces..|.JSR n| 000002e0 6f 73 70 61 63 65 73 0d 01 86 19 43 4d 50 20 23 |ospaces....CMP #| 000002f0 97 22 3a 22 3a 42 45 51 20 6e 6f 63 6f 6c 6f 6e |.":":BEQ nocolon| 00000300 0d 01 90 0f 4a 4d 50 20 74 65 73 74 65 6e 64 0d |....JMP testend.| 00000310 01 9a 0c 2e 6e 6f 63 6f 6c 6f 6e 0d 01 a4 25 49 |....nocolon...%I| 00000320 4e 59 3a 4c 44 41 20 28 62 61 73 65 31 29 2c 59 |NY:LDA (base1),Y| 00000330 3a 4a 4d 50 20 63 68 65 63 6b 73 70 61 63 65 73 |:JMP checkspaces| 00000340 0d 01 ae 09 2e 63 6f 64 65 0d 01 b8 19 43 4d 50 |.....code....CMP| 00000350 20 23 36 35 3a 42 43 43 20 74 65 73 74 73 70 61 | #65:BCC testspa| 00000360 63 65 0d 01 c2 13 43 4d 50 20 23 39 31 3a 42 43 |ce....CMP #91:BC| 00000370 43 20 76 61 72 0d 01 cc 1d 43 4d 50 20 23 39 35 |C var....CMP #95| 00000380 3a 42 43 43 20 74 65 73 74 61 73 73 65 6d 62 6c |:BCC testassembl| 00000390 65 72 0d 01 d6 19 43 4d 50 20 23 31 32 33 3a 42 |er....CMP #123:B| 000003a0 43 53 20 74 65 73 74 6e 65 78 74 0d 01 e0 08 2e |CS testnext.....| 000003b0 76 61 72 0d 01 ea 1b 4a 53 52 20 76 61 72 6c 69 |var....JSR varli| 000003c0 73 74 3a 4a 4d 50 20 74 65 73 74 65 6e 64 0d 01 |st:JMP testend..| 000003d0 f4 0e 2e 74 65 73 74 73 70 61 63 65 0d 01 fe 1a |...testspace....| 000003e0 43 4d 50 20 23 33 32 3a 42 4e 45 20 74 65 73 74 |CMP #32:BNE test| 000003f0 73 74 72 69 6e 67 0d 02 08 21 49 4e 59 3a 4c 44 |string...!INY:LD| 00000400 41 20 28 62 61 73 65 31 29 2c 59 3a 4a 4d 50 20 |A (base1),Y:JMP | 00000410 74 65 73 74 65 6e 64 0d 02 12 0f 2e 74 65 73 74 |testend.....test| 00000420 73 74 72 69 6e 67 0d 02 1c 1a 43 4d 50 20 23 33 |string....CMP #3| 00000430 34 3a 42 4e 45 20 74 65 73 74 6e 75 6d 62 65 72 |4:BNE testnumber| 00000440 0d 02 26 1a 4a 53 52 20 73 74 72 69 6e 67 3a 4a |..&.JSR string:J| 00000450 4d 50 20 74 65 73 74 65 6e 64 0d 02 30 0f 2e 74 |MP testend..0..t| 00000460 65 73 74 6e 75 6d 62 65 72 0d 02 3a 17 43 4d 50 |estnumber..:.CMP| 00000470 20 23 34 38 3a 42 43 43 20 74 65 73 74 68 65 78 | #48:BCC testhex| 00000480 0d 02 44 17 43 4d 50 20 23 35 38 3a 42 43 53 20 |..D.CMP #58:BCS | 00000490 63 61 72 72 79 6f 6e 0d 02 4e 1a 4a 53 52 20 6e |carryon..N.JSR n| 000004a0 75 6d 62 65 72 3a 4a 4d 50 20 74 65 73 74 65 6e |umber:JMP testen| 000004b0 64 0d 02 58 0c 2e 74 65 73 74 68 65 78 0d 02 62 |d..X..testhex..b| 000004c0 1a 43 4d 50 20 23 97 22 26 22 3a 42 4e 45 20 74 |.CMP #."&":BNE t| 000004d0 65 73 74 73 74 61 72 0d 02 6c 17 4a 53 52 20 68 |eststar..l.JSR h| 000004e0 65 78 3a 4a 4d 50 20 74 65 73 74 65 6e 64 0d 02 |ex:JMP testend..| 000004f0 76 0d 2e 74 65 73 74 73 74 61 72 0d 02 80 19 43 |v..teststar....C| 00000500 4d 50 20 23 97 22 2a 22 3a 42 4e 45 20 63 61 72 |MP #."*":BNE car| 00000510 72 79 6f 6e 0d 02 8a 1b 4a 53 52 20 63 68 65 63 |ryon....JSR chec| 00000520 6b 6f 73 3a 42 4e 45 20 63 61 72 72 79 6f 6e 0d |kos:BNE carryon.| 00000530 02 94 11 4a 4d 50 20 77 68 6f 6c 65 6c 69 6e 65 |...JMP wholeline| 00000540 0d 02 9e 0d 2e 74 65 73 74 6e 65 78 74 0d 02 a8 |.....testnext...| 00000550 19 43 4d 50 20 23 26 45 44 3a 42 4e 45 20 74 65 |.CMP #&ED:BNE te| 00000560 73 74 64 61 74 61 0d 02 b2 18 4a 53 52 20 6e 65 |stdata....JSR ne| 00000570 78 74 3a 4a 4d 50 20 74 65 73 74 65 6e 64 0d 02 |xt:JMP testend..| 00000580 bc 0d 2e 74 65 73 74 64 61 74 61 0d 02 c6 18 43 |...testdata....C| 00000590 4d 50 20 23 26 44 43 3a 42 4e 45 20 74 65 73 74 |MP #&DC:BNE test| 000005a0 72 65 6d 0d 02 d0 0c 4a 4d 50 20 64 61 74 61 0d |rem....JMP data.| 000005b0 02 da 0c 2e 74 65 73 74 72 65 6d 0d 02 e4 1e 43 |....testrem....C| 000005c0 4d 50 20 23 26 46 34 3a 42 4e 45 20 74 65 73 74 |MP #&F4:BNE test| 000005d0 6c 69 6e 65 74 6f 6b 65 6e 0d 02 ee 17 4a 53 52 |linetoken....JSR| 000005e0 20 72 65 6d 3a 4a 4d 50 20 74 65 73 74 65 6e 64 | rem:JMP testend| 000005f0 0d 02 f8 12 2e 74 65 73 74 6c 69 6e 65 74 6f 6b |.....testlinetok| 00000600 65 6e 0d 03 02 18 43 4d 50 20 23 26 38 44 3a 42 |en....CMP #&8D:B| 00000610 4e 45 20 63 61 72 72 79 6f 6e 0d 03 0c 19 4a 53 |NE carryon....JS| 00000620 52 20 75 70 64 61 74 65 3a 4a 53 52 20 75 70 64 |R update:JSR upd| 00000630 61 74 65 0d 03 16 19 4a 53 52 20 75 70 64 61 74 |ate....JSR updat| 00000640 65 3a 4a 53 52 20 75 70 64 61 74 65 0d 03 20 0f |e:JSR update.. .| 00000650 4a 4d 50 20 74 65 73 74 65 6e 64 0d 03 2a 12 2e |JMP testend..*..| 00000660 74 65 73 74 61 73 73 65 6d 62 6c 65 72 0d 03 34 |testassembler..4| 00000670 19 43 4d 50 20 23 97 22 5b 22 3a 42 4e 45 20 63 |.CMP #."[":BNE c| 00000680 61 72 72 79 6f 6e 0d 03 3e 1d 4a 53 52 20 61 73 |arryon..>.JSR as| 00000690 73 65 6d 62 6c 65 72 3a 4a 4d 50 20 74 65 73 74 |sembler:JMP test| 000006a0 65 6e 64 0d 03 48 0c 2e 63 61 72 72 79 6f 6e 0d |end..H..carryon.| 000006b0 03 52 0e 4a 53 52 20 75 70 64 61 74 65 0d 03 5c |.R.JSR update..\| 000006c0 0c 2e 74 65 73 74 65 6e 64 0d 03 66 1d 43 4d 50 |..testend..f.CMP| 000006d0 20 23 31 33 3a 42 45 51 20 6c 69 6e 65 69 6e 63 | #13:BEQ lineinc| 000006e0 72 65 6d 65 6e 74 0d 03 70 0c 4a 4d 50 20 63 6f |rement..p.JMP co| 000006f0 64 65 0d 03 7a 05 3a 0d 03 84 09 2e 64 61 74 61 |de..z.:.....data| 00000700 0d 03 8e 0e 4a 53 52 20 75 70 64 61 74 65 0d 03 |....JSR update..| 00000710 98 10 4a 53 52 20 6e 6f 73 70 61 63 65 73 0d 03 |..JSR nospaces..| 00000720 a2 05 3a 0d 03 ac 0e 2e 77 68 6f 6c 65 6c 69 6e |..:.....wholelin| 00000730 65 0d 03 b6 0e 4a 53 52 20 75 70 64 61 74 65 0d |e....JSR update.| 00000740 03 c0 19 43 4d 50 20 23 31 33 3a 42 4e 45 20 77 |...CMP #13:BNE w| 00000750 68 6f 6c 65 6c 69 6e 65 0d 03 ca 05 3a 0d 03 d4 |holeline....:...| 00000760 12 2e 6c 69 6e 65 69 6e 63 72 65 6d 65 6e 74 0d |..lineincrement.| 00000770 03 de 07 54 59 41 0d 03 e8 22 43 4c 43 3a 41 44 |...TYA..."CLC:AD| 00000780 43 20 62 61 73 65 31 3a 53 54 41 20 62 61 73 65 |C base1:STA base| 00000790 31 3a 42 43 43 20 4c 31 0d 03 f2 0f 49 4e 43 20 |1:BCC L1....INC | 000007a0 62 61 73 65 31 2b 31 0d 03 fc 07 2e 4c 31 0d 04 |base1+1.....L1..| 000007b0 06 1a 4c 44 59 20 79 6e 65 77 3a 43 50 59 20 23 |..LDY ynew:CPY #| 000007c0 34 3a 42 45 51 20 4c 32 0d 04 10 0e 54 59 41 3a |4:BEQ L2....TYA:| 000007d0 4c 44 59 20 23 33 0d 04 1a 11 53 54 41 20 28 62 |LDY #3....STA (b| 000007e0 61 73 65 32 29 2c 59 0d 04 24 22 43 4c 43 3a 41 |ase2),Y..$"CLC:A| 000007f0 44 43 20 62 61 73 65 32 3a 53 54 41 20 62 61 73 |DC base2:STA bas| 00000800 65 32 3a 42 43 43 20 4c 32 0d 04 2e 0f 49 4e 43 |e2:BCC L2....INC| 00000810 20 62 61 73 65 32 2b 31 0d 04 38 07 2e 4c 32 0d | base2+1..8..L2.| 00000820 04 42 1b 4c 44 41 20 23 31 33 3a 4c 44 59 20 23 |.B.LDA #13:LDY #| 00000830 30 3a 53 54 59 20 79 6e 65 77 0d 04 4c 05 3a 0d |0:STY ynew..L.:.| 00000840 04 56 0b 2e 75 70 64 61 74 65 0d 04 60 19 49 4e |.V..update..`.IN| 00000850 59 3a 53 54 59 20 79 6f 6c 64 3a 4c 44 59 20 79 |Y:STY yold:LDY y| 00000860 6e 65 77 0d 04 6a 11 53 54 41 20 28 62 61 73 65 |new..j.STA (base| 00000870 32 29 2c 59 0d 04 74 19 49 4e 59 3a 53 54 59 20 |2),Y..t.INY:STY | 00000880 79 6e 65 77 3a 4c 44 59 20 79 6f 6c 64 0d 04 7e |ynew:LDY yold..~| 00000890 11 4c 44 41 20 28 62 61 73 65 31 29 2c 59 0d 04 |.LDA (base1),Y..| 000008a0 88 07 52 54 53 0d 04 92 05 3a 0d 04 9c 0b 2e 73 |..RTS....:.....s| 000008b0 74 72 69 6e 67 0d 04 a6 0e 4a 53 52 20 75 70 64 |tring....JSR upd| 000008c0 61 74 65 0d 04 b0 16 43 4d 50 20 23 33 34 3a 42 |ate....CMP #34:B| 000008d0 45 51 20 75 70 64 61 74 65 0d 04 ba 16 43 4d 50 |EQ update....CMP| 000008e0 20 23 31 33 3a 42 4e 45 20 73 74 72 69 6e 67 0d | #13:BNE string.| 000008f0 04 c4 07 52 54 53 0d 04 ce 05 3a 0d 04 d8 0d 2e |...RTS....:.....| 00000900 6e 6f 73 70 61 63 65 73 0d 04 e2 19 43 4d 50 20 |nospaces....CMP | 00000910 23 33 32 3a 42 4e 45 20 65 6e 64 73 70 61 63 65 |#32:BNE endspace| 00000920 73 0d 04 ec 22 49 4e 59 3a 4c 44 41 20 28 62 61 |s..."INY:LDA (ba| 00000930 73 65 31 29 2c 59 3a 4a 4d 50 20 6e 6f 73 70 61 |se1),Y:JMP nospa| 00000940 63 65 73 0d 04 f6 0e 2e 65 6e 64 73 70 61 63 65 |ces.....endspace| 00000950 73 0d 05 00 07 52 54 53 0d 05 0a 05 3a 0d 05 14 |s....RTS....:...| 00000960 09 2e 6e 65 78 74 0d 05 1e 0e 4a 53 52 20 75 70 |..next....JSR up| 00000970 64 61 74 65 0d 05 28 0d 2e 6d 6f 72 65 6e 65 78 |date..(..morenex| 00000980 74 0d 05 32 16 43 4d 50 20 23 97 22 2c 22 3a 42 |t..2.CMP #.",":B| 00000990 45 51 20 6e 65 78 74 0d 05 3c 19 43 4d 50 20 23 |EQ next..<.CMP #| 000009a0 97 22 3a 22 3a 42 45 51 20 65 6e 64 6e 65 78 74 |.":":BEQ endnext| 000009b0 0d 05 46 1b 43 4d 50 20 23 31 33 20 20 20 20 3a |..F.CMP #13 :| 000009c0 42 45 51 20 65 6e 64 6e 65 78 74 0d 05 50 15 49 |BEQ endnext..P.I| 000009d0 4e 59 3a 4c 44 41 20 28 62 61 73 65 31 29 2c 59 |NY:LDA (base1),Y| 000009e0 0d 05 5a 10 4a 4d 50 20 6d 6f 72 65 6e 65 78 74 |..Z.JMP morenext| 000009f0 0d 05 64 0c 2e 65 6e 64 6e 65 78 74 0d 05 6e 07 |..d..endnext..n.| 00000a00 52 54 53 0d 05 78 05 3a 0d 05 82 08 2e 72 65 6d |RTS..x.:.....rem| 00000a10 0d 05 8c 15 49 4e 59 3a 4c 44 41 20 28 62 61 73 |....INY:LDA (bas| 00000a20 65 31 29 2c 59 0d 05 96 13 43 4d 50 20 23 31 33 |e1),Y....CMP #13| 00000a30 3a 42 4e 45 20 72 65 6d 0d 05 a0 07 52 54 53 0d |:BNE rem....RTS.| 00000a40 05 aa 05 3a 0d 05 b4 0c 2e 63 68 65 63 6b 6f 73 |...:.....checkos| 00000a50 0d 05 be 1e 53 54 41 20 66 6c 61 67 3a 53 54 59 |....STA flag:STY| 00000a60 20 79 6f 6c 64 3a 4c 44 59 20 79 6e 65 77 0d 05 | yold:LDY ynew..| 00000a70 c8 19 43 50 59 20 23 34 3a 42 45 51 20 65 6e 64 |..CPY #4:BEQ end| 00000a80 63 68 65 63 6b 6f 73 0d 05 d2 15 44 45 59 3a 4c |checkos....DEY:L| 00000a90 44 41 20 28 62 61 73 65 32 29 2c 59 0d 05 dc 1a |DA (base2),Y....| 00000aa0 43 4d 50 20 23 35 38 3a 42 45 51 20 65 6e 64 63 |CMP #58:BEQ endc| 00000ab0 68 65 63 6b 6f 73 0d 05 e6 1b 43 4d 50 20 23 31 |heckos....CMP #1| 00000ac0 33 39 3a 42 45 51 20 65 6e 64 63 68 65 63 6b 6f |39:BEQ endchecko| 00000ad0 73 0d 05 f0 1b 43 4d 50 20 23 31 34 30 3a 42 45 |s....CMP #140:BE| 00000ae0 51 20 65 6e 64 63 68 65 63 6b 6f 73 0d 05 fa 0c |Q endcheckos....| 00000af0 49 4e 43 20 66 6c 61 67 0d 06 04 0f 2e 65 6e 64 |INC flag.....end| 00000b00 63 68 65 63 6b 6f 73 0d 06 0e 16 4c 44 59 20 79 |checkos....LDY y| 00000b10 6f 6c 64 3a 4c 44 41 20 23 97 22 2a 22 0d 06 18 |old:LDA #."*"...| 00000b20 16 4c 44 41 20 23 97 22 2a 22 3a 43 4d 50 20 66 |.LDA #."*":CMP f| 00000b30 6c 61 67 0d 06 22 07 52 54 53 0d 06 2c 05 3a 0d |lag..".RTS..,.:.| 00000b40 06 36 0c 2e 76 61 72 6c 69 73 74 0d 06 40 0a 4c |.6..varlist..@.L| 00000b50 44 58 20 23 30 0d 06 4a 0c 2e 6d 6f 72 65 76 61 |DX #0..J..moreva| 00000b60 72 0d 06 54 13 53 54 41 20 76 61 72 62 75 66 66 |r..T.STA varbuff| 00000b70 65 72 2c 58 0d 06 5e 0b 49 4e 58 3a 49 4e 59 0d |er,X..^.INX:INY.| 00000b80 06 68 11 4c 44 41 20 28 62 61 73 65 31 29 2c 59 |.h.LDA (base1),Y| 00000b90 0d 06 72 16 43 4d 50 20 23 34 38 3a 42 43 43 20 |..r.CMP #48:BCC | 00000ba0 65 6e 64 76 61 72 0d 06 7c 17 43 4d 50 20 23 35 |endvar..|.CMP #5| 00000bb0 38 3a 42 43 43 20 6d 6f 72 65 76 61 72 0d 06 86 |8:BCC morevar...| 00000bc0 16 43 4d 50 20 23 36 35 3a 42 43 43 20 65 6e 64 |.CMP #65:BCC end| 00000bd0 76 61 72 0d 06 90 17 43 4d 50 20 23 39 31 3a 42 |var....CMP #91:B| 00000be0 43 43 20 6d 6f 72 65 76 61 72 0d 06 9a 16 43 4d |CC morevar....CM| 00000bf0 50 20 23 39 35 3a 42 43 43 20 65 6e 64 76 61 72 |P #95:BCC endvar| 00000c00 0d 06 a4 18 43 4d 50 20 23 31 32 33 3a 42 43 43 |....CMP #123:BCC| 00000c10 20 6d 6f 72 65 76 61 72 0d 06 ae 0b 2e 65 6e 64 | morevar.....end| 00000c20 76 61 72 0d 06 b8 18 43 50 58 20 23 31 3a 42 4e |var....CPX #1:BN| 00000c30 45 20 66 69 6e 64 70 6c 61 63 65 0d 06 c2 15 44 |E findplace....D| 00000c40 45 59 3a 4c 44 41 20 28 62 61 73 65 31 29 2c 59 |EY:LDA (base1),Y| 00000c50 0d 06 cc 1a 43 4d 50 20 23 39 31 3a 42 43 43 20 |....CMP #91:BCC | 00000c60 6c 65 61 76 65 61 6c 6f 6e 65 0d 06 d6 07 49 4e |leavealone....IN| 00000c70 59 0d 06 e0 0e 2e 66 69 6e 64 70 6c 61 63 65 0d |Y.....findplace.| 00000c80 06 ea 11 4a 53 52 20 6c 6f 6f 6b 75 70 76 61 72 |...JSR lookupvar| 00000c90 0d 06 f4 0e 4a 4d 50 20 65 6e 64 68 65 78 0d 06 |....JMP endhex..| 00000ca0 fe 0f 2e 6c 65 61 76 65 61 6c 6f 6e 65 0d 07 08 |...leavealone...| 00000cb0 19 4a 53 52 20 75 70 64 61 74 65 3a 4a 4d 50 20 |.JSR update:JMP | 00000cc0 65 6e 64 68 65 78 0d 07 12 05 3a 0d 07 1c 0e 2e |endhex....:.....| 00000cd0 6c 6f 6f 6b 75 70 76 61 72 0d 07 26 1a 53 54 59 |lookupvar..&.STY| 00000ce0 20 79 6f 6c 64 3a 53 54 58 20 76 61 72 6c 65 6e | yold:STX varlen| 00000cf0 67 74 68 0d 07 30 22 4c 44 41 20 23 76 61 72 74 |gth..0"LDA #vart| 00000d00 61 62 6c 65 20 83 32 35 36 3a 53 54 41 20 76 61 |able .256:STA va| 00000d10 72 62 61 73 65 0d 07 3a 24 4c 44 41 20 23 76 61 |rbase..:$LDA #va| 00000d20 72 74 61 62 6c 65 20 81 32 35 36 3a 53 54 41 20 |rtable .256:STA | 00000d30 76 61 72 62 61 73 65 2b 31 0d 07 44 1d 4c 44 58 |varbase+1..D.LDX| 00000d40 20 23 97 22 61 22 2d 31 3a 53 54 58 20 73 68 6f | #."a"-1:STX sho| 00000d50 72 74 6e 61 6d 65 0d 07 4e 0e 2e 6e 65 78 74 65 |rtname..N..nexte| 00000d60 6e 74 72 79 0d 07 58 0e 4c 44 59 20 23 30 3a 49 |ntry..X.LDY #0:I| 00000d70 4e 58 0d 07 62 17 43 50 58 20 23 97 22 7b 22 3a |NX..b.CPX #."{":| 00000d80 42 4e 45 20 6e 6f 69 6e 63 0d 07 6c 1b 4c 44 58 |BNE noinc..l.LDX| 00000d90 20 23 97 22 61 22 3a 49 4e 43 20 73 68 6f 72 74 | #."a":INC short| 00000da0 6e 61 6d 65 0d 07 76 0a 2e 6e 6f 69 6e 63 0d 07 |name..v..noinc..| 00000db0 80 21 4c 44 41 20 28 76 61 72 62 61 73 65 29 2c |.!LDA (varbase),| 00000dc0 59 3a 42 45 51 20 65 6d 70 74 79 73 6c 6f 74 0d |Y:BEQ emptyslot.| 00000dd0 07 8a 16 53 54 41 20 73 65 74 6e 65 78 74 65 6e |...STA setnexten| 00000de0 74 72 79 2b 31 0d 07 94 1e 43 4d 50 20 76 61 72 |try+1....CMP var| 00000df0 6c 65 6e 67 74 68 3a 42 45 51 20 74 72 79 6d 61 |length:BEQ tryma| 00000e00 74 63 68 0d 07 9e 11 2e 73 65 74 6e 65 78 74 65 |tch.....setnexte| 00000e10 6e 74 72 79 0d 07 a8 0a 4c 44 41 20 23 30 0d 07 |ntry....LDA #0..| 00000e20 b2 2d 53 45 43 3a 41 44 43 20 76 61 72 62 61 73 |.-SEC:ADC varbas| 00000e30 65 3a 53 54 41 20 76 61 72 62 61 73 65 3a 42 43 |e:STA varbase:BC| 00000e40 43 20 6e 65 78 74 65 6e 74 72 79 0d 07 bc 1f 49 |C nextentry....I| 00000e50 4e 43 20 76 61 72 62 61 73 65 2b 31 3a 42 43 53 |NC varbase+1:BCS| 00000e60 20 6e 65 78 74 65 6e 74 72 79 0d 07 c6 0d 2e 74 | nextentry.....t| 00000e70 72 79 6d 61 74 63 68 0d 07 d0 07 54 41 59 0d 07 |rymatch....TAY..| 00000e80 da 0a 2e 6c 6f 6f 70 32 0d 07 e4 25 4c 44 41 20 |...loop2...%LDA | 00000e90 28 76 61 72 62 61 73 65 29 2c 59 3a 43 4d 50 20 |(varbase),Y:CMP | 00000ea0 76 61 72 62 75 66 66 65 72 2d 31 2c 59 0d 07 ee |varbuffer-1,Y...| 00000eb0 14 42 4e 45 20 73 65 74 6e 65 78 74 65 6e 74 72 |.BNE setnextentr| 00000ec0 79 0d 07 f8 11 44 45 59 3a 42 4e 45 20 6c 6f 6f |y....DEY:BNE loo| 00000ed0 70 32 0d 08 02 20 4a 53 52 20 6e 65 77 6e 61 6d |p2... JSR newnam| 00000ee0 65 3a 4a 4d 50 20 65 6e 64 6c 6f 6f 6b 75 70 76 |e:JMP endlookupv| 00000ef0 61 72 0d 08 0c 0e 2e 65 6d 70 74 79 73 6c 6f 74 |ar.....emptyslot| 00000f00 0d 08 16 21 4c 44 41 20 76 61 72 6c 65 6e 67 74 |...!LDA varlengt| 00000f10 68 3a 53 54 41 20 28 76 61 72 62 61 73 65 29 2c |h:STA (varbase),| 00000f20 59 0d 08 20 0a 2e 6c 6f 6f 70 33 0d 08 2a 07 49 |Y.. ..loop3..*.I| 00000f30 4e 59 0d 08 34 25 4c 44 41 20 76 61 72 62 75 66 |NY..4%LDA varbuf| 00000f40 66 65 72 2d 31 2c 59 3a 53 54 41 20 28 76 61 72 |fer-1,Y:STA (var| 00000f50 62 61 73 65 29 2c 59 0d 08 3e 0e 4a 53 52 20 6f |base),Y..>.JSR o| 00000f60 73 77 72 63 68 0d 08 48 1b 43 50 59 20 76 61 72 |swrch..H.CPY var| 00000f70 6c 65 6e 67 74 68 3a 42 4e 45 20 6c 6f 6f 70 33 |length:BNE loop3| 00000f80 0d 08 52 20 4a 53 52 20 6e 65 77 6e 61 6d 65 3a |..R JSR newname:| 00000f90 4a 53 52 20 70 72 69 6e 74 6e 65 77 6e 61 6d 65 |JSR printnewname| 00000fa0 0d 08 5c 0e 4a 53 52 20 6f 73 6e 65 77 6c 0d 08 |..\.JSR osnewl..| 00000fb0 66 11 2e 65 6e 64 6c 6f 6f 6b 75 70 76 61 72 0d |f..endlookupvar.| 00000fc0 08 70 1a 4c 44 59 20 79 6f 6c 64 3a 4c 44 41 20 |.p.LDY yold:LDA | 00000fd0 28 62 61 73 65 31 29 2c 59 0d 08 7a 07 52 54 53 |(base1),Y..z.RTS| 00000fe0 0d 08 84 05 3a 0d 08 8e 0c 2e 6e 65 77 6e 61 6d |....:.....newnam| 00000ff0 65 0d 08 98 11 4c 44 41 20 73 68 6f 72 74 6e 61 |e....LDA shortna| 00001000 6d 65 0d 08 a2 0c 4c 44 59 20 79 6e 65 77 0d 08 |me....LDY ynew..| 00001010 ac 19 43 4d 50 20 23 97 22 61 22 3a 42 43 43 20 |..CMP #."a":BCC | 00001020 6a 75 73 74 6f 6e 65 0d 08 b6 15 53 54 41 20 28 |justone....STA (| 00001030 62 61 73 65 32 29 2c 59 3a 49 4e 59 0d 08 c0 0c |base2),Y:INY....| 00001040 2e 6a 75 73 74 6f 6e 65 0d 08 ca 07 54 58 41 0d |.justone....TXA.| 00001050 08 d4 11 53 54 41 20 28 62 61 73 65 32 29 2c 59 |...STA (base2),Y| 00001060 0d 08 de 10 49 4e 59 3a 53 54 59 20 79 6e 65 77 |....INY:STY ynew| 00001070 0d 08 e8 07 52 54 53 0d 08 f2 05 3a 0d 08 fc 11 |....RTS....:....| 00001080 2e 70 72 69 6e 74 6e 65 77 6e 61 6d 65 0d 09 06 |.printnewname...| 00001090 10 53 54 58 20 73 69 6e 67 6c 65 2b 31 0d 09 10 |.STX single+1...| 000010a0 17 4c 44 41 20 23 31 33 34 3a 4a 53 52 20 6f 73 |.LDA #134:JSR os| 000010b0 62 79 74 65 0d 09 1a 17 4c 44 41 20 23 33 31 20 |byte....LDA #31 | 000010c0 3a 4a 53 52 20 6f 73 77 72 63 68 0d 09 24 17 4c |:JSR oswrch..$.L| 000010d0 44 41 20 23 33 35 20 3a 4a 53 52 20 6f 73 77 72 |DA #35 :JSR oswr| 000010e0 63 68 0d 09 2e 17 54 59 41 20 20 20 20 20 3a 4a |ch....TYA :J| 000010f0 53 52 20 6f 73 77 72 63 68 0d 09 38 11 4c 44 41 |SR oswrch..8.LDA| 00001100 20 73 68 6f 72 74 6e 61 6d 65 0d 09 42 18 43 4d | shortname..B.CM| 00001110 50 20 23 97 22 61 22 3a 42 43 43 20 73 69 6e 67 |P #."a":BCC sing| 00001120 6c 65 0d 09 4c 0e 4a 53 52 20 6f 73 77 72 63 68 |le..L.JSR oswrch| 00001130 0d 09 56 0b 2e 73 69 6e 67 6c 65 0d 09 60 15 4c |..V..single..`.L| 00001140 44 41 20 23 30 3a 4a 53 52 20 6f 73 77 72 63 68 |DA #0:JSR oswrch| 00001150 0d 09 6a 07 52 54 53 0d 09 74 05 3a 0d 09 7e 0e |..j.RTS..t.:..~.| 00001160 2e 61 73 73 65 6d 62 6c 65 72 0d 09 88 1b 4a 53 |.assembler....JS| 00001170 52 20 75 70 64 61 74 65 3a 4a 53 52 20 6e 6f 73 |R update:JSR nos| 00001180 70 61 63 65 73 0d 09 92 10 4a 53 52 20 74 65 73 |paces....JSR tes| 00001190 74 65 6e 64 32 0d 09 9c 0a 2e 6c 6f 6f 70 34 0d |tend2.....loop4.| 000011a0 09 a6 0f 4a 53 52 20 61 73 73 6c 69 6e 65 0d 09 |...JSR assline..| 000011b0 b0 17 43 4d 50 20 23 97 22 5d 22 3a 42 4e 45 20 |..CMP #."]":BNE | 000011c0 6c 6f 6f 70 34 0d 09 ba 0e 4a 4d 50 20 75 70 64 |loop4....JMP upd| 000011d0 61 74 65 0d 09 c4 05 3a 0d 09 ce 0c 2e 61 73 73 |ate....:.....ass| 000011e0 6c 69 6e 65 0d 09 d8 24 4a 53 52 20 75 70 64 61 |line...$JSR upda| 000011f0 74 65 3a 4a 53 52 20 75 70 64 61 74 65 3a 4a 53 |te:JSR update:JS| 00001200 52 20 75 70 64 61 74 65 0d 09 e2 11 2e 63 68 65 |R update.....che| 00001210 63 6b 73 70 61 63 65 73 32 0d 09 ec 10 4a 53 52 |ckspaces2....JSR| 00001220 20 6e 6f 73 70 61 63 65 73 0d 09 f6 1a 43 4d 50 | nospaces....CMP| 00001230 20 23 97 22 3a 22 3a 42 45 51 20 6e 6f 63 6f 6c | #.":":BEQ nocol| 00001240 6f 6e 32 0d 0a 00 10 4a 4d 50 20 74 65 73 74 65 |on2....JMP teste| 00001250 6e 64 32 0d 0a 0a 0d 2e 6e 6f 63 6f 6c 6f 6e 32 |nd2.....nocolon2| 00001260 0d 0a 14 26 49 4e 59 3a 4c 44 41 20 28 62 61 73 |...&INY:LDA (bas| 00001270 65 31 29 2c 59 3a 4a 4d 50 20 63 68 65 63 6b 73 |e1),Y:JMP checks| 00001280 70 61 63 65 73 32 0d 0a 1e 0a 2e 63 6f 64 65 32 |paces2.....code2| 00001290 0d 0a 28 1a 43 4d 50 20 23 36 35 3a 42 43 43 20 |..(.CMP #65:BCC | 000012a0 74 65 73 74 73 70 61 63 65 32 0d 0a 32 14 43 4d |testspace2..2.CM| 000012b0 50 20 23 39 31 3a 42 43 43 20 76 61 72 32 0d 0a |P #91:BCC var2..| 000012c0 3c 18 43 4d 50 20 23 39 35 3a 42 43 43 20 74 65 |<.CMP #95:BCC te| 000012d0 73 74 72 65 6d 32 0d 0a 46 18 43 4d 50 20 23 31 |strem2..F.CMP #1| 000012e0 32 33 3a 42 43 53 20 74 65 73 74 4f 52 41 0d 0a |23:BCS testORA..| 000012f0 50 09 2e 76 61 72 32 0d 0a 5a 1d 4a 53 52 20 6d |P..var2..Z.JSR m| 00001300 65 6d 63 68 65 63 6b 3a 4a 4d 50 20 74 65 73 74 |emcheck:JMP test| 00001310 65 6e 64 32 0d 0a 64 0f 2e 74 65 73 74 73 70 61 |end2..d..testspa| 00001320 63 65 32 0d 0a 6e 1b 43 4d 50 20 23 33 32 3a 42 |ce2..n.CMP #32:B| 00001330 4e 45 20 74 65 73 74 73 74 72 69 6e 67 32 0d 0a |NE teststring2..| 00001340 78 22 49 4e 59 3a 4c 44 41 20 28 62 61 73 65 31 |x"INY:LDA (base1| 00001350 29 2c 59 3a 4a 4d 50 20 74 65 73 74 65 6e 64 32 |),Y:JMP testend2| 00001360 0d 0a 82 10 2e 74 65 73 74 73 74 72 69 6e 67 32 |.....teststring2| 00001370 0d 0a 8c 1b 43 4d 50 20 23 33 34 3a 42 4e 45 20 |....CMP #34:BNE | 00001380 74 65 73 74 6e 75 6d 62 65 72 32 0d 0a 96 1b 4a |testnumber2....J| 00001390 53 52 20 73 74 72 69 6e 67 3a 4a 4d 50 20 74 65 |SR string:JMP te| 000013a0 73 74 65 6e 64 32 0d 0a a0 10 2e 74 65 73 74 6e |stend2.....testn| 000013b0 75 6d 62 65 72 32 0d 0a aa 18 43 4d 50 20 23 34 |umber2....CMP #4| 000013c0 38 3a 42 43 43 20 74 65 73 74 68 65 78 32 0d 0a |8:BCC testhex2..| 000013d0 b4 18 43 4d 50 20 23 35 38 3a 42 43 53 20 63 61 |..CMP #58:BCS ca| 000013e0 72 72 79 6f 6e 32 0d 0a be 1b 4a 53 52 20 6e 75 |rryon2....JSR nu| 000013f0 6d 62 65 72 3a 4a 4d 50 20 74 65 73 74 65 6e 64 |mber:JMP testend| 00001400 32 0d 0a c8 0d 2e 74 65 73 74 68 65 78 32 0d 0a |2.....testhex2..| 00001410 d2 18 43 4d 50 20 23 33 38 3a 42 4e 45 20 63 61 |..CMP #38:BNE ca| 00001420 72 72 79 6f 6e 32 0d 0a dc 18 4a 53 52 20 68 65 |rryon2....JSR he| 00001430 78 3a 4a 4d 50 20 74 65 73 74 65 6e 64 32 0d 0a |x:JMP testend2..| 00001440 e6 0d 2e 74 65 73 74 72 65 6d 32 0d 0a f0 1c 43 |...testrem2....C| 00001450 4d 50 20 23 97 22 5c 22 3a 42 4e 45 20 74 65 73 |MP #."\":BNE tes| 00001460 74 65 6e 64 61 73 73 0d 0a fa 20 4a 53 52 20 72 |tendass... JSR r| 00001470 65 6d 61 73 73 65 6d 62 6c 79 3a 4a 4d 50 20 74 |emassembly:JMP t| 00001480 65 73 74 65 6e 64 32 0d 0b 04 0f 2e 74 65 73 74 |estend2.....test| 00001490 65 6e 64 61 73 73 0d 0b 0e 1a 43 4d 50 20 23 97 |endass....CMP #.| 000014a0 22 5d 22 3a 42 4e 45 20 63 61 72 72 79 6f 6e 32 |"]":BNE carryon2| 000014b0 0d 0b 18 07 52 54 53 0d 0b 22 0c 2e 74 65 73 74 |....RTS.."..test| 000014c0 4f 52 41 0d 0b 2c 19 43 4d 50 20 23 26 38 34 3a |ORA..,.CMP #&84:| 000014d0 42 4e 45 20 63 61 72 72 79 6f 6e 32 0d 0b 36 0e |BNE carryon2..6.| 000014e0 4a 53 52 20 75 70 64 61 74 65 0d 0b 40 1a 43 4d |JSR update..@.CM| 000014f0 50 20 23 97 22 41 22 3a 42 4e 45 20 63 61 72 72 |P #."A":BNE carr| 00001500 79 6f 6e 32 0d 0b 4a 1b 4a 53 52 20 75 70 64 61 |yon2..J.JSR upda| 00001510 74 65 3a 4a 4d 50 20 74 65 73 74 65 6e 64 32 0d |te:JMP testend2.| 00001520 0b 54 0d 2e 63 61 72 72 79 6f 6e 32 0d 0b 5e 0e |.T..carryon2..^.| 00001530 4a 53 52 20 75 70 64 61 74 65 0d 0b 68 0d 2e 74 |JSR update..h..t| 00001540 65 73 74 65 6e 64 32 0d 0b 72 15 43 4d 50 20 23 |estend2..r.CMP #| 00001550 31 33 3a 42 4e 45 20 63 6f 64 65 32 0d 0b 7c 15 |13:BNE code2..|.| 00001560 4a 4d 50 20 6c 69 6e 65 69 6e 63 72 65 6d 65 6e |JMP lineincremen| 00001570 74 0d 0b 86 05 3a 0d 0b 90 10 2e 72 65 6d 61 73 |t....:.....remas| 00001580 73 65 6d 62 6c 79 0d 0b 9a 14 49 4e 59 3a 4c 44 |sembly....INY:LD| 00001590 41 28 62 61 73 65 31 29 2c 59 0d 0b a4 19 43 4d |A(base1),Y....CM| 000015a0 50 20 23 31 33 3a 42 45 51 20 65 6e 64 72 65 6d |P #13:BEQ endrem| 000015b0 61 73 73 0d 0b ae 1d 43 4d 50 20 23 97 22 3a 22 |ass....CMP #.":"| 000015c0 3a 42 4e 45 20 72 65 6d 61 73 73 65 6d 62 6c 79 |:BNE remassembly| 000015d0 0d 0b b8 0e 2e 65 6e 64 72 65 6d 61 73 73 0d 0b |.....endremass..| 000015e0 c2 07 52 54 53 0d 0b cc 05 3a 0d 0b d6 0d 2e 6d |..RTS....:.....m| 000015f0 65 6d 63 68 65 63 6b 0d 0b e0 0a 4c 44 58 20 23 |emcheck....LDX #| 00001600 30 0d 0b ea 0d 2e 6d 6f 72 65 76 61 72 32 0d 0b |0.....morevar2..| 00001610 f4 13 53 54 41 20 76 61 72 62 75 66 66 65 72 2c |..STA varbuffer,| 00001620 58 0d 0b fe 0b 49 4e 59 3a 49 4e 58 0d 0c 08 17 |X....INY:INX....| 00001630 43 50 58 20 23 33 3a 42 4e 45 20 6d 6f 72 65 76 |CPX #3:BNE morev| 00001640 61 72 33 0d 0c 12 1d 4a 53 52 20 6d 6e 65 6d 6f |ar3....JSR mnemo| 00001650 6e 69 63 3a 42 4e 45 20 6d 6f 72 65 76 61 72 33 |nic:BNE morevar3| 00001660 0d 0c 1c 15 4c 44 41 20 28 62 61 73 65 31 29 2c |....LDA (base1),| 00001670 59 3a 52 54 53 0d 0c 26 0d 2e 6d 6f 72 65 76 61 |Y:RTS..&..moreva| 00001680 72 33 0d 0c 30 11 4c 44 41 20 28 62 61 73 65 31 |r3..0.LDA (base1| 00001690 29 2c 59 0d 0c 3a 17 43 4d 50 20 23 34 38 3a 42 |),Y..:.CMP #48:B| 000016a0 43 43 20 65 6e 64 76 61 72 32 0d 0c 44 18 43 4d |CC endvar2..D.CM| 000016b0 50 20 23 35 38 3a 42 43 43 20 6d 6f 72 65 76 61 |P #58:BCC moreva| 000016c0 72 32 0d 0c 4e 17 43 4d 50 20 23 36 35 3a 42 43 |r2..N.CMP #65:BC| 000016d0 43 20 65 6e 64 76 61 72 32 0d 0c 58 18 43 4d 50 |C endvar2..X.CMP| 000016e0 20 23 39 31 3a 42 43 43 20 6d 6f 72 65 76 61 72 | #91:BCC morevar| 000016f0 32 0d 0c 62 17 43 4d 50 20 23 39 35 3a 42 43 43 |2..b.CMP #95:BCC| 00001700 20 65 6e 64 76 61 72 32 0d 0c 6c 19 43 4d 50 20 | endvar2..l.CMP | 00001710 23 31 32 33 3a 42 43 43 20 6d 6f 72 65 76 61 72 |#123:BCC morevar| 00001720 32 0d 0c 76 0c 2e 65 6e 64 76 61 72 32 0d 0c 80 |2..v..endvar2...| 00001730 19 43 50 58 20 23 31 3a 42 4e 45 20 66 69 6e 64 |.CPX #1:BNE find| 00001740 70 6c 61 63 65 32 0d 0c 8a 15 44 45 59 3a 4c 44 |place2....DEY:LD| 00001750 41 20 28 62 61 73 65 31 29 2c 59 0d 0c 94 1b 43 |A (base1),Y....C| 00001760 4d 50 20 23 39 31 3a 42 43 43 20 6c 65 61 76 65 |MP #91:BCC leave| 00001770 61 6c 6f 6e 65 32 0d 0c 9e 07 49 4e 59 0d 0c a8 |alone2....INY...| 00001780 0f 2e 66 69 6e 64 70 6c 61 63 65 32 0d 0c b2 11 |..findplace2....| 00001790 4a 53 52 20 6c 6f 6f 6b 75 70 76 61 72 0d 0c bc |JSR lookupvar...| 000017a0 0e 4a 4d 50 20 65 6e 64 68 65 78 0d 0c c6 10 2e |.JMP endhex.....| 000017b0 6c 65 61 76 65 61 6c 6f 6e 65 32 0d 0c d0 19 4a |leavealone2....J| 000017c0 53 52 20 75 70 64 61 74 65 3a 4a 4d 50 20 65 6e |SR update:JMP en| 000017d0 64 68 65 78 0d 0c da 05 3a 0d 0c e4 0d 2e 6d 6e |dhex....:.....mn| 000017e0 65 6d 6f 6e 69 63 0d 0c ee 0c 53 54 59 20 79 6f |emonic....STY yo| 000017f0 6c 64 0d 0c f8 0a 2e 6c 6f 6f 70 35 0d 0d 02 15 |ld.....loop5....| 00001800 4c 44 41 20 76 61 72 62 75 66 66 65 72 2d 31 2c |LDA varbuffer-1,| 00001810 58 0d 0d 0c 19 43 4d 50 20 23 39 37 3a 42 43 43 |X....CMP #97:BCC| 00001820 20 75 70 70 65 72 63 61 73 65 0d 0d 16 0a 80 20 | uppercase..... | 00001830 23 26 44 46 0d 0d 20 0e 2e 75 70 70 65 72 63 61 |#&DF.. ..upperca| 00001840 73 65 0d 0d 2a 13 53 54 41 20 6d 65 6d 63 6f 70 |se..*.STA memcop| 00001850 79 2d 31 2c 58 0d 0d 34 11 44 45 58 3a 42 4e 45 |y-1,X..4.DEX:BNE| 00001860 20 6c 6f 6f 70 35 0d 0d 3e 15 4c 44 41 20 23 31 | loop5..>.LDA #1| 00001870 3a 53 54 41 20 62 6f 74 74 6f 6d 0d 0d 48 13 4c |:STA bottom..H.L| 00001880 44 41 20 23 36 36 3a 53 54 41 20 74 6f 70 0d 0d |DA #66:STA top..| 00001890 52 0a 2e 6c 6f 6f 70 36 0d 0d 5c 23 4c 44 41 20 |R..loop6..\#LDA | 000018a0 74 6f 70 3a 43 4d 50 20 62 6f 74 74 6f 6d 3a 42 |top:CMP bottom:B| 000018b0 43 43 20 6e 6f 74 66 6f 75 6e 64 0d 0d 66 12 43 |CC notfound..f.C| 000018c0 4c 43 3a 41 44 43 20 62 6f 74 74 6f 6d 0d 0d 70 |LC:ADC bottom..p| 000018d0 11 4c 53 52 20 41 3a 53 54 41 20 6d 69 64 0d 0d |.LSR A:STA mid..| 000018e0 7a 1c 41 53 4c 20 41 3a 41 44 43 20 6d 69 64 3a |z.ASL A:ADC mid:| 000018f0 54 41 59 3a 4c 44 58 20 23 30 0d 0d 84 0a 2e 6c |TAY:LDX #0.....l| 00001900 6f 6f 70 37 0d 0d 8e 1f 4c 44 41 20 74 61 62 6c |oop7....LDA tabl| 00001910 65 2d 33 2c 59 3a 43 4d 50 20 6d 65 6d 63 6f 70 |e-3,Y:CMP memcop| 00001920 79 2c 58 0d 0d 98 13 42 4e 45 20 6b 65 65 70 6c |y,X....BNE keepl| 00001930 6f 6f 6b 69 6e 67 0d 0d a2 1c 49 4e 59 3a 49 4e |ooking....INY:IN| 00001940 58 3a 43 50 58 20 23 33 3a 42 4e 45 20 6c 6f 6f |X:CPX #3:BNE loo| 00001950 70 37 0d 0d ac 1d 4c 44 41 20 6d 69 64 3a 43 4d |p7....LDA mid:CM| 00001960 50 20 23 32 36 3a 42 4e 45 20 66 6f 75 6e 64 0d |P #26:BNE found.| 00001970 0d b6 0c 4c 44 59 20 79 6f 6c 64 0d 0d c0 1f 4c |...LDY yold....L| 00001980 44 41 20 28 62 61 73 65 31 29 2c 59 3a 53 54 41 |DA (base1),Y:STA| 00001990 20 6d 65 6d 63 6f 70 79 2c 58 0d 0d ca 07 49 4e | memcopy,X....IN| 000019a0 58 0d 0d d4 1a 43 4d 50 20 23 39 37 3a 42 43 43 |X....CMP #97:BCC| 000019b0 20 75 70 70 65 72 63 61 73 65 32 0d 0d de 0a 80 | uppercase2.....| 000019c0 20 23 26 44 46 0d 0d e8 0f 2e 75 70 70 65 72 63 | #&DF.....upperc| 000019d0 61 73 65 32 0d 0d f2 18 43 4d 50 20 23 97 22 53 |ase2....CMP #."S| 000019e0 22 3a 42 45 51 20 66 6f 75 6e 64 61 0d 0d fc 18 |":BEQ founda....| 000019f0 43 4d 50 20 23 97 22 42 22 3a 42 45 51 20 66 6f |CMP #."B":BEQ fo| 00001a00 75 6e 64 61 0d 0e 06 18 43 4d 50 20 23 97 22 57 |unda....CMP #."W| 00001a10 22 3a 42 45 51 20 66 6f 75 6e 64 61 0d 0e 10 1a |":BEQ founda....| 00001a20 43 4d 50 20 23 97 22 44 22 3a 42 4e 45 20 6e 6f |CMP #."D":BNE no| 00001a30 74 66 6f 75 6e 64 0d 0e 1a 0b 2e 66 6f 75 6e 64 |tfound.....found| 00001a40 61 0d 0e 24 10 49 4e 59 3a 53 54 59 20 79 6f 6c |a..$.INY:STY yol| 00001a50 64 0d 0e 2e 0a 2e 66 6f 75 6e 64 0d 0e 38 17 53 |d.....found..8.S| 00001a60 54 58 20 78 73 74 6f 72 65 2b 31 3a 4c 44 58 20 |TX xstore+1:LDX | 00001a70 23 30 0d 0e 42 0c 4c 44 59 20 79 6e 65 77 0d 0e |#0..B.LDY ynew..| 00001a80 4c 0a 2e 6c 6f 6f 70 38 0d 0e 56 1f 4c 44 41 20 |L..loop8..V.LDA | 00001a90 6d 65 6d 63 6f 70 79 2c 58 3a 53 54 41 20 28 62 |memcopy,X:STA (b| 00001aa0 61 73 65 32 29 2c 59 0d 0e 60 0b 49 4e 59 3a 49 |ase2),Y..`.INY:I| 00001ab0 4e 58 0d 0e 6a 0b 2e 78 73 74 6f 72 65 0d 0e 74 |NX..j..xstore..t| 00001ac0 14 43 50 58 20 23 30 3a 42 4e 45 20 6c 6f 6f 70 |.CPX #0:BNE loop| 00001ad0 38 0d 0e 7e 15 53 54 59 20 79 6e 65 77 3a 4c 44 |8..~.STY ynew:LD| 00001ae0 59 20 79 6f 6c 64 0d 0e 88 0a 4c 44 41 20 23 30 |Y yold....LDA #0| 00001af0 0d 0e 92 07 52 54 53 0d 0e 9c 10 2e 6b 65 65 70 |....RTS.....keep| 00001b00 6c 6f 6f 6b 69 6e 67 0d 0e a6 0f 42 43 53 20 73 |looking....BCS s| 00001b10 6d 61 6c 6c 65 72 0d 0e b0 24 4c 44 58 20 6d 69 |maller...$LDX mi| 00001b20 64 3a 49 4e 58 3a 53 54 58 20 62 6f 74 74 6f 6d |d:INX:STX bottom| 00001b30 3a 42 4e 45 20 6c 6f 6f 70 36 0d 0e ba 0c 2e 73 |:BNE loop6.....s| 00001b40 6d 61 6c 6c 65 72 0d 0e c4 21 4c 44 58 20 6d 69 |maller...!LDX mi| 00001b50 64 3a 44 45 58 3a 53 54 58 20 74 6f 70 3a 42 4e |d:DEX:STX top:BN| 00001b60 45 20 6c 6f 6f 70 36 0d 0e ce 0d 2e 6e 6f 74 66 |E loop6.....notf| 00001b70 6f 75 6e 64 0d 0e d8 1c 4c 44 41 20 23 26 46 46 |ound....LDA #&FF| 00001b80 3a 4c 44 58 20 23 33 3a 4c 44 59 20 79 6f 6c 64 |:LDX #3:LDY yold| 00001b90 0d 0e e2 07 52 54 53 0d 0e ec 05 3a 0d 0e f6 0b |....RTS....:....| 00001ba0 2e 6e 75 6d 62 65 72 0d 0f 00 0e 4a 53 52 20 75 |.number....JSR u| 00001bb0 70 64 61 74 65 0d 0f 0a 16 43 4d 50 20 23 34 38 |pdate....CMP #48| 00001bc0 3a 42 43 43 20 65 6e 64 68 65 78 0d 0f 14 16 43 |:BCC endhex....C| 00001bd0 4d 50 20 23 35 38 3a 42 43 53 20 65 6e 64 68 65 |MP #58:BCS endhe| 00001be0 78 0d 0f 1e 0e 42 43 43 20 6e 75 6d 62 65 72 0d |x....BCC number.| 00001bf0 0f 28 05 3a 0d 0f 32 08 2e 68 65 78 0d 0f 3c 0e |.(.:..2..hex..<.| 00001c00 4a 53 52 20 75 70 64 61 74 65 0d 0f 46 16 43 4d |JSR update..F.CM| 00001c10 50 20 23 34 38 3a 42 43 43 20 65 6e 64 68 65 78 |P #48:BCC endhex| 00001c20 0d 0f 50 13 43 4d 50 20 23 35 38 3a 42 43 43 20 |..P.CMP #58:BCC | 00001c30 68 65 78 0d 0f 5a 16 43 4d 50 20 23 36 35 3a 42 |hex..Z.CMP #65:B| 00001c40 43 43 20 65 6e 64 68 65 78 0d 0f 64 13 43 4d 50 |CC endhex..d.CMP| 00001c50 20 23 37 31 3a 42 43 43 20 68 65 78 0d 0f 6e 0b | #71:BCC hex..n.| 00001c60 2e 65 6e 64 68 65 78 0d 0f 78 10 4a 53 52 20 6e |.endhex..x.JSR n| 00001c70 6f 73 70 61 63 65 73 0d 0f 82 12 43 4d 50 20 23 |ospaces....CMP #| 00001c80 34 38 3a 42 43 43 20 6f 6b 0d 0f 8c 1b 43 4d 50 |48:BCC ok....CMP| 00001c90 20 23 35 38 3a 42 43 43 20 73 70 61 63 65 6e 65 | #58:BCC spacene| 00001ca0 65 64 65 64 0d 0f 96 12 43 4d 50 20 23 36 35 3a |eded....CMP #65:| 00001cb0 42 43 43 20 6f 6b 0d 0f a0 1b 43 4d 50 20 23 39 |BCC ok....CMP #9| 00001cc0 31 3a 42 43 43 20 73 70 61 63 65 6e 65 65 64 65 |1:BCC spaceneede| 00001cd0 64 0d 0f aa 12 43 4d 50 20 23 39 35 3a 42 43 43 |d....CMP #95:BCC| 00001ce0 20 6f 6b 0d 0f b4 13 43 4d 50 20 23 31 32 33 3a | ok....CMP #123:| 00001cf0 42 43 53 20 6f 6b 0d 0f be 10 2e 73 70 61 63 65 |BCS ok.....space| 00001d00 6e 65 65 64 65 64 0d 0f c8 15 53 54 59 20 79 6f |needed....STY yo| 00001d10 6c 64 3a 4c 44 59 20 79 6e 65 77 0d 0f d2 19 4c |ld:LDY ynew....L| 00001d20 44 41 20 23 33 32 3a 53 54 41 20 28 62 61 73 65 |DA #32:STA (base| 00001d30 32 29 2c 59 0d 0f dc 19 49 4e 59 3a 53 54 59 20 |2),Y....INY:STY | 00001d40 79 6e 65 77 3a 4c 44 59 20 79 6f 6c 64 0d 0f e6 |ynew:LDY yold...| 00001d50 11 4c 44 41 20 28 62 61 73 65 31 29 2c 59 0d 0f |.LDA (base1),Y..| 00001d60 f0 07 2e 6f 6b 0d 0f fa 07 52 54 53 0d 10 04 05 |...ok....RTS....| 00001d70 3a 0d 10 0e 10 2e 63 6c 65 61 72 62 75 66 66 65 |:.....clearbuffe| 00001d80 72 0d 10 18 17 4c 44 59 20 23 76 61 72 62 75 66 |r....LDY #varbuf| 00001d90 66 65 72 20 83 32 35 36 0d 10 22 23 4c 44 41 20 |fer .256.."#LDA | 00001da0 23 76 61 72 62 75 66 66 65 72 20 81 32 35 36 3a |#varbuffer .256:| 00001db0 53 54 41 20 62 61 73 65 31 2b 31 0d 10 2c 14 4c |STA base1+1..,.L| 00001dc0 44 41 20 23 30 3a 53 54 41 20 62 61 73 65 31 0d |DA #0:STA base1.| 00001dd0 10 36 0a 2e 6c 6f 6f 70 39 0d 10 40 1f 53 54 41 |.6..loop9..@.STA| 00001de0 20 28 62 61 73 65 31 29 2c 59 3a 49 4e 59 3a 42 | (base1),Y:INY:B| 00001df0 4e 45 20 6c 6f 6f 70 39 0d 10 4a 1f 4c 44 58 20 |NE loop9..J.LDX | 00001e00 62 61 73 65 31 2b 31 3a 49 4e 58 3a 53 54 58 20 |base1+1:INX:STX | 00001e10 62 61 73 65 31 2b 31 0d 10 54 16 43 50 58 20 23 |base1+1..T.CPX #| 00001e20 26 37 43 3a 42 4e 45 20 6c 6f 6f 70 39 0d 10 5e |&7C:BNE loop9..^| 00001e30 07 52 54 53 0d 10 68 05 3a 0d 10 72 0a 2e 74 61 |.RTS..h.:..r..ta| 00001e40 62 6c 65 0d 10 7c 05 5d 0d 10 86 0d 50 25 3d 50 |ble..|.]....P%=P| 00001e50 25 2b 31 39 38 0d 10 90 05 3a 0d 10 9a 0d 5b 4f |%+198....:....[O| 00001e60 50 54 20 70 61 73 73 0d 10 a4 0e 2e 76 61 72 62 |PT pass.....varb| 00001e70 75 66 66 65 72 0d 10 ae 05 5d 0d 10 b8 0c 50 25 |uffer....]....P%| 00001e80 3d 50 25 2b 35 30 0d 10 c2 05 3a 0d 10 cc 0d 5b |=P%+50....:....[| 00001e90 4f 50 54 20 70 61 73 73 0d 10 d6 0d 2e 76 61 72 |OPT pass.....var| 00001ea0 74 61 62 6c 65 0d 10 e0 07 5d 3a ed 0d 10 ea 05 |table....]:.....| 00001eb0 e1 0d 10 f4 05 3a 0d 10 fe 13 dd f2 72 65 61 64 |.....:......read| 00001ec0 74 61 62 6c 65 28 4e 25 29 0d 11 08 0b ea 20 43 |table(N%)..... C| 00001ed0 25 2c 41 25 0d 11 12 0a f7 20 8d 44 58 51 0d 11 |%,A%..... .DXQ..| 00001ee0 1c 0c 41 25 3d 74 61 62 6c 65 0d 11 26 0c e3 43 |..A%=table..&..C| 00001ef0 25 3d 31 b8 4e 25 0d 11 30 16 f3 20 24 41 25 3a |%=1.N%..0.. $A%:| 00001f00 41 25 3d 41 25 2b a9 28 24 41 25 29 0d 11 3a 05 |A%=A%+.($A%)..:.| 00001f10 ed 0d 11 44 05 e1 0d 11 4e 05 3a 0d 11 58 21 dc |...D....N.:..X!.| 00001f20 20 41 44 43 2c 41 4e 44 2c 41 53 4c 2c 42 43 43 | ADC,AND,ASL,BCC| 00001f30 2c 42 43 53 2c 42 45 51 2c 42 49 54 0d 11 62 21 |,BCS,BEQ,BIT..b!| 00001f40 dc 20 42 4d 49 2c 42 4e 45 2c 42 50 4c 2c 42 52 |. BMI,BNE,BPL,BR| 00001f50 41 2c 42 52 4b 2c 42 56 43 2c 42 56 53 0d 11 6c |A,BRK,BVC,BVS..l| 00001f60 21 dc 20 43 4c 43 2c 43 4c 44 2c 43 4c 49 2c 43 |!. CLC,CLD,CLI,C| 00001f70 4c 56 2c 43 4d 50 2c 43 50 58 2c 43 50 59 0d 11 |LV,CMP,CPX,CPY..| 00001f80 76 21 dc 20 44 45 43 2c 44 45 58 2c 44 45 59 2c |v!. DEC,DEX,DEY,| 00001f90 45 4f 52 2c 45 51 55 2c 49 4e 43 2c 49 4e 58 0d |EOR,EQU,INC,INX.| 00001fa0 11 80 21 dc 20 49 4e 59 2c 4a 4d 50 2c 4a 53 52 |..!. INY,JMP,JSR| 00001fb0 2c 4c 44 41 2c 4c 44 58 2c 4c 44 59 2c 4c 53 52 |,LDA,LDX,LDY,LSR| 00001fc0 0d 11 8a 21 dc 20 4e 4f 50 2c 4f 50 54 2c 4f 52 |...!. NOP,OPT,OR| 00001fd0 41 2c 50 48 41 2c 50 48 50 2c 50 48 58 2c 50 48 |A,PHA,PHP,PHX,PH| 00001fe0 59 0d 11 94 21 dc 20 50 4c 41 2c 50 4c 50 2c 50 |Y...!. PLA,PLP,P| 00001ff0 4c 58 2c 50 4c 59 2c 52 4f 4c 2c 52 4f 52 2c 52 |LX,PLY,ROL,ROR,R| 00002000 54 49 0d 11 9e 21 dc 20 52 54 53 2c 53 42 43 2c |TI...!. RTS,SBC,| 00002010 53 45 43 2c 53 45 44 2c 53 45 49 2c 53 54 41 2c |SEC,SED,SEI,STA,| 00002020 53 54 58 0d 11 a8 21 dc 20 53 54 59 2c 53 54 5a |STX...!. STY,STZ| 00002030 2c 54 41 58 2c 54 41 59 2c 54 52 42 2c 54 53 42 |,TAX,TAY,TRB,TSB| 00002040 2c 54 53 58 0d 11 b2 11 dc 20 54 58 41 2c 54 58 |,TSX..... TXA,TX| 00002050 53 2c 54 59 41 0d 11 bc 05 3a 0d 11 c6 0c dd 20 |S,TYA....:..... | 00002060 f2 63 68 65 63 6b 0d 11 d0 17 ea 20 41 24 2c 42 |.check..... A$,B| 00002070 24 2c 41 25 2c 42 25 2c 43 25 2c 54 25 0d 11 da |$,A%,B%,C%,T%...| 00002080 0a f7 20 8d 44 66 52 0d 11 e4 11 f3 20 41 24 3a |.. .DfR..... A$:| 00002090 41 25 3d a0 28 41 24 29 0d 11 ee 05 f5 0d 11 f8 |A%=.(A$)........| 000020a0 18 f3 20 42 24 3a e7 20 42 24 3d 22 2a 22 20 e5 |.. B$:. B$="*" .| 000020b0 20 8d 44 48 52 0d 12 02 11 42 25 3d a0 28 42 24 | .DHR....B%=.(B$| 000020c0 29 3a 54 25 3d 30 0d 12 0c 1b e3 4a 25 3d 41 25 |):T%=0.....J%=A%| 000020d0 b8 42 25 2d 31 3a 54 25 3d 54 25 2b 3f 4a 25 3a |.B%-1:T%=T%+?J%:| 000020e0 ed 0d 12 16 13 f1 20 41 24 3b 22 20 74 6f 20 22 |...... A$;" to "| 000020f0 3b 42 24 3b 0d 12 20 14 f1 89 28 32 35 2d a9 28 |;B$;.. ...(25-.(| 00002100 41 24 2b 42 24 29 29 3b 0d 12 2a 08 f3 20 43 25 |A$+B$));..*.. C%| 00002110 0d 12 34 20 e7 20 54 25 3d 43 25 20 f1 22 4f 2e |..4 . T%=C% ."O.| 00002120 4b 2e 22 20 8b 20 f1 20 22 45 52 52 4f 52 21 22 |K." . . "ERROR!"| 00002130 0d 12 3e 0f 41 24 3d 42 24 3a 41 25 3d 42 25 0d |..>.A$=B$:A%=B%.| 00002140 12 48 0c fd 20 42 24 3d 22 2a 22 0d 12 52 05 e1 |.H.. B$="*"..R..| 00002150 0d 12 5c 05 3a 0d 12 66 18 dc 20 6d 61 69 6e 2c |..\.:..f.. main,| 00002160 74 65 73 74 68 65 78 2c 31 33 33 32 32 0d 12 70 |testhex,13322..p| 00002170 10 dc 20 64 61 74 61 2c 31 30 37 33 32 0d 12 7a |.. data,10732..z| 00002180 0f dc 20 72 65 6d 2c 31 33 37 34 32 0d 12 84 15 |.. rem,13742....| 00002190 dc 20 6c 6f 6f 6b 75 70 76 61 72 2c 31 33 37 30 |. lookupvar,1370| 000021a0 34 0d 12 8e 13 dc 20 6e 65 77 6e 61 6d 65 2c 31 |4..... newname,1| 000021b0 34 34 33 38 0d 12 98 13 dc 20 61 73 73 6c 69 6e |4438..... asslin| 000021c0 65 2c 31 30 30 32 39 0d 12 a2 17 dc 20 72 65 6d |e,10029..... rem| 000021d0 61 73 73 65 6d 62 6c 79 2c 31 36 32 30 38 0d 12 |assembly,16208..| 000021e0 ac 14 dc 20 6d 6e 65 6d 6f 6e 69 63 2c 31 30 35 |... mnemonic,105| 000021f0 37 31 0d 12 b6 12 dc 20 6e 75 6d 62 65 72 2c 31 |71..... number,1| 00002200 39 33 35 37 0d 12 c0 11 dc 20 74 61 62 6c 65 2c |9357..... table,| 00002210 31 33 30 32 39 0d 12 ca 15 dc 20 76 61 72 62 75 |13029..... varbu| 00002220 66 66 65 72 2c 31 35 31 34 39 0d 12 d4 07 dc 20 |ffer,15149..... | 00002230 2a 0d ff |*..| 00002233