EXPR_BUF_SIZE equ 128 ;expressen buffer for conditional breakpoints\r
BP_CNT equ 12 ;Number of breakpoints\r
BP_SIZE equ 8 ;Size of a breakpoint record\r
-YREG_CNT equ 10 ;Number of Y registers (0..9)\r
\r
;-------------------------------------------------------------------------------\r
\r
dw cmd_V ;Verify (compare) two memory areas\r
dw cmd_W ;Write a file to disk\r
dw cmd_X ;eXamine [and substitute] registers\r
- dw cmd_Y ;examine [and substitute] Y variables\r
+ dw ERROR ;cmd_Y ;examine [and substitute] Y variables\r
dw cmd_Z ;Zap (fill) memory with a byte string\r
\r
ERROR:\r
jr z,fact_factor\r
cp '^'\r
jr z,fact_reg.CPU\r
- cp 'Y'\r
- jr z,fact_reg.Y\r
cp '('\r
jr z,fact_mem\r
cp '['\r
\r
;-------------------------------------------------------------------------------\r
\r
-fact_reg.Y:\r
- call get.decdigit\r
- jr c,error1\r
- inc de\r
-get_y_val:\r
- add a,a\r
- ld hl,reg_Y\r
- call add_hl_a\r
- ld a,(hl)\r
- inc hl\r
- ld h,(hl)\r
- ld l,a\r
- and a\r
- ret\r
-\r
fact_factstring:\r
ld hl,0\r
l054bh:\r
; > Y[0..9]\r
; examine (and substitute) an Y variable\r
\r
-cmd_Y:\r
- call get.decdigit\r
- jr c,l0bc3h\r
- inc de\r
- push af\r
- call assert_eol\r
- pop af\r
- call sub_0bdch\r
- jp l0c15h\r
-l0bc3h:\r
- call assert_eol\r
- xor a\r
-l0bc7h:\r
- push af\r
- call sub_0bdch\r
- call outbl4\r
- pop af\r
- inc a\r
- bit 0,a\r
- push af\r
- call z,crlf\r
- pop af\r
- cp YREG_CNT\r
- jr c,l0bc7h\r
- ret\r
-\r
-sub_0bdch:\r
- ld c,a\r
- ld b,0\r
- add a,'0'+080h\r
- ld de,msg_Y+1\r
- ld (de),a\r
- dec de\r
- ld hl,reg_Y\r
- add hl,bc\r
- add hl,bc\r
- ex de,hl\r
- ld c,003h\r
- jp l0c33h\r
\r
;-------------------------------------------------------------------------------\r
; > X\r
\r
;-------------------------------------------------------------------------------\r
\r
-msg_Y:\r
- dc 'Yn'\r
-reg_Y:\r
- rept YREG_CNT\r
- dw 0\r
- endm\r
-\r
last_S:\r
dw TPA\r
\r