summaryrefslogtreecommitdiff
path: root/ddt180.z80
diff options
context:
space:
mode:
Diffstat (limited to 'ddt180.z80')
-rw-r--r--ddt180.z8083
1 files changed, 44 insertions, 39 deletions
diff --git a/ddt180.z80 b/ddt180.z80
index 3f356f2..80e423a 100644
--- a/ddt180.z80
+++ b/ddt180.z80
@@ -571,8 +571,6 @@ CALL_HL:
crlf:
call pstr_inl
dc CR,LF
- xor a
- ld (con_col),a
call inchar
jr c,mainloop
ret
@@ -682,6 +680,14 @@ l0242h:
ld a,'.'
jr outchar
+out_hl_bl2:
+ call out_hl
+ jr outbl2
+
+out_hex_bl:
+ call out_hex
+ jr outbl
+
outbl6:
call outbl2
outbl4:
@@ -700,8 +706,6 @@ outchar:
and 07fh
ld c,a
call conout
- ld hl,con_col
- inc (hl)
pop af
pop bc
pop de
@@ -710,14 +714,6 @@ outchar:
pop ix
ret
-p_goto_col:
- ld a,(con_col)
- cp c
- ret nc
- ret z
- call outbl
- jr p_goto_col
-
;-------------------------------------------------------------------------------
incharw:
@@ -1485,10 +1481,10 @@ l063eh:
push hl
push de
ld de,(reg.pc)
+ or a
call p_disas_instr
pop de
pop hl
- call crlf
call p_f2
call outbl2
ld b,7
@@ -1769,8 +1765,7 @@ bp_print:
jr z,bp_pr_cont
ld l,(ix+002h)
ld h,(ix+003h)
- call out_hl
- call outbl2
+ call out_hl_bl2
inc c
bp_pr_cont:
call bpl_next
@@ -2328,8 +2323,7 @@ l0dedh:
call out_hex
call outbl2
ld a,c
- call out_hex
- call outbl
+ call out_hex_bl
ex de,hl
call out_hl
ex de,hl
@@ -2372,8 +2366,7 @@ cmd_H:
call expr
jp c,p_max_high0
call assert_eol
- call out_hl
- call outbl2
+ call out_hl_bl2
call out_hl_neg
call outbl4
call out.hl.dec
@@ -2530,14 +2523,12 @@ sub_0f58h:
push hl
push af
l0f5ch:
- call out_hl
- call outbl2
+ call out_hl_bl2
ld de,0
l0f68h:
ld a,(hl)
inc hl
- call out_hex
- call outbl
+ call out_hex_bl
dec bc
inc e
ld a,e
@@ -2699,13 +2690,13 @@ p_max_high:
call pstr_inl
DC 'High = '
ld hl,(high_load)
- call out_hl
+ call out_hl_bl2
call pstr_inl
- DC ' Max = '
+ DC 'Max = '
ld hl,(max_load)
- call out_hl
+ call out_hl_bl2
call pstr_inl
- DC ' Top = '
+ DC 'Top = '
ld hl,ddtz_base-1
call out_hl
jp crlf
@@ -2762,20 +2753,33 @@ l190fh:
cmdl_p_line:
; push hl
- call out_hl
- call outbl2
- sub a
- ld (con_col),a
+ call out_hl_bl2
ex de,hl
- call p_disas_instr
- call crlf
+ scf
+ call p_disas_instr
ex de,hl
ld (last_L),hl
ret
p_disas_instr:
+ push af
call dis_decode
- jp pstr ;print instruction text
+ pop af
+ jr nc,pdinstr_1
+ ld a,3
+ sub b
+ jr c,pdinstr_1
+ inc a
+ ld b,a
+ add a,b
+ add a,b
+ ld b,a
+pdinstr_0:
+ call outbl
+ djnz pdinstr_0
+pdinstr_1:
+ call pstr ;print instruction text
+ jp crlf
;-------------------------------------------------------------------------------
@@ -2786,7 +2790,9 @@ dis_decode:
PUSH BC
pop iy
PUSH BC ;workspace (4 bytes)
+ rl c ;carry to c.0
PUSH BC
+ ld c,b
ADD iy,SP ;workspace pointer to iy
LD HL,GROUP3
@@ -3277,6 +3283,7 @@ i_opc_bli equ opc_index
; B: operand index
; DE: Address of next instruction byte
; HL: Address of next free byte in output buffer
+; (iy+0): Bit = 1: Print opcodes
; (iy+1): index register flag (1=IX, 2=IY, else 0)
; (iy+2): displacement for any indexed instruction
; (iy+3): no. of instraction bytes fetched
@@ -3556,6 +3563,9 @@ COPY:
;-------------------------------------------------------------------------------
FETCH:
+ LD A,(DE)
+ bit 0,(iy+0)
+ call nz,out_hex_bl
INC (iy+3)
LD A,(DE)
INC DE
@@ -3802,11 +3812,6 @@ user_go1:
;-------------------------------------------------------------------------------
-con_col:
- db 0
-
-;-------------------------------------------------------------------------------
-
b_21e2_start:
db 0
trace_cnt_or_ptr: