
%if 0

lDebug options and internal flags

Copyright (C) 2008-2025 E. C. Masloch

Usage of the works is permitted provided that this
instrument is retained with the works, so that any entity
that uses the works is notified of this instrument.

DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.

%endif


dispregs32	equ	  1	; RX: 32-bit register display (R, T/P/G)
traceints	equ	  2	; TM: trace into interrupts (T)
cpdepchars	equ	  4	; allow dumping of CP-dependent characters (D, DX)
fakeindos	equ	  8	; always assume InDOS flag non-zero (all)
nonpagingdevice	equ	 10h	; disallow paged output with [more] prompt (all exc. P, T)
	; This option was never used anywhere:
; pagingdevice	equ	 20h	; allow paged output with [more] prompt (all exc. P, T)
				; paged output is by default on if the output device is StdOut, else off
hexrn		equ	 40h	; display raw hexadecimal content of FPU registers (RN)
;novdd		equ	 80h	; don't use a registered NTVDM VDD (L, W)
nondospaging	equ	100h	; paging: don't use DOS for input when waiting for a key
opt1_86mnohlt	equ	200h	; (86 Mode:) HLT doesn't work, don't use it
biosidles	equ	400h	; don't idle with HLT or Int2F.1680, only call BIOS Int16.00
opt_usegetinput	equ	800h	; use getinput for int 21h interactive input
use_si_units	equ    1000h	; in disp_*_size use SI units (kB = 1000, etc)
use_jedec_units	equ    2000h	; in disp_*_size use JEDEC units (kB = 1024)
enable_serial	equ    4000h	; enable serial I/O (preferred over DOS or BIOS terminal)
int8_disable_serial equ	   8000h	; disable serial I/O when breaking due to intr8
gg_do_not_skip_bp equ	 1_0000h	; gg: do not skip a breakpoint (bb or gg)
gg_no_autorepeat equ	 2_0000h	; gg: do not auto-repeat
tp_do_not_skip_bp equ	 4_0000h	; T/TP/P: do not skip a (bb) breakpoint
gg_bb_hit_no_repeat equ	 8_0000h	; gg: do not auto-repeat after bb hit
tp_bb_hit_no_repeat equ	10_0000h	; T/TP/P: do not auto-repeat after bb hit
gg_unexpected_no_repeat equ 20_0000h	; gg: do not auto-repeat after unexpectedinterrupt
tp_unexpected_no_repeat equ 40_0000h	; T/TP/P
ss_no_dump:		equ 80_0000h
%if _SYMBOLIC
dd_no_blanks_sym:	equ 100_0000h
zz_no_pm_xms:		equ 200_0000h
%endif
rr_disasm_no_rept:	equ 1000_0000h
rr_disasm_no_show:	equ 2000_0000h
opt_cmdline_quiet_input:equ 4000_0000h
opt_cmdline_quiet_output:equ 8000_0000h
%if _SYMBOLIC
DEFAULTOPTIONS	equ zz_no_pm_xms
%else
DEFAULTOPTIONS	equ 0
%endif


opt2_db_header:		equ 1
opt2_db_trailer:	equ 2
opt2_dw_header:		equ 10h
opt2_dw_trailer:	equ 20h
opt2_dd_header:		equ 100h
opt2_dd_trailer:	equ 200h
opt2_getinput_dpmi:	equ 800h
opt2_hh_compat:		equ 1000h
opt2_getc_idle:		equ 2000h
opt2_getc_idle_dpmi:	equ 4000h
opt2_re_cancel_tpg:	equ 8000h
opt2_nn_compat:		equ 1_0000h
opt2_nn_capitalise:	equ 2_0000h
%if _MS_0RANGE_COMPAT
opt2_0range_compat:	equ 4_0000h
%endif
opt2_rr16_compat:	equ 8_0000h
opt2_r_prompt_compat:	equ 10_0000h
opt2_r_separate:	equ 20_0000h
opt2_r_linebreak_always:equ 40_0000h
opt2_dpminohlt:		equ 8000_0000h	; DPMI doesn't like hlt
DEFAULTOPTIONS2	equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt


opt3_tt_no_paging:	equ 1
opt3_tp_no_paging:	equ 2
opt3_pp_no_paging:	equ 4
opt3_gg_no_paging:	equ 8
opt3_silence_paging_set:equ 100h
opt3_silence_paging_on:	equ 200h
opt3_paging_rc:		equ 1000h
opt3_paging_yy:		equ 2000h
opt3_paging_re:		equ 4000h
opt3_r_highlight_diff:	equ 10000h
opt3_r_highlight_dumb:	equ 20000h
opt3_r_highlight_full:	equ 40000h
opt3_r_highlight_eip:	equ 80000h
%if _PM
opt3_ss_b_bit_set:	equ   10_0000h
 %if _BREAK_INSTALLDPMI
opt3_break_installdpmi:	equ   20_0000h
 %endif
%endif
%if _DHIGHLIGHT
opt3_d_highlight:	equ   80_0000h
%endif
%if _GETLINEHIGHLIGHT
opt3_getline_highlight:	equ  100_0000h
%endif
opt3_no_idle_2F:	equ  200_0000h
%if _DELAY_BEFORE_BP
opt3_delay_before_bp:	equ  400_0000h
%endif
opt3_no_call_amis:	equ  800_0000h
opt3_disable_autorepeat:equ 1000_0000h
opt3_check_ctrlc_keyb:	equ 2000_0000h
opt3_check_ctrlc_0bh:	equ 4000_0000h
opt3_tsr_quit_leave_tf:	equ 8000_0000h
DEFAULTOPTIONS3	equ opt3_tt_no_paging | opt3_tp_no_paging \
		| opt3_pp_no_paging | opt3_gg_no_paging \
		| opt3_check_ctrlc_keyb | opt3_check_ctrlc_0bh


opt4_int_2F_hook:	equ 2
opt4_int_08_hook:	equ 4
opt4_int_2D_hook:	equ 8
%if _CATCHINTFAULTCOND
opt4_int_fault_hook:	equ 10h
%endif
opt4_int_serial_force:	equ 1_0000h
opt4_int_2F_force:	equ 2_0000h
opt4_int_08_force:	equ 4_0000h
opt4_int_2D_force:	equ 8_0000h
%if _CATCHINT0D
opt4_int_0D_force:	equ   10_0000h
%endif
%if _CATCHINT0C
opt4_int_0C_force:	equ   20_0000h
%endif
opt4_int_00_force:	equ  100_0000h
opt4_int_01_force:	equ  200_0000h
opt4_int_03_force:	equ  400_0000h
opt4_int_06_force:	equ  800_0000h
opt4_int_18_force:	equ 1000_0000h
opt4_int_19_force:	equ 2000_0000h
opt4_int_09_force:	equ 4000_0000h	; not used at the same time as 15h
opt4_int_15_force:	equ 4000_0000h	; not used at the same time as 09h
opt4_int_07_force:	equ 8000_0000h
DEFAULTOPTIONS4 equ opt4_int_2F_hook


%if _VXCHG
opt6_vv_mode:		equ 1
opt6_vv_keep:		equ 2
opt6_vv_int16:		equ 10h
 %if _VXCHG_DEFAULT_ON
DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode
 %else
DEFAULTOPTIONS6 equ opt6_share_serial_irq
 %endif
%else
DEFAULTOPTIONS6 equ opt6_share_serial_irq
%endif
%if _DEBUG
opt6_debug_exception_late:	equ  20h
opt6_debug_exception_early:	equ  40h
 %if _DEBUG_COND
opt6_debug_exception:	equ  80h
opt6_debug_mode:	equ 100h
 %endif
%endif
opt6_bios_output:	equ 200h
opt6_flat_binary:	equ 400h
opt6_big_stack:		equ 800h
opt6_40_columns:	equ 1000h
opt6_40_indent_odd:	equ 2000h
opt6_40_dash:		equ 4000h
opt6_share_serial_irq:	equ 1_0000h
opt6_serial_EOI_call:	equ 2_0000h
%if _RH
opt6_rh_mode:		equ 10_0000h
%endif
%if _DEBUG
opt6_debug_putrunint_early:	equ  40_0000h
 %if _DEBUG_COND
opt6_debug_putrunint:		equ  80_0000h
 %endif
%endif
opt6_bios_io:		equ 100_0000h
opt6_immasm_display_uu:	equ 200_0000h
opt6_immasm_debug:	equ 400_0000h
opt6_immasm_flag:	equ 800_0000h
opt6_immasm_nobranch:	equ 1000_0000h
opt6_r_flags_style2:	equ 2000_0000h
opt6_r_flags_style3:	equ 4000_0000h
opt6_r_linebreak_conditional:	equ 8000_0000h


DEFAULTOPTIONS7 equ opt7_no_tsr_ll
opt7_no_free_oneshot_eld:	equ 1
opt7_debug_optional_link:	equ 2
opt7_quiet_install:		equ 4
opt7_quick_run:			equ 8
opt7_houdini:			equ 100h
opt7_debug_run:			equ 200h
opt7_no_ensure:			equ 1000h
opt7_no_tsr_ll:			equ 2000h


oldpacket	equ	  1	; Int25/Int26 packet method available (L, W)
newpacket	equ	  2	; Int21.7305 packet method available (L, W)
ntpacket	equ	  4	; VDD registered and usable (L, W)
pagedcommand	equ	  8	; allows paging in puts
notstdinput	equ	 10h	; DEBUG's StdIn isn't a device with StdIn bit (is file or other device)
inputfile	equ	 20h	; DEBUG's StdIn is a file, notstdinput also set
notstdoutput	equ	 40h	; DEBUG's StdOut isn't a device with StdOut bit (is file or other device)
outputfile	equ	  80h	; DEBUG's StdOut is a file, notstdoutput also set
hooked2F	equ	 100h	; Int2F hooked
nohook2F	equ	 200h	; don't hook Int2F.1687 (required for Win9x, DosEmu?)
unused_dif1_dpminohlt equ 400h	; DPMI doesn't like hlt
protectedmode	equ	 800h	; in (DPMI) protected mode
debuggeeA20	equ	1000h	; state of debuggee's A20
debuggerA20	equ	2000h	; state of debugger's A20 (will be on if possible)
nodosloaded	equ	4000h	; No DOS loaded currently (Boot loader mode)
has386		equ	8000h	; CPU is a 386
usecharcounter	equ    1_0000h	; don't reset charcounter between calls to puts
runningnt	equ    2_0000h	; running in NTVDM
canswitchmode	equ    4_0000h	; can switch modes (auxbuff large enough, DPMI mode switch set up)
modeswitched	equ    8_0000h	; switched mode (now in the mode that we weren't entered in)
promptwaiting	equ   10_0000h	; puts: any more output needs to display a prompt first
switchbuffer	equ   20_0000h	; mode switch needs a buffer (auxbuff)
tsrmode		equ   40_0000h	; in TSR mode; DPI and DPP not valid
attachedterm	equ   80_0000h	; the attached process terminated
runningdosemu	equ  100_0000h	; running in dosemu
; load_is_ldp	equ  200_0000h	; boot load: partition specified as "ldp"
tt_while:	equ  400_0000h	; tt: while condition specified
tt_p:		equ  800_0000h	; tt: proceed past repeated string instructions
tt_silent_mode:	equ 1000_0000h	; tt: run should be silent (dump at end)
tt_silence:	equ 2000_0000h	; tt: silent writing (write to auxbuff instead)
tt_no_bb:	equ 4000_0000h	; tt: do not use bb breakpoints
tt_no_bb_first:	equ 8000_0000h	; tt: do not use bb breakpoints at first


dif2_gg_is_first:	equ   1
dif2_gg_skip_non_cseip:	equ   2
dif2_gg_skip_cseip:	equ   4
dif2_gg_is_gg:		equ   8
dif2_gg_first_detected:	equ  10h
dif2_gg_again:		equ  20h
dif2_tpg_proceed_bp_set:equ  40h
dif2_tpg_keep_proceed_bp: equ 80h
dif2_tpg_have_bp:	equ 100h
dif2_tpg_adjusted_cseip:equ 200h
dif2_tpg_do_not_adjust:	equ 400h
dif2_bp_failure:	equ 800h
dif2_is_pp:		equ 1000h
%if _SYMBOLIC
dif2_createdprocess:	equ 800_0000h	; created empty debuggee process
dif2_sym_req_xms:	equ 2000h
dif2_sym_req_86mm:	equ 4000h
dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms
dif2_no_pm_xms:		equ 1_0000h
dif2_xms_detection_done:equ 2_0000h
%endif
%if _INPUT_FILE_HANDLES
dif2_input_file:	equ 10_0000h
dif2_closed_input_file:	equ 20_0000h
%endif
dif2_did_getline_file:	equ 40_0000h
%if _SYMBOLIC
dif2_poison:		equ 80_0000h
%endif
dif2_boot_loaded_kernel:equ 100_0000h
%if _INPUT_FILE_BOOT
dif2_input_file_boot:	equ 200_0000h
dif2_closed_input_file_boot:	equ 400_0000h
%endif
dif2_in_silence_dump:	equ 1000_0000h
dif2_int31_segment:	equ 2000_0000h
dif2_nn_compat:		equ 4000_0000h
dif2_nn_capitalise:	equ 8000_0000h


dif3_load_is_ldp:	equ 1	; boot load: partition specified as "ldp"
dif3_load_is_sdp:	equ 2	; boot load: partition specified as "sdp"
dif3_load_is_ydp:	equ 4	; boot load: partition specified as "ydp"
dif3_load_is_dp:	equ dif3_load_is_ldp \
				| dif3_load_is_sdp \
				| dif3_load_is_ydp
dif3_load_dir_dir:	equ 8
dif3_input_terminal_override:	equ 10h
dif3_input_serial_override:	equ 20h
dif3_if_not:		equ 40h
dif3_partition_changed:	equ 80h
;
dif3_input_cmdline:	equ 100h; input reading from cmdline_buffer
dif3_input_cmdline_closed: equ 200h
dif3_at_line_end:	equ 400h
dif3_quiet_input_single:equ 800h
dif3_quiet_output:	equ 1000h
dif3_unquiet_error:	equ 2000h
dif3_unquiet_prompt:	equ 4000h
dif3_unquiet:		equ dif3_unquiet_error | dif3_unquiet_prompt
dif3_return_eof:	equ 8000h
dif3_highlighting:	equ 1_0000h
dif3_do_not_highlight:	equ 2_0000h
dif3_int10_highlight:	equ 2_0000h
dif3_nosymbols_1:	equ 4_0000h
dif3_nosymbols_2:	equ 8_0000h
%if _PM
dif3_ss_b_bit_set:	equ  10_0000h
%endif
dif3_gotint19:		equ  20_0000h
dif3_prior_pm:		equ  40_0000h
%if _DELAY_BEFORE_BP
dif3_delayed		equ  80_0000h
%endif
dif3_input_re:		equ 100_0000h	; input reading from re_buffer
dif3_input_re_closed:	equ 200_0000h
dif3_accept_getrange_0:	equ 400_0000h
%if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT
dif3_in_if:		equ 800_0000h
%endif
dif3_auxbuff_guarded_1:	equ 1000_0000h
dif3_auxbuff_guarded_2:	equ 2000_0000h
dif3_auxbuff_guarded_3:	equ 4000_0000h
dif3_sss_is_reverse:	equ 8000_0000h


dif4_int_serial_hooked:	equ 1
dif4_int_2F_hooked:	equ 2
dif4_int_08_hooked:	equ 4
dif4_int_2D_hooked:	equ 8
%if _CATCHINTFAULTCOND && _CATCHINT0D
dif4_int_0D_hooked:	equ 10h
%endif
%if _CATCHINTFAULTCOND && _CATCHINT0C
dif4_int_0C_hooked:	equ 20h
%endif
%if _LOADER
dif4_int_18_hooked:	equ 1000h
dif4_int_19_hooked:	equ 2000h
%endif


%if _VXCHG
dif6_vv_mode:		equ 1
%endif
dif6_in_hook2F:		equ 2
dif6_in_amis_hook2F:	equ 4
dif6_debug_mode:	equ 100h
dif6_locked:		equ 200h
dif6_mcp:		equ 400h
%if _RH
dif6_rh_mode_was:	equ  8_0000h
dif6_rh_mode:		equ 10_0000h
dif6_rh_mode_2:		equ 20_0000h
%endif
dif6_device_mode:	equ 40_0000h
dif6_cpdepchars:	equ 80_0000h
%if _IMMASM
dif6_immasm_no_output:	equ 100_0000h
dif6_immasm:		equ 200_0000h
dif6_immasm_rel8:	equ 400_0000h
%endif


disasm_lowercase	equ 1
disasm_commablank	equ 2
disasm_nasm		equ 4
disasm_lowercase_refmem:equ 8
disasm_show_short:	equ 10h
disasm_show_near:	equ 20h
disasm_show_far:	equ 40h
disasm_nec:		equ 80h
disasm_40_columns:	equ 100h
disasm_no_indent:	equ 200h
disasm_msdebug_mnemonofs: equ 400h
disasm_a16_memref:	equ 1000h
disasm_a32_memref:	equ 2000h
disasm_a16_string:	equ 4000h
disasm_a32_string:	equ 8000h
disasm_hide_modrm:	equ 10000h
disasm_asize_loop_nasm:	equ 20000h
disasm_modrm_always:	equ 40000h
DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm \
	| disasm_a16_memref | disasm_a32_memref \
	| disasm_a16_string | disasm_a32_string
