]> cloudbase.mooo.com Git - ddt180.git/commitdiff
Print symbols for instruction args in disassembly
authorLeo C <erbl259-lmu@yahoo.de>
Wed, 17 Aug 2016 07:31:47 +0000 (09:31 +0200)
committerLeo C <erbl259-lmu@yahoo.de>
Wed, 17 Aug 2016 07:31:47 +0000 (09:31 +0200)
.gitignore
ddt180.z80

index defdc4430015414c3cf824273a80f815ba1bc47e..caa11b36759fc55b992df3b30bdd8240eb926646 100644 (file)
@@ -1,4 +1,5 @@
 scratch
+*.sym
 *.lst
 *.rel
 *.prl
index cc5ca41c0e34e548f6dbced670e4c399e5f794ea..5b531f6667d73440427cff1e843e5f1c0a775695 100644 (file)
@@ -2096,15 +2096,14 @@ l0c15h:
        call skipbl\r
        jr z,l0c30h\r
        call sub_0363h\r
-       ld b,h\r
-       ld c,l\r
-       pop af\r
+       ex de,hl\r
+       pop bc\r
        pop hl\r
-       ld (hl),c\r
-       bit 0,a\r
+       ld (hl),e\r
+       bit 0,c\r
        ret z\r
        inc hl\r
-       ld (hl),b\r
+       ld (hl),d\r
        ret\r
 l0c30h:\r
        pop af\r
@@ -2112,19 +2111,18 @@ l0c30h:
        ret\r
 \r
 l0c33h:\r
-       ld b,c\r
        call pstr\r
        call    pstr_inl\r
        dc      '='\r
        ld a,(de)\r
-       bit 0,b\r
+       bit 0,c\r
        jp z,out_hex\r
        ld l,a\r
        inc de\r
        ld a,(de)\r
        dec de\r
        ld h,a\r
-       bit 1,b\r
+       bit 1,c\r
        jp z,out_hl\r
        jp out.hl.@\r
 \r
@@ -4520,6 +4518,9 @@ p_disas_line:
 \r
        ld c,16\r
        call p_fill_space\r
+       call    p_offset\r
+       ld      a,80h\r
+       jp      p_sym_space\r
 \r
 p_offset:\r
        ld de,(var.@)\r
@@ -4531,6 +4532,7 @@ p_offset:
        and a\r
        sbc hl,de\r
        call out_hl\r
+       add     hl,de\r
        jp out_rparen\r
 \r
 p_disas_instr:\r
@@ -4723,14 +4725,11 @@ sub_1a72h:
        inc hl\r
        jr sub_1a72h\r
 l1a7fh:\r
+       ld de,l1c97h\r
        inc hl\r
        ld c,(hl)\r
-       ld hl,t_MNEMONICS\r
-       ld b,0\r
-       add hl,bc\r
-       ld de,l1c97h\r
-       scf\r
-       ret\r
+       jr get_mnemonic\r
+\r
 \r
 test_DDFD:\r
        ld a,(hl)\r
@@ -4756,6 +4755,7 @@ lookup_opc:
        and a\r
        jr nz,lookup_opc\r
        ret\r
+\r
 l1aa8h:\r
        inc hl\r
        ld c,(hl)\r
@@ -4763,8 +4763,9 @@ l1aa8h:
        ld e,(hl)\r
        inc hl\r
        ld d,(hl)\r
+get_mnemonic:\r
        ld hl,t_MNEMONICS\r
-       ld b,000h\r
+       ld b,0\r
        add hl,bc\r
        scf\r
        ret\r
@@ -4788,7 +4789,7 @@ b_1ab6_start:
        db 0ffh\r
 \r
 \r
-;      1 byte opcodes\r
+; 1 byte opcodes\r
 ; Format: db mask, match, t_MNEMONICS-index\r
 ;        dw argument formating fuction\r
 b_1ad1_start:\r
@@ -4846,7 +4847,7 @@ b_1ad1_start:
        dw l1ce5h\r
        db 0\r
 \r
-;      2 byte opdodes\r
+; 2 byte opdodes\r
 b_1b54_start:\r
        db 0c7h,006h,056h       ;ld r,nn\r
        dw l1cfah\r
@@ -4878,7 +4879,7 @@ b_1b54_start:
        dw l1d29h\r
        db 0\r
 \r
-;      3 byte opcodes\r
+; 3 byte opcodes\r
 b_1b9b_start:\r
        db 0c7h,0c2h,052h       ;jp cc,mn\r
        dw p_arg_cc_mn\r
@@ -5685,7 +5686,7 @@ l2115h:
        ret\r
 cmd_C:\r
        ld hl,cmd_C\r
-       ld a,001h\r
+       ld a,1\r
        jr l2122h\r
 cmd_T:\r
        xor a\r