summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo C2016-08-17 09:31:47 +0200
committerLeo C2016-08-17 09:31:47 +0200
commitcab0d80a35d1c7871f2f8af22c52f6ff1b77fa3d (patch)
tree041e29999e58234b42950053fe1128708e606646
parentd24eec894e877b19b848303a46ba6a81b7ccc5b0 (diff)
downloadddt180-cab0d80a35d1c7871f2f8af22c52f6ff1b77fa3d.zip
Print symbols for instruction args in disassembly
-rw-r--r--.gitignore1
-rw-r--r--ddt180.z8041
2 files changed, 22 insertions, 20 deletions
diff --git a/.gitignore b/.gitignore
index defdc44..caa11b3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
scratch
+*.sym
*.lst
*.rel
*.prl
diff --git a/ddt180.z80 b/ddt180.z80
index cc5ca41..5b531f6 100644
--- a/ddt180.z80
+++ b/ddt180.z80
@@ -2096,15 +2096,14 @@ l0c15h:
call skipbl
jr z,l0c30h
call sub_0363h
- ld b,h
- ld c,l
- pop af
+ ex de,hl
+ pop bc
pop hl
- ld (hl),c
- bit 0,a
+ ld (hl),e
+ bit 0,c
ret z
inc hl
- ld (hl),b
+ ld (hl),d
ret
l0c30h:
pop af
@@ -2112,19 +2111,18 @@ l0c30h:
ret
l0c33h:
- ld b,c
call pstr
call pstr_inl
dc '='
ld a,(de)
- bit 0,b
+ bit 0,c
jp z,out_hex
ld l,a
inc de
ld a,(de)
dec de
ld h,a
- bit 1,b
+ bit 1,c
jp z,out_hl
jp out.hl.@
@@ -4520,6 +4518,9 @@ p_disas_line:
ld c,16
call p_fill_space
+ call p_offset
+ ld a,80h
+ jp p_sym_space
p_offset:
ld de,(var.@)
@@ -4531,6 +4532,7 @@ p_offset:
and a
sbc hl,de
call out_hl
+ add hl,de
jp out_rparen
p_disas_instr:
@@ -4723,14 +4725,11 @@ sub_1a72h:
inc hl
jr sub_1a72h
l1a7fh:
+ ld de,l1c97h
inc hl
ld c,(hl)
- ld hl,t_MNEMONICS
- ld b,0
- add hl,bc
- ld de,l1c97h
- scf
- ret
+ jr get_mnemonic
+
test_DDFD:
ld a,(hl)
@@ -4756,6 +4755,7 @@ lookup_opc:
and a
jr nz,lookup_opc
ret
+
l1aa8h:
inc hl
ld c,(hl)
@@ -4763,8 +4763,9 @@ l1aa8h:
ld e,(hl)
inc hl
ld d,(hl)
+get_mnemonic:
ld hl,t_MNEMONICS
- ld b,000h
+ ld b,0
add hl,bc
scf
ret
@@ -4788,7 +4789,7 @@ b_1ab6_start:
db 0ffh
-; 1 byte opcodes
+; 1 byte opcodes
; Format: db mask, match, t_MNEMONICS-index
; dw argument formating fuction
b_1ad1_start:
@@ -4846,7 +4847,7 @@ b_1ad1_start:
dw l1ce5h
db 0
-; 2 byte opdodes
+; 2 byte opdodes
b_1b54_start:
db 0c7h,006h,056h ;ld r,nn
dw l1cfah
@@ -4878,7 +4879,7 @@ b_1b54_start:
dw l1d29h
db 0
-; 3 byte opcodes
+; 3 byte opcodes
b_1b9b_start:
db 0c7h,0c2h,052h ;jp cc,mn
dw p_arg_cc_mn
@@ -5685,7 +5686,7 @@ l2115h:
ret
cmd_C:
ld hl,cmd_C
- ld a,001h
+ ld a,1
jr l2122h
cmd_T:
xor a