changeset 968:69757400b240

Added to std CMDS
author boisy
date Fri, 31 Jan 2003 17:58:38 +0000
parents 835a015e3f3b
children 43792cdb993d
files level1/cmds/ded.asm level1/cmds/disasm.asm level1/cmds/makefile
diffstat 3 files changed, 6882 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/level1/cmds/ded.asm	Fri Jan 31 17:58:38 2003 +0000
@@ -0,0 +1,3173 @@
+             IFNE   1
+L0000    fcb   $87,$CD,$17,$A2,$00,$1C,$11,$82   .M."....
+L0008    fcb   $8F,$06,$65,$03,$16,$0C,$1F,$20   ..e.... 
+L0010    fcb   $00,$1F,$21,$00,$04,$0B,$05,$21   ..!....!
+L0018    fcb   $00,$05,$20,$00,$64,$45,$E4,$05   .. .dEd.
+L0020    fcb   $43,$6F,$70,$79,$72,$69,$67,$68   Copyrigh
+L0028    fcb   $74,$20,$31,$39,$38,$37,$20,$44   t 1987 D
+L0030    fcb   $6F,$75,$67,$20,$44,$65,$4D,$61   oug DeMa
+L0038    fcb   $72,$74,$69,$6E,$69,$73,$4C,$53   rtinisLS
+L0040    fcb   $4E,$3D,$A4,$53,$45,$43,$54,$4F   N=$SECTO
+L0048    fcb   $52,$20,$3D,$20,$A4,$20,$20,$20   R = $   
+L0050    fcb   $20,$20,$20,$30,$20,$20,$31,$20      0  1 
+L0058    fcb   $20,$32,$20,$20,$33,$20,$20,$34    2  3  4
+L0060    fcb   $20,$20,$35,$20,$20,$36,$20,$20     5  6  
+L0068    fcb   $37,$20,$20,$38,$20,$20,$39,$20   7  8  9 
+L0070    fcb   $20,$41,$20,$20,$42,$20,$20,$43    A  B  C
+L0078    fcb   $20,$20,$44,$20,$20,$45,$20,$20     D  E  
+L0080    fcb   $46,$20,$20,$20,$20,$30,$20,$32   F    0 2
+L0088    fcb   $20,$34,$20,$36,$20,$38,$20,$41    4 6 8 A
+L0090    fcb   $20,$43,$20,$45,$20,$0D,$43,$4D    C E .CM
+L0098    fcb   $44,$3A,$A0,$3C,$42,$52,$45,$41   D: <BREA
+L00A0    fcb   $4B,$3E,$20,$74,$6F,$67,$67,$6C   K> toggl
+L00A8    fcb   $65,$73,$20,$48,$45,$58,$2F,$41   es HEX/A
+L00B0    fcb   $53,$43,$49,$49,$20,$65,$64,$69   SCII edi
+L00B8    fcb   $74,$20,$6D,$6F,$64,$65,$73,$20   t modes 
+L00C0    fcb   $20,$20,$20,$20,$3C,$45,$4E,$54       <ENT
+L00C8    fcb   $45,$52,$3E,$20,$65,$78,$69,$74   ER> exit
+L00D0    fcb   $73,$20,$65,$64,$69,$74,$20,$6D   s edit m
+L00D8    fcb   $6F,$64,$E5,$5A,$61,$70,$A0,$62   odeZap b
+L00E0    fcb   $79,$74,$65,$3A,$A0,$63,$68,$61   yte: cha
+L00E8    fcb   $72,$3A,$A0,$41,$72,$65,$20,$79   r: Are y
+L00F0    fcb   $6F,$75,$20,$73,$75,$72,$65,$3F   ou sure?
+L00F8    fcb   $20,$28,$59,$2F,$4E,$29,$A0,$57    (Y/N) W
+L0100    fcb   $72,$69,$74,$69,$6E,$67,$20,$73   riting s
+L0108    fcb   $65,$63,$74,$6F,$72,$2E,$2E,$AE   ector...
+L0110    fcb   $4F,$55,$54,$46,$49,$4C,$45,$3A   OUTFILE:
+L0118    fcb   $A0,$56,$65,$72,$69,$66,$79,$69    Verifyi
+L0120    fcb   $6E,$67,$2E,$2E,$AE,$56,$65,$72   ng...Ver
+L0128    fcb   $69,$66,$79,$20,$61,$62,$6F,$72   ify abor
+L0130    fcb   $74,$65,$64,$2E,$2E,$AE,$73,$68   ted...sh
+L0138    fcb   $65,$6C,$EC,$4C,$69,$6E,$6B,$20   ellLink 
+L0140    fcb   $74,$6F,$20,$77,$68,$69,$63,$68   to which
+L0148    fcb   $20,$6D,$6F,$64,$75,$6C,$65,$3F    module?
+L0150    fcb   $A0,$4F,$66,$66,$20,$20,$4C,$65    Off  Le
+L0158    fcb   $6E,$20,$20,$4E,$61,$6D,$65,$0A   n  Name.
+L0160    fcb   $2D,$2D,$2D,$2D,$20,$2D,$2D,$2D   ---- ---
+L0168    fcb   $2D,$20,$2D,$2D,$2D,$2D,$0D,$4D   - ----.M
+L0170    fcb   $4F,$44,$55,$4C,$45,$3A,$20,$A0   ODULE:  
+L0178    fcb   $4F,$46,$46,$53,$45,$54,$3A,$20   OFFSET: 
+L0180    fcb   $A4,$1F,$24,$2D,$20,$45,$78,$70   $.$- Exp
+L0188    fcb   $65,$72,$74,$20,$4D,$6F,$64,$65   ert Mode
+L0190    fcb   $20,$2D,$1F,$A5,$46,$69,$6E,$64    -.%Find
+L0198    fcb   $20,$62,$79,$74,$65,$20,$73,$74    byte st
+L01A0    fcb   $72,$69,$6E,$67,$20,$A4,$46,$69   ring $Fi
+L01A8    fcb   $6E,$64,$20,$63,$68,$61,$72,$20   nd char 
+L01B0    fcb   $73,$74,$72,$69,$6E,$67,$3A,$A0   string: 
+L01B8    fcb   $53,$65,$61,$72,$63,$68,$69,$6E   Searchin
+L01C0    fcb   $67,$2E,$2E,$AE,$43,$75,$72,$72   g...Curr
+L01C8    fcb   $65,$6E,$74,$20,$46,$69,$6C,$65   ent File
+L01D0    fcb   $20,$4C,$65,$6E,$67,$74,$68,$20    Length 
+L01D8    fcb   $A4,$4E,$65,$77,$20,$4C,$65,$6E   $New Len
+L01E0    fcb   $67,$74,$68,$3F,$20,$A4,$2A,$2A   gth? $**
+L01E8    fcb   $20,$52,$45,$53,$54,$41,$52,$54    RESTART
+L01F0    fcb   $2C,$20,$45,$6E,$74,$65,$72,$20   , Enter 
+L01F8    fcb   $70,$61,$74,$68,$6E,$61,$6D,$65   pathname
+L0200    fcb   $3A,$A0,$42,$41,$4D,$3A,$20,$46   : BAM: F
+L0208    fcb   $72,$6F,$6D,$20,$53,$65,$63,$74   rom Sect
+L0210    fcb   $6F,$72,$3A,$24,$20,$20,$20,$20   or:$    
+L0218    fcb   $20,$20,$20,$74,$6F,$20,$24,$20      to $ 
+L0220    fcb   $20,$20,$20,$20,$20,$A0,$42,$69         Bi
+L0228    fcb   $74,$73,$BA,$07,$53,$65,$63,$74   ts:.Sect
+L0230    fcb   $6F,$72,$20,$53,$74,$61,$63,$6B   or Stack
+L0238    fcb   $20,$46,$75,$6C,$6C,$A0,$20,$20    Full   
+L0240    fcb   $20,$55,$70,$2F,$44,$6F,$77,$6E    Up/Down
+L0248    fcb   $20,$41,$72,$72,$6F,$77,$73,$20    Arrows 
+L0250    fcb   $20,$52,$65,$61,$64,$20,$26,$20    Read & 
+L0258    fcb   $64,$69,$73,$70,$6C,$61,$79,$20   display 
+L0260    fcb   $4E,$65,$78,$74,$2F,$50,$72,$65   Next/Pre
+L0268    fcb   $76,$69,$6F,$75,$73,$20,$73,$65   vious se
+L0270    fcb   $63,$74,$6F,$72,$0A,$20,$3C,$43   ctor. <C
+L0278    fcb   $52,$3E,$20,$43,$6C,$65,$61,$6E   R> Clean
+L0280    fcb   $20,$75,$70,$20,$74,$68,$65,$20    up the 
+L0288    fcb   $73,$63,$72,$65,$65,$6E,$20,$64   screen d
+L0290    fcb   $69,$73,$70,$6C,$61,$79,$0A,$20   isplay. 
+L0298    fcb   $20,$20,$2A,$20,$20,$52,$65,$73     *  Res
+L02A0    fcb   $74,$61,$72,$74,$0A,$20,$20,$20   tart.   
+L02A8    fcb   $24,$20,$20,$46,$6F,$72,$6B,$20   $  Fork 
+L02B0    fcb   $61,$20,$53,$48,$45,$4C,$4C,$20   a SHELL 
+L02B8    fcb   $28,$43,$74,$72,$6C,$2D,$42,$52   (Ctrl-BR
+L02C0    fcb   $45,$41,$4B,$20,$74,$6F,$20,$72   EAK to r
+L02C8    fcb   $65,$74,$75,$72,$6E,$29,$0A,$20   eturn). 
+L02D0    fcb   $20,$20,$41,$20,$20,$41,$70,$70     A  App
+L02D8    fcb   $65,$6E,$64,$20,$64,$69,$73,$70   end disp
+L02E0    fcb   $6C,$61,$79,$65,$64,$20,$73,$65   layed se
+L02E8    fcb   $63,$74,$6F,$72,$20,$74,$6F,$20   ctor to 
+L02F0    fcb   $6F,$75,$74,$70,$75,$74,$20,$66   output f
+L02F8    fcb   $69,$6C,$65,$0A,$20,$20,$20,$43   ile.   C
+L0300    fcb   $20,$20,$43,$6C,$6F,$73,$65,$20     Close 
+L0308    fcb   $6F,$75,$74,$70,$75,$74,$20,$66   output f
+L0310    fcb   $69,$6C,$65,$0A,$20,$20,$20,$44   ile.   D
+L0318    fcb   $20,$20,$44,$69,$64,$64,$6C,$65     Diddle
+L0320    fcb   $20,$28,$61,$64,$6A,$75,$73,$74    (adjust
+L0328    fcb   $29,$20,$66,$69,$6C,$65,$20,$6C   ) file l
+L0330    fcb   $65,$6E,$67,$74,$68,$0A,$20,$20   ength.  
+L0338    fcb   $20,$45,$20,$20,$45,$64,$69,$74    E  Edit
+L0340    fcb   $20,$74,$68,$65,$20,$64,$69,$73    the dis
+L0348    fcb   $70,$6C,$61,$79,$65,$64,$20,$73   played s
+L0350    fcb   $65,$63,$74,$6F,$72,$0A,$20,$20   ector.  
+L0358    fcb   $20,$46,$20,$20,$46,$69,$6E,$64    F  Find
+L0360    fcb   $20,$61,$20,$62,$79,$74,$65,$20    a byte 
+L0368    fcb   $6F,$72,$20,$74,$65,$78,$74,$20   or text 
+L0370    fcb   $73,$74,$72,$69,$6E,$67,$20,$28   string (
+L0378    fcb   $42,$52,$45,$41,$4B,$20,$61,$62   BREAK ab
+L0380    fcb   $6F,$72,$74,$73,$29,$0A,$20,$20   orts).  
+L0388    fcb   $20,$48,$20,$20,$48,$65,$6C,$70    H  Help
+L0390    fcb   $20,$73,$63,$72,$65,$65,$6E,$20    screen 
+L0398    fcb   $28,$61,$6C,$73,$6F,$20,$75,$73   (also us
+L03A0    fcb   $65,$20,$27,$3F,$27,$29,$0A,$20   e '?'). 
+L03A8    fcb   $20,$20,$4C,$20,$20,$4C,$69,$6E     L  Lin
+L03B0    fcb   $6B,$20,$74,$6F,$20,$61,$20,$6D   k to a m
+L03B8    fcb   $6F,$64,$75,$6C,$65,$20,$2D,$20   odule - 
+L03C0    fcb   $4C,$69,$73,$74,$20,$61,$6C,$6C   List all
+L03C8    fcb   $20,$6D,$6F,$64,$75,$6C,$65,$73    modules
+L03D0    fcb   $0A,$20,$20,$20,$4E,$20,$20,$4E   .   N  N
+L03D8    fcb   $65,$78,$74,$20,$6F,$63,$63,$75   ext occu
+L03E0    fcb   $72,$72,$65,$6E,$63,$65,$20,$6F   rrence o
+L03E8    fcb   $66,$20,$62,$79,$74,$65,$28,$73   f byte(s
+L03F0    fcb   $29,$20,$6F,$72,$20,$73,$74,$72   ) or str
+L03F8    fcb   $69,$6E,$67,$20,$28,$46,$69,$6E   ing (Fin
+L0400    fcb   $64,$29,$0A,$20,$20,$20,$4F,$20   d).   O 
+L0408    fcb   $20,$4F,$70,$65,$6E,$20,$61,$20    Open a 
+L0410    fcb   $66,$69,$6C,$65,$20,$66,$6F,$72   file for
+L0418    fcb   $20,$6F,$75,$74,$70,$75,$74,$20    output 
+L0420    fcb   $28,$75,$73,$65,$20,$77,$69,$74   (use wit
+L0428    fcb   $68,$20,$41,$70,$70,$65,$6E,$64   h Append
+L0430    fcb   $29,$0A,$20,$20,$20,$50,$20,$20   ).   P  
+L0438    fcb   $50,$75,$73,$68,$20,$63,$75,$72   Push cur
+L0440    fcb   $72,$65,$6E,$74,$20,$73,$65,$63   rent sec
+L0448    fcb   $74,$6F,$72,$20,$6F,$6E,$74,$6F   tor onto
+L0450    fcb   $20,$73,$74,$61,$63,$6B,$0A,$20    stack. 
+L0458    fcb   $20,$20,$51,$20,$20,$51,$75,$69     Q  Qui
+L0460    fcb   $74,$20,$64,$45,$64,$20,$2D,$20   t dEd - 
+L0468    fcb   $45,$78,$69,$74,$20,$74,$6F,$20   Exit to 
+L0470    fcb   $4F,$53,$39,$0A,$20,$20,$20,$52   OS9.   R
+L0478    fcb   $20,$20,$52,$65,$6D,$6F,$76,$65     Remove
+L0480    fcb   $20,$61,$6E,$64,$20,$64,$69,$73    and dis
+L0488    fcb   $70,$6C,$61,$79,$20,$61,$20,$73   play a s
+L0490    fcb   $65,$63,$74,$6F,$72,$20,$66,$72   ector fr
+L0498    fcb   $6F,$6D,$20,$73,$74,$61,$63,$6B   om stack
+L04A0    fcb   $0A,$20,$20,$20,$53,$20,$20,$53   .   S  S
+L04A8    fcb   $6B,$69,$70,$20,$74,$6F,$20,$67   kip to g
+L04B0    fcb   $69,$76,$65,$6E,$20,$73,$65,$63   iven sec
+L04B8    fcb   $74,$6F,$72,$20,$28,$73,$65,$63   tor (sec
+L04C0    fcb   $74,$6F,$72,$20,$23,$20,$69,$6E   tor # in
+L04C8    fcb   $20,$68,$65,$78,$29,$0A,$20,$20    hex).  
+L04D0    fcb   $20,$55,$20,$20,$55,$6E,$6C,$69    U  Unli
+L04D8    fcb   $6E,$6B,$20,$66,$72,$6F,$6D,$20   nk from 
+L04E0    fcb   $6D,$6F,$64,$75,$6C,$65,$0A,$20   module. 
+L04E8    fcb   $20,$20,$56,$20,$20,$56,$65,$72     V  Ver
+L04F0    fcb   $69,$66,$79,$20,$61,$6C,$6C,$20   ify all 
+L04F8    fcb   $6D,$6F,$64,$75,$6C,$65,$73,$20   modules 
+L0500    fcb   $69,$6E,$20,$66,$69,$6C,$65,$0A   in file.
+L0508    fcb   $20,$20,$20,$57,$20,$20,$57,$72      W  Wr
+L0510    fcb   $69,$74,$65,$20,$74,$68,$65,$20   ite the 
+L0518    fcb   $73,$65,$63,$74,$6F,$72,$20,$62   sector b
+L0520    fcb   $61,$63,$6B,$20,$74,$6F,$20,$74   ack to t
+L0528    fcb   $68,$65,$20,$64,$69,$73,$6B,$0A   he disk.
+L0530    fcb   $20,$20,$20,$58,$20,$20,$65,$58      X  eX
+L0538    fcb   $70,$65,$72,$74,$20,$6D,$6F,$64   pert mod
+L0540    fcb   $65,$20,$74,$6F,$67,$67,$6C,$65   e toggle
+L0548    fcb   $20,$6F,$6E,$2F,$6F,$66,$66,$0A    on/off.
+L0550    fcb   $20,$20,$20,$5A,$20,$20,$5A,$61      Z  Za
+L0558    fcb   $70,$20,$28,$66,$69,$6C,$6C,$20   p (fill 
+L0560    fcb   $69,$6E,$29,$20,$74,$68,$65,$20   in) the 
+L0568    fcb   $73,$65,$63,$74,$6F,$72,$20,$64   sector d
+L0570    fcb   $69,$73,$70,$6C,$61,$79,$65,$64   isplayed
+L0578    fcb   $0A,$0A,$20,$20,$20,$20,$20,$20   ..      
+L0580    fcb   $28,$50,$72,$65,$73,$73,$20,$61   (Press a
+L0588    fcb   $6E,$79,$20,$6B,$65,$79,$20,$74   ny key t
+L0590    fcb   $6F,$20,$72,$65,$74,$75,$72,$6E   o return
+L0598    fcb   $20,$74,$6F,$20,$63,$6F,$6D,$6D    to comm
+L05A0    fcb   $61,$6E,$64,$20,$70,$72,$6F,$6D   and prom
+L05A8    fcb   $70,$74,$29,$3A,$55,$73,$65,$3A   pt):Use:
+L05B0    fcb   $20,$20,$64,$45,$64,$20,$3C,$70     dEd <p
+L05B8    fcb   $61,$74,$68,$6C,$69,$73,$74,$3E   athlist>
+L05C0    fcb   $0D,$98,$96,$80,$0F,$42,$40,$01   .....B@.
+L05C8    fcb   $86,$A0,$00,$27,$10,$00,$03,$E8   . .'...h
+L05D0    fcb   $00,$00,$64,$00,$00,$0A,$00,$00   ..d.....
+L05D8    fcb   $01,$0C,$0A,$40,$0A,$0A,$4E,$2A   ...@..N*
+L05E0    fcb   $06,$27,$24,$10,$BD,$0D,$10,$EF   .'$.=..o
+L05E8    fcb   $73,$0A,$67,$7A,$0B,$23,$77,$0B   s.gz.#w.
+L05F0    fcb   $D4,$6F,$0C,$26,$61,$0C,$AD,$63   To.&a.-c
+L05F8    fcb   $0C,$97,$65,$0D,$37,$71,$0D,$22   ..e.7q."
+L0600    fcb   $76,$11,$16,$6C,$12,$23,$75,$13   v..l.#u.
+L0608    fcb   $CA,$78,$13,$EB,$68,$14,$13,$3F   Jx.kh..?
+L0610    fcb   $14,$13,$66,$14,$2B,$6E,$15,$F9   ..f.+n.y
+L0618    fcb   $64,$16,$12,$70,$16,$A9,$72,$16   d..p.)r.
+L0620    fcb   $E2,$00,$E7,$C9,$00,$8B,$3B,$10   b.gI..;.
+L0628    fcb   $DE,$1D,$DE,$1B,$03,$1A,$17,$0A   ^.^.....
+L0630    fcb   $C4,$17,$01,$5B,$30,$8D,$FB,$AE   D..[0...
+L0638    fcb   $17,$01,$1E,$17,$01,$72,$30,$C9   .....r0I
+L0640    fcb   $01,$D6,$9F,$D6,$10,$8E,$00,$50   .V.V...P
+L0648    fcb   $4F,$10,$3F,$8B,$10,$25,$06,$66   O.?..%.f
+L0650    fcb   $10,$8C,$00,$01,$26,$08,$0F,$1A   ....&...
+L0658    fcb   $17,$0A,$9A,$16,$00,$AD,$96,$00   .....-..
+L0660    fcb   $10,$3F,$8F,$20,$0D,$9F,$D6,$30   .?. ..V0
+L0668    fcb   $8D,$FF,$B7,$10,$3F,$09,$10,$25   ..7.?..%
+L0670    fcb   $06,$44,$4F,$C6,$D6,$30,$C4,$A7   .DOFV0D'
+L0678    fcb   $80,$5A,$26,$FB,$DF,$1B,$10,$DF   .Z&._.._
+L0680    fcb   $1D,$CC,$00,$02,$DD,$0A,$32,$E8   .L..].2h
+L0688    fcb   $E0,$30,$E4,$4F,$5F,$10,$3F,$8D   `0dO_.?.
+L0690    fcb   $10,$25,$06,$22,$A6,$04,$97,$19   .%."&...
+L0698    fcb   $32,$E8,$20,$9E,$D6,$34,$10,$0F   2h .V4..
+L06A0    fcb   $8C,$A6,$80,$81,$0D,$27,$06,$81   .&...'..
+L06A8    fcb   $40,$26,$F6,$03,$8C,$35,$10,$86   @&v..5..
+L06B0    fcb   $03,$10,$3F,$84,$24,$11,$C1,$D6   ..?.$.AV
+L06B8    fcb   $10,$26,$06,$78,$9E,$D6,$86,$83   .&.x.V..
+L06C0    fcb   $10,$3F,$84,$10,$25,$06,$6D,$97   .?..%.m.
+L06C8    fcb   $00,$C6,$02,$10,$3F,$8D,$9F,$49   .F..?..I
+L06D0    fcb   $DF,$4B,$DE,$1B,$0F,$1A,$17,$0A   _K^.....
+L06D8    fcb   $1C,$17,$00,$DE,$0D,$8C,$27,$15   ...^..'.
+L06E0    fcb   $17,$00,$E1,$9E,$12,$EC,$04,$DD   ..a..l.]
+L06E8    fcb   $8D,$1F,$01,$CC,$01,$00,$17,$10   ...L....
+L06F0    fcb   $37,$30,$01,$9F,$8F,$17,$00,$CC   70.....L
+L06F8    fcb   $10,$9F,$1F,$DC,$02,$DD,$05,$96   ...\.]..
+L0700    fcb   $04,$97,$07,$CC,$00,$00,$DD,$42   ...L..]B
+L0708    fcb   $17,$01,$14,$17,$00,$81,$30,$8D   ......0.
+L0710    fcb   $F9,$84,$8D,$45,$30,$8D,$F8,$FD   y..E0.x.
+L0718    fcb   $10,$8E,$00,$01,$10,$3F,$8A,$10   .....?..
+L0720    fcb   $25,$05,$93,$30,$C9,$01,$D6,$17   %..0I.V.
+L0728    fcb   $00,$BE,$A6,$84,$81,$41,$25,$02   .>&..A%.
+L0730    fcb   $8A,$20,$30,$8D,$FE,$A3,$A1,$80   . 0..#!.
+L0738    fcb   $27,$08,$30,$02,$6D,$84,$26,$F6   '.0.m.&v
+L0740    fcb   $20,$C9,$0D,$2E,$27,$0B,$0D,$2D    I..'..-
+L0748    fcb   $27,$07,$34,$12,$17,$04,$A1,$35   '.4...!5
+L0750    fcb   $12,$EC,$84,$30,$8D,$F8,$A9,$6E   .l.0.x)n
+L0758    fcb   $8B,$31,$C9,$01,$D6,$5F,$5C,$A6   .1I.V_\&
+L0760    fcb   $80,$2B,$04,$A7,$A0,$20,$F7,$84   .+.'  w.
+L0768    fcb   $7F,$A7,$A4,$30,$C9,$01,$D6,$4F   '$0I.VO
+L0770    fcb   $1F,$02,$20,$04,$10,$8E,$00,$78   .. ....x
+L0778    fcb   $86,$01,$10,$3F,$8C,$10,$25,$05   ...?..%.
+L0780    fcb   $35,$39,$10,$8E,$00,$03,$4F,$10   59....O.
+L0788    fcb   $3F,$8B,$10,$25,$05,$28,$39,$CC   ?..%.(9L
+L0790    fcb   $20,$36,$30,$4A,$ED,$02,$10,$8E    60Jm...
+L0798    fcb   $00,$04,$20,$DC,$30,$8D,$F8,$6E   .. \0.xn
+L07A0    fcb   $10,$8E,$00,$02,$20,$D2,$30,$8D   .... R0.
+L07A8    fcb   $F8,$67,$10,$8E,$00,$02,$20,$C8   xg.... H
+L07B0    fcb   $30,$8D,$F8,$60,$10,$8E,$00,$01   0.x`....
+L07B8    fcb   $20,$BE,$30,$8D,$F8,$4F,$10,$8E    >0.xO..
+L07C0    fcb   $00,$01,$20,$B4,$8D,$2B,$30,$C9   .. 4.+0I
+L07C8    fcb   $00,$D6,$9F,$12,$0D,$4D,$27,$0A   .V...M'.
+L07D0    fcb   $DC,$23,$90,$04,$26,$04,$1F,$02   \#..&...
+L07D8    fcb   $20,$04,$10,$8E,$01,$00,$96,$00    .......
+L07E0    fcb   $10,$3F,$89,$10,$25,$04,$CF,$39   .?..%.O9
+L07E8    fcb   $4F,$10,$8E,$00,$01,$10,$3F,$89   O.....?.
+L07F0    fcb   $39,$0D,$4D,$26,$13,$9E,$02,$96   9.M&....
+L07F8    fcb   $04,$5F,$1F,$03,$96,$00,$10,$3F   ._.....?
+L0800    fcb   $88,$10,$25,$04,$B1,$DE,$1B,$39   ..%.1^.9
+L0808    fcb   $DC,$23,$83,$00,$01,$91,$04,$24   \#.....$
+L0810    fcb   $05,$C6,$D3,$16,$04,$A0,$DC,$08   .FS.. \.
+L0818    fcb   $9B,$04,$8E,$00,$00,$20,$DB,$CC   ..... [L
+L0820    fcb   $20,$20,$17,$FF,$6D,$30,$8D,$F8     ..m0.x
+L0828    fcb   $15,$17,$FF,$2D,$8D,$82,$17,$00   ...-....
+L0830    fcb   $B5,$30,$C9,$01,$D6,$17,$FF,$3C   50I.V..<
+L0838    fcb   $0D,$4D,$27,$03,$17,$0B,$5B,$0D   .M'...[.
+L0840    fcb   $01,$27,$03,$17,$04,$31,$CC,$20   .'...1L 
+L0848    fcb   $22,$17,$FF,$46,$30,$8D,$F7,$BE   "..F0.w>
+L0850    fcb   $10,$8E,$00,$02,$17,$FF,$23,$30   ......#0
+L0858    fcb   $8D,$F7,$F2,$17,$FF,$16,$30,$8D   .wr...0.
+L0860    fcb   $F7,$AF,$10,$8E,$00,$02,$17,$FF   w/......
+L0868    fcb   $11,$17,$01,$20,$96,$0F,$8B,$10   ... ....
+L0870    fcb   $97,$0F,$26,$F5,$30,$C9,$00,$D6   ..&u0I.V
+L0878    fcb   $9F,$12,$0D,$8C,$27,$4C,$DC,$03   ....'L\.
+L0880    fcb   $10,$83,$00,$01,$25,$44,$10,$93   ....%D..
+L0888    fcb   $8F,$22,$3F,$DC,$03,$83,$00,$01   ."?\....
+L0890    fcb   $8E,$08,$00,$17,$0E,$68,$1F,$20   .....h. 
+L0898    fcb   $D7,$91,$DF,$92,$33,$C9,$07,$FF   W._.3I..
+L08A0    fcb   $11,$93,$4A,$23,$0A,$D1,$49,$25   ..J#.QI%
+L08A8    fcb   $06,$D6,$49,$DE,$4A,$33,$5F,$D7   .VI^J3_W
+L08B0    fcb   $94,$DF,$95,$DE,$1B,$9E,$91,$D6   ._.^...V
+L08B8    fcb   $93,$9F,$97,$D7,$99,$9E,$94,$D6   ...W...V
+L08C0    fcb   $96,$9F,$9A,$D7,$9C,$17,$0E,$80   ...W....
+L08C8    fcb   $20,$09,$CC,$20,$34,$17,$FE,$C2    .L 4..B
+L08D0    fcb   $17,$FE,$DD,$0D,$2E,$10,$27,$FF   ..]...'.
+L08D8    fcb   $2E,$CC,$59,$33,$17,$FE,$B3,$30   .LY3..30
+L08E0    fcb   $8D,$F8,$9E,$16,$FE,$73,$DC,$02   .x...s\.
+L08E8    fcb   $03,$18,$31,$C9,$01,$D6,$8D,$6D   ..1I.V.m
+L08F0    fcb   $1F,$98,$8D,$69,$0F,$18,$96,$04   ...i....
+L08F8    fcb   $8D,$63,$CC,$20,$20,$ED,$A1,$CC   .cL  m!L
+L0900    fcb   $00,$08,$34,$06,$03,$18,$30,$8D   ..4...0.
+L0908    fcb   $FC,$B7,$6F,$E4,$DC,$03,$A3,$01   .7od\.#.
+L0910    fcb   $34,$01,$DD,$03,$96,$02,$5F,$A0   4.]..._ 
+L0918    fcb   $84,$24,$01,$5C,$35,$01,$24,$02   .$.\5.$.
+L0920    fcb   $80,$01,$97,$02,$24,$01,$5C,$5D   ....$.\]
+L0928    fcb   $26,$04,$6C,$E4,$20,$DE,$DC,$03   &.ld ^\.
+L0930    fcb   $E3,$01,$DD,$03,$96,$02,$24,$01   c.]...$.
+L0938    fcb   $4C,$AB,$84,$97,$02,$30,$03,$8D   L+...0..
+L0940    fcb   $43,$6A,$61,$27,$0A,$A6,$61,$81   Cja'.&a.
+L0948    fcb   $02,$26,$BF,$0F,$18,$20,$BB,$86   .&?.. ;.
+L0950    fcb   $0D,$A7,$A4,$DC,$06,$DD,$03,$96   .'$\.]..
+L0958    fcb   $05,$97,$02,$35,$86,$34,$02,$44   ...5.4.D
+L0960    fcb   $44,$44,$44,$8D,$07,$35,$02,$84   DDD..5..
+L0968    fcb   $0F,$8D,$01,$39,$81,$09,$2F,$02   ...9../.
+L0970    fcb   $8B,$07,$8B,$30,$A7,$A0,$0D,$18   ...0' ..
+L0978    fcb   $27,$06,$81,$30,$27,$03,$0F,$18   '..0'...
+L0980    fcb   $39,$31,$3F,$39,$34,$02,$A6,$63   91?94.&c
+L0988    fcb   $8D,$E8,$35,$82,$31,$C9,$01,$D6   .h5.1I.V
+L0990    fcb   $30,$8D,$F6,$7A,$17,$00,$9A,$96   0.vz....
+L0998    fcb   $20,$27,$0A,$84,$F0,$91,$0F,$26    '..p..&
+L09A0    fcb   $04,$86,$FF,$97,$11,$96,$0F,$8D   ........
+L09A8    fcb   $B4,$86,$3A,$A7,$A0,$30,$8D,$F6   4.:' 0.v
+L09B0    fcb   $60,$8D,$7E,$CC,$20,$20,$ED,$A1   `.~L  m!
+L09B8    fcb   $9E,$12,$C6,$10,$0D,$11,$27,$08   ..F...'.
+L09C0    fcb   $D6,$20,$C4,$0F,$27,$74,$34,$04   V D.'t4.
+L09C8    fcb   $A6,$80,$8D,$91,$86,$20,$A7,$A0   &.... ' 
+L09D0    fcb   $5A,$26,$F5,$0D,$11,$27,$0D,$CC   Z&u..'.L
+L09D8    fcb   $03,$10,$E0,$E4,$3D,$86,$20,$A7   ..`d=. '
+L09E0    fcb   $A0,$5A,$26,$FB,$C6,$20,$ED,$A1    Z&.F m!
+L09E8    fcb   $A7,$A0,$9E,$12,$57,$0D,$11,$27   ' ..W..'
+L09F0    fcb   $02,$E6,$E4,$A6,$80,$84,$7F,$81   .fd&...
+L09F8    fcb   $20,$24,$02,$86,$2E,$A7,$A0,$5A    $...' Z
+L0A00    fcb   $26,$F1,$9F,$12,$0D,$11,$27,$1E   &q....'.
+L0A08    fcb   $C6,$10,$E0,$E0,$86,$20,$A7,$A0   F.``. ' 
+L0A10    fcb   $5A,$26,$FB,$86,$F0,$97,$0F,$8D   Z&..p...
+L0A18    fcb   $0D,$0F,$11,$30,$8D,$F5,$F6,$10   ...0.uv.
+L0A20    fcb   $8E,$00,$01,$16,$FD,$52,$86,$0D   .....R..
+L0A28    fcb   $A7,$A4,$30,$C9,$01,$D6,$16,$FD   '$0I.V..
+L0A30    fcb   $43,$A6,$80,$27,$04,$A7,$A0,$20   C&.'.'  
+L0A38    fcb   $F8,$39,$86,$F0,$97,$0F,$20,$D9   x9.p.. Y
+L0A40    fcb   $DC,$03,$C3,$00,$01,$DD,$03,$26   \.C..].&
+L0A48    fcb   $02,$0C,$02,$16,$FC,$A7,$DC,$03   .....'\.
+L0A50    fcb   $26,$06,$0D,$02,$10,$27,$FC,$B3   &....'.3
+L0A58    fcb   $83,$00,$01,$DD,$03,$10,$83,$FF   ...]....
+L0A60    fcb   $FF,$26,$E8,$0A,$02,$20,$E4,$17   .&h.. d.
+L0A68    fcb   $FD,$25,$30,$8D,$F5,$D5,$17,$FC   .%0.uU..
+L0A70    fcb   $E8,$10,$8E,$00,$07,$8D,$12,$25   h......%
+L0A78    fcb   $0B,$DC,$47,$DD,$03,$96,$46,$97   .\G]..F.
+L0A80    fcb   $02,$16,$FC,$71,$17,$0A,$AE,$20   ...q... 
+L0A88    fcb   $DE,$34,$20,$0F,$1A,$03,$1A,$17   ^4 .....
+L0A90    fcb   $06,$63,$35,$20,$30,$C9,$01,$D6   .c5 0I.V
+L0A98    fcb   $17,$FC,$EB,$0F,$1A,$17,$06,$55   ..k....U
+L0AA0    fcb   $31,$3F,$27,$4A,$1F,$20,$A6,$80   1?'J. &.
+L0AA8    fcb   $8D,$49,$25,$3F,$5A,$26,$F7,$10   .I%?Z&w.
+L0AB0    fcb   $9F,$45,$86,$30,$E6,$82,$31,$3F   .E.0f.1?
+L0AB8    fcb   $27,$04,$A6,$82,$31,$3F,$8D,$49   '.&.1?.I
+L0AC0    fcb   $34,$04,$10,$8C,$00,$00,$26,$EA   4.....&j
+L0AC8    fcb   $D6,$46,$5C,$54,$4F,$30,$C8,$45   VF\TO0HE
+L0AD0    fcb   $C1,$04,$27,$0E,$A7,$80,$C1,$03   A.'.'.A.
+L0AD8    fcb   $27,$08,$A7,$80,$C1,$02,$27,$02   '.'.A.'.
+L0AE0    fcb   $A7,$80,$35,$02,$A7,$80,$5A,$26   '.5.'.Z&
+L0AE8    fcb   $F9,$5F,$39,$17,$0A,$47,$32,$62   y_9..G2b
+L0AF0    fcb   $16,$FC,$18,$81,$30,$25,$10,$81   ....0%..
+L0AF8    fcb   $39,$23,$0A,$84,$5F,$81,$46,$22   9#.._.F"
+L0B00    fcb   $06,$81,$41,$25,$02,$4F,$39,$43   ..A%.O9C
+L0B08    fcb   $39,$8D,$0D,$34,$04,$1F,$89,$8D   9..4....
+L0B10    fcb   $07,$58,$58,$58,$58,$EA,$E0,$39   .XXXXj`9
+L0B18    fcb   $C0,$30,$C1,$09,$23,$04,$C4,$5F   @0A.#.D_
+L0B20    fcb   $C0,$07,$39,$0F,$1A,$03,$1A,$17   @.9.....
+L0B28    fcb   $05,$CB,$17,$FC,$62,$17,$FC,$80   .K..b...
+L0B30    fcb   $30,$8D,$F5,$A7,$17,$FC,$22,$0D   0.u'..".
+L0B38    fcb   $17,$26,$46,$30,$8D,$F5,$A0,$17   .&F0.u .
+L0B40    fcb   $FC,$17,$10,$8E,$00,$03,$8D,$1A   ........
+L0B48    fcb   $8D,$4C,$25,$2D,$30,$C9,$00,$D6   .L%-0I.V
+L0B50    fcb   $9F,$12,$5F,$A7,$80,$5A,$26,$FB   .._'.Z&.
+L0B58    fcb   $0F,$1A,$17,$05,$98,$0C,$2D,$16   ......-.
+L0B60    fcb   $FB,$A6,$4F,$30,$C9,$01,$D6,$10   .&O0I.V.
+L0B68    fcb   $3F,$8B,$25,$01,$39,$C1,$02,$10   ?.%.9A..
+L0B70    fcb   $26,$01,$43,$03,$17,$32,$62,$20   &.C..2b 
+L0B78    fcb   $AA,$0F,$1A,$17,$05,$77,$16,$FB   *....w..
+L0B80    fcb   $8A,$30,$8D,$F5,$60,$17,$FB,$D1   .0.u`..Q
+L0B88    fcb   $10,$8E,$00,$02,$8D,$D4,$A6,$84   .....T&.
+L0B90    fcb   $81,$20,$25,$E5,$20,$B6,$8D,$12   . %e 6..
+L0B98    fcb   $25,$2F,$1F,$89,$8D,$0C,$25,$29   %/....%)
+L0BA0    fcb   $58,$58,$58,$58,$34,$04,$AA,$E0   XXXX4.*`
+L0BA8    fcb   $20,$1A,$8D,$04,$25,$1B,$20,$1A    ...%. .
+L0BB0    fcb   $A6,$80,$81,$30,$25,$11,$81,$39   &..0%..9
+L0BB8    fcb   $23,$0A,$84,$5F,$81,$41,$25,$07   #.._.A%.
+L0BC0    fcb   $81,$46,$22,$03,$1C,$FE,$39,$1A   .F"...9.
+L0BC8    fcb   $01,$39,$80,$30,$81,$09,$23,$02   .9.0..#.
+L0BD0    fcb   $80,$07,$20,$F0,$0D,$2E,$10,$26   .. p...&
+L0BD8    fcb   $FB,$31,$8D,$23,$10,$26,$FB,$2B   .1.#.&.+
+L0BE0    fcb   $17,$FB,$AC,$17,$FB,$CA,$17,$FB   ..,..J..
+L0BE8    fcb   $A6,$30,$8D,$F5,$12,$17,$FB,$69   &0.u...i
+L0BF0    fcb   $17,$FB,$FE,$96,$00,$17,$00,$92   ........
+L0BF8    fcb   $0D,$2E,$27,$78,$0F,$2D,$39,$17   ..'x.-9.
+L0C00    fcb   $FB,$8D,$0F,$1A,$03,$1A,$17,$04   ........
+L0C08    fcb   $EC,$30,$8D,$F4,$DE,$17,$FB,$49   l0.t^..I
+L0C10    fcb   $17,$FB,$9D,$30,$C9,$01,$D6,$17   ...0I.V.
+L0C18    fcb   $FB,$CE,$0F,$1A,$17,$04,$D6,$A6   .N....V&
+L0C20    fcb   $84,$84,$5F,$81,$59,$39,$0D,$01   .._.Y9..
+L0C28    fcb   $26,$4A,$0F,$1A,$03,$1A,$17,$04   &J......
+L0C30    fcb   $C4,$17,$FB,$5B,$30,$8D,$F4,$D8   D..[0.tX
+L0C38    fcb   $17,$FB,$1E,$17,$FB,$72,$30,$C9   .....r0I
+L0C40    fcb   $01,$D6,$10,$8E,$00,$1E,$17,$FB   .V......
+L0C48    fcb   $3D,$0F,$1A,$17,$04,$A7,$10,$8C   =....'..
+L0C50    fcb   $00,$01,$27,$20,$34,$10,$31,$C8   ..' 4.1H
+L0C58    fcb   $6B,$A6,$80,$A7,$A0,$81,$20,$22   k&.' . "
+L0C60    fcb   $F8,$86,$0D,$A7,$3F,$35,$10,$86   x..'?5..
+L0C68    fcb   $02,$C6,$0B,$10,$3F,$83,$25,$46   .F..?.%F
+L0C70    fcb   $97,$01,$8D,$03,$16,$FA,$94,$CC   .....z.L
+L0C78    fcb   $30,$21,$17,$FB,$15,$30,$8D,$F4   0!...0.t
+L0C80    fcb   $8F,$17,$FA,$D5,$30,$C8,$6B,$16   ..zU0Hk.
+L0C88    fcb   $FA,$EA,$30,$C9,$00,$D6,$10,$9E   zj0I.V..
+L0C90    fcb   $1F,$10,$3F,$8A,$25,$20,$39,$96   ..?.% 9.
+L0C98    fcb   $01,$27,$D9,$10,$3F,$8F,$25,$16   .'Y.?.%.
+L0CA0    fcb   $CC,$30,$21,$17,$FA,$EC,$17,$FB   L0!.zl..
+L0CA8    fcb   $07,$0F,$01,$20,$C7,$96,$01,$27   ... G..'
+L0CB0    fcb   $FA,$8D,$D7,$16,$FD,$8A,$34,$04   z.W...4.
+L0CB8    fcb   $0F,$8B,$DC,$05,$DD,$02,$96,$07   ..\.]...
+L0CC0    fcb   $97,$04,$35,$04,$10,$DE,$1D,$C1   ..5..^.A
+L0CC8    fcb   $02,$27,$0C,$C1,$03,$26,$04,$0F   .'.A.&..
+L0CD0    fcb   $2D,$20,$04,$C1,$D3,$26,$03,$16   - .AS&..
+L0CD8    fcb   $FE,$9F,$C1,$CD,$26,$14,$0D,$4D   ..AM&..M
+L0CE0    fcb   $26,$10,$8D,$1D,$30,$8D,$F3,$25   &...0.s%
+L0CE8    fcb   $10,$8E,$00,$01,$17,$FA,$89,$16   .....z..
+L0CF0    fcb   $FA,$16,$34,$04,$17,$FA,$98,$17   z.4..z..
+L0CF8    fcb   $FA,$B6,$35,$04,$8D,$03,$16,$FA   z65....z
+L0D00    fcb   $0A,$86,$02,$10,$3F,$0F,$0F,$1A   ....?...
+L0D08    fcb   $17,$03,$EA,$30,$C9,$01,$D6,$16   ..j0I.V.
+L0D10    fcb   $FA,$D6,$86,$02,$30,$8D,$F8,$94   zV..0.x.
+L0D18    fcb   $10,$8E,$00,$78,$17,$FA,$5B,$5F   ...x.z[_
+L0D20    fcb   $20,$12,$17,$FE,$DA,$10,$26,$F9    ...Z.&y
+L0D28    fcb   $E2,$17,$FA,$8E,$96,$19,$97,$1A   b.z.....
+L0D30    fcb   $17,$03,$C2,$5F,$10,$3F,$06,$17   ..B_.?..
+L0D38    fcb   $FA,$55,$30,$8D,$F3,$5D,$17,$FA   zU0.s].z
+L0D40    fcb   $18,$30,$C9,$00,$D6,$9F,$14,$86   .0I.V...
+L0D48    fcb   $01,$97,$16,$86,$23,$97,$0F,$86   ....#...
+L0D50    fcb   $25,$97,$0E,$86,$58,$97,$10,$17   %...X...
+L0D58    fcb   $FA,$42,$17,$00,$EA,$96,$0E,$D6   zB..j..V
+L0D60    fcb   $0F,$0D,$17,$27,$02,$96,$10,$0D   ...'....
+L0D68    fcb   $8C,$10,$27,$00,$CA,$9E,$03,$8C   ..'.J...
+L0D70    fcb   $00,$01,$10,$25,$00,$C1,$9C,$8F   ...%.A..
+L0D78    fcb   $10,$22,$00,$BB,$34,$06,$9E,$91   .".;4...
+L0D80    fcb   $D6,$93,$9F,$97,$D7,$99,$9E,$94   V...W...
+L0D88    fcb   $D6,$96,$9F,$9A,$D7,$9C,$4F,$D6   V...W.OV
+L0D90    fcb   $0F,$C0,$23,$86,$10,$3D,$34,$06   .@#..=4.
+L0D98    fcb   $4F,$D6,$0E,$C0,$25,$27,$0A,$1F   OV.@%'..
+L0DA0    fcb   $01,$CC,$00,$03,$17,$09,$81,$1F   .L......
+L0DA8    fcb   $10,$E3,$E1,$9E,$03,$9C,$8F,$25   .ca....%
+L0DB0    fcb   $12,$34,$06,$DC,$8D,$4F,$1F,$01   .4.\.O..
+L0DB8    fcb   $35,$06,$30,$1F,$34,$10,$10,$A3   5.0.4..#
+L0DC0    fcb   $E1,$22,$1A,$8E,$00,$08,$17,$09   a"......
+L0DC8    fcb   $35,$1F,$30,$D3,$98,$DD,$98,$C3   5.0S.].C
+L0DD0    fcb   $00,$07,$10,$93,$95,$23,$02,$DC   .....#.\
+L0DD8    fcb   $95,$DD,$9B,$20,$06,$0F,$9A,$0F   .]. ....
+L0DE0    fcb   $9B,$0F,$9C,$DE,$1B,$17,$F9,$BE   ...^..y>
+L0DE8    fcb   $0D,$9C,$26,$13,$0D,$9B,$26,$0F   ..&...&.
+L0DF0    fcb   $0D,$9A,$26,$0B,$CC,$20,$34,$17   ..&.L 4.
+L0DF8    fcb   $F9,$98,$17,$F9,$B3,$20,$33,$17   y..y3 3.
+L0E00    fcb   $09,$46,$CC,$49,$34,$17,$F9,$8A   .FLI4.y.
+L0E08    fcb   $30,$8D,$F4,$1A,$17,$F9,$4A,$30   0.t..yJ0
+L0E10    fcb   $C9,$00,$9D,$A6,$D8,$14,$C6,$08   I..&X.F.
+L0E18    fcb   $34,$12,$68,$E4,$25,$04,$86,$30   4.hd%..0
+L0E20    fcb   $20,$02,$86,$31,$A7,$80,$5A,$26    ..1'.Z&
+L0E28    fcb   $F1,$35,$12,$10,$8E,$00,$08,$17   q5......
+L0E30    fcb   $F9,$46,$17,$F9,$67,$35,$06,$17   yF.yg5..
+L0E38    fcb   $F9,$58,$30,$C9,$01,$D6,$0D,$17   yX0I.V..
+L0E40    fcb   $10,$26,$00,$F4,$16,$00,$B7,$96   .&.t..7.
+L0E48    fcb   $0E,$D6,$0F,$17,$F9,$44,$31,$C9   .V..yD1I
+L0E50    fcb   $01,$D6,$A6,$D8,$14,$34,$02,$17   .V&X.4..
+L0E58    fcb   $FB,$03,$30,$3E,$10,$8E,$00,$02   ..0>....
+L0E60    fcb   $86,$01,$17,$F9,$15,$96,$10,$D6   ...y...V
+L0E68    fcb   $0F,$17,$F9,$26,$35,$02,$84,$7F   ..y&5..
+L0E70    fcb   $81,$20,$24,$02,$86,$2E,$30,$C9   . $...0I
+L0E78    fcb   $01,$D6,$A7,$84,$10,$8E,$00,$01   .V'.....
+L0E80    fcb   $16,$F8,$F5,$34,$14,$4F,$C6,$01   .xu4.OF.
+L0E88    fcb   $10,$3F,$8D,$24,$49,$C1,$F6,$26   .?.$IAv&
+L0E90    fcb   $2E,$8E,$00,$01,$10,$3F,$0A,$25   .....?.%
+L0E98    fcb   $26,$0A,$89,$96,$89,$98,$8A,$84   &.......
+L0EA0    fcb   $40,$27,$12,$03,$8A,$27,$04,$8D   @'...'..
+L0EA8    fcb   $1E,$20,$0A,$30,$8D,$F1,$6A,$10   . .0.qj.
+L0EB0    fcb   $8E,$00,$02,$8D,$1A,$D6,$8B,$C1   .....V.A
+L0EB8    fcb   $02,$27,$04,$C1,$03,$26,$C6,$E7   .'.A.&Fg
+L0EC0    fcb   $E4,$8D,$04,$35,$14,$20,$1E,$30   d..5. .0
+L0EC8    fcb   $8D,$F1,$4B,$10,$8E,$00,$02,$86   .qK.....
+L0ED0    fcb   $01,$10,$3F,$8A,$5F,$39,$8D,$EF   ..?._9.o
+L0ED8    fcb   $35,$14,$10,$8E,$00,$01,$4F,$10   5.....O.
+L0EE0    fcb   $3F,$89,$25,$01,$39,$32,$62,$0F   ?.%.92b.
+L0EE8    fcb   $8B,$C1,$02,$27,$0C,$34,$04,$17   .A.'.4..
+L0EF0    fcb   $01,$28,$0F,$0F,$35,$04,$16,$FD   .(..5...
+L0EF8    fcb   $BD,$03,$17,$16,$FE,$5F,$8D,$83   =...._..
+L0F00    fcb   $8D,$1C,$25,$46,$17,$F8,$71,$E6   ..%F.xqf
+L0F08    fcb   $84,$17,$FF,$77,$8D,$10,$25,$3A   ...w..%:
+L0F10    fcb   $1E,$89,$17,$FB,$F4,$E7,$D8,$14   ....tgX.
+L0F18    fcb   $86,$01,$97,$2D,$20,$57,$A6,$84   ...- W&.
+L0F20    fcb   $81,$30,$25,$11,$81,$39,$23,$0A   .0%..9#.
+L0F28    fcb   $84,$5F,$81,$46,$22,$07,$81,$41   ._.F"..A
+L0F30    fcb   $25,$03,$1C,$FE,$39,$1A,$01,$39   %...9..9
+L0F38    fcb   $17,$FF,$48,$A6,$84,$81,$20,$25   ..H&.. %
+L0F40    fcb   $09,$A7,$D8,$14,$86,$01,$97,$2D   .'X....-
+L0F48    fcb   $20,$2B,$81,$09,$27,$27,$81,$08    +..''..
+L0F50    fcb   $27,$61,$81,$0C,$10,$27,$00,$C8   'a...'.H
+L0F58    fcb   $81,$0A,$10,$27,$01,$18,$81,$0D   ...'....
+L0F60    fcb   $10,$26,$FD,$F9,$17,$00,$B3,$CC   .&.y..3L
+L0F68    fcb   $49,$34,$17,$F8,$25,$17,$F8,$40   I4.x%.x@
+L0F70    fcb   $0F,$0F,$16,$F7,$96,$17,$00,$A2   ...w..."
+L0F78    fcb   $0D,$20,$27,$08,$96,$16,$91,$20   . '.... 
+L0F80    fcb   $10,$27,$FD,$BD,$DC,$14,$C3,$00   .'.=\.C.
+L0F88    fcb   $01,$DD,$14,$0C,$16,$0C,$10,$96   .]......
+L0F90    fcb   $10,$81,$68,$24,$09,$96,$0E,$8B   ..h$....
+L0F98    fcb   $03,$97,$0E,$16,$FD,$B9,$0C,$0F   .....9..
+L0FA0    fcb   $96,$0F,$81,$32,$10,$22,$FD,$99   ...2."..
+L0FA8    fcb   $86,$25,$97,$0E,$86,$58,$97,$10   .%...X..
+L0FB0    fcb   $16,$FD,$A4,$8D,$65,$DC,$14,$83   ..$.e\..
+L0FB8    fcb   $00,$01,$DD,$14,$0A,$16,$0A,$10   ..].....
+L0FC0    fcb   $96,$10,$81,$58,$25,$09,$96,$0E   ...X%...
+L0FC8    fcb   $80,$03,$97,$0E,$16,$FD,$88,$0A   ........
+L0FD0    fcb   $0F,$86,$52,$97,$0E,$86,$67,$97   ..R...g.
+L0FD8    fcb   $10,$96,$0F,$81,$23,$25,$03,$16   ....#%..
+L0FE0    fcb   $FD,$75,$9E,$14,$D6,$20,$27,$25   .u..V '%
+L0FE8    fcb   $D7,$16,$4F,$30,$8B,$5A,$34,$04   W.O0.Z4.
+L0FF0    fcb   $54,$54,$54,$54,$CB,$23,$D7,$0F   TTTTK#W.
+L0FF8    fcb   $A6,$E0,$84,$0F,$34,$02,$8B,$58   &`..4..X
+L1000    fcb   $97,$10,$35,$02,$C6,$03,$3D,$CB   ..5.F.=K
+L1008    fcb   $25,$D7,$0E,$20,$08,$86,$32,$97   %W. ..2.
+L1010    fcb   $0F,$30,$89,$01,$00,$9F,$14,$16   .0......
+L1018    fcb   $FD,$3D,$17,$F7,$89,$16,$FE,$27   .=.w...'
+L1020    fcb   $8D,$F8,$D6,$20,$27,$06,$96,$0F   .xV '...
+L1028    fcb   $81,$23,$27,$23,$DC,$14,$83,$00   .#'#\...
+L1030    fcb   $10,$DD,$14,$D6,$16,$C0,$10,$D7   .].V.@.W
+L1038    fcb   $16,$0A,$0F,$96,$0F,$81,$23,$24   ......#$
+L1040    fcb   $0B,$86,$32,$97,$0F,$DC,$14,$C3   ..2..\.C
+L1048    fcb   $01,$00,$DD,$14,$16,$FD,$08,$C4   ..]....D
+L1050    fcb   $F0,$96,$20,$84,$0F,$91,$16,$24   p. ....$
+L1058    fcb   $02,$C0,$10,$4F,$34,$06,$DC,$14   .@.O4.\.
+L1060    fcb   $E3,$E0,$DD,$14,$D6,$16,$EB,$E4   c`].V.kd
+L1068    fcb   $D7,$16,$35,$04,$54,$54,$54,$54   W.5.TTTT
+L1070    fcb   $CB,$23,$D7,$0F,$20,$D6,$8D,$A2   K#W. V."
+L1078    fcb   $D6,$20,$27,$06,$D0,$16,$C1,$10   V '.P.A.
+L1080    fcb   $25,$25,$DC,$14,$C3,$00,$10,$DD   %%\.C..]
+L1088    fcb   $14,$96,$16,$8B,$10,$97,$16,$0C   ........
+L1090    fcb   $0F,$96,$0F,$81,$32,$10,$23,$FC   ....2.#.
+L1098    fcb   $BE,$DC,$14,$83,$01,$00,$DD,$14   >\....].
+L10A0    fcb   $86,$23,$97,$0F,$16,$FC,$B0,$4F   .#....0O
+L10A8    fcb   $D6,$16,$5A,$C4,$F0,$34,$06,$DC   V.ZDp4.\
+L10B0    fcb   $14,$A3,$E0,$DD,$14,$D6,$16,$E0   .#`].V.`
+L10B8    fcb   $E0,$D7,$16,$20,$E3,$17,$F6,$FA   `W. c.vz
+L10C0    fcb   $96,$19,$97,$1A,$8D,$2F,$30,$8D   ...../0.
+L10C8    fcb   $F0,$6C,$10,$8E,$00,$10,$33,$C9   pl....3I
+L10D0    fcb   $01,$D6,$86,$0D,$A7,$C4,$CC,$00   .V..'DL.
+L10D8    fcb   $00,$10,$3F,$03,$10,$25,$FB,$D6   ..?..%.V
+L10E0    fcb   $10,$3F,$04,$DE,$1B,$30,$C9,$00   .?.^.0I.
+L10E8    fcb   $D6,$9F,$12,$0F,$1A,$8D,$06,$17   V.......
+L10F0    fcb   $F6,$C8,$16,$F6,$13,$34,$10,$32   vH.v.4.2
+L10F8    fcb   $E8,$E0,$30,$E4,$4F,$5F,$10,$3F   h`0dO_.?
+L1100    fcb   $8D,$10,$25,$FB,$B1,$96,$1A,$A7   ..%.1..'
+L1108    fcb   $04,$4F,$10,$3F,$8E,$10,$25,$FB   .O.?..%.
+L1110    fcb   $A5,$32,$E8,$20,$35,$90,$17,$F6   %2h 5..v
+L1118    fcb   $76,$30,$8D,$EF,$FC,$17,$F6,$39   v0.o..v9
+L1120    fcb   $CE,$00,$00,$8E,$00,$00,$9F,$25   N......%
+L1128    fcb   $96,$00,$10,$3F,$88,$10,$25,$FB   ...?..%.
+L1130    fcb   $85,$DE,$1B,$CC,$FF,$FF,$DD,$29   .^.L..])
+L1138    fcb   $D7,$2B,$30,$C9,$01,$D6,$10,$8E   W+0I.V..
+L1140    fcb   $00,$08,$96,$00,$10,$3F,$89,$10   .....?..
+L1148    fcb   $25,$FB,$6B,$10,$8C,$00,$08,$10   %.k.....
+L1150    fcb   $26,$00,$BB,$EC,$84,$81,$87,$10   &.;l....
+L1158    fcb   $26,$00,$B3,$C1,$CD,$10,$26,$00   &.3AM.&.
+L1160    fcb   $AD,$EC,$02,$10,$83,$00,$0F,$10   -l......
+L1168    fcb   $23,$00,$A3,$83,$00,$03,$DD,$21   #.#...]!
+L1170    fcb   $D3,$25,$DD,$25,$4F,$C6,$08,$A8   S%]%OF.(
+L1178    fcb   $80,$5A,$26,$FB,$43,$A7,$84,$10   .Z&.C'..
+L1180    fcb   $8E,$00,$01,$96,$00,$10,$3F,$8A   ......?.
+L1188    fcb   $10,$25,$FB,$2A,$DC,$21,$83,$00   .%.*\!..
+L1190    fcb   $09,$DD,$21,$30,$C9,$01,$D6,$10   .]!0I.V.
+L1198    fcb   $8E,$00,$09,$8D,$64,$96,$00,$10   ....d...
+L11A0    fcb   $8E,$00,$78,$10,$9C,$21,$23,$03   ..x..!#.
+L11A8    fcb   $10,$9E,$21,$10,$3F,$89,$25,$5E   ..!.?.%^
+L11B0    fcb   $10,$9F,$27,$8D,$4C,$DC,$21,$93   ..'.L\!.
+L11B8    fcb   $27,$DD,$21,$26,$E0,$96,$00,$C6   ']!&`..F
+L11C0    fcb   $05,$10,$3F,$8D,$1F,$30,$DE,$1B   ..?..0^.
+L11C8    fcb   $10,$93,$25,$26,$41,$03,$29,$03   ..%&A.).
+L11D0    fcb   $2A,$03,$2B,$30,$C8,$29,$10,$8E   *.+0H)..
+L11D8    fcb   $00,$03,$96,$00,$10,$3F,$8A,$10   .....?..
+L11E0    fcb   $25,$FA,$D3,$CC,$00,$03,$D3,$25   %zSL..S%
+L11E8    fcb   $DD,$25,$C6,$06,$96,$00,$10,$3F   ]%F....?
+L11F0    fcb   $8D,$10,$24,$FF,$3E,$C1,$D3,$10   ..$.>AS.
+L11F8    fcb   $26,$FA,$BB,$17,$F5,$C6,$16,$F5   &z;.uF.u
+L1200    fcb   $07,$33,$C8,$29,$10,$3F,$17,$10   .3H).?..
+L1208    fcb   $25,$FA,$AB,$DE,$1B,$39,$CC,$20   %z+^.9L 
+L1210    fcb   $36,$17,$F5,$7E,$30,$8D,$EF,$0D   6.u~0.o.
+L1218    fcb   $17,$F5,$3E,$C6,$CD,$17,$FA,$E1   .u>FM.za
+L1220    fcb   $16,$F4,$E8,$0D,$4D,$10,$26,$F4   .th.M.&t
+L1228    fcb   $E2,$CC,$00,$00,$DD,$25,$DD,$23   bL..]%]#
+L1230    fcb   $0F,$1A,$03,$1A,$17,$FE,$BE,$17   ......>.
+L1238    fcb   $F5,$55,$17,$F5,$73,$30,$8D,$EE   uU.us0.n
+L1240    fcb   $FA,$17,$F5,$15,$30,$C8,$4D,$10   z.u.0HM.
+L1248    fcb   $8E,$00,$1E,$17,$F5,$38,$0F,$1A   ....u8..
+L1250    fcb   $17,$FE,$A2,$10,$8C,$00,$01,$10   ..".....
+L1258    fcb   $26,$00,$B1,$17,$F5,$5C,$0F,$4D   &.1.u\.M
+L1260    fcb   $30,$8D,$EE,$ED,$17,$F5,$0D,$DC   0.nm.u.\
+L1268    fcb   $23,$D3,$25,$DD,$25,$1F,$03,$8E   #S%]%...
+L1270    fcb   $00,$00,$96,$00,$10,$3F,$88,$25   .....?.%
+L1278    fcb   $7F,$DE,$1B,$30,$C9,$01,$D6,$10   ^.0I.V.
+L1280    fcb   $8E,$00,$06,$10,$3F,$89,$25,$70   ....?.%p
+L1288    fcb   $EC,$81,$81,$87,$26,$68,$C1,$CD   l...&hAM
+L1290    fcb   $26,$64,$31,$C9,$01,$D6,$EC,$81   &d1I.Vl.
+L1298    fcb   $DD,$23,$EC,$81,$34,$06,$DC,$25   ]#l.4.\%
+L12A0    fcb   $8D,$44,$86,$20,$A7,$A0,$DC,$23   .D. ' \#
+L12A8    fcb   $8D,$3C,$86,$20,$A7,$A0,$DC,$25   .<. ' \%
+L12B0    fcb   $E3,$E1,$1F,$03,$8E,$00,$00,$96   ca......
+L12B8    fcb   $00,$10,$3F,$88,$10,$25,$F9,$F6   ..?..%yv
+L12C0    fcb   $DE,$1B,$1F,$21,$10,$8E,$00,$1D   ^..!....
+L12C8    fcb   $96,$00,$10,$3F,$89,$10,$25,$F9   ...?..%y
+L12D0    fcb   $E5,$A6,$80,$2A,$FC,$84,$7F,$A7   e&.*..'
+L12D8    fcb   $1F,$86,$0D,$A7,$84,$30,$C9,$01   ...'.0I.
+L12E0    fcb   $D6,$17,$F4,$90,$20,$81,$17,$F6   V.t. ..v
+L12E8    fcb   $74,$1F,$98,$16,$F6,$6F,$C1,$D3   t...voAS
+L12F0    fcb   $26,$06,$C6,$DD,$20,$02,$C6,$CD   &.F] .FM
+L12F8    fcb   $0F,$4D,$C1,$D3,$10,$26,$F9,$B6   .MAS.&y6
+L1300    fcb   $17,$F4,$E5,$30,$C9,$00,$D6,$9F   .te0I.V.
+L1308    fcb   $12,$16,$FD,$E3,$10,$3F,$10,$10   ...c.?..
+L1310    fcb   $25,$F9,$A3,$D7,$2C,$5A,$A6,$85   %y#W,Z&.
+L1318    fcb   $8A,$80,$A7,$85,$9F,$29,$CE,$00   ..'..)N.
+L1320    fcb   $00,$8E,$00,$00,$96,$00,$10,$3F   .......?
+L1328    fcb   $88,$10,$25,$F9,$89,$DE,$1B,$30   ..%y.^.0
+L1330    fcb   $C9,$01,$D6,$10,$8E,$00,$06,$10   I.V.....
+L1338    fcb   $3F,$89,$25,$B2,$EC,$81,$81,$87   ?.%2l...
+L1340    fcb   $26,$B4,$C1,$CD,$26,$B0,$EC,$81   &4AM&0l.
+L1348    fcb   $DD,$23,$EC,$84,$D3,$25,$1F,$03   ]#l.S%..
+L1350    fcb   $8E,$00,$00,$96,$00,$10,$3F,$88   ......?.
+L1358    fcb   $25,$94,$DE,$1B,$30,$C9,$01,$D6   %.^.0I.V
+L1360    fcb   $10,$8E,$00,$1D,$10,$3F,$89,$25   .....?.%
+L1368    fcb   $85,$1F,$12,$9E,$29,$D6,$2C,$10   ....)V,.
+L1370    fcb   $3F,$11,$24,$0A,$DC,$23,$D3,$25   ?.$.\#S%
+L1378    fcb   $DD,$25,$1F,$03,$20,$A3,$86,$0D   ]%.. #..
+L1380    fcb   $A7,$85,$5A,$A6,$85,$84,$7F,$A7   '.Z&..'
+L1388    fcb   $85,$DC,$25,$DD,$08,$CC,$00,$06   .\%].L..
+L1390    fcb   $30,$42,$A7,$80,$5A,$26,$FB,$16   0B'.Z&..
+L1398    fcb   $F3,$5B,$CC,$30,$20,$17,$F3,$F2   s[L0 .sr
+L13A0    fcb   $30,$8D,$ED,$CB,$17,$F3,$B2,$30   0.mK.s20
+L13A8    fcb   $C8,$4D,$17,$F3,$C7,$CC,$58,$20   HM.sGLX 
+L13B0    fcb   $17,$F3,$DF,$30,$8D,$ED,$C1,$17   .s_0.mA.
+L13B8    fcb   $F3,$9F,$31,$C9,$01,$D6,$DC,$08   s.1I.V\.
+L13C0    fcb   $17,$FF,$23,$86,$0D,$A7,$A4,$16   ..#..'$.
+L13C8    fcb   $F3,$AE,$0D,$4D,$10,$27,$F3,$3B   s..M.'s;
+L13D0    fcb   $CC,$00,$08,$30,$42,$A7,$80,$5A   L..0B'.Z
+L13D8    fcb   $26,$FB,$CC,$30,$20,$17,$F3,$B2   &.L0 .s2
+L13E0    fcb   $17,$F3,$CD,$17,$F3,$CA,$0F,$4D   .sM.sJ.M
+L13E8    fcb   $16,$F3,$0A,$0D,$2E,$27,$0E,$0F   .s...'..
+L13F0    fcb   $2E,$CC,$59,$33,$17,$F3,$9B,$17   .LY3.s..
+L13F8    fcb   $F3,$B6,$16,$F3,$0E,$17,$F7,$FF   s6.s..w.
+L1400    fcb   $26,$F8,$03,$2E,$CC,$59,$33,$17   &x..LY3.
+L1408    fcb   $F3,$88,$30,$8D,$ED,$73,$17,$F3   s.0.ms.s
+L1410    fcb   $48,$20,$E7,$17,$F3,$A4,$30,$8D   H g.s$0.
+L1418    fcb   $EE,$24,$10,$8E,$03,$6E,$17,$F3   n$...n.s
+L1420    fcb   $59,$30,$C9,$01,$D6,$17,$F3,$C0   Y0I.V.s@
+L1428    fcb   $16,$FC,$C4,$0F,$1A,$03,$1A,$17   ..D.....
+L1430    fcb   $FC,$C3,$17,$F3,$5A,$17,$F3,$78   .C.sZ.sx
+L1438    fcb   $0D,$2F,$26,$35,$30,$8D,$ED,$54   ./&50.mT
+L1440    fcb   $17,$F3,$16,$10,$8E,$00,$21,$17   .s....!.
+L1448    fcb   $00,$CA,$10,$8C,$00,$01,$10,$27   .J.....'
+L1450    fcb   $01,$07,$31,$3F,$1F,$20,$54,$10   ..1?. T.
+L1458    fcb   $25,$00,$D3,$D7,$30,$33,$C8,$31   %.SW03H1
+L1460    fcb   $17,$F7,$33,$10,$25,$00,$C7,$A7   .w3.%.G'
+L1468    fcb   $C0,$31,$3E,$26,$F3,$DE,$1B,$20   @1>&s^. 
+L1470    fcb   $25,$30,$8D,$ED,$31,$17,$F2,$E1   %0.m1.ra
+L1478    fcb   $10,$8E,$00,$11,$17,$00,$95,$10   ........
+L1480    fcb   $8C,$00,$01,$10,$27,$00,$D2,$1F   ....'.R.
+L1488    fcb   $20,$5A,$D7,$30,$31,$C8,$31,$A6    ZW01H1&
+L1490    fcb   $80,$A7,$A0,$5A,$26,$F9,$0F,$1A   .' Z&y..
+L1498    fcb   $17,$FC,$5A,$30,$C9,$00,$D6,$D6   ..Z0I.VV
+L14A0    fcb   $20,$31,$C8,$31,$A6,$A4,$A8,$80    1H1&$(.
+L14A8    fcb   $10,$27,$00,$B0,$0D,$2F,$27,$06   .'.0./'.
+L14B0    fcb   $85,$5F,$10,$27,$00,$A6,$5A,$26   ._.'.&Z&
+L14B8    fcb   $EB,$34,$36,$4F,$C6,$01,$10,$3F   k46OF..?
+L14C0    fcb   $8D,$25,$0D,$30,$C9,$01,$D6,$17   .%.0I.V.
+L14C8    fcb   $F3,$1E,$A6,$84,$81,$05,$27,$76   s.&...'v
+L14D0    fcb   $35,$36,$8D,$02,$20,$C9,$0D,$4D   56.. I.M
+L14D8    fcb   $27,$09,$DC,$23,$83,$00,$01,$91   '.\#....
+L14E0    fcb   $04,$27,$63,$DC,$03,$C3,$00,$01   .'c\.C..
+L14E8    fcb   $DD,$03,$26,$02,$0C,$02,$17,$F3   ].&....s
+L14F0    fcb   $00,$30,$C9,$00,$D6,$9F,$12,$0D   .0I.V...
+L14F8    fcb   $4D,$27,$0A,$DC,$23,$90,$04,$26   M'.\#..&
+L1500    fcb   $04,$1F,$02,$20,$04,$10,$8E,$01   ... ....
+L1508    fcb   $00,$96,$00,$10,$3F,$89,$25,$30   ....?.%0
+L1510    fcb   $10,$9F,$1F,$39,$30,$C9,$01,$D6   ...90I.V
+L1518    fcb   $4F,$10,$3F,$8B,$25,$01,$39,$32   O.?.%.92
+L1520    fcb   $62,$0F,$8B,$C1,$02,$10,$26,$F7   b..A..&w
+L1528    fcb   $8D,$03,$2F,$16,$FE,$FD,$DE,$1B   ../...^.
+L1530    fcb   $8D,$03,$16,$FE,$F6,$30,$8D,$EC   ....v0.l
+L1538    fcb   $F2,$10,$8E,$00,$01,$16,$F2,$38   r.....r8
+L1540    fcb   $C1,$D3,$10,$26,$F7,$70,$10,$DE   AS.&wp.^
+L1548    fcb   $1D,$DC,$05,$DD,$02,$96,$07,$97   .\.]....
+L1550    fcb   $04,$17,$F2,$70,$10,$9F,$1F,$8D   ..rp....
+L1558    fcb   $DC,$16,$F6,$1D,$34,$04,$5A,$D7   \.v.4.ZW
+L1560    fcb   $44,$9F,$42,$D6,$30,$5A,$27,$2F   D.BV0Z'/
+L1568    fcb   $6A,$E4,$27,$1C,$31,$21,$A6,$A4   jd'.1!&$
+L1570    fcb   $A8,$80,$27,$F1,$0D,$2F,$27,$04   (.'q./'.
+L1578    fcb   $85,$5F,$27,$E9,$32,$61,$9E,$42   ._'i2a.B
+L1580    fcb   $31,$C8,$31,$D6,$44,$16,$FF,$2F   1H1VD../
+L1588    fcb   $32,$61,$34,$24,$17,$FF,$47,$35   2a4$..G5
+L1590    fcb   $24,$96,$20,$34,$02,$20,$D5,$32   $. 4. U2
+L1598    fcb   $61,$96,$04,$91,$07,$27,$21,$9C   a....'!.
+L15A0    fcb   $42,$24,$15,$DC,$03,$83,$00,$01   B$.\....
+L15A8    fcb   $DD,$03,$10,$83,$FF,$FF,$26,$02   ].....&.
+L15B0    fcb   $0A,$02,$17,$F2,$0F,$10,$9F,$1F   ...r....
+L15B8    fcb   $DC,$02,$DD,$05,$96,$04,$97,$07   \.].....
+L15C0    fcb   $17,$F2,$5C,$DC,$42,$83,$00,$01   .r\\B...
+L15C8    fcb   $DD,$14,$93,$12,$34,$04,$C4,$0F   ]...4.D.
+L15D0    fcb   $34,$04,$CB,$58,$D7,$10,$35,$04   4.KXW.5.
+L15D8    fcb   $86,$03,$3D,$CB,$25,$D7,$0E,$35   ..=K%W.5
+L15E0    fcb   $04,$C4,$F0,$54,$54,$54,$54,$CB   .DpTTTTK
+L15E8    fcb   $23,$D7,$0F,$17,$F1,$AE,$17,$F8   #W..q..x
+L15F0    fcb   $56,$17,$F1,$B2,$0F,$0F,$16,$FF   V.q2....
+L15F8    fcb   $60,$0D,$30,$10,$27,$F1,$0C,$17   `.0.'q..
+L1600    fcb   $F1,$8D,$30,$8D,$EB,$B2,$17,$F1   q.0.k2.q
+L1608    fcb   $50,$9E,$42,$10,$27,$FE,$87,$16   P.B.'...
+L1610    fcb   $FF,$6E,$17,$F1,$7A,$30,$8D,$EB   .n.qz0.k
+L1618    fcb   $AB,$17,$F1,$3D,$03,$18,$31,$C9   +.q=..1I
+L1620    fcb   $01,$D6,$DC,$49,$17,$F3,$36,$1F   .V\I.s6.
+L1628    fcb   $98,$17,$F3,$31,$DC,$4B,$17,$F3   ..s1\K.s
+L1630    fcb   $2C,$0F,$18,$1F,$98,$17,$F3,$25   ,.....s%
+L1638    fcb   $CC,$20,$20,$ED,$A1,$ED,$A1,$30   L  m!m!0
+L1640    fcb   $C9,$01,$D6,$9F,$27,$1F,$20,$93   I.V.'. .
+L1648    fcb   $27,$1F,$02,$17,$F1,$2A,$30,$8D   '...q*0.
+L1650    fcb   $EB,$87,$17,$F1,$04,$10,$8E,$00   k..q....
+L1658    fcb   $09,$17,$F4,$2D,$25,$B4,$CC,$20   ..t-%4L 
+L1660    fcb   $37,$17,$F1,$2E,$17,$F5,$9B,$10   7.q..u..
+L1668    fcb   $26,$F0,$A0,$9E,$45,$DE,$47,$C6   &p .E^GF
+L1670    fcb   $02,$96,$00,$10,$3F,$8E,$10,$25   ....?..%
+L1678    fcb   $F6,$3C,$9F,$49,$DF,$4B,$DE,$1B   v<.I_K^.
+L1680    fcb   $96,$49,$91,$02,$25,$0C,$26,$07   .I..%.&.
+L1688    fcb   $DC,$4A,$10,$93,$03,$23,$07,$16   \J...#..
+L1690    fcb   $F0,$63,$97,$02,$DC,$4A,$0D,$4C   pc..\J.L
+L1698    fcb   $26,$03,$83,$00,$01,$DD,$03,$10   &....]..
+L16A0    fcb   $83,$FF,$FF,$26,$EA,$0A,$02,$20   ...&j.. 
+L16A8    fcb   $E6,$96,$A5,$81,$10,$24,$24,$C6   f.%..$$F
+L16B0    fcb   $03,$3D,$30,$C9,$00,$A6,$30,$85   .=0I.&0.
+L16B8    fcb   $DC,$02,$ED,$81,$96,$04,$A7,$84   \.m...'.
+L16C0    fcb   $0D,$A5,$27,$0A,$A1,$1D,$26,$06   .%'.!.&.
+L16C8    fcb   $DC,$02,$A1,$1B,$27,$02,$0C,$A5   \.!.'..%
+L16D0    fcb   $16,$F0,$38,$17,$F0,$B9,$30,$8D   .p8.p90.
+L16D8    fcb   $EB,$51,$17,$F0,$7C,$17,$F1,$08   kQ.p|.q.
+L16E0    fcb   $20,$EE,$96,$A5,$27,$EA,$C6,$03    n.%'jF.
+L16E8    fcb   $3D,$C0,$03,$30,$C9,$00,$A6,$30   =@.0I.&0
+L16F0    fcb   $85,$EC,$81,$DD,$02,$A6,$84,$97   .l.].&..
+L16F8    fcb   $04,$0A,$A5,$16,$EF,$F7,$34,$76   ..%.ow4v
+L1700    fcb   $6F,$64,$A6,$63,$3D,$ED,$66,$EC   od&c=mfl
+L1708    fcb   $61,$3D,$EB,$66,$89,$00,$ED,$65   a=kf..me
+L1710    fcb   $E6,$E4,$A6,$63,$3D,$E3,$65,$ED   fd&c=cem
+L1718    fcb   $65,$24,$02,$6C,$64,$A6,$E4,$E6   e$.ld&df
+L1720    fcb   $62,$3D,$E3,$64,$ED,$64,$35,$F6   b=cdmd5v
+L1728    fcb   $34,$16,$86,$10,$34,$02,$4F,$5F   4...4.O_
+L1730    fcb   $68,$64,$69,$63,$59,$49,$10,$A3   hdicYI.#
+L1738    fcb   $61,$25,$04,$A3,$61,$6C,$64,$6A   a%.#aldj
+L1740    fcb   $E4,$26,$ED,$AE,$63,$32,$65,$39   d&m.c2e9
+L1748    fcb   $CC,$20,$34,$17,$F0,$44,$30,$8D   L 4.pD0.
+L1750    fcb   $EA,$B0,$17,$F0,$04,$31,$C9,$01   j0.p.1I.
+L1758    fcb   $D6,$34,$20,$DC,$97,$17,$F1,$FD   V4 \..q.
+L1760    fcb   $1F,$98,$17,$F1,$F8,$96,$99,$17   ...qx...
+L1768    fcb   $F1,$F3,$A6,$A2,$8A,$80,$A7,$A4   qs&"..'$
+L1770    fcb   $CC,$32,$34,$17,$F0,$1C,$AE,$E4   L24.p..d
+L1778    fcb   $17,$EF,$DE,$10,$AE,$E4,$DC,$9A   .o^..d\.
+L1780    fcb   $17,$F1,$DA,$1F,$98,$17,$F1,$D5   .qZ...qU
+L1788    fcb   $96,$9C,$17,$F1,$D0,$A6,$A2,$8A   ...qP&".
+L1790    fcb   $80,$A7,$A4,$CC,$3D,$34,$17,$EF   .'$L=4.o
+L1798    fcb   $F9,$35,$10,$17,$EF,$BB,$39,$29   y5..o;9)
+L17A0    fcb   $9A,$3F                           .?
+
+               ELSE
+
+         nam   dEd OS-9 Disk Editor Version 2.01
+         ttl   Copyright 1987 Doug DeMartinis
+
+*******************************************************
+* Copyright 1987 Doug DeMartinis; All Rights Reserved *
+*                CIS:    72245,1400                   *
+*                Delphi: DOUGLASD                     *
+* Personal use and uploading of code, source and docs *
+* to BBS's, as well as customization of the terminal  *
+* display codes, is permitted only if the copyright   *
+* notice and docs remain intact.                      *
+*                                                     *
+* 10/87 Various mods & fixes by Bruce Isted (BRI)     *
+* 11/87 Added Diddle, Find, Push, Remove routines.    *
+*       Fixed bug throwing stack off by going in and  *
+*        out of various error routines.               *
+*                                                     *
+*******************************************************
+*                                                     *
+* Mods by Roger A. Krupski (HARDWAREHACK)             *
+*                                                     *
+* 02/88 -Added "enter" command which cleans up the    *
+*        screen by running the REDO subroutine. (RAK) *
+*                                                     *
+* 01/90 -Added a check for the break key which allows *
+*        aborting the <F>ind function. (RAK)          *
+*       -Added a check for null filename in OUTFILE:  *
+*        and bypass I$Create if so.                   *
+*       -Other minor bugs fixed / errors trapped.     *
+*******************************************************
+
+         ifp1            
+         use   defsfile
+         endc            
+
+type     set   prgrm+objct
+revs     set   reent+1   
+
+top      mod   dEdend,dEdnam,type,revs,start,size
+
+**************************************************************************
+* To customize dEd for another driver, change the value of 'xyflipr',    *
+*    change co380 to FALSE and OTHER to TRUE, and make the appropriate   *
+*    changes to the display codes in the block that begins 'ifne OTHER'. *
+*    WordPak users only need to change co380 to FALSE and WPAK to TRUE.  *
+**************************************************************************
+
+* Set xyflipr to 1 if XY cursor move code has form: row,col
+* Set    "    to 0 "   "   "     "    "    "   "    col,row
+xyflipr  set   0          co380 uses $2,Col,Row to position cursor
+
+* Change one of the following lines to TRUE and others to FALSE,
+*  depending on which 80 column display you're using.
+
+co380    set   FALSE      Set to TRUE if using Mike Dziedzic's co380 driver
+WPAK     set   FALSE      Set to TRUE if using WordPak
+OTHER    set   TRUE       Set to TRUE for another driver and change codes below
+
+* Conditional assembly of terminal commands depending on previous choices:
+
+         ifne  OTHER     
+* e.g. CoCo 3, OS-9 Level II
+* Change the appropriate byte strings below for another driver
+
+xyflipr  set   0          Change to 1 if XY Cursor move code wants form Row,Col
+curscode set   $2         XY Cursor move code (max length=2 bytes)
+cls      fcb   $c         Clear Screen byte string
+clschrs  equ   *-cls      Don't change this.
+revvid   fcb   $1F,$20,0  Reverse Video byte string. Must end with a 0.
+revchrs  equ   *-revvid-1 Don't change this.
+normvid  fcb   $1F,$21,0  Normal Video byte string. MUST end with a 0.
+normchrs equ   *-normvid-1 Don't change this.
+eraselin fcb   4          Erase to End of Line byte string.
+eraschrs equ   *-eraselin Don't change this.
+erasescr fcb   $b         Erase to End of Screen byte string.
+era2chrs equ   *-erasescr Don't change this.
+
+* modification by BRI
+* adds cursor on/off strings & string lengths
+CursrOn  fcb   $05,$21,0  Cursor on string.  MUST end with a 0.
+CursOn   equ   *-CursrOn-1 Don't change this.
+CursrOff fcb   $05,$20,0  Cursor off string.  MUST end with a 0.
+CursOff  equ   *-CursrOff-1 Don't change this.
+* end modification
+
+         endc            
+
+         ifne  WPAK      
+* This is for WordPak driver
+
+xyflipr  set   1          cursor move wants row,col
+curscode set   $2         XY cursor move code
+cls      fcb   $c         clear screen code
+clschrs  equ   *-cls     
+revvid   fcb   $1b,$53,$21,0 reverse video toggle
+revchrs  equ   *-revvid-1 # chars in code string
+normvid  fcb   $1b,$53,$20,0 normal video toggle
+normchrs equ   *-normvid-1
+eraselin fcb   $1b,$41    erase to end of line
+eraschrs equ   *-eraselin
+erasescr fcb   $1b,$42    erase to end of screen
+era2chrs equ   *-erasescr
+
+* modification by BRI
+* adds cursor on/off strings & string lengths
+CursrOn  fcb   0          Cursor on string.  MUST end with a 0.
+CursOn   equ   *-CursrOn-1 Don't change this.
+CursrOff fcb   0          Cursor off string.  MUST end with a 0.
+CursOff  equ   *-CursrOff-1 Don't change this.
+* end modification
+
+         endc            
+
+         ifne  co380     
+* This is for co380 driver for CoCo3
+xyflipr  set   0          cursor move wants col,row
+curscode set   $2         1st byte of move cursor code
+cls      fcb   $c         clear screen code
+clschrs  equ   *-cls     
+revvid   fcb   0          reverse video not supported by co380
+revchrs  equ   *-revvid-1 # chars in code string
+normvid  fcb   0          Reverse video off not supported by co380
+normchrs equ   *-normvid-1
+eraselin fcb   4          erase to end of line
+eraschrs equ   *-eraselin
+erasescr fcb   $b         erase to end of screen
+era2chrs equ   *-erasescr
+
+* modification by BRI
+* adds cursor on/off strings & string lengths
+CursrOn  fcb   0          Cursor on string.  MUST end with a 0.
+CursOn   equ   *-CursrOn-1 Don't change this.
+CursrOff fcb   0          Cursor off string.  MUST end with a 0.
+CursOff  equ   *-CursrOff-1 Don't change this.
+* end modification
+
+         endc            
+
+***********************************************************************
+* All the changes for customizing dEd should be done above this line. *
+***********************************************************************
+
+
+* Don't change the following 2 blocks.
+* X,Y coordinates of various screen prompts
+         ifne  xyflipr   
+hedrpos  set   $2220      Header position (row/col)
+cmdpos   set   $3620      Command position
+cmd1pos  set   $3720      Command position + 1 row
+outpos   set   $2130      Output pathlist position
+modpos   set   $2030      Module name position
+offpos   set   $2058      Offset position
+xprtpos  set   $3435      EXPERT position
+
+         else            
+
+hedrpos  set   $2022     
+cmdpos   set   $2036      Command position
+cmd1pos  set   $2037      Command position + 1 row
+outpos   set   $3021      Output pathlist position
+modpos   set   $3020      Module name position
+offpos   set   $5820      Offset position
+xprtpos  set   $3534      EXPERT position
+         endc            
+
+****************************
+* Variable Storage
+****************************
+
+bufsiz   equ   120       
+MaxStack equ   16         maximum # sectors that can be 'pushed' onto stack
+
+inpath   rmb   1          input path #
+outpath  rmb   1          output path #
+lsn      rmb   3          Logical Sector number
+oldlsn   rmb   3          LSN backup
+offset   rmb   2          'Linked' module offset
+cursor   rmb   4          Move cursor code
+hexcol   rmb   1          Hex dump column #
+rownum   rmb   1          Row number (Hex 0-f)
+asciicol rmb   1          ASCII dump col #
+lastflag rmb   1          Flag for last line display
+buffptr  rmb   2          Pointer for input buffer
+edbufptr rmb   2          Edit buffer pointer
+edpos    rmb   1          Edit position counter for partial sector reads
+hexascii rmb   1          hex/ascii edit mode flag; 0=>Hex, FF=>ASCII
+zeroflag rmb   1          leading zero suppression flag, $FF=>Suppress
+oldecho  rmb   1          original echo status
+echobyte rmb   1          current echo status
+Usave    rmb   2          U register storage
+Ssave    rmb   2          S register storage
+seclen   rmb   2          sector length ($100 unless last LSN in file)
+vmodlen  rmb   2          Verify module length
+lmodlen  rmb   2          'Linked' module length
+fileln   rmb   2          cumulative file length
+bytsread rmb   2          bytes read during verify
+CRC      rmb   3          CRC accumulator for verify
+modnmlen rmb   1          'Link' module name length
+wrtflag  rmb   1          Flag to auto-write sector
+xprtflag rmb   1          Expert mode flag
+FHexAsc  rmb   1          'Find' Hex/Ascii mode flag
+targlen  rmb   1          length of string to find
+findstr  rmb   17         string to 'Find'
+FindPtr  rmb   2          pointer to byte to start next search at
+FBytes   rmb   1          # bytes left in target string
+HexBuff  rmb   4          scratch area for ASCII to Hex conversions
+FileLen  rmb   4          File length
+infile   rmb   30         linked module name
+outfile  rmb   30         Output filename
+
+* modification by BRI
+CrsrCnt  rmb   1          8-bit cursor toggle counter (bit 3 active)
+CrsrFlg  rmb   1          cursor toggle (initialized to 0)
+SgnlCode rmb   1          intercept routine signal code
+* end modification
+
+StackCnt rmb   1          # sectors on stack
+Stack    rmb   3*MaxStack room for 16 LSN's
+
+inbuff   rmb   256        input buffer
+i.o.buff rmb   bufsiz     input/output buffer
+         rmb   200        stack storage 
+size     equ   .          end of data area
+
+dEdnam   fcs   /dEd/     
+         fcb   3          version
+         fcc   /Copyright 1987 Doug DeMartinis/
+
+* Display messages
+
+lsntitle fcs   /LSN=$/   
+sect     fcs   /SECTOR = $/
+header   fcc   /      0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F    0 2 4 6 8 A C E /
+         fcb   $d        
+command  fcs   /CMD: /   
+edprompt fcs   "<BREAK> toggles HEX/ASCII edit modes     <ENTER> exits edit mode"
+zaprompt fcs   /Zap /    
+byte     fcs   /byte: /  
+char     fcs   /char: /  
+sure     fcs   "Are you sure? (Y/N) "
+writing  fcs   /Writing sector.../
+out$     fcs   /OUTFILE: /
+vrfymess fcs   /Verifying.../
+verrmess fcs   /Verify aborted.../
+shell$   fcs   /shell/   
+linkmess fcs   /Link to which module? /
+linkhdr  fcc   /Off  Len  Name/
+         fcb   $a        
+         fcc   /---- ---- ----/
+         fcb   $d        
+modnmhdr fcs   /MODULE:  /
+offmess  fcs   /OFFSET: $/
+xprtmess fcb   $1f,$24    cc3 blink on
+         fcc   /- Expert Mode -/
+         fcb   $1f,$25+$80 blink off
+findbyte fcs   /Find byte string $/
+findchar fcs   /Find char string: /
+srchmess fcs   /Searching.../
+lenmess  fcs   /Current File Length $/
+newmess  fcs   /New Length? $/
+fullmess equ   *         
+bell     fcb   7         
+         fcs   /Sector Stack Full /
+
+* modification by BRI
+* alphabetized help list,
+* removed redundant 'Close' message,
+* added prompt at end
+helper   fcc   "   Up/Down Arrows  Read & display Next/Previous sector"
+         fcb   $a,$a     
+         fcc   / <CR> Clean up the screen display/
+         fcb   $a        
+         fcc   /   $  Fork a SHELL (Ctrl-BREAK to return)/
+         fcb   $a        
+         fcc   /   A  Append displayed sector to output file/
+         fcb   $a        
+         fcc   /   C  Close output file/
+         fcb   $a        
+         fcc   /   D  Diddle (adjust) file length/
+         fcb   $a        
+         fcc   /   E  Edit the displayed sector/
+         fcb   $a        
+         fcc   /   F  Find a byte or text string (BREAK aborts)/
+         fcb   $a        
+         fcc   /   H  Help screen (also use '?')/
+         fcb   $a        
+         fcc   /   L  Link to a module - List all modules/
+         fcb   $a        
+         fcc   /   N  Next occurrence of byte(s) or string (Find)/
+         fcb   $a        
+         fcc   /   O  Open a file for output (use with Append)/
+         fcb   $a        
+         fcc   /   P  Push current sector onto stack/
+         fcb   $a        
+         fcc   /   Q  Quit dEd - Exit to OS9/
+         fcb   $a        
+         fcc   /   R  Remove and display a sector from stack/
+         fcb   $a        
+         fcc   /   S  Skip to given sector (sector # in hex)/
+         fcb   $a        
+         fcc   /   U  Unlink from module/
+         fcb   $a        
+         fcc   /   V  Verify all modules in file/
+         fcb   $a        
+         fcc   /   W  Write the sector back to the disk/
+         fcb   $a        
+         fcc   "   X  eXpert mode toggle on/off"
+         fcb   $a        
+         fcc   /   Z  Zap (fill in) the sector displayed/
+         fcb   $a,$a     
+         fcc   /      (Press any key to return to command prompt):/
+*fcb $a
+helpchrs equ   *-helper  
+* end modifications
+
+hints    fcc   /Use:  dEd <pathlist>/
+         fcb   $0d       
+
+* Table for converting Hex to Decimal
+
+decimals fcb   $98,$96,$80 Decimal 10,000,000
+         fcb   $0f,$42,$40 Decimal 1,000,000
+         fcb   $01,$86,$A0 Decimal 100,000
+         fcb   $00,$27,$10 Decinal 10,000
+         fcb   $00,$03,$E8 Decimal 1,000
+         fcb   $00,$00,$64 Decimal 100
+         fcb   $00,$00,$0A Decimal 10
+         fcb   $00,$00,$01 etc.
+
+commands fcb   $c         up arrow
+         fdb   nxtsec    
+         fcb   $a         down arrow
+         fdb   prevsec   
+         fcb   '$         shell
+         fdb   goshell   
+         fcb   $d         c/r clean up screen
+         fdb   redo      
+         fcb   's         LSN change
+         fdb   changLSN  
+         fcb   'z         zap
+         fdb   zap       
+         fcb   'w         write sector
+         fdb   writesec  
+         fcb   'o         open output file
+         fdb   openout   
+         fcb   'a         append to out file
+         fdb   append    
+         fcb   'c         close out file
+         fdb   closeout  
+         fcb   'e         edit sector
+         fdb   edit      
+         fcb   'q         quit
+         fdb   quit      
+         fcb   'v         verify
+         fdb   verify    
+         fcb   'l         'link' to module
+         fdb   linker    
+         fcb   'u         'unlink' module
+         fdb   unlinker  
+         fcb   'x         Expert mode
+         fdb   expert    
+         fcb   'h         Help
+         fdb   help      
+         fcb   '?        
+         fdb   help      
+         fcb   'f        
+         fdb   find      
+         fcb   'n        
+         fdb   next      
+         fcb   'd        
+         fdb   diddle    
+         fcb   'p        
+         fdb   push      
+         fcb   'r        
+         fdb   remove    
+         fcb   0          end of table
+
+* Intercept signals
+* modification by BRI
+*icept  rti
+icept    stb   SgnlCode,u save signal code
+         rti             
+* end modification
+
+
+start    equ   *          entry point
+
+         stx   inbuff     save pointer to param
+         leax  icept,pcr  intercept routine addr
+         os9   f$icpt     set up intercept
+         lbcs  error     
+
+* Initialize data area
+
+         clra            
+         ldb   #inbuff    # bytes to clear
+         leax  ,u         point X to start of data area
+init     sta   ,x+        zero memory
+         decb             dec counter
+         bne   init       loop if not done
+         stu   Usave      save U register
+         sts   Ssave      save Stack pointer
+
+setcurs  ldd   #curscode  cursor move code
+         std   cursor     save it for output
+         leas  -32,s      make room for terminal options
+         leax  ,s         point x to 32 byte buffer
+         clra             path = 0 (stdin)
+         clrb             (SS.OPT - option status)
+         os9   i$getstt   read in option table
+         lbcs  error     
+         lda   4,x        get echo status byte
+         sta   oldecho    save it
+         leas  32,s       reset stack
+
+* Open file
+
+         ldx   inbuff     pointer to file name
+         lda   #updat.    mode=update
+         os9   i$open     open file
+
+* modification by BRI
+* lbcs bye exit if error
+         bcc   OpenOK    
+         cmpb  #E$FNA     no permission?
+         lbne  bye        no, go exit with error
+         ldx   inbuff     pointer to file name
+         lda   #DIR.+UPDAT. mode=directory+update
+         os9   I$Open     open file
+         lbcs  bye        exit if error
+OpenOK   equ   *         
+* end modification
+
+         sta   inpath     save input path #
+         ldb   #ss.size  
+         os9   i$getstt   get file size
+         stx   FileLen    save
+         stu   FileLen+2 
+         ldu   Usave      restore U
+         clr   echobyte   no echo flag
+         lbsr  echo       set echo status
+         lbsr  clrscr     go clear screen
+
+* Main Read/Display loop
+
+readloop lbsr  seeksec    find sector & read it
+         sty   seclen     bytes read ($100 unless last LSN in file)
+         ldd   lsn        get lsn just read
+         std   oldlsn     & save it
+         lda   lsn+2      for retrieval
+         sta   oldlsn+2   after read errors
+         ldd   #0         Signal 'Next' command to start
+         std   findptr    search at start of LSN
+disploop lbsr  display    go display sector
+getcmd   lbsr  movecmd    move cursor
+         leax  command,pcr point to 'CMD: '
+         bsr   pstring    display line
+         leax  erasescr,pcr erase to end of screen
+         ldy   #era2chrs 
+         os9   i$write   
+         lbcs  error     
+         leax  i.o.buff,u point to buffer to read into
+         lbsr  read1      read a char from stdin
+         lda   ,x         get char read
+         cmpa  #'A        alpha char?
+         blo   srchtabl   no, leave it alone
+         ora   #$20       else UPPER -> lower case
+srchtabl leax  commands,pcr point to command table
+findcmd  cmpa  ,x+        got command?
+         beq   gotcmd     yes, bra
+         leax  2,x        else, skip address
+         tst   ,x         end of table?
+         bne   findcmd    no, loop back
+         bra   getcmd     key invalid, exit
+gotcmd   tst   xprtflag   expert mode?
+         beq   jmpcmd     no, bra
+         tst   wrtflag    need to write buffer out
+         beq   jmpcmd     no, bra
+         pshs  x,a       
+         lbsr  xprtwrt    write sector
+         puls  a,x       
+jmpcmd   ldd   ,x         get address offset
+         leax  top,pcr    start of module
+         jmp   d,x        jump to offset addr
+
+
+* Print string of characters having bit 7 of last char set
+
+pstring  leay  i.o.buff,u output buffer
+         clrb             counter
+xfer     incb            
+         lda   ,x+        get char
+         bmi   lstchar    bra if bit 7 set
+         sta   ,y+        put in buffer
+         bra   xfer       get more
+lstchar  anda  #$7f       clr bit 7
+         sta   ,y         put in buffer
+         leax  i.o.buff,u point to char string
+         clra            
+         tfr   d,y        y= length of string
+         bra   writeout  
+
+wrtlin1  ldy   #bufsiz    write 200 chars max
+writeout lda   #1         stdout
+wrtlin2  os9   i$writln   write line
+         lbcs  error     
+         rts             
+
+readlin3 ldy   #3         # chars to read
+readlin  clra             stdin
+         os9   i$readln   read in Y-1 chars + CR
+         lbcs  error     
+         rts             
+
+movecmd  ldd   #cmdpos   
+movecurs leax  cursor,u   point to cursor move code
+         std   2,x        save row/col
+         ldy   #4         4 chars
+         bra   writeout  
+
+* Set display to reverse video
+
+revdisp  leax  revvid,pcr point to code
+         ldy   #revchrs   # chars
+         bra   writeout   write to stdout
+
+* Set display to normal video
+
+normdisp leax  normvid,pcr point to code
+         ldy   #normchrs  # chars
+         bra   writeout   write to stdout
+
+
+clrline  leax  eraselin,pcr point to erase line code
+         ldy   #eraschrs  # chars
+         bra   wrtlin2    go erase rest of line & return
+
+clrscr   leax  cls,pcr    point to clear screen code
+         ldy   #clschrs   #chars
+         bra   writeout   clear screen & return
+
+seeksec  bsr   lsnseek    seek to sector
+         leax  inbuff,u   point to buffer
+         stx   buffptr    save pointer
+         tst   infile     module linked?
+         beq   read256    no, bra
+         ldd   lmodlen    linked mod length
+         suba  lsn+2      >$100 bytes left?
+         bne   read256    yes, bra
+         tfr   d,y        no, set up for smaller read
+         bra   readsome  
+read256  ldy   #$100      read 256 bytes
+readsome lda   inpath     path #
+read     os9   i$read     read them in
+         lbcs  error     
+         rts             
+
+******************************
+* changed to ignore errors 01/09/90 (RAK)
+*
+read1                    
+         clra             stdin
+         ldy   #1         get 1 byte
+         os9   I$Read     get 1 byte
+         rts              ignore any errors
+* bra read
+****************************** END of modification
+
+lsnseek  tst   infile     module linked?
+         bne   offchk     yes, bra
+         ldx   lsn        x=lsn MS 16 bits
+         lda   lsn+2      get 3rd byte of lsn
+         clrb            
+lsnseek1 tfr   d,u        u=LS 16 bits
+         lda   inpath     get input path #
+         os9   i$seek     seek lsn
+         lbcs  error     
+         ldu   usave      restore U
+lsnrts   rts             
+
+offchk   ldd   lmodlen    linked mod length
+         subd  #1         now A=LSN of last sector
+         cmpa  LSN+2      trying to read past last sector?
+         bhs   offseek    no, bra
+         ldb   #e$eof     yes, set EOF error
+         lbra  error     
+* If module is 'linked' must add offset to functional LSN ->true seek count
+offseek  ldd   offset    
+         adda  lsn+2      offset + 'LSN'
+         ldx   #0        
+         bra   lsnseek1   seek to 'LSN'
+
+display  ldd   #$2020    
+         lbsr  movecurs  
+         leax  lsntitle,pcr point to "lsn..."
+         lbsr  pstring   
+         bsr   clrline    clear rest of line
+         bsr   convert3   convert lsn to ascii/dec
+         leax  i.o.buff,u
+         lbsr  wrtlin1   
+
+         tst   infile     is a module 'linked'?
+         beq   nolink     no, bra
+         lbsr  prntmod    yes, display name
+
+nolink   tst   outpath    is an output file open?
+         beq   noout      no, bra
+         lbsr  prntout    yes, print name
+
+noout    ldd   #hedrpos   get header row/col
+         lbsr  movecurs   move cursor
+         leax  revvid,pcr point to reverse video code
+         ldy   #revchrs   # chars
+         lbsr  wrtlin2   
+         leax  header,pcr point to header
+         lbsr  wrtlin1    display it
+         leax  normvid,pcr point to normal vid code
+         ldy   #normchrs  # chars
+         lbsr  wrtlin2    write code out
+disp     lbsr  dsplylin  
+         lda   rownum     get row #
+         adda  #$10       next row
+         sta   rownum     save it
+         bne   disp       do 16 rows
+         leax  inbuff,u  
+         stx   buffptr    reset buffer pointer
+         tst   xprtflag   Expert mode?
+         beq   lsnrts     no, return
+         ldd   #xprtpos  
+         lbsr  movecurs  
+         leax  xprtmess,pcr
+         lbra  pstring    display 'EXPERT' & return
+
+* Convert 3 HEX bytes to ASCII
+
+convert3 ldd   lsn        get 2 MSB's of LSN
+         com   zeroflag   suppresw leading zeroes
+         leay  i.o.buff,u point to output buffer
+         bsr   convert1   convert byte in A to ascii
+         tfr   b,a       
+         bsr   convert1   and convert 2nd byte
+         clr   zeroflag   stop suppressing leading 0's
+         lda   lsn+2      get LSB of LSN
+         bsr   convert1   and convert it
+         ldd   #$2020     2 space
+         std   ,y++       put in out buffer
+
+*   Output LSN as decimal number
+
+         ldd   #$0008     8 dec digits max, 0=counter
+         pshs  d          save them
+         com   zeroflag   suppress leading zeroes
+         leax  decimals,pcr point to conversion table
+initsub1 clr   ,s         set counter = 0
+subdec1  ldd   lsn+1      get LSB's of LSN
+         subd  1,x        subtract LSB's of table entry
+         pshs  cc         save 'carry'
+         std   lsn+1      save result
+         lda   lsn        get MSB
+         clrb             flag for enough subtractions
+         suba  ,x         subtract MSB of LSN
+         bcc   LSBborow   if no 'borrow', see if LSB sub needed borrow
+         incb             else, enough subs done
+LSBborow puls  cc         restore LSB 'borrow' flag
+         bcc   savemsb    save byte if borrow not needed
+         suba  #1         else do borrow, setting flags
+savemsb  sta   lsn        save MSB
+         bcc   chekenuf   bra if no borrow needed by last dec
+         incb             else set flag ->enuf subs done
+chekenuf tstb             enuf subs done?
+         bne   enufsub1   Yes, bra
+         inc   ,s         else, inc decimal counter
+         bra   subdec1    and do more subtractions
+enufsub1 ldd   lsn+1      get value
+         addd  1,x        make it positive again
+         std   lsn+1      and save
+         lda   lsn        get MSB
+         bcc   addmsb     'Carry' bit still valid from 'addd 1,x'
+         inca             do carry from LSB's
+addmsb   adda  ,x         make rest of remainder positive
+         sta   lsn        and save it for next round of sub
+         leax  3,x        point X to next table entry
+         bsr   decascii   go convert decimal counter to ascii
+         dec   1,s        dec counter (8 digits)
+         beq   getCR      Yes, exit
+         lda   1,s        down to last 2 digits?
+         cmpa  #2        
+         bne   initsub1   no, loop back
+         clr   zeroflag   else stop suppressing leading 0's
+         bra   initsub1  
+
+getCR    lda   #$d        <CR>
+         sta   ,y         put in out string
+         ldd   oldlsn+1   restore LSN
+         std   lsn+1     
+         lda   oldlsn    
+         sta   lsn       
+         puls  d,pc      
+
+* Convert HEX byte in A to ASCII and put in buffer (Y)
+
+convert1 pshs  a          save byte
+         lsra             shift msn to lsnibble
+         lsra            
+         lsra            
+         lsra            
+         bsr   objasc    
+         puls  a          get byte back
+         anda  #$0f       mask off msb
+         bsr   objasc     convert if to ascii
+         rts             
+objasc   cmpa  #9         digit?
+         ble   asciify    yes, make it ascii
+         adda  #7        
+asciify  adda  #$30       makes it ascii
+         sta   ,y+        and put it in buffer
+         tst   zeroflag   suppressing leading zeroes?
+         beq   convdone   no, exit
+         cmpa  #'0        was it a zero?
+         beq   suppres0   Yes, go 'erase' it
+         clr   zeroflag   No, so stop suppressing 0's
+convdone rts             
+suppres0 leay  -1,y       reset pointer back over zero
+         rts             
+
+* Convert object decimal # on stack to ASCII & put in buffer (Y)
+
+decascii pshs  a          save this
+         lda   3,s        get decimal counter
+         bsr   asciify    make it ascii
+         puls  a,pc       get byte back & return
+
+
+dsplylin leay  i.o.buff,u point to output buffer
+         leax  revvid,pcr
+         lbsr  transfer   put in reverse video code
+         lda   seclen+1   LSB of # bytes read
+         beq   notlast    skip ahead if 0 (seclen=$100)
+         anda  #$f0       mask off LSB
+         cmpa  rownum     current display row = last?
+         bne   notlast    no, go on
+         lda   #$ff      
+         sta   lastflag   signal last line
+notlast  lda   rownum     get row number
+         bsr   convert1   convert it to hex byte
+         lda   #':       
+         sta   ,y+       
+         leax  normvid,pcr point to code
+         bsr   transfer   move code to buffer
+         ldd   #$2020     spaces
+         std   ,y++      
+         ldx   buffptr    get buffer pointer
+         ldb   #$10       16 bytes
+         tst   lastflag   last line?
+         beq   cnvrtbyt   no, bra
+         ldb   seclen+1   bytes read
+         andb  #$0f       now B=bytes for lst line
+         beq   noline     bra if no bytes left
+         pshs  b          save this
+cnvrtbyt lda   ,x+        get byte from buffer
+         bsr   convert1   convert it to hex
+         lda   #$20       space
+         sta   ,y+        put in output buffer
+         decb             done?
+         bne   cnvrtbyt   No, do more
+         tst   lastflag   lst line?
+         beq   addspc2    no, bra
+         ldd   #$0310     B=max bytes on line
+         subb  ,s         b=# bytes to null out
+         mul              3 spaces per byte
+         lda   #$20       space
+addspc1  sta   ,y+        put in buffer
+         decb             done?
+         bne   addspc1   
+addspc2  ldb   #$20       space
+         std   ,y++      
+         sta   ,y+        output spaces
+         ldx   buffptr    get buff pointer again
+         asrb             b=$10 (16 bytes)
+         tst   lastflag   lst line?
+         beq   ascichar   no, bra
+         ldb   ,s         yes, get # bytes from prior calc
+ascichar lda   ,x+        get byte
+         anda  #$7f       clear bit 7
+         cmpa  #$20       <32?
+         bhs   printabl   yes, print as is
+notascii lda   #'.        Non-ascii char
+printabl sta   ,y+        put in buff
+         decb             done?
+         bne   ascichar  
+         stx   buffptr    save new buffer pointer
+         tst   lastflag   last line?
+         beq   addCR      no, bra
+         ldb   #$10       max bytes per line
+         subb  ,s+        b=bytes to null out
+         lda   #$20       space
+addspc3  sta   ,y+        put in buffer
+         decb            
+         bne   addspc3   
+         lda   #$f0       last row num
+         sta   rownum     -> displays no more rows
+         bsr   addCR      display line
+resetlst clr   lastflag   reset flag
+         leax  erasescr,pcr point to erase to end of screen code
+         ldy   #era2chrs  length of string
+         lbra  writeout   erase end of screen & return
+addCR    lda   #$d        <CR>
+         sta   ,y        
+         leax  i.o.buff,u
+         lbra  wrtlin1    go display this line & return
+
+transfer lda   ,x+        get byte
+         beq   trandone   exit if done
+         sta   ,y+        move it
+         bra   transfer   do more
+trandone rts              return
+
+noline   lda   #$f0      
+         sta   rownum     signal last row
+         bra   resetlst   go erase rest of screen
+
+
+* Point to next LSN in file
+
+nxtsec   ldd   lsn+1      get 2 lower bytes of lsn
+         addd  #1         next lsn
+         std   lsn+1      save it
+         bne   readsec    d<>0 => carry not needed
+         inc   lsn        else add carry to MSB of LSN
+readsec  lbra  readloop   go read next sector
+
+* Point to previous LSN unless at LSN 0 now
+
+prevsec  ldd   lsn+1      get lsn
+         bne   notfirst   <>0 => not LSN 0
+         tst   lsn        LSN 0?
+         lbeq  getcmd     yes, exit
+notfirst subd  #1         else dec LSN
+         std   lsn+1      save it
+         cmpd  #$ffff     borrow needed if LSN was $xx0000
+         bne   readsec    if not, go read
+         dec   lsn        do 'borrow'
+         bra   readsec    go read previous sector
+
+
+* Change LSN sub
+
+changLSN lbsr  movecmd   
+         leax  sect,pcr   display message
+         lbsr  pstring   
+         ldy   #7         max # chars to read
+         bsr   MakeHex    read & convert them
+         bcs   BadLSN    
+         ldd   HexBuff+2  get new LSN from buffer
+         std   lsn+1     
+         lda   HexBuff+1 
+         sta   lsn       
+         lbra  readloop   go read/display new LSN
+
+BadLSN   lbsr  beep      
+         bra   changLSN  
+
+MakeHex  pshs  y          save # bytes to read
+         clr   echobyte  
+         com   echobyte   echo on
+         lbsr  echo       set echo
+         puls  y         
+         leax  i.o.buff,u point to buffer
+         lbsr  readlin    read chars from keyboard
+         clr   echobyte  
+         lbsr  echo       echo off
+         leay  -1,y       strip off CR
+         beq   ExitHex    exit if no chars input
+         tfr   y,d        # of bytes read -> B
+CheckHex lda   ,x+        get char
+         bsr   hexdigit   see if it's valid char
+         bcs   invalid    if not, beep & redo
+         decb             done?
+         bne   CheckHex  
+         sty   HexBuff    save counter for now
+getascii lda   #'0        leading zero, if needed
+         ldb   ,-x        get a char
+         leay  -1,y       last one?
+         beq   cnvrt2     yes, bra
+         lda   ,-x        else, get next char in A
+         leay  -1,y       dec counter
+cnvrt2   bsr   asciihex   convert ascii chars in A/B to hex byte
+         pshs  b          save hex byte
+         cmpy  #0         all done?
+         bne   getascii   no, do more
+         ldb   HexBuff+1  else, get # ascii chars 1st read
+         incb             get ready for divide
+         lsrb             divide by 2 -># of HEX bytes
+         clra             leading 0
+         leax  HexBuff,u  point to storage
+         cmpb  #4         4 hex bytes on stack?
+         beq   hexstack   yes, no leading zeroes needed
+         sta   ,x+        else, put in leading 0
+         cmpb  #3         3 hex bytes on stack?
+         beq   hexstack   yes, no more 0's needed
+         sta   ,x+        else, put in 0
+         cmpb  #2         2 hex bytes?
+         beq   hexstack   yes, bra
+         sta   ,x+        else, put in another 0
+hexstack puls  a          get a hex byte off stack
+         sta   ,x+        and put in templsn
+         decb             done?
+         bne   hexstack   no, bra
+         clrb             clear carry bit
+         rts             
+
+invalid  lbsr  beep      
+coma     set   carry      bit
+rts                      
+
+ExitHex  leas  2,s        strip off return address
+         lbra  getcmd     exit
+
+hexdigit cmpa  #'0        char <0?
+         blo   nothex     yes, bra
+         cmpa  #'9        char <9 (digit)?
+         bls   ishex      yes, bra
+         anda  #$5f       lower->UPPER case
+         cmpa  #'F        char >F?
+         bhi   nothex     yes, bra
+         cmpa  #'A        char <A?
+         blo   nothex     yes, bra
+ishex    clra             clear carry bit if char is hex
+         rts             
+nothex   coma             set carry bit if not hex char
+         rts             
+
+asciihex bsr   hexnib     convert B to LSNibble
+         pshs  b          save LSNib
+         tfr   a,b        get ready for MSN
+         bsr   hexnib     convert it
+         aslb             shift LSNib to MSN
+         aslb            
+         aslb            
+         aslb            
+         orb   ,s+        add in LSNib from stack
+         rts             
+
+hexnib   subb  #$30       convert asci # to hex
+         cmpb  #$9        <=9?
+         bls   nowhex     yes, bra
+         andb  #$5f       lower->UPPER case
+         subb  #7         else sub 7 or $A$F
+nowhex   rts             
+
+* Zap sector sub
+
+zap                      
+         clr   echobyte  
+         com   echobyte   echo on
+         lbsr  echo       set echo
+         lbsr  movecmd   
+         lbsr  clrline    clear line
+         leax  zaprompt,pcr point to 'Zap '
+         lbsr  pstring    print it
+         tst   hexascii   ascii mode?
+         bne   zapascii   yes, bra
+         leax  byte,pcr   point to 'byte: '
+         lbsr  pstring    print it
+         ldy   #3         2 chars + CR
+         bsr   zapread    read in chars
+         bsr   hexobjct   convert to object
+         bcs   exitzap    exit if invalid chars
+zapstart leax  inbuff,u   point to data buffer
+         stx   buffptr    new pointer
+         clrb             counter
+zapbuff  sta   ,x+        do zap
+         decb             done?
+         bne   zapbuff    no, loop
+         clr   echobyte   echo off
+         lbsr  echo       set echo
+         inc   wrtflag    signal for auto-write if expert mode
+         lbra  disploop   display zapped buffer
+
+zapread  clra             stdin
+         leax  i.o.buff,u point to buffer
+         os9   i$readln   read in line
+         bcs   cheksig1   check for break key if error
+         rts              else return
+cheksig1 cmpb  #2         break key signal?
+         lbne  error      no, process error
+         com   hexascii   yes, toggle hex/ascii flag
+         leas  2,s        pull return addr off stack
+         bra   zap        redo routine
+
+exitzap  clr   echobyte   echo off
+         lbsr  echo      
+         lbra  getcmd     get new command
+
+zapascii leax  char,pcr   point to 'char: '
+         lbsr  pstring    print it
+         ldy   #2         1 char + CR
+         bsr   zapread    read in char
+         lda   ,x         get char
+         cmpa  #$20       valid ascii char?
+         blo   exitzap    no, exit
+         bra   zapstart   go do zap
+
+* Convert 2 hex chars in buffer (X) to object byte
+
+hexobjct bsr   cnvrtnib   convert 1st nibble
+         bcs   badrts     exit if bad char
+         tfr   a,b        save 1st byte (MS nibble)
+         bsr   cnvrtnib   convert 2nd nibble
+         bcs   badrts     exit if bad char
+         aslb             shift LS nib to MS nib
+         aslb            
+         aslb            
+         aslb            
+         pshs  b          save
+         ora   ,s+        add MS nib to LS nib
+         bra   goodhex    exit
+
+cnvrtnib bsr   isithex    is it valid char?
+         bcs   badrts     no, exit
+         bra   cnvrthex   yes, convert it to object
+
+isithex  lda   ,x+       
+         cmpa  #'0        <0?
+         blo   badhex     yes, bra
+         cmpa  #'9        <9?
+         bls   goodhex    yes, bra
+         anda  #$5F       lower->UPPER case
+         cmpa  #'A        <A?
+         blo   badhex     yes, bra
+         cmpa  #'F        >F?
+         bhi   badhex     yes, bra
+goodhex  andcc  #$FE       clear carry bit if valid
+         rts             
+badhex   orcc  #1         set carry bit if invalid
+badrts   rts             
+
+cnvrthex suba  #$30       convert char to object
+         cmpa  #9         decimal digit?
+         bls   nowobjct   yes, done
+         suba  #7         else, A-F
+nowobjct bra   goodhex    clear carry & return
+
+* Write current sector back to disk
+
+writesec tst   xprtflag   expert mode on?
+         lbne  getcmd     yes, exit
+         bsr   rusure     Sure?
+         lbne  getcmd     no, exit
+         lbsr  movecmd   
+         lbsr  clrline    clear line
+         lbsr  movecmd   
+         leax  writing,pcr point to message
+         lbsr  pstring    display it
+xprtwrt  lbsr  lsnseek    seek to start of sector
+         lda   inpath     get path #
+         lbsr  write100   write out sector
+         tst   xprtflag   doing auto-write
+         beq   opendone   no, go to getcmd
+         clr   wrtflag    signal no more auto-write
+         rts              else & return to caller
+
+* Ask 'Are you sure?' and get response
+
+rusure   lbsr  movecmd   
+rusure10                 
+         clr   echobyte  
+         com   echobyte   echo on
+         lbsr  echo       set echo
+         leax  sure,pcr   point to 'Sure? '
+         lbsr  pstring    print it
+         lbsr  clrline    blank rest of line
+         leax  i.o.buff,u input buffer
+         lbsr  read1      read answer
+         clr   echobyte   echo off
+         lbsr  echo       set echo
+         lda   ,x         get response
+         anda  #$5f       lower->UPPER case
+         cmpa  #'Y        set flags
+         rts             
+
+* Open output file sub
+
+openout  tst   outpath    is a file open already?
+         bne   opendone   yes, exit
+         clr   echobyte  
+         com   echobyte   echo on
+         lbsr  echo       set echo
+         lbsr  movecmd    position cursor
+         leax  out$,pcr   point to prompt
+         lbsr  pstring    print it
+         lbsr  clrline    clear rest of line
+         leax  i.o.buff,u point to input buffer
+         ldy   #30        29 chars + CR
+         lbsr  readlin    read in a line (pathlist)
+         clr   echobyte   echo off
+         lbsr  echo       set echo
+
+***********************************************
+* Return to command prompt if no filename given
+* Added 01/09/90 (RAK)
+*
+         cmpy  #1         <enter> only pressed?
+         beq   opendone   yes, abort
+*
+********************************** END modification
+
+         pshs  x          save pointer to pathlist
+         leay  outfile,u  point to storage area
+savname  lda   ,x+        get a char from name
+         sta   ,y+        save it
+         cmpa  #$20       space or CR?
+         bhi   savname   
+         lda   #$0d       CR
+         sta   -1,y       delimit filename
+         puls  x          restore pointer to name
+         lda   #write.    Access mode = Write
+         ldb   #%00001011 attr ----R-wr
+         os9   I$Create   create & open file
+         bcs   error      exit if error
+         sta   outpath    save output path #
+         bsr   prntout   
+opendone lbra  getcmd     exit
+
+* move cursor & print 'Output pathlist'
+
+prntout  ldd   #outpos   
+         lbsr  movecurs  
+         leax  out$,pcr   point to 'OUTFILE:'
+         lbsr  pstring    print it
+         leax  outfile,u  point to name
+         lbra  wrtlin1    write name & return
+
+
+* Write out a sector
+
+write100 leax  inbuff,u   point to data
+         ldy   seclen     # chars in sector
+         os9   i$write    write sector
+         bcs   error     
+         rts             
+
+* Close output file sub
+
+closeout lda   outpath    get output path #
+         beq   opendone   exit if none open
+         os9   i$close    close it
+         bcs   error     
+         ldd   #outpos   
+         lbsr  movecurs  
+         lbsr  clrline   
+         clr   outpath    flag no output file open
+closed   bra   opendone   exit
+
+* Append sector to output file sub
+
+append   lda   outpath    get output path #
+         beq   closed     exit if no file open
+         bsr   write100   write sector out
+         lbra  nxtsec     read in next sector & display it
+
+
+* ERROR handling routine
+
+error    pshs  b          save error code
+
+* modification by BRI
+         clr   <SgnlCode  clear intercept routine signal code
+* end modification
+
+         ldd   oldlsn     MSBs of last LSN read
+         std   lsn        make it current LSN
+         lda   oldlsn+2   LSB of last LSN
+         sta   lsn+2      move it
+         puls  b          error code
+         lds   Ssave      restore Stack pointer
+         cmpb  #2         break?
+         beq   endexit    yes, don't worry
+         cmpb  #3         shift break?
+         bne   eofchk     no check if EOF
+         clr   wrtflag    cancel auto-write
+         bra   endexit   
+eofchk   cmpb  #e$eof     EOF error?
+         bne   true.err   exit
+endexit  lbra  exitzap   
+true.err cmpb  #e$bmid    bad module ID error?
+         bne   othererr   no, bra
+* If module is linked, BMID error must come from trying to Verify modules
+* use standard error reporting routine. Otherwise BMID error occurs when
+* trying to link (or list names of) modules; need to clear screen after these.
+         tst   infile     module linked?
+         bne   othererr   yes, use std error routine
+         bsr   prterr     else display error #
+         leax  cls,pcr   
+         ldy   #clschrs  
+         lbsr  writeout   clear screen
+         lbra  disploop   & redisplay sector
+othererr pshs  b          save error code
+         lbsr  movecmd    position cursor
+         lbsr  clrline   
+         puls  b          pull error code
+         bsr   prterr     print error # on cmd line
+         lbra  getcmd    
+
+* Display error #
+
+prterr   lda   #2         error out path
+         os9   f$perr     print error #
+         clr   echobyte   echo off
+         lbsr  echo      
+
+         leax  i.o.buff,u point to input buffer
+         lbra  read1      wait for keypress & return
+
+* Exit with usage prompt if no pathname called
+
+badcall                  
+         lda   #2         errout
+         leax  hints,pcr 
+         ldy   #bufsiz   
+         lbsr  wrtlin2   
+         ldb   #e$bpnam   set bad path error
+         bra   bye       
+
+* Exit to OS9
+
+quit     lda   oldecho    get original echo status
+         sta   echobyte   reset echo
+         lbsr  echo       to original status
+         clrb             no error
+bye      os9   f$exit     exit program
+
+* Edit sector sub
+
+edit     lbsr  movecmd   
+         leax  edprompt,pcr point to prompt
+         lbsr  pstring   
+topleft  leax  inbuff,u   point to data buffer
+         stx   edbufptr   save pointer
+         lda   #1         init position counter
+         sta   edpos     
+         lda   #$23       top row code
+         sta   rownum     save
+         lda   #$25       1st hex dump col #
+         sta   hexcol     save
+         lda   #$58       1st ascii dump col
+         sta   asciicol  
+
+revbyte  lbsr  revdisp    set reverse video
+         bsr   eddisply   display byte
+
+         ifne  xyflipr   
+edinput  lda   rownum     A=row
+         ldb   hexcol     B=col
+         else            
+
+edinput  lda   hexcol     A=col
+         ldb   rownum     B=row
+         endc            
+
+         tst   hexascii   Hex mode?
+         beq   hexin      yes, bra
+
+         ifne  xyflipr   
+         ldb   asciicol   else B= ASCII col
+         else            
+
+         lda   asciicol   A= ASCII col
+         endc            
+
+hexin    lbsr  movecurs   position cursor
+         leax  i.o.buff,u
+         tst   hexascii   ascii mode?
+         lbne  inputchr   yes, bra
+
+* modification by BRI
+* bra inputbyt
+         lbra  inputbyt  
+* end modification
+
+* Sub to do Hex and ASCII dump for byte to be editted
+
+         ifne  xyflipr   
+eddisply lda   rownum     A=row
+         ldb   hexcol     b= hex column
+         else            
+
+eddisply lda   hexcol     A=Hex column
+         ldb   rownum     B=row
+         endc            
+
+         lbsr  movecurs   position cursor
+         leay  i.o.buff,u point to output buff
+         lda   [edbufptr,u] get byte
+         pshs  a          save it
+         lbsr  convert1   convert to hex, put in buff
+         leax  -2,y       reset pointer to hex chars
+         ldy   #2         2chars
+         lda   #1         stdout
+         lbsr  wrtlin2    display chars
+
+         ifne  xyflipr   
+         lda   rownum     same row
+         ldb   asciicol   get ascii dump col #
+         else            
+
+         lda   asciicol   ascii dump col #
+         ldb   rownum     same row
+         endc            
+
+         lbsr  movecurs   position cursor
+         puls  a          get byte again
+         anda  #$7F       clear bit 7 for ascii dump
+         cmpa  #$20       printable?
+
+         bhs   prntabl1   yes, bra
+         lda   #'.        else print as '.'
+prntabl1 leax  i.o.buff,u ouput buffer
+         sta   ,x         put char in buff
+         ldy   #1         1 char
+         lbra  writeout   display char & return
+
+* Read in a character; check for BREAK key
+
+* modification by BRI
+* toggles cursor on/off if enabled, checks for character
+*readit ldy #1 1 char
+readit   pshs  b,x        save previous char, input buffer pointer
+CFlsh01  clra             std. input
+         ldb   #SS.Ready 
+         os9   I$GetStt  
+         bcc   CFExit     character ready, go get it
+         cmpb  #E$NotRdy  no character ready?
+         bne   CrsrErr    no, go check other errors
+         ldx   #$0001     give up remainder of tick
+         os9   F$Sleep   
+         bcs   CrsrErr    go clean up & check error
+         dec   <CrsrCnt   decrement cursor toggle counter
+         lda   <CrsrCnt   get new counter value
+         eora  <CrsrFlg   cursor toggle required?
+         anda  #%01000000 clear all but active counter bit
+         beq   SigChk     no, go check for signal
+         com   <CrsrFlg   toggle cursor on or off?
+         beq   CrsrOff    go toggle cursor off
+         bsr   CrsrOn     go toggle cursor on
+         bra   SigChk     go check intercept routine signal code
+CrsrOff  leax  CursrOff,pc point [X] to cursor off string
+         ldy   #CursOff   number of bytes in string
+         bsr   WritCrsr   go write cursor off string
+SigChk   ldb   <SgnlCode  get intercept routine signal code
+         cmpb  #S$Abort   keyboard abort signal? (error #2)
+         beq   CrsrErr    yes, go report it
+         cmpb  #S$Intrpt  keyboard interrupt signal? (error #3)
+         bne   CFlsh01    no, go check for data again
+CrsrErr  stb   ,s         save error code for sigchek2
+         bsr   CrsrOn     go make sure cursor is on
+         puls  b,x        recover error code, input buffer pointer
+         bra   cheksig2  
+CrsrOn   leax  CursrOn,pc point [X] to cursor on string
+         ldy   #CursOn    number of bytes in string
+WritCrsr lda   #1         std. output
+         os9   I$Write   
+         clrb             ignore any/all errors
+         rts             
+CFExit   bsr   CrsrOn     go make sure cursor is on
+         puls  b,x        recover previous char, input buffer pointer
+         ldy   #1         1 char
+* end modification
+
+         clra             stdin
+         os9   i$read     read in char
+         bcs   cheksig2   chek for BREAK if error
+         rts              else return
+
+* modification by BRI
+* clears old signal, traps BREAK,
+* cleans up before reporting other errors
+* (fixes shift-BREAK/control-BREAK in edit mode and
+* error report stack clean up bugs)
+* cheksig2 cmpb #2 BREAK key signal?
+* lbne error no, process error
+* com hexascii yes, toggle hex/ascii flag
+* leas 2,s pull return addr off stack
+* bra edinput loop back
+cheksig2 leas  2,s        dump return address
+         clr   <SgnlCode  clear old signal
+         cmpb  #2         keyboard abort? (BREAK)
+         beq   TrapSgnl   yes, trap it & toggle hex/ascii
+         pshs  b          save error code
+         lbsr  reset      reset reversed chars
+         clr   <rownum    reset row #
+         puls  b          recover error code
+         lbra  error      go process error
+TrapSgnl com   <hexascii  yes, toggle hex/ascii flag
+         lbra  edinput    loop back
+* end modification
+
+
+* Input a hex byte
+
+inputbyt bsr   readit     read in a char
+         bsr   digit      is it valid hex digit?
+         bcs   edcurs     no, see if it's arrow key
+         lbsr  writeout   yes, display char
+         ldb   ,x         save char
+
+* modification by BRI
+* bsr readit read another char
+         lbsr  readit     read another char
+* end modification
+
+         bsr   digit      is it valid?
+         bcs   edcurs     no, check for arrows
+         exg   a,b        A= 1st char
+         lbsr  asciihex   change 2 ascii chars to hex byte
+         stb   [edbufptr,u] put new byte in buffer
+         lda   #1        
+         sta   wrtflag    signal auto-write
+         bra   movert     move to next byte
+
+* Check to see if char is valid hex digit.
+* Exit with Carry set if not valid.
+
+digit    lda   ,x         get char from buffer
+         cmpa  #'0        < 0?
+         blo   notdig     YES, set carry
+         cmpa  #'9        Between 0 & 9?
+         bls   gotnib     Yes, return
+         anda  #$5F       Lowercase -> Upper
+         cmpa  #'F        > F?
+         bhi   notdig     Yes, set carry
+         cmpa  #'A        Between A & F?
+         blo   notdig     No, set carry
+gotnib   andcc  #$fe       clear carry bit
+         rts             
+notdig   orcc  #1         set carry bit
+         rts             
+
+* Input single ASCII character
+
+* modification by BRI
+*inputchr bsr readit read char
+inputchr lbsr  readit     read char
+* end modification
+
+         lda   ,x         get char
+         cmpa  #$20       valid ascii char?
+         blo   edcurs     no, check for arrows
+         sta   [edbufptr,u] yes, put in buffer
+         lda   #1        
+         sta   wrtflag    signal auto-write
+         bra   movert     go do next byte
+
+* Check if char is arrow (for cursor moves)
+
+edcurs   cmpa  #9         Right arrow?
+         beq   movert    
+         cmpa  #8         Left arrow?
+         beq   movelt    
+         cmpa  #$c        Up arrow?
+         lbeq  moveup    
+         cmpa  #$a        Down arrow?
+         lbeq  movedn    
+         cmpa  #$d        CR?
+         lbne  edinput    no, get another key
+
+* Exit edit routine
+         lbsr  reset      reset reversed chars
+         clr   rownum     reset row #
+         lbra  getcmd     return to command level
+
+* Move to next byte on screen
+
+movert   lbsr  reset      reset display byte
+         tst   seclen+1   editting partial (last) sec?
+         beq   rtptr      no, bra
+         lda   edpos      position # in sector
+         cmpa  seclen+1   last byte?
+         lbeq  topleft    yes, bra
+rtptr    ldd   edbufptr   get pointer
+         addd  #1         set to next byte
+         std   edbufptr   save
+         inc   edpos     
+
+displyrt inc   asciicol   inc display counter
+         lda   asciicol   get counter
+         cmpa  #$68       at end of screen row?
+         bhs   rowdn      yes, move down a row
+         lda   hexcol     no, inc hex display counter
+         adda  #3         3 screen columns per byte
+         sta   hexcol     save
+         lbra  revbyte    go do next byte
+rowdn    inc   rownum     next row
+         lda   rownum     get row #
+         cmpa  #$32       past bottom row?
+         lbhi  topleft    yes, go to top row
+         lda   #$25       1st hex column #
+         sta   hexcol     reset counter
+         lda   #$58       1st ascii col #
+         sta   asciicol   reset counter
+         lbra  revbyte    go do display
+
+* Move to previous byte on screen
+
+movelt   bsr   reset      reset displayed byte
+         ldd   edbufptr   get data pointer
+         subd  #1         dec it
+         std   edbufptr  
+         dec   edpos      & position counter
+         dec   asciicol   dec display counter
+         lda   asciicol   get col #
+         cmpa  #$58       past left end of row?
+         blo   rowup      yes, move up a row
+         lda   hexcol     get hex col #
+         suba  #3         move left 3 columns
+         sta   hexcol     save
+         lbra  revbyte   
+rowup    dec   rownum     move up a row
+         lda   #$52       col # of right end of hex dump
+         sta   hexcol     save
+         lda   #$67       col # of right end of ascii dump
+         sta   asciicol   save
+         lda   rownum     get row #
+         cmpa  #$23       past top row?
+         blo   gobot      yes, go to bottom row
+         lbra  revbyte    no, display next byte
+gobot    ldx   edbufptr   old pointer
+         ldb   seclen+1   partial (last) sec?
+         beq   botptr     no, bra
+         stb   edpos      new last position
+         clra            
+         leax  d,x        new pointer with partial sector
+         decb             offset to byte in buffer
+         pshs  b         
+* MSN of B is last row-1 with partial sector
+         lsrb            
+         lsrb            
+         lsrb            
+         lsrb             Now B is last row-1
+         addb  #$23      
+         stb   rownum    
+         lda   ,s+        offset
+         anda  #$0f       A=last col
+         pshs  a         
+         adda  #$58       left most ASCII column
+         sta   asciicol   new ASCII col
+         puls  a         
+         ldb   #3         3 columns per hex byte
+         mul             
+         addb  #$25       1st hex col
+         stb   hexcol    
+         bra   savebot   
+botptr   lda   #$32       bottom row #
+         sta   rownum     save
+         leax  $100,x     new pointer
+savebot  stx   edbufptr   save new pointer
+         lbra  revbyte    do next byte
+
+* Reset byte displayed in reverse video to normal video
+
+reset    lbsr  normdisp   set normal video
+         lbra  eddisply   go display byte
+
+* Move up a row on screen
+
+moveup   bsr   reset      reset reversed byte
+         ldb   seclen+1   partial sector?
+         beq   moveup1    no, bra
+         lda   rownum    
+         cmpa  #$23       at top row now?
+         beq   moveup2    yes, bra
+moveup1  ldd   edbufptr   get data pointer
+         subd  #$10       move back 16 bytes
+         std   edbufptr   save new pointer
+         ldb   edpos     
+         subb  #$10       dec position counter by $10
+         stb   edpos     
+         dec   rownum     move up a row
+         lda   rownum     get new row #
+         cmpa  #$23       above top row
+         bhs   updone     no, go display next byte
+         lda   #$32       set to bottom row
+         sta   rownum    
+         ldd   edbufptr   get data pointer
+         addd  #$100      point to new byte
+         std   edbufptr   and save
+updone   lbra  revbyte    display next byte
+
+moveup2  andb  #$f0       MSN=row offset
+         lda   seclen+1   bytes read
+         anda  #$0f       last col in last row
+         cmpa  edpos      to left of current position?
+         bhs   moveup3    yes, bra
+         subb  #$10       else correct row offset
+moveup3  clra            
+         pshs  b,a       
+         ldd   edbufptr  
+         addd  ,s+        add offset
+         std   edbufptr  
+         ldb   edpos     
+         addb  ,s        
+         stb   edpos      new position
+         puls  b         
+         lsrb            
+         lsrb            
+         lsrb            
+         lsrb             row offset in LSNib
+         addb  #$23       calc new rownum
+         stb   rownum    
+         bra   updone    
+
+* Move down a row on screen
+
+movedn   bsr   reset      reset reversed byte
+         ldb   seclen+1   partial sector?
+         beq   movedn1   
+         subb  edpos     
+         cmpb  #$10      
+         blo   movedn2   
+movedn1  ldd   edbufptr   get data pointer
+         addd  #$10       point 16 bytes ahead
+         std   edbufptr   and save
+         lda   edpos     
+         adda  #$10      
+         sta   edpos     
+         inc   rownum     move down a row
+         lda   rownum     check to see if below
+         cmpa  #$32       bottom row?
+         lbls  revbyte    no, display next byte
+         ldd   edbufptr   get data pointer
+         subd  #$100      reset to new byte
+         std   edbufptr   save
+topptr   lda   #$23       yes, set for top row
+         sta   rownum     save
+         lbra  revbyte    display next byte
+
+movedn2  clra            
+         ldb   edpos     
+         decb            
+         andb  #$f0       B = offset to first row
+         pshs  b,a       
+         ldd   edbufptr  
+         subd  ,s+        reset pointer
+         std   edbufptr  
+         ldb   edpos     
+         subb  ,s+        reset position counter
+         stb   edpos     
+         bra   topptr    
+
+
+* Start new SHELL
+
+goshell  lda   oldecho    get original echo status
+         sta   echobyte   set up for change
+         bsr   echo       set echo
+         leax  shell$,pcr point to 'SHELL' text
+         ldy   #$10       # pages in new param area
+         leau  i.o.buff,u new param area
+         lda   #$0d       CR to
+         sta   ,u         init param area
+         ldd   #$0000     language/type
+         os9   f$fork     fork to new shell
+         lbcs  error     
+         os9   f$wait     wait for shell to die
+         ldu   usave      pull data pointer
+         leax  inbuff,u  
+         stx   buffptr    reset buffer pointer
+         clr   echobyte   echo off
+         bsr   echo       set echo
+redo     lbsr  clrscr     clear screen
+         lbra  disploop   redo display
+
+* Read in option section (32 bytes) of stdin path descriptor & turn echo on/off
+
+echo     pshs  x          save
+         leas  -32,s      make room for data
+         leax  ,s         point to buffer
+         clra             path = 0
+         clrb             SS.OPT
+         os9   i$getstt   read in 32 bytes
+         lbcs  error     
+         lda   echobyte   new echo status byte
+         sta   4,x        set echo
+         clra             path =0
+         os9   i$setstt   set new status
+         lbcs  error     
+         leas  32,s       reset stack
+         puls  x,pc       pull x & return
+
+* Verify CRC on file, if it's a valid module.
+
+verify   lbsr  movecmd    position cursor
+         leax  vrfymess,pcr display message
+         lbsr  pstring   
+         ldu   #$0000    
+         ldx   #$0000    
+         stx   fileln     init file length
+         lda   inpath     path #
+         os9   i$seek     rewind to LSN 0
+         lbcs  error     
+         ldu   Usave      restore U
+initCRC  ldd   #$FFFF     initialize CRC bytes
+         std   crc       
+         stb   crc+2     
+         leax  i.o.buff,u input buffer
+         ldy   #8         8 bytes to read
+         lda   inpath     path #
+         os9   i$read     read in 8 header bytes
+         lbcs  error      exit on error
+         cmpy  #8         all read in ok?
+         lbne  verr       no, error
+         ldd   ,x         get 1st 2 bytes read in
+         cmpa  #$87       module sync byte?
+         lbne  verr       no, error
+         cmpb  #$CD       module sync byte?
+         lbne  verr       no, error
+         ldd   2,x        get module length
+         cmpd  #$f        minimum module length
+         lbls  verr       exit if less
+         subd  #3         omit old CRC bytes
+         std   vmodlen    module length less CRC
+         addd  fileln     update file length
+         std   fileln     read so far
+
+* Check header parity by EOR'ing 1st 8 bytes to themselves, then taking
+* the one's complement. This is the 9th header byte, the parity check.
+
+         clra             prepare for EORs
+         ldb   #8         # header bytes to EOR
+hedpar   eora  ,x+        EOR bytes read in
+         decb             done?
+         bne   hedpar     no, bra
+         coma             A now is header parity
+         sta   ,x         put in buffer
+         ldy   #1         1 char to write
+         lda   inpath     path #
+         os9   i$write    write parity byte out
+         lbcs  error     
+         ldd   vmodlen    get # byte in module
+         subd  #9         9 bytes already read
+         std   vmodlen    save
+         leax  i.o.buff,u start of header bytes
+         ldy   #9        
+         bsr   CRCcal     calculate CRC on 1st 9 bytes
+bytsleft lda   inpath     path #
+         ldy   #bufsiz    # chars to read
+         cmpy  vmodlen    buffer <= # bytes left to read?
+         bls   readmod    yes, bra
+         ldy   vmodlen    else, get exact # chars left to read
+readmod  os9   i$read     read in Y chars
+         bcs   verr       exit on error
+         sty   bytsread   save # bytes read in
+         bsr   CRCcal     calc CRC on bytes just read in
+         ldd   vmodlen    # bytes
+         subd  bytsread   minus # bytes just read in
+         std   vmodlen    save # byte left
+         bne   bytsleft   do more if some left
+* Compare current position in file with # of bytes in module header
+* to prevent overwriting next module, in case module length changed.
+         lda   inpath     path number
+         ldb   #ss.pos    file position code
+         os9   i$getstt   get position in file
+         tfr   u,d        D = position
+         ldu   Usave      restore U
+         cmpd  fileln     same as bytes read so far?
+         bne   verr       no, exit
+         com   crc        do one's
+         com   crc+1      complement on
+         com   crc+2      CRC accumulator
+         leax  crc,u      point to accumulator
+         ldy   #3         3 bytes to write
+         lda   inpath     path #
+         os9   i$write    write out 3 CRC bytes
+         lbcs  error     
+         ldd   #3         update # bytes read/written
+         addd  fileln    
+         std   fileln    
+         ldb   #ss.eof    test for EOF
+         lda   inpath    
+         os9   i$getstt  
+         lbcc  initCRC    bra if not EOF
+         cmpb  #e$eof     EOF?
+         lbne  error      no, exit
+* Redisplay LSN (may have changed with verify)
+         lbsr  seeksec    read in sector again
+         lbra  disploop   redo display
+
+* Calculate CRC sub. Enter with Y = # of bytes to calculate CRC over.
+*                               X = address of 1st byte
+
+CRCcal   leau  crc,u      point to CRC bytes
+         os9   f$crc      calc CRC
+         lbcs  error     
+         ldu   Usave      restore U
+         rts             
+
+* Verify error display sub
+
+verr     ldd   #cmdpos    position cursor
+         lbsr  movecurs   at cmd position
+         leax  verrmess,pcr point to message
+         lbsr  pstring    display it
+         ldb   #e$bmid    bad module ID
+         lbsr  prterr     display error #
+         lbra  getcmd     exit
+
+* 'Link' to a given module or display all modules if no name is input
+
+linker   tst   infile     linked already?
+         lbne  getcmd     yes, exit
+         ldd   #0        
+         std   fileln     init vars
+         std   lmodlen    "
+         clr   echobyte  
+         com   echobyte  
+         lbsr  echo       echo on
+         lbsr  movecmd   
+         lbsr  clrline   
+         leax  linkmess,pcr prompt
+         lbsr  pstring    print it
+         leax  infile,u   point to buffer for module name
+         ldy   #30        max name length+1
+         lbsr  readlin    read in module name
+         clr   echobyte  
+         lbsr  echo       echo off
+         cmpy  #1         any name entered?
+         lbne  parsmod    yes, go find it
+* else list all module names
+         clr   infile     flag => no modules linked
+         leax  linkhdr,pcr point to header
+         lbsr  wrtlin1    write it
+nxtmod   ldd   lmodlen    current mod length
+         addd  fileln     + cummulative lengths
+         std   fileln     save
+         tfr   d,u        point u to next module
+         ldx   #0        
+         lda   inpath    
+         os9   i$seek    
+         bcs   moderr    
+         ldu   Usave      restore U
+         leax  i.o.buff,u
+         ldy   #6         bytes to read
+         os9   i$read    
+         bcs   moderr    
+         ldd   ,x++       get sync bytes
+         cmpa  #$87       OK?
+         bne   moderr1    no, exit
+         cmpb  #$CD       OK?
+         bne   moderr1    no, exit
+         leay  i.o.buff,u
+         ldd   ,x++       get module length
+         std   lmodlen    save
+         ldd   ,x++       offset to module name
+         pshs  d          save
+         ldd   fileln     current offset
+         bsr   convert2   convert D to ASCII
+         lda   #$20       space
+         sta   ,y+        put in buffer
+         ldd   lmodlen    current module length
+         bsr   convert2   convert to ASCII
+         lda   #$20      
+         sta   ,y+        insert space
+         ldd   fileln     offset to mod start
+         addd  ,s++       add mod name offset
+         tfr   d,u        U = offset to name
+         ldx   #0        
+         lda   inpath    
+         os9   i$seek     seek to module name
+         lbcs  error     
+         ldu   Usave      restore U
+         tfr   y,x        point x to buffer
+         ldy   #29        max chars in name
+         lda   inpath    
+         os9   i$read    
+         lbcs  error     
+namend   lda   ,x+        find char w/ bit 7 set
+         bpl   namend    
+         anda  #$7f       clear bit 7
+         sta   -1,x      
+         lda   #$0d       CR
+         sta   ,x         end output line
+         leax  i.o.buff,u buffer start
+         lbsr  wrtlin1   
+         bra   nxtmod    
+
+convert2 lbsr  convert1   put ASCII val of A in Y
+         tfr   b,a        repeat for B
+         lbra  convert1   and return
+
+moderr2  cmpb  #e$eof    
+         bne   moderr    
+         ldb   #e$MNF     module not found error
+         bra   moderr    
+moderr1  ldb   #E$BMID    bad module ID error
+moderr   clr   infile     flag => not linked
+         cmpb  #e$eof     end of file?
+         lbne  error      no, print error
+         lbsr  read1      wait for keypress
+         leax  inbuff,u  
+         stx   buffptr    reset buffer pointer for display
+         lbra  redo       redo display
+
+parsmod  os9   f$prsnam  
+         lbcs  error     
+         stb   modnmlen   save length of name
+         decb             name len -1
+         lda   b,x        last char of name
+         ora   #$80       set bit 7
+         sta   b,x       
+         stx   CRC        save pointer
+         ldu   #0        
+modloop  ldx   #0        
+         lda   inpath    
+         os9   i$seek     go to start of file
+         lbcs  error     
+         ldu   Usave      restore U
+         leax  i.o.buff,u buffer
+         ldy   #6         bytes to read in
+         os9   i$read    
+         bcs   moderr2   
+         ldd   ,x++       sync bytes
+         cmpa  #$87       OK?
+         bne   moderr1   
+         cmpb  #$CD       OK?
+         bne   moderr1   
+         ldd   ,x++       module length
+         std   lmodlen    save
+         ldd   ,x         mod name offset
+         addd  fileln     d=true offset to name
+         tfr   d,u       
+         ldx   #0        
+         lda   inpath    
+         os9   i$seek     seek to mod name
+         bcs   moderr2   
+         ldu   Usave      restore U
+         leax  i.o.buff,u buffer
+         ldy   #29        max chars in name
+         os9   i$read     read in name
+         bcs   moderr2   
+         tfr   x,y       
+         ldx   CRC        point to desired name
+         ldb   modnmlen   get len of name
+         os9   f$cmpnam   do they match?
+         bcc   newbase    yes, bra
+         ldd   lmodlen    no, check next
+         addd  fileln     new offset
+         std   fileln    
+         tfr   d,u       
+         bra   modloop   
+
+* Set Offset to module. LSN is functionally set to 0.
+
+newbase  lda   #$0d       CR
+         sta   b,x        delimit name
+         decb            
+         lda   b,x        last char
+         anda  #$7f       clr bit 7
+         sta   b,x       
+         ldd   fileln     get offset
+         std   offset    
+         ldd   #0006     
+         leax  LSN,u     
+nbloop   sta   ,x+       
+         decb            
+         bne   nbloop    
+         lbra  readloop   go read 1st 'LSN'
+
+* Display module name and offset
+
+prntmod  ldd   #modpos   
+         lbsr  movecurs   point to screen position
+         leax  modnmhdr,pcr mod name header
+         lbsr  pstring    print it
+         leax  infile,u   point to name
+         lbsr  wrtlin1    print it
+         ldd   #offpos    'offset' screen postion
+         lbsr  movecurs  
+         leax  offmess,pcr
+         lbsr  pstring    print 'Offset' label
+         leay  i.o.buff,u
+         ldd   offset    
+         lbsr  convert2   convert offset to ASCII
+         lda   #$0d      
+         sta   ,y         delimit offset
+         lbra  writeout   display it & return
+
+* 'Unlink' named module and restore LSN to original file's LSN
+
+unlinker tst   infile     linked?
+         lbeq  getcmd     no, exit
+         ldd   #0008     
+         leax  LSN,u     
+unloop   sta   ,x+       
+         decb            
+         bne   unloop    
+         ldd   #modpos    position cursor
+         lbsr  movecurs  
+         lbsr  clrline    erase module name
+         lbsr  clrline    erase offset
+         clr   infile     flag => no modules linked
+         lbra  readloop  
+
+* Toggle expert mode - edits and zaps of buffer are automatically written
+
+expert   tst   xprtflag   in expert mode now?
+         beq   xprton     no, go turn it on
+         clr   xprtflag   signal mode off
+         ldd   #xprtpos  
+         lbsr  movecurs  
+         lbsr  clrline    erase label
+xprtout  lbra  getcmd    
+xprton   lbsr  rusure     Sure?
+         bne   xprtout    no, exit
+         com   xprtflag   signal xpert mode
+         ldd   #xprtpos  
+         lbsr  movecurs   position cursor
+         leax  xprtmess,pcr
+         lbsr  pstring    display 'EXPERT'
+         bra   xprtout   
+
+help     lbsr  clrscr     clear screen
+         leax  helper,pcr point to help message
+         ldy   #helpchrs  length of message
+         lbsr  wrtlin2    print it
+         leax  i.o.buff,u
+         lbsr  Read1      get 1 byte
+         lbra  redo       redo display
+
+find                     
+         clr   echobyte  
+         com   echobyte   echo on
+         lbsr  echo      
+         lbsr  movecmd   
+         lbsr  clrline   
+         tst   FHexAsc    Hex or Ascii mode?
+         bne   charfind   bra if Ascii
+         leax  findbyte,pcr
+         lbsr  pstring    display prompt
+         ldy   #33        max chars to read + 1
+         lbsr  FRead     
+         cmpy  #1         blank line entered?
+         lbeq  exitfind   yes, exit find mode
+         leay  -1,y       get rid of CR
+         tfr   y,d       
+         lsrb             divide # bytes read by 2
+         lbcs  badfind    bra if odd # read
+         stb   TargLen    save # bytes in find string
+         leau  findstr,u  point to storage area
+* Convert 2 bytes pointed to by X to object byte in A
+FConvert lbsr  hexobjct  
+         lbcs  badfind    bra if invalid char
+         sta   ,u+        save byte
+         leay  -2,y       all chars converted?
+         bne   FConvert   no, bra
+         ldu   Usave      restore U
+         bra   gofind    
+
+* Input a string of ASCII characters to search for
+
+charfind leax  findchar,pcr
+         lbsr  pstring    display prompt
+         ldy   #17        max # of chars + 1
+         lbsr  FRead     
+         cmpy  #1         only CR entered?
+         lbeq  exitfind   yes, exit find mode
+         tfr   y,d        # bytes read
+         decb             dump CR
+         stb   TargLen    save length of target string
+         leay  findstr,u 
+find20   lda   ,x+        move target
+         sta   ,y+        string to storage area
+         decb             done?
+         bne   find20    
+
+* Check if byte from target string matches byte in buffer by EOR'ing the two.
+*  If they match exactly, result is 0. If in 'char' search mode, EOR results
+*  in bits 5 and/or 7 being set if 2 bytes differ only by case or bit 7 status
+
+gofind                   
+*****************************
+* Added 01/08/90 (RAK)
+*
+         clr   echobyte   echo off
+         lbsr  echo      
+*
+* END of modification
+*****************************
+         leax  inbuff,u   point to sector buffer
+find30   ldb   seclen+1   # bytes in this sector
+         leay  findstr,u  point to target string
+find50   lda   ,y         get 1st target byte
+         eora  ,x+        does it match?
+         lbeq  found1     yes, bra
+         tst   FHexAsc    in 'char' search mode?
+         beq   find60     no, bra
+         bita  #%01011111 else, only bits 5 &/or 7 set?
+         lbeq  found1     bra if so
+find60   decb             whole sector checked?
+find70   bne   find50     no, bra
+* No match in this sector. Read in next sector.
+
+****************************************************
+* Modification (addition) by RAK 01/08/90
+* Read a character from std in to catch a break
+* key which allows aborting a <F>IND.
+* Note: "finderr2" resets the stack.
+*
+         pshs  d,x,y      save registers
+         clra             std in
+         ldb   #SS.Ready 
+         os9   I$GetStt   was there a key press?
+         bcs   NoKey      no, skip read
+         leax  i.o.buff,u point to buffer
+         lbsr  Read1      get a key
+         lda   ,x         get the key
+         cmpa  #5         break key?
+         beq   finderr2   yes, stop <F>ind
+NoKey    puls  d,x,y      no, restore registers
+*
+* End of modification
+****************************************************
+
+         bsr   FNxtsec    get next sector
+         bra   find30     back to loop
+
+FNxtSec  tst   infile     module linked?
+         beq   find75     no, bra
+         ldd   lmodlen    else, get module length
+         subd  #1         now A = LSN of last sector
+         cmpa  LSN+2      was this last sector?
+         beq   finderr2   yes, bra
+find75   ldd   lsn+1      else, get next sector
+         addd  #1         inc lsn
+         std   lsn+1     
+         bne   find80     bra if no carry needed
+         inc   lsn        else, do add in carry
+find80   lbsr  lsnseek    seek to next sector
+         leax  inbuff,u   point to sector buffer
+         stx   buffptr    save
+         tst   infile     module linked?
+         beq   find256    no, bra
+         ldd   lmodlen    linked mod length
+         suba  lsn+2      > $100 bytes left?
+         bne   find256    yes, bra
+         tfr   d,y        else, set up for smaller read
+         bra   FRdSome   
+find256  ldy   #$100     
+FRdSome  lda   inpath    
+         os9   i$read    
+         bcs   finderr   
+         sty   seclen     save # bytes read
+         rts             
+
+* Input byte or char string to find
+
+FRead    leax  i.o.buff,u
+         clra             stdin
+         os9   i$readln  
+         bcs   cheksig3  
+         rts             
+
+ChekSig3 leas  2,s        scratch return addr
+         clr   SgnlCode   clear old signal
+         cmpb  #2         BREAK key?
+         lbne  error      no, exit
+         com   FHexAsc    yes, toggle Hex/Ascii flag
+         lbra  find      
+
+badfind  ldu   Usave      restore U
+         bsr   beep      
+         lbra  find      
+
+* Make a beep
+beep     leax  bell,pcr  
+         ldy   #1        
+         lbra  writeout   beep & return
+
+* If error reading next sector was EOF, then find was unsuccessful.
+* Re-read original sector and return to CMD: prompt
+
+finderr  cmpb  #e$eof     EOF?
+         lbne  error      no, exit
+finderr2 lds   Ssave      dump return addr
+         ldd   oldlsn     original LSN
+         std   lsn       
+         lda   oldlsn+2  
+         sta   lsn+2     
+         lbsr  seeksec    read original LSN
+         sty   seclen     save bytes read
+         bsr   beep      
+
+exitfind lbra  exitzap    exit
+
+found1   pshs  b          # bytes left in sector + 1
+         decb             # save bytes left if this search unsuccessful
+         stb   FBytes     and for 'Next' command
+* Save pointer (X) to next byte in buffer for search to resume if this search
+*  is unsuccessful or for 'Next' command
+         stx   findptr    pointer for next search
+         ldb   TargLen    #bytes in target string
+find90   decb             whole string checked?
+         beq   matched    yes, match found
+         dec   ,s         else, more bytes left in sector?
+         beq   find130    no, read in next
+find100  leay  1,y        else, point to next target byte
+         lda   ,y         target byte
+         eora  ,x+        match?
+         beq   find90     yes, loop back for more
+         tst   FhexAsc    in 'char' search mode?
+         beq   find110    no, bra
+         bita  #%01011111 only bits 5 &/or 7 set?
+         beq   find90     yes, bra
+find110  leas  1,s        else, dump counter
+* Restore buffer pointer (X) to byte after 1st byte found that matched in
+*  search just completed (unsuccessfully). Restore B to # bytes left in 
+*  sector at that point. Y = start of target string.
+         ldx   findptr    ready for new search
+find120  leay  findstr,u 
+         ldb   FBytes     bytes left in sector
+         lbra  find70    
+
+* Read in next sector to complete test for match
+find130  leas  1,s        dump counter
+         pshs  b,y        save counter & target pointer
+         lbsr  FNxtSec    read in next sector
+         puls  b,y        restore counter & target pointer
+         lda   seclen+1   # bytes in this sector
+         pshs  a          save
+         bra   find100    continue search
+
+* Successful Find
+*   Must determine whether target string starts in last LSN read or
+*    next-to-last, for display.
+
+matched  leas  1,s        dump counter
+         lda   lsn+2     
+         cmpa  oldlsn+2   did we have to read a new sector?
+         beq   match40    no, bra
+         cmpx  findptr    does target start in last sector read?
+         bhs   match30    yes, bra
+match10  ldd   lsn+1      else, set to re-read previous LSN
+         subd  #1        
+         std   lsn+1     
+         cmpd  #$ffff    
+         bne   match20   
+         dec   lsn       
+match20  lbsr  seeksec    re-read sector
+         sty   seclen     save bytes read ($100)
+match30  ldd   lsn        update 'oldlsn'
+         std   oldlsn    
+         lda   lsn+2     
+         sta   oldlsn+2  
+match40  lbsr  display    (re)display sector
+* Get offset of found string from beginning of LSN
+         ldd   findptr    addr 1 byte past start of found string
+         subd  #1         D = addr of string
+         std   edbufptr   save for display
+         subd  buffptr    D (B) = offset from buff start
+* Now LS nib of B = col #, MS nib = row # for display
+         pshs  b         
+         andb  #$0f       mask off MS nibble
+         pshs  b         
+         addb  #$58       add offset for ascii dump column
+         stb   asciicol  
+         puls  b         
+         lda   #3         3 screen columns per hex byte dump
+         mul             
+         addb  #$25       add offset for hex dump column
+         stb   hexcol    
+         puls  b         
+         andb  #$f0       mask off LS nibble
+         lsrb            
+         lsrb            
+         lsrb            
+         lsrb             B now = row #
+         addb  #$23       add offset
+         stb   rownum    
+         lbsr  revdisp    reverse video
+         lbsr  eddisply   display 1st byte in found string
+         lbsr  normdisp   normal video
+         clr   rownum    
+         lbra  exitfind   done *** This line changed from 'lbra getcmd' in Version 2.0 ***
+
+* Locate next occurrence of string located with 'Find' command.
+*  Search starts where 'Find' left off, unless LSN has since changed,
+*   in which case search starts at start of present LSN
+
+next     tst   TargLen    is there a string to find?
+         lbeq  getcmd     no, exit
+         lbsr  movecmd   
+         leax  srchmess,pcr
+         lbsr  pstring    display "Searching"
+         ldx   findptr    pointer into buffer where 'find' left off
+         lbeq  gofind     0 => begin at start of LSN
+         lbra  find120   
+
+* Display file size and input new value
+
+diddle   lbsr  movecmd   
+         leax  lenmess,pcr
+         lbsr  pstring   
+         com   zeroflag   suppress leading zeroes
+         leay  i.o.buff,u
+         ldd   FileLen    MSB of file length
+         lbsr  convert1   convert 1st nibble to ascii
+         tfr   b,a       
+         lbsr  convert1   do 2nd nibble
+         ldd   FileLen+2  LSB of file length
+         lbsr  convert1   do 3rd nibble
+         clr   zeroflag   stop suppressing leading zeroes
+         tfr   b,a       
+         lbsr  convert1  
+         ldd   #$2020    
+         std   ,y++      
+         std   ,y++      
+         leax  i.o.buff,u
+         stx   bytsread   temp storage
+         tfr   y,d       
+         subd  bytsread   get # chars to display
+         tfr   d,y        setup for i$writln
+         lbsr  writeout  
+         leax  newmess,pcr
+         lbsr  pstring    display message
+         ldy   #9         max chars to read
+         lbsr  MakeHex    convert them to object
+         bcs   diddle    
+         ldd   #cmd1pos  
+         lbsr  movecurs  
+         lbsr  rusure10   ask  'Sure?'
+         lbne  getcmd    
+         ldx   HexBuff    MSB of new file length
+         ldu   HexBuff+2  LSB ""
+         ldb   #ss.size  
+         lda   inpath    
+         os9   i$setstt   set new file length
+         lbcs  error     
+         stx   FileLen   
+         stu   FileLen+2 
+         ldu   Usave     
+* Make sure LSN displayed is still within file (in case file shortened).
+*  If not, reset display to show last LSN with new file length.
+         lda   FileLen    MSB of file length
+         cmpa  lsn        is max LSN > current LSN?
+         blo   RstLSN     no, bra
+         bne   diddled    else, bra if LSN not last
+         ldd   FileLen+1  check LSB's (MSB's equal)
+         cmpd  lsn+1     
+         bls   RstLSN10  
+diddled  lbra  readloop   re-read sector & display
+
+RstLSN   sta   lsn        reset MSB of lsn
+         ldd   FileLen+1  get LSB's of last sector
+RstLSN10 tst   FileLen+3  need to correct?
+         bne   RstLSN20  
+         subd  #1        
+RstLSN20 std   lsn+1      reset LSB's of lsn
+* If D was 0, need to 'borrow'
+         cmpd  #$ffff     was D 0?
+         bne   diddled    no, bra
+         dec   lsn        else, correct LSB of LSN
+         bra   diddled   
+
+push     lda   StackCnt   # of LSN's on stack
+         cmpa  #MaxStack  more room?
+         bhs   full       no, bra
+         ldb   #3         3 bytes per entry
+         mul             
+         leax  Stack,u    start of stack
+         leax  b,x        add offset
+         ldd   lsn       
+         std   ,x++       put current LSN on stack
+         lda   lsn+2     
+         sta   ,x        
+* Now that LSN is on stack, check to make sure it isn't the last one
+*  pushed, as well. If so, don't increment StackCnt, which effectively
+*  cancels the Push operation.
+         tst   StackCnt   any sectors thus far?
+         beq   pushOK     no, do push
+         cmpa  -3,x       Is LSB of LSN the same as previous LSN pushed?
+         bne   pushOK     no, bra
+         ldd   lsn        check MS bytes of LSN
+         cmpa  -5,x       do they match?
+         beq   pushed     yes, exit without completing push
+pushOK   inc   StackCnt   complete push
+pushed   lbra  getcmd     exit
+
+* Stack is full - display message
+full     lbsr  movecmd   
+         leax  fullmess,pcr
+         lbsr  pstring    display 
+         lbsr  read1      wait for keypress
+         bra   pushed    
+
+remove   lda   StackCnt   # sectors on stack
+         beq   pushed     exit if none
+         ldb   #3         3 bytes per entry
+         mul              offset to END of entry
+         subb  #3         no B = offset to entry
+         leax  Stack,u   
+         leax  b,x        point to entry
+         ldd   ,x++       get MS bytes of LSN
+         std   lsn       
+         lda   ,x         get LS byte of LSN
+         sta   lsn+2      reset LSN
+         dec   StackCnt   1 less sector on stack
+         lbra  readloop   and go read in new sector
+
+         emod            
+dEDend   equ   *         
+         end             
+
+            ENDC
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/level1/cmds/disasm.asm	Fri Jan 31 17:58:38 2003 +0000
@@ -0,0 +1,3707 @@
+         nam   Disasm
+         ttl   Os9 disassembler by Ron Lammardo
+
+* Disasm v1.5 (c) 1988 by Ron Lammardo
+* 6309 additions by L. Curtis Boyle Jan. 1993
+********
+*
+* 03/12/87 (#2) - added code for line,address,obj display
+*                 added options 'o' and 'x'
+*
+* 04/02/87 (#3) - added code to provide commented disassembly
+*                 of device descriptors
+*
+* 11/16/87 (#4) - fixed restart link failure
+*                 added code to display direct page addresses
+*
+* 02/22/88 (#5) - added code to display dp/u offsets
+*                 added code to display fcb bytes preceding eom
+*                 added code for z option (hex input disassembly) 
+*                 added code to display date/time run
+*
+* 01/23/93      - added code to handle 6309 instruction set additions
+********
+
+         ifp1
+         use   defsfile
+         endc
+
+typ      set   prgrm+objct
+attrev   set   reent+revision
+revision set   1
+edtn     set   5 edition
+edition  equ   $30+edtn ascii edition
+
+         mod   eom,mname,typ,attrev,start,datend
+
+pcrzero  equ   *-$0D module start
+
+mname    fcs   /Disasm/
+         fcb   edtn 
+
+dfltdrv  fcc   /dd/
+cr       set   C$CR
+**** start of data area ****
+stackhld rmb   2
+ureghold rmb   2
+xreghold rmb   2
+xsave    rmb   2
+dsave    rmb   2
+startadr rmb   2
+modadr   rmb   2
+address  rmb   2
+addrsave rmb   2
+lineadr  rmb   2
+objadr   rmb   2
+crntadr  rmb   2
+modend   rmb   2
+nameadr  rmb   2
+size     rmb   2
+temp     rmb   2
+readpos  rmb   2
+readcnt  rmb   1
+readclr  rmb   1
+byte     rmb   1
+TFMFlag  rmb   1              Flag to indicate processing TFM
+bitcom   rmb   1              Flag to indicate processing bit instruction
+indirct  rmb   1
+hexstrng rmb   4
+decstrng rmb   5
+testbyte rmb   1
+register rmb   1
+labladr  rmb   2
+highadr  rmb   2
+utabend  rmb   2
+pass     rmb   1
+path     rmb   1
+diskio   rmb   1
+objcnt   rmb   1
+tylghold rmb   1
+atrvhold rmb   1
+revshold rmb   1
+m.opt    rmb   1
+o.opt    rmb   1
+x.opt    rmb   1
+z.opt    rmb   1
+u.opt    rmb   1
+op.cnt   rmb   1
+descript rmb   1
+mgradr   rmb   2
+drvadr   rmb   2
+desctype rmb   1
+printadr rmb   2
+initsize rmb   2
+counter  rmb   1
+countdec rmb   2
+numline  rmb   2
+runtime  rmb   6
+* start of output line
+linenum  rmb   8
+holdadr  rmb   5
+holdobj  rmb   11
+holdline rmb   56
+* end of output line
+holdname rmb   32
+namehold rmb   32
+hldtylg  rmb   40
+hldatrv  rmb   40
+hldrev   rmb   40
+hldttl   rmb   40
+pathlist rmb   80
+readbuff rmb   20
+labeltab rmb   6742
+lbtblend rmb   1
+         rmb   255
+datend   equ   .
+
+*****************************************
+**   os9 call tables                   **
+**   (sequence = $10,$3f,..)           **
+*****************************************
+os9f$tab equ    *
+         fcc    /F$Link  /
+         fcc    /F$Load  /
+         fcc    /F$UnLink/
+         fcc    /F$Fork  /
+         fcc    /F$Wait  /
+         fcc    /F$Chain /
+         fcc    /F$Exit  /
+         fcc    /F$Mem   /
+         fcc    /F$Send  /
+         fcc    /F$Icpt  /
+         fcc    /F$Sleep /
+         fcc    /F$SSpd  /
+         fcc    /F$ID    /
+         fcc    /F$SPrior/
+         fcc    /F$SSWi  /
+         fcc    /F$PErr  /
+         fcc    /F$PrsNam/
+         fcc    /F$CmpNam/
+         fcc    /F$SchBit/
+         fcc    /F$AllBit/
+         fcc    /F$DelBit/
+         fcc    /F$Time  /
+         fcc    /F$STime /
+         fcc    /F$CRC   /
+         fcc    /F$GPrDsc/
+         fcc    /F$GBlkMp/
+         fcc    /F$GModDr/
+         fcc    /F$CpyMem/
+         fcc    /F$SUser /
+         fcc    /F$UnLoad/
+         fcc    /F$Alarm /
+         fcc    /????????/
+         fcc    /????????/
+         fcc    /F$NMLink/
+         fcc    /F$NMLoad/
+         fcc    /F$Ctime /
+         fcc    /F$Cstime/
+         fcc    /F$CTswi2/
+         fcc    /????????/
+         fcc    /F$VIRQ  /
+         fcc    /F$SRqMem/
+         fcc    /F$SRtMem/
+         fcc    /F$IRQ   /
+         fcc    /F$IOQu  /
+         fcc    /F$AProc /
+         fcc    /F$NProc /
+         fcc    /F$VModul/
+         fcc    /F$Find64/
+         fcc    /F$All64 /
+         fcc    /F$Ret64 /
+         fcc    /F$SSvc  /
+         fcc    /F$IODel /
+         fcc    /F$SLink /
+         fcc    /F$Boot  /
+         fcc    /F$BtMem /
+         fcc    /F$GProcP/
+         fcc    /F$Move  /
+         fcc    /F$AllRAM/
+         fcc    /F$AllImg/
+         fcc    /F$DelImg/
+         fcc    /F$SetImg/
+         fcc    /F$FreeLB/
+         fcc    /F$FreeHB/
+         fcc    /F$AllTsk/
+         fcc    /F$DelTsk/
+         fcc    /F$SetTsk/
+         fcc    /F$ResTsk/
+         fcc    /F$RelTsk/
+         fcc    /F$DATLog/
+         fcc    /F$DATTmp/
+         fcc    /F$LDAXY /
+         fcc    /F$LDAXYP/
+         fcc    /F$LDDDXY/
+         fcc    /F$LDABX /
+         fcc    /F$STABX /
+         fcc    /F$AllPrc/
+         fcc    /F$DelPrc/
+         fcc    /F$ELink /
+         fcc    /F$FModul/
+         fcc    /F$MapBlk/
+         fcc    /F$ClrBlk/
+         fcc    /F$DelRAM/
+         fcc    /F$GCMDir/
+         fcc    /F$AlHRAM/
+
+os9i$tab equ    *
+         fcc    /I$Attach/
+         fcc    /I$Detach/
+         fcc    /I$Dup   /
+         fcc    /I$Create/
+         fcc    /I$Open  /
+         fcc    /I$MakDir/
+         fcc    /I$ChgDir/
+         fcc    /I$Delete/
+         fcc    /I$Seek  /
+         fcc    /I$Read  /
+         fcc    /I$Write /
+         fcc    /I$ReadLn/
+         fcc    /I$WritLn/
+         fcc    /I$GetStt/
+         fcc    /I$SetStt/
+         fcc    /I$Close /
+         fcc    /I$DeletX/
+bados9op fcc    /????????/
+
+* Mnemonic table: 1st byte =Opcode
+*                 2nd byte =Flags to indicate mode type of opcode
+*                Bytes 3-7 =Mnemonic name of opcode
+*****************************************
+**  2 byte table -                     **
+**  $10 is first byte of op code       **
+*****************************************
+get10tab equ    *
+         fcb    $21
+         fcb    $fc
+         fcc    /lbrn /
+         fcb    $22
+         fcb    $fc
+         fcc    /lbhi /
+         fcb    $23
+         fcb    $fc
+         fcc    /lbls /
+         fcb    $24
+         fcb    $fc
+         fcc    /lbcc /
+         fcb    $25
+         fcb    $fc
+         fcc    /lbcs /
+         fcb    $26
+         fcb    $fc
+         fcc    /lbne /
+         fcb    $27
+         fcb    $fc
+         fcc    /lbeq /
+         fcb    $28
+         fcb    $fc
+         fcc    /lbvc /
+         fcb    $29
+         fcb    $fc
+         fcc    /lbvs /
+         fcb    $2a
+         fcb    $fc
+         fcc    /lbpl /
+         fcb    $2b
+         fcb    $fc
+         fcc    /lbmi /
+         fcb    $2c
+         fcb    $fc
+         fcc    /lbge /
+         fcb    $2d
+         fcb    $fc
+         fcc    /lblt /
+         fcb    $2e
+         fcb    $fc
+         fcc    /lbgt /
+         fcb    $2f
+         fcb    $fc
+         fcc    /lble /
+* Test of 6309 codes
+         fcb    $30
+         fcb    $fa
+         fcc    /addr /
+         fcb    $31
+         fcb    $fa
+         fcc    /adcr /
+         fcb    $32
+         fcb    $fa
+         fcc    /subr /
+         fcb    $33
+         fcb    $fa
+         fcc    /sbcr /
+         fcb    $34
+         fcb    $fa
+         fcc    /andr /
+         fcb    $35
+         fcb    $fa
+         fcc    /orr  /
+         fcb    $36
+         fcb    $fa
+         fcc    /eorr /
+         fcb    $37
+         fcb    $fa
+         fcc    /cmpr /
+         fcb    $38
+         fcb    $fd
+         fcc    /pshsw/
+         fcb    $39
+         fcb    $fd
+         fcc    /pulsw/
+         fcb    $3a
+         fcb    $fd
+         fcc    /pshuw/
+         fcb    $3b
+         fcb    $fd
+         fcc    /puluw/
+         fcb    $40
+         fcb    $fd
+         fcc    /negd /
+         fcb    $43
+         fcb    $fd
+         fcc    /comd /
+         fcb    $44
+         fcb    $fd
+         fcc    /lsrd /
+         fcb    $46
+         fcb    $fd
+         fcc    /rord /
+         fcb    $47
+         fcb    $fd
+         fcc    /asrd /
+         fcb    $48
+         fcb    $fd
+         fcc    /asld /
+         fcb    $49
+         fcb    $fd
+         fcc    /rold /
+         fcb    $4a
+         fcb    $fd
+         fcc    /decd /
+         fcb    $4c
+         fcb    $fd
+         fcc    /incd /
+         fcb    $4d
+         fcb    $fd
+         fcc    /tstd /
+         fcb    $4f
+         fcb    $fd
+         fcc    /clrd /
+         fcb    $53
+         fcb    $fd
+         fcc    /comw /
+         fcb    $54
+         fcb    $fd
+         fcc    /lsrw /
+         fcb    $56
+         fcb    $fd
+         fcc    /rorw /
+         fcb    $59
+         fcb    $fd
+         fcc    /rolw /
+         fcb    $5a
+         fcb    $fd
+         fcc    /decw /
+         fcb    $5c
+         fcb    $fd
+         fcc    /incw /
+         fcb    $5d
+         fcb    $fd
+         fcc    /tstw /
+         fcb    $5f
+         fcb    $fd
+         fcc    /clrw /
+         fcb    $80
+         fcb    $f3
+         fcc    /subw /
+         fcb    $81
+         fcb    $f3
+         fcc    /cmpw /
+         fcb    $82
+         fcb    $f3
+         fcc    /sbcd /
+         fcb    $83
+         fcb    $f3
+         fcc    /cmpd /
+         fcb    $84
+         fcb    $f3
+         fcc    /andd /
+         fcb    $85
+         fcb    $f3
+         fcc    /bitd /
+         fcb    $86
+         fcb    $f3
+         fcc    /ldw  /
+         fcb    $88
+         fcb    $f3
+         fcc    /eord /
+         fcb    $89
+         fcb    $f3
+         fcc    /adcd /
+         fcb    $8a
+         fcb    $f3
+         fcc    /ord  /
+         fcb    $8b
+         fcb    $f3
+         fcc    /addw /
+         fcb    $8c
+         fcb    $f3
+         fcc    /cmpy /
+         fcb    $8e
+         fcb    $f3
+         fcc    /ldy  /
+         fcb    $90
+         fcb    $ff
+         fcc    /subw /
+         fcb    $91
+         fcb    $ff
+         fcc    /cmpw /
+         fcb    $92
+         fcb    $ff
+         fcc    /sbcd /
+         fcb    $93
+         fcb    $ff
+         fcc    /cmpd /
+         fcb    $94
+         fcb    $ff
+         fcc    /andd /
+         fcb    $95
+         fcb    $ff
+         fcc    /bitd /
+         fcb    $96
+         fcb    $ff
+         fcc    /ldw  /
+         fcb    $97
+         fcb    $ff
+         fcc    /stw  /
+         fcb    $98
+         fcb    $ff
+         fcc    /eord /
+         fcb    $99
+         fcb    $ff
+         fcc    /adcd /
+         fcb    $9a
+         fcb    $ff
+         fcc    /ord  /
+         fcb    $9b
+         fcb    $ff
+         fcc    /addw /
+         fcb    $9c
+         fcb    $ff
+         fcc    /cmpy /
+         fcb    $9e
+         fcb    $ff
+         fcc    /ldy  /
+         fcb    $9f
+         fcb    $ff
+         fcc    /sty  /
+         fcb    $a0
+         fcb    $f8
+         fcc    /subw /
+         fcb    $a1
+         fcb    $f8
+         fcc    /cmpw /
+         fcb    $a2
+         fcb    $f8
+         fcc    /sbcd /
+         fcb    $a3
+         fcb    $f8
+         fcc    /cmpd /
+         fcb    $a4
+         fcb    $f8
+         fcc    /andd /
+         fcb    $a5
+         fcb    $f8
+         fcc    /bitd /
+         fcb    $a6
+         fcb    $f8
+         fcc    /ldw  /
+         fcb    $a7
+         fcb    $f8
+         fcc    /stw  /
+         fcb    $a8
+         fcb    $f8
+         fcc    /eord /
+         fcb    $a9
+         fcb    $f8
+         fcc    /adcd /
+         fcb    $aa
+         fcb    $f8
+         fcc    /ord  /
+         fcb    $ab
+         fcb    $f8
+         fcc    /addw /
+         fcb    $ac
+         fcb    $f8
+         fcc    /cmpy /
+         fcb    $ae
+         fcb    $f8
+         fcc    /ldy  /
+         fcb    $af
+         fcb    $f8
+         fcc    /sty  /
+         fcb    $b0
+         fcb    $f4
+         fcc    /subw /
+         fcb    $b1
+         fcb    $f4
+         fcc    /cmpw /
+         fcb    $b2
+         fcb    $f4
+         fcc    /sbcd /
+         fcb    $b3
+         fcb    $f4
+         fcc    /cmpd /
+         fcb    $b4
+         fcb    $f4
+         fcc    /andd /
+         fcb    $b5
+         fcb    $f4
+         fcc    /bitd /
+         fcb    $b6
+         fcb    $f4
+         fcc    /ldw  /
+         fcb    $b7
+         fcb    $f4
+         fcc    /stw  /
+         fcb    $b8
+         fcb    $f4
+         fcc    /eord /
+         fcb    $b9
+         fcb    $f4
+         fcc    /adcd /
+         fcb    $ba
+         fcb    $f4
+         fcc    /ord  /
+         fcb    $bb
+         fcb    $f4
+         fcc    /addw /
+         fcb    $bc
+         fcb    $f4
+         fcc    /cmpy /
+         fcb    $be
+         fcb    $f4
+         fcc    /ldy  /
+         fcb    $bf
+         fcb    $f4
+         fcc    /sty  /
+         fcb    $ce
+         fcb    $f3
+         fcc    /lds  /
+         fcb    $dc
+         fcb    $ff
+         fcc    /ldq  /
+         fcb    $dd
+         fcb    $ff
+         fcc    /stq  /
+         fcb    $de
+         fcb    $ff
+         fcc    /lds  /
+         fcb    $df
+         fcb    $ff
+         fcc    /sts  /
+         fcb    $ec
+         fcb    $f8
+         fcc    /ldq  /
+         fcb    $ed
+         fcb    $f8
+         fcc    /stq  /
+         fcb    $ee
+         fcb    $f8
+         fcc    /lds  /
+         fcb    $ef
+         fcb    $f8
+         fcc    /sts  /
+         fcb    $fc
+         fcb    $f4
+         fcc    /ldq  /
+         fcb    $fd
+         fcb    $f4
+         fcc    /stq  /
+         fcb    $fe
+         fcb    $f4
+         fcc    /lds  /
+         fcb    $ff
+         fcb    $f4
+         fcc    /sts  /
+         fcb    $00
+         fcb    $fe
+         fcc    /fcb  /
+         pag
+*****************************************
+**  2 byte table -                     **
+**  $11 is first byte of op code       **
+*****************************************
+get11tab equ    *
+         fcb    $30
+         fcb    $f0
+         fcc    /band /
+         fcb    $31
+         fcb    $f0
+         fcc    /biand/
+         fcb    $32
+         fcb    $f0
+         fcc    /bor  /
+         fcb    $33
+         fcb    $f0
+         fcc    /bior /
+         fcb    $34
+         fcb    $f0
+         fcc    /beor /
+         fcb    $35
+         fcb    $f0
+         fcc    /bieor/
+         fcb    $36
+         fcb    $f0
+         fcc    /ldbt /
+         fcb    $37
+         fcb    $f0
+         fcc    /stbt /
+         fcb    $38
+         fcb    $fa
+         fcc    /tfm  /
+         fcb    $39
+         fcb    $fa
+         fcc    /tfm  /
+         fcb    $3a
+         fcb    $fa
+         fcc    /tfm  /
+         fcb    $3b
+         fcb    $fa
+         fcc    /tfm  /
+         fcb    $3c
+         fcb    $fb
+         fcc    /bitmd/
+         fcb    $3d
+         fcb    $fb
+         fcc    /ldmd /
+         fcb    $3f
+         fcb    $fd
+         fcc    /swi3 /
+         fcb    $43
+         fcb    $fd
+         fcc    /come /
+         fcb    $4a
+         fcb    $fd
+         fcc    /dece /
+         fcb    $4c
+         fcb    $fd
+         fcc    /ince /
+         fcb    $4d
+         fcb    $fd
+         fcc    /tste /
+         fcb    $4f
+         fcb    $fd
+         fcc    /clre /
+         fcb    $53
+         fcb    $fd
+         fcc    /comf /
+         fcb    $5a
+         fcb    $fd
+         fcc    /decf /
+         fcb    $5c
+         fcb    $fd
+         fcc    /incf /
+         fcb    $5d
+         fcb    $fd
+         fcc    /tstf /
+         fcb    $5f
+         fcb    $fd
+         fcc    /clrf /
+         fcb    $80
+         fcb    $fb
+         fcc    /sube /
+         fcb    $81
+         fcb    $fb
+         fcc    /cmpe /
+         fcb    $83
+         fcb    $f3
+         fcc    /cmpu /
+         fcb    $86
+         fcb    $fb
+         fcc    /lde  /
+         fcb    $8b
+         fcb    $fb
+         fcc    /adde /
+         fcb    $8c
+         fcb    $f3
+         fcc    /cmps /
+         fcb    $8d
+         fcb    $fb
+         fcc    /divd /
+         fcb    $8e
+         fcb    $f3
+         fcc    /divq /
+         fcb    $8f
+         fcb    $f3
+         fcc    /muld /
+         fcb    $90
+         fcb    $ff
+         fcc    /sube /
+         fcb    $91
+         fcb    $ff
+         fcc    /cmpe /
+         fcb    $93
+         fcb    $ff
+         fcc    /cmpu /
+         fcb    $96
+         fcb    $ff
+         fcc    /lde  /
+         fcb    $97
+         fcb    $ff
+         fcc    /ste  /
+         fcb    $9b
+         fcb    $ff
+         fcc    /adde /
+         fcb    $9c
+         fcb    $ff
+         fcc    /cmps /
+         fcb    $9d
+         fcb    $ff
+         fcc    /divd /
+         fcb    $9e
+         fcb    $ff
+         fcc    /divq /
+         fcb    $9f
+         fcb    $ff
+         fcc    /muld /
+         fcb    $a0
+         fcb    $f8
+         fcc    /sube /
+         fcb    $a1
+         fcb    $f8
+         fcc    /cmpe /
+         fcb    $a3
+         fcb    $f8
+         fcc    /cmpu /
+         fcb    $a6
+         fcb    $f8
+         fcc    /lde  /
+         fcb    $a7
+         fcb    $f8
+         fcc    /ste  /
+         fcb    $ab
+         fcb    $f8
+         fcc    /adde /
+         fcb    $ac
+         fcb    $f8
+         fcc    /cmps /
+         fcb    $ad
+         fcb    $f8
+         fcc    /divd /
+         fcb    $ae
+         fcb    $f8
+         fcc    /divq /
+         fcb    $af
+         fcb    $f8
+         fcc    /muld /
+         fcb    $b0
+         fcb    $f4
+         fcc    /sube /
+         fcb    $b1
+         fcb    $f4
+         fcc    /cmpe /
+         fcb    $b3
+         fcb    $f4
+         fcc    /cmpu /
+         fcb    $b6
+         fcb    $f4
+         fcc    /lde  /
+         fcb    $b7
+         fcb    $f4
+         fcc    /ste  /
+         fcb    $bb
+         fcb    $f4
+         fcc    /adde /
+         fcb    $bc
+         fcb    $f4
+         fcc    /cmps /
+         fcb    $bd
+         fcb    $f4
+         fcc    /divd /
+         fcb    $be
+         fcb    $f4
+         fcc    /divq /
+         fcb    $bf
+         fcb    $f4
+         fcc    /muld /
+         fcb    $c0
+         fcb    $fb
+         fcc    /subf /
+         fcb    $c1
+         fcb    $fb
+         fcc    /cmpf /
+         fcb    $c6
+         fcb    $fb
+         fcc    /ldf  /
+         fcb    $cb
+         fcb    $fb
+         fcc    /addf /
+         fcb    $d0
+         fcb    $ff
+         fcc    /subf /
+         fcb    $d1
+         fcb    $ff
+         fcc    /cmpf /
+         fcb    $d6
+         fcb    $ff
+         fcc    /ldf  /
+         fcb    $d7
+         fcb    $ff
+         fcc    /stf  /
+         fcb    $db
+         fcb    $ff
+         fcc    /addf /
+         fcb    $e0
+         fcb    $f8
+         fcc    /subf /
+         fcb    $e1
+         fcb    $f8
+         fcc    /cmpf /
+         fcb    $e6
+         fcb    $f8
+         fcc    /ldf  /
+         fcb    $e7
+         fcb    $f8
+         fcc    /stf  /
+         fcb    $eb
+         fcb    $f8
+         fcc    /addf /
+         fcb    $f0
+         fcb    $f4
+         fcc    /subf /
+         fcb    $f1
+         fcb    $f4
+         fcc    /cmpf /
+         fcb    $f6
+         fcb    $f4
+         fcc    /ldf  /
+         fcb    $f7
+         fcb    $f4
+         fcc    /stf  /
+         fcb    $fb
+         fcb    $f4
+         fcc    /addf /
+         fcb    $00           Unknown gets FCB's
+         fcb    $fe
+         fcc    /fcb  /
+         pag
+*****************************************
+**  1 byte op code table               **
+*****************************************
+* Position in table is opcode, byte stored there is how to interpret it
+* Interpreter bytes are:
+* $FF: Direct page mode (1 byte address)
+* $FE: FCB (unknown single byte)
+* $FD: Implied (single byte by itself)
+* $FC: 2 byte relative
+* $FB: 1 byte immediate
+* $FA: Dual register (EXG/TFR)
+* $F9: 1 byte relative
+* $F8: Indexed (1 or more post bytes)
+* $F7: Stack (PSH/PUL) register post-byte
+* $F6: ??? (internal use?)
+* $F5: SWI???
+* $F4: Extended (2 byte address)
+* $F3: 2 byte immediate
+* $F2: 4 byte immediate
+* $F1: In memory (AIM, etc.)
+* $F0: Bit commands (LDBT, etc.)
+optable  fcb    $00
+tab0x    equ    *
+         fcb    $ff   =00
+         fcc    /neg  /
+         fcb    $f1   =01
+         fcc    /oim  /
+         fcb    $f1   =02
+         fcc    /aim  /
+         fcb    $ff   =03
+         fcc    /com  /
+         fcb    $ff   =04
+         fcc    /lsr  /
+         fcb    $f1   =05
+         fcc    /eim  /
+         fcb    $ff   =06
+         fcc    /ror  /
+         fcb    $ff   =07
+         fcc    /asr  /
+         fcb    $ff   =08
+         fcc    /lsl  /
+         fcb    $ff   =09
+         fcc    /rol  /
+         fcb    $ff   =0a
+         fcc    /dec  /
+         fcb    $f1   =0b
+         fcc    /tim  /
+         fcb    $ff   =0c
+         fcc    /inc  /
+         fcb    $ff   =0d
+         fcc    /tst  /
+         fcb    $ff   =0e
+         fcc    /jmp  /
+         fcb    $ff   =0f
+         fcc    /clr  /
+tab1x    equ    *
+         fcb    $fe   =10        Unused entry; pre-byte
+         fcc    /fcb  /
+         fcb    $fe   =11        Unused entry; pre-byte
+         fcc    /fcb  /
+         fcb    $fd   =12
+         fcc    /nop  /
+         fcb    $fd   =13
+         fcc    /sync /
+         fcb    $fd   =14
+         fcc    /sexw /
+         fcb    $fe   =15
+         fcc    /fcb  /
+         fcb    $fc   =16
+         fcc    /lbra /
+         fcb    $fc   =17
+         fcc    /lbsr /
+         fcb    $fe   =18
+         fcc    /fcb  /
+         fcb    $fd   =19
+         fcc    /daa  /
+         fcb    $fb   =1a
+         fcc    /orcc /
+         fcb    $fe   =1b
+         fcc    /fcb  /
+         fcb    $fb   =1c
+         fcc    /andcc/
+         fcb    $fd   =1d
+         fcc    /sex  /
+         fcb    $fa   =1e
+         fcc    /exg  /
+         fcb    $fa   =1f
+         fcc    /tfr  /
+tab2x    equ    *
+         fcb    $f9   =20
+         fcc    /bra  /
+         fcb    $f9   =21
+         fcc    /brn  /
+         fcb    $f9   =22
+         fcc    /bhi  /
+         fcb    $f9   =23
+         fcc    /bls  /
+         fcb    $f9   =24
+         fcc    /bcc  /
+         fcb    $f9   =25
+         fcc    /bcs  /
+         fcb    $f9   =26
+         fcc    /bne  /
+         fcb    $f9   =27
+         fcc    /beq  /
+         fcb    $f9   =28
+         fcc    /bvc  /
+         fcb    $f9   =29
+         fcc    /bvs  /
+         fcb    $f9   =2a
+         fcc    /bpl  /
+         fcb    $f9   =2b
+         fcc    /bmi  /
+         fcb    $f9   =2c
+         fcc    /bge  /
+         fcb    $f9   =2d
+         fcc    /blt  /
+         fcb    $f9   =2e
+         fcc    /bgt  /
+         fcb    $f9   =2f
+         fcc    /ble  /
+tab3x    equ    *
+         fcb    $f8   =30
+         fcc    /leax /
+         fcb    $f8   =31
+         fcc    /leay /
+         fcb    $f8   =32
+         fcc    /leas /
+         fcb    $f8   =33
+         fcc    /leau /
+         fcb    $f7   =34
+         fcc    /pshs /
+         fcb    $f7   =35
+         fcc    /puls /
+         fcb    $f7   =36
+         fcc    /pshu /
+         fcb    $f7   =37
+         fcc    /pulu /
+         fcb    $fe   =38
+         fcc    /fcb  /
+         fcb    $fd   =39
+         fcc    /rts  /
+         fcb    $fd   =3a
+         fcc    /abx  /
+         fcb    $fd   =3b
+         fcc    /rti  /
+         fcb    $fb   =3c
+         fcc    /cwai /
+         fcb    $fd   =3d
+         fcc    /mul  /
+         fcb    $fe   =3e
+         fcc    /fcb  /
+         fcb    $f5   =3f
+         fcc    /swi  /
+tab4x    equ    *
+         fcb    $fd   =40
+         fcc    /nega /
+         fcb    $fe   =41
+         fcc    /fcb  /
+         fcb    $fe   =42
+         fcc    /fcb  /
+         fcb    $fd   =43
+         fcc    /coma /
+         fcb    $fd   =44
+         fcc    /lsra /
+         fcb    $fe   =45
+         fcc    /fcb  /
+         fcb    $fd   =46
+         fcc    /rora /
+         fcb    $fd   =47
+         fcc    /asra /
+         fcb    $fd   =48
+         fcc    /lsla /
+         fcb    $fd   =49
+         fcc    /rola /
+         fcb    $fd   =4a
+         fcc    /deca /
+         fcb    $fe   =4b
+         fcc    /fcb  /
+         fcb    $fd   =4c
+         fcc    /inca /
+         fcb    $fd   =4d
+         fcc    /tsta /
+         fcb    $fe   =4e
+         fcc    /fcb  /
+         fcb    $fd   =4f
+         fcc    /clra /
+tab5x    equ    *
+         fcb    $fd   =50
+         fcc    /negb /
+         fcb    $fe   =51
+         fcc    /fcb  /
+         fcb    $fe   =52
+         fcc    /fcb  /
+         fcb    $fd   =53
+         fcc    /comb /
+         fcb    $fd   =54
+         fcc    /lsrb /
+         fcb    $fe   =55
+         fcc    /fcb  /
+         fcb    $fd   =56
+         fcc    /rorb /
+         fcb    $fd   =57
+         fcc    /asrb /
+         fcb    $fd   =58
+         fcc    /lslb /
+         fcb    $fd   =59
+         fcc    /rolb /
+         fcb    $fd   =5a
+         fcc    /decb /
+         fcb    $fe   =5b
+         fcc    /fcb  /
+         fcb    $fd   =5c
+         fcc    /incb /
+         fcb    $fd   =5d
+         fcc    /tstb /
+         fcb    $fe   =5e
+         fcc    /fcb  /
+         fcb    $fd   =5f
+         fcc    /clrb /
+tab6x    equ    *
+         fcb    $f8   =60
+         fcc    /neg  /
+         fcb    $f1   =61
+         fcc    /oim  /
+         fcb    $f1   =62
+         fcc    /aim  /
+         fcb    $f8   =63
+         fcc    /com  /
+         fcb    $f8   =64
+         fcc    /lsr  /
+         fcb    $f1   =65
+         fcc    /eim  /
+         fcb    $f8   =66
+         fcc    /ror  /
+         fcb    $f8   =67
+         fcc    /asr  /
+         fcb    $f8   =68
+         fcc    /lsl  /
+         fcb    $f8   =69
+         fcc    /rol  /
+         fcb    $f8   =6a
+         fcc    /dec  /
+         fcb    $f1   =6b
+         fcc    /tim  /
+         fcb    $f8   =6c
+         fcc    /inc  /
+         fcb    $f8   =6d
+         fcc    /tst  /
+         fcb    $f8   =6e
+         fcc    /jmp  /
+         fcb    $f8   =6f
+         fcc    /clr  /
+tab7x    equ    *
+         fcb    $f4   =70
+         fcc    /neg  /
+         fcb    $f1   =71
+         fcc    /oim  /
+         fcb    $f1   =72
+         fcc    /aim  /
+         fcb    $f4   =73
+         fcc    /com  /
+         fcb    $f4   =74
+         fcc    /lsr  /
+         fcb    $f1   =75
+         fcc    /eim  /
+         fcb    $f4   =76
+         fcc    /ror  /
+         fcb    $f4   =77
+         fcc    /asr  /
+         fcb    $f4   =78
+         fcc    /lsl  /
+         fcb    $f4   =79
+         fcc    /rol  /
+         fcb    $f4   =7a
+         fcc    /dec  /
+         fcb    $f1   =7b
+         fcc    /tim  /
+         fcb    $f4   =7c
+         fcc    /inc  /
+         fcb    $f4   =7d
+         fcc    /tst  /
+         fcb    $f4   =7e
+         fcc    /jmp  /
+         fcb    $f4   =7f
+         fcc    /clr  /
+tab8x    equ    *
+         fcb    $fb   =80
+         fcc    /suba /
+         fcb    $fb   =81
+         fcc    /cmpa /
+         fcb    $fb   =82
+         fcc    /sbca /
+         fcb    $f3   =83
+         fcc    /subd /
+         fcb    $fb   =84
+         fcc    /anda /
+         fcb    $fb   =85
+         fcc    /bita /
+         fcb    $fb   =86
+         fcc    /lda  /
+         fcb    $fe   =87
+         fcc    /fcb  /
+         fcb    $fb   =88
+         fcc    /eora /
+         fcb    $fb   =89
+         fcc    /adca /
+         fcb    $fb   =8a
+         fcc    /ora  /
+         fcb    $fb   =8b
+         fcc    /adda /
+         fcb    $f3   =8c
+         fcc    /cmpx /
+         fcb    $f9   =8d
+         fcc    /bsr  /
+         fcb    $f3   =8e
+         fcc    /ldx  /
+         fcb    $fe   =8f
+         fcc    /fcb  /
+tab9x    equ    *
+         fcb    $ff   =90
+         fcc    /suba /
+         fcb    $ff   =91
+         fcc    /cmpa /
+         fcb    $ff   =92
+         fcc    /sbca /
+         fcb    $ff   =93
+         fcc    /subd /
+         fcb    $ff   =94
+         fcc    /anda /
+         fcb    $ff   =95
+         fcc    /bita /
+         fcb    $ff   =96
+         fcc    /lda  /
+         fcb    $ff   =97
+         fcc    /sta  /
+         fcb    $ff   =98
+         fcc    /eora /
+         fcb    $ff   =99
+         fcc    /adca /
+         fcb    $ff   =9a
+         fcc    /ora  /
+         fcb    $ff   =9b
+         fcc    /adda /
+         fcb    $ff   =9c
+         fcc    /cmpx /
+         fcb    $ff   =9d
+         fcc    /jsr  /
+         fcb    $ff   =9e
+         fcc    /ldx  /
+         fcb    $ff   =9f
+         fcc    /stx  /
+tabax    equ    *
+         fcb    $f8   =a0
+         fcc    /suba /
+         fcb    $f8   =a1
+         fcc    /cmpa /
+         fcb    $f8   =a2
+         fcc    /sbca /
+         fcb    $f8   =a3
+         fcc    /subd /
+         fcb    $f8   =a4
+         fcc    /anda /
+         fcb    $f8   =a5
+         fcc    /bita /
+         fcb    $f8   =a6
+         fcc    /lda  /
+         fcb    $f8   =a7
+         fcc    /sta  /
+         fcb    $f8   =a8
+         fcc    /eora /
+         fcb    $f8   =a9
+         fcc    /adca /
+         fcb    $f8   =aa
+         fcc    /ora  /
+         fcb    $f8   =ab
+         fcc    /adda /
+         fcb    $f8   =ac
+         fcc    /cmpx /
+         fcb    $f8   =ad
+         fcc    /jsr  /
+         fcb    $f8   =ae
+         fcc    /ldx  /
+         fcb    $f8   =af
+         fcc    /stx  /
+tabbx    equ    *
+         fcb    $f4   =b0
+         fcc    /suba /
+         fcb    $f4   =b1
+         fcc    /cmpa /
+         fcb    $f4   =b2
+         fcc    /sbca /
+         fcb    $f4   =b3
+         fcc    /subd /
+         fcb    $f4   =b4
+         fcc    /anda /
+         fcb    $f4   =b5
+         fcc    /bita /
+         fcb    $f4   =b6
+         fcc    /lda  /
+         fcb    $f4   =b7
+         fcc    /sta  /
+         fcb    $f4   =b8
+         fcc    /eora /
+         fcb    $f4   =b9
+         fcc    /adca /
+         fcb    $f4   =ba
+         fcc    /ora  /
+         fcb    $f4   =bb
+         fcc    /adda /
+         fcb    $f4   =bc
+         fcc    /cmpx /
+         fcb    $f4   =bd
+         fcc    /jsr  /
+         fcb    $f4   =be
+         fcc    /ldx  /
+         fcb    $f4   =bf
+         fcc    /stx  /
+tabcx    equ    *
+         fcb    $fb   =c0
+         fcc    /subb /
+         fcb    $fb   =c1
+         fcc    /cmpb /
+         fcb    $fb   =c2
+         fcc    /sbcb /
+         fcb    $f3   =c3
+         fcc    /addd /
+         fcb    $fb   =c4
+         fcc    /andb /
+         fcb    $fb   =c5
+         fcc    /bitb /
+         fcb    $fb   =c6
+         fcc    /ldb  /
+         fcb    $fe   =c7
+         fcc    /fcb  /
+         fcb    $fb   =c8
+         fcc    /eorb /
+         fcb    $fb   =c9
+         fcc    /adcb /
+         fcb    $fb   =ca
+         fcc    /orb  /
+         fcb    $fb   =cb
+         fcc    /addb /
+         fcb    $f3   =cc
+         fcc    /ldd  /
+         fcb    $f2   =cd
+         fcc    /ldq  /
+         fcb    $f3   =ce
+         fcc    /ldu  /
+         fcb    $fe   =cf
+         fcc    /fcb  /
+tabdx    equ    *
+         fcb    $ff   =d0
+         fcc    /subb /
+         fcb    $ff   =d1
+         fcc    /cmpb /
+         fcb    $ff   =d2
+         fcc    /sbcb /
+         fcb    $ff   =d3
+         fcc    /addd /
+         fcb    $ff   =d4
+         fcc    /andb /
+         fcb    $ff   =d5
+         fcc    /bitb /
+         fcb    $ff   =d6
+         fcc    /ldb  /
+         fcb    $ff   =d7
+         fcc    /stb  /
+         fcb    $ff   =d8
+         fcc    /eorb /
+         fcb    $ff   =d9
+         fcc    /adcb /
+         fcb    $ff   =da
+         fcc    /orb  /
+         fcb    $ff   =db
+         fcc    /addb /
+         fcb    $ff   =dc
+         fcc    /ldd  /
+         fcb    $ff   =dd
+         fcc    /std  /
+         fcb    $ff   =de
+         fcc    /ldu  /
+         fcb    $ff   =df
+         fcc    /stu  /
+tabex    equ    *
+         fcb    $f8   =e0
+         fcc    /subb /
+         fcb    $f8   =e1
+         fcc    /cmpb /
+         fcb    $f8   =e2
+         fcc    /sbcb /
+         fcb    $f8   =e3
+         fcc    /addd /
+         fcb    $f8   =e4
+         fcc    /andb /
+         fcb    $f8   =e5
+         fcc    /bitb /
+         fcb    $f8   =e6
+         fcc    /ldb  /
+         fcb    $f8   =e7
+         fcc    /stb  /
+         fcb    $f8   =e8
+         fcc    /eorb /
+         fcb    $f8   =e9
+         fcc    /adcb /
+         fcb    $f8   =ea
+         fcc    /orb  /
+         fcb    $f8   =eb
+         fcc    /addb /
+         fcb    $f8   =ec
+         fcc    /ldd  /
+         fcb    $f8   =ed
+         fcc    /std  /
+         fcb    $f8   =ee
+         fcc    /ldu  /
+         fcb    $f8   =ef
+         fcc    /stu  /
+tabfx    equ    *
+         fcb    $f4   =f0
+         fcc    /subb /
+         fcb    $f4   =f1
+         fcc    /cmpb /
+         fcb    $f4   =f2
+         fcc    /sbcb /
+         fcb    $f4   =f3
+         fcc    /addd /
+         fcb    $f4   =f4
+         fcc    /andb /
+         fcb    $f4   =f5
+         fcc    /bitb /
+         fcb    $f4   =f6
+         fcc    /ldb  /
+         fcb    $f4   =f7
+         fcc    /stb  /
+         fcb    $f4   =f8
+         fcc    /eorb /
+         fcb    $f4   =f9
+         fcc    /adcb /
+         fcb    $f4   =fa
+         fcc    /orb  /
+         fcb    $f4   =fb
+         fcc    /addb /
+         fcb    $f4   =fc
+         fcc    /ldd  /
+         fcb    $f4   =fd
+         fcc    /std  /
+         fcb    $f4   =fe
+         fcc    /ldu  /
+         fcb    $f4   =ff
+         fcc    /stu  /
+         pag
+
+
+testing  equ   0 (0=no,1=yes)
+regtab   fcc   /d x y u s pcw v a b ccdp0 0 e f /
+stackreg fcc   /pcu y x dpb a cc/
+timesplt fcc   '// :: '
+title    equ   *
+         fcc   /program module       /
+         fcc   /subroutine module    /
+         fcc   /multi-module         /
+         fcc   /data module          /
+         fcc   /os9 system module    /
+         fcc   /os9 file manager     /
+         fcc   /os9 device driver    /
+         fcc   /os9 device descriptor/
+badindx  fcc   /?????????????????????/
+devtype  equ   *
+         fcc   /Prgrm/
+         fcc   /Sbrtn/
+         fcc   /Multi/
+         fcc   /Data /
+         fcc   /Systm/
+         fcc   /FlMgr/
+         fcc   /Drivr/
+         fcc   /Devic/
+         fcc   /?????/
+language equ   *
+         fcc   /Objct   /
+         fcc   /ICode   /
+         fcc   /PCode   /
+         fcc   /CCode   /
+         fcc   /CblCode /
+         fcc   /FrtnCode/
+         fcc   /???????? /
+reent.   fcc   /ReEnt /
+modprot. fcc   /Modprot /
+line010  fcc   /         ifp1/
+line011  fcb   $0d
+ln010sz  equ   *-line010
+line020  fcc   %         use   /%
+ln020sz  equ   *-line020
+line025  fcc   %/defs/os9defs%
+         fcb   $0d
+ln025sz  equ   *-line025
+line030  fcc   /         endc/
+         fcb   $0d
+ln030sz  equ   *-line030
+line040  fcc   /                    /
+         fcc   /                    /
+         fcc   /                    /
+         fcc   /                    /
+
+line050  fcc   /         mod   /
+         fcc   /eom,name,tylg,/
+         fcc   /atrv,start,size/
+         fcb   $0d
+ln050sz  equ   *-line050
+line060  fcc   %fcs   /%
+ln060sz  equ   *-line060
+line070  fcc   /u0000    rmb   /
+ln070sz  equ   *-line070
+line080  fcc   /<u/
+line085  fcc   /<$/
+line090  fcc   /fcb   $/
+ln090sz  equ   *-line090
+line100  fcc   /name     equ   */
+ln100sz  equ   *-line100
+line110  fcc   /         rmb   /
+ln110sz  equ   *-line110
+line120  fcc   /size     equ   ./
+         fcb   $0d
+ln120sz  equ   *-line120
+line130  fcc   /start    equ   */
+         fcb   $0d
+ln130sz  equ   *-line130
+line140  fcc   /swi2/
+ln140sz  equ   *-line140
+line150  fcc   /os9   /
+ln150sz  equ   *-line150
+line160  fcc   /         ttl   /
+ln160sz  equ   *-line160
+line170  fcc   /         emod/
+         fcb   $0d
+ln170sz  equ   *-line170
+line180  fcc   /eom      equ   */
+         fcb   $0d
+ln180sz  equ   *-line180
+line190  fcc   /equ   */
+ln190sz  equ   *-line190
+line200  fcb   $0a
+         fcc   /error: can't link to module/
+         fcb   $0d
+ln200sz  equ   *-line200
+line210  fcc   /* Disassembled /
+ln210sz  equ   *-line210
+line215  fcc   /by Disasm v1./
+         fcb   edition
+         fcc   / (C) 1988 by RML/
+ln215sz  equ   *-line215
+line220  fcc   /,pcr/
+ln220sz  equ   *-line220
+line230  fcb   $0a
+         fcc   /* entries in symbol table :$/
+ln230sz  equ   *-line230
+line240  fcb   $0a
+         fcb   $0a
+         fcc   /error: symbol table full/
+         fdb   $070d
+ln240sz  equ   *-line240
+line250  fcb   $0a
+         fcb   $0a
+         fcc   /error: illegal option/
+         fdb   $070d
+ln250sz  equ   *-line250
+line260  fcb   $0a
+         fcc   %error: no module/path name found%
+         fcb   $0a
+         fcc   /use Disasm -? for help/
+         fdb   $070d
+ln260sz  equ   *-line260
+line270  fcb   $0a
+         fcc   /  Disasm v1./
+         fcb   edition
+         fcc   / (for 6809 & 6309 code) options:/
+         fcb   $0a
+         fcc   /  Disasm -m modname/
+         fcb   $0a
+         fcc   /    will link to module 'modname' -/
+         fcc   / if not found,will load module/
+         fcb   $0a
+         fcb   $0a
+         fcc   /  Disasm modname/
+         fcb   $0a
+         fcc   /    will 'read' the module from the/
+         fcc   / specified path without loading/
+         fcb   $0a,$0a
+         fcc   /  Disasm -z {hex data}/
+         fcb   $0a
+         fcc   /    will disassemble the data input on the comand line/
+         fcb   $0a
+         fcc   /    as if it were part of a module in memory/
+         fcb   $0a,$0a
+         fcc   /  other options:/
+         fcb   $0a
+         fcc   /    o = display line number,address,object code & source code/
+         fcb   $0a
+         fcc   /    x = take modules from execution directory/
+         fcb   $0a
+         fcc   '    u = do not convert u/dp offsets to symbolic labels'
+         fcb   $0a,$0a
+         fcc   /  any combination of options is allowed (lower or upper case)/
+         fcb   $0a
+         fcc   /    but they must immediately follow the '-' and there must be/
+         fcb   $0a
+         fcc   /    no spaces separating options./
+         fcb   $0a
+ln270sz  equ   *-line270
+line280  fcc   /         nam   /
+ln280sz  equ   *-line280
+line290  fcc   /tylg     set   /
+ln290sz  equ   *-line290
+line300  fcc   /atrv     set   /
+ln300sz  equ   *-line300
+line310  fcc   /rev      set   $/
+ln310sz  equ   *-line310
+line320  fcc   /+rev/
+ln320sz  equ   *-line320
+line330  fcc   /         mod   /
+         fcc   /eom,name,tylg,/
+         fcc   /atrv,mgrnam,drvnam/
+         fcb   $0d
+ln330sz  equ   *-line330
+
+line340  fcc    /mode byte/
+ln340sz  equ    *-line340
+line350  fcc    /extended controller address/
+ln350sz  equ    *-line350
+line360  fcc    / physical controller address/
+ln360sz  equ    *-line360
+line370  fcc    /fdb   $/
+ln370sz  equ    *-line370
+line380  fcc    /fcb   initsize-*-1  initilization table size/
+ln380sz  equ    *-line380
+line390  fcc    /device type:0=scf,1=rbf,2=pipe,3=scf/
+ln390sz  equ    *-line390
+line400  fcc    /initsize equ   */
+ln400sz  equ    *-line400
+line410  fcc    /mgrnam   equ   */
+ln410sz  equ    *-line410
+line420  fcc    /drvnam   equ   */
+ln420sz  equ    *-line420
+line430  fcc    /fdb   name copy of descriptor name address/
+ln430sz  equ    *-line430
+rbfprint fcc    /1drive number/
+         fcb    cr
+         fcc    /1step rate/
+         fcb    cr
+         fcc    /1drive device type/
+         fcb    cr
+         fcc    /1media density:0=single,1=double/
+         fcb    cr
+         fcc    /2number of cylinders (tracks)/
+         fcb    cr
+         fcc    /1number of sides/
+         fcb    cr
+         fcc    /1verify disk writes:0=on/
+         fcb    cr
+         fcc    /2# of sectors per track/
+         fcb    cr
+         fcc    /2# of sectors per track (track 0)/
+         fcb    cr
+         fcc    /1sector interleave factor/
+         fcb    cr
+         fcc    /1minimum size of sector allocation/
+         fcb    cr
+         fcc    /1?/
+         fcb    cr
+
+scfprint equ    *
+         fcc    /1case:0=up&lower,1=upper only/
+         fcb    cr
+         fcc    /1backspace:0=bsp,1=bsp then sp & bsp/
+         fcb    cr
+         fcc    /1delete:0=bsp over line,1=return/
+         fcb    cr
+         fcc    /1echo:0=no echo/
+         fcb    cr
+         fcc    /1auto line feed:0=off/
+         fcb    cr
+*
+         fcc    /1end of line null count/
+         fcb    cr
+         fcc    /1pause:0=no end of page pause/
+         fcb    cr
+         fcc    /1lines per page/
+         fcb    cr
+         fcc    /1backspace character/
+         fcb    cr
+         fcc    /1delete line character/
+         fcb    cr
+         fcc    /1end of record character/
+         fcb    cr
+         fcc    /1end of file character/
+         fcb    cr
+         fcc    /1reprint line character/
+         fcb    cr
+         fcc    /1duplicate last line character/
+         fcb    cr
+         fcc    /1pause character/
+         fcb    cr
+         fcc    /1interrupt character/
+         fcb    cr
+         fcc    /1quit character/
+         fcb    cr
+         fcc    /1backspace echo character/
+         fcb    cr
+         fcc    /1line overflow character (bell)/
+         fcb    cr
+         fcc    /1init value for dev ctl reg/
+         fcb    cr
+         fcc    /1baud rate/
+         fcb    cr
+         fcc    /3/
+         fcc    /1acia xon char/
+         fcb    cr
+         fcc    /1acia xoff char/
+         fcb    cr
+         fcc    /1(szx) number of columns for display/
+         fcb    cr
+         fcc    /1(szy) number of rows for display/
+         fcb    cr
+         fcc    /1window number/
+         fcb    cr
+         fcc    /1data in rest of descriptor valid/
+         fcb    cr
+         fcc    /1(sty) window type/
+         fcb    cr
+         fcc    /1(cpx) x cursor position/
+         fcb    cr
+         fcc    /1(cpy) y cursor position/
+         fcb    cr
+         fcc    /1(prn1) foreground color/
+         fcb    cr
+         fcc    /1(prn2) background color/
+         fcb    cr
+         fcc    /1(prn3) border color/
+         fcb    cr
+scfpend  fcc    /1?/
+         fcb    cr
+*        use    /dd/defs/usr/usrall
+
+start    equ    *
+         sts   <stackhld save the stack address for later
+         stx   <xreghold
+         stu   <ureghold
+         cmpd  #2
+         bhs   pathok
+         leax  line260,pcr
+         ldy   #ln260sz
+         lbra  prterror
+pathok   equ   *
+         leax  labeltab,u
+         stx   <labladr
+         clra
+         sta   ,x+
+         sta   ,x+
+         leax  -500,s
+*        leax  labeltab+40,u
+         stx   <utabend
+         ldd   #$ffff
+         std   ,x
+         leax  -2,x
+         stx   <highadr
+         ldd   #0
+         std   ,x
+         clr   <pass
+         clr   <diskio
+         clr   <m.opt
+         clr   <o.opt
+         clr   <x.opt
+         clr   <z.opt
+         clr   <u.opt
+         clr   <op.cnt
+         clr   <descript
+         lbsr  clrline
+
+restart  equ   *
+         clr   <readcnt
+         clr   <readclr
+         leax  readbuff,u
+         stx   <readpos
+         ldd   #0
+         std   <numline
+         ldx   #$ffff
+         stx   <modend
+         ldx   <xreghold
+         tst   <pass
+         lbeq  getprm
+         lbsr  clrline
+         leay  line280,pcr
+         ldb   #ln280sz
+         lbsr  mergline
+         leay  holdname,u
+         ldb   #$44
+         lbsr  mergline
+         lbsr  writline
+         leay  hldttl,u
+         ldb   #40
+         lbsr  mergline
+         lbsr  writline
+         lbsr  writline
+         leax  holdobj,u
+         tst   <o.opt
+         bne   time010 
+         leax  holdline,u
+time010
+         stx   <lineadr
+         leay  line210,pcr
+         ldb   #ln210sz
+         lbsr  mergline
+         leax  runtime,u
+         os9   F$Time get time
+         lbcs  exit
+         lda   #6
+         sta   <temp
+         leay  timesplt,pcr
+time020
+         ldb   ,x+
+         clra
+         pshs  x
+         pshs  y
+         leay  decstrng,u
+         lbsr  getdec
+         leay  decstrng+3,u
+         ldb   #2
+         lbsr  mergline
+         puls  y
+         lda   ,y+
+         lbsr  movechar
+         puls  x
+         dec   <temp
+         bne   time020
+         leay  line215,pcr
+         ldb   #ln215sz
+         lbsr  mergline
+         lbsr  writline
+         lbsr  writline
+
+         leay  line010,pcr
+         ldb   #ln010sz
+         lbsr  mergline
+         lbsr  writline
+         leay  line020,pcr
+         ldb   #ln020sz
+         lbsr  mergline
+         leay  dfltdrv,pcr
+         ldb   #2
+         lbsr  mergline
+         leay  line025,pcr
+         ldb   #ln025sz
+         lbsr  mergline
+         lbsr  writline
+         leay  line030,pcr
+         ldb   #ln030sz
+         lbsr  mergline
+         lbsr  writline
+         ldb   <tylghold
+         bsr   movehdr
+         leay  hldtylg,u
+         ldb   #$50
+         lbsr  mergline
+         lbsr  writline
+         ldb   <atrvhold
+         bsr   movehdr
+         leay  hldatrv,u
+         ldb   #$50
+         lbsr  mergline
+         lbsr  writline
+         ldb   <revshold
+         bsr   movehdr
+         leay  hldrev,u
+         ldb   #$50
+         lbsr  mergline
+         lbsr  writline
+         ldx   <xreghold
+         tst   <diskio
+         lbne  diskmod
+         lbra  mem020
+
+movehdr  equ   *
+         clra
+         lbsr  gethex
+         leax  holdadr,u
+         leay  hexstrng,u
+         ldb   #4
+         lbsr  merge
+         rts
+
+getprm   lda   ,x+
+         cmpa  #$20
+         beq   getprm
+         leax  -1,x
+         stx   <xreghold
+         cmpa  #'-
+         lbne  diskmod
+         leax  1,x
+getopt   equ   *
+         lda   ,x+
+         sta   <byte
+         anda  #$df
+         cmpa  #'M
+         bne   gtopt010
+         inc   <m.opt
+         inc   <op.cnt
+         bra   getopt
+gtopt010 cmpa  #'O
+         bne   gtopt020
+         inc   <o.opt
+         inc   <op.cnt
+         bra   getopt
+gtopt020 equ   *
+         cmpa  #'X
+         bne   gtopt030
+         inc   <x.opt
+         inc   <op.cnt
+         bra   getopt
+
+gtopt030 equ   *
+         cmpa  #'Z
+         bne   gtopt040
+         inc   <z.opt
+         inc   <op.cnt
+         bra   getopt
+
+gtopt040 equ   *
+         cmpa  #'U
+         bne   gtopt050
+         inc   <u.opt
+         inc   <op.cnt
+         bra   getopt
+
+gtopt050 equ   *
+         lda   <byte
+         cmpa  #'?
+         bne   chkopt
+         leax  line270,pcr
+         ldy   #ln270sz
+         lbra  prterror
+chkopt   equ   *
+         tst   <z.opt
+         beq   optest
+         lbsr  u$hexin convert hex chars to binary
+         leay  3,y
+         sty   <modend
+         leax  -1,x
+         stx   <crntadr
+         ldd   #$FFFF
+         std   <address
+         lda   #1
+         sta   <pass
+         leax  line011,pcr
+         ldy   #1
+         lda   #1
+         os9   I$WritLn
+         lbcs  exit
+         lbra  readbyte go start doing it!!!
+ 
+optest   tst   <op.cnt
+         bne   memmod
+badopt   equ   *
+         leax  line250,pcr
+         ldy   #ln250sz
+         lbra  prterror
+diskmod  equ   *
+         inc   <diskio
+         lda   #read.
+         tst   <x.opt
+         beq   open
+         ora   #exec.
+open     os9   i$open
+         lbcs  exit
+         sta   <path
+         lbsr  getbyte
+         bra   gotmod
+memmod   equ   *
+mem010   lda   ,x+
+         cmpa  #$20
+         beq   mem010
+         leax  -1,x
+         stx   <xreghold
+         tst   <m.opt
+         beq   diskmod
+
+mem020   equ   *
+         clra  
+         os9   f$link
+         bcc   gotmod
+         clra
+         ldx   <xreghold
+         os9   f$load
+         lbcs  nolink
+gotmod   equ   *
+         stu   <modadr
+         stu   <crntadr
+         ldu   <ureghold
+         ldx   #0
+         stx   <address
+         lbsr  getbyte
+         lbsr  getbyte2
+         std   <modend
+         lbsr  clrline
+         lda   #$87
+         lbsr  moveobj
+         lda   #$cd
+         lbsr  moveobj
+         ldd   <modend
+         lbsr  moveobj
+         ldd   <modend
+         tfr   b,a
+         lbsr  moveobj
+         leay  holdadr,u
+         lda   #$30
+         sta   ,y+
+         sta   ,y+
+         sta   ,y+
+         sta   ,y+
+         leay  line050,pcr
+         ldb   #ln050sz
+         tst   <descript
+         beq   prtmod
+         leay  line330,pcr
+         ldb   #ln330sz
+prtmod   equ   *
+         lbsr  mergline
+         lbsr  writline
+         lbsr  getbyte2
+         std   <nameadr
+         leay  hldtylg,u
+         lbsr  clrhld
+         leay  line290,pcr
+         ldb   #ln290sz
+         lbsr  mergline
+         lbsr  getbyte
+         stb   <tylghold
+         andb  #typemask
+         tstb
+         beq   badtype
+         cmpb  #$40
+         bls   goodtype
+         cmpb  #$c0
+         bhs   goodtype
+badtype  equ   *
+         lbsr  mvchr005
+         lbsr  merghex
+         bra   chklang
+goodtype equ   *
+         lsrb
+         lsrb
+         lsrb
+         lsrb
+         cmpb  #$0c
+         blo   type010
+         subb  #$7
+         cmpb  #8
+         bne   type010
+         inc   <descript
+type010  subb  #1
+         stb   <testbyte
+         lda   #$5
+         mul
+         leay  devtype,pcr
+         leay  d,y
+         ldb   #5
+         lbsr  mergline
+chklang  equ   *
+         lbsr  mvchr008
+         ldb   <byte
+         andb  #langmask
+         tstb
+         beq   badlang
+         cmpb  #6
+         bls   goodlang
+badlang  equ   *
+         lbsr  mvchr005
+         lbsr  merghex
+         bra   lang010
+goodlang equ   *
+         subb  #1
+         leay  language,pcr
+         lda   #8
+         mul
+         leay  d,y
+         ldb   #8
+         lbsr  mergline
+lang010  equ   *
+         lda   #$0d
+         lbsr  movechar
+chkattr  equ   *
+         leay  hldttl,u
+         lbsr  clrhld
+         leay  line160,pcr
+         ldb   #ln160sz
+         lbsr  mergline
+         ldb   <testbyte
+         lda   #$15
+         mul
+         leay  title,pcr
+         leay  d,y
+         ldb   #$15
+         lbsr  mergline
+         lda   #$0d
+         lbsr  movechar
+         leay  hldatrv,u
+         lbsr  clrhld
+         leay  line300,pcr
+         ldb   #ln300sz
+         lbsr  mergline
+         lbsr  getbyte
+         stb   <atrvhold
+         andb  #attrmask
+         cmpb  #reent
+         beq   attr.r
+         cmpb  #modprot
+         beq   attr.m
+         lbsr  mvchr005
+         lbsr  merghex
+         bra   chkrevs
+attr.r   equ   *
+         leay  reent.,pcr
+         ldb   #5
+         bra   moveattr
+attr.m   equ   *
+         leay  modprot.,pcr
+         ldb   #7
+moveattr lbsr  mergline
+chkrevs  leay  line320,pcr
+         ldb   #ln320sz
+         lbsr  mergline
+         lda   #$0d
+         lbsr  movechar
+         leay  hldrev,u
+         lbsr  clrhld
+         leay  line310,pcr
+         ldb   #ln310sz
+         lbsr  mergline
+         ldb   <byte
+         andb  #revsmask
+         stb   revshold
+         lbsr  merghex
+         lda   #$0d
+         lbsr  movechar
+         lbsr  getbyte
+         tst   <descript
+         lbne  descrhdr
+         lbsr  getbyte2
+         std   <startadr
+         lbsr  getbyte2
+         std   <size
+         ldx   <utabend
+         std   ,x
+         lbsr  clrline
+         tst   <pass
+*        lbra  findname
+  
+         ldx   <address
+         stx   <addrsave
+         ldx   <highadr
+         tst   <u.opt
+         beq   movedp
+         ldx   <utabend
+         leax  -2,x
+         clra
+         clrb
+         std   ,x
+
+movedp   equ   *
+         ldd   ,x++
+         pshs  x
+         std   <address
+         lbsr  adrmove
+         leay  line070,pcr
+         ldb   #ln070sz
+         lbsr  mergline
+         leay  linenum,u
+         lda   #'D
+         sta   6,y
+         leax  holdadr,u
+         leay  25,y
+         ldb   #4
+         exg   x,y
+         lbsr  merge
+         puls  x
+         ldd   ,x
+         subd  -2,x
+         pshs  x
+         lbsr  mergdec
+         lbsr  writline
+         puls  x
+         ldd   ,x
+         cmpd  <size
+         bne   movedp
+ 
+         ldd   <size
+         lbsr  gethex
+         leay  hexstrng,u
+         leax  holdadr,u
+         ldb   #4
+         lbsr  merge
+         leay  linenum,u
+         leay  6,y
+         lda   #'D
+         sta   ,y
+         leay  line120,pcr
+         ldb   #ln120sz
+         lbsr  mergline
+         lbsr  writline
+         ldx   <addrsave
+         stx   <address
+
+findname equ   *
+         lbsr  getbyte
+         ldx   <nameadr
+         cmpx  <address
+         beq   getname
+         lbsr  fcbline
+         bra   findname
+
+getname  equ   *
+         lbsr  clrline
+         lbsr  adrmove
+         leay  line100,pcr
+         ldb   #ln100sz
+         lbsr  mergline
+         lbsr  writline
+         leay  holdname,u
+         lbsr  movename
+getstart lbsr  getbyte
+         ldx   <address 
+         cmpx  <startadr
+         beq   gotstart
+         lbsr  fcbline
+         bra   getstart
+gotstart equ   *
+         lbsr  clrline
+         lbsr  adrmove
+         leay  line130,pcr
+         ldb   #ln130sz
+         lbsr  mergline
+         lbsr  writline
+         lda   <byte
+         lbsr  moveobj
+         bra   testop
+readbyte lbsr  getbyte
+* Check opcodes
+testop   equ   *
+         clr   <bitcom        Clear bit instruction processing flag
+         lbsr  moveadr        Go bump address up?
+         lda   <byte          Get next byte
+         cmpa  #$10           Is it a $10?
+         bne   test11         No, check for next special one
+         lbsr  getbyte        Is $10, get next byte
+         cmpb  #$3f           OS9 System call?
+         bne   test10         No, do rest of check for $10 pre-byte
+         lbsr  getbyte        Get function code
+         tfr   b,a            Move to A
+         ldb   #$3f           Go get proper mnemonic for System call
+         lbsr  getop
+         cmpa  #'?            Unknown one?
+         bne   os9ok          No, print out regular system call
+         leax  holdobj,u      Unknown, deal with it
+         stx   <objadr
+         clr   <objcnt
+         lda   #$10
+         lbsr  moveobj
+         lda   #$3f
+         lbsr  moveobj
+         ldx   <objadr
+         ldd   #$2020
+         std   ,x
+         ldx   <lineadr
+         leax  -15,x
+         stx   <lineadr
+         leay  line140,pcr    Print SWI2 message
+         ldb   #ln140sz
+         lbsr  mergline
+         lbsr  writline
+         lda   <testbyte
+         sta   <byte
+         lbsr  fcbline        And FCB byte following it
+         bra   readbyte
+
+* Got recognizable OS9 System call... print it
+os9ok    lbsr  writline
+         bra   readbyte
+* $10 Pre-byte OTHER than SWI2 (system calls)
+
+test10   tfr   b,a            Put opcode part into A
+         ldb   #$10           Go get proper mnemonic type for $10xx code
+         lbsr  getop
+         cmpb  #$fe           Unknown opcode?
+         bne   chkreslt       No, deal with result
+         lda   #$10           Unknown, convert to FCB line
+         bra   tst11.1
+test11   cmpa  #$11           $11 pre-byte?
+         bne   onebyte        No, must be normal
+         lbsr  getbyte        Get opcode part of $11xx command
+         tfr   b,a            Put into A
+         ldb   #$11           $11 pre-byte
+         lbsr  getop          Go get proper mnemonic type for $11xxx code
+         cmpb  #$fe           Unknown opcode?
+         bne   chkreslt       No, deal with result
+         lda   #$11           Make FCB line
+tst11.1  ldb   <byte
+         pshs  b
+         sta   <byte
+         ldx   <address
+         leax  -1,x
+         stx   <address
+         lbsr  fcbline
+         puls  b
+         stb   <byte
+         tfr   b,a
+         lbsr  moveobj
+         ldx   <address
+         leax  1,x
+         stx   <address
+         lbra  testop
+
+* Opcode type branch table
+rslttab  fdb   chk.ff         Direct page (1 byte address)
+         fdb   dofcb          FCB (Unknown type... should never get here!)
+         fdb   chk.fd         Implied (single byte by itself)
+         fdb   chk.fc         2 byte relative (long branches)
+         fdb   chk.fb         1 byte immediate value
+         fdb   chk.fa         Dual register spec (EXG/TFR)
+         fdb   chk.f9         1 byte relative (short branches)
+         fdb   chk.f8         Indexed (1 or more post bytes)
+         fdb   chk.f7         Stack (PSH/PUL) register post-byte
+         fdb   chk.f6         ???
+         fdb   chk.f5         SWI
+         fdb   chk.f4         Extended (2 byte address)
+         fdb   chk.f3         2 byte immediate value
+         fdb   chk.f2         4 byte immediate
+         fdb   chk.f1         in memory (AIM, etc.)
+         fdb   chk.f0         Bit commands (LDBT, etc.)
+         
+onebyte  clrb                 Clear $10/$11/Syscall flag
+         lbsr  getop          Get type into B/Code in <testbyte
+
+chkreslt cmpb  #$f0           Check legal limit of opcode type
+         blo   dofcb          If <$F0, assume FCB
+         comb                 Flip bits
+         lslb                 2 bytes per entry
+         leax  rslttab,pcr    Point to opcode type table
+         ldd   b,x            Get offset to proper routine
+         leax  pcrzero,pcr    Point to start of module
+         jmp   d,x            Go process proper type
+
+* Illegal opcode-FCB it
+dofcb    lbsr  fcbline
+         lbra  readbyte
+
+* Direct Page Addr - 1 byte
+chk.ff   leay  line080,pc
+         tst   <u.opt         User wants Symbolic labels?
+         beq   ff.010         Yes, do so
+         leay  line085,pcr    No, use <$00xx instead
+ff.010   ldb   #2             In both cases, 2 chars to merge
+         lbsr  mergline       Merge onto current output line
+         lbsr  getbyte        Get direct page address byte
+         clra                 Make for 4 digit hex number
+         lbsr  merghex2       Merge 4 digit hex result onto output line
+         tst   <u.opt         Direct page currently @ 0?
+         lbeq  indx046        put address in u table & write out line
+
+* Inherent Addr - 0 bytes (also exit point when line is completed)
+chk.fd   lbsr  writline       Flush line out & continue processing
+         lbra  readbyte
+
+* Relative Addr - 2 bytes
+chk.fc   lbsr  getbyte2       Get 2 byte relative offset
+         lbsr  reladr.2       Calculate relative address & append it
+         bra   chk.fd         Write out line
+
+* Immediate Addr - 1 byte
+chk.fb   lbsr  mvchr004       Add '#' to line
+         lbsr  mvchr005       Add '$' to line
+         lbsr  getbyte        Get immediate value
+         lbsr  merghex        Add hex version to line
+         bra   chk.fd         Write it out
+
+* Dual register field
+* (used only for TFR/EXG/TFM & register to register operations)
+chk.fa   lda   <testbyte      Get original opcode
+         clr   <TFMFlag       Clear TFM flag
+         cmpa  #$38           TFM?
+         blo   normtf         No, skip ahead
+         cmpa  #$3b
+         bhi   normtf
+         inc   <TFMFlag       Set TFM flag
+normtf   lbsr  getbyte        Get register field byte
+         pshs  b              Preserve
+         lsrb                 Move source reg. into proper pos.
+         lsrb
+         lsrb
+         lsrb
+         bsr   fa.020         Add it to line
+         lda   <testbyte      Get original opcode
+         cmpa  #$38           Is it a TFM?
+         blo   notTFM         Too low
+         cmpa  #$3B
+         bhs   notTFM         Too high (or is r1,r2+ and doesn't need sign)
+         cmpa  #$39           TFM r1-,r2-?
+         bne   Tplus1
+         lbsr  mvchr009       Add '-'
+         bra   notTFM
+Tplus1   lbsr  mvchr008       Add '+'
+notTFM   lda   #',            Add comma to line
+         lbsr  movechar
+         puls  b              Get back field byte
+         andb  #$0f           Just destination reg.         
+         bsr   fa.020         Add it to line
+         lda   <testbyte      Get original opcode
+         cmpa  #$38           Is it a TFM?
+         blo   notTFM2        Too low
+         cmpa  #$3B
+         bhi   notTFM2        Too high
+         cmpa  #$3A           TFM r1+,r2?
+         beq   notTFM2        Yes, don't need to add anything
+         cmpa  #$39           TFM r1-,r2-?
+         bne   Tplus2
+         lbsr  mvchr009       Add '-'
+         bra   notTFM2
+Tplus2   lbsr  mvchr008       Add '+'
+notTFM2  lbsr  writline       Write line & leave
+         lbra  readbyte
+
+fa.020   lslb                 2 bytes/entry
+         leax  regtab,pc      Point to register field table
+         ldd   b,x            Get register name
+         tst   <TFMFlag       Is this a TFM command?
+         beq   normreg        No, allow all register names
+         cmpb  #$20           2 char. register name?
+         bne   badreg         Yes, illegal in TFM
+         cmpa  #'s            Lower than S register?
+         blo   badreg
+         cmpa  #'w            W register?
+         bne   normreg        No, all others are legal
+badreg   ldd   #'?*256+'?     Illegal register, use question marks         
+normreg  bsr   movereg        Add to end of line (eating spaces)
+         rts
+
+movereg  lbsr  movechar       Add first char of reg. name to line
+         cmpb  #$20           2nd char a space?
+         beq   mvreg010       Yes, exit
+         tfr   b,a            Move to proper reg.
+         lbsr  movechar       And add 2nd char of reg. name to line
+mvreg010 rts
+
+* Relative Addr - 1 byte
+chk.f9   lbsr  getbyte        Get relative offset byte
+         lbsr  reladr.1       Calculate & add it to line
+         lbra  chk.fd         Print line
+
+indxregs fcb   %00000000,'x
+         fcb   %00100000,'y
+         fcb   %01000000,'u
+         fcb   %01100000,'s
+* Index table routine list for both normal & indirect modes
+indxjmp  fcb   %10000100      Zero offset ($84)
+         fdb   indx010
+         fcb   %10001000      8 bit offset ($88)
+         fdb   indx.3
+         fcb   %10001001      16 bit offset ($89)
+         fdb   indx.4
+         fcb   %10000110      A,R ($86)
+         fdb   indx.5
+         fcb   %10000101      B,R ($85)
+         fdb   indx.6
+         fcb   %10001011      D,R ($8B)
+         fdb   indx.7
+         fcb   %10000111      E,R ($87)
+         fdb   indx.E
+         fcb   %10001010      F,R ($8a)
+         fdb   indx.F
+         fcb   %10001110      W,R ($8e)
+         fdb   indx.W
+         fcb   %10000000      ,R+ ($80)
+         fdb   indx.8
+         fcb   %10000001      ,R++ ($81)
+         fdb   indx.9
+         fcb   %10000010      ,-R ($82)
+         fdb   indx.10
+         fcb   %10000011      ,--R ($83)
+         fdb   indx.11
+         fcb   %10001100      8 bit,PC ($8C)
+         fdb   indx.12
+         fcb   %10001101      16 bit,PC ($8D)
+         fdb   indx.13
+         fcb   %10001111      Non-indirect W modes ($8f)
+         fdb   indx.Wm
+         fcb   0 table end    (any patterns not covered are illegal)
+
+* indexed addr - 1 or 2 bytes
+chk.f8   clr   <indirct       Clear indirect flag
+         lbsr  getbyte        Get byte into B (and duplicate in <byte>)
+         andb  #%10011111     Mask out register bits (mode bits for W)
+         cmpb  #%10001111     W base (non-indirect)?
+         beq   isw            Yes, set register name
+         cmpb  #%10010000     W base (indirect)?
+         beq   isw            Yes, set register name
+         ldb   <byte          Get original byte back
+         bra   notw           Do normal search
+isw      ldb   #'w            W register is base register
+         bra   streg          Store it as base register
+notw     andb  #%01100000     Register mask
+         leax  indxregs-2,pc  Point to register offsets -2 for loop
+f8.10    leax  2,x            Point to next entry
+         cmpb  ,x             This the one we want?
+         bne   f8.10          No, keep looking
+         ldb   1,x            Get base register name
+streg    stb   <register      Preserve it
+         ldb   <byte          Get back original byte
+         andb  #%10011111     Mask out the base register bits
+* Main indexing type check here
+         cmpb  #%00100000     5 bit offset indexing (special case)?
+         blo   indx.2         Yes, go do
+         cmpb  #%10010000     Non-indirect?
+         blo   f8.15          Yes, skip ahead
+* Indirect modes start here
+         lbsr  mvchr001       Add '['
+         inc   <indirct       Set indirect flag
+         cmpb  #%10010000     W indirect indexing mode (since it shares pattern)
+         lbeq  indx.Wm        Yes, go process
+         cmpb  #%10010010     Illegal?
+         lbeq  indx.15        Yes, bad mode
+         cmpb  #%10011111     Extended indirect?
+         lbeq  indx.14        Yes, go do that
+         andb  #%10001111     Mask out indirect bit for next routine
+f8.15    leax  indxjmp-3,pc   Point to index jump table -3 for loop
+f8.20    leax  3,x            Point to next entry
+         cmpb  ,x             Bit mask we want?
+         beq   f8.30          Yes, skip ahead
+         tst   ,x             No, is the end of table marker?
+         lbeq  indx.15        Yes, bad mode
+         bra   f8.20          Otherwise, keep searching
+f8.30    ldd   1,x            Get vector
+         leax  pcrzero,pc     Set base address of vector
+         jmp   d,x            Go to proper routine
+
+* 5 bit offset
+indx.2   andb  #$1f           Mask out upper 3 bits
+         pshs  b              Preserve it
+         cmpb  #$0f           Negative offset?
+         bls   indx2.1        No, skip ahead
+         ldb   #$20           Calculate negative offset & preserve
+         subb  ,s
+         stb   ,s
+         lbsr  mvchr009       Add '-'
+indx2.1  lbsr  mvchr005       Add '$'
+         puls  a              Get offset value
+         bra   indx3.1        Add it to the line in hex format
+
+* 8 bit offset
+indx.3   lbsr  getbyte        Get next byte
+         lbsr  mvchr006       Add '<'
+         cmpb  #$7f           Negative value?
+         bls   indx3.0        No, skip ahead
+         clra                 Make it a 16 bit number
+         std   <temp          Store it
+         ldd   #$0100         Calculate negative offset for 8 bit #
+         subd  <temp
+         lbsr  mvchr009       Add '-'
+indx3.0  lbsr  mvchr005       Add '$'
+indx3.1  lbsr  merghex        Add LSB of D as a 2 digit hex byte
+         lbra  indx010
+
+* 16 bit offset
+indx.4   lbsr  mvchr007       Add '>'
+         lbsr  getbyte2       Get 2 byte offset
+         pshs  d              Preserve it
+         cmpd  #$7fff         Is it negative?
+         bls   indx4.1        No, skip ahead
+         puls  d              Get back value
+         std   <temp          Preserve it
+         ldd   #$ffff         Calculate negative offset
+         subd  <temp
+         addd  #1
+         pshs  d              Preserve it
+         lbsr  mvchr009       Add '-'
+indx4.1  lbsr  mvchr005       Add '$'
+         puls  d              Get back offset value
+         lbsr  merghex2       Add 16 bit number in hex format
+         bra   indx010
+
+indx.5   lda   #'a            A,R
+indx5.1  lbsr  movechar
+         bra   indx010
+
+indx.6   lda   #'b            B,R
+         bra   indx5.1
+
+indx.7   lda   #'d            D,R
+         bra   indx5.1
+
+indx.E   lda   #'e            E,R
+         bra   indx5.1
+
+indx.F   lda   #'f            F,R
+         bra   indx5.1
+
+indx.W   lda   #'w            W,R
+         bra   indx5.1
+
+* ,R+
+indx.8   lbsr  isub010        Add ',' & register name
+indx8.1  lbsr  mvchr008       Add '+'
+         bra   indx040        Continue
+
+* ,R++
+indx.9   lbsr  isub010        Add ',' & register name
+         lbsr  mvchr008       Add '+'
+         bra   indx8.1        Add 2nd '+' and continue
+
+* ,-R
+indx.10  lbsr  mvchr003       Add ','
+indx10.1 lbsr  isub020        '-' & register name
+         bra   indx040        Continue
+
+* ,--R
+indx.11  lbsr  mvchr003       Add ','
+         lbsr  mvchr009       Add '-'
+         bra   indx10.1       Add 2nd '-' & register name & continue
+
+* 8 bit,pc
+indx.12  lbsr  mvchr006       Add '<'
+         lbsr  getbyte        Get next byte
+         lbsr  reladr.1       Calculate relative address label
+         bra   indx030        Add ',pcr'
+
+* 16 bit,pc
+indx.13  lbsr  mvchr007       Add '>'
+         lbsr  getbyte2       Get next 2 bytes
+         lbsr  reladr.2       Calculate relative address label
+         bra   indx030        Add ',pcr'
+
+* Extended indirect
+indx.14  lbsr  mvchr007       Add '>'
+         lbsr  mvchr005       Add '$'
+         lbsr  getbyte2       Get next 2 bytes
+         lbsr  merghex2       Append hex version of 16 bit #
+         bra   indx040        Continue
+* W modes (<register=w and <indirct flag is set)
+indx.Wm  ldb   <byte          Get original byte again
+         andb  #%01100000     Mask out all but W mode settings
+         cmpb  #%00000000     Straight register?
+         beq   indx010        Yes, do it
+         cmpb  #%00100000     mmmm,W?
+         lbeq  indx.4         Go do that
+         cmpb  #%01000000     ,W++?
+         beq   indx.9         Do that
+         bra   indx.11        Must be ,--W
+* Illegal indexing mode
+indx.15  leay  badindx,pcr    Point to '?'
+         ldb   #5             Add 5 of them
+         lbsr  mergline
+         bra   indx040        Continue
+
+indx010  lbsr  isub010        Add ',R'
+         bra   indx040        Continue
+
+indx030  leay  line220,pc     Add ',pcr'
+         ldb   #ln220sz
+         lbsr  mergline
+
+indx040  tst   <indirct       Is it an indirect mode?
+         beq   indx041        No, skip ahead
+         lbsr  mvchr002       Add ']'
+indx041  lda   <register      Get register name
+         cmpa  #'u            U register offset?
+         bne   indx090        No, skip ahead
+         tst   <u.opt         User wants uxxxx?
+         bne   indx090        No, skip
+         ldd   <dsave         get the offset
+         cmpd  <size          is it > total data size ???
+         bhi   indx090        yes..skip this stuff
+         leax  holdline+15,u  start of mnemonic
+* Calculating  'uxxxx' info
+indx042  lda   ,x+
+         cmpa  #'u            done??
+         beq   indx090        yes..go send line as is
+         cmpa  #'$
+         bne   indx042
+         lda   #'u
+         sta   -1,x
+         lda   2,x
+         cmpa  #',
+         bne   indx046
+         stx   <xsave
+         ldx   <lineadr
+         leax  1,x
+indx044  lda   ,-x
+         sta   2,x
+         cmpx  <xsave
+         bne   indx044
+         ldd   #$3030
+         std   ,x
+         ldx   <lineadr
+         leax  2,x
+         stx   <lineadr
+
+* put the offset in u table
+indx046  tst   <pass
+         bne   indx090
+         ldd   <dsave get the u offset
+         ldx   <highadr start of u table
+         leax  -2,x back off for loop increment
+indx050  leax  2,x
+         cmpd  ,x
+         beq   indx090
+         bhi   indx050 if >,go loop
+         leax  -2,x this is where to insert it
+         stx   <xsave
+         ldx   <highadr
+         leax  -2,x
+         stx   <highadr
+         cmpx  <labladr
+         lbls  rladr2.3
+indx052  ldd   2,x
+         std   ,x
+         leax  2,x
+         cmpx  <xsave
+         bne   indx052
+         ldd   <dsave
+         std   ,x
+
+indx090  tst   <bitcom        We a bit operation and need to RTS?
+         beq   notbit         No, write line & exit
+         rts
+notbit   lbsr  writline       Send the line out
+         lbra  readbyte       and continue
+
+isub010  lbsr  mvchr003       Add ','
+         bra   isub025        skip ahead
+isub020  lbsr  mvchr009       Add '-'
+isub025  lda   <register      Get register name
+         lbsr  movechar       Add it too
+         rts
+
+chk.f7   equ   *
+* inherent addr - 1 byte
+* (used for psh and pul only)
+         lbsr  getbyte
+         lda   #$80
+         sta   <testbyte
+         lda   #8
+         leay  stackreg,pcr
+f7.010   pshs  a
+         ldx   ,y++
+         ldb   <byte
+         andb  <testbyte
+         beq   f7.020
+         tfr   x,d
+         lbsr  movereg
+         lbsr  mvchr003
+f7.020   lda   <testbyte
+         lsra
+         sta   <testbyte
+         puls  a
+         deca
+         bne   f7.010
+         ldx   <lineadr
+         leax  -1,x
+         stx   <lineadr
+         lbra  chk.fd
+
+chk.f6   lbsr  getbyte        Get 1 byte
+         clra                 Make into D
+         lbsr  merghex        Add hex value to output
+         lbra  chk.fd         continue
+
+chk.f5   lbsr  writline       Write line out
+         lbsr  getbyte        Get byte
+         lbsr  fcbline        Make fcb line
+         lbra  readbyte       continue?
+
+* extended addr - 2 bytes
+chk.f4   lbsr  mvchr007       Add '>'
+         lbsr  mvchr005       Add '$'
+f4.010   lbsr  getbyte2       Get 2 bytes
+         lbsr  merghex2       Print 4 digit hex value
+         lbra  chk.fd         continue
+
+* immediate addr - 2 bytes
+chk.f3   lbsr  mvchr004       Add '#'
+         lbsr  mvchr005       Add '$'
+         bra   f4.010         Add 4 digit hex value & leave
+         
+* immediate mode - 4 bytes
+chk.f2   lbsr  mvchr004       Add '#'
+         lbsr  mvchr005       Add '$'
+         lbsr  getbyte2       Get 2 bytes
+         lbsr  merghex2       Print 4 hex digits
+         bra   f4.010         Print next 4 digits & continue
+
+* in memory mode (AIM, etc.) (opcode s/b in <testbyte)
+chk.f1   lbsr  mvchr004       Add '#'
+         lbsr  mvchr005       Add '$'
+         lbsr  getbyte        Get the 1 byte immediate value
+         lbsr  merghex        Add it to output
+         lbsr  mvchr003       Add ','
+         ldb   <testbyte      Get back original opcode
+         andb  #%11110000     Mask out all but mode nibble
+         lbeq  chk.ff         If Direct page mode, do that
+         cmpb  #%01100000     Indexed?
+         lbeq  chk.f8         Yes, do it
+         cmpb  #%01110000     Extended?
+         beq   chk.f4         yes, do it
+         lbsr  mvchr010       Unknown, add '?'
+         lbra  chk.fd         & exit
+* Bit commands (LDBT, etc.)
+chk.f0   lbsr  getbyte        Get register/bit flags
+         andb  #%11000000     Mask out all but register bits
+         beq   iscc           If CC, do that
+         cmpb  #%01000000     A?
+         bne   tryb           No, try B
+         ldd   #'a*256+32     Add 'a '
+         bra   gotregn
+tryb     cmpb  #%10000000     B?
+         bne   illeg          No, illegal register name
+         ldd   #'b*256+32     Add 'b '
+         bra   gotregn
+illeg    ldd   #'?*256+'?     Add '??'
+         bra   gotregn
+iscc     ldd   #'c*256+'c     cc register         
+gotregn  lbsr  movereg        Add register name
+         lbsr  mvchr011       Add '.'
+         ldb   <byte          Get original byte again
+         andb  #%00000111     Mask out all but register bit #
+         bsr   getbit         Get Bit #
+         lbsr  movechar       Add it to output
+         lbsr  mvchr003       Add ',
+         ldb   <byte          Get original byte again
+         andb  #%00111000     Mask out all but memory bit #
+         lsrb                 Shift for subroutine
+         lsrb
+         lsrb
+         bsr   getbit         Get ASCII value for memory bit #
+         pshs  a              Preserve until DP part is done
+         inc   <bitcom        Set bit command flag
+* Dupe of direct page stuff
+         leay  line080,pc     Point to '<u'
+         tst   <u.opt         User wants Symbolic labels?
+         beq   f0.010         Yes, do so
+         leay  line085,pcr    No, use <$00xx instead
+f0.010   ldb   #2             In both cases, 2 chars to merge
+         lbsr  mergline       Merge onto current output line
+         lbsr  getbyte        Get direct page address byte
+         clra                 Make for 4 digit hex number
+         lbsr  merghex2       Merge 4 digit hex result onto output line
+         tst   <u.opt         Direct page currently @ 0?
+         bne   nou            No, skip u stuff
+         lbsr  indx046        put address in u table & write out line
+nou      lbsr  mvchr011       Add '.'
+         puls  a              Get back memory bit #
+         lbsr  movechar       Add it to output
+         lbra  chk.fd         Write it out & continue
+
+* Create ASCII of bit #
+getbit   lda   #'0            Bit # to 0
+         pshs  b              Put bit # onto stack
+         adda  ,s+            Add to ASCII base
+         rts
+
+* 8 bit relative offset (bra)
+reladr.1 lda   #'L            Add 'L'
+         lbsr  movechar
+         clra                 D=8 bit relative address offset
+         ldb   <byte
+         addd  <address       Add to current address pointer
+         addd  #1             Adjust for current instruction
+         pshs  a
+         lda   <byte
+         cmpa  #$7f           Negative offset?
+         puls  a
+         bls   rladr2.1       No, skip ahead
+         subd  #$0100         Calculate negative offset
+         bra   rladr2.1     
+* 16 bit relative offset (bra)
+reladr.2 pshs  a
+         lda   #'L
+         lbsr  movechar
+         puls  a
+         addd  <address
+         addd  #1
+rladr2.1 tst   <pass
+         bne   rladr2.4
+         leay  labeltab,u
+rladr2.2 cmpd  ,y
+         beq   rladr2.4
+         leay  2,y
+         cmpy  <labladr
+         blo   rladr2.2
+         ldx   <labladr
+         std   ,x++
+         stx   <labladr
+         leax  2,x
+         cmpx  <highadr
+         blo   rladr2.4
+rladr2.3 leax  line240,pcr    Error:symbol table full
+         ldy   #ln240sz
+         lda   #2
+         os9   i$writln
+         lbra  unlink
+rladr2.4 lbsr  merghex2       Add 4 hex digits & return
+         rts
+
+endit    lds   <stackhld      restore stack 
+endit010 tst   <pass
+         bne   endit020
+*        ldx   <highadr
+*        ldd   <utabend
+*        subd  <highadr
+*        tfr   d,y
+*        lda   #2
+*        os9   i$write
+*        lbcs  exit
+*        lbra  clrexit
+endit015 inc   <pass
+         lbsr  close
+         lbra  restart
+endit020 ldb   <readcnt
+         beq   endit024
+         inc   <readclr
+         clra
+         std   <temp
+         ldd   <address
+         subd  <temp
+         std   <address
+         leax  readbuff,u
+endit022 ldb   ,x+
+         stx   <readpos
+         stb   <byte
+         lbsr  fcbline
+         ldd   <address
+         addd  #1
+         std   <address
+         ldx   <readpos
+         dec   <readcnt
+         bne   endit022
+endit024 tst   <z.opt
+         lbne  clrexit
+         clr   <readclr
+         lbsr  clrline
+         lbsr  adrmove
+         ldx   #$ffff
+         stx   <modend
+         lbsr  getbyte
+         lbsr  getbyte
+         lbsr  getbyte
+         leay  line170,pcr
+         ldb   #ln170sz
+         lbsr  mergline
+         lbsr  writline
+         lbsr  adrmove
+         leay  line180,pcr
+         ldb   #ln180sz
+         lbsr  mergline
+         lbsr  writline
+         lbsr  moveadr
+         leax  holdline,u
+         lda   ,x
+         cmpa  #$20
+         beq   endit030
+         leay  line190,pcr
+         ldb   #ln190sz
+         lbsr  mergline
+         lbsr  writline
+endit030 bsr   close
+
+         ifeq  testing-1
+         lbsr  clrline
+         lda   #$20
+         lbsr  movechar
+         lbsr  writline
+         leay  labeltab,u
+endit040 ldd   ,y++
+         pshs  y
+         lda   #'*
+         lbsr  movechar
+         lda   #$20
+         lbsr  movechar
+         lbsr  merghex2
+         lbsr  writline
+         puls  y
+         cmpy  <labladr
+         bls   endit040
+         leay  line230,pcr
+         ldb   #ln230sz
+         lbsr  mergline
+         ldd   <labladr
+         leax  labeltab,u
+         stx   <labladr
+         subd  <labladr
+         lsra
+         rorb
+         lbsr  merghex2
+         lbsr  writline
+         endc
+
+         tst   <diskio
+         lbne  clrexit
+         lda   #2
+         sta   <byte
+
+unlink   ldu   <modadr
+         os9   f$unlink
+         lbcs  exit
+         dec   <byte
+         bne   unlink
+         lbra  clrexit
+
+close    tst   <diskio
+         beq   close010
+         lda   <path
+         os9   i$close
+         lbcs  exit
+close010 rts
+
+
+         pag
+*
+******************** descriptor processing ***************************
+descrhdr lbsr  getbyte2
+         std   <mgradr
+         lbsr  getbyte2
+         std   <drvadr
+         lbsr  clrline
+         lbsr  getbyte
+         lbsr  fcbline
+         leay  line340,pcr
+         ldb   #ln340sz
+         lbsr  mergline
+         lbsr  writline
+         lbsr  getbyte
+         lbsr  fcbline
+         leay  line350,pcr
+         ldb   #ln350sz
+         lbsr  mergline
+         lbsr  writline
+         lbsr  getbyte2
+         lbsr  fdbline
+         leay  line360,pcr
+         ldb   #ln360sz
+         lbsr  mergline
+         lbsr  writline
+         lbsr  getbyte
+         lbsr  moveadr
+         clra
+         ldb   <byte
+         addd  <address
+         addd  #1
+         std   <initsize
+         leay  line380,pcr
+         ldb   #ln380sz
+         lbsr  mergline
+         lbsr  writline
+         lbsr  getbyte
+         stb   <desctype
+         lbsr  fcbline
+         leay  line390,pcr
+         ldb   #ln390sz
+         lbsr  mergline
+         lbsr  writline
+         leax  scfprint,pcr
+         stx   <printadr
+         lda   <desctype
+         cmpa  #1
+         bne   getdescr
+         leax  rbfprint,pcr
+         stx   <printadr
+getdescr ldx   <printadr
+         lda   ,x+
+         pshs  x
+         cmpa  #'2
+         lbeq  descr2
+         cmpa  #'3
+         lbeq  descr3
+         lbsr  getbyte
+         ldd   <address
+         cmpd  <initsize
+         bne   desc010
+         lbsr  clrline
+         lbsr  adrmove
+         leay  line400,pcr
+         ldb   #ln400sz
+         lbsr  mergline
+         lbsr  writline
+desc010  ldd   <address
+         cmpd  <nameadr
+         bne   desc015
+         leay  line100,pcr
+         ldb   #ln100sz
+         leax  holdname,u
+         bra   desc030
+desc015  cmpd  <mgradr
+         bne   desc020
+         leay  line410,pcr
+         ldb   #ln410sz
+         leax  namehold,u
+         bra   desc030
+desc020  cmpd  <drvadr
+         bne   desc040
+         leay  line420,pcr
+         ldb   #ln420sz
+         leax  namehold,u
+desc030  pshs  x
+         pshs  b
+         leax  holdobj,u
+         ldd   #$2020
+         std   ,x++
+         std   ,x++
+         std   ,x++
+         std   ,x++
+         puls  b
+         lbsr  mergline
+         lbsr  adrmove
+         lbsr  writline
+         puls  y
+         lbsr  movename
+         lbsr  getbyte
+         puls  x
+         leax  scfpend,pcr
+         leax  1,x
+         pshs  x
+         stx   <printadr
+         bra   desc010
+desc040  lbsr  fcbline
+         bra   mergdesc
+descr2   lbsr  getbyte2
+         lbsr  fdbline
+         bra   mergdesc
+* descriptor name copy
+descr3   stx   <printadr
+         lbsr  getbyte2
+         lbsr  moveadr
+         leay  line430,pcr
+         ldb   #ln430sz
+         lbsr  mergline
+         lbsr  writline
+         lbra  getdescr
+
+mergdesc clrb
+         puls  x
+         pshs  x
+desc050  lda   ,x+
+         cmpa  #$0d
+         beq   desc060
+         incb
+         bra   desc050
+desc060  stx   <printadr
+         leax  -2,x
+         lda   ,x
+         cmpa  #'?
+         bne   desc070
+         leax  -1,x
+         stx   <printadr
+desc070  puls  y
+         lbsr  mergline
+         lbsr  writline
+         lbra  getdescr
+
+**********************************************************************
+*######################################################################
+* subroutines
+*######################################################################
+
+
+***********************************************************************
+*                                                                     *
+* U$hexin - converts hex characters to binary digits                  *
+*                                                                     *
+* Entry: x=start address of digits to convert                         *
+*                                                                     *
+* Exit:  x=same as entry                                              *
+*        y=# of converted bytes                                       *
+*                                                                     *
+***********************************************************************
+
+u$hexin  pshs  a,b
+         pshs  x
+         leay  ,x move start addr for scan
+hexin010 bsr   hexin030 convert bytes
+         bcs   hexin020 exit if done
+         stb   ,x+ move the converted byte in
+         bra   hexin010 go back & get more
+hexin020 tfr   x,d get current byte position
+         subd  ,s subtract start position
+         tfr   d,y move the length of the string
+         puls  x
+         puls  a,b,pc done
+
+hexin030 ldb   ,y+ get char
+         cmpb  #', was it a comma??
+         bne   hexin050 no..don't skip it
+hexin040 ldb   ,y+ get next char
+hexin050 cmpb  #$20 was it a space
+         beq   hexin040 yes...skip it & get next char
+         leay  -$01,y else back up to point to the char
+         bsr   hexin080 convert it
+         bcs   hexin070 done....exit
+         pshs  b save the byte
+         bsr   hexin080 convert next byte
+         bcs   hexin060 exit if done
+         asl   ,s shift saved char to put in high 4 bits
+         asl   ,s
+         asl   ,s
+         asl   ,s
+         addb  ,s and move in low 4 bits
+         stb   ,s save the byte
+hexin060 clrb  clear the carry flag
+         puls  b restore the saved flag
+hexin070 rts return
+
+hexin080 ldb   ,y get the char in
+         subb  #$30 subtract bias for numbers
+         cmpb  #$09 was it > 9
+         bls   hexin100 no...its good
+         cmpb  #$31 was it 'a'
+         blo   hexin090 if less than that..skip next
+         subb  #$20 else make it upper case
+hexin090 subb  #$07 back off so 'A' = $0a
+         cmpb  #$0F check if it was a 'F'
+         bhi   hexin110 if >...error
+         cmpb  #$0A was it a 'A'
+         bcs   hexin110 if <...error
+hexin100 andcc #$FE clear carry bit of cc
+         leay  $01,y bump up pointer for next char
+         rts   return
+hexin110 comb set carry flag
+         rts return
+
+
+* 
+* convert bytes in d to hex, output to hexstrng
+*
+gethex   std   <dsave
+         pshs  y
+         leay  hexstrng,u
+         pshs  b
+         bsr   gethx010
+         puls  a
+         bsr   gethx010
+         puls  y,pc
+gethx010 pshs  a
+         lsra
+         lsra
+         lsra
+         lsra
+         bsr   gethx020
+         puls  a
+         anda  #$0f
+         bsr   gethx020
+         rts
+gethx020 adda  #$30
+         cmpa  #$3a
+         blt   gethx030
+         adda  #$07
+gethx030 sta   ,y+
+         rts
+
+* 
+* get decimal value of bytes id d ,output in string pointed at by 'y'
+*
+getdec   pshs  x
+         ldx   #10000
+         bsr   getdc010
+         ldx   #01000
+         bsr   getdc010
+         ldx   #00100
+         bsr   getdc010
+         ldx   #00010
+         bsr   getdc010
+         stb   <counter
+         bsr   getdc030
+         puls  x,pc
+getdc010 stx   <countdec
+         clr   <counter
+getdc020 cmpd  <countdec
+         blo   getdc030
+         subd  <countdec
+         inc   <counter
+         bra   getdc020
+getdc030 pshs  b
+         ldb   <counter
+         addb  #$30
+         stb   ,y+
+         puls  b,pc
+
+*
+* read next 2 bytes into 'd'
+*
+getbyte2 bsr   getbyte
+         tfr   b,a
+         bsr   getbyte
+         rts
+
+*
+* merge last 2 bytes of hexstrng with output line
+*
+merghex  equ   *
+         clra
+         bsr   gethex
+         leay  hexstrng,u
+         leay  2,y
+         ldb   #2
+         lbsr  mergline
+         rts
+
+*
+* merge all 4 hex chars to output line
+*
+merghex2 bsr   gethex
+         leay  hexstrng,u
+         ldb   #4
+         lbsr  mergline
+         rts
+
+
+*
+* merge significant decimal characters
+*
+mergdec  pshs  a,b
+         leay  decstrng,u
+         lda   #$30
+         sta   ,y
+         puls  a,b
+         cmpd  #0
+         bne   mergd010
+         ldb   #1
+         lbra  mergline
+mergd010 bsr   getdec
+         leay  decstrng,u
+         ldb   #6
+chkdecln decb
+         lda   ,y+
+         cmpa  #$30
+         beq   chkdecln
+         leay  -1,y
+         lbra  mergline
+
+*
+* read 1 byte
+*
+getbyte  pshs  x,y,a
+         ldx   <address
+         leax  1,x
+         stx   <address
+         leax  3,x
+         cmpx  <modend
+         lbhs  endit
+         tst   <diskio
+         bne   getdisk
+         ldx   <crntadr
+         leax  1,x
+         stx   <crntadr
+         ldb   ,x
+         stb   <byte
+         bra   gotbyte
+*
+* read byte from disk
+*
+getdisk  leax  byte,u
+         ldy   #1
+         lda   <path
+         os9   i$read
+         lbcs  endit
+         ldb   <byte
+gotbyte  lda   <byte
+         bsr   moveobj
+         ldb   <byte
+         ldx   <readpos
+         stb   ,x+
+         stx   <readpos
+         inc   <readcnt
+         puls  x,y,a,pc
+
+*
+* convert 'a' to hex,merge with object code listing
+*
+moveobj  pshs  x,y,b
+         ldb   <objcnt
+         cmpb  #4
+         bhs   moverts
+         inc   <objcnt
+         lbsr  gethex
+         ldx   <objadr
+         leay  hexstrng,u
+         lda   ,y+
+         lbsr  getupc
+         sta   ,x+
+         lda   ,y
+         lbsr  getupc
+         sta   ,x+
+         stx   <objadr
+moverts  puls   x,y,b,pc
+
+* 
+* clear one of the hold strings pointed to by 'y'
+*
+clrhld   sty   <lineadr
+         pshs  x,b
+         tfr   y,x
+         leay  line040,pcr
+         ldb   #40
+         bsr   merge
+         ldy   <lineadr
+         puls  x,b,pc
+         
+* 
+* clear all parts of the output line
+*
+clrline  pshs  x,y,a,b
+         leax  holdline,u
+         stx   <lineadr
+         leax  holdobj,u
+         stx   <objadr
+         leax  linenum,u
+         clr   <objcnt
+         leay  line040,pcr
+         ldb   #80
+         bsr   merge
+         puls  x,y,a,b,pc
+
+*
+* merge the string pointed to by 'y' with the current line
+*
+mergline ldx   <lineadr
+         bsr   merge
+         stx   <lineadr
+         rts
+
+*
+* merge the sring pointed to by 'y' with the string pointed to by 'x'
+*
+merge    pshs  a
+merge010 lda   ,y+
+         sta   ,x+
+         decb
+         bne   merge010
+         puls  a,pc
+
+*
+* write the output line to standard output path,then clear line
+*
+writline pshs  x,y
+         tst   <pass
+         beq   wrtln010
+         ldd   <numline
+         addd  #1
+         std   <numline
+         leay  linenum,u
+         lbsr  getdec
+         ldx   <lineadr
+         lda   #$0d
+         sta   ,x+
+         tfr   x,d
+         leax  linenum,u
+         tst   <o.opt
+         bne   wrtln005
+         leax  holdline,u
+wrtln005 stx   <temp
+         subd  <temp
+         tfr   d,y
+         lbsr  send
+wrtln010 bsr   clrline
+         tst   <readclr
+         bne   wrtln020
+         leax  readbuff,u
+         stx   <readpos
+         clr   <readcnt
+wrtln020 puls  x,y,pc
+*
+* move the current address to holdadr of output line
+*
+adrmove  pshs  x
+         ldd   <address
+         lbsr  gethex
+         leax  hexstrng,u
+         leay  holdadr,u
+         ldb   #4
+adrmv010 lda   ,x+
+         lbsr  getupc
+         sta   ,y+
+         decb
+         bne   adrmv010
+         puls  x,pc
+
+*
+* move the current address if its second pass and its a referenced address
+*
+moveadr  tst   <pass
+         beq   mvadr020
+         bsr   adrmove
+         leay  labeltab,u
+         ldd   <address
+mvadr010 cmpy  <labladr
+         beq   mvadr020
+         cmpd  ,y
+         beq   mvadr030
+         leay  2,y
+         bra   mvadr010
+mvadr020 leay  line040,pcr
+         ldb   #9
+         lbsr  mergline
+         rts
+mvadr030 lda   #'L
+         bsr   movechar
+         ldd   <address
+         lbsr  merghex2
+         leay  line040,pcr
+         ldb   #4
+         lbsr  mergline
+         rts
+
+*
+* merge the char in 'a' with the output line
+*
+movechar ldx   <lineadr
+         sta   ,x+
+         stx   <lineadr
+         rts
+
+*
+* merge predefined characters with the output line
+*
+mvchr001 lda   #'[
+         bra   mvchr999
+mvchr002 lda   #']
+         bra   mvchr999
+mvchr003 lda   #',
+         bra   mvchr999
+mvchr004 lda   #'#
+         bra   mvchr999
+mvchr005 lda   #'$
+         bra   mvchr999
+mvchr006 lda   #'<
+         bra   mvchr999
+mvchr007 lda   #'>
+         bra   mvchr999
+mvchr008 lda   #'+
+         bra   mvchr999
+mvchr009 lda   #'-
+         bra   mvchr999
+mvchr010 lda   #'?
+         bra   mvchr999
+mvchr011 lda   #'.
+         bra   mvchr999
+         
+mvchr999 bsr   movechar
+         rts
+
+movename pshs  y
+         lbsr  clrline
+         bsr   moveadr
+         leay  line060,pcr
+         ldb   #ln060sz
+         lbsr  mergline
+         ldb   <byte
+         tfr   b,a
+         lbsr  moveobj
+         puls  y
+getnm010 cmpb  #$80
+         bhs   getnm020
+         stb   ,y+
+         tfr   b,a
+         bsr   movechar
+         lbsr  getbyte
+         bra   getnm010
+getnm020 subb  #$80
+         stb   ,y+
+         tfr   b,a
+         bsr   movechar
+         ldb   #$0d
+         stb   ,y
+         lda   #'/
+         bsr   movechar
+         lbsr  writline
+         rts
+*
+* line type is fcb ...create all parts of fcb line
+*
+fcbline  lbsr  clrline
+         lbsr  moveadr
+         leay  line090,pcr
+         ldb   #ln090sz
+         lbsr  mergline
+         ldb   <byte
+         lbsr  merghex
+         leay  hexstrng,u
+         leay  2,y
+         pshs  x
+
+         ldx   <objadr
+         lda   ,y+
+         sta   ,x+
+         lda   ,y
+         sta   ,x+
+         stx   <objadr
+         puls  x
+         lda   #$20
+         lbsr  movechar
+         tst   <descript
+         bne   fcbl030
+         lda   <byte
+         cmpa  #$20
+         bls   fcbl020
+         cmpa  #'z
+         bls   fcbl010
+         suba  #$80
+         cmpa  #$20
+         bls   fcbl020
+         cmpa  #'z
+         bgt   fcbl020
+fcbl010  lbsr  movechar
+fcbl020  lbsr  writline
+fcbl030  rts
+fdbline  pshs  d
+         lbsr  clrline
+         ldd   <address
+         pshs  d
+         subd  #1
+         std   <address
+         lbsr  moveadr
+         puls  d
+         std   <address
+         leay  line370,pcr
+         ldb   #ln370sz
+         lbsr  mergline
+         puls  d
+         lbsr  merghex2
+         leay  hexstrng,u
+         ldb   #4
+         pshs  x
+         ldx   <objadr
+         ldd   ,y++
+         std   ,x++
+         ldd   ,y++
+         std   ,x++
+         stx   <objadr
+         puls  x
+         lda   #$20
+         lbsr  movechar
+         rts
+
+
+*
+* convert 'a' to uppper case if its a letter
+*
+getupc   cmpa  #'z
+         bls   getup010
+         anda  #$df
+getup010 rts
+
+
+*
+* if its 2nd pass,write the line to standard output path
+*
+send     tst   <pass
+         beq   send010
+         lda   #1
+         os9   i$writln
+         lbcs  exit
+send010  lbsr  clrline
+         rts
+********* get op ******************
+*  entry: opcode in a / a&b for 2 ops
+*
+
+getop    sta   <testbyte
+         tstb
+         bne   chkos9
+         ldb   #6
+         mul
+         leay  optable,pcr
+         leay  d,y
+getrest  leay  1,y
+         lda   ,y+
+         tfr   a,b
+         pshs  b
+         ldb   #5
+moveop   lda   ,y+
+         lbsr  movechar
+         decb
+         bne   moveop
+         pshs  a
+         lda   #$20
+         lbsr  movechar
+         puls  a
+         puls  b,pc
+
+chkos9   cmpb  #$3f
+         bne   chk10
+         leay  line150,pcr
+         ldb   #ln150sz
+         lbsr  mergline
+         cmpa  #$80
+         bhs   i$os9
+         cmpa  #$54
+         bhs   bados9
+         leay  os9f$tab,pcr
+         bra   getos9
+
+i$os9    cmpa  #$91
+         bhs   bados9
+         leay  os9i$tab,pcr
+         suba  #$80
+         bra   getos9
+bados9   leay  bados9op,pcr
+         clra
+getos9   ldb   #8
+         mul
+         leay  d,y
+         pshs  b
+         ldb   #8
+         bra   moveop
+
+chk10    sta   <testbyte
+         cmpb  #$10
+         beq   load10
+         cmpb  #$11
+         beq   load11
+         clr   <testbyte
+load11   leay  get11tab,pcr
+         bra   loop10
+load10   leay  get10tab,pcr
+loop10   lda   ,y
+         tsta
+         beq   getrest
+         cmpa  <testbyte
+         beq   getrest
+         leay  7,y
+         bra   loop10
+
+nolink   lbsr  clrline
+         leay  line200,pcr
+         ldb   #ln200sz
+         lbsr  mergline
+         ldy   <xreghold
+         ldb   #$20
+         lbsr  mergline
+         lda   #$0d
+         lbsr  movechar
+         leax  holdline,u
+         ldy   #$50
+
+*
+* error encountered - print error to standard error path
+*
+prterror lda   #2
+         os9   i$writln
+clrexit  clrb
+exit     os9   f$exit
+
+         emod
+eom      equ   *
+         end
+   
--- a/level1/cmds/makefile	Fri Jan 31 17:55:01 2003 +0000
+++ b/level1/cmds/makefile	Fri Jan 31 17:58:38 2003 +0000
@@ -4,8 +4,8 @@
 
 BASIC09FILES	= runb.asm gfx.asm inkey.asm syscall.asm
 COCOCMDS	= asm attr backup binex build cmp cobbler config copy date \
-		dcheck debug deiniz del deldir devs dir disasm display dmode \
-		dsave dump echo edit error exbin exmode format free grfo \
+		dcheck debug ded deiniz del deldir devs dir disasm display \
+		dmode dsave dump echo edit error exbin exmode format free grfo \
 		help ident iniz irqs link list load login makdir mdir merge \
 		mfree os9gen park printerr procs pwd pxd \
 		rename runb save setime shell sleep tee tmode touch tsmon \