diff options
Diffstat (limited to 'ddt180.z80')
-rw-r--r-- | ddt180.z80 | 146 |
1 files changed, 64 insertions, 82 deletions
@@ -428,12 +428,26 @@ pstr_inl: ex (sp),hl
ret
-p_fill_space:
- call outbl
+p_align_@_sym:
+ push de
+ ld de,(var.@)
+ ld a,d
+ or e
+ pop de
+ ld a,(symlen_max)
+ jr z,$+4
+ add a,6
+ add a,c
+ ld c,a
+p_goto_col:
ld a,(con_col)
cp c
- jr c,p_fill_space
- ret
+ ret nc
+ ret z
+ call outbl
+ jr p_goto_col
+
+
inchar:
push hl
@@ -612,45 +626,15 @@ pss_l: pop bc
ret
-p_sym_space:
+p_symbol:
if 0
ld a,(dash_flag)
or a
ret nz
endif
-
push hl
- push bc
- ld c,a
- ld a,(con_col)
- ld b,a
call sym_getname
- jr z,psb_align
- bit 7,c
- jr z,psb_nd
- call pstr_inl
- dc ' .'
-psb_nd:
- call p_symstr
-
-psb_align:
- ld a,(con_col)
- sub b
- ld b,a
- ld a,(symlen_max)
- bit 7,c
- jr z,$+4
- add a,2
- res 7,c
- add c
- sub b
- ld b,a
- jr z,psb_e
-psb_a_l:
- call outbl
- djnz psb_a_l
-psb_e:
- pop bc
+ call nz,p_symstr
pop hl
ret
@@ -1421,7 +1405,6 @@ l065bh: djnz l065bh
pop af
pop hl
- and a
call nz,outbl6
call nz,p_offset
jp crlf
@@ -1630,8 +1613,10 @@ l07cdh: ld l,(ix+002h)
ld h,(ix+003h)
call out.hl.@
- ld a,82h
- call p_sym_space
+ call outbl
+ call p_symbol
+ ld c,9
+ call p_align_@_sym
call pstr_inl
dc ':'
ld l,(ix+004h)
@@ -2046,16 +2031,20 @@ l0bc3h: l0bc7h:
push af
call sub_0bdch
+ call outbl
pop af
push af
call get_y_val
- ld a,82h
- call p_sym_space
+ call p_symbol
pop af
inc a
- bit 0,a
push af
- call z,crlf
+ rra
+ push af
+ ld c,11
+ call c,p_align_@_sym
+ pop af
+ call nc,crlf
pop af
cp YREG_CNT
jr c,l0bc7h
@@ -2448,7 +2437,7 @@ cmdm_up: cmd_H:
ld a,(de)
cp 'S'
- jr z,p_symbols
+ jr z,p_sym_list
call expr
jp c,p_max_high0
@@ -2482,11 +2471,11 @@ l0e5eh: call outbl
ld a,l
call out.ascii
- ld a,80h
- call p_sym_space
+ call outbl2
+ call p_symbol
jp crlf
-p_symbols:
+p_sym_list:
inc de
call assert_eol
ld a,(symlen_max)
@@ -2503,6 +2492,7 @@ psym_nxtsym: cp 0c3h
jr z,psym_e
+ call p_goto_col
ex de,hl
call out_hl
call outbl
@@ -2515,13 +2505,10 @@ psym_nxtsym: ld a,80 ;screen width
sub b
cp c
- jr c,psym_nxtline
- call p_fill_space
- jr psym_nxtsym
+ jr nc,psym_nxtsym
-psym_nxtline:
- ld c,0
call crlf
+ ld c,0
jr psym_nxtsym
psym_e:
@@ -3330,14 +3317,8 @@ cmda_loop: ld (var.$),hl
push hl
call p_disas_line
- ld de,(var.@)
- ld a,d
- or e
ld c,19
- jr z,l122dh
- ld c,19+7
-l122dh:
- call p_fill_space
+ call p_align_@_sym
ld c,b
push bc
call get_line
@@ -4517,14 +4498,13 @@ p_disas_line: push hl
pop iy
call p_disas_instr
- and a
ret z
- ld c,16
- call p_fill_space
+ ld c,15
+ call p_goto_col
call p_offset
- ld a,80h
- jp p_sym_space
+ call outbl
+ jp p_symbol
p_offset:
ld de,(var.@)
@@ -4541,7 +4521,7 @@ p_offset: p_disas_instr:
sub a
- ld (l1ffdh),a
+ ld (disas_argtype),a
call disas_get_instrlen
jr nc,l197fh
push bc
@@ -4549,12 +4529,13 @@ p_disas_instr: add a,5
ld c,a
call pstr
- call p_fill_space
+ call p_goto_col
ex de,hl
call call_hl
pop bc
- ld a,(l1ffdh)
+ ld a,(disas_argtype)
ld hl,(disas_arg_16)
+ or a
scf
ret
@@ -4876,11 +4857,11 @@ b_1b54_start: db 0ffh,0feh,013h ;cp a,nn
dw l1d09h
db 0ffh,010h,02eh ;djnz
- dw l1d1ah
+ dw p_arg_jrel
db 0ffh,018h,054h ;jr
- dw l1d1ah
- db 0e7h,020h,054h ;jr,cc
- dw l1d0fh
+ dw p_arg_jrel
+ db 0e7h,020h,054h ;jr cc,
+ dw p_arg_cc_jrel
db 0ffh,0d3h,076h ;out (nn),a
dw l1d37h
db 0ffh,0dbh,03fh ;in a,(nn)
@@ -5111,12 +5092,12 @@ l1d09h: l1d0ch:
jp out_hex
-l1d0fh:
+p_arg_cc_jrel:
ld a,(iy+000h)
and 018h
call p_arg_cc0
call p_char_comma
-l1d1ah:
+p_arg_jrel:
ld c,(iy+001h)
ld a,c
rla
@@ -5128,6 +5109,7 @@ l1d1ah: inc hl
inc hl
jr l1d4eh
+
l1d29h:
call p_A_comma
sub_1d2ch:
@@ -5147,7 +5129,7 @@ p_arg_mn: l1d4eh:
ld a,002h
sub_1d50h:
- ld (l1ffdh),a
+ ld (disas_argtype),a
ld (disas_arg_16),hl
jp out_hl
@@ -5157,17 +5139,17 @@ p_arg_ww_mn: jr p_arg_mn
p_arg_addr_hl:
- call sub_1e13h
+ call p_arg_addr
call p_char_comma
jp p_arg_hlixiy
p_arg_hl_addr:
call p_arg_hlixiy
call p_char_comma
- jp sub_1e13h
+ jp p_arg_addr
p_arg_addr_a:
- call sub_1e13h
+ call p_arg_addr
p_char_comma_A:
call p_char_comma
p_char_A:
@@ -5175,7 +5157,7 @@ p_char_A: jr outchar1
p_arg_a_addr:
call p_A_comma
- jp sub_1e13h
+ jp p_arg_addr
l1d85h:
ld a,'0'
jr outchar1
@@ -5234,14 +5216,14 @@ l1dcah: jp p_arg_ww
p_arg_addr_ww:
- call sub_1e13h
+ call p_arg_addr
call p_char_comma
jp p_arg_ww
p_arg_ww_addr:
call p_arg_ww
call p_char_comma
- jr sub_1e13h
+ jr p_arg_addr
p_arg_bitop:
ld a,(isprefix_ixiy)
@@ -5274,7 +5256,7 @@ l1e0eh: l1e11h:
jr p_arg_r0
-sub_1e13h:
+p_arg_addr:
call p_char_lparen
ld l,(iy+001h)
ld h,(iy+002h)
@@ -5969,7 +5951,7 @@ last_L: dw TPA
disas_arg_16:
dw 0
-l1ffdh:
+disas_argtype:
db 0
symlen_max: ;max length of symbols read so far
|