1 ; Disassembled ddtz.com, version "DDT/Z [8101]"
2 ; with modified relocater.
5 ; - Assemble to a .REL file with M80 or a compatible assembler.
6 ; - Use Digital Research Link-80 to generate a .PRL file (op switch).
7 ; - Cut the .PRL header (first 256 byte) end rename the result to DDTZ.COM.
12 ; Some greneral definitions
26 ; ddtz specific definitions
28 STACK_SIZE equ 80 ;ddtz internal stack
29 CONBUF_SIZE equ 80 ;Size of console input buffer
30 BP_CNT equ 12 ;Number of breakpoints
31 BP_SIZE equ 4 ;Size of a breakpoint record
33 bitmap_size equ (prog_size+7)/8
35 ;-------------------------------------------------------------------------------
43 rst 30h ;rst used by ddtz
44 di_or_ei: ;ints enabled/disabled while ddtz is running
48 ;-------------------------------------------------------------------------------
57 ;-------------------------------------------------------------------------------
68 ; Determine current position
76 ld sp,028h ;rst instr needs a minimal stack
77 ld hl,0e9e1h ;opcpdes pop hl/jp (hl)
83 ld de,-(wearehere-ddtz_base)
89 ex de,hl ; de: reloc offset
99 ld hl,ddtz_end ;start of reloc bitmap
105 ld bc,0108h ;init bit counter b (c==reload val)
109 add hl,de ;--> ddtz_base
114 ld b,c ;reload bit counter
115 LD e,(HL) ;get next 8 relocation bits
136 ;-------------------------------------------------------------------------------
144 ld hl,(1) ;wboot addr
161 daa ; Z80: 099H, x180+: 0F9H
162 cp 99h ; Result on 180 type cpus is F9 here. Thanks Hitachi
172 ; .printx Error: Not yet implemented!
184 ld de,prog_size+bitmap_size-1
204 ;-------------------------------------------------------------------------------
209 const: jp 0 ; return console input status
210 conin: jp 0 ; return console input character
211 conout: jp 0 ; send console output character
221 ;-------------------------------------------------------------------------------
231 ; character input status
232 const: ; return a != 0 if character waiting
240 conin: ; return a = input char
248 conout: ; c = output char
255 ;-------------------------------------------------------------------------------
263 ld a,max_device ; use null device if a >= max$device
272 ;-------------------------------------------------------------------------------
286 ;-------------------------------------------------------------------------------
288 ; TC = (f PHI /(2*baudrate*Clock_mode)) - 2
290 ; TC = (f PHI / (32 * baudrate)) - 2
292 ; Init Serial I/O for console input and output (ASCI1)
308 ld a,M_RE + M_TE + M_MOD2 ;Rx/Tx enable
311 out0 (stat1),a ;Enable rx interrupts
317 db 1,stat0,0 ;Disable rx/tx interrupts
318 ;Enable baud rate generator
319 db 1,asext0,M_BRGMOD+M_DCD0DIS+M_CTS0DIS
320 db 2,astc0l,low 28, high 28
321 db 1,cntlb0,M_MPBT ;No MP Mode, X16
322 db 1,cntla0,M_RE+M_TE+M_MOD2 ;Rx/Tx enable, 8N1
326 db 1,stat1,0 ;Disable rx/tx ints, disable CTS1
327 db 1,asext1,M_BRGMOD ;Enable baud rate generator
328 db 2,astc1l,low 3, high 3
329 db 1,cntlb1,M_MPBT ;No MP Mode, X16
330 db 1,cntla1,M_RE+M_TE+M_MOD2 ;Rx/Tx enable, 8N1
333 ;-------------------------------------------------------------------------------
352 ;-------------------------------------------------------------------------------
396 ;-------------------------------------------------------------------------------
425 ;-------------------------------------------------------------------------------
428 ; dw ERROR ;cmd_@ ;examine/substitute the displacement register @
429 ; dw ERROR ;cmd_A ;Assemble
430 dw cmd_B ;Breakpoints display/set/clear
431 dw ERROR ;cmd_C ;trace over Calls
432 dw cmd_D ;Display memory in hex and ascii
433 dw cmd_E ;rElocate debugger
434 dw ERROR ;cmd_F ;specify Filename and command line
436 dw cmd_H ;compute Hex and other expressions
437 dw cmd_I ;Input a byte from port
440 dw cmd_L ;List disassembled code
441 dw cmd_M ;Move memory [and verify]
443 dw cmd_O ;Output a byte to port
445 dw cmd_Q ;Qery memory for byte string
446 dw cmd_R ;Read binary or hex file
447 dw cmd_S ;Substitute memory
450 dw cmd_V ;Verify (compare) two memory areas
451 dw ERROR ;cmd_W ;Write a file to disk
452 dw cmd_X ;eXamine [and substitute] registers
453 dw ERROR ;cmd_Y ;examine [and substitute] Y variables
454 dw cmd_Z ;Zap (fill) memory with a byte string
463 call bp_clr_temporary
493 ;-------------------------------------------------------------------------------
512 defb 03eh ;ld a,.. swallow push hl
645 ;-------------------------------------------------------------------------------
652 ;-------------------------------------------------------------------------------
671 ;-------------------------------------------------------------------------------
695 ;-------------------------------------------------------------------------------
707 jr z,inl_e ;Accept line
709 jr z,inl_e ;Accept line
716 call DELC ;Delete Char
721 call DELL ;Delete Line
731 ld a,'^' ;Controll characters
748 ;-------------------------------------------------------------------------------
761 ;-------------------------------------------------------------------------------
772 ;-------------------------------------------------------------------------------
788 ;-------------------------------------------------------------------------------
795 ld de,stack-(STACK_SIZE-28)
802 ;-------------------------------------------------------------------------------
819 ;-------------------------------------------------------------------------------
899 get_arg_range_target:
938 defb 0e6h ;and a,.. clear carry
950 defb 03eh ;ld a,.. swallow pop af
992 jr z,error0 ;'S', but no expression following
996 ;-------------------------------------------------------------------------------
1079 ; de: x (x shifted out, q shifted in)
1081 ; hl: r (initially 0)
1155 ;-------------------------------------------------------------------------------
1195 jr z,fact_factstring
1200 ;-------------------------------------------------------------------------------
1287 ;-------------------------------------------------------------------------------
1395 ;-------------------------------------------------------------------------------
1439 ld hl,t_flag_names+7
1534 ;-------------------------------------------------------------------------------
1536 ; relocate debugger to addr
1538 ; relocate just below addr
1540 ; Move debugger to given address and restart.
1541 ; New location must not overlap with current location.
1552 ld bc,prog_size+bitmap_size
1557 ld ix,cmde_clr-ddtz_base
1560 ld hl,ddtz_base ;hl = src
1565 call c,neg.hl ;abs(distance)
1577 ;-------------------------------------------------------------------------------
1578 ; > G [startaddr] [;breakp..]
1579 ; Go [to start] [with temporary breakpoints]
1583 ld (bp_p_cpu_flag),a
1598 ;-------------------------------------------------------------------------------
1604 ld (pbl_loop_adr),hl
1617 ld hl,(pbl_loop_adr)
1631 ;-------------------------------------------------------------------------------
1633 ; display all breakpoints
1634 ; > B breakp [breakp..]
1637 ; clear all breakpoints
1638 ; > BX breakp [breakp..]
1641 ; breakp can be any valid expression
1701 ;-------------------------------------------------------------------------------
1702 ; Add break points to list
1703 ; A = 1 Permanent (B command)
1704 ; A = 2 Temporary (G command)
1721 call bp_get_freeslot
1743 ;-------------------------------------------------------------------------------
1744 ; Breakpoint handling routine.
1778 call inchar ;Keyboard hit?
1786 call bp_clr_temporary
1799 ld (bp_p_cpu_flag),a
1856 call bp_get_freeslot
1895 ;-------------------------------------------------------------------------------
1900 ld a,(bp_p_cpu_flag)
1930 ;-------------------------------------------------------------------------------
1932 ; examine all Y variables
1934 ; examine (and substitute) an Y variable
1937 ;-------------------------------------------------------------------------------
1939 ; eXamine (display) all cpu registers and
1940 ; the instruction at the current program counter
1942 ; eXamine (and substitute) a register
2151 ;-------------------------------------------------------------------------------
2157 call get_lastarg_def
2191 ;-------------------------------------------------------------------------------
2193 ; examine (substitute) displacement register @
2197 ;-------------------------------------------------------------------------------
2199 ; Input a byte from port
2204 call get_lastarg_def
2216 ;-------------------------------------------------------------------------------
2218 ; Output a byte to a port
2229 call get_lastarg_def
2237 ;-------------------------------------------------------------------------------
2238 ; > V startaddr endaddr targetaddr
2239 ; Verify (compare) two memory areas
2242 call get_arg_range_target
2269 ;-------------------------------------------------------------------------------
2270 ; > M startaddr endaddr destaddr
2274 call get_arg_range_target
2289 ;-------------------------------------------------------------------------------
2291 ; display Highest load address of last filed loaded, Maximum "High"
2292 ; off all loaded files, and Top address of available memory
2294 ; evaluate expression and display result in hex, decimal and other formats
2314 ;-------------------------------------------------------------------------------
2315 ; > Q[J] startaddr endaddr bytes
2316 ; Query memory for a byte string [Justified]
2356 ;-------------------------------------------------------------------------------
2357 ; > Z startaddr endaddr bytes
2358 ; Zap (fill) memory with a byte string
2392 sub_0ef7h: ;from cmd_Q, cmd_Z
2393 db 0e6h ;and 037h (clear carry)
2394 sub_0ef8h: ;from cmd_S
2442 ;-------------------------------------------------------------------------------
2443 ; >>D [startaddr] [endaddr]
2444 ; Display memory in hex and ASCII
2512 ;-------------------------------------------------------------------------------
2514 ; specifiy filenames and command line
2518 ;-------------------------------------------------------------------------------
2519 ; > R [displacement]
2520 ; Read Intel Hex File from console [add displacement]
2524 call get_lastarg_def ;get offset from command line
2533 ld c,0 ;init checksum
2534 call i.gethexbyte ;record len
2536 call i.gethexbyte ;address high
2538 call i.gethexbyte ;address low
2540 call i.gethexbyte ;record type (ignored)
2542 and a ;record len == 0?
2553 djnz l16c6h ;repeat for record len
2554 call i.gethexbyte ;checksum
2557 jr nz,error2 ;exit if checksum error
2558 jr w_recstart ;next record
2596 ld de,TPA ;lowest allowed load address
2599 ld de,(BDOS+1) ;highest allowed load address
2614 ld (hl),a ;store byte
2617 ;-------------------------------------------------------------------------------
2636 ;-------------------------------------------------------------------------------
2637 ; > Wstartaddr endaddr
2638 ; Write a file to disk
2642 ;-------------------------------------------------------------------------------
2644 ; Assemble Zilog Z180 mnemonics
2648 ;-------------------------------------------------------------------------------
2649 ; >>L [startaddr] [endaddr]
2650 ; List disassembled code
2684 ;-------------------------------------------------------------------------------
2703 ;-------------------------------------------------------------------------------
2706 call disas_get_instrlen
2712 call pstr ;print mnemonic
2714 call pr_instr_args ;print arguments
2728 ld (isprefix_ixiy),a
2747 ld (isprefix_ixiy),a
2758 ;-------------------------------------------------------------------------------
2761 ld hl,b_1b54_start ;2 byte opcodes
2765 ld hl,b_1ab6_start ;1 byte opcodes (no parameters)
2769 ld hl,b_1ad1_start ;1 byte opcodes
2773 ld hl,b_1b9b_start ;3 byte opcodes
2778 ;-------------------------------------------------------------------------------
2791 ld hl,b_1bc9_start ;1 byte opcode, no arguments
2817 ;-------------------------------------------------------------------------------
2822 ld a,(isprefix_ixiy)
2833 ;-------------------------------------------------------------------------------
2861 ;-------------------------------------------------------------------------------
2862 ; DD/FD 3 byte (ix+d)/(iy+d)
2909 ;-------------------------------------------------------------------------------
2936 call lookup_branch_op
2962 lookup_branch_op ;TODO
2982 ;-------------------------------------------------------------------------------
2983 ; 1 byte opcodes (no parameters)
2984 ; Format: db opcode, t_MNEMONICS-index
2986 db 076h,i_HALT ;halt
2991 ; db 007h,i_RLCA ;rlca
2992 ; db 00fh,i_RRCA ;rrca
2993 ; db 017h,i_RLA ;rla
2994 ; db 01fh,i_RRA ;rra
2995 ; db 027h,i_DAA ;daa
2996 ; db 02fh,i_CPL ;cpl
2997 ; db 037h,i_SCF ;scf
2998 ; db 03fh,i_CCF ;ccf
3004 ; Format: db mask, match, t_MNEMONICS-index
3005 ; dw argument formating function
3007 db 0c0h,040h,i_LD ;ld r[y],r[z]
3010 db 0c0h,080h,i_ADD+080h ;add a,r[z]
3013 ; db 0f8h,080h,i_ADD ;add a,r[z]
3015 ; db 0f8h,088h,i_ADC ;adc a,r[z]
3017 ; db 0f8h,090h,i_SUB ;sub r[z]
3019 ; db 0f8h,098h,i_SBC ;sbc a,r[z]
3021 ; db 0f8h,0a0h,i_AND ;and r[z]
3023 ; db 0f8h,0a8h,i_XOR ;xor r[z]
3025 ; db 0f8h,0b0h,i_OR ;or r[z]
3027 ; db 0f8h,0b8h,i_CP ;cp r[z]
3030 db 0c7h,0c0h,i_RET ;ret cc
3032 db 0c7h,0c7h,i_RST ;rst
3034 db 0cfh,0c1h,i_POP ;pop rp2
3036 db 0cfh,0c5h,i_PUSH ;push rp2
3038 db 0ffh,0e3h,i_EX ;ex (sp),hl
3040 db 0ffh,0e9h,i_JP ;jp (hl)
3042 db 0ffh,0ebh,i_EX ;ex de,hl
3044 db 0ffh,0f9h,i_LD ;ld sp,hl
3046 db 0cfh,003h,i_INC ;inc rp
3048 db 0cfh,00bh,i_DEC ;dec rp
3050 db 0c7h,004h,i_INC ;inc r[y]
3052 db 0c7h,005h,i_DEC ;dec r[y]
3054 db 0ffh,008h,i_EX ;ex af,af'
3056 db 0cfh,009h,i_ADD ;add hl,rp
3058 db 0efh,002h,i_LD ;ld (rp),a ;rp=bc,de
3060 db 0efh,00ah,i_LD ;ld a,(rp) ;rp=bc,de
3063 db 0c7h,007h,i_RLCA+080h;rlca
3070 db 0c7h,006h,i_LD ;ld r[y],nn
3073 db 0c7h,0c6h,i_ADD+080h ;add a,r[z]
3076 ; db 0ffh,0c6h,i_ADD ;add a,nn
3078 ; db 0ffh,0ceh,i_ADC ;adc a,nn
3080 ; db 0ffh,0d6h,i_SUB ;sub nn
3082 ; db 0ffh,0deh,i_SBC ;sbc a,nn
3084 ; db 0ffh,0e6h,i_AND ;and nn
3086 ; db 0ffh,0eeh,i_XOR ;xor nn
3088 ; db 0ffh,0f6h,i_OR ;or nn
3090 ; db 0ffh,0feh,i_CP ;cp nn
3093 db 0ffh,010h,i_DJNZ ;djnz
3095 db 0ffh,018h,i_JR ;jr
3097 db 0e7h,020h,i_JR ;jr cc,
3099 db 0ffh,0d3h,i_OUT ;out (nn),a
3101 db 0ffh,0dbh,i_IN ;in a,(nn)
3107 db 0c7h,0c2h,i_JP ;jp cc,mn
3109 db 0c7h,0c4h,i_CALL ;call cc,mn
3111 db 0cfh,001h,i_LD ;ld ww,mn
3113 db 0ffh,0c3h,i_JP ;jp mn
3115 db 0ffh,0cdh,i_CALL ;call mn
3117 db 0ffh,022h,i_LD ;ld (mn),hl
3119 db 0ffh,02ah,i_LD ;ld hl,(mn)
3121 db 0ffh,032h,i_LD ;ld (mn),a
3123 db 0ffh,03ah,i_LD ;ld a,(mn)
3127 ; Prefix ED + 1 byte opcode, no arguments
3128 ; Format: opcode, t_MNEMONICS index
3131 db 045h,i_RETN ;retn
3132 db 04dh,i_RETI ;reti
3135 ; db 0a0h,i_LDI ;ldi
3136 ; db 0a1h,i_CPI ;cpi
3137 ; db 0a2h,i_INI ;ini
3138 ; db 0a3h,i_OUTI ;outi
3139 ; db 0a8h,i_LDD ;ldd
3140 ; db 0a9h,i_CPD ;cpd
3141 ; db 0aah,i_IND ;ind
3142 ; db 0abh,i_OUTD ;outd
3143 ; db 0b0h,i_LDIR ;ldir
3144 ; db 0b1h,i_CPIR ;cpir
3145 ; db 0b2h,i_INIR ;inir
3146 ; db 0b3h,i_OTIR ;otir
3147 ; db 0b8h,i_LDDR ;lddr
3148 ; db 0b9h,i_CPDR ;cpdr
3149 ; db 0bah,i_INDR ;indr
3150 ; db 0bbh,i_OTDR ;otdr
3151 db 08bh,i_OTDM ;otdm
3152 db 09bh,i_OTDMR ;otdmr
3153 db 083h,i_OTIM ;otim
3154 db 093h,i_OTIMR ;otimr
3161 db 0ffh,070h,i_IN ;in (c) ;
3163 db 0c7h,040h,i_IN ;in r,(c) ;r=b,c,d,e,h,l,a
3165 db 0ffh,071h,0ffh ;out (c),0 ;
3167 db 0c7h,041h,i_OUT ;out (c),r ;r=b,c,d,e,h,l,a
3169 db 0cfh,042h,i_SBC ;sbc hl,rp
3171 db 0cfh,04ah,i_ADC ;adc hl,rp
3173 db 0ffh,046h,i_IM ;im 0
3175 db 0ffh,056h,i_IM ;im 1
3177 db 0ffh,05eh,i_IM ;im 2
3179 db 0e7h,047h,i_LD ;ld i,a ... ld a,r
3181 db 0cfh,04ch,i_MLT ;mlt rr
3183 db 0c7h,004h,i_TST ;tst r
3188 db 0ffh,030h,i_IN0 ;in0 (m)
3190 db 0c7h,000h,i_IN0 ;in0 r,(m) ;r=b,c,d,e,h,l,a
3192 db 0ffh,031h,0ffh ;out0 (m),0
3194 db 0c7h,001h,i_OUT0 ;out0 (m),r ;r=b,c,d,e
3196 db 0ffh,064h,i_TST ;tst m
3198 db 0ffh,074h,i_TSTIO ;tstio m
3202 ; Prefix ED + 1 byte opcode + 2 byte address
3203 ; Format: db mask, match, t_MNEMONICS-index
3204 ; dw argument formating function
3206 db 0cfh,043h,i_LD ;ld (mn),ww ;ww=bc,de,hl,sp
3208 db 0cfh,04bh,i_LD ;ld ww,(mn) ;ww=bc,de,hl,sp
3214 db 0c0h,000h,i_RLC+080h ;rlc g
3217 ; db 0f8h,000h,i_RLC ;rlc g
3219 ; db 0f8h,008h,i_RRC ;rrc g
3221 ; db 0f8h,010h,i_RL ;rl g
3223 ; db 0f8h,018h,i_RR ;rr g
3225 ; db 0f8h,020h,i_SLA ;sla g
3227 ; db 0f8h,028h,i_SRA ;sra g
3229 ; db 0f8h,038h,i_SRL ;srl g
3231 db 0c0h,040h,i_BIT ;bit b,g
3233 db 0c0h,080h,i_RES ;res b,g
3235 db 0c0h,0c0h,i_SET ;set b,g
3239 ;-------------------------------------------------------------------------------
3240 ;-------------------------------------------------------------------------------
3248 ld a,(hl) ;get next token
3253 call outchar ;print as normal character
3271 ; http://www.z80.info/decoding.htm
3273 ; | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3281 db fi_ry,',' ;ld r[y],r[z]
3285 ; db 'A,',fi_rz,0 ;op A,r[z]
3287 db fi_ccy,0 ;op cc[y]
3289 db fi_rst,0 ;rst y*8
3292 a_esphl equ $-t_argf
3293 db '(SP),',fi_hlixiy,0 ;ex (sp),hl
3295 db '(',fi_hlixiy,')',0 ;jp (hl)
3298 a_lsphl equ $-t_argf
3299 db 'SP,',fi_hlixiy,0 ;ld SP,HL
3301 db 'AF,AF''',0 ;ex af,af'
3303 db fi_hlixiy,',' ;add hl,rp
3307 db '(',fi_rp,'),A',0 ;ld (rp),a ;rp=bc,de
3309 db 'A,(',fi_rp,')',0 ;ld a,(rp) ;rp=bc,de
3313 db fi_ry,',',fi_n,0 ;ld r[y],n
3319 db fi_ccy2,',' ;jr cc,j ;cc = nz,z,nc,c
3323 db '(',fi_n,'),A',0 ;out (n),a
3325 db 'A,(',fi_n,')',0 ;in a,(n)
3329 db fi_ccy,',',fi_nn,0 ;op cc[y],nn
3331 db fi_rp,',' ;ld rp[p],nn
3335 db '(',fi_nn,'),',fi_hlixiy,0 ;ld (nn),hl
3337 db fi_hlixiy,',(',fi_nn,')',0 ;ld hl,(nn)
3339 db '(',fi_nn,'),A',0 ;ld (nn),a
3341 db 'A,(',fi_nn,')',0 ;ld a,(nn)
3343 ; Prefix ED + 1 byte opcode
3345 db fi_ry,',' ;in r[y],(c)
3349 db '(C),' ;out (c),r[y]
3351 db fi_ry,0 ;inc r[y]
3359 db fi_ir,0 ;ld a,i ... r,a
3361 ; Prefix ED + 2 byte (opcode + immediate)
3363 db fi_ry,',' ;in0 r[y],(n)
3365 db '(',fi_n,')',0 ;in0 (n)
3367 db '(',fi_n,'),',fi_ry,0 ;out0 (n),r[y]
3369 ; Prefix ED + 3 byte (opcode + address)
3371 db '(',fi_nn,'),',fi_rp,0 ;ld (nn),rp
3373 db fi_rp,',(',fi_nn,')',0 ;ld rp,(nn)
3375 ; Prefix CB + 1 byte opcode
3377 db fi_y,',' ;op y,r[z]
3379 db fi_rz_cb,0 ;op r[z]
3380 a_noarg equ $-t_argf
3384 ;-------------------------------------------------------------------------------
3389 fi_&x equ 80h+argpf_index
3391 argpf_index defl argpf_index+1
3412 ld a,(isprefix_ixiy)
3454 ld a,(isprefix_ixiy)
3483 ld a,(isprefix_ixiy)
3507 db 0ddh ;swallow t_arg_rp in ix
3518 ld a,(isprefix_ixiy)
3553 ;-------------------------------------------------------------------------------
3558 ;o_&x equ $-opc_tabstart
3560 opc_index defl opc_index+1
3564 ;opc_tabstart defl $
3627 ; Block instructions
3709 ;-------------------------------------------------------------------------------
3719 ld hl,l20edh ;set break after BDOS call
3722 call disas_get_instrlen
3731 call lookup_branch_op
3737 call c,bp_trace_enter
3742 ;-------------------------------------------------------------------------------
3745 db 0ffh,0ddh ;Prefix DD
3747 db 0ffh,0fdh ;Prefix FD
3749 db 0ffh,0edh ;Prefix ED
3752 db 0ffh,0cdh ;call mn
3764 db 0c7h,0c4h ;call cc,mn
3766 db 0f7h,010h ;djnz d; jr d
3768 db 0e7h,020h ;jr cc,d
3770 db 0c7h,0c2h ;jp cc,mn
3772 db 0c7h,0c0h ;ret cc
3776 ;-------------------------------------------------------------------------------
3777 ; call mn call cc,mn
3815 cp 0e9h ; jp (ix); jp (iy)
3849 ld hl,(reg_sp) ;break on return address
3873 ;-------------------------------------------------------------------------------
3875 ; >>C[N][J] W expression
3876 ; >>C[N][J] U expression
3877 ; trace over Calls [No list] [Jumps only] /.While./.Until.
3880 ;-------------------------------------------------------------------------------
3882 ; >>T[N][J] W expression
3883 ; >>T[N][J] U expression
3884 ; Trace [no List] [Jumps only] / .While. / .Until.
3888 ld hl,1 ;default: 1 step
3889 call get_lastarg_def
3890 ld (trace_cnt_or_ptr),hl
3892 ld (bp_p_cpu_flag),a
3897 call bp_clr_temporary
3898 ld hl,(trace_cnt_or_ptr)
3900 ld (trace_cnt_or_ptr),hl
3908 ld (bp_p_cpu_flag),a
3912 ;-------------------------------------------------------------------------------
3917 ;-------------------------------------------------------------------------------
3934 ;-------------------------------------------------------------------------------
3963 ;-------------------------------------------------------------------------------
3968 ;-------------------------------------------------------------------------------
3970 rept (STACK_SIZE+3)/4
3971 db 0deh,0adh,0beh,0efh
4002 ;-------------------------------------------------------------------------------
4004 ddtz_size equ $-ddtz_base
4005 prog_size equ $-start
4008 ;-------------------------------------------------------------------------------