crlf:\r
call pstr_inl\r
dc CR,LF\r
- xor a\r
- ld (con_col),a\r
call inchar\r
jr c,mainloop\r
ret\r
ld a,'.'\r
jr outchar\r
\r
+out_hl_bl2:\r
+ call out_hl\r
+ jr outbl2\r
+\r
+out_hex_bl:\r
+ call out_hex\r
+ jr outbl\r
+\r
outbl6:\r
call outbl2\r
outbl4:\r
and 07fh\r
ld c,a\r
call conout\r
- ld hl,con_col\r
- inc (hl)\r
pop af\r
pop bc\r
pop de\r
pop ix\r
ret\r
\r
-p_goto_col:\r
- ld a,(con_col)\r
- cp c\r
- ret nc\r
- ret z\r
- call outbl\r
- jr p_goto_col\r
-\r
;-------------------------------------------------------------------------------\r
\r
incharw:\r
push hl\r
push de\r
ld de,(reg.pc)\r
+ or a\r
call p_disas_instr\r
pop de\r
pop hl\r
- call crlf\r
call p_f2\r
call outbl2\r
ld b,7\r
jr z,bp_pr_cont\r
ld l,(ix+002h)\r
ld h,(ix+003h)\r
- call out_hl\r
- call outbl2\r
+ call out_hl_bl2\r
inc c\r
bp_pr_cont:\r
call bpl_next\r
call out_hex\r
call outbl2\r
ld a,c\r
- call out_hex\r
- call outbl\r
+ call out_hex_bl\r
ex de,hl\r
call out_hl\r
ex de,hl\r
call expr\r
jp c,p_max_high0\r
call assert_eol\r
- call out_hl\r
- call outbl2\r
+ call out_hl_bl2\r
call out_hl_neg\r
call outbl4\r
call out.hl.dec\r
push hl\r
push af\r
l0f5ch:\r
- call out_hl\r
- call outbl2\r
+ call out_hl_bl2\r
ld de,0\r
l0f68h:\r
ld a,(hl)\r
inc hl\r
- call out_hex\r
- call outbl\r
+ call out_hex_bl\r
dec bc\r
inc e\r
ld a,e\r
call pstr_inl\r
DC 'High = '\r
ld hl,(high_load)\r
- call out_hl\r
+ call out_hl_bl2\r
call pstr_inl\r
- DC ' Max = '\r
+ DC 'Max = '\r
ld hl,(max_load)\r
- call out_hl\r
+ call out_hl_bl2\r
call pstr_inl\r
- DC ' Top = '\r
+ DC 'Top = '\r
ld hl,ddtz_base-1\r
call out_hl\r
jp crlf\r
\r
cmdl_p_line:\r
; push hl\r
- call out_hl\r
- call outbl2\r
- sub a\r
- ld (con_col),a\r
+ call out_hl_bl2\r
ex de,hl\r
- call p_disas_instr\r
- call crlf\r
+ scf\r
+ call p_disas_instr\r
ex de,hl\r
ld (last_L),hl\r
ret\r
\r
p_disas_instr:\r
+ push af\r
call dis_decode\r
- jp pstr ;print instruction text\r
+ pop af\r
+ jr nc,pdinstr_1\r
+ ld a,3\r
+ sub b\r
+ jr c,pdinstr_1\r
+ inc a\r
+ ld b,a\r
+ add a,b\r
+ add a,b\r
+ ld b,a\r
+pdinstr_0:\r
+ call outbl\r
+ djnz pdinstr_0\r
+pdinstr_1:\r
+ call pstr ;print instruction text\r
+ jp crlf\r
\r
;-------------------------------------------------------------------------------\r
\r
PUSH BC\r
pop iy\r
PUSH BC ;workspace (4 bytes)\r
+ rl c ;carry to c.0\r
PUSH BC\r
+ ld c,b\r
ADD iy,SP ;workspace pointer to iy\r
\r
LD HL,GROUP3\r
; B: operand index\r
; DE: Address of next instruction byte\r
; HL: Address of next free byte in output buffer\r
+; (iy+0): Bit = 1: Print opcodes\r
; (iy+1): index register flag (1=IX, 2=IY, else 0)\r
; (iy+2): displacement for any indexed instruction\r
; (iy+3): no. of instraction bytes fetched\r
;-------------------------------------------------------------------------------\r
\r
FETCH:\r
+ LD A,(DE)\r
+ bit 0,(iy+0)\r
+ call nz,out_hex_bl\r
INC (iy+3)\r
LD A,(DE)\r
INC DE\r
\r
;-------------------------------------------------------------------------------\r
\r
-con_col:\r
- db 0\r
-\r
-;-------------------------------------------------------------------------------\r
-\r
b_21e2_start:\r
db 0\r
trace_cnt_or_ptr:\r