--- /dev/null
+#!/usr/local/bin/perl -w
+
+print "\tORG\t\$8000\n";
+
+LINE: while (<>) {
+ if (/^\s*$/) { print "\n"; next LINE; }
+ if (/^\s*;/) { print; next LINE; }
+ if (/^\s*((loop|jump82|goto91):)/) { print "${1}_$.\n"; next LINE; }
+ if (/^\s*(\w*:)/) { print "$1\n"; next LINE; }
+ if (/^\t\.word\t([a-f0-9]{4})$/) { print "\tFDB\t\$\U$1\n"; next LINE; }
+ if (/^([A-F0-9]{4}) ((([A-F0-9]{2}) )*[A-F0-9]{2})/) {
+ print ";$_";
+ @_=split(' ',$2);
+ print "\tFCB\t\$".join(', $',@_)."\n";
+
+# print "\tFCB\t\$$3, \$$5, \$$7, \$$9\n";
+ next LINE;
+ }
+# if (/^([A-F0-9]{4}) (([A-F0-9]{2}) )(([A-F0-9]{2}) )(([A-F0-9]{2}) )/) {
+# print ";$_";
+# print "\tFCB\t\$$3, \$$5, \$$7\n";
+# next LINE;
+# }
+# if (/^([A-F0-9]{4}) (([A-F0-9]{2}) )(([A-F0-9]{2}) )/) {
+# print ";$_";
+# print "\tFCB\t\$$3, \$$5\n";
+# next LINE;
+# }
+# if (/^([A-F0-9]{4}) ([A-F0-9]{2})/) {
+# print ";$_";
+# print "\tFCB\t\$$2\n";
+# next LINE;
+# }
+ if (/^\cZ$/) { next LINE; }
+ print ";$_";
+}
821D 62 b illegal
821E 83 A5 83 ... subd #a583
8221 C2 83 .. sbcb #83
+8223 DF 83 FC ... stx 83
8226 84 19 .. anda #19
8228 84 35 .5 anda #35
822A 84 51 .Q anda #51
8A06 8C 72 8B .r. cpx #728b
8A09 FC 8C 67 ..g ldd 8c67
8A0C 8C 6F BD .o. cpx #6fbd
+8A0F 9A 47 7E .G~ ora 47
8A12 8C 72 F6 .r. cpx #72f6
8A15 00 . test
8A16 36 6 psha
9178 C5 91 .. bitb #91
917A B5 91 BA ... bita 91ba
917D 91 C2 BD ... cmpa c2
+9180 9D 7E 20 .~ jsr 7e
9183 41 A illegal
9184 BD A8 64 ..d jsr a864 ;jump99
9187 20 3C < bra 3c ;91C5
9212 92 59 92 .Y. sbca 59
9215 4E N illegal
9216 92 56 BD .V. sbca 56
+9219 9D 7E 20 .~ jsr 7e
921C 3C < pshx
921D BD A8 64 ..d jsr a864 ;jump99
9220 20 37 7 bra 37 ;9259
92A7 ED 92 .. stad 92,x
92A9 E2 92 .. sbcb 92,x
92AB EA BD .. orb bd,x
+92AD 9D 7E 20 .~ jsr 7e
92B0 3C < pshx
92B1 BD A8 64 ..d jsr a864 ;jump99
92B4 20 37 7 bra 37 ;92ED
9C20 00 . test
9C21 00 . test
9C22 0A . clv
+9C23 9D 29 9C .). jsr 29
9C26 3B ; rti
9C27 9C 53 9C .S. cmpx 53
9C2A 6B k illegal
9C31 9C C9 9C ... cmpx c9
9C34 E0 9C .. subb 9c,x
9C36 F7 9D 0E ... stb 9d0e
+9C39 9D 23 F6 .#. jsr 23
9C3C 00 . test
9C3D 67 C4 g. asr c4,x
9C3F 02 . idiv
9E96 2D A1 -. blt a1 ;9E39
9E98 C4 9E .. andb #9e
9E9A F5 9E FE ... bitb 9efe
+9E9D 9F 07 9F ... sts 07
9EA0 10 . sba
+9EA1 9F 19 9F ... sts 19
9EA4 3B ; rti
+9EA5 9F 44 9F .D. sts 44
9EA8 52 R illegal
+9EA9 9F 5B 9F .[. sts 5b
9EAC 69 i rol
+9EAD 9F 72 9F .r. sts 72
9EB0 80 9F .. suba #9f
9EB2 89 9F .. adca #9f
+9EB4 97 9F A0 ... sta 9f
+9EB7 9F AE 9F ... sts ae
9EBA B7 9F C5 ... sta 9fc5
+9EBD 9F DD 9F ... sts dd
9EC0 EB A0 .. addb a0,x
9EC2 03 . fdiv
9EC3 A0 11 .. suba 11,x
B0F7 56 V rorb
B0F8 61 a illegal
B0F9 08 . inx
+B0FA 13 . brclr
B0FB 33 3 pulb
B0FC 3E > wai
B0FD 49 I rola
B0FE 54 T lsrb
B0FF 60 07 `. neg 07,x
+B101 12 . brset
B102 1D 3D .= bclr add,x 3d,x
B104 48 H asla
B105 53 S comb
B1C5 20 2D - bra 2d ;B1F4
B1C7 00 . test
B1C8 09 . dex
+B1C9 12 . brset
B1CA 1B . aba
B1CB 24 2C $, bcc 2c ;B1F9
B1CD 35 5 txs
EE0B CE 10 16 ... ldx #1016
EE0E 1D 01 .. bclr add,x 01,x
EE10 FF CC 05 ... stx cc05
+EE13 DC BD E5 ... ldd bd
EE16 71 q illegal
EE17 38 8 pulx
EE18 39 9 rts
FA8D 1C 00 .. bset add,x 00,x
FA8F 20 F6 . bra f6 ;FA87
FA91 00 . test
+FA92 12 . brset
FA93 C4 01 .. andb #01
FA95 26 33 &3 bne 33 ;FACA
FA97 F6 00 1D ... ldab 001d