X-Git-Url: http://cloudbase.mooo.com/gitweb/ddt180.git/blobdiff_plain/12eea40b2a19262bffbb570149ef9a6c68c3d8b5..25ba7c19777f6d5dad514864f40f57bbedcb3e13:/ddt180.z80 diff --git a/ddt180.z80 b/ddt180.z80 index 3ab5b88..5e17667 100644 --- a/ddt180.z80 +++ b/ddt180.z80 @@ -39,21 +39,11 @@ CNTRX equ 'X'-'@' ; CP/M memory layout BDOS equ 5 -dfcb1 equ 05ch -dfcb2 equ 06ch -DMA_BUF equ 080h TPA equ 0100h ; BDOS function calls BDOS_PSTR equ 9 ;Print String -BDOS_OPEN equ 15 ;Open File -BDOS_CLOSE equ 16 ;Close File -BDOS_DELETE equ 19 ;Delete File -BDOS_READ equ 20 ;Read Sequential -BDOS_WRITE equ 21 ;Write Sequential -BDOS_CREATE equ 22 ;Make File -BDOS_SETDMA equ 26 ;Set DMA Address ; ddtz specific definitions @@ -61,7 +51,7 @@ STACK_SIZE equ 80 ;ddtz internal stack CONBUF_SIZE equ 80 ;Size of console input buffer EXPR_BUF_SIZE equ 128 ;expressen buffer for conditional breakpoints BP_CNT equ 12 ;Number of breakpoints -BP_SIZE equ 6 ;Size of a breakpoint record +BP_SIZE equ 4 ;Size of a breakpoint record ;------------------------------------------------------------------------------- @@ -118,7 +108,6 @@ reg.iff: db 0f3h db 0c3h reg.pc: dw TPA -var.$: dw 0000h cmd_rpt:dw mainloop @@ -156,20 +145,35 @@ l0093h: ld hl,ddtz_base ld l,000h ld (reg_sp),hl - ld a,(dfcb1+1) - cp ' ' - ld hl,0 - call nz,read_file + + ld hl,(1) ;wboot addr + ld de,?const + ld b,6 +vini_l: + inc hl + inc hl + inc hl + ex de,hl + inc hl + ld (hl),e + inc hl + ld (hl),d + inc hl + ex de,hl + djnz vini_l + jr mainloop ds CONBUF_SIZE + 3 - ($ - conbuf) ;------------------------------------------------------------------------------- -?const: -?conin: -?cono: - ret +?const: jp 0 ; return console input status +?conin: jp 0 ; return console input character +?cono: jp 0 ; send console output character +?list: jp 0 ; send list output character +?auxo: jp 0 ; send auxiliary output character +?auxi: jp 0 ; return auxiliary input character CMDTAB: dw ERROR ;cmd_@ ;examine/substitute the displacement register @ @@ -178,7 +182,7 @@ CMDTAB: dw ERROR ;cmd_C ;trace over Calls dw cmd_D ;Display memory in hex and ascii dw ERROR ; - dw cmd_F ;specify Filename and command line + dw ERROR ;cmd_F ;specify Filename and command line dw cmd_G ;Go dw cmd_H ;compute Hex and other expressions dw cmd_I ;Input a byte from port @@ -195,7 +199,7 @@ CMDTAB: dw cmd_T ;Trace dw ERROR ; dw cmd_V ;Verify (compare) two memory areas - dw cmd_W ;Write a file to disk + dw ERROR ;cmd_W ;Write a file to disk dw cmd_X ;eXamine [and substitute] registers dw ERROR ;cmd_Y ;examine [and substitute] Y variables dw cmd_Z ;Zap (fill) memory with a byte string @@ -208,7 +212,6 @@ p_msg_error: mainloop: ld sp,stack ld hl,(reg.pc) - ld (var.$),hl call bp_clr_temporary ld hl,(cmd_rpt) ld de,mainloop @@ -244,9 +247,9 @@ exe_hl: crlf: call pstr_inl dc CR,LF - call inchar - ld a,0 + xor a ld (con_col),a + call inchar jr c,mainloop ret @@ -387,13 +390,20 @@ outchar: pop ix ret +pstr_sel: + inc b + jr pstr_sel2 +pstr_sel1: + call sub_0345h +pstr_sel2: + djnz pstr_sel1 + ;fall thru pstr: ld a,(hl) inc hl and a ret z call outchar - and a ret m jr pstr @@ -413,25 +423,9 @@ p_goto_col: ;------------------------------------------------------------------------------- -$ci: - push hl - push de - push bc - call ?conin - pop bc - pop de - pop hl - ret - -$co: - push hl - push de - push bc - ld c,a - call ?cono - pop bc - pop de - pop hl +incharw: + call inchar + jr nc,incharw ret ;------------------------------------------------------------------------------- @@ -467,18 +461,8 @@ DELC: cp ' ' ret nc DELC1: - push de - push hl - push bc - ld c,BS - call ?cono - ld c,' ' - call ?cono - ld c,BS - call ?cono - pop bc - pop hl - pop de + call pstr_inl + dc BS,' ',BS ret DELL: @@ -501,18 +485,17 @@ inlnxtch: ld a,c ; or a ; jr z,inl_e ; - call $ci ; + call incharw ; cp CR ; jr z,inl_e ;Accept line cp LF ; jr z,inl_e ;Accept line + cp BS ; - jr nz,gl_1 ; - call DELC ;Delete Char - jr inlnxtch ; -gl_1: + jr z,gl_1 ; cp DEL ; jr nz,gl_2 ; +gl_1: call DELC ;Delete Char jr inlnxtch ; gl_2: @@ -529,11 +512,11 @@ gl_4: cp ' ' ; jr nc,gl_5 ; ld a,'^' ;Controll characters - call $co ; + call outchar ; ld a,(hl) ; add a,'@' ; gl_5: - call $co ; + call outchar ; inc hl ; inc b ; dec c ; @@ -544,7 +527,6 @@ inl_e: ld hl,conbuf+1 ; ld (hl),b ; call CRLF ; - inc hl ex de,hl pop hl ; @@ -569,17 +551,20 @@ skipbl0: inc de skipbl: call get_char_upper - call test_whitespace + cp ' ' + jr z,skipbl0 + cp TAB jr z,skipbl0 or a ret +;------------------------------------------------------------------------------- + next_arg: call skipbl cp ',' ret nz - inc de - call skipbl + call skipbl0 cp a ret @@ -677,14 +662,6 @@ l0339h: pop bc ret -sel_dc_string: - inc b -l033eh: - dec b - ret z - call sub_0345h - jr l033eh - sub_0345h: ld a,(hl) and a @@ -798,91 +775,6 @@ l03b8h: expr: call skipbl expr1: - call do_subexpr - ret c - call do_rel_op - ret nc - push bc - push hl - call do_subexpr - jr c,error0 - ex de,hl - ex (sp),hl - and a - sbc hl,de - ld hl,0ffffh - pop de - ret - -;------------------------------------------------------------------------------- - -do_op_eq: - jr z,l03edh - jr l03ech -do_op_ne: - jr nz,l03edh - jr l03ech -do_op_le: - jr z,l03edh -do_op_lt: - jr c,l03edh - jr l03ech -do_op_gt: - jr z,l03ech -do_op_ge: - jr nc,l03edh -l03ech: - inc hl -l03edh: - and a - ret -do_rel_op: - push hl - ld hl,tab_eq_le_ge - call lookupch - jr nc,l041dh - ld a,b - or a - jr z,l0411h - ld a,(de) - cp '=' - jr nz,l0406h - inc de - inc b - inc b - jr l0411h -l0406h: - bit 0,b - jr z,l0411h - cp '>' - jr nz,l0411h - inc de - ld b,005h -l0411h: - ld hl,tab_func_eqlege - ld a,b - add a,a - call add_hl_a - ld c,(hl) - inc hl - ld b,(hl) - scf -l041dh: - pop hl - ret - -tab_eq_le_ge: - db '=<>',0 - -tab_func_eqlege: - dw do_op_eq - dw do_op_lt - dw do_op_gt - dw do_op_le - dw do_op_ge - dw do_op_ne - -do_subexpr: call do_factor ret c l0433h: @@ -1050,7 +942,7 @@ do_factor: call get.number ret nc inc de - ld hl,(BDOS+1) + ld hl,ddtz_base-1 cp 'T' ret z ld hl,(high_load) @@ -1062,12 +954,6 @@ do_factor: ld hl,TPA cp 'L' ret z - ld hl,(var.$) - cp '$' - ret z - ld hl,ddtz_base - cp 'Z' - ret z cp '-' jr z,fact_factneg cp '~' @@ -1483,11 +1369,10 @@ bp_clr_temporary: ; set breakpoints ; > BX ; clear all breakpoints -; > BX address [address..] +; > BX breakp [breakp..] ; clear breakpoints ; -; where breakp is: -; expression +; breakp can be any valid expression cmd_B: call skipbl @@ -1571,9 +1456,6 @@ bp_enter: pop de ld (ix+002h),l ld (ix+003h),h - call bp_get_count - ld (ix+004h),l - ld (ix+005h),h call next_arg pop af ld (ix+000h),a @@ -1591,15 +1473,6 @@ bp_get_freeslot: error12 jp ERROR -bp_get_count: - call skipbl - ld hl,1 - cp ':' - ret nz - inc de - call expr - jr c,error12 - ret ;------------------------------------------------------------------------------- ; Breakpoint handling routine. @@ -1667,32 +1540,14 @@ sub_0913h: ld d,(ix+003h) ld hl,(reg.pc) call cp_hl_de - push bc - call z,sub_0942h - pop bc -l0938h: - - call bpl_next - ex af,af' - ret - -sub_0942h: + jr nz,l0938h ex af,af' res 7,a - ex af,af' - ld e,(ix+004h) - ld d,(ix+005h) - dec de - ld a,d - or e - jr z,l0974h - ld (ix+004h),e - ld (ix+005h),d - ret -l0974h: - ex af,af' or (ix+000h) ex af,af' +l0938h: + call bpl_next + ex af,af' ret bp_restore_mem: @@ -1733,8 +1588,6 @@ bp_tst_e: bp_trace_enter: call bp_get_freeslot - ld (ix+004h),001h - ld (ix+005h),000h ld (ix+002h),l ld (ix+003h),h ld a,(b_21e2_start) @@ -1829,15 +1682,13 @@ cmd_X: jp nc,p_cpustat0 call assert_eol ld a,b - cp 01eh + cp 25 jr z,l0c5fh - cp 01fh + cp 26 jr z,l0c4fh - cp 01dh - jp z,ERROR ex de,hl ld hl,t_reg_names - call sel_dc_string + call pstr_sel call l0c33h call outbl @@ -1862,7 +1713,6 @@ l0c30h: ret l0c33h: - call pstr call pstr_inl dc '=' ld a,(de) @@ -1947,38 +1797,33 @@ sub_0caeh: ret t_reg_names: - DC 'BC''' - DC 'DE''' - DC 'HL''' - DC 'BC' - DC 'DE' - DC 'HL' - DC 'A''' - DC 'B''' - DC 'C''' - DC 'D''' - DC 'E''' - DC 'H''' - DC 'L''' - DC 'A' - DC 'B' - DC 'C' - DC 'D' - DC 'E' - DC 'H' - DC 'L' - DC 'IX' - DC 'IY' - DC 'SP' - DC 'PC' - DC 'X' - DC 'Y' - DC 'S' - DC 'P' - DC 'I' - DC 'IP' - DC 'F''' - DC 'F' + DC 'BC''' ;0 + DC 'DE''' ;1 + DC 'HL''' ;2 + DC 'BC' ;3 + DC 'DE' ;4 + DC 'HL' ;5 + DC 'A''' ;6 + DC 'B''' ;7 + DC 'C''' ;8 + DC 'D''' ;9 + DC 'E''' ;10 + DC 'H''' ;11 + DC 'L''' ;12 + DC 'A' ;13 + DC 'B' ;14 + DC 'C' ;15 + DC 'D' ;16 + DC 'E' ;17 + DC 'H' ;18 + DC 'L' ;19 + DC 'IX' ;20 + DC 'IY' ;21 + DC 'SP' ;22 + DC 'PC' ;23 + DC 'I' ;24 + DC 'F''' ;25 + DC 'F' ;26 DB 0 b_0cfa_start: @@ -2030,18 +1875,8 @@ b_0cfa_start: dw reg_sp db 003h dw reg.pc - db 003h - dw reg.ix - db 003h - dw reg.iy - db 003h - dw reg_sp - db 003h - dw reg.pc db 000h dw reg.i - db 003h - dw l004eh db 000h dw reg.f2 db 000h @@ -2160,29 +1995,17 @@ l0dedh: call crlf l0e10h: pop bc - inc hl inc de - dec bc - ld a,b - or c - jr nz,l0dedh + cpi + jp pe,l0dedh ret ;------------------------------------------------------------------------------- -; > M[V] startaddr endaddr destaddr -; Move memory [and verify] +; > M startaddr endaddr destaddr +; Move memory cmd_M: - call get_char_upper - cp 'V' - jr nz,l0e1fh - inc de -l0e1fh: - push af call sub_034eh - push hl - push de - push bc call cp_hl_de jr nc,cmdm_up add hl,bc @@ -2195,11 +2018,6 @@ l0e1fh: db 01h ;swallow ldir instruction (ld bc,...) cmdm_up: ldir - pop bc - pop de - pop hl - pop af - jr z,l0dedh ret ;------------------------------------------------------------------------------- @@ -2232,32 +2050,31 @@ cmd_H: ; Query memory for a byte string [Justified] cmd_Q: - call get_char_upper - sub 'J' - ld (cmd_Q_jopt),a - jr nz,l0e8dh - inc de -l0e8dh: call get_arg_range push bc push hl call sub_0ee6h pop hl l0e96h: - call sub_0ed7h + push hl + push de + push bc +l0edah: + ld a,(de) + cp (hl) + jr nz,l0ee2h + inc de + inc hl + djnz l0edah +l0ee2h: + pop bc + pop de + pop hl jr nz,l0eb0h push bc - push hl - ld a,(cmd_Q_jopt) - or a - jr nz,l0ea7h - ld bc,-8 - add hl,bc -l0ea7h: ld bc,16 - and a + and a ;clear carry call sub_0f58h - pop hl pop bc l0eb0h: inc hl @@ -2296,23 +2113,6 @@ l0ed3h: pop hl ret -sub_0ed7h: - push hl - push de - push bc -l0edah: - ld a,(de) - cp (hl) - jr nz,l0ee2h - inc de - inc hl - djnz l0edah -l0ee2h: - pop bc - pop de - pop hl - ret - sub_0ee6h: ld hl,conbuf+1 call sub_0ef7h @@ -2323,26 +2123,13 @@ sub_0ee6h: ret nz jp ERROR -sub_0ef7h: - db 0e6h ; and 037h (clear carry) -sub_0ef8h: +sub_0ef7h: ;from cmd_Q, cmd_Z + db 0e6h ;and 037h (clear carry) +sub_0ef8h: ;from cmd_S scf l0ef9h: push af call next_arg - cp 'W' - jr nz,l0f0eh - inc de - push hl - call sub_035dh - ex de,hl - ex (sp),hl - ld (hl),e - inc hl - ld a,d - pop de - jr l0f1ah -l0f0eh: cp '''' jr z,l0f1eh push hl @@ -2350,7 +2137,6 @@ l0f0eh: ld a,l pop hl jr c,l0f42h -l0f1ah: ld (hl),a inc hl jr l0f3ah @@ -2404,8 +2190,7 @@ sub_0f58h: push af l0f5ch: call out_hl - call z,outbl2 - call outbl + call outbl2 ld de,0 l0f68h: ld a,(hl) @@ -2462,201 +2247,89 @@ l0fach: ; > Fcommandline ; specifiy filenames and command line -cmd_F: +;cmd_F: + +;------------------------------------------------------------------------------- +; > R [displacement] +; Read Intel Hex File from console [add displacement] + +cmd_R: + ld hl,0 + call get_lastarg_def ;get offset from command line + push hl + ld hl,0 + ld (high_load),hl +w_recstart: + call i.getchar + jr z,rdhex_done + cp ':' + jr nz,w_recstart + ld c,0 ;init checksum + call i.gethexbyte ;record len + ld b,a + call i.gethexbyte ;address high + ld h,a + call i.gethexbyte ;address low + ld l,a + call i.gethexbyte ;record type (ignored) + ld a,b + and a ;record len == 0? + jr z,rdhex_done +l16c6h: + call i.gethexbyte + pop de ;offset push de - ld hl,DMA_BUF+1 - ld (hl),' ' - inc hl -l0fb6h: - call get_char_upper - ld (hl),a + push hl + add hl,de + call i.storebyte + pop hl inc hl - inc de + djnz l16c6h ;repeat for record len + call i.gethexbyte ;checksum + ld a,c and a - jr nz,l0fb6h - ld a,l - sub DMA_BUF+2 - ld (DMA_BUF),a + jp nz,ERROR ;exit if checksum error + jr w_recstart ;next record +rdhex_done: pop hl - ld de,dfcb1 - call parse_filename - ld de,dfcb2 - ;fall thru + call i.gethexbyte + jp p_max_high -parse_filename: - call sub_102ch - push de - push bc - ld b,(hl) - inc hl - ld a,(hl) - cp ':' - jr nz,l0fe1h - inc hl - ld a,b - sub 040h - and 01fh - jr l0fe3h -l0fe1h: - dec hl - xor a -l0fe3h: - ld (de),a - inc de - ld b,8 - call sub_0ff2h - ld b,3 - call sub_0ff2h - pop bc - pop de - ret - -sub_0ff2h: - call sub_1012h - jr z,l0ffeh - inc hl - ld (de),a - inc de - djnz sub_0ff2h - jr l1003h -l0ffeh: - ld a,c -l0fffh: - ld (de),a - inc de - djnz l0fffh -l1003h: - call sub_1012h - inc hl - jr nz,l1003h - cp '*' - jr z,l1003h - cp '.' - ret z - dec hl - ret - -sub_1012h: - ld a,(hl) - ld c,' ' - and 01fh - ret z - ld a,(hl) - cp ' ' - ret z - call sub_1043h - ret z - cp '/' - ret z - cp '.' - ret z - ld c,'?' - call toupper - cp '*' - ret - -l102bh: - inc hl -sub_102ch: - ld a,(hl) - cp '/' - jr z,l103bh - call sub_1043h - jr z,l102bh -l1036h: - cp ' ' - jr z,l102bh - ret - -l103bh: - ld a,(hl) - cp ' '+1 - jr c,l1036h - inc hl - jr l103bh - -sub_1043h: - cp '=' - ret z - cp '_' - ret z - cp ',' - ret - -;------------------------------------------------------------------------------- - -setup_fcb: - push de - ld hl,12 - add hl,de - xor a - ld b,21 -l1052h: - ld (hl),a - inc hl - djnz l1052h - ld de,DMA_BUF - ld c,BDOS_SETDMA - call ddtz_bdos - pop de +i.gethexbyte: + call sub_16f6h + rlca + rlca + rlca + rlca + ld d,a + call sub_16f6h + add a,d + ld d,a + add a,c + ld c,a + ld a,d ret -;------------------------------------------------------------------------------- - -file_open: - ld (cur_fcb),de - call setup_fcb - ld c,BDOS_OPEN - call ddtz_bdos - inc a - jp z,ERROR - ld a,080h - ld (cmdR_rindex),a - ret +sub_16f6h: + call i.getchar + jr z,error2 + call hex_digit + ret nc +error2: + jp ERROR -read_byte: - ld a,(cmdR_rindex) - cp 080h - jr nz,l1111h - call read_sector - ld a,01ah - ret z - sub a -l1111h: - inc a - ld (cmdR_rindex),a - push hl - add a,07fh - ld l,a - ld h,000h - ld a,(hl) - pop hl +i.getchar: + call incharw cp 01ah ret -read_sector: - push hl - push de - push bc - ld de,(cur_fcb) - ld c,BDOS_READ - call ddtz_bdos - sub a,1 - jr z,l1132h - jr nc,error2 -l1132h: - pop bc - pop de - pop hl - ret - -cmdR_storebyte: +i.storebyte: push af push de - ld de,TPA + ld de,TPA ;lowest allowed load address call cp_hl_de jr c,error2 - ld de,(BDOS+1) + ld de,(BDOS+1) ;highest allowed load address call cp_hl_de jr nc,error2 ld de,(high_load) @@ -2671,125 +2344,7 @@ l1157h: l1163h: pop de pop af - ld (hl),a - ret - -strncmp: - ld a,(de) - cp (hl) - inc de - inc hl - ret nz - djnz strncmp - ret - -str_hex: - db 'HEX' - -read_hexchar: - call read_hexdigit - rlca - rlca - rlca - rlca - ld d,a - call read_hexdigit - add a,d - ld d,a - add a,c - ld c,a - ld a,d - ret - -read_hexdigit: - call read_byte - jr z,error2 -hex_digit_v: - call hex_digit - ret nc -error2: - jp ERROR - -;------------------------------------------------------------------------------- -; > R [displacement] -; Read a binary or hex file [add displacement] - -cmd_R: - ld hl,0 - call get_lastarg_def -read_file: - ld de,dfcb1 - push hl - ld hl,0 - ld (high_load),hl - call file_open - ld hl,dfcb1+9 - ld de,str_hex - ld b,3 - call strncmp - pop hl - jr z,read_hexfile - ld de,TPA - push hl - add hl,de -l108eh: - call read_sector - jr nz,read_file_nxt - pop hl - jp p_max_high - -read_file_nxt: - ld de,DMA_BUF - ld b,080h -l109ah: - ld a,(de) - call cmdR_storebyte - inc de - inc hl - djnz l109ah - jr l108eh - -read_hexfile: - push hl -l10aeh: - call read_byte ; RECORD MARK - jr z,rdhex_done - cp ':' - jr nz,l10aeh - ld c,0 - call read_hexchar ; RECLEN - ld b,a - call read_hexchar ; LOAD ADDR H - ld h,a - call read_hexchar ; LOAD ADDR L - ld l,a - ld a,b - and a - jr z,rdhex_done - call read_hexchar ; RECTYP -l10cch: - call read_hexchar ; DATA - pop de - push de - push hl - add hl,de - call cmdR_storebyte - pop hl - inc hl - djnz l10cch - call read_hexchar ; CHKSUM - ld a,c - and a - jp nz,ERROR - jr l10aeh -rdhex_done: - pop hl - jp p_max_high - -test_whitespace: - cp ' ' - ret z - cp TAB + ld (hl),a ;store byte ret ;------------------------------------------------------------------------------- @@ -2807,7 +2362,7 @@ p_max_high: call out_hl call pstr_inl DC ' Top = ' - ld hl,(BDOS+1) + ld hl,ddtz_base-1 call out_hl jp crlf @@ -2815,66 +2370,7 @@ p_max_high: ; > Wstartaddr endaddr ; Write a file to disk -cmd_W: - call get_arg_range - call assert_eol - push hl - ld a,c - add a,07fh - jr nc,l11adh - inc b -l11adh: - and 080h - ld c,a - push bc - ld a,(dfcb1+1) - cp ' ' - jr z,error4 - ld de,dfcb1 - call setup_fcb - push de - ld c,BDOS_DELETE - call ddtz_bdos - pop de - ld c,BDOS_CREATE - call ddtz_bdos - inc a - jr z,error4 - pop bc - pop hl -l11cch: - ld a,b - or c - jr z,close_file - push bc - ld de,080h ; DMA_BUF - ld b,d - ld c,e - ldir - call write_sector - ex (sp),hl - ld bc,0ff80h - add hl,bc - ex (sp),hl - pop bc - jr l11cch - -write_sector: - push hl - ld de,dfcb1 - ld c,BDOS_WRITE - call ddtz_bdos - pop hl - and a - ret z - call close_file -error4: - jp ERROR - -close_file: - ld de,dfcb1 - ld c,BDOS_CLOSE - jp ddtz_bdos +;cmd_W: ;------------------------------------------------------------------------------- ; > A [startaddr] @@ -2886,19 +2382,6 @@ close_file: CALL_HL: jp (hl) -;------------------------------------------------------------------------------- - - - - -b_176d_start: - DC 'AF,AF''' -l1773h: - DC 'DE,HL' - DC '(SP),HL' - DC '(SP),IX' - DC '(SP),IY' - db 0 ;------------------------------------------------------------------------------- ; >>L [startaddr] [endaddr] @@ -2950,21 +2433,13 @@ cmdl_p_line: ret p_disas_line: - call outbl2 call out_hl - call z,outbl - call outbl + call outbl2 sub a ld (con_col),a push hl pop iy call p_disas_instr - ret z - - ld c,15 - call p_goto_col - ; fall thru -;------------------------------------------------------------------------------- ret ;------------------------------------------------------------------------------- @@ -3159,7 +2634,6 @@ disas_nopfx: ret c ld hl,b_1b9b_start call lookup_opc - ret nc ld b,3 ret @@ -3175,7 +2649,7 @@ sub_1a72h: inc hl jr sub_1a72h l1a7fh: - ld de,l1c97h + ld de,p_arg_none inc hl ld c,(hl) jr get_mnemonic @@ -3209,6 +2683,9 @@ lookup_opc: l1aa8h: inc hl ld c,(hl) + inc c + ret z + dec c inc hl ld e,(hl) inc hl @@ -3224,253 +2701,237 @@ get_mnemonic: ; 1 byte opcodes (no parameters) ; Format: db opcode, t_MNEMONICS-index b_1ab6_start: - db 076h,039h ;halt - db 0d9h,036h ;exx - db 0f3h,02ch ;di - db 0fbh,032h ;ei - db 000h,069h ;nop - db 007h,09eh ;rlca - db 00fh,0adh ;rrca - db 017h,098h ;rla - db 01fh,0a7h ;rra - db 027h,026h ;daa - db 02fh,023h ;cpl - db 037h,0bah ;scf - db 03fh,010h ;ccf + db 076h,o_HALT ;halt + db 0d9h,o_EXX ;exx + db 0f3h,o_DI ;di + db 0fbh,o_EI ;ei + db 000h,o_NOP ;nop + db 007h,o_RLCA ;rlca + db 00fh,o_RRCA ;rrca + db 017h,o_RLA ;rla + db 01fh,o_RRA ;rra + db 027h,o_DAA ;daa + db 02fh,o_CPL ;cpl + db 037h,o_SCF ;scf + db 03fh,o_CCF ;ccf + db 0c9h,o_RET ;ret db 0ffh ; 1 byte opcodes ; Format: db mask, match, t_MNEMONICS-index -; dw argument formating fuction +; dw argument formating function b_1ad1_start: - db 0c0h,040h,056h ;ld r,r + db 0c0h,040h,o_LD ;ld r,r dw p_arg_r_r - db 0f8h,080h,003h ;add a,r + db 0f8h,080h,o_ADD ;add a,r dw p_arg_a_r - db 0f8h,088h,000h ;adc a,r + db 0f8h,088h,o_ADC ;adc a,r dw p_arg_a_r - db 0f8h,090h,0c9h ;sub r + db 0f8h,090h,o_SUB ;sub r dw p_arg_rs - db 0f8h,098h,0b7h ;sbc a,r + db 0f8h,098h,o_SBC ;sbc a,r dw p_arg_a_r - db 0f8h,0a0h,006h ;and r + db 0f8h,0a0h,o_AND ;and r dw p_arg_rs - db 0f8h,0a8h,0cch ;xor r + db 0f8h,0a8h,o_XOR ;xor r dw p_arg_rs - db 0f8h,0b0h,06ch ;or r + db 0f8h,0b0h,o_OR ;or r dw p_arg_rs - db 0f8h,0b8h,013h ;cp r + db 0f8h,0b8h,o_CP ;cp r dw p_arg_rs - db 0c7h,0c0h,08bh ;ret cc + db 0c7h,0c0h,o_RET ;ret cc dw p_arg_cc - db 0c7h,0c7h,0b4h ;rst - dw l1c98h - db 0ffh,0c9h,08bh ;ret - dw l1c97h - db 0cfh,0c1h,081h ;pop rr + db 0c7h,0c7h,o_RST ;rst + dw p_arg_rst + db 0cfh,0c1h,o_POP ;pop rr dw p_arg_zz - db 0cfh,0c5h,084h ;push rr + db 0cfh,0c5h,o_PUSH ;push rr dw p_arg_zz - db 0ffh,0e3h,034h ;ex (sp),hl + db 0ffh,0e3h,o_EX ;ex (sp),hl dw l1ca0h - db 0ffh,0e9h,052h ;jp (hl) + db 0ffh,0e9h,o_JP ;jp (hl) dw l1caeh - db 0ffh,0ebh,034h ;ex de,hl + db 0ffh,0ebh,o_EX ;ex de,hl dw p_arg_ex_dehl - db 0ffh,0f9h,056h ;ld sp,hl + db 0ffh,0f9h,o_LD ;ld sp,hl dw l1cc1h - db 0cfh,003h,041h ;inc rr + db 0cfh,003h,o_INC ;inc rr dw p_arg_ww - db 0cfh,00bh,029h ;dec rr + db 0cfh,00bh,o_DEC ;dec rr dw p_arg_ww - db 0c7h,004h,041h ;inc r + db 0c7h,004h,o_INC ;inc r dw p_arg_r - db 0c7h,005h,029h ;dec r + db 0c7h,005h,o_DEC ;dec r dw p_arg_r - db 0ffh,008h,034h ;ex af,af' + db 0ffh,008h,o_EX ;ex af,af' dw p_arg_ex_afaf - db 0cfh,009h,003h ;add hl,rr + db 0cfh,009h,o_ADD ;add hl,rr dw l1cd3h - db 0efh,002h,056h ;ld (rr),a ;rr=bc,de + db 0efh,002h,o_LD ;ld (rr),a ;rr=bc,de dw l1cdch - db 0efh,00ah,056h ;ld a,(rr) ;rr=bc,de + db 0efh,00ah,o_LD ;ld a,(rr) ;rr=bc,de dw l1ce5h db 0 ; 2 byte opdodes b_1b54_start: - db 0c7h,006h,056h ;ld r,nn + db 0c7h,006h,o_LD ;ld r,nn dw l1cfah - db 0ffh,0c6h,003h ;add a,nn + db 0ffh,0c6h,o_ADD ;add a,nn dw l1cf5h - db 0ffh,0ceh,000h ;adc a,nn + db 0ffh,0ceh,o_ADC ;adc a,nn dw l1cf5h - db 0ffh,0d6h,0c9h ;sub a,nn + db 0ffh,0d6h,o_SUB ;sub nn dw l1d09h - db 0ffh,0deh,0b7h ;sbc a,nn + db 0ffh,0deh,o_SBC ;sbc a,nn dw l1cf5h - db 0ffh,0e6h,006h ;and a,nn + db 0ffh,0e6h,o_AND ;and nn dw l1d09h - db 0ffh,0eeh,0cch ;xor nn + db 0ffh,0eeh,o_XOR ;xor nn dw l1d09h - db 0ffh,0f6h,06ch ;or nn + db 0ffh,0f6h,o_OR ;or nn dw l1d09h - db 0ffh,0feh,013h ;cp a,nn + db 0ffh,0feh,o_CP ;cp nn dw l1d09h - db 0ffh,010h,02eh ;djnz + db 0ffh,010h,o_DJNZ ;djnz dw p_arg_jrel - db 0ffh,018h,054h ;jr + db 0ffh,018h,o_JR ;jr dw p_arg_jrel - db 0e7h,020h,054h ;jr cc, + db 0e7h,020h,o_JR ;jr cc, dw p_arg_cc_jrel - db 0ffh,0d3h,076h ;out (nn),a + db 0ffh,0d3h,o_OUT ;out (nn),a dw l1d37h - db 0ffh,0dbh,03fh ;in a,(nn) + db 0ffh,0dbh,o_IN ;in a,(nn) dw l1d29h db 0 ; 3 byte opcodes b_1b9b_start: - db 0c7h,0c2h,052h ;jp cc,mn + db 0c7h,0c2h,o_JP ;jp cc,mn dw p_arg_cc_mn - db 0c7h,0c4h,00ch ;call cc,mn + db 0c7h,0c4h,o_CALL ;call cc,mn dw p_arg_cc_mn - db 0cfh,001h,056h ;ld ww,mn + db 0cfh,001h,o_LD ;ld ww,mn dw p_arg_ww_mn - db 0ffh,0c3h,052h ;jp mn + db 0ffh,0c3h,o_JP ;jp mn dw p_arg_mn - db 0ffh,0cdh,00ch ;call mn + db 0ffh,0cdh,o_CALL ;call mn dw p_arg_mn - db 0ffh,022h,056h ;ld (mn),hl + db 0ffh,022h,o_LD ;ld (mn),hl dw p_arg_addr_hl - db 0ffh,02ah,056h ;ld hl,(mn) + db 0ffh,02ah,o_LD ;ld hl,(mn) dw p_arg_hl_addr - db 0ffh,032h,056h ;ld (mn),a + db 0ffh,032h,o_LD ;ld (mn),a dw p_arg_addr_a - db 0ffh,03ah,056h ;ld a,(mn) + db 0ffh,03ah,o_LD ;ld a,(mn) dw p_arg_a_addr db 0 ; Prefix ED + 1 byte opcode, no arguments ; Format: opcode, t_MNEMONICS index b_1bc9_start: - db 044h,066h ;neg - db 045h,092h ;retn - db 04dh,08eh ;reti - db 067h,0b1h ;rrd - db 06fh,0a2h ;rld - db 0a0h,05fh ;ldi - db 0a1h,01ch ;cpi - db 0a2h,04bh ;ini - db 0a3h,07dh ;outi - db 0a8h,058h ;ldd - db 0a9h,015h ;cpd - db 0aah,044h ;ind - db 0abh,079h ;outd - db 0b0h,062h ;ldir - db 0b1h,01fh ;cpir - db 0b2h,04eh ;inir - db 0b3h,072h ;otir - db 0b8h,05bh ;lddr - db 0b9h,018h ;cpdr - db 0bah,047h ;indr - db 0bbh,06eh ;otdr - db 08bh,0d5h ;otdm - db 09bh,0d9h ;otdmr - db 083h,0deh ;otim - db 093h,0e2h ;otimr - db 076h,0ebh ;slp + db 044h,o_NEG ;neg + db 045h,o_RETN ;retn + db 04dh,o_RETI ;reti + db 067h,o_RRD ;rrd + db 06fh,o_RLD ;rld + db 0a0h,o_LDI ;ldi + db 0a1h,o_CPI ;cpi + db 0a2h,o_INI ;ini + db 0a3h,o_OUTI ;outi + db 0a8h,o_LDD ;ldd + db 0a9h,o_CPD ;cpd + db 0aah,o_IND ;ind + db 0abh,o_OUTD ;outd + db 0b0h,o_LDIR ;ldir + db 0b1h,o_CPIR ;cpir + db 0b2h,o_INIR ;inir + db 0b3h,o_OTIR ;otir + db 0b8h,o_LDDR ;lddr + db 0b9h,o_CPDR ;cpdr + db 0bah,o_INDR ;indr + db 0bbh,o_OTDR ;otdr + db 08bh,o_OTDM ;otdm + db 09bh,o_OTDMR ;otdmr + db 083h,o_OTDM ;otim + db 093h,o_OTDMR ;otimr + db 076h,o_SLP ;slp db 0ffh ; b_1bf4_start: - db 0e7h,040h,03fh ;in r,(c) ;r=b,c,d,e + db 0ffh,070h,0ffh ;in (c) ; dw p_arg_in_c ; - db 0f7h,060h,03fh ;in r,(c) ;r=h,l + db 0c7h,040h,o_IN ;in r,(c) ;r=b,c,d,e,h,l,a dw p_arg_in_c ; - db 0ffh,078h,03fh ;in r,(c) ;r=a - dw p_arg_in_c ; - db 0e7h,041h,076h ;out (c),r ;r=b,c,d,e - dw p_arg_out_c ; - db 0f7h,061h,076h ;out (c),r ;r=h,l + db 0ffh,071h,0ffh ;out (c),0 ; dw p_arg_out_c ; - db 0ffh,079h,076h ;out (c),r ;r=a + db 0c7h,041h,o_OUT ;out (c),r ;r=b,c,d,e,h,l,a dw p_arg_out_c ; - db 0cfh,042h,0b7h ;sbc hl,rr + db 0cfh,042h,o_SBC ;sbc hl,rr dw l1dcah ; - db 0cfh,04ah,000h ;adc hl,rr + db 0cfh,04ah,o_ADC ;adc hl,rr dw l1dcah ; - db 0ffh,046h,03dh ;im 0 + db 0ffh,046h,o_IM ;im 0 dw l1d85h ; - db 0ffh,056h,03dh ;im 1 + db 0ffh,056h,o_IM ;im 1 dw l1d89h ; - db 0ffh,05eh,03dh ;im 2 + db 0ffh,05eh,o_IM ;im 2 dw l1d8dh ; - db 0ffh,047h,056h ;ld i,a - dw l1d92h ; - db 0ffh,057h,056h ;ld a,i - dw l1d97h ; - db 0ffh,04fh,056h ;ld r,a - dw l1d9ch ; - db 0ffh,05fh,056h ;ld a,r - dw l1da1h - db 0cfh,04ch,0d2h ;mlt rr + db 0e7h,047h,o_LD ;ld i,a ... ld a,r + dw p_arg_IR ; + db 0cfh,04ch,o_MLT ;mlt rr dw p_arg_ww - db 0c7h,004h,0eeh ;tst r + db 0c7h,004h,o_TST ;tst r dw p_arg_r db 0 l228bh: - db 0e7h,000h,0cfh ;in0 r,(m) ;r=b,c,d,e + db 0ffh,030h,0ffh ;in0 (m) dw p_arg_r_m - db 0f7h,020h,0cfh ;in0 r,(m) ;r=h,l + db 0c7h,000h,o_IN ;in0 r,(m) ;r=b,c,d,e,h,l,a dw p_arg_r_m - db 0ffh,038h,0cfh ;in0 a,(m) - dw p_arg_r_m - db 0e7h,001h,0e7h ;out0 (m),r ;r=b,c,d,e - dw p_arg_m_r - db 0f7h,021h,0e7h ;out0 (m),r ;r=h,l + db 0ffh,031h,0ffh ;out0 (m),0 dw p_arg_m_r - db 0ffh,039h,0e7h ;out0 (m),a + db 0ech,001h,o_OUT0 ;out0 (m),r ;r=b,c,d,e dw p_arg_m_r - db 0ffh,064h,0eeh ;tst m + db 0ffh,064h,o_TST ;tst m dw l1d09h - db 0ffh,074h,0f1h ;tstio m + db 0ffh,074h,o_TSTIO ;tstio m dw l1d09h db 0 +; Prefix ED + 1 byte opcode + 2 byte address +; Format: db mask, match, t_MNEMONICS-index +; dw argument formating function b_1c40_start: - db 0efh,043h,056h ;ld (mn),ww ;ww=bc,de - dw p_arg_addr_ww - db 0ffh,073h,056h ;ld (mn),sp + db 0cfh,043h,o_LD ;ld (mn),ww ;ww=bc,de,hl,sp dw p_arg_addr_ww - db 0efh,04bh,056h ;ld ww,(mn) ;ww=bc,de - dw p_arg_ww_addr - db 0ffh,07bh,056h ;ld sp,(mn) + db 0cfh,04bh,o_LD ;ld ww,(mn) ;ww=bc,de,hl,sp dw p_arg_ww_addr db 0 ; CB b_1c55_start: - db 0f8h,000h,09bh ;rlc g + db 0f8h,000h,o_RLC ;rlc g dw l1e03h - db 0f8h,008h,0aah ;rrc g + db 0f8h,008h,o_RRC ;rrc g dw l1e03h - db 0f8h,010h,096h ;rl g + db 0f8h,010h,o_RL ;rl g dw l1e03h - db 0f8h,018h,0a5h ;rr g + db 0f8h,018h,o_RR ;rr g dw l1e03h - db 0f8h,020h,0c0h ;sla g + db 0f8h,020h,o_SLA ;sla g dw l1e03h - db 0f8h,028h,0c3h ;sra g + db 0f8h,028h,o_SRA ;sra g dw l1e03h - db 0f8h,038h,0c6h ;srl g + db 0f8h,038h,o_SRL ;srl g dw l1e03h - db 0c0h,040h,009h ;bit b,g + db 0c0h,040h,o_BIT ;bit b,g dw p_arg_bitop - db 0c0h,080h,088h ;res b,g + db 0c0h,080h,o_RES ;res b,g dw p_arg_bitop - db 0c0h,0c0h,0bdh ;set b,g + db 0c0h,0c0h,o_SET ;set b,g dw p_arg_bitop db 0 @@ -3483,8 +2944,6 @@ p_arg_r_r: p_arg_a_r: call p_A_comma jp p_arg_rs -l1c97h: - ret p_arg_r_m: call p_arg_r @@ -3496,7 +2955,7 @@ p_arg_m_r: call p_char_comma jp p_arg_r -l1c98h: +p_arg_rst: ld a,(iy+000h) and 038h jp out_hex @@ -3512,8 +2971,10 @@ l1caeh: jr out_rparen p_arg_ex_dehl: - ld hl,l1773h - jp pstr + call pstr_inl + DC 'DE,HL' +p_arg_none: + ret l1cc1h: call pstr_inl @@ -3521,8 +2982,9 @@ l1cc1h: jp p_arg_hlixiy p_arg_ex_afaf: - ld hl,b_176d_start - jp pstr + call pstr_inl + DC 'AF,AF''' + ret l1cd3h: call p_arg_hlixiy @@ -3645,28 +3107,21 @@ p_char_lparen: ld a,'(' jp outchar -l1d92h: - ld hl,b_1da7_start - jr l1da4h -l1d97h: - ld hl,l1daah - jr l1da4h -l1d9ch: - ld hl,l1dadh - jr l1da4h -l1da1h: - ld hl,l1db0h -l1da4h: - jp pstr +p_arg_IR: + ld a,(iy+000h) + rra + rra + rra + and 03 + ld hl,t_arg_IR + jp p_arg -b_1da7_start: +t_arg_IR: DC 'I,A' -l1daah: - DC 'A,I' -l1dadh: DC 'R,A' -l1db0h: + DC 'A,I' DC 'A,R' + db 0 p_arg_in_c: call p_arg_r @@ -3747,18 +3202,15 @@ p_arg_rs: p_arg_r0: and 007h cp 006h - jr nz,p_arg_r1 + ld b,a + ld hl,t_BCDEHL_HL_A + jr nz,p_arg0 ld a,(isprefix_ixiy) and a - ld a,006h - jr z,p_arg_r1 - ld hl,b_1e78_start - ld a,(isprefix_ixiy) + jr z,p_arg0 + ld hl,t_lp_IXIY dec a - jr z,l1e4dh - ld hl,l1e7bh -l1e4dh: - call pstr + call p_arg ld a,(iy+001h) push af rlca @@ -3773,19 +3225,15 @@ l1e61h: pop af jp p_arg_nn_rp -p_arg_r1: - ld hl,t_BCDEHL_HL_A - jr p_arg - -b_1e78_start: +t_lp_IXIY: DC '(IX' -l1e7bh: DC '(IY' p_arg_hlixiy: ld a,(isprefix_ixiy) ld hl,t_HL.IX.IY jr p_arg + p_arg_zz: ld hl,t_BC.DE.HL.AF jr l1e8eh @@ -3812,89 +3260,131 @@ p_arg_cc0: ld hl,t_tstfl_ZCPS p_arg: ld b,a - call sel_dc_string - jp pstr +p_arg0: + jp pstr_sel + +if 0 +p_bli: + ld a,(iy+000h) + rra + and 00ch + ld b,a + ld a,(iy+000h) + and 003h + or b + ld hl,t_mn_bli + jr p_arg +endif ;------------------------------------------------------------------------------- +opc_index defl 0 +opc_offset defl 0 + +opc macro x + local pos +pos defl $ +i_&x equ opc_index +o_&x equ opc_offset + dc '&x' +opc_index defl opc_index+1 +opc_offset defl opc_offset+$-pos + endm + + t_MNEMONICS: - DC 'ADC' - DC 'ADD' - DC 'AND' - DC 'BIT' - DC 'CALL' - DC 'CCF' - DC 'CP' - DC 'CPD' - DC 'CPDR' - DC 'CPI' - DC 'CPIR' - DC 'CPL' - DC 'DAA' - DC 'DEC' - DC 'DI' - DC 'DJNZ' - DC 'EI' - DC 'EX' - DC 'EXX' - DC 'HALT' - DC 'IM' - DC 'IN' - DC 'INC' - DC 'IND' - DC 'INDR' - DC 'INI' - DC 'INIR' - DC 'JP' - DC 'JR' - DC 'LD' - DC 'LDD' - DC 'LDDR' - DC 'LDI' - DC 'LDIR' - DC 'NEG' - DC 'NOP' - DC 'OR' - DC 'OTDR' - DC 'OTIR' - DC 'OUT' - DC 'OUTD' - DC 'OUTI' - DC 'POP' - DC 'PUSH' - DC 'RES' - DC 'RET' - DC 'RETI' - DC 'RETN' - DC 'RL' - DC 'RLA' - DC 'RLC' - DC 'RLCA' - DC 'RLD' - DC 'RR' - DC 'RRA' - DC 'RRC' - DC 'RRCA' - DC 'RRD' - DC 'RST' - DC 'SBC' - DC 'SCF' - DC 'SET' - DC 'SLA' - DC 'SRA' - DC 'SRL' - DC 'SUB' - DC 'XOR' - DC 'IN0' - DC 'MLT' - DC 'OTDM' - DC 'OTDMR' - DC 'OTIM' - DC 'OTIMR' - DC 'OUT0' - DC 'SLP' - DC 'TST' - DC 'TSTIO' +; 1-byte other + opc NOP + opc LD + opc INC + opc DEC + opc DJNZ + opc JR + opc HALT + + opc RLCA + opc RRCA + opc RLA + opc RRA + opc DAA + opc CPL + opc SCF + opc CCF + +; 1-byte "alu" + opc ADD + opc ADC + opc SUB + opc SBC + opc AND + opc XOR + opc OR + opc CP + + opc RET + opc POP + opc JP + opc CALL + opc PUSH + opc RST + opc OUT + opc EXX + opc IN + opc EX + opc DI + opc EI +; CB + opc RLC + opc RRC + opc RL + opc RR + opc SLA + opc SRA +; SLL + opc SRL + opc BIT + opc RES + opc SET + +; ED + opc NEG + opc RETN + opc RETI + opc IM + opc RRD + opc RLD + +;Block instructions +t_mn_bli: + opc LDI + opc CPI + opc INI + opc OUTI + opc LDD + opc CPD + opc IND + opc OUTD + opc LDIR + opc CPIR + opc INIR + opc OTIR + opc LDDR + opc CPDR + opc INDR + opc OTDR + +;Z180 + opc IN0 + opc OUT0 + opc TST + opc MLT + opc TSTIO + opc SLP + opc OTIM + opc OTDM + opc OTIMR + opc OTDMR + DB 0 t_BCDEHL_HL_A: @@ -3916,13 +3406,11 @@ t_BC.DE.HL.SP: t_BC.DE.HL.AF: DC 'BC' DC 'DE' - DC 'HL' DC 'AF' DB 0 t_HL.IX.IY: DC 'HL' - DC 'IX' DC 'IY' DB 0 @@ -3935,12 +3423,6 @@ t_tstfl_ZCPS: DC 'PE' DC 'P' DC 'M' - DC 'NE' - DC 'EQ' - DC 'GE' - DC 'LT' - DC 'NV' - DC 'V' DB 0 t__C_: DC '(C)' @@ -3956,7 +3438,7 @@ tc_set_bp: ld de,BDOS and a sbc hl,de - ld hl,l20edh + ld hl,l20edh ;set break after BDOS call jr z,l2031h ld iy,(reg.pc) call disas_get_instrlen @@ -3967,7 +3449,7 @@ tc_set_bp: add hl,bc call bp_trace_enter ld iy,(reg.pc) - ld hl,b_2039_start + ld hl,t_op_branch call lookup_opc ccf ret c @@ -3981,36 +3463,35 @@ l2037h: ;------------------------------------------------------------------------------- -b_2039_start: - db 0ffh,0ddh,000h ;Prefix DD +t_op_branch: + db 0ffh,0ddh,0 ;Prefix DD dw l20a7h - db 0ffh,0fdh,000h ;Prefix FD + db 0ffh,0fdh,0 ;Prefix FD dw l20ach - db 0ffh,0edh,000h ;Prefix ED + db 0ffh,0edh,0 ;Prefix ED dw l20b8h - -b_2048_start: - db 0ffh,0cdh,000h ;call mn +t_op_branch0: + db 0ffh,0cdh,0 ;call mn dw l2080h - db 0ffh,0c3h,000h ;jp mn + db 0ffh,0c3h,0 ;jp mn dw l208bh - db 0ffh,0e9h,000h ;jp () + db 0ffh,0e9h,0 ;jp () dw l20a2h - db 0ffh,0c9h,000h ;ret + db 0ffh,0c9h,0 ;ret dw l20dch - db 0ffh,0cfh,000h ;rst 8 + db 0ffh,0cfh,0 ;rst 8 dw l2115h - db 0c7h,0c7h,000h ;rst n + db 0c7h,0c7h,0 ;rst n dw l20f9h - db 0c7h,0c4h,000h ;call cc,mn + db 0c7h,0c4h,0 ;call cc,mn dw l2080h - db 0f7h,010h,000h ;djnz d; jr d + db 0f7h,010h,0 ;djnz d; jr d dw l2093h - db 0e7h,020h,000h ;jr cc,d + db 0e7h,020h,0 ;jr cc,d dw l2093h - db 0c7h,0c2h,000h ;jp cc,mn + db 0c7h,0c2h,0 ;jp cc,mn dw l208bh - db 0c7h,0c0h,000h ;ret cc + db 0c7h,0c0h,0 ;ret cc dw l20c5h db 0 @@ -4087,7 +3568,7 @@ l20d7h: l20dch: l20edh: - ld hl,(reg_sp) + ld hl,(reg_sp) ;break on return address ld e,(hl) inc hl ld d,(hl) @@ -4108,7 +3589,6 @@ l20f9h: ld a,(b_21e2_start) and a ret z - scf ret @@ -4271,15 +3751,9 @@ last_O_addr: last_O_val: db 0 -cmd_Q_jopt: - db -1 - last_D: dw TPA -cmdR_rindex: - db 0 - high_load: dw TPA max_load: @@ -4297,9 +3771,6 @@ disas_argtype: pbl_loop_adr: dw 0 -cur_fcb: - dw 0 - ddtz_size equ $-ddtz_base ddtz_end: