CONBUF_SIZE equ 80 ;Size of console input buffer\r
EXPR_BUF_SIZE equ 128 ;expressen buffer for conditional breakpoints\r
BP_CNT equ 12 ;Number of breakpoints\r
-BP_SIZE equ 6 ;Size of a breakpoint record\r
+BP_SIZE equ 4 ;Size of a breakpoint record\r
\r
;-------------------------------------------------------------------------------\r
\r
; set breakpoints\r
; > BX\r
; clear all breakpoints\r
-; > BX address [address..]\r
+; > BX breakp [breakp..]\r
; clear breakpoints\r
;\r
-; where breakp is:\r
-; expression\r
+; breakp can be any valid expression\r
\r
cmd_B:\r
call skipbl\r
pop de\r
ld (ix+002h),l\r
ld (ix+003h),h\r
- call bp_get_count\r
- ld (ix+004h),l\r
- ld (ix+005h),h\r
call next_arg\r
pop af\r
ld (ix+000h),a\r
error12\r
jp ERROR\r
\r
-bp_get_count:\r
- call skipbl\r
- ld hl,1\r
- cp ':'\r
- ret nz\r
- inc de\r
- call expr\r
- jr c,error12\r
- ret\r
\r
;-------------------------------------------------------------------------------\r
; Breakpoint handling routine.\r
ld d,(ix+003h)\r
ld hl,(reg.pc)\r
call cp_hl_de\r
- push bc\r
- call z,sub_0942h\r
- pop bc\r
-l0938h:\r
-\r
- call bpl_next\r
- ex af,af'\r
- ret\r
-\r
-sub_0942h:\r
+ jr nz,l0938h\r
ex af,af'\r
res 7,a\r
- ex af,af'\r
- ld e,(ix+004h)\r
- ld d,(ix+005h)\r
- dec de\r
- ld a,d\r
- or e\r
- jr z,l0974h\r
- ld (ix+004h),e\r
- ld (ix+005h),d\r
- ret\r
-l0974h:\r
- ex af,af'\r
or (ix+000h)\r
ex af,af'\r
+l0938h:\r
+ call bpl_next\r
+ ex af,af'\r
ret\r
\r
bp_restore_mem:\r
\r
bp_trace_enter:\r
call bp_get_freeslot\r
- ld (ix+004h),001h\r
- ld (ix+005h),000h\r
ld (ix+002h),l\r
ld (ix+003h),h\r
ld a,(b_21e2_start)\r
ld de,BDOS\r
and a\r
sbc hl,de\r
- ld hl,l20edh\r
+ ld hl,l20edh ;set break after BDOS call\r
jr z,l2031h\r
ld iy,(reg.pc)\r
call disas_get_instrlen\r
\r
l20dch:\r
l20edh:\r
- ld hl,(reg_sp)\r
+ ld hl,(reg_sp) ;break on return address\r
ld e,(hl)\r
inc hl\r
ld d,(hl)\r