summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo C2018-12-01 09:09:45 +0100
committerLeo C2018-12-01 09:09:45 +0100
commit4a39ae180ee23038b2eb0d1e574e85c341bff50b (patch)
treeed59f9ad6e514fcfce5b3cc65aa2d18ef8d70ddd
parent4bb547a7aa8504d67450125bcd1c38065277e6b4 (diff)
downloadddt180-4a39ae180ee23038b2eb0d1e574e85c341bff50b.zip
Renaming
-rw-r--r--ddt180.z8098
1 files changed, 53 insertions, 45 deletions
diff --git a/ddt180.z80 b/ddt180.z80
index a2c6213..220c074 100644
--- a/ddt180.z80
+++ b/ddt180.z80
@@ -1924,14 +1924,13 @@ bp_tst_@pc:
ld a,(ix+000h)
and 003h
- jr z,l09c0h
+ jr z,bp_tst_e
ld e,(ix+002h)
ld d,(ix+003h)
ld hl,(reg.pc)
call cp_hl_de
ret z
-l09c0h:
-
+bp_tst_e:
call bpl_next
sub a
inc a
@@ -1948,9 +1947,9 @@ bp_trace_enter:
ld a,(b_21e2_start)
and a
ld a,008h
- jr nz,l09edh
+ jr nz,bp_t_e
rra
-l09edh:
+bp_t_e:
ld (ix+000h),a
ret
@@ -1994,7 +1993,7 @@ user_go:
jr nz,l0a41h
ld a,001h
ld (b_21e2_start),a
- call sub_1ffeh
+ call tc_set_bp
ld c,008h
l0a41h:
call bp_set_to_mem
@@ -5702,7 +5701,7 @@ t__C_:
;-------------------------------------------------------------------------------
-sub_1ffeh:
+tc_set_bp:
ld hl,(reg.pc)
ld a,h
or l
@@ -5754,22 +5753,22 @@ b_2048_start:
dw l20dch
db 0ffh,0cfh,000h ;rst 8
dw l2115h
- db 0c7h,0c7h,000h ;
+ db 0c7h,0c7h,000h ;rst n
dw l20f9h
- db 0c7h,0c4h,000h ;
+ db 0c7h,0c4h,000h ;call cc,mn
dw l2080h
- db 0f7h,010h,000h ;
+ db 0f7h,010h,000h ;djnz d; jr d
dw l2093h
- db 0e7h,020h,000h ;
+ db 0e7h,020h,000h ;jr cc,d
dw l2093h
- db 0c7h,0c2h,000h ;
+ db 0c7h,0c2h,000h ;jp cc,mn
dw l208bh
- db 0c7h,0c0h,000h ;
+ db 0c7h,0c0h,000h ;ret cc
dw l20c5h
db 0
;-------------------------------------------------------------------------------
-
+; call mn call cc,mn
l2080h:
ld a,(b_21e2_start)
and a
@@ -5777,11 +5776,14 @@ l2080h:
ld a,(trace_call_flag)
and a
ret nz
+
+; jp mn jp cc,mn
l208bh:
ld l,(iy+001h)
ld h,(iy+002h)
scf
ret
+
l2093h:
ld c,(iy+001h)
ld a,c
@@ -5794,27 +5796,34 @@ l2093h:
inc hl
scf
ret
+
+; jp (hl)
l20a2h:
ld hl,(reg.l)
scf
ret
+
+; Prefix DD
l20a7h:
ld hl,(reg.ix)
jr l20afh
+; Prefix FD
l20ach:
ld hl,(reg.iy)
l20afh:
ld a,(iy+001h)
- cp 0e9h
+ cp 0e9h ; jp (ix); jp (iy)
scf
ret z
and a
ret
+
+; Prefix ED
l20b8h:
ld a,(iy+001h)
- cp 04dh
+ cp 04dh ; reti
jr z,l20dch
- cp 045h
+ cp 045h ; retn
jr z,l20dch
and a
ret
@@ -5852,6 +5861,7 @@ l20edh:
ld d,(hl)
ex de,hl
call bp_trace_enter
+l2115h:
and a
ret
@@ -5872,9 +5882,6 @@ l20f9h:
l2113h:
scf
ret
-l2115h:
- and a
- ret
;-------------------------------------------------------------------------------
; >>C[N][J] [steps]
@@ -5885,7 +5892,7 @@ l2115h:
cmd_C:
ld hl,cmd_C
ld a,1
- jr l2122h
+ jr cmd_tc
;-------------------------------------------------------------------------------
; >>T[N][J] [steps]
@@ -5896,32 +5903,32 @@ cmd_C:
cmd_T:
xor a
ld hl,cmd_T
-l2122h:
+cmd_tc:
ld (cmd_rpt),hl
ld (trace_call_flag),a
call get_char_upper
sub 'N'
- jr nz,l212eh
+ jr nz,tc_non
inc de
-l212eh:
+tc_non:
ld (trace_N_flag),a
call get_char_upper
sub 'J'
- jr nz,l2137h
+ jr nz,tc_noj
inc de
-l2137h:
+tc_noj:
ld (trace_J_flag),a
- call sub_21a6h
- jr z,l2145h
- ld hl,1
+ call tc_chk_u_or_w
+ jr z,tc_save_uw_expr_ptr
+ ld hl,1 ;default: 1 step
call get_lastarg_def
-l2145h:
- ld (trace_count),hl
+tc_save_uw_expr_ptr:
+ ld (trace_cnt_or_ptr),hl
sub a
ld (bp_p_cpu_flag),a
l214ch:
- call sub_1ffeh
- jr l21a3h
+ call tc_set_bp
+ jr user_go1
l2151h:
call bp_clr_temporary
@@ -5935,40 +5942,41 @@ l2151h:
call lookup_opc
jr nc,l214ch
l216bh:
- ld a,(trace_UW_flag)
+ ld a,(trace_UW_flag) ;0 or 'U' or 'W'
and a
- jr z,l2188h
- ld de,(trace_count)
+ jr z,tc_cnt ;flag is 0, check for step count.
+ ld de,(trace_cnt_or_ptr)
call expr
ld a,h
or l
add a,0ffh
sbc a,a
- ld hl,trace_UW_flag
+ ld hl,trace_UW_flag ;'U' or 'W'
xor (hl)
- bit 1,a
+ bit 1,a ;'U' = 55H, 'W' = 57H
jr z,l2193h
do_break0: ;print registers and go to main loop
jp do_break
-l2188h:
- ld hl,(trace_count)
+
+tc_cnt:
+ ld hl,(trace_cnt_or_ptr)
dec hl
- ld (trace_count),hl
+ ld (trace_cnt_or_ptr),hl
ld a,h
or l
jr z,do_break0
l2193h:
- call sub_1ffeh
+ call tc_set_bp
jr nc,do_break0
ld a,(trace_N_flag)
ld b,a
ld a,(bp_p_cpu_flag)
or b
ld (bp_p_cpu_flag),a
-l21a3h:
+user_go1:
jp user_go
-sub_21a6h:
+tc_chk_u_or_w:
call skipbl
xor a
ld (trace_UW_flag),a
@@ -6019,7 +6027,7 @@ trace_call_flag:
db 0 ;1=call, 0=trace
trace_UW_flag:
db 0 ;0 or 'U' or 'W'
-trace_count:
+trace_cnt_or_ptr:
dw 0
trace_N_flag:
db 0 ;0 if 'N'