     1                                  
     2                                  %if 0
     3                                  
     4                                  lDebug R commands - Register access
     5                                  
     6                                  Copyright (C) 1995-2003 Paul Vojta
     7                                  Copyright (C) 2008-2026 E. C. Masloch
     8                                  
     9                                  Usage of the works is permitted provided that this
    10                                  instrument is retained with the works, so that any entity
    11                                  that uses the works is notified of this instrument.
    12                                  
    13                                  DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    14                                  
    15                                  %endif
    16                                  
    17                                  %define SOURCEFILENAME "rr.asm"
    18                                  %ifidni __OUTPUT_FORMAT__, obj
    19                                   %include "debug.mac"
     1                              <1> [list -]
    14                              <3> [list -]
    14                              <2> [list -]
    86                              <1> [list -]
    86          ------------------  <1>  note: Disable usesection detection
    86          ------------------  <1>  note: usesection lDEBUG_DATA_ENTRY
    86          ------------------  <1>  note: usesection ASMTABLE1
    86          ------------------  <1>  note: usesection ASMTABLE2
    86          ------------------  <1>  note: usesection DATASTACKBASE
    86          ------------------  <1>  note: usesection MESSAGESEGMENT
    86          ------------------  <1>  note: usesection lDEBUG_CODE
    86          ------------------  <1>  note: usesection lDEBUG_CODE2
    86          ------------------  <1>  note: usesection INIT
    86          ------------------  <1>  note: usesection WLEMITALIGNINITEND
    86          ------------------  <1>  note: usesection DEVICESHIM
    86          ------------------  <1>  note: usesection WLEMITALIGNRELOCZERO
    68                              <2> %endif
    69                              <2> 
    70                              <2> 
    71                              <2> 	usesection lDEBUG_CODE
    71          ------------------  <2>  note: usesection lDEBUG_CODE
    72                              <2> section_of puts, trimputs, puts_ext_done, puts_ext_next
    73                              <2> section_of putsz_exthelp, code_retf
    74                              <2> section_of puts_getline_ext_done
    75                              <2> section_of puts_copyoutput_ext_done
    76                              <2> section_of guard_auxbuff, guard_re
    77                              <2> section_of handle_serial_flags_ctrl_c
    78                              <2> section_of hexword_high
    79                              <2> section_of call_int2D
    80                              <2> section_of copy_single_counted_string
    81                              <2> section_of intchk
    82                              <2> section_of IsIISPEntry?
    83                              <2> section_of dd_store
    84                              <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon
    85                              <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx
    86                              <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes
    87                              <2> section_of setrmlimit, skipcomm0, unhack
    88                              <2> section_of skipequals
    89                              <2> section_of to_errret_pop
    90                              <2> section_of cmd3.have_cx_convenience
    91                              <2> section_of verifysegm, verifysegm_or_error
    92                              <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit
    93                              <2> section_of pp_fix32bitflags, proceedbreakpoint
    94                              <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed
    95                              <2> section_of hexdword
    96                              <2> section_of cmd3_not_inject, cmd3_injected
    97                              <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline
    98                              <2> section_of transfer_ext_cx_nearcall_from_code2
    99                              <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm
   100                              <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm
   101                              <2> section_of ia_restore_ds
   102                              <2> %ifn _SYMBOLIC
   103                              <2> section_of selector_to_segment
   104                              <2> %endif
   105                              <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex
   106                              <2> section_of disp_dxax_times_cx_width_bx_size
   107                              <2> section_of disp_dxax_times_cx_width_bx_size.store
   108                              <2> section_of disp_message, disp_message_length_cx
   109                              <2> section_of ispm
   110                              <2> section_of setrc, error
   111                              <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds
   112                              <2> section_of intcall_ext_return_es, close_ext, doscall_extseg
   113                              <2> section_of yy_reset_buf
   114                              <2> section_of init_bootcmd
   115                              <2> 
   116                              <2> section_of InDOS, bootgetmemorysize
   117                              <2> section_of chkeol, decword, decdword
   118                              <2> section_of dec_dword_minwidth
   119                              <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit?
   120                              <2> section_of getlinearaddr
   121                              <2> section_of getlinear_d_b
   122                              <2> section_of getlinear_high_limit
   123                              <2> section_of getlinear_32bit
   124                              <2> section_of getlinear_high_limit.do_not_use_test
   125                              <2> section_of getlinear_common
   126                              <2> section_of ifsep, iseol?, isseparator?, isstring?, movp
   127                              <2> section_of putc, putsline, putsline_crlf, putsz_error
   128                              <2> section_of setrmsegm
   129                              <2> section_of skipwh0, skipwhite
   130                              <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx
   131                              <2> section_of capitalise
   132                              <2> section_of setes2ax
   133                              <2> section_of zz_copy_strings_to_str_buffer
   134                              <2> section_of call_xms_move, zz_call_xms, zz_detect_xms
   135                              <2> section_of code2_to_code_ret_to_ext
   136                              <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn
   137                              <2> section_of yy_common_parse_name
   138                              <2> section_of yy_common_parse_name_bx_buffer
   139                              <2> section_of retry_open_scriptspath
   140                              <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx
   141                              <2> section_of yy_boot_parse_name, yy_boot_open_file
   142                              <2> section_of yy_boot_parse_name_bx_buffer
   143                              <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector
   144                              <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry
   145                              <2> section_of ..@yy_filename_empty, boot_parse_fn
   146                              <2> section_of count_store, count_store.maybe_0
   147                              <2> section_of loader_get_resident_address, loader_prepare_resident
   148                              <2> 
   149                              <2> 
   150                              <2>  %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE
   151                              <2> 	usesection lDEBUG_CODE2
   152                              <2>  %else
   153                              <2> 	usesection lDEBUG_CODE
   153          ------------------  <2>  note: usesection lDEBUG_CODE
   154                              <2>  %endif
   155                              <2> section_of bxcx_to_cx_paragraphs
   156                              <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent
   157                              <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle
   158                              <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint
   159                              <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos
   160                              <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat
   161                              <2> section_of zz_switch_s, zz_transfer_buffer
   162                              <2> 
   163                              <2> 
   164                              <2> %if _SYMBOLIC
   165                              <2>  %if _DUALCODE && _SYMBOLICDUALCODE
   166                              <2> 	usesection lDEBUG_CODE2
   167                              <2>  %else
   168                              <2> 	usesection lDEBUG_CODE
   169                              <2>  %endif
   170                              <2> section_of shift_left_4_bxcx
   171                              <2> section_of selector_to_segment
   172                              <2> 
   173                              <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring
   174                              <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str
   175                              <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi
   176                              <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi
   177                              <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi
   178                              <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi
   179                              <2> section_of move_insert_farpointer.str.sidi
   180                              <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx
   181                              <2> section_of pointer_to_linear
   182                              <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main
   183                              <2> section_of save_slice_farpointer.str
   184                              <2> section_of segment_to_selector
   185                              <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate
   186                              <2> 
   187                              <2> section_of binsearchhash, binsearchmain
   188                              <2> section_of check_second_slice
   189                              <2> section_of disp_size_hash, disp_size_main, disp_size_str
   190                              <2> section_of displayresult, getstring1, getstring2
   191                              <2> section_of increment_ss_ref_count
   192                              <2> section_of list_sym_storage_usage, str_index_to_pointer
   193                              <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms
   194                              <2> section_of zz_compact_expand_check_xms
   195                              <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash
   196                              <2> section_of zz_delete_string, zz_expand, zz_expand_common
   197                              <2> section_of zz_get_symstr_length_bytes
   198                              <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx
   199                              <2> section_of zz_get_symstr_length_indices
   200                              <2> section_of zz_get_symstr_length_indices.ssLength_in_cx
   201                              <2> section_of zz_hash, zz_hash.bx_init
   202                              <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str
   203                              <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx
   204                              <2> section_of zz_unlink_main_next
   205                              <2> %endif
   206                              <2> 
   207                              <2> %if _DUALCODE
   208                              <2> 	usesection lDEBUG_CODE2
   208          ------------------  <2>  note: usesection lDEBUG_CODE2
   209                              <2> %else
   210                              <2> 	usesection lDEBUG_CODE
   211                              <2> %endif
   212                              <2> section_of FloatToStr
   213                              <2> 
   214                              <2> 
   215                              <2>  %if _DUALCODE && _EXPRDUALCODE
   216                              <2> 	usesection lDEBUG_CODE2
   216          ------------------  <2>  note: usesection lDEBUG_CODE2
   217                              <2>  %else
   218                              <2> 	usesection lDEBUG_CODE
   219                              <2>  %endif
   220                              <2> 
   221                              <2> section_of getofsforbx, checkpointer, getrangeX
   222                              <2> section_of getrangeX_have_address_need_length
   223                              <2> section_of getrange, getaddr, getofsforbx_remember_bitness
   224                              <2> section_of remember_bitness, getaddr_taken
   225                              <2> section_of getstr, get_length, get_length_keyword
   226                              <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator?
   227                              <2> section_of ..@call_operator_dispatchers
   228                              <2> section_of isseparator?, istype?, isunsignedtype?
   229                              <2> section_of handlesegment, handle3byte, handlebyte, handleword
   230                              <2> section_of handledword, handlepointer
   231                              <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus
   232                              <2> section_of uoh_not_bitwise, uoh_not_boolean
   233                              <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn
   234                              <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor
   235                              <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common
   236                              <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply
   237                              <2> section_of set_hhtype, of_divide, of_power
   238                              <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal
   239                              <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above
   240                              <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare
   241                              <2> section_of of_shift_right, of_shift_right_signed, of_shift_left
   242                              <2> section_of of_helper_getshiftdata, of_bit_mirror
   243                              <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise
   244                              <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean
   245                              <2> section_of of_helper_retbool, of_helper_getbool
   246                              <2> 
   247                              <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup
   248                              <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup
   249                              <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup
   250                              <2> section_of var_iok_setup, var_rhcount_setup
   251                              <2> section_of var_get_psp_segment, var_get_psp_selector
   252                              <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup
   253                              <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup
   254                              <2> section_of var_bootunitflags_setup
   255                              <2> 
   256                              <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup
   257                              <2> section_of default_variable_setup
   258                              <2> section_of var_ext_setup
   259                              <2> section_of var_ext_setup_done
   260                              <2> 
   261                              <2> section_of getstmmxdigit
   262                              <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit?
   263                              <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict
   264                              <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon
   265                              <2> section_of getnyb, get_value_range
   266                              <2> 
   267                              <2> section_of getaddrX, getword, getdword, getexpression
   268                              <2> 
   269                              <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid
   270                              <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines
   271                              <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu
   272                              <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name
   273                              <2> section_of getword.checksignificantbits, getbyte.checksignificantbits
   274                              <2> 
   275                              <2> section_of seg_bx_to_sel
   276                              <2> section_of getexpression.countsignificantbits
   277                              <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers
   278                              <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr
   279                              <2> section_of stack_check.internal
   280                              <2> 
   281                              <2> 
   282                              <2> 	usesection INIT
   282          ------------------  <2>  note: usesection INIT
   283                              <2> section_of init_capitalise
   284                              <2> section_of init_skipwhite, init_skipwh0
   285                              <2> section_of init_skipcomma, init_skipcomm0
   286                              <2> section_of init_skipequals
   287                              <2> 
   288                              <2> 
   289                              <2> 	usesection lDEBUG_DATA_ENTRY
   289          ------------------  <2>  note: usesection lDEBUG_DATA_ENTRY
   290                              <2> section_of entry_retn
   291                              <2> 
   292                              <2> 
   293                              <2> %if _LINK
   294                              <2>  %include "extern.mac"
     1                              <3> 
     2                              <3> ; expr.asm
     3                              <3>  extern PPLEN, PPLEN_ONLY_PREFIXES, a_addr, alloc_seg, alloc_size
     4                              <3>  extern amis_multiplex_number, asm_options, asm_startoptions
     5                              <3>  extern auxbuff_current_size, auxbuff_segorsel, behind_r_u_addr
     6                              <3>  extern bp_offset, code_seg, code_size, d_addr, dcount_addr
     7                              <3>  extern dcpm_addr, dd_default_length, dd_default_lines, dd_text_and
     8                              <3>  extern debuggerfunction, default_pp_count, default_tp_count
     9                              <3>  extern default_tt_count, device_header_address, device_mcb_paragraphs
    10                              <3>  extern dwcount_addr, dz_addr, e_addr, encodedmach87, entryseg_size
    11                              <3>  extern env_size, envseg, erc, errret
    12                              <3>  extern extdata, extdata_size, extdata_used, extseg, extseg_size
    13                              <3>  extern extseg_used, flagbits.amount, flagnames, flagvaron
    14                              <3>  extern getrange_is_uu, getrange_lines, has_mmx, hhresult
    15                              <3>  extern history.segorsel, historyseg_size, immseg, input_file_handles
    16                              <3>  extern input_file_handles.active, internalflags, internalflags2
    17                              <3>  extern internalflags3, intr8_limit, io_columns, io_columns_getline
    18                              <3>  extern io_end_buffer, io_flags, io_levels, io_rows, io_start_buffer
    19                              <3>  extern line_out, line_out_end, linkinfoaddress, load_data
    20                              <3>  extern load_input_file, load_input_file.active, load_unit_flags
    21                              <3>  extern loaddata_loadedfrom, machine, maxmachinetype, messageseg
    22                              <3>  extern messageseg_size, mmxbuff, msg.as, msg.end, msg.executing
    23                              <3>  extern msg.executing_value_range, msg.from, msg.in, msg.length
    24                              <3>  extern msg.linear, msg.lines, msg.lr, msg.nd, msg.nottaken
    25                              <3>  extern msg.nt, msg.or, msg.questionmark, msg.r, msg.stack_overflow
    26                              <3>  extern msg.stack_overflow.caller, msg.stack_overflow.cond
    27                              <3>  extern msg.stack_overflow.indirection, msg.stack_overflow.linear
    28                              <3>  extern msg.stack_overflow.parens, msg.stack_overflow.precedence
    29                              <3>  extern msg.stack_overflow.value_in, msg.t, msg.taken, msg.to
    30                              <3>  extern msg.value, msgtable_value_range, options, options2, parent
    31                              <3>  extern ppbytes, priorrc, psp22, pspdbe, pspdbg
    32                              <3>  extern qqtermcode, rc_count, rc_limit, re_count, re_limit
    33                              <3>  extern reading_access_variables, reg16names, reg8names, reg_cs
    34                              <3>  extern reg_ds, reg_efl, reg_eip, reg_esp, search_results
    35                              <3>  extern serial_columns, serial_fifo_size, serial_keep_timeout
    36                              <3>  extern serial_rows, serial_use_baseport, serial_use_dl
    37                              <3>  extern serial_use_fifo, serial_use_intnum, serial_use_irqmask
    38                              <3>  extern serial_use_params, serial_var_baseport, serial_var_dl
    39                              <3>  extern serial_var_fifo, serial_var_intnum, serial_var_irqmask
    40                              <3>  extern serial_var_params, sscounter, stack, startoptions
    41                              <3>  extern table_length_keywords, throwsp, transfer_ext_cx
    42                              <3>  extern try_amis_multiplex_number, try_debugger_amis_multiplex_number
    43                              <3>  extern types, types.addresses_minus_end, types.end, u_addr
    44                              <3>  extern usertermcode, uu_default_length, uu_default_lines, vregs
    45                              <3>  extern vregs.amount, writing_access_variables
    46                              <3>  extern flagbits, regs
    47                              <3> 
    48                              <3> ; run.asm
    49                              <3>  extern ..@aa_access_end, ..@aa_access_start, ..@dd_access_end
    50                              <3>  extern ..@dd_access_start, ..@ee_access_end, ..@ee_access_start
    51                              <3>  extern ..@ee_interactive_access_end, ..@ee_interactive_access_start
    52                              <3>  extern ..@hh_indirection_memory_access_end
    53                              <3>  extern ..@hh_indirection_memory_access_start
    54                              <3>  extern ..@readmem_fault_skip_4_near_call, ..@rr_access_end
    55                              <3>  extern ..@rr_access_start, ..@rr_variable_read_access_end
    56                              <3>  extern ..@rr_variable_read_access_start
    57                              <3>  extern ..@rr_variable_write_access_end
    58                              <3>  extern ..@rr_variable_write_access_start, ..@sss_access_end
    59                              <3>  extern ..@sss_access_start, ..@uu_access_end, ..@uu_access_start
    60                              <3>  extern ..@uu_referenced_memory_access_end
    61                              <3>  extern ..@uu_referenced_memory_access_start, ..@uu_simulate_cmps_end
    62                              <3>  extern ..@uu_simulate_cmps_start, ..@uu_simulate_scas_end
    63                              <3>  extern ..@uu_simulate_scas_start, InDOS_or_BIOS_IO, PPLEN_ONLY_STRING
    64                              <3>  extern auxbuff_behind_last_silent
    65                              <3>  extern auxbuff_start_silent, bInDbg, b_bplist.bp, b_bplist.counter
    66                              <3>  extern b_bplist.disabled_mask, b_bplist.idbuffer, b_bplist.used_mask
    67                              <3>  extern b_bplist.when, bb_deferred_message_in_lineout_behind
    68                              <3>  extern bp_display_offset, calcpointbit, cmd2_reset_re, cmd_goto
    69                              <3>  extern debug22.cleartraceflag, decbyte, dmycmd, dumpregs_extended
    70                              <3>  extern enable_rh, entry_to_code_seg, entry_to_code_segsel, eqflag
    71                              <3>  extern eqladdr, exccsip, exception_csip, exception_stack, excloc
    72                              <3>  extern g_bplist.bp, g_bplist.used_count, get_set_id_offset_length
    73                              <3>  extern getc_if_any, getcseipbyte, getint2324, getpsp
    74                              <3>  extern gg_deferred_message, gg_first_cseip_linear
    75                              <3>  extern gg_next_cseip_linear, guard_auxbuff.1_or_2, idle, in_getinput
    76                              <3>  extern int19msg, internalflags6, intr8_counter, lastcmd, msg.again
    77                              <3>  extern msg.alreadytsr, msg.area_aa_access, msg.area_dd_access
    78                              <3>  extern msg.area_ee_access, msg.area_ee_interactive_access
    79                              <3>  extern msg.area_hh_indirection_memory_access, msg.area_rr_access
    80                              <3>  extern msg.area_rr_variable_read_access
    81                              <3>  extern msg.area_rr_variable_write_access, msg.area_run_access
    82                              <3>  extern msg.area_sss_access, msg.area_uu_access
    83                              <3>  extern msg.area_uu_referenced_memory_access
    84                              <3>  extern msg.area_uu_simulate_cmps, msg.area_uu_simulate_scas
    85                              <3>  extern msg.bb_hit.1, msg.bb_hit.2.counter, msg.bb_hitpass_id.after
    86                              <3>  extern msg.bb_hitpass_id.long, msg.bb_hitpass_id.short, msg.bb_pass.1
    87                              <3>  extern msg.cant_bp_linear, msg.cant_bp_linear.address1
    88                              <3>  extern msg.cant_bp_reason, msg.cant_bp_reason0, msg.cant_bp_reason1
    89                              <3>  extern msg.cant_bp_reason2, msg.cant_bp_reason3
    90                              <3>  extern msg.cant_bp_reason3.value, msg.cant_bp_reasonu
    91                              <3>  extern msg.cant_bp_restore, msg.cant_bp_restore.value
    92                              <3>  extern msg.cant_bp_the, msg.cant_bp_type_gg
    93                              <3>  extern msg.cant_bp_type_permanent, msg.cant_bp_type_permanent.index
    94                              <3>  extern msg.cant_bp_type_proceed, msg.cant_bp_write, msg.ctrlc
    95                              <3>  extern msg.empty_message, msg.goto, msg.invalidpsp, msg.list
    96                              <3>  extern msg.list_bp.address1, msg.list_bp.first, msg.list_bp.second
    97                              <3>  extern msg.list_bp.third, msg.list_bp.value, msg.list_bp_csip_16
    98                              <3>  extern msg.list_bp_none, msg.list_bp_not_cseip, msg.notyettsr
    99                              <3>  extern msg.nowattached, msg.nowtsr1, msg.nowtsr2, msg.psphooked
   100                              <3>  extern msg.pspnotfound, msg.remember, msg.selfownedpsp, msg.silent
   101                              <3>  extern msg.warnprefix, msg.while, msg.while_not_true
   102                              <3>  extern msg.while_terminated_after, msg.while_terminated_before
   103                              <3>  extern oldcols, oldcrtp, oldcsrpos, oldmr, options3
   104                              <3>  extern options6, pp_instruction, pp_operand, progexit, progtrm
   105                              <3>  extern rc, reg_eax, reg_es, reg_gs, reg_ss
   106                              <3>  extern run_int, run_sp, run_sp_reserve, savesp, setcseipbyte
   107                              <3>  extern setint2324, setpsp, setpspdbg
   108                              <3>  extern showstring, silence_dump, spadjust, swapscreen
   109                              <3>  extern tmode0, tmode1, tmodes, tmodev, tpg_possible_breakpoint
   110                              <3>  extern tpg_proceed_bp, tt_silent_mode_number, vpage, vrows
   111                              <3>  extern while_buffer, while_buffer.length, writemem
   112                              <3> 
   113                              <3>  extern ..@getcseipbyte_fault_skip_2_near_call
   114                              <3>  extern ..@setcseipbyte_fault_skip_2_near_call
   115                              <3>  extern ..@writemem_fault_skip_4_near_call_a
   116                              <3>  extern ..@writemem_fault_skip_4_near_call_b, int0Cmsg, int0Dmsg
   117                              <3>  extern int0msg, int18msg, int1msg, int3msg, int6msg
   118                              <3>  extern int8_kbd_msg, int8msg, runint_ctrlc_msg, serial_flags
   119                              <3> 
   120                              <3> ; bb.asm
   121                              <3>  extern ..@bb_id_length, ..@bb_id_start, ..@bb_saved_linear
   122                              <3>  extern ..@bb_when_length, ..@bb_when_start, b_bplist.id
   123                              <3>  extern b_bplist.idbuffer.free
   124                              <3>  extern b_bplist.whenbuffer, b_bplist.whenbuffer.free
   125                              <3>  extern bootcmd, crlf, msg.all, msg.at
   126                              <3>  extern msg.bb_no_new, msg.bb_when, msg.boot, msg.bp, msg.bpaddress
   127                              <3>  extern msg.bpcontent, msg.bpcounter, msg.bpdisabled, msg.bpenabled
   128                              <3>  extern msg.bpnone, msg.bpnone_at, msg.bpunused, msg.counter
   129                              <3>  extern msg.existing, msg.id, msg.new, msg.notbu, msg.number
   130                              <3>  extern msg.offset, msg.when, prnquit
   131                              <3> 
   132                              <3> ; rr.asm
   133                              <3>  extern InDOS_or_BIOS_output, cmdline_buffer
   134                              <3>  extern cmdline_buffer.end, cmdline_buffer.position, disflags, ee0a
   135                              <3>  extern error_expr, flagbits_for_40, flagbits_for_80, flagsoff
   136                              <3>  extern flagsoff_style2, flagsoff_style3, flagson, flagson_style23
   137                              <3>  extern get_memref_index_bx, getline00, getline_reset_notatty
   138                              <3>  extern guard_rc, hexnyb.common, hhtype, hhvar, in_re
   139                              <3>  extern mask_4byte, masks, memrefs, memrefs.free, msg.3byte
   140                              <3>  extern msg.abort, msg.append, msg.byte, msg.count, msg.dword
   141                              <3>  extern msg.highlight, msg.internal_error_no_mmx, msg.readonly
   142                              <3>  extern msg.readonly_mem, msg.regs386, msg.regs386_off, msg.regs386_on
   143                              <3>  extern msg.replace, msg.rh, msg.rv_mode.before, msg.rv_mode_r86m
   144                              <3>  extern msg.rv_mode_v86m, msg.rvd, msg.rvd_deviceheader
   145                              <3>  extern msg.rvd_not_device, msg.rvd_size, msg.rvm, msg.rvp
   146                              <3>  extern msg.rvp_application, msg.rvp_boot, msg.rvp_device
   147                              <3>  extern msg.rvp_device_attached, msg.rvp_tsr, msg.rvv
   148                              <3>  extern msg.unexpected_auxbuff_guard, msg.unhighlight, msg.vm_auxseg
   149                              <3>  extern msg.vm_codeseg, msg.vm_dataseg, msg.vm_entryseg, msg.vm_hisseg
   150                              <3>  extern msg.vm_messageseg, msg.vp_dparent, msg.vp_dpra
   151                              <3>  extern msg.vp_dpspsegment, msg.vp_parent, msg.vp_pra
   152                              <3>  extern msg.vp_pspsegment, msg.word, operatorfunctions, psp_parent
   153                              <3>  extern psp_pra, puts_break_line_more, putsline_break_line, re_buffer
   154                              <3>  extern re_buffer.end, re_buffer.position, re_sp, regs_prior
   155                              <3>  extern regs_prior.size, retn_expr, rh_count_number
   156                              <3>  extern rh_display_with_count, shortflagbits, shortflagbits.amount
   157                              <3>  extern shortflagsoff, shortflagson, silence_dump.rh
   158                              <3>  extern silence_dump.rh.all, table_getline_prepare_ldebug
   159                              <3>  extern table_getline_prepare_ms_debug, terminate_silent_dump
   160                              <3>  extern terminate_silent_dump.if_nonnull
   161                              <3> 
   162                              <3> ; rr.asm
   163                              <3>  extern flagbits_for_shl, regs_prior.size_w
   164                              <3> 
   165                              <3> ; aa.asm
   166                              <3>  extern REP_LEN, SEGP_LEN, attach
   167                              <3>  extern ext_aa_after_getline_handler, ext_aa_before_getline_handler
   168                              <3>  extern ext_aa_inject_handler, immasm_length, immasm_rel1632_target
   169                              <3>  extern immasm_rel8_target, msg.aa_internal_error, msg.attach
   170                              <3>  extern prefixlist.after_segment, replist, segprfxtab, showmach
   171                              <3>  extern skipalpha, sm1
   172                              <3> 
   173                              <3> ; uu.asm
   174                              <3>  extern A32P_LEN, GROUP7, MN_DB, MN_LOCK, MN_LOOP
   175                              <3>  extern MN_LOOPNZ, MN_LOOPZ, MN_REP, MN_REPE, MN_REPNE
   176                              <3>  extern MN_SEG, MN_WAIT, N_LOCK, N_LTABA, N_LTABO
   177                              <3>  extern N_WTAB, O32P_AMOUNT, OPTYPES_BASE, REP_DIFF_LEN, REP_SAME_LEN
   178                              <3>  extern SFPGROUP3, SGROUP4, SPARSE_BASE, a32prfxtab, dismach
   179                              <3>  extern dmflags, has_87, immasm_far_target, immasm_imm16, locktab
   180                              <3>  extern ltaba1, ltabo1, mach_87, mnlist, mnlist_a_suffix_allowed
   181                              <3>  extern mnlist_o_suffix_allowed, mnlist_o_suffix_required
   182                              <3>  extern msg.condjump, msg.condnotjump, msg.memrefs_invalid_internal
   183                              <3>  extern msg.uninstall, msg.uu_internal_error, msg.uu_too_many_repeat
   184                              <3>  extern needsmath, needsmath_L, needsmsg, needsmsg.digit_6_ofs
   185                              <3>  extern needsmsg.digit_x_ofs, needsmsg_L, o32prfxtab, obsmach
   186                              <3>  extern obsolete, obsolete_L, opindex, opinfo, oplists
   187                              <3>  extern optypes, ppbytes.string, ppbytes.string_amount, reg_ebp
   188                              <3>  extern reg_ebx, reg_ecx, reg_edi, reg_esi, reg_fs
   189                              <3>  extern regmem, rgnam16, rgnam816, segrgnam, sibbyte
   190                              <3>  extern sqztab, tab_to, uninstall, unused, wtab1
   191                              <3> 
   192                              <3> ; uu.asm
   193                              <3>  extern reg_edx
   194                              <3> 
   195                              <3> ; uu.asm
   196                              <3>  extern MN_BSWAP, MN_O32
   197                              <3> 
   198                              <3> ; uu.asm
   199                              <3>  extern MN_A32
   200                              <3> 
   201                              <3> ; amis.asm
   202                              <3>  extern amisintr_offset, deviceshim_size, ext_amis_handler
   203                              <3> 
   204                              <3> ; boot.asm
   205                              <3>  extern boot_remember_seek_handle
   206                              <3>  extern boot_remember_seek_offset, chkeol_or_then, cmd_goto.yy_entry
   207                              <3>  extern display_y_or_ext, ext_cmdline, ext_finish.boot
   208                              <3>  extern if_exists_found_open, if_exists_not_found
   209                              <3>  extern if_exists_then_address, iseol?_or_then, loadoptiontable
   210                              <3>  extern loadoptiontable.incompatible, loadsettings
   211                              <3>  extern msdos7_message_table, msdos7_message_table.size
   212                              <3>  extern msg.boot_access_error, msg.boot_and, msg.boot_auxbuff_crossing
   213                              <3>  extern msg.boot_badchain, msg.boot_badclusters, msg.boot_badfat
   214                              <3>  extern msg.boot_bpb_load_overlap, msg.boot_bpb_too_low
   215                              <3>  extern msg.boot_cannot_set_both, msg.boot_dot_crlf
   216                              <3>  extern msg.boot_file_not_found, msg.boot_file_too_big_error
   217                              <3>  extern msg.boot_file_too_small_error, msg.boot_internal_error
   218                              <3>  extern msg.boot_invalid_filename, msg.boot_invalid_heads
   219                              <3>  extern msg.boot_invalid_sectors, msg.boot_out_of_memory_error
   220                              <3>  extern msg.boot_partition_cycle_error, msg.boot_partition_not_found
   221                              <3>  extern msg.boot_quit_fail, msg.boot_sector_not_power
   222                              <3>  extern msg.boot_sector_too_large, msg.boot_sector_too_small
   223                              <3>  extern msg.boot_segment_too_low, msg.boot_too_many_partitions_error
   224                              <3>  extern msg.bootfail, msg.bootfail_check_mismatch
   225                              <3>  extern msg.bootfail_check_mismatch.check_got
   226                              <3>  extern msg.bootfail_check_mismatch.check_offset
   227                              <3>  extern msg.bootfail_check_mismatch.check_value, msg.bootfail_code
   228                              <3>  extern msg.bootfail_read, msg.bootfail_read_errorcode
   229                              <3>  extern msg.bootfail_secsizediffer, msg.bootfail_sig
   230                              <3>  extern msg.bootfail_sig_parttable, msg.bootfail_stack_underflow
   231                              <3>  extern msg.bpb, msg.checkoffset, msg.checkvalue, msg.dir
   232                              <3>  extern msg.dirinsteadsize, msg.emptydirname, msg.entry
   233                              <3>  extern msg.guard_auxbuff_error, msg.hidden, msg.hiddenadd
   234                              <3>  extern msg.maxpara, msg.minpara, msg.protocol, msg.quit, msg.read
   235                              <3>  extern msg.sector, msg.sector_alt, msg.segment, msg.write
   236                              <3>  extern msg.yy_empty, msg.yy_filename_empty, msg.yy_no_file
   237                              <3>  extern msg.yy_requires_filename, msg.yy_too_large
   238                              <3>  extern msg.yy_too_many_handles, terminator_in_line_in.offset
   239                              <3>  extern terminator_in_line_in.value, throwret
   240                              <3>  extern yy_boot_attempt_open_pathname, yy_boot_attempt_open_stack
   241                              <3>  extern yy_is_script
   242                              <3> 
   243                              <3> ; cc.asm
   244                              <3>  extern count_var, hh.single, msg.clear, msg.clear_sequence
   245                              <3>  extern msg.range, parsecm
   246                              <3> 
   247                              <3> ; dd.asm
   248                              <3>  extern auxbuff_current_size_minus_24, charcounter
   249                              <3>  extern dstringaddr, dstringtype, firstmcb, firstumcb, intaddress
   250                              <3>  extern lastint, lastint_is_86m_and_mcb, msg.di_empty, msg.di_error
   251                              <3>  extern msg.di_freedos_reloc, msg.di_hidden, msg.di_hma, msg.di_iisp
   252                              <3>  extern msg.di_jmpfar, msg.di_jmpfarindirect, msg.di_multiplex.1
   253                              <3>  extern msg.di_multiplex.2, msg.di_multiplex.3, msg.di_nonstd_iisp
   254                              <3>  extern msg.di_system_low, msg.di_system_mcb, msg.di_system_upper
   255                              <3>  extern msg.di_testhook, msg.di_toomany, msg.di_uninst_iisp
   256                              <3>  extern msg.header, msg.header.length, msg.invmcbadr, msg.prefixes
   257                              <3>  extern msg.tableheader, msg.tableheadertop, msg.top, msg.trailer
   258                              <3>  extern msg.trailer.length, smcbmsg_unknown, smcbtypes
   259                              <3> 
   260                              <3> ; debug.asm
   261                              <3>  extern UnhookInterruptForce, UnhookInterruptForceSim, aa
   262                              <3>  extern adusetup, bb, boot_ebdaflag, boot_initcode
   263                              <3>  extern boot_new_memsizekib, boot_old_memsizekib, cc, code_start, ddd
   264                              <3>  extern device_initcode, driveno, dumpregs_extended.exit, ee
   265                              <3>  extern eld_linkcall.call_cmd3, end_of_ldebug_code, entry_int3_retf
   266                              <3>  extern errcarat, ff, get_86m_interrupt_handler_no_dos, get_columns
   267                              <3>  extern getline_close_file, getline_close_file.resetstuff, gg, hh
   268                              <3>  extern hh_depth, hh_depth_of_single_term, hhflag, ia_restore, ii
   269                              <3>  extern immasm, install_86m_interrupt_handler, int22, int2D, intr0
   270                              <3>  extern intr0C, intr0D, intr1, intr18, intr19
   271                              <3>  extern intr3, intr6, intr8, linkinfo, ll
   272                              <3>  extern ll3, ll_copy_cmdline_and_fcbs
   273                              <3>  extern ll_copy_cmdline_and_fcbs.have_cx
   274                              <3>  extern mm, msg.NULblank, msg.asmoptions_1, msg.boothelp
   275                              <3>  extern msg.build_array, msg.build_long_amount, msg.build_short_amount
   276                              <3>  extern msg.build_version_amount, msg.cannot_hook_2D.invalid
   277                              <3>  extern msg.cannot_hook_2D.nofree, msg.cannotbootquit_memsizes
   278                              <3>  extern msg.condhelp, msg.ensure_no_memory, msg.expressionhelp
   279                              <3>  extern msg.flaghelp, msg.flags_1, msg.guard_rc_error
   280                              <3>  extern msg.guard_re_error, msg.help_array, msg.help_array_amount
   281                              <3>  extern msg.help_re, msg.help_run, msg.help_source, msg.keep
   282                              <3>  extern msg.license, msg.line_out_overflow, msg.n_toolongname
   283                              <3>  extern msg.n_toolongtail, msg.nobootsupp, msg.options_array
   284                              <3>  extern msg.options_array_amount, msg.options_pages, msg.options_scan
   285                              <3>  extern msg.options_scan_amount, msg.qq_a_terminated
   286                              <3>  extern msg.qq_a_unterminated, msg.qq_device_no_c, msg.qq_device_no_d
   287                              <3>  extern msg.qq_device_none_selected, msg.qq_unterm
   288                              <3>  extern msg.rc_limit_reached, msg.re, msg.re_limit_reached
   289                              <3>  extern msg.reghelp, msg.rh_disabled, msg.rh_enabled, msg.run
   290                              <3>  extern msg.serial_cannot_hook, msg.serial_cannot_hook.new_int
   291                              <3>  extern msg.serial_cannot_hook.old_int, msg.serial_cannot_unhook
   292                              <3>  extern msg.serial_cannot_unhook.int, msg.serial_cannot_unhook.nowarn
   293                              <3>  extern msg.serial_late_unhook, msg.serial_late_unhook.int
   294                              <3>  extern msg.serial_no_keep_enter, msg.serial_no_keep_timer
   295                              <3>  extern msg.serial_request_keep, msg.source, msg.string_build
   296                              <3>  extern msg.string_options, msg.string_version
   297                              <3>  extern msg.tsr_cannot_terminate_attached, msg.varhelp, oo, ph_msg, pp
   298                              <3>  extern putrunint, putsz_exthelp, rr, run, section.DEVICESHIM.vstart
   299                              <3>  extern serial_clean_up, serial_clear_fifos, serial_eoi
   300                              <3>  extern serial_init_UART, serial_install_interrupt_handler
   301                              <3>  extern serial_interrupt_handler, serial_uninstall_interrupt_handler
   302                              <3>  extern set_irq, setscreen, sleep_delta_limit, sleep_highest_delta
   303                              <3>  extern sss, tpg_initialise_empty_auxbuff.reset
   304                              <3>  extern transfer_to_ext_puts_getline, tt, update_inttab_optional, uu
   305                              <3>  extern vv, vv_disable, vv_set, ww, yy
   306                              <3> 
   307                              <3> ; debug.asm
   308                              <3>  extern eld_linkcall
   309                              <3> 
   310                              <3> ; ee.asm
   311                              <3>  extern bufend, bufnext, fillbuf, fullbsout
   312                              <3>  extern getline_is_input_file?, line_in, linecounter, load_extension
   313                              <3>  extern msg.ext, notatty, prehak1, run2324
   314                              <3> 
   315                              <3> ; hh.asm
   316                              <3>  extern hh_div_active, hh_div_dividend, hh_div_divisor
   317                              <3>  extern msg.base, msg.group, msg.hh_div_remainder, msg.width
   318                              <3> 
   319                              <3> ; iioo.asm
   320                              <3>  extern if_exists_length, if_exists_si, if_exists_sp
   321                              <3>  extern install, msg.exists, msg.install, msg.not, msg.then
   322                              <3>  extern msg.y, resetrc, yy_or_ext_no_guard_re
   323                              <3> 
   324                              <3> ; immasm.asm
   325                              <3>  extern aa_ret, addrr, condmsg, error_mirror, index
   326                              <3>  extern msg.immasm_error_eip, presizeflags, reg32addr, segmnt
   327                              <3>  extern segrgaddr
   328                              <3> 
   329                              <3> ; msg.asm
   330                              <3>  extern ..@boot_scan_dir_return_fat16_root_entry
   331                              <3>  extern ..@boot_scan_dir_return_filenotfound
   332                              <3>  extern ..@boot_scan_dir_return_subdir_or_fat32_entry
   333                              <3>  extern alloc_size_not_reserved, asciitablenames, boot_init_foundname
   334                              <3>  extern configpath, configpath.dir_end, device_quittable_regs, dpmi32
   335                              <3>  extern execblk.cmdline, ext_command_handler, ext_finish.bp_is_set
   336                              <3>  extern ext_handle, ext_inject_handler, ext_preprocess_handler
   337                              <3>  extern ext_puts_copyoutput_handler, ext_puts_getline_handler
   338                              <3>  extern ext_puts_handler, ext_var, ext_var_amount, ext_var_format
   339                              <3>  extern ext_var_size, extcssel, extdssel, handle_scan_dir_entry
   340                              <3>  extern handle_scan_dir_not_found, history.first, history.last
   341                              <3>  extern indirect_array_errfix, init_executable_pathname
   342                              <3>  extern init_executable_pathname.end, internalflags4, internalflags5
   343                              <3>  extern internalflags7, isvariable_morebyte_nameheaders.ext
   344                              <3>  extern lastcmd_transfer_ext_address, lastcmd_transfer_ext_entry
   345                              <3>  extern line_in.end, linkcall_table, load_adr_dirbuf_segment
   346                              <3>  extern load_check_dir_attr, load_data_lowest, load_kernel_name
   347                              <3>  extern load_yy_direntry, load_yyname_input, load_yyname_next
   348                              <3>  extern near_transfer_ext_address, near_transfer_ext_entry
   349                              <3>  extern next_reserved_segment, options4, options5, options7
   350                              <3>  extern patcharea_intrtn, patcharea_intrtn.segment
   351                              <3>  extern patcharea_intrtn.size, patcharea_run, patcharea_run.segment
   352                              <3>  extern patcharea_run.size, pm_2_86m_0, promptlen, reserved_address
   353                              <3>  extern scriptspath, scriptspath.dir_end
   354                              <3>  extern sss_silent_count, sss_silent_count_used, stack_end, swch1
   355                              <3>  extern while_buffer.end
   356                              <3> 
   357                              <3> ; msg.asm
   358                              <3>  extern install_trying
   359                              <3> 
   360                              <3> ; init.asm
   361                              <3>  extern ..@init_behind, ..@init_first
   362                              <3>  extern ..@patch_no386_ds_6_DATA_ENTRY
   363                              <3>  extern ..@patch_no386_ds_code_or_entry
   364                              <3>  extern ..@patch_no386_iret_code_or_entry, behind_code_truncated
   365                              <3>  extern behind_init, behind_messagesegment_nobits
   366                              <3>  extern behind_messagesegment_nobits_truncated, debug22
   367                              <3>  extern device_header.next, devint23, devint24, entry_retf
   368                              <3>  extern execblk.fcb1, execblk.fcb2, ext_data_area, extcall_table.ret
   369                              <3>  extern extcall_table.segsel, fileext, hVdd, immasm_buffer, initcont
   370                              <3>  extern initcont.boot_entry, initcont.device, inttab, inttab.i06
   371                              <3>  extern inttab.i2D, inttab_number_variable, line_out_overflow
   372                              <3>  extern linkcall_table.code1, linkcall_table.entry
   373                              <3>  extern linkcall_table.init, oldmode, pInDOS, pSDA, regs.size
   374                              <3>  extern switchar, trim_overflow, var_addr_entries
   375                              <3>  extern var_addr_entries.amount
   376                              <3> 
   377                              <3> ; install.asm
   378                              <3>  extern installflags, msg.alreadydisabled
   379                              <3>  extern msg.alreadyenabled, msg.toggle, msg.trydisable, msg.tryenable
   380                              <3> 
   381                              <3> ; ints.asm
   382                              <3>  extern debuggeramissig, inttab_optional
   383                              <3> 
   384                              <3> ; lineio.asm
   385                              <3>  extern auxbuff_amount_silent, cmd3_set_options
   386                              <3>  extern determine_quiet_output, eldheader, getc_repeat_idle
   387                              <3>  extern getline_timer_func, handle_ctrl_c, if_exists_found_closed
   388                              <3>  extern if_exists_found_ext_open, indos_remember_seek_function
   389                              <3>  extern indos_remember_seek_handle, indos_remember_seek_offset
   390                              <3>  extern input_file_handles.to_close, msg.configkeyword
   391                              <3>  extern msg.eld_error_code, msg.eld_load_error, msg.emptykeyword
   392                              <3>  extern msg.eof, msg.executablekeyword, msg.ext_error_internal
   393                              <3>  extern msg.ext_error_invalid, msg.ext_error_io, msg.ext_error_oom
   394                              <3>  extern msg.freedos_ctrlc_workaround, msg.goto_empty
   395                              <3>  extern msg.goto_not_file, msg.goto_not_found.1, msg.goto_not_found.2
   396                              <3>  extern msg.history_internal_error, msg.more, msg.more_over
   397                              <3>  extern msg.more_over_size, msg.more_size, msg.rh_step.1
   398                              <3>  extern msg.rh_step.2, msg.scriptskeyword, msg.silent_error, msg.sof
   399                              <3>  extern msg.unexpected_noneol_rc, msg.unexpected_noneol_re
   400                              <3>  extern msg.yy_error_file_open, msg.yy_filename_missing_unquote
   401                              <3>  extern msg.yy_no_dos, qq, section.DATASTACK.vstart
   402                              <3>  extern serial_check_receive_char, serial_receive_char
   403                              <3>  extern serial_send_char, skip_rh, yy_boot
   404                              <3>  extern yy_boot_clear_remember_seek, yy_boot_close_file, yy_boot_read
   405                              <3>  extern yy_boot_remember_seek, yy_boot_seek_current
   406                              <3>  extern yy_boot_seek_start, yy_try_scriptspath
   407                              <3>  extern yy_try_scriptspath.didnotyettry
   408                              <3>  extern yy_try_scriptspath.nokeywordused
   409                              <3> 
   410                              <3> ; ll.asm
   411                              <3>  extern doserr8, ensuredebuggeeloaded, execblk, execblk.csip
   412                              <3>  extern execblk.sssp, msg.hexerror, msg.ll_unterm, msg.not_while_indos
   413                              <3>  extern msg.tsr_cannot_ll, parselw, reading
   414                              <3>  extern terminate_attached_process, ww1, ww15, zeroregs
   415                              <3> 
   416                              <3> ; mm.asm
   417                              <3>  extern has_287, has_copr, msg.c0, msg.cr, msg8088
   418                              <3>  extern msgx86, no_copr, parsecm_have_address
   419                              <3> 
   420                              <3> ; serialp.asm
   421                              <3>  extern baseport, msg.no_progress, rxfifo, rxhead
   422                              <3>  extern rxtail, serial_fcr_setting, serial_installed_intnum
   423                              <3>  extern serial_save_dl, serial_save_ier, serial_save_irq_mask
   424                              <3>  extern serial_save_irq_off, serial_save_lcr, serial_save_mcr, txfifo
   425                              <3>  extern txhead, txtail
   426                              <3> 
   427                              <3> ; ss.asm
   428                              <3>  extern msg.matches, msg.reverse, msg.seconds, msg.sleep
   429                              <3>  extern msg.ticks, sleep_repeat_idle
   430                              <3> 
   431                              <3> ; vv.asm
   432                              <3>  extern csrpos, msg.nokeep, msg.off, msg.on, msg.vv_disabled
   433                              <3>  extern msg.vv_enable_failure, xmsdrv, xmsmove
   434                              <3> 
   435                              <3> ; ww.asm
   436                              <3>  extern diskful, doserr11, doserr2, doserr3, doserr5
   437                              <3>  extern drive, drivenumber, dskerrs, not_while_indos, nowhexe
   438                              <3>  extern nownull, openerr, openerr1, writing, wwmsg1
   439                              <3>  extern wwmsg2
   440                              <3> 
   441                              <3> 
   442                              <3>  extern bCSAttr, lDEBUG_CODE_to_lDEBUG_CODE2_nearcall_helper
   443                              <3> 
   444                              <3>  extern hook2F.not_in_dos
   445                              <3> 
   446                              <3>  extern cmd4.int3, lDEBUG_CODE2_dualret_helper
   447                              <3>  extern lDEBUG_CODE2_to_lDEBUG_CODE_nearcall_helper
   448                              <3>  extern lDEBUG_CODE_to_lDEBUG_CODE2_dualcall_helper, msg.bu
   449                              <3>  extern msg.bu_relocated, msg.bu_relocated.sign
   450                              <3> 
   451                              <3>  extern nopmsupp
   452                              <3> 
   453                              <3>  extern bAddr32
   454                              <3> 
   455                              <3>  extern descriptor, descriptor.attrib, descriptor.base
   456                              <3>  extern descriptor.limit, gatewrong, msg.d.a_error, msg.d.a_error_code
   457                              <3>  extern msg.d.a_success, msg.d.a_success_sel, msg.d.b_error
   458                              <3>  extern msg.d.b_error_code, msg.d.b_success, msg.d.d_error
   459                              <3>  extern msg.d.d_error_code, msg.d.d_success, msg.d.l_error
   460                              <3>  extern msg.d.l_error_code, msg.d.l_success, msg.d.t_error
   461                              <3>  extern msg.d.t_error_code, msg.d.t_success, msg.deschelp, msg.ofs32
   462                              <3>  extern nodesc
   463                              <3> 
   464                              <3>  extern ..@patch_tsr_quit_run, areastruc_entry.qq_entry, cssel
   465                              <3>  extern ddebugareas.next, debug2F, dpmidisable, dpmientry, dpmihook
   466                              <3>  extern dpmihookamis, dpmihookcs, dpmiwatch, end_of_ldebug_code2
   467                              <3>  extern findinstalleddebugger, get_messagesegsel, handle_mode_changed
   468                              <3>  extern i23pm, msg.cannotpmquit, msg.desc, msg.dpmi_no_hook, msg.msdos
   469                              <3>  extern msg.qq_device_pm, msg.qq_still_pm, msg.qqlate_areas_error
   470                              <3>  extern msg.readonly_verifysegm, msg.readonly_verifysegm.selector
   471                              <3>  extern mydpmientry, nodosext, oldi2F, pm_reset_handlers, scratchsel
   472                              <3>  extern sr_state, switchmode, uninstall_areas.qq_entry
   473                              <3> 
   474                              <3>  extern i24pm
   475                              <3> 
   476                              <3>  extern auxbuff_switchbuffer_size, code2_seg, code2_sel, code2_size
   477                              <3>  extern code_sel, daresult, dssel, immsel
   478                              <3>  extern lDEBUG_CODE2_to_lDEBUG_CODE_dualcall_helper
   479                              <3>  extern lDEBUG_CODE_dualret_helper, messagesel, msg.desctype
   480                              <3>  extern msg.stack_overflow.desctype
   481                              <3> 
   482                              <3>  extern cmd3_mirror
   483                              <3> 
   484                              <3>  extern ..@patch_entry_seg, ..@patch_no386_ds_4, ..@patch_no386_ds_5
   485                              <3>  extern ..@patch_no386_ds_entry_pmint21_1
   486                              <3>  extern ..@patch_no386_ds_entry_pmint21_2, areas_fun, areas_sub
   487                              <3>  extern ddebugareas.prev, linkcall_table.code2
   488                              <3> 
   489                              <3>  extern areas_struc, msg.areasalreadyinstalled
   490                              <3>  extern msg.areasalreadyuninstalled, msg.areasinstalled
   491                              <3>  extern msg.areasnodebuggerfound, msg.areasnotinstalled
   492                              <3>  extern msg.areasnotinstalled.code, msg.areasnotsupported
   493                              <3>  extern msg.areasuninstalled, msg.areasuninstalled.code
   494                              <3> 
   495                              <3>  extern intcall_return_parameter_es_parameter_ds
   496                              <3>  extern lDEBUG_CODE_to_lDEBUG_CODE_dualcall_helper, pop_if, push_if
   497                              <3> 
   498                              <3>  extern isextenderavailable, msg.cannotpmload, nodosextinst
   499                              <3> 
   500                              <3>  extern install_areas, patcharea_pm_exc, patcharea_pm_exc.segment
   501                              <3>  extern patcharea_pm_exc.size
   502                              <3> 
   503                              <3>  extern pmint21
   504                              <3> 
   505                              <3>  extern debuggerexception, entry_to_code_sel, exc6msg, excCmsg
   506                              <3>  extern excDmsg, excEmsg, intrtn2_entry, pmintsave.int21
   507                              <3> 
   508                              <3>  extern convsegs, convsegs.amount_fixed, convsegs.end_fixed
   509                              <3>  extern dpmi_pm2rm, dpmi_pmsav, dpmi_rm2pm, dpmi_rmsav, endexctab
   510                              <3>  extern exc_first, exc_second, excsave, exctab, installdpmimsg
   511                              <3>  extern intrtn_entry.from_installdpmi, pmintsave, pminttab
   512                              <3>  extern pminttab.end, setrmaddr, silence_delete_one_string.internal
   513                              <3> 
   514                              <3>  extern msg.rv_mode_dpmi_16, msg.rv_mode_dpmi_32, msg.vm_code2seg
   515                              <3>  extern msg.vm_selector, msg.vp_dpspsel, msg.vp_pspsel, psp_selector
   516                              <3> 
   517                              <3>  extern ..@getcseipbyte_fault_skip_6_near_call
   518                              <3>  extern ..@hh_code1_indirection_memory_access_end
   519                              <3>  extern ..@hh_code1_indirection_memory_access_start
   520                              <3>  extern ..@readmem_fault_skip_2_near_call
   521                              <3>  extern ..@setcseipbyte_fault_skip_6_near_call
   522                              <3>  extern ..@writemem_fault_skip_2_near_call_a
   523                              <3>  extern ..@writemem_fault_skip_2_near_call_b, behind_code
   524                              <3>  extern behind_code2, convsegs.amount, ddebugareas
   525                              <3>  extern getline_extra_int22.cleartraceflag, msg.list_bp_cseip_32
   526                              <3> 
   527                              <3>  extern MN_O16
   528                              <3> 
   529                              <3>  extern MN_A16
   530                              <3> 
   531                              <3>  extern relocatedzero
   532                              <3> 
   533                              <3>  extern msg.bu_disabled
   534                              <3> 
   535                              <3>  extern reset_interrupts, set_interrupts
   536                              <3> 
   537                              <3>  extern startoptions6
   538                              <3> 
   539                              <3>  extern currentposition, msg.loader_bottom_not_allowed
   540                              <3>  extern msg.loader_too_low_load
   541                              <3> 
   542                              <3>  extern intr_loader_18, intr_loader_19, moveloader_hook_ints
   543                              <3> 
   544                              <3>  extern loader_query, loader_transfer_cmd3, loader_transfer_relocate
   545                              <3> 
   546                              <3>  extern cmd3_int_disable.set_bx_to_dx, cmd3_int_enable.set_bx_to_dx
   547                              <3>  extern ldebug_code_size, movesegrefstable, movetable
   548                              <3>  extern movetable.bottom, msg.isalready, msg.isnow, msg.loader_error
   549                              <3>  extern msg.move, msg.move_auxbuff_error, msg.move_auxdown
   550                              <3>  extern msg.move_auxup, msg.move_ebdanottop, msg.move_empty
   551                              <3>  extern msg.move_int_error, msg.move_int_panic
   552                              <3>  extern msg.move_must_be_bottom, msg.move_nottop, msg.move_oom
   553                              <3>  extern msg.move_rpl, msg.move_toolargeebda, msg.unsupportedmove
   554                              <3>  extern qq_int_unhook_sim.set_bx_to_dx
   555                              <3> 
   556                              <3>  extern moveloader.already, moveloader.bottom_to_hidden
   557                              <3>  extern moveloader.bottom_to_top, moveloader.hidden_to_bottom
   558                              <3>  extern moveloader.hidden_to_top, moveloader.top_to_bottom
   559                              <3>  extern moveloader.top_to_hidden
   560                              <3> 
   561                              <3>  extern moveloader.specificerror, moveloader_check_serial, msg.godebug
   562                              <3>  extern msg.loader_extra, msg.loader_flag, msg.loader_loadseg_low
   563                              <3>  extern msg.loader_must_be_hidden, msg.loader_sign, msg.loader_stack
   564                              <3>  extern msg.loadsupportsignature, msg.loadsupportsignature.size
   565                              <3> 
   566                              <3>  extern depack, hshrink_memory_source.offset
   567                              <3>  extern hshrink_memory_source.segment, indirect_hshrink_message_buffer
   568                              <3>  extern msg.hshrink_error, nontruncated_hshrink_message_buffer
   569                              <3> 
   570                              <3>  extern truncated_hshrink_message_buffer
   571                              <3> 
   572                              <3>  extern patch_boothelp_uncompressed
   295                              <2> %endif
   710                              <1> %endif
   711                              <1> [list -]
   714                              <1> 
   715                              <1> %include "eld.mac"
     1                              <2> %if 0
     2                              <2> 
     3                              <2> Extensions for lDebug macros
     4                              <2> 
     5                              <2> Copyright (C) 2008-2025 E. C. Masloch
     6                              <2> 
     7                              <2> Usage of the works is permitted provided that this
     8                              <2> instrument is retained with the works, so that any entity
     9                              <2> that uses the works is notified of this instrument.
    10                              <2> 
    11                              <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    12                              <2> 
    13                              <2> %endif
    14                              <2> 
    15                              <2> %ifndef ELD_MAC
    16                              <2> %define ELD_MAC 1
    17                              <2> 
    18                              <2> %include "lmacros3.mac"
     1                              <3> [list -]
    19                              <2> 
    20                              <2> 		; ELD executable header
    21                              <2> 	struc ELD_HEADER
    22 00000000 ????????            <2> eldhSignature:		resb 4	; "ELD1"
    23 00000004 ??????              <2> 			resb 3	; reserved
    24 00000007 ??                  <2> 			resb 1	; 26 (Ctrl-Z)
    25 00000008 ????????            <2> eldhCodeOffset:		resd 1	; position displacement from eldhSignature
    26 0000000C ????                <2> eldhCodeImageLength:	resw 1	; amount bytes, at least 32
    27 0000000E ????                <2> eldhCodeAllocLength:	resw 1	; amount bytes, added to prior. sum < 64 KiB
    28 00000010 ????????            <2> eldhDataOffset:		resd 1
    29 00000014 ????                <2> eldhDataImageLength:	resw 1	; (zero allowed)
    30 00000016 ????                <2> eldhDataAllocLength:	resw 1	; (zero allowed)
    31 00000018 ????                <2> eldhCodeEntrypoint:	resw 1	; within code section, used as displacement
    32 0000001A ????????            <2> eldhReserved:		resb 4	; reserved
    33 0000001E ????                <2> eldhExtensionSize:	resw 1	; from eldhSignature, -> past eldhx fields in use
    34                              <2> 	endstruc
    35                              <2> 	endarea ELD_HEADER, 1
    36                              <2> 
    37                              <2> 	struc ELD_HEADERX
    38 00000000 <res 20h>           <2> eldhxHeader:		resb ELD_HEADER_size
    39 00000020 ????????            <2> eldhxDescriptionOffset:	resd 1	; zero if none, from eldhxHeader. <= 128 Bytes
    40 00000024 ????????            <2> eldhxHelpOffset:	resd 1	; zero if none, from eldhxHeader
    41 00000028 ????????            <2> eldhxLibTable:		resd 1	; zero if none, from eldhxHeader
    42 0000002C ????????            <2> eldhxDateTimeOffset:	resd 1	; zero if none, from eldhxHeader
    43                              <2> 	alignb 16
    44                              <2> 	endstruc
    45                              <2> 
    46                              <2> 	struc ELD_TRAILER_HEADER
    47 00000000 ????????????????    <2> eldthSignature:		resb 8	; "ELD1TAIL"
    48 00000008 ????????            <2> eldthHeaderOffset:	resd 1	; negative displacement from eldthSignature,
    49                              <2> 				;  add this dword to the seek offset
    50 0000000C ????                <2> eldthReserved:		resw 1	; reserved, must be initialised to zero
    51 0000000E ????                <2> eldthChecksum:		resw 1	; sum of all words in trailer header = 0
    52                              <2> 	endstruc
    53                              <2> 	endarea ELD_TRAILER_HEADER, 1
    54                              <2> 
    55                              <2> 	struc ELD_LIBTABLE
    56 00000000 ????                <2> eldltFormat:		resw 1
    57                              <2> 	; 0 = uncompressed
    58                              <2> 	; 2 = heatshrink compressed
    59                              <2> 	; 3 = lzexedat -4 compressed
    60                              <2> 	; 4 = lzexedat -4 -l compressed
    61 00000002 ????                <2> eldltAmount:		resw 1
    62 00000004 ????????            <2> eldltOffset:		resd 1	; from eldhxHeader
    63                              <2> eldltCompressedLength:		; (dword, only present if format 2, 3, or 4)
    64                              <2> 	endstruc
    65                              <2> 	endarea ELD_LIBTABLE, 1
    66                              <2> 
    67                              <2> 		; ELD instance header
    68                              <2> 	struc ELD_INSTANCE
    69 00000000 ????                <2> eldiStartCode:		resw 1	; -> this structure itself (para aligned)
    70 00000002 ????                <2> eldiEndCode:		resw 1	; -> behind memory used by instance (para aligned)
    71 00000004 ????                <2> eldiStartData:		resw 1	; -> data in data entry section (para aligned), or 0
    72 00000006 ????                <2> eldiEndData:		resw 1	; -> behind data (para aligned), or 0
    73 00000008 ????????????????    <2> eldiIdentifier:		resb 8	; blank-filled text
    74 00000010 ????                <2> eldiFlags:		resw 1	; flags
    75                              <2> eldiListing_size equ 14
    76 00000012 <res Eh>            <2> eldiListing:		resb eldiListing_size
    77                              <2> 				; ASCIZ listing file name
    78                              <2> 	endstruc
    79                              <2> 		; flags for eldiFlags:
    80                              <2> eldifResident:		equ 1
    81                              <2> 
    82                              <2> 		; ELD link info header
    83                              <2> 	struc ELD_LINKINFO
    84 00000000 ????                <2> eldlSignature:		resw 1	; 0E1D1h
    85 00000002 ????????            <2> eldlReserved:		resw 2
    86 00000006 ????                <2> eldlUseLinkHash:	resw 1
    87 00000008 ????                <2> eldlDataAmount:		resw 1
    88 0000000A ????                <2> eldlDataPrefixes:	resw 1
    89 0000000C ????                <2> eldlDataEntries:	resw 1
    90 0000000E ????                <2> eldlDataAddresses:	resw 1
    91 00000010 ????                <2> eldlCodeAmount:		resw 1
    92 00000012 ????                <2> eldlCodePrefixes:	resw 1
    93 00000014 ????                <2> eldlCodeEntries:	resw 1
    94 00000016 ????                <2> eldlCodeAddresses:	resw 1
    95                              <2> 	endstruc
    96                              <2> 
    97                              <2> 	numdef ELD_CODE_VSTART, 9001h
    98                              <2> 	numdef ELD_DATA_VSTART, 8000h
    99                              <2> 	numdef ELD_RELOC_VSTART, 8000h
   100                              <2> 
   101                              <2> 	numdef ELD_RECLAIM_HINT, 0
   102                              <2> 	strdef ELD_LISTING, ""
   103                              <2> 	numdef ELD_DATETIME, 0
   104                              <2> 
   105                              <2> %if _ELD_DATETIME
   106                              <2>  %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart
   107                              <2>  %macro PUT_ELD_DATETIME 0.nolist
   108                              <2> datetime:	asciz __UTC_DATE__,'T',__UTC_TIME__,'Z'
   109                              <2> 		asciz		; for future extension
   110                              <2>  %endmacro
   111                              <2> %else
   112                              <2>  %define PUT_ELDHX_DATETIME_OFFSET
   113                              <2>  %define PUT_ELD_DATETIME
   114                              <2> %endif
   115                              <2> 
   116                              <2> %endif
   716                              <1> 
   717                              <1> %include "install.mac"
     1                              <2> 
     2                              <2> %if 0
     3                              <2> 
     4                              <2> lDebug INSTALL command macros
     5                              <2> 
     6                              <2> Copyright (C) 2008-2023 E. C. Masloch
     7                              <2> 
     8                              <2> Usage of the works is permitted provided that this
     9                              <2> instrument is retained with the works, so that any entity
    10                              <2> that uses the works is notified of this instrument.
    11                              <2> 
    12                              <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    13                              <2> 
    14                              <2> %endif
    15                              <2> 
    16                              <2> 	struc INSTALLFLAG
    17 00000000 ????                <2> ifKeyword:	resw 1
    18 00000002 ????                <2> ifDescription:	resw 1
    19 00000004 ????                <2> ifOptions:	resw 1
    20 00000006 ????                <2> ifValue:	resw 1
    21 00000008 ????                <2> ifTrying:	resw 1
    22 0000000A ????                <2> ifReserved:	resw 1
    23                              <2> 	endstruc
    24                              <2> 
   718                              <1> 
   719                              <1> %if _SYMBOLIC
   720                              <1> 	defaulting 0			; disable defaulting
   721                              <1> %include "symbols.mac"
   722                              <1> [list -]
   723                              <1> 		; symbolic branch defines *without* defaulting!
   724                              <1> 	numdef ZZ_INSERT_TEMP, 1
   725                              <1> 	numdef XMS_SYMBOL_TABLE, 1
   726                              <1> 	numdef BUFFER_86MM_SLICE, 0
   727                              <1> 	numdef SECOND_SLICE, 0
   728                              <1> 
   729                              <1> 	defaulting 1			; re-enable defaulting
   730                              <1> 
   731                              <1> 		; symbolic branch defines
   732                              <1> 	numdef 86MM_SYMBOL_TABLE_MAX, 256, 256
   733                              <1> %endif
   734                              <1> 
   735                              <1> 	struc SEGADR
   736 00000000 ????????            <1> saOffset:	resd 1
   737 00000004 ????                <1> saSegSel:	resw 1
   738                              <1> %if _PM
   739 00000006 ????                <1> saSegment:	resw 1
   740 00000008 ????                <1> saSelector:	resw 1
   741                              <1> %endif
   742                              <1> 	endstruc
   743                              <1> 
   744                              <1> 	%macro segmentedaddress 0.nolist
   745                              <1> 	istruc SEGADR
   746                              <1> 	iend
   747                              <1> 	%endmacro
   748                              <1> 
   749                              <1> 	struc SEGOFS16ADR
   750 00000000 ????                <1> so16aOffset:	resw 1
   751 00000002 ????                <1> so16aSegSel:	resw 1
   752                              <1> %if _PM
   753 00000004 ????                <1> so16aSegment:	resw 1
   754 00000006 ????                <1> so16aSelector:	resw 1
   755                              <1> %endif
   756                              <1> 	endstruc
   757                              <1> 
   758                              <1> 	%macro segofs16address 0-1.nolist zero
   759                              <1> 	istruc SEGOFS16ADR
   760                              <1> %ifidni %1,zero
   761                              <1> %elifidni %1,minusone
   762                              <1> at so16aOffset,		dw -1
   763                              <1> at so16aSegSel,		dw -1
   764                              <1>  %if _PM
   765                              <1> at so16aSegment,	dw -1
   766                              <1> at so16aSelector,	dw -1
   767                              <1>  %endif
   768                              <1> %else
   769                              <1>  %error Unexpected initialiser keyword
   770                              <1> %endif
   771                              <1> 	iend
   772                              <1> 	%endmacro
   773                              <1> 
   774                              <1> 	struc SEGONLYADR
   775 00000000 ????                <1> soaSegSel:	resw 1
   776                              <1> %if _PM
   777 00000002 ????                <1> soaSegment:	resw 1
   778 00000004 ????                <1> soaSelector:	resw 1
   779                              <1> %endif
   780                              <1> 	endstruc
   781                              <1> 
   782                              <1> 	%macro segonlyaddress 0.nolist
   783                              <1> 	istruc SEGONLYADR
   784                              <1> 	iend
   785                              <1> 	%endmacro
   786                              <1> 
   787                              <1> 
   788                              <1> %if _LOADER
   789                              <1> 	struc MOVETABLEENTRY
   790                              <1> mteIdentifier:		resw 1
   791                              <1> mteArrayIndex:		resw 1
   792                              <1> mteStatusMessage:	resw 1
   793                              <1> mteFromArray:
   794                              <1> mteFromBottom:		resw 1
   795                              <1> mteFromTop:		resw 1
   796                              <1> mteFromHidden:		resw 1
   797                              <1> 	endstruc
   798                              <1> %endif
   799                              <1> 
   800                              <1> %if _BOOTLDR
   801                              <1>  %include "iniload.mac"
     1                              <2> %if 0
     2                              <2> 
     3                              <2> lDebug iniload/boot interfacing structs and macros
     4                              <2> 
     5                              <2> Copyright (C) 2008-2025 E. C. Masloch
     6                              <2> 
     7                              <2> Usage of the works is permitted provided that this
     8                              <2> instrument is retained with the works, so that any entity
     9                              <2> that uses the works is notified of this instrument.
    10                              <2> 
    11                              <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    12                              <2> 
    13                              <2> %endif
    14                              <2> 
    15                              <2> 
    16                              <2> 	struc BS
    17 00000000 ??????              <2> bsJump:	resb 3
    18 00000003 ????????????????    <2> bsOEM:	resb 8
    19                              <2> bsBPB:
    20                              <2> 	endstruc
    21                              <2> 
    22                              <2> 	struc EBPB		;        BPB sec
    23 00000000 ????                <2> bpbBytesPerSector:	resw 1	; offset 00h 0Bh
    24 00000002 ??                  <2> bpbSectorsPerCluster:	resb 1	; offset 02h 0Dh
    25 00000003 ????                <2> bpbReservedSectors:	resw 1	; offset 03h 0Eh
    26 00000005 ??                  <2> bpbNumFATs:		resb 1	; offset 05h 10h
    27 00000006 ????                <2> bpbNumRootDirEnts:	resw 1	; offset 06h 11h -- 0 for FAT32
    28 00000008 ????                <2> bpbTotalSectors:	resw 1	; offset 08h 13h
    29 0000000A ??                  <2> bpbMediaID:		resb 1	; offset 0Ah 15h
    30 0000000B ????                <2> bpbSectorsPerFAT:	resw 1	; offset 0Bh 16h -- 0 for FAT32
    31 0000000D ????                <2> bpbCHSSectors:		resw 1	; offset 0Dh 18h
    32 0000000F ????                <2> bpbCHSHeads:		resw 1	; offset 0Fh 1Ah
    33 00000011 ????????            <2> bpbHiddenSectors:	resd 1	; offset 11h 1Ch
    34 00000015 ????????            <2> bpbTotalSectorsLarge:	resd 1	; offset 15h 20h
    35                              <2> bpbNew:				; offset 19h 24h
    36                              <2> 
    37 00000019 ????????            <2> ebpbSectorsPerFATLarge:	resd 1	; offset 19h 24h
    38 0000001D ????                <2> ebpbFSFlags:		resw 1	; offset 1Dh 28h
    39 0000001F ????                <2> ebpbFSVersion:		resw 1	; offset 1Fh 2Ah
    40 00000021 ????????            <2> ebpbRootCluster:	resd 1	; offset 21h 2Ch
    41 00000025 ????                <2> ebpbFSINFOSector:	resw 1	; offset 25h 30h
    42 00000027 ????                <2> ebpbBackupSector:	resw 1	; offset 27h 32h
    43 00000029 <res Ch>            <2> ebpbReserved:		resb 12	; offset 29h 34h
    44                              <2> ebpbNew:			; offset 35h 40h
    45                              <2> 	endstruc
    46                              <2> 
    47                              <2> 	struc BPBN		; ofs B16 S16 B32 S32
    48 00000000 ??                  <2> bpbnBootUnit:		resb 1	; 00h 19h 24h 35h 40h
    49 00000001 ??                  <2> 			resb 1	; 01h 1Ah 25h 36h 41h
    50 00000002 ??                  <2> bpbnExtBPBSignature:	resb 1	; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN
    51 00000003 ????????            <2> bpbnSerialNumber:	resd 1	; 03h 1Ch 27h 38h 43h
    52 00000007 <res Bh>            <2> bpbnVolumeLabel:	resb 11	; 07h 20h 2Bh 3Ch 47h
    53 00000012 ????????????????    <2> bpbnFilesystemID:	resb 8	; 12h 2Bh 36h 47h 52h
    54                              <2> 	endstruc		; 1Ah 33h 3Eh 4Fh 5Ah
    55                              <2> 
    56                              <2> 	struc DIRENTRY
    57 00000000 ????????????????    <2> deName:		resb 8
    58 00000008 ??????              <2> deExt:		resb 3
    59 0000000B ??                  <2> deAttrib:	resb 1
    60 0000000C ??                  <2> dePlusSize:	resb 1
    61 0000000D ??????????????      <2> 		resb 7
    62 00000014 ????                <2> deClusterHigh:	resw 1
    63 00000016 ????                <2> deTime:		resw 1
    64 00000018 ????                <2> deDate:		resw 1
    65 0000001A ????                <2> deClusterLow:	resw 1
    66 0000001C ????????            <2> deSize:		resd 1
    67                              <2> 	endstruc
    68                              <2> 
    69                              <2> ATTR_READONLY	equ 1
    70                              <2> ATTR_HIDDEN	equ 2
    71                              <2> ATTR_SYSTEM	equ 4
    72                              <2> ATTR_VOLLABEL	equ 8
    73                              <2> ATTR_DIRECTORY	equ 10h
    74                              <2> ATTR_ARCHIVE	equ 20h
    75                              <2> 
    76                              <2> lsvclSignature		equ "CL"
    77                              <2> lsvclBufferLength	equ 256
    78                              <2> 
    79                              <2> 	struc LOADSTACKVARS, -10h
    80 FFFFFFF0 ????????            <2> lsvFirstCluster:	resd 1
    81 FFFFFFF4 ????????            <2> lsvFATSector:		resd 1
    82 FFFFFFF8 ????                <2> lsvFATSeg:		resw 1
    83 FFFFFFFA ????                <2> lsvLoadSeg:		resw 1
    84 FFFFFFFC ????????            <2> lsvDataStart:		resd 1
    85                              <2> 	endstruc
    86                              <2> 
    87                              <2> 	struc LOADDATA, LOADSTACKVARS - 10h
    88 FFFFFFE0 ????                <2> ldMemoryTop:	resw 1
    89 FFFFFFE2 ????                <2> ldLoadTop:	resw 1
    90 FFFFFFE4 ????                <2> ldSectorSeg:	resw 1
    91 FFFFFFE6 ??                  <2> ldFATType:	resb 1
    92                              <2> ldFlags:
    93 FFFFFFE7 ??                  <2> ldHasLBA:	resb 1
    94 FFFFFFE8 ????                <2> ldClusterSize:	resw 1
    95 FFFFFFEA ????                <2> ldParaPerSector:resw 1
    96                              <2> ldDirCluster:			; dword
    97                              <2> ldLoadingSeg:		; word
    98                              <2> ldQueryPatchValue:	; word
    99                              <2> lsvCommandLine:		; word
   100                              <2> .start:		equ $ - lsvclBufferLength
   101 FFFFFFEC ????                <2> .signature:	resw 1
   102                              <2> ldLoadUntilSeg:		; word
   103                              <2> lsvExtra:		; word
   104 FFFFFFEE ??                  <2> .partition:	resb 1	; byte
   105 FFFFFFEF ??                  <2> .flags:		resb 1	; byte
   106                              <2> 	endstruc
   107                              <2> 
   108                              <2> ldhlfPreserveLoader	equ 4
   109                              <2> 
   110                              <2> lsvefNoDataStart	equ 1
   111                              <2> lsvefPartitionNumber	equ 2
   112                              <2> lsvefPreserveLoader	equ 4
   113                              <2> 
   114                              <2> %if lsvefPreserveLoader != ldhlfPreserveLoader
   115                              <2>  %error Unexpected flag values
   116                              <2> %endif
   117                              <2> 
   118                              <2> 	struc LOADCMDLINE, LOADDATA - lsvclBufferLength
   119                              <2> ldCommandLine:
   120 FFFFFEE0 <res 100h>          <2> .start:		resb lsvclBufferLength
   121                              <2> 	endstruc
   122                              <2> 
   123                              <2> ldfHasLBA:	equ 1
   124                              <2> ldfFATInvalid:	equ 2
   125                              <2> ldfFATBuffered:	equ 4
   126                              <2> ldfDataBuffered: equ 8
   127                              <2> 
   128                              <2> 	struc LOADDATA2, LOADDATA - 10h
   129 FFFFFFD0 ????????            <2> ldRootSector:		resd 1
   130 FFFFFFD4 ????                <2> ldEntriesPerSector:	resw 1
   131                              <2> ldDataSegment:		; word
   132 FFFFFFD6 ????                <2> ldLastAvailableSector:	resw 1
   133                              <2> ldDataSector:		; dword
   134 FFFFFFD8 ????                <2> ldParasLeft:		resw 1
   135 FFFFFFDA ????                <2> ldParasDone:		resw 1
   136                              <2> 	endstruc
   137                              <2> 
   138                              <2> 	struc LOADDATA3, LOADDATA2 - 10h
   139 FFFFFFC0 ????????            <2> ldMaxCluster:		resd 1
   140 FFFFFFC4 ????????            <2> ldFileSize:		resd 1
   141 FFFFFFC8 ????????            <2> ldCurrentCluster:	resd 1
   142 FFFFFFCC ????????            <2> ldCurrentSeek:		resd 1
   143                              <2> 	endstruc
   144                              <2> 
   145                              <2> 	struc LOADERIMAGEIDENT
   146 00000000 ????????            <2> liiSignature:		resb 4		; "NLDR"
   147 00000004 ????                <2> liiVersion:		resb 2		; "00"
   148 00000006 ????                <2> liiChecksum:		resw 1		; word sum of first 8 words = 0
   149 00000008 ????                <2> liiAmountParagraphs:	resw 1
   150 0000000A ????????????        <2> liiReserved:		resw 3
   151 00000010 ????                <2> liiEntryQuerySize:	resw 1		; 0 if not supported
   152                              <2> 		; INP:	cs => NLDR image ident
   153                              <2> 		;	ip = this word field content
   154                              <2> 		;	ax = 60h
   155                              <2> 		; OUT:	ax => behind memory requested (should be >= 60h)
   156                              <2> 		; CHG:	es, ds, di, si, bx, cx, dx
   157                              <2> 		; STT:	far called, UP, EI
   158 00000012 ????                <2> liiEntryRelocate:	resw 1		; 0 if not supported
   159                              <2> 		; INP:	cs => NLDR image ident
   160                              <2> 		;	ip = this word field content
   161                              <2> 		;	ax = 60h
   162                              <2> 		; OUT:	ax => relocated NLDR segment (usually 60h)
   163                              <2> 		; CHG:	es, ds, di, si, bx, cx, dx
   164                              <2> 		; STT:	far called, UP, EI
   165 00000014 ????                <2> liiEntryDebug:		resw 1		; 0 if not supported
   166                              <2> 		; INP:	es = ds = cs = ss => relocated NLDR
   167                              <2> 		;	ip = this word field content
   168                              <2> 		;	sp = next word field content
   169                              <2> 		; STT:	running as debuggee, UP, EI
   170 00000016 ????                <2> liiStackPointer:	resw 1
   171                              <2> 	endstruc
   172                              <2> 
   173                              <2> 	struc LBAPACKET
   174 00000000 ????                <2> lpSize:		resw 1
   175 00000002 ????                <2> lpCount:	resw 1
   176 00000004 ????????            <2> lpBuffer:	resd 1
   177 00000008 ????????????????    <2> lpSector:	resq 1
   178                              <2> 	endstruc
   179                              <2> 
   180                              <2> 	struc PARTINFO
   181 00000000 ??                  <2> piBoot:		resb 1
   182 00000001 ??????              <2> piStartCHS:	resb 3
   183 00000004 ??                  <2> piType:		resb 1
   184 00000005 ??????              <2> piEndCHS:	resb 3
   185 00000008 ????????            <2> piStart:	resd 1
   186 0000000C ????????            <2> piLength:	resd 1
   187                              <2> 	endstruc
   188                              <2> 
   189                              <2> ptEmpty:		equ 0
   190                              <2> ptFAT12:		equ 1
   191                              <2> ptFAT16_16BIT_CHS:	equ 4
   192                              <2> ptExtendedCHS:		equ 5
   193                              <2> ptFAT16_CHS:		equ 6
   194                              <2> ptFAT32_CHS:		equ 0Bh
   195                              <2> ptFAT32:		equ 0Ch
   196                              <2> ptFAT16:		equ 0Eh
   197                              <2> ptExtended:		equ 0Fh
   198                              <2> ptLinux:		equ 83h
   199                              <2> ptExtendedLinux:	equ 85h
   200                              <2> 
   201                              <2> 
   202                              <2> 		; Flags of load_unit_flags
   203                              <2> lufForceCHS:		equ 1
   204                              <2> lufForceLBA:		equ 2
   205                              <2> lufForceGeometry:	equ 4
   206                              <2> luf_mask_writable equ lufForceCHS | lufForceLBA | lufForceGeometry
   802                              <1> 
   803                              <1> LOAD_INPUT_FILE_SIZE equ fromparas(paras(-LOADDATA3 + bsBPB + ebpbNew + BPBN_size))
   804                              <1> 
   805                              <1> 	struc LOADSETTINGS
   806 00000000 ????                <1> lsKernelName:	resw 1	; -> kernel file default name
   807 00000002 ????                <1> lsAddName:	resw 1	; -> additional file default name, may be empty string
   808 00000004 ????                <1> lsMinPara:	resw 1	; how much to load at least, fail if file smaller
   809 00000006 ????                <1> lsMaxPara:	resw 1	; how much to load at most (will round up to sector size)
   810 00000008 ????                <1> lsOptions:	resw 1	; option flags
   811 0000000A ????                <1> lsSegment:	resw 1	; => where to load file
   812 0000000C ????????            <1> lsEntry:	resd 1	; relative segment for CS, value for IP
   813 00000010 ????????            <1> lsBPB:		resd 1	; segment for BPB (-1 auto-BPB), offset for BPB
   814 00000014 ????                <1> lsCheckOffset:	resw 1	; offset in file segment of word to check
   815 00000016 ????                <1> lsCheckValue:	resw 1	; value to check for word, 0 if unused
   816 00000018 ????????????????    <1> lsName:		resq 1	; ASCIZ load protocol name
   817                              <1> 	endstruc
   818                              <1> 
   819                              <1> 		numdef LUF_DEFAULT_DISKETTE, 0
   820                              <1> 		numdef LUF_DEFAULT_HARDDISK, 0
   821                              <1> %endif
   822                              <1> 
   823                              <1> 
   824                              <1> %include "mzheader.mac"
     1                              <2> 
     2                              <2> %if 0
     3                              <2> 
     4                              <2> lDebug MZ .EXE header macros
     5                              <2> 
     6                              <2> Copyright (C) 1995-2003 Paul Vojta
     7                              <2> Copyright (C) 2008-2023 E. C. Masloch
     8                              <2> 
     9                              <2> Usage of the works is permitted provided that this
    10                              <2> instrument is retained with the works, so that any entity
    11                              <2> that uses the works is notified of this instrument.
    12                              <2> 
    13                              <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    14                              <2> 
    15                              <2> %endif
    16                              <2> 
    17                              <2> 
    18                              <2> 	struc EXEHEADER
    19 00000000 ????                <2> exact_struc_at 00h, exeSignature:	resw 1
    20 00000002 ????                <2> exact_struc_at 02h, exeExtraBytes:	resw 1	; bytes in last page
    21 00000004 ????                <2> exact_struc_at 04h, exePages:		resw 1	; number of 512-byte pages. includes the header!
    22 00000006 ????                <2> exact_struc_at 06h, exeRelocItems:	resw 1	; number of relocation items
    23 00000008 ????                <2> exact_struc_at 08h, exeHeaderSize:	resw 1	; header size in 16-byte paragraphs
    24 0000000A ????                <2> exact_struc_at 0Ah, exeMinAlloc:	resw 1	; minimum (bss) allocation in paragraphs
    25 0000000C ????                <2> exact_struc_at 0Ch, exeMaxAlloc:	resw 1	; maximum (bss) allocation in paragraphs
    26 0000000E ????                <2> exact_struc_at 0Eh, exeInitSS:		resw 1	; init ss (is relocated)
    27 00000010 ????                <2> exact_struc_at 10h, exeInitSP:		resw 1	; init sp
    28 00000012 ????                <2> exact_struc_at 12h, exeChecksum:	resw 1
    29                              <2> exact_struc_at 14h, exeInitCSIP:
    30 00000014 ????                <2> exact_struc_at 14h, exeInitIP:		resw 1	; init ip
    31 00000016 ????                <2> exact_struc_at 16h, exeInitCS:		resw 1	; init cs (is relocated)
    32 00000018 ????                <2> exact_struc_at 18h, exeRelocTable:	resw 1	; byte offset of relocation table
    33                              <2> 		; Each relocation item is a word offset and a word segment.
    34                              <2> 		;  The segment of the item itself is relocated as well.
    35 0000001A ????                <2> exact_struc_at 1Ah, exeOverlayNum:	resw 1
    36                              <2> exact_struc_at 1Ch
    37                              <2> 	endstruc
   825                              <1> 
   826                              <1> 
   827                              <1> 	struc INPUTFILEHANDLE
   828 00000000 ????                <1> ifhHandle:	resw 1
   829 00000002 ????                <1> ifhFlags:	resw 1
   830 00000004 ????????            <1> ifhParentSeek:	resd 1
   831                              <1> 	endstruc
   832                              <1> 
   833                              <1> ifhfIsDup:		equ  100h	; before closing, seek it back
   834                              <1> 	; same value as LBA flag for boot load input files
   835                              <1> ifhfTestReserved1:	equ 1000h
   836                              <1> ifhfTestReserved2:	equ 2000h
   837                              <1> ifhfQuietInput:		equ 4000h	; do not display prompt and input
   838                              <1> ifhfQuietOutput:	equ 8000h	; do not display normal output
   839                              <1> 	; these four are valid for both input file handles and
   840                              <1> 	;  boot load input files.
   841                              <1> 
   842                              <1> 
   843                              <1> 	struc AREASTRUC
   844 00000000 <res 18h>           <1> areastrucEntry:		resb 24
   845 00000018 ????????            <1> areastrucNext:		resd 1
   846 0000001C ????????            <1> areastrucPrev:		resd 1
   847 00000020 ????                <1> areastrucSubAmount:	resw 1
   848 00000022 ????                <1> areastrucSubOffset:	resw 1
   849 00000024 ????                <1> areastrucFunAmount:	resw 1
   850 00000026 ????                <1> areastrucFunOffset:	resw 1
   851                              <1> 	endstruc
   852                              <1> 
   853                              <1> 	struc AREASTRUCSUB
   854 00000000 ????????            <1> areastrucsubLinear:	resd 1
   855 00000004 ????????            <1> areastrucsubLinearEnd:	resd 1
   856 00000008 ????                <1> areastrucsubListOffset:	resw 1
   857 0000000A ????                <1> areastrucsubListAmount:	resw 1
   858                              <1> 	endstruc
   859                              <1> 
   860                              <1> 	struc AREASTRUCFUN
   861 00000000 ????????            <1> areastrucfunLinear:	resd 1
   862 00000004 ????????            <1> areastrucfunLinearEnd:	resd 1
   863 00000008 ????                <1> areastrucfunListOffset:	resw 1
   864 0000000A ????                <1> areastrucfunListAmount:	resw 1
   865                              <1> 	endstruc
   866                              <1> 
   867                              <1> 	struc AREA
   868 00000000 ????                <1> areastart:		resw 1
   869 00000002 ????                <1> areaend:		resw 1
   870 00000004 ????                <1> areamessage:		resw 1
   871 00000006 ????                <1> 			resw 1
   872                              <1> 	endstruc
   873                              <1> 
   874                              <1> 
   875                              <1> %include "isvariab.mac"
     1                              <2> 
     2                              <2> %if 0
     3                              <2> 
     4                              <2> lDebug isvariable? function strutures and macros
     5                              <2> 
     6                              <2> Copyright (C) 2008-2025 E. C. Masloch
     7                              <2> 
     8                              <2> Usage of the works is permitted provided that this
     9                              <2> instrument is retained with the works, so that any entity
    10                              <2> that uses the works is notified of this instrument.
    11                              <2> 
    12                              <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    13                              <2> 
    14                              <2> %endif
    15                              <2> 
    16                              <2> 
    17                              <2> 	struc ISVARIABLESTRUC
    18 00000000 ????                <2> ivName:		resw 1		; -> name (up to 13 bytes, but actually only 11)
    19                              <2> 				;  (search for ivfNameLengthLimit for limit)
    20                              <2> 				;  (length given by ivFlags & ivfNameLengthMask)
    21                              <2> 	; The ivName pointer is only used for more-byte names. It actually
    22                              <2> 	;  contains the trailer of the name, excluding the prefix formed by
    23                              <2> 	;  the first two bytes. This suffix can be the empty string if the
    24                              <2> 	;  variable in question has a two-byte name.
    25                              <2> 	; (For one-byte names this field is unused and contains zero.)
    26 00000002 ????                <2> ivFlags:	resw 1
    27 00000004 ????                <2> ivAddress:	resw 1		; default -> variable
    28                              <2> 	; The ivAddress field is used by default_variable_setup as the base
    29                              <2> 	;  address for the variable(s). It is also used by var_ext_setup as
    30                              <2> 	;  the ELD code section offset to transfer control to. Otherwise, it
    31                              <2> 	;  is usually set to zero and unused.
    32 00000006 ????                <2> ivSetup:	resw 1		; -> set up code (in expr code section)
    33                              <2> 	; INP:	ax = array index (0-based)
    34                              <2> 	;	di = 0
    35                              <2> 	;	cl = default size of variable (1..4)
    36                              <2> 	;	ch = length of variable name
    37                              <2> 	;	bx -> ISVARIABLESTRUC structure
    38                              <2> 	; CHG:	ax, bx, cx, dx, si, di
    39                              <2> 	; OUT:	NC if valid,
    40                              <2> 	;	 bx -> var, di = 0 or di -> mask
    41                              <2> 	;	 cl = size of variable (1..4)
    42                              <2> 	;	 ch = length of variable name
    43 00000008 ??                  <2> ivArrayLast:	resb 1		; 0 if no array, FFh = 256 entries
    44                              <2> 	; The ivArrayLast field is used by the dispatcher to determine
    45                              <2> 	;  whether to support array index expressions. It is checked
    46                              <2> 	;  before decrementing the index if ivfArrayOneBased is set.
    47 00000009 ??                  <2> ivArrayBetween: resb 1		; how many bytes to skip for each index
    48                              <2> 	; The ivArrayBetween field is only used by default_variable_setup.
    49                              <2> 	endstruc
    50                              <2> 
    51                              <2> ivfNameLengthMask:	equ 15	; gives name trailer length, 0 to 11
    52                              <2> ivfNameLengthLimit:	equ 13
    53                              <2> ivfVarLengthShift:	equ 4
    54                              <2> ivfVarLengthMask:	equ 3 << ivfVarLengthShift
    55                              <2> 				; gives default variable size minus 1
    56                              <2> ivfReadOnly:		equ 80h	; variable cannot be written at all
    57                              <2> ivfArrayOneBased:	equ 100h; first array entry is 1 not 0 (ivArrayLast > 0)
    58                              <2> ivfArrayOptional:	equ 200h; array index expression is optional
    59                              <2> ivfSeparatorSpecial:	equ 400h; used for RIxxP/L/S/O
    60                              <2> 
    61                              <2> %define ISVARIABLESTRINGS db "",db ""
    62                              <2> %define IVS_ONEBYTE_NAMES ""
    63                              <2> %define IVS_MOREBYTE_NAMEHEADERS ""
    64                              <2> %assign IVS_HAVE_ONEBYTE 0
    65                              <2> %assign IVS_SINGLE_ONEBYTE 1
    66                              <2> 
    67                              <2> 		; %1 = name string
    68                              <2> 		; %2 = default variable length, 1 to 4
    69                              <2> 		; %3 = flags to set (except name length and var length)
    70                              <2> 		; %4 = ivAddress value
    71                              <2> 		; %5 = ivArrayLast, defaults to 0 (no array)
    72                              <2> 		; %6 = ivArrayBetween, defaults to 0 (immediately consecutive)
    73                              <2> 		; %7 = ivSetup, defaults to default_variable_setup
    74                              <2> 	%macro isvariablestruc 4-7.nolist 0, 0, default_variable_setup
    75                              <2> %push
    76                              <2> %strlen %$namelength %1
    77                              <2> %if %$namelength > ivfNameLengthLimit
    78                              <2>  %error Expected at most 13-byte name (or adjust isvariable? code)
    79                              <2> %endif
    80                              <2> %if IVS_ONEBYTE && %$namelength != 1
    81                              <2>  %error Expected a one-byte name
    82                              <2> %elif ! IVS_ONEBYTE && %$namelength < 2
    83                              <2>  %error Expected at least a two-byte name
    84                              <2> %endif
    85                              <2> %if IVS_ONEBYTE
    86                              <2>  %define IVS_SINGLE_ONEBYTE_NAME %1
    87                              <2>  %if IVS_HAVE_ONEBYTE
    88                              <2>   %assign IVS_SINGLE_ONEBYTE 0
    89                              <2>  %endif
    90                              <2>  %assign IVS_HAVE_ONEBYTE 1
    91                              <2>  %assign %$namelength 0
    92                              <2>  %xdefine IVS_ONEBYTE_NAMES IVS_ONEBYTE_NAMES, %1
    93                              <2>  %%name equ 0
    94                              <2> %else
    95                              <2>  %assign %$namelength %$namelength - 2
    96                              <2>  %substr %$nametrailer %1 3,-1
    97                              <2>  %substr %$nameheader %1 1,2
    98                              <2>  %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, %$nameheader
    99                              <2>  %xdefine ISVARIABLESTRINGS ISVARIABLESTRINGS, %%name:, {db %$nametrailer}
   100                              <2> %endif
   101                              <2> 
   102                              <2> %assign %$varlength %2 - 1	; 0 means one byte, 1 means two bytes,
   103                              <2> 				;  2 means three bytes, 3 means four bytes
   104                              <2> 	istruc ISVARIABLESTRUC
   105                              <2> at ivName,		dw %%name
   106                              <2>  IV_NAME_RELOCATION
   107                              <2> at ivFlags,		dw %$$namelength | (%$$varlength << ivfVarLengthShift) | %3
   108                              <2> at ivAddress,		dw %4
   109                              <2>  IV_ADDRESS_RELOCATION
   110                              <2> at ivSetup,		dw %7
   111                              <2>  IV_SETUP_RELOCATION
   112                              <2> at ivArrayLast,		db %5
   113                              <2> at ivArrayBetween,	db %6
   114                              <2> 	iend
   115                              <2> %pop
   116                              <2> %ifndef SECTION_OF_%7
   117                              <2>  %error Unknown target section for symbol %7
   118                              <2> %elifnidni %[SECTION_OF_%7], _EXPR_SECTION
   119                              <2>  %error Wrong section for symbol %7: section_of=SECTION_OF_%7, expr=_EXPR_SECTION
   120                              <2> %endif
   121                              <2> 	%endmacro
   122                              <2> 
   123                              <2> %define IV_NAME_RELOCATION
   124                              <2> %define IV_ADDRESS_RELOCATION
   125                              <2> %define IV_SETUP_RELOCATION
   126                              <2> 
   127                              <2> 	%macro isvariablestrings 2-*.nolist
   128                              <2> %rep %0
   129                              <2>  %1
   130                              <2>  %rotate 1
   131                              <2> %endrep
   132                              <2> 	%endmacro
   876                              <1> 
   877                              <1> 
   878                              <1> %include "386.mac"
     1                              <2> 
     2                              <2> %if 0
     3                              <2> 
     4                              <2> lDebug 386 patch macros
     5                              <2> 
     6                              <2> Copyright (C) 2008-2026 E. C. Masloch
     7                              <2> 
     8                              <2> Usage of the works is permitted provided that this
     9                              <2> instrument is retained with the works, so that any entity
    10                              <2> that uses the works is notified of this instrument.
    11                              <2> 
    12                              <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    13                              <2> 
    14                              <2> %endif
    15                              <2> 
    16                              <2> 	numdef LINK, 0
    17                              <2> 
    18                              <2> 	numdef WPT_LABELS, 0
    19                              <2> 		; This used to be required, because CODESECTIONFIXUP used
    20                              <2> 		;  ldebug_data_entry_size, which is not yet defined during
    21                              <2> 		;  assembling of (most) lDEBUG_CODE fragments.
    22                              <2> 		; However, assembling DebugX with this option selected
    23                              <2> 		;  took more than 2 minutes, so the non-label variant
    24                              <2> 		;  is clearly to be preferred when available.
    25                              <2> 		; Now that lDEBUG_CODE has vstart=0 we can use the
    26                              <2> 		;  CODESECTIONFIXUP again and thus disable this option.
    27                              <2> 
    28                              <2> %ifn _LINK
    29                              <2> %define PATCH_NO386_TABLE ""
    30                              <2> %define PATCH_386_TABLE ""
    31                              <2> %define PATCH_NO386_TABLE2 ""
    32                              <2> %define PATCH_386_TABLE2 ""
    33                              <2> %define PATCH_NO386_TABLEENTRY ""
    34                              <2> %define PATCH_386_TABLEENTRY ""
    35                              <2> %endif
    36                              <2> 
    37                              <2> %if _ONLY386
    38                              <2> 		; Default patch macros if only running on 386+.
    39                              <2> %define _386_o32 o32
    40                              <2> %define _386_a32 a32
    41                              <2> %define _386_jmps jmp short
    42                              <2> %define _386_jmpn jmp near
    43                              <2> %define _no386_jmps comment
    44                              <2> %define _no386_jmpn comment
    45                              <2> 	%macro _386 0-1+.nolist
    46                              <2> [cpu 386]			; change CPU type
    47                              <2> 		%1		; write instruction
    48                              <2> __CPU__				; reset CPU type
    49                              <2> 	%endmacro
    50                              <2> %define _no386 comment
    51                              <2> %elif _ONLYNON386
    52                              <2> 		; Default patch macros if only running on non-386.
    53                              <2> %define _386_o32
    54                              <2> %define _386_a32
    55                              <2> %define _386_jmps comment
    56                              <2> %define _386_jmpn comment
    57                              <2> %define _no386_jmps jmp short
    58                              <2> %define _no386_jmpn jmp near
    59                              <2> %define _386 comment
    60                              <2> %define _no386
    61                              <2> %else
    62                              <2> 
    63                              <2> ; These macros are to make DEBUG's 386 support as small as
    64                              <2> ; possible. To achieve this, two patch tables are created
    65                              <2> ; in the initialisation code. One of the tables is used if
    66                              <2> ; the CPU is a 386+, the other one if it isn't. The bytes
    67                              <2> ; pointed to in the used table are over-written with NOP
    68                              <2> ; instructions. (The patched bytes are usually address or
    69                              <2> ; operand size prefixes or jumps that branch to 386/non-386
    70                              <2> ; code.)
    71                              <2> 
    72                              <2> ; There are a few special patches that require the
    73                              <2> ; initialisation code to write specific bytes other than
    74                              <2> ; NOP instructions for lower resident memory usage.
    75                              <2> ; Two are in the run: code, three in pmentry.asm.
    76                              <2> 
    77                              <2> %if _LINK
    78                              <2> 
    79                              <2> %imacro wllist 1-3.nolist
    80                              <2> %ifnempty %3
    81                              <2>  %deftok %%filenametoken %3
    82                              <2> %else
    83                              <2>  %deftok %%filenametoken __FILE__
    84                              <2> %endif
    85                              <2>  global ..@wllist_%1?%[%%l]%[%%filenametoken]
    86                              <2> ..@wllist_%1?%[%%l]%[%%filenametoken]: %2
    87                              <2> %endmacro
    88                              <2> 
    89                              <2> 	%macro patch386 2-3.nolist 1
    90                              <2> %define %%repeat
    91                              <2> %if %3 != 1
    92                              <2>  %define %%repeat r%3_
    93                              <2> %endif
    94                              <2> %ifidn _CURRENT_SECTION, lDEBUG_CODE
    95                              <2>  wllist %[%%repeat]Lpatch_%{1}386_table, %2
    96                              <2> %elifidn _CURRENT_SECTION, lDEBUG_CODE2
    97                              <2>  wllist %[%%repeat]Lpatch_%{1}386_table2, %2
    98                              <2> %elifidn _CURRENT_SECTION, lDEBUG_DATA_ENTRY
    99                              <2>  wllist %[%%repeat]Lpatch_%{1}386_tableentry, %2
   100                              <2> %else
   101                              <2>  %error Wrong section
   102                              <2> %endif
   103                              <2> 	%endmacro
   104                              <2> 
   105                              <2> 		; Operand size 32-bit prefix if 386+ CPU
   106                              <2> 	%macro _386_o32 0-1+.nolist
   107                              <2> _386		o32
   108                              <2> 		%1
   109                              <2> 	%endmacro
   110                              <2> 
   111                              <2> 		; Address size 32-bit prefix if 386+ CPU
   112                              <2> 	%macro _386_a32 0-1+.nolist
   113                              <2> _386		a32
   114                              <2> 		%1
   115                              <2> 	%endmacro
   116                              <2> 
   117                              <2> 		; Short jump if 386+ CPU
   118                              <2> 	%macro _386_jmps 1.nolist
   119                              <2> _386		jmp short %1
   120                              <2> 	%endmacro
   121                              <2> 
   122                              <2> 		; Near jump if 386+ CPU
   123                              <2> 	%macro _386_jmpn 1.nolist
   124                              <2> _386		jmp near %1
   125                              <2> 	%endmacro
   126                              <2> 
   127                              <2> 		; Short jump if no 386+ CPU
   128                              <2> 	%macro _no386_jmps 1.nolist
   129                              <2> _no386		jmp short %1
   130                              <2> 	%endmacro
   131                              <2> 
   132                              <2> 		; Near jump if no 386+ CPU
   133                              <2> 	%macro _no386_jmpn 1.nolist
   134                              <2> _no386		jmp near %1
   135                              <2> 	%endmacro
   136                              <2> 
   137                              <2> 		; Instruction if 386+ CPU
   138                              <2> 	%macro _386 0-1+.nolist
   139                              <2> [cpu 386]			; change CPU type
   140                              <2> %%entry:
   141                              <2> 		%1		; write instruction
   142                              <2> __CPU__				; reset CPU type
   143                              <2> %assign %%length ($ - %%entry)
   144                              <2>  patch386 no, equ %%entry, %%length
   145                              <2> 	%endmacro
   146                              <2> 
   147                              <2> 		; Instruction if no 386+ CPU
   148                              <2> 	%macro _no386 0-1+.nolist
   149                              <2> %%entry:
   150                              <2> 		%1		; write instruction
   151                              <2> %assign %%length ($ - %%entry)
   152                              <2>  patch386 , equ %%entry, %%length
   153                              <2> 	%endmacro
   154                              <2> 
   155                              <2> %else
   156                              <2> 	%macro patch386 2+.nolist
   157                              <2> %ifidn _CURRENT_SECTION, lDEBUG_CODE
   158                              <2>  %define PATCH_%{1}386_TABLE %[PATCH_%{1}386_TABLE], %2
   159                              <2> %elifidn _CURRENT_SECTION, lDEBUG_CODE2
   160                              <2>  %define PATCH_%{1}386_TABLE2 %[PATCH_%{1}386_TABLE2], %2
   161                              <2> %elifidn _CURRENT_SECTION, lDEBUG_DATA_ENTRY
   162                              <2>  %define PATCH_%{1}386_TABLEENTRY %[PATCH_%{1}386_TABLEENTRY], %2
   163                              <2> %else
   164                              <2>  %error Wrong section
   165                              <2> %endif
   166                              <2> 	%endmacro
   167                              <2> 
   168                              <2> %if _WPT_LABELS
   169                              <2> 	; These forms provide verbose info by defining a
   170                              <2> 	; meaningful label for each patch. That fills up
   171                              <2> 	; the map file and might take longer though.
   172                              <2> 		; Operand size 32-bit prefix if 386+ CPU
   173                              <2> 	%macro _386_o32 0-1+.nolist
   174                              <2> %%386_o32:	o32
   175                              <2> patch386 NO, %%386_o32
   176                              <2> 		%1
   177                              <2> 	%endmacro
   178                              <2> 
   179                              <2> 		; Address size 32-bit prefix if 386+ CPU
   180                              <2> 	%macro _386_a32 0-1+.nolist
   181                              <2> %%386_a32:	a32
   182                              <2> patch386 NO, %%386_a32
   183                              <2> 		%1
   184                              <2> 	%endmacro
   185                              <2> 
   186                              <2> 		; Short jump if 386+ CPU
   187                              <2> 	%macro _386_jmps 1.nolist
   188                              <2> %%386_jmps:	jmp short %1
   189                              <2> patch386 NO, %%386_jmps,%%386_jmps+1
   190                              <2> 	%endmacro
   191                              <2> 
   192                              <2> 		; Near jump if 386+ CPU
   193                              <2> 	%macro _386_jmpn 1.nolist
   194                              <2> %%386_jmpn:	jmp near %1
   195                              <2> patch386 NO, %%386_jmpn,%%386_jmpn+1,%%386_jmpn+2
   196                              <2> 	%endmacro
   197                              <2> 
   198                              <2> 		; Short jump if no 386+ CPU
   199                              <2> 	%macro _no386_jmps 1.nolist
   200                              <2> %%no386_jmps:	jmp short %1
   201                              <2> patch386 , %%no386_jmps,%%no386_jmps+1
   202                              <2> 	%endmacro
   203                              <2> 
   204                              <2> 		; Near jump if no 386+ CPU
   205                              <2> 	%macro _no386_jmpn 1.nolist
   206                              <2> %%no386_jmpn:	jmp near %1
   207                              <2> patch386 , %%no386_jmpn,%%no386_jmpn+1,%%no386_jmpn+2
   208                              <2> 	%endmacro
   209                              <2> 
   210                              <2> 		; Instruction if 386+ CPU
   211                              <2> 	%macro _386 0-1+.nolist
   212                              <2> [cpu 386]			; change CPU type
   213                              <2> %%386_instr:	%1		; write instruction
   214                              <2> __CPU__				; reset CPU type
   215                              <2> 
   216                              <2> %assign %%INSTRCOUNT 0
   217                              <2> %rep $-%%386_instr		; count size of instruction
   218                              <2>  patch386 NO, %%386_instr+%[%%INSTRCOUNT]
   219                              <2> 				; write a patch for each byte
   220                              <2>  %assign %%INSTRCOUNT %%INSTRCOUNT+1
   221                              <2> %endrep
   222                              <2> %undef %%INSTRCOUNT
   223                              <2> 	%endmacro
   224                              <2> 
   225                              <2> 		; Instruction if no 386+ CPU
   226                              <2> 	%macro _no386 0-1+.nolist
   227                              <2> %%no386_instr:	%1		; write instruction
   228                              <2> 
   229                              <2> %assign %%INSTRCOUNT 0
   230                              <2> %rep $-%%no386_instr		; count size of instruction
   231                              <2>  patch386 , %%no386_instr+%[%%INSTRCOUNT]
   232                              <2> 				; write a patch for each byte
   233                              <2>  %assign %%INSTRCOUNT %%INSTRCOUNT+1
   234                              <2> %endrep
   235                              <2> %undef %%INSTRCOUNT
   236                              <2> 	%endmacro
   237                              <2> %else	; _WPT_LABELS
   238                              <2> 		; Operand size 32-bit prefix if 386+ CPU
   239                              <2> 	%macro _386_o32 0-1+.nolist
   240                              <2> _386		o32
   241                              <2> 		%1
   242                              <2> 	%endmacro
   243                              <2> 
   244                              <2> 		; Address size 32-bit prefix if 386+ CPU
   245                              <2> 	%macro _386_a32 0-1+.nolist
   246                              <2> _386		a32
   247                              <2> 		%1
   248                              <2> 	%endmacro
   249                              <2> 
   250                              <2> 		; Short jump if 386+ CPU
   251                              <2> 	%macro _386_jmps 1.nolist
   252                              <2> _386		jmp short %1
   253                              <2> 	%endmacro
   254                              <2> 
   255                              <2> 		; Near jump if 386+ CPU
   256                              <2> 	%macro _386_jmpn 1.nolist
   257                              <2> _386		jmp near %1
   258                              <2> 	%endmacro
   259                              <2> 
   260                              <2> 		; Short jump if no 386+ CPU
   261                              <2> 	%macro _no386_jmps 1.nolist
   262                              <2> _no386		jmp short %1
   263                              <2> 	%endmacro
   264                              <2> 
   265                              <2> 		; Near jump if no 386+ CPU
   266                              <2> 	%macro _no386_jmpn 1.nolist
   267                              <2> _no386		jmp near %1
   268                              <2> 	%endmacro
   269                              <2> 
   270                              <2> 		; Instruction if 386+ CPU
   271                              <2> 	%macro _386 0-1+.nolist
   272                              <2> %push
   273                              <2> [cpu 386]			; change CPU type
   274                              <2> %assign %$entry $ + _CURRENT_SECTION %+ FIXUP
   275                              <2> 		%1		; write instruction
   276                              <2> __CPU__				; reset CPU type
   277                              <2> 
   278                              <2> %rep ($ + _CURRENT_SECTION %+ FIXUP) - %$entry
   279                              <2> 				; count size of instruction
   280                              <2>  patch386 NO, %[%$entry]	; write a patch for each byte
   281                              <2>  %assign %$entry %$entry+1
   282                              <2> %endrep
   283                              <2> %pop
   284                              <2> 	%endmacro
   285                              <2> 
   286                              <2> 		; Instruction if no 386+ CPU
   287                              <2> 	%macro _no386 0-1+.nolist
   288                              <2> %push
   289                              <2> %assign %$entry $ + _CURRENT_SECTION %+ FIXUP
   290                              <2> 		%1		; write instruction
   291                              <2> 
   292                              <2> %rep ($ + _CURRENT_SECTION %+ FIXUP) - %$entry
   293                              <2> 				; count size of instruction
   294                              <2>  patch386 , %[%$entry]		; write a patch for each byte
   295                              <2>  %assign %$entry %$entry+1
   296                              <2> %endrep
   297                              <2> %pop
   298                              <2> 	%endmacro
   299                              <2> %endif	; _WPT_LABELS
   300                              <2> %endif	; _LINK
   301                              <2> 
   302                              <2> %endif
   303                              <2> 
   304                              <2> 		; Patch macros but for cases where the 386+
   305                              <2> 		; instructions should only be generated for
   306                              <2> 		; DEBUGX (i.e. for 32-bit DPMI addressing code).
   307                              <2> %if _PM
   308                              <2> %define _386_PM_o32	_386_o32
   309                              <2> %define _386_PM_a32	_386_a32
   310                              <2> %define _386_PM_jmps	_386_jmps
   311                              <2> %define _386_PM_jmpn	_386_jmpn
   312                              <2> %define _386_PM		_386
   313                              <2> %else
   314                              <2> %define _386_PM_o32
   315                              <2> %define _386_PM_a32
   316                              <2> %define _386_PM_jmps	comment
   317                              <2> %define _386_PM_jmpn	comment
   318                              <2> %define _386_PM		comment
   319                              <2> %endif
   320                              <2> 
   321                              <2> 
   322                              <2> %ifn _LINK
   323                              <2> %macro __writepatchtable2 0-*.nolist
   324                              <2> %if %0 & 1
   325                              <2>  %fatal Expected even number of arguments
   326                              <2> %endif
   327                              <2> %rep %0 >> 1
   328                              <2> 	%1 %2
   329                              <2> %rotate 2
   330                              <2> %endrep
   331                              <2> %endmacro
   332                              <2> 
   333                              <2> %macro __patchtable2_entry 0.nolist
   334                              <2>   ; only if this isn't the first (pseudo-)entry
   335                              <2>   %if %$lastcount != 0
   336                              <2>     %assign %$runscount %[%$runscount]+1
   337                              <2>    ; if the offset from %$previous is less than 255
   338                              <2>    %if (%$last-%$previous) < 255
   339                              <2>     %assign %$$method2tablesize %$$method2tablesize+1
   340                              <2>     ; then write a single byte (number of bytes not to patch between)
   341                              <2>     %xdefine %$$method2list %$$method2list,db,%$last-%$previous
   342                              <2>    %else
   343                              <2>     ; otherwise write a 255 ("reposition") and write the 16-bit address afterwards
   344                              <2>     %assign %$$method2tablesize %$$method2tablesize+3
   345                              <2>     %xdefine %$$method2list %$$method2list,db,255,dw,%$last
   346                              <2>     %assign %$reposcount %[%$reposcount]+1
   347                              <2>    %endif
   348                              <2>    %if %$lastcount == 1
   349                              <2>     %assign %$onecount %[%$onecount]+1
   350                              <2>    %endif
   351                              <2>    %assign %$$method2tablesize %$$method2tablesize+1
   352                              <2>    ; and write the number of bytes to be patched
   353                              <2>    %xdefine %$$method2list %$$method2list,db,%$lastcount
   354                              <2>    ; define %$previous for the next entry: it points to the next non-patched byte
   355                              <2>    %define %$previous (%[%$last]+%[%$lastcount])
   356                              <2>   %endif
   357                              <2> %endmacro
   358                              <2> 
   359                              <2> %macro writepatchtable 2-*.nolist
   360                              <2> 
   361                              <2> 	numdef %{1}_FORCE_METHOD, 0
   362                              <2> %push
   363                              <2> 		; Determine length of simple table:
   364                              <2> %assign %$method1tablesize (%0 - 2)*2
   365                              <2> 
   366                              <2> %if !_%{1}_FORCE_METHOD || _%{1}_FORCE_METHOD == 2
   367                              <2> 		; Determine length of complicated table:
   368                              <2> %assign %$method2tablesize 0
   369                              <2> %define %$method2list db,""
   370                              <2> %push
   371                              <2> %if _WPT_LABELS
   372                              <2>  %define %$previous code_start	; if list contains labels
   373                              <2> %else
   374                              <2>  %define %$previous 0
   375                              <2> %endif
   376                              <2> %define %$last %[%$previous]
   377                              <2> %assign %$lastcount 0
   378                              <2> %assign %$onecount 0
   379                              <2> %assign %$reposcount 0
   380                              <2> %assign %$bytescount %0 - 2
   381                              <2> %assign %$runscount 0
   382                              <2> %rotate 1
   383                              <2> %rep %0 - 2
   384                              <2>  %rotate 1
   385                              <2>  ;if  it continues the previous patch   and not too long   and this isn't the first
   386                              <2>  %if ((%$last+%$lastcount) == %1) && (%$lastcount < 255) && (%$lastcount != 0)
   387                              <2>   ; then do not write an entry, just increase the patch's size
   388                              <2>   %assign %$lastcount %[%$lastcount]+1
   389                              <2>  %else
   390                              <2>   ; otherwise write the last entry
   391                              <2>   __patchtable2_entry
   392                              <2>   ; define new %$last to this parameter, %$lastcount to one
   393                              <2>   %define %$last %1
   394                              <2>   %assign %$lastcount 1
   395                              <2>  %endif
   396                              <2> %endrep
   397                              <2> __patchtable2_entry
   398                              <2> 
   399                              <2> ; at the end, there's a patch with offset 0, size 0
   400                              <2> %assign %$$method2tablesize %$$method2tablesize+2
   401                              <2> %xdefine %$$method2list %$$method2list,db,0,db,0
   402                              <2> 
   403                              <2> %assign %$$onecount %$onecount
   404                              <2> %assign %$$reposcount %$reposcount
   405                              <2> %assign %$$bytescount %$bytescount
   406                              <2> %assign %$$runscount %$runscount
   407                              <2> %pop
   408                              <2> %rotate 1
   409                              <2> %endif
   410                              <2> 
   411                              <2> %if _%{1}_FORCE_METHOD == 2
   412                              <2>  %define __%{1}_method 2
   413                              <2> %elif _%{1}_FORCE_METHOD == 1
   414                              <2>  %define __%{1}_method 1
   415                              <2> %else
   416                              <2>  %if _%{1}_FORCE_METHOD
   417                              <2>   %fatal Invalid forced method selected: _%{1}_FORCE_METHOD
   418                              <2>  %endif
   419                              <2>  %if %$method1tablesize > (%$method2tablesize+20)
   420                              <2>   %define __%{1}_method 2
   421                              <2>  %else
   422                              <2>   %define __%{1}_method 1
   423                              <2>  %endif
   424                              <2> %endif
   425                              <2> 
   426                              <2> 
   427                              <2> %1:
   428                              <2> %if __%{1}_method == 2
   429                              <2> 	__writepatchtable2 %$method2list
   430                              <2> 	endarea %1
   431                              <2> %assign %$size %1_size
   432                              <2> %warning %1: %$size bytes (Method 2)
   433                              <2> %warning 1B=%$onecount repo=%$reposcount run=%$runscount byte=%$bytescount
   434                              <2> %else
   435                              <2> %rotate 1
   436                              <2> %rep %0 - 2
   437                              <2> %rotate 1
   438                              <2> 	dw %1
   439                              <2> %endrep
   440                              <2> %rotate 1
   441                              <2> 	endarea %1
   442                              <2> %assign %$size %1_size
   443                              <2> %warning %1: %$size bytes (Method 1)
   444                              <2> %1.amount equ %1_size_w
   445                              <2> %endif
   446                              <2> %pop
   447                              <2> %endmacro
   448                              <2> %endif
   879                              <1> 
   880                              <1> 
   881                              <1> %if _VDD
   882                              <1> ; standard BOPs for communication with DEBXXVDD on NT platforms
   883                              <1> %macro RegisterModule 0.nolist
   884                              <1> 	db 0C4h, 0C4h, 58h, 0
   885                              <1> 	nop
   886                              <1> %endmacro
   887                              <1> %macro UnRegisterModule 0.nolist
   888                              <1> 	db 0C4h, 0C4h, 58h, 1
   889                              <1> 	nop
   890                              <1> %endmacro
   891                              <1> %macro DispatchCall 0.nolist
   892                              <1> 	db 0C4h, 0C4h, 58h, 2
   893                              <1> 	nop
   894                              <1> %endmacro
   895                              <1> %endif
   896                              <1> 
   897                              <1> %assign CODE_INSURE_COUNT 0
   898                              <1> 
   899                              <1> 		; The entry_to_code_seg/_sel dispatcher in lDEBUG_DATA_ENTRY
   900                              <1> 		;  detects mistaken debugger breakpoints in its
   901                              <1> 		;  in-code-parameter by checking for a low-byte
   902                              <1> 		;  value equal to 0CCh (one-byte int3 opcode).
   903                              <1> 		; Therefore, we insure that all destinations jumped to
   904                              <1> 		;  via that dispatcher do not happen to be located
   905                              <1> 		;  on an offset that gives 0CCh in the low byte.
   906                              <1> 	%imacro code_insure_low_byte_not_0CCh 0.nolist
   907                              <1> %ifn _LINK
   908                              <1>  %if (($ - _CURRENT_SECTION %+ _start) & 0FFh) == 0CCh
   909                              <1> 	nop
   910                              <1>   %assign CODE_INSURE_COUNT 1 + CODE_INSURE_COUNT
   911                              <1>  %endif
   912                              <1> %endif
   913                              <1> 	%endmacro
   914                              <1> 
   915                              <1> 
   916                              <1> 		; dual code segments
   917                              <1> %if _DUALCODE && _PM
   918                              <1> 
   919                              <1> %if _DEBUG
   920                              <1> %idefine dualfunction comment
   921                              <1> %else
   922                              <1> %idefine dualfunction code_insure_low_byte_not_0CCh
   923                              <1> %endif
   924                              <1> 
   925                              <1> %idefine dualreturn call _CURRENT_SECTION %+ _dualret_helper
   926                              <1> %idefine dualdistance far
   927                              <1> 	%imacro dualcall 1.nolist
   928                              <1> %ifndef SECTION_OF_%1
   929                              <1>  %error Unknown target section for symbol %1
   930                              <1> %endif
   931                              <1> 	call _CURRENT_SECTION %+ _to_ %+ %[SECTION_OF_%1] %+ _dualcall_helper
   932                              <1>  %if _DEBUG
   933                              <1> 	jmp strict short %%skipdata
   934                              <1>  %endif
   935                              <1> 	dw %1
   936                              <1> %%skipdata:
   937                              <1> 	%endmacro
   938                              <1> 	%imacro nearcall 1.nolist
   939                              <1> %ifndef SECTION_OF_%1
   940                              <1>  %error Unknown target section for symbol %1
   941                              <1> %endif
   942                              <1> %ifidni %[SECTION_OF_%1], _CURRENT_SECTION
   943                              <1> 	call %1
   944                              <1> %else
   945                              <1> 	call _CURRENT_SECTION %+ _to_ %+ %[SECTION_OF_%1] %+ _nearcall_helper
   946                              <1>  %if _DEBUG
   947                              <1> 	jmp strict short %%skipdata
   948                              <1>  %endif
   949                              <1> 	dw %1
   950                              <1> %%skipdata:
   951                              <1> %endif
   952                              <1> 	%endmacro
   953                              <1> 
   954                              <1> %elif _DUALCODE && ! _PM
   955                              <1> 
   956                              <1> %idefine dualfunction comment
   957                              <1> %idefine dualreturn
   958                              <1> %idefine dualdistance far
   959                              <1> 
   960                              <1> %ifn _LINK
   961                              <1> %define PATCH_RELOCATE_FROM_lDEBUG_CODE ""
   962                              <1> %define PATCH_RELOCATE_FROM_lDEBUG_CODE2 ""
   963                              <1> 	%imacro dualcall 1.nolist
   964                              <1> %ifndef SECTION_OF_%1
   965                              <1>  %error Unknown target section for symbol %1
   966                              <1> %endif
   967                              <1> %ifidni %[SECTION_OF_%1], _CURRENT_SECTION
   968                              <1> 	push cs
   969                              <1> 	call %1
   970                              <1> %else
   971                              <1> 	call relocatedzero:%1
   972                              <1> %push
   973                              <1> %assign %$entry ($ + _CURRENT_SECTION %+ FIXUP) - 2
   974                              <1> 	relocatelist _CURRENT_SECTION, %$entry
   975                              <1> %pop
   976                              <1> %endif
   977                              <1> 	%endmacro
   978                              <1> 	%imacro relocatelist 2.nolist
   979                              <1>  %define PATCH_RELOCATE_FROM_%1 %[PATCH_RELOCATE_FROM_%1],%2
   980                              <1> 	%endmacro
   981                              <1> %else		; _LINK
   982                              <1> 	%idefine dualcall dualcall_with_filename __FILE__,
   983                              <1> 	%imacro dualcall_with_filename 2.nolist
   984                              <1> %ifndef SECTION_OF_%2
   985                              <1>  %error Unknown target section for symbol %2
   986                              <1> %endif
   987                              <1> %ifidni %[SECTION_OF_%2], _CURRENT_SECTION
   988                              <1> 	push cs
   989                              <1> 	call %2
   990                              <1> %else
   991                              <1> 	call relocatedzero:%2
   992                              <1> %ifidn _CURRENT_SECTION, lDEBUG_CODE
   993                              <1>  wllist Lrelocate_from_code, equ $ - 2, %1
   994                              <1> %elifidn _CURRENT_SECTION, lDEBUG_CODE2
   995                              <1>  wllist Lrelocate_from_code2, equ $ - 2, %1
   996                              <1> %else
   997                              <1>  %error Wrong section
   998                              <1> %endif
   999                              <1> %endif
  1000                              <1> 	%endmacro
  1001                              <1> %endif		; _LINK
  1002                              <1>  %if _DUALCODENEARDUAL
  1003                              <1> 
  1004                              <1> %if _LINK
  1005                              <1> 	%idefine nearcall nearcall_with_filename __FILE__,
  1006                              <1> 	%imacro nearcall_with_filename 2
  1007                              <1> %ifndef SECTION_OF_%2
  1008                              <1>  %error Unknown target section for symbol %2
  1009                              <1> %endif
  1010                              <1> %ifidni %[SECTION_OF_%2], _CURRENT_SECTION
  1011                              <1> 	call %2
  1012                              <1> %else
  1013                              <1>  %push
  1014                              <1>  %xdefine %$originalsection _CURRENT_SECTION
  1015                              <1>  %xdefine %$targetsection SECTION_OF_%2
  1016                              <1>  %deftok %%filenametoken SOURCEFILENAME
  1017                              <1>   %ifndef NEARCALL_THUNK_TO_%2%[%%filenametoken]
  1018                              <1> 	hiddenusesection %$targetsection
  1019                              <1> %define NEARCALL_THUNK_TO_%2%[%%filenametoken] %%nearcall_thunk_to_%2%[%%filenametoken]
  1020                              <1> section_of %%nearcall_thunk_to_%2%[%%filenametoken]
  1021                              <1> dualfunction
  1022                              <1> %%nearcall_thunk_to_%2%[%%filenametoken]:
  1023                              <1> 	call %2
  1024                              <1> 	dualreturn
  1025                              <1> 	retf
  1026                              <1> 
  1027                              <1> 	hiddenusesection %$originalsection
  1028                              <1>   %endif
  1029                              <1>  %pop
  1030                              <1> 	dualcall_with_filename %1, NEARCALL_THUNK_TO_%2%[%%filenametoken]
  1031                              <1> %endif
  1032                              <1> 	%endmacro
  1033                              <1> %elif _LINK_COMPAT	; _LINK
  1034                              <1> 	%imacro nearcall 1
  1035                              <1> %ifndef SECTION_OF_%1
  1036                              <1>  %error Unknown target section for symbol %1
  1037                              <1> %endif
  1038                              <1> %ifidni %[SECTION_OF_%1], _CURRENT_SECTION
  1039                              <1> 	call %1
  1040                              <1> %else
  1041                              <1>  %push
  1042                              <1>  %xdefine %$originalsection _CURRENT_SECTION
  1043                              <1>  %xdefine %$targetsection SECTION_OF_%1
  1044                              <1>  %deftok %%filenametoken SOURCEFILENAME
  1045                              <1>   %ifndef NEARCALL_THUNK_TO_%1%[%%filenametoken]
  1046                              <1> 	hiddenusesection %$targetsection
  1047                              <1> %define NEARCALL_THUNK_TO_%1%[%%filenametoken] %%nearcall_thunk_to_%1%[%%filenametoken]
  1048                              <1> section_of %%nearcall_thunk_to_%1%[%%filenametoken]
  1049                              <1> dualfunction
  1050                              <1> %%nearcall_thunk_to_%1%[%%filenametoken]:
  1051                              <1> 	call %1
  1052                              <1> 	dualreturn
  1053                              <1> 	retf
  1054                              <1> 
  1055                              <1> 	hiddenusesection %$originalsection
  1056                              <1>   %endif
  1057                              <1>  %pop
  1058                              <1> 	dualcall NEARCALL_THUNK_TO_%1%[%%filenametoken]
  1059                              <1> %endif
  1060                              <1> 	%endmacro
  1061                              <1> %else		; _LINK, _LINK_COMPAT
  1062                              <1> 	%imacro nearcall 1
  1063                              <1> %ifndef SECTION_OF_%1
  1064                              <1>  %error Unknown target section for symbol %1
  1065                              <1> %endif
  1066                              <1> %ifidni %[SECTION_OF_%1], _CURRENT_SECTION
  1067                              <1> 	call %1
  1068                              <1> %else
  1069                              <1>  %push
  1070                              <1>  %xdefine %$originalsection _CURRENT_SECTION
  1071                              <1>  %xdefine %$targetsection SECTION_OF_%1
  1072                              <1>   %ifndef NEARCALL_THUNK_TO_%1
  1073                              <1> 	hiddenusesection %$targetsection
  1074                              <1> %define NEARCALL_THUNK_TO_%1 %%nearcall_thunk_to_%1
  1075                              <1> section_of %%nearcall_thunk_to_%1
  1076                              <1> dualfunction
  1077                              <1> %%nearcall_thunk_to_%1:
  1078                              <1> 	call %1
  1079                              <1> 	dualreturn
  1080                              <1> 	retf
  1081                              <1> 
  1082                              <1> 	hiddenusesection %$originalsection
  1083                              <1>   %endif
  1084                              <1>  %pop
  1085                              <1> 	dualcall NEARCALL_THUNK_TO_%1
  1086                              <1> %endif
  1087                              <1> 	%endmacro
  1088                              <1> %endif		; _LINK, _LINK_COMPAT
  1089                              <1>  %else
  1090                              <1> 	%imacro nearcall 1.nolist
  1091                              <1> %ifndef SECTION_OF_%1
  1092                              <1>  %error Unknown target section for symbol %1
  1093                              <1> %endif
  1094                              <1> %ifidni %[SECTION_OF_%1], _CURRENT_SECTION
  1095                              <1> 	call %1
  1096                              <1> %else
  1097                              <1> 	call _CURRENT_SECTION %+ _to_ %+ %[SECTION_OF_%1] %+ _nearcall_helper
  1098                              <1>  %if _DEBUG
  1099                              <1> 	jmp strict short %%skipdata
  1100                              <1>  %endif
  1101                              <1> 	dw %1
  1102                              <1> %%skipdata:
  1103                              <1> %endif
  1104                              <1> 	%endmacro
  1105                              <1>  %endif
  1106                              <1> %elif ! _DUALCODE
  1107                              <1> 
  1108                              <1> %idefine dualfunction comment
  1109                              <1> %idefine dualreturn
  1110                              <1> %idefine dualdistance near
  1111                              <1> 	%imacro dualcall 1.nolist
  1112                              <1> 	call %1
  1113                              <1> 	%endmacro
  1114                              <1> 	%imacro nearcall 1.nolist
  1115                              <1> 	call %1
  1116                              <1> 	%endmacro
  1117                              <1> %assign _SYMBOLICDUALCODE 0
  1118                              <1> %assign _SYMBOLASMDUALCODE 0
  1119                              <1> 
  1120                              <1> %else
  1121                              <1>  %error Unexpected defines
  1122                              <1> %endif
  1123                              <1> 
  1124                              <1> %ifn _SYMBOLICDUALCODE
  1125                              <1>  %assign _SYMBOLASMDUALCODE 0
  1126                              <1> %endif
  1127                              <1> 
  1128                              <1>  %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE
  1129                              <1> %idefine dual2function	dualfunction
  1130                              <1> %idefine dual2return	dualreturn
  1131                              <1> %idefine dual2distance	dualdistance
  1132                              <1> %idefine dual2call	dualcall
  1133                              <1>  %else
  1134                              <1> %idefine dual2function comment
  1135                              <1> %idefine dual2return
  1136                              <1> %idefine dual2distance near
  1137                              <1> 	%imacro dual2call 1.nolist
  1138                              <1> 	call %1
  1139                              <1> 	%endmacro
  1140                              <1>  %endif
  1141                              <1> 
  1142                              <1> 
  1143                              <1> 	numdef CHECKSECTION, 0
  1144                              <1> 	numdef CHECKCALLSECTION, _CHECKSECTION
  1145                              <1> 	numdef CHECKJMPSECTION, _CHECKSECTION
  1146                              <1> 	numdef CHECKJCCSECTION, _CHECKSECTION
  1147                              <1> 
  1148                              <1> %if _CHECKCALLSECTION
  1149                              <1> 	%imacro call 1.nolist
  1150                              <1> 	%? %1
  1151                              <1> checksection %1, %?, call
  1152                              <1> 	%endmacro
  1153                              <1> %endif
  1154                              <1> %if _CHECKJMPSECTION
  1155                              <1> 	%imacro jmp 1.nolist
  1156                              <1> 	%? %1
  1157                              <1> checksection %1, %?, jmp
  1158                              <1> 	%endmacro
  1159                              <1> %endif
  1160                              <1> %if _CHECKJCCSECTION
  1161                              <1> 	%imacro je 1.nolist
  1162                              <1> 	%? %1
  1163                              <1> checksection %1, %?, jcc
  1164                              <1> 	%endmacro
  1165                              <1> 	%imacro jne 1.nolist
  1166                              <1> 	%? %1
  1167                              <1> checksection %1, %?, jcc
  1168                              <1> 	%endmacro
  1169                              <1> 	%imacro jz 1.nolist
  1170                              <1> 	%? %1
  1171                              <1> checksection %1, %?, jcc
  1172                              <1> 	%endmacro
  1173                              <1> 	%imacro jnz 1.nolist
  1174                              <1> 	%? %1
  1175                              <1> checksection %1, %?, jcc
  1176                              <1> 	%endmacro
  1177                              <1> 
  1178                              <1> 	%imacro jb 1.nolist
  1179                              <1> 	%? %1
  1180                              <1> checksection %1, %?, jcc
  1181                              <1> 	%endmacro
  1182                              <1> 	%imacro jnb 1.nolist
  1183                              <1> 	%? %1
  1184                              <1> checksection %1, %?, jcc
  1185                              <1> 	%endmacro
  1186                              <1> 	%imacro jbe 1.nolist
  1187                              <1> 	%? %1
  1188                              <1> checksection %1, %?, jcc
  1189                              <1> 	%endmacro
  1190                              <1> 	%imacro jnbe 1.nolist
  1191                              <1> 	%? %1
  1192                              <1> checksection %1, %?, jcc
  1193                              <1> 	%endmacro
  1194                              <1> 	%imacro jc 1.nolist
  1195                              <1> 	%? %1
  1196                              <1> checksection %1, %?, jcc
  1197                              <1> 	%endmacro
  1198                              <1> 	%imacro jnc 1.nolist
  1199                              <1> 	%? %1
  1200                              <1> checksection %1, %?, jcc
  1201                              <1> 	%endmacro
  1202                              <1> 	%imacro ja 1.nolist
  1203                              <1> 	%? %1
  1204                              <1> checksection %1, %?, jcc
  1205                              <1> 	%endmacro
  1206                              <1> 	%imacro jna 1.nolist
  1207                              <1> 	%? %1
  1208                              <1> checksection %1, %?, jcc
  1209                              <1> 	%endmacro
  1210                              <1> 	%imacro jae 1.nolist
  1211                              <1> 	%? %1
  1212                              <1> checksection %1, %?, jcc
  1213                              <1> 	%endmacro
  1214                              <1> 	%imacro jnae 1.nolist
  1215                              <1> 	%? %1
  1216                              <1> checksection %1, %?, jcc
  1217                              <1> 	%endmacro
  1218                              <1> 
  1219                              <1> 	%imacro jl 1.nolist
  1220                              <1> 	%? %1
  1221                              <1> checksection %1, %?, jcc
  1222                              <1> 	%endmacro
  1223                              <1> 	%imacro jnl 1.nolist
  1224                              <1> 	%? %1
  1225                              <1> checksection %1, %?, jcc
  1226                              <1> 	%endmacro
  1227                              <1> 	%imacro jle 1.nolist
  1228                              <1> 	%? %1
  1229                              <1> checksection %1, %?, jcc
  1230                              <1> 	%endmacro
  1231                              <1> 	%imacro jnle 1.nolist
  1232                              <1> 	%? %1
  1233                              <1> checksection %1, %?, jcc
  1234                              <1> 	%endmacro
  1235                              <1> 	%imacro jg 1.nolist
  1236                              <1> 	%? %1
  1237                              <1> checksection %1, %?, jcc
  1238                              <1> 	%endmacro
  1239                              <1> 	%imacro jng 1.nolist
  1240                              <1> 	%? %1
  1241                              <1> checksection %1, %?, jcc
  1242                              <1> 	%endmacro
  1243                              <1> 	%imacro jge 1.nolist
  1244                              <1> 	%? %1
  1245                              <1> checksection %1, %?, jcc
  1246                              <1> 	%endmacro
  1247                              <1> 	%imacro jnge 1.nolist
  1248                              <1> 	%? %1
  1249                              <1> checksection %1, %?, jcc
  1250                              <1> 	%endmacro
  1251                              <1> 
  1252                              <1> 	%imacro jo 1.nolist
  1253                              <1> 	%? %1
  1254                              <1> checksection %1, %?, jcc
  1255                              <1> 	%endmacro
  1256                              <1> 	%imacro jno 1.nolist
  1257                              <1> 	%? %1
  1258                              <1> checksection %1, %?, jcc
  1259                              <1> 	%endmacro
  1260                              <1> 	%imacro jp 1.nolist
  1261                              <1> 	%? %1
  1262                              <1> checksection %1, %?, jcc
  1263                              <1> 	%endmacro
  1264                              <1> 	%imacro jnp 1.nolist
  1265                              <1> 	%? %1
  1266                              <1> checksection %1, %?, jcc
  1267                              <1> 	%endmacro
  1268                              <1> 	%imacro jpe 1.nolist
  1269                              <1> 	%? %1
  1270                              <1> checksection %1, %?, jcc
  1271                              <1> 	%endmacro
  1272                              <1> 	%imacro jnpe 1.nolist
  1273                              <1> 	%? %1
  1274                              <1> checksection %1, %?, jcc
  1275                              <1> 	%endmacro
  1276                              <1> 	%imacro jpo 1.nolist
  1277                              <1> 	%? %1
  1278                              <1> checksection %1, %?, jcc
  1279                              <1> 	%endmacro
  1280                              <1> 	%imacro jnpo 1.nolist
  1281                              <1> 	%? %1
  1282                              <1> checksection %1, %?, jcc
  1283                              <1> 	%endmacro
  1284                              <1> 	%imacro js 1.nolist
  1285                              <1> 	%? %1
  1286                              <1> checksection %1, %?, jcc
  1287                              <1> 	%endmacro
  1288                              <1> 	%imacro jns 1.nolist
  1289                              <1> 	%? %1
  1290                              <1> checksection %1, %?, jcc
  1291                              <1> 	%endmacro
  1292                              <1> 
  1293                              <1> 	%imacro jcxz 1.nolist
  1294                              <1> 	%? %1
  1295                              <1> checksection %1, %?, jcc
  1296                              <1> 	%endmacro
  1297                              <1> 	%imacro jecxz 1.nolist
  1298                              <1> 	%? %1
  1299                              <1> checksection %1, %?, jcc
  1300                              <1> 	%endmacro
  1301                              <1> 	%imacro loop 1.nolist
  1302                              <1> 	%? %1
  1303                              <1> checksection %1, %?, jcc
  1304                              <1> 	%endmacro
  1305                              <1> 	%imacro loopz 1.nolist
  1306                              <1> 	%? %1
  1307                              <1> checksection %1, %?, jcc
  1308                              <1> 	%endmacro
  1309                              <1> 	%imacro loopnz 1.nolist
  1310                              <1> 	%? %1
  1311                              <1> checksection %1, %?, jcc
  1312                              <1> 	%endmacro
  1313                              <1> 	%imacro loope 1.nolist
  1314                              <1> 	%? %1
  1315                              <1> checksection %1, %?, jcc
  1316                              <1> 	%endmacro
  1317                              <1> 	%imacro loopne 1.nolist
  1318                              <1> 	%? %1
  1319                              <1> checksection %1, %?, jcc
  1320                              <1> 	%endmacro
  1321                              <1> %endif
  1322                              <1> 
  1323                              <1> 	%imacro checksection 3.nolist
  1324                              <1> %push
  1325                              <1>  %defstr %$string %1
  1326                              <1>  %substr %$shortword %$string 1, 5
  1327                              <1>  %substr %$shortsep %$string 6, 1
  1328                              <1>  %substr %$nearword %$string 1, 4
  1329                              <1>  %substr %$nearsep %$string 5, 1
  1330                              <1>  %substr %$farword %$string 1, 3
  1331                              <1>  %substr %$farsep %$string 4, 1
  1332                              <1>  %assign %$isshort 0
  1333                              <1>  %ifidni %$shortword, "short"
  1334                              <1>   %if %$shortsep == 32 || %$shortsep == 9
  1335                              <1>    %assign %$isshort 1
  1336                              <1>    %substr %$string %$string 7, -1
  1337                              <1>   %elif %$shortsep == '['
  1338                              <1>    %assign %$isshort 1
  1339                              <1>    %substr %$string %$string 6, -1
  1340                              <1>   %endif
  1341                              <1>  %endif
  1342                              <1>  %assign %$isnear 0
  1343                              <1>  %ifidni %$nearword, "near"
  1344                              <1>   %if %$nearsep == 32 || %$nearsep == 9
  1345                              <1>    %assign %$isnear 1
  1346                              <1>    %substr %$string %$string 6, -1
  1347                              <1>   %elif %$nearsep == '['
  1348                              <1>    %assign %$isnear 1
  1349                              <1>    %substr %$string %$string 5, -1
  1350                              <1>   %endif
  1351                              <1>  %endif
  1352                              <1>  %assign %$isfar 0
  1353                              <1>  %ifidni %$farword, "far"
  1354                              <1>   %if %$farsep == 32 || %$farsep == 9
  1355                              <1>    %assign %$isfar 1
  1356                              <1>    %substr %$string %$string 5, -1
  1357                              <1>   %elif %$farsep == '['
  1358                              <1>    %assign %$isfar 1
  1359                              <1>    %substr %$string %$string 4, -1
  1360                              <1>   %endif
  1361                              <1>  %endif
  1362                              <1> 
  1363                              <1>  %deftok %$token %$string
  1364                              <1> 
  1365                              <1>  %assign %$size 2
  1366                              <1>  %assign %$isreg 0
  1367                              <1>  %assign %$exit 0
  1368                              <1>  %rep 2
  1369                              <1>   %ifn %$exit
  1370                              <1>    %if %$size == 2
  1371                              <1>     %define %$regnames "ax  cx  dx  bx  sp  bp  si  di  "
  1372                              <1>    %elif %$size == 4
  1373                              <1>     %define %$regnames "eax ecx edx ebx esp ebp esi edi "
  1374                              <1>    %endif
  1375                              <1>    %assign %$index 0
  1376                              <1>    %rep 8
  1377                              <1>     %ifn %$exit
  1378                              <1>      %substr %$reg %$regnames %$index * 4 + 1, 4
  1379                              <1>      %deftok %$reg %$reg
  1380                              <1>      %ifnempty %$reg
  1381                              <1>       %ifidni %$reg, %$token
  1382                              <1>        %assign %$isreg %$size
  1383                              <1>        %assign %$exit 1
  1384                              <1>        %exitrep
  1385                              <1>       %endif
  1386                              <1>      %endif
  1387                              <1>     %endif
  1388                              <1>     %assign %$index %$index + 1
  1389                              <1>    %endrep
  1390                              <1>    %if %$exit
  1391                              <1>     %exitrep
  1392                              <1>    %endif
  1393                              <1>    %assign %$size %$size * 2
  1394                              <1>   %endif
  1395                              <1>  %endrep
  1396                              <1> 
  1397                              <1>  %assign %$ismulti 0
  1398                              <1>  %assign %$ismem 0
  1399                              <1>  %strlen %$length %$string
  1400                              <1>  %assign %$ii 0
  1401                              <1>  %rep %$length
  1402                              <1>   %substr %$point %$string %$ii + 1, 1
  1403                              <1>   %if %$point == 32 || %$point == 9
  1404                              <1>    %assign %$ismulti 1
  1405                              <1>   %endif
  1406                              <1>   %ifidn %$point, '['
  1407                              <1>    %assign %$ismem 1
  1408                              <1>   %endif
  1409                              <1>   %assign %$ii %$ii + 1
  1410                              <1>  %endrep
  1411                              <1> 
  1412                              <1>  %assign %$islocal 0
  1413                              <1>  %substr %$point %$string 1, 1
  1414                              <1>  %substr %$prefix %$string 1, 3
  1415                              <1>  %ifidn %$point, '.'
  1416                              <1>   %ifnidn %$prefix, '..@'
  1417                              <1>    %assign %$islocal 1
  1418                              <1>   %endif
  1419                              <1>  %endif
  1420                              <1> 
  1421                              <1>  %if %$isreg
  1422                              <1>   %if %$isreg == 4
  1423                              <1>    %warning 32-bit reg %3: %2 %1
  1424                              <1>   %else
  1425                              <1>    %warning 16-bit reg %3: %2 %1
  1426                              <1>   %endif
  1427                              <1>  %elif %$ismulti || %$ismem
  1428                              <1>   %warning not single %3: %2 %1
  1429                              <1>  %elif %$islocal
  1430                              <1>   %ifidni %3, call
  1431                              <1>    %warning local %3: %2 %1
  1432                              <1>   %endif
  1433                              <1>  %elifdef SECTION_OF_%[%$token]
  1434                              <1>   %ifnidni SECTION_OF_%[%$token], _CURRENT_SECTION
  1435                              <1>    %error Symbol %$token called wrongly: section_of=SECTION_OF_%[%$token], current=_CURRENT_SECTION
  1436                              <1>   %endif
  1437                              <1>  %endif
  1438                              <1> %pop
  1439                              <1> 	%endmacro
  1440                              <1> 
  1441                              <1> 
  1442                              <1> 	struc MEMREF
  1443 00000000 ????????            <1> mrLinear:		resd 1
  1444 00000004 ????????            <1> mrOffset:		resd 1
  1445 00000008 ????                <1> mrSegmentSelector:	resw 1
  1446 0000000A ????                <1> mrFlags:		resw 1
  1447 0000000C ????????            <1> mrLength:		resd 1
  1448                              <1> 	endstruc
  1449                              <1> 
  1450                              <1> 		; Currently only direct branches are allowed when
  1451                              <1> 		;  disassembling from the U command. (That is,
  1452                              <1> 		;  [disflags] & DIS_F_SHOW is clear.) All other
  1453                              <1> 		;  types of references depend on segment registers
  1454                              <1> 		;  and sometimes base and index registers, which are
  1455                              <1> 		;  not known ahead of time. They are only known for
  1456                              <1> 		;  the R command's disassembly. (DIS_F_SHOW set.)
  1457                              <1> 		; (When a mov ss or pop to ss will change ss, a
  1458                              <1> 		;  subsequent instruction using ss will not be
  1459                              <1> 		;  disassembled with the correct ss value.
  1460                              <1> 		;  This should be rare though. We may at a later
  1461                              <1> 		;  point detect this condition and not display
  1462                              <1> 		;  references with ss then.)
  1463                              <1> mrfBranchDirect:	equ    1
  1464                              <1> mrfMem:			equ    2
  1465                              <1> mrfMemSource:		equ    4
  1466                              <1> mrfMemDest:		equ    8
  1467                              <1> mrfA32:			equ   10h
  1468                              <1> mrfString:		equ   20h
  1469                              <1> mrfStringSource:	equ   40h
  1470                              <1> mrfStringDest:		equ   80h
  1471                              <1> mrfUsesSS:		equ  100h
  1472                              <1> mrfBranchIndirect:	equ  200h
  1473                              <1> 
  1474                              <1> 
  1475                              <1> %if _VXCHG && ! _VXCHGBIOS
  1476                              <1> 	struc XMSM
  1477 00000000 ????????            <1> .size_:		resd 1
  1478 00000004 ????                <1> .srchdl:	resw 1
  1479 00000006 ????????            <1> .srcadr:	resd 1
  1480 0000000A ????                <1> .dsthdl:	resw 1
  1481 0000000C ????????            <1> .dstadr:	resd 1
  1482                              <1> 	endstruc
  1483                              <1> %endif
  1484                              <1> 
  1485                              <1> 
  1486                              <1> 	; doscall is used by symbols.asm and run.asm and in
  1487                              <1> 	;  cmd3_close_handle, so define it prior
  1488                              <1> %if _PM && _NOEXTENDER
  1489                              <1> %macro doscall 0
  1490                              <1> 	nearcall _doscall
  1491                              <1> %endmacro
  1492                              <1> %else
  1493                              <1> 		; When we don't support non-extended DPMI all Int21 calls
  1494                              <1> 		; are either in Real Mode or extended (all are real Int21
  1495                              <1> 		; instructions).
  1496                              <1> %macro doscall 0
  1497                              <1> 	int 21h
  1498                              <1> %endmacro
  1499                              <1> %endif
  1500                              <1> 
  1501                              <1> 
  1502                              <1> %if _LINK
  1503                              <1> %imacro wlcalc 1-2.nolist
  1504                              <1> %deftok %%filenametoken __FILE__
  1505                              <1>  global wlcalc_%1?%[%%l]%[%%filenametoken]
  1506                              <1> wlcalc_%1?%[%%l]%[%%filenametoken]: %2
  1507                              <1> %endmacro
  1508                              <1> %endif
  1509                              <1> 
  1510                              <1> %if _BOOTLDR && _LINK
  1511                              <1> %macro lot_equate 2.nolist
  1512                              <1> LOAD_%2 equ %1
  1513                              <1> %endmacro
  1514                              <1> 
  1515                              <1> 	lot_equate    1, SET_DL_UNIT
  1516                              <1> 	lot_equate    2, SET_BL_UNIT
  1517                              <1> 	lot_equate    4, SET_SIDI_CLUSTER
  1518                              <1> 	lot_equate  10h, SET_DSSI_DPT
  1519                              <1> 	lot_equate  20h, PUSH_DPT
  1520                              <1> 	lot_equate  40h, DATASTART_HIDDEN
  1521                              <1> 	lot_equate  80h, SET_AXBX_DATASTART
  1522                              <1> 	lot_equate 100h, SET_DSBP_BPB
  1523                              <1> 	lot_equate 200h, LBA_SET_TYPE
  1524                              <1> 	lot_equate 400h, MESSAGE_TABLE
  1525                              <1> 	lot_equate 800h, SET_AXBX_ROOT_HIDDEN
  1526                              <1> 	lot_equate 1000h, CMDLINE
  1527                              <1> 	lot_equate 2000h, NO_BPB
  1528                              <1> 	lot_equate 4000h, SET_DSSI_PARTINFO
  1529                              <1> %endif
  1530                              <1> 
  1531                              <1> %if _HELP_COMPRESSED
  1532                              <1>  %assign NONCOMPRESSEDFLAG 1
  1533                              <1> %else
  1534                              <1>  %assign NONCOMPRESSEDFLAG 0
  1535                              <1> %endif
  1536                              <1> 
  1537                              <1> [list +]
  1538                              <1> 
  1539                              <1> %if _LINK
  1540                              <1>  %if _ONLY386
  1541                              <1> 	cpu 386
  1542                              <1>  %else
  1543                              <1> 	cpu 8086
  1544                              <1>  %endif
  1545                              <1> 
  1546                              <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15
  1547                              <1> 	endarea auxbuff, 1
  1548                              <1> 
  1549                              <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15
  1550                              <1> 	endarea auxbuff_max, 1
  1551                              <1> 
  1552                              <1> %if _INIT_MAX
  1553                              <1>  auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15
  1554                              <1> %else
  1555                              <1>  auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15
  1556                              <1> %endif
  1557                              <1> 	endarea auxbuff_init, 1
  1558                              <1> 
  1559                              <1>  %include "options.mac"
     1                              <2> 
     2                              <2> %if 0
     3                              <2> 
     4                              <2> lDebug options and internal flags
     5                              <2> 
     6                              <2> Copyright (C) 2008-2025 E. C. Masloch
     7                              <2> 
     8                              <2> Usage of the works is permitted provided that this
     9                              <2> instrument is retained with the works, so that any entity
    10                              <2> that uses the works is notified of this instrument.
    11                              <2> 
    12                              <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    13                              <2> 
    14                              <2> %endif
    15                              <2> 
    16                              <2> 
    17                              <2> dispregs32	equ	  1	; RX: 32-bit register display (R, T/P/G)
    18                              <2> traceints	equ	  2	; TM: trace into interrupts (T)
    19                              <2> cpdepchars	equ	  4	; allow dumping of CP-dependent characters (D, DX)
    20                              <2> fakeindos	equ	  8	; always assume InDOS flag non-zero (all)
    21                              <2> nonpagingdevice	equ	 10h	; disallow paged output with [more] prompt (all exc. P, T)
    22                              <2> 	; This option was never used anywhere:
    23                              <2> ; pagingdevice	equ	 20h	; allow paged output with [more] prompt (all exc. P, T)
    24                              <2> 				; paged output is by default on if the output device is StdOut, else off
    25                              <2> hexrn		equ	 40h	; display raw hexadecimal content of FPU registers (RN)
    26                              <2> ;novdd		equ	 80h	; don't use a registered NTVDM VDD (L, W)
    27                              <2> nondospaging	equ	100h	; paging: don't use DOS for input when waiting for a key
    28                              <2> opt1_86mnohlt	equ	200h	; (86 Mode:) HLT doesn't work, don't use it
    29                              <2> biosidles	equ	400h	; don't idle with HLT or Int2F.1680, only call BIOS Int16.00
    30                              <2> opt_usegetinput	equ	800h	; use getinput for int 21h interactive input
    31                              <2> use_si_units	equ    1000h	; in disp_*_size use SI units (kB = 1000, etc)
    32                              <2> use_jedec_units	equ    2000h	; in disp_*_size use JEDEC units (kB = 1024)
    33                              <2> enable_serial	equ    4000h	; enable serial I/O (preferred over DOS or BIOS terminal)
    34                              <2> int8_disable_serial equ	   8000h	; disable serial I/O when breaking due to intr8
    35                              <2> gg_do_not_skip_bp equ	 1_0000h	; gg: do not skip a breakpoint (bb or gg)
    36                              <2> gg_no_autorepeat equ	 2_0000h	; gg: do not auto-repeat
    37                              <2> tp_do_not_skip_bp equ	 4_0000h	; T/TP/P: do not skip a (bb) breakpoint
    38                              <2> gg_bb_hit_no_repeat equ	 8_0000h	; gg: do not auto-repeat after bb hit
    39                              <2> tp_bb_hit_no_repeat equ	10_0000h	; T/TP/P: do not auto-repeat after bb hit
    40                              <2> gg_unexpected_no_repeat equ 20_0000h	; gg: do not auto-repeat after unexpectedinterrupt
    41                              <2> tp_unexpected_no_repeat equ 40_0000h	; T/TP/P
    42                              <2> ss_no_dump:		equ 80_0000h
    43                              <2> %if _SYMBOLIC
    44                              <2> dd_no_blanks_sym:	equ 100_0000h
    45                              <2> zz_no_pm_xms:		equ 200_0000h
    46                              <2> %endif
    47                              <2> rr_disasm_no_rept:	equ 1000_0000h
    48                              <2> rr_disasm_no_show:	equ 2000_0000h
    49                              <2> opt_cmdline_quiet_input:equ 4000_0000h
    50                              <2> opt_cmdline_quiet_output:equ 8000_0000h
    51                              <2> %if _SYMBOLIC
    52                              <2> DEFAULTOPTIONS	equ zz_no_pm_xms
    53                              <2> %else
    54                              <2> DEFAULTOPTIONS	equ 0
    55                              <2> %endif
    56                              <2> 
    57                              <2> 
    58                              <2> opt2_db_header:		equ 1
    59                              <2> opt2_db_trailer:	equ 2
    60                              <2> opt2_dw_header:		equ 10h
    61                              <2> opt2_dw_trailer:	equ 20h
    62                              <2> opt2_dd_header:		equ 100h
    63                              <2> opt2_dd_trailer:	equ 200h
    64                              <2> opt2_getinput_dpmi:	equ 800h
    65                              <2> opt2_hh_compat:		equ 1000h
    66                              <2> opt2_getc_idle:		equ 2000h
    67                              <2> opt2_getc_idle_dpmi:	equ 4000h
    68                              <2> opt2_re_cancel_tpg:	equ 8000h
    69                              <2> opt2_nn_compat:		equ 1_0000h
    70                              <2> opt2_nn_capitalise:	equ 2_0000h
    71                              <2> %if _MS_0RANGE_COMPAT
    72                              <2> opt2_0range_compat:	equ 4_0000h
    73                              <2> %endif
    74                              <2> opt2_rr16_compat:	equ 8_0000h
    75                              <2> opt2_r_prompt_compat:	equ 10_0000h
    76                              <2> opt2_r_separate:	equ 20_0000h
    77                              <2> opt2_r_linebreak_always:equ 40_0000h
    78                              <2> opt2_dpminohlt:		equ 8000_0000h	; DPMI doesn't like hlt
    79                              <2> DEFAULTOPTIONS2	equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt
    80                              <2> 
    81                              <2> 
    82                              <2> opt3_tt_no_paging:	equ 1
    83                              <2> opt3_tp_no_paging:	equ 2
    84                              <2> opt3_pp_no_paging:	equ 4
    85                              <2> opt3_gg_no_paging:	equ 8
    86                              <2> opt3_silence_paging_set:equ 100h
    87                              <2> opt3_silence_paging_on:	equ 200h
    88                              <2> opt3_paging_rc:		equ 1000h
    89                              <2> opt3_paging_yy:		equ 2000h
    90                              <2> opt3_paging_re:		equ 4000h
    91                              <2> opt3_r_highlight_diff:	equ 10000h
    92                              <2> opt3_r_highlight_dumb:	equ 20000h
    93                              <2> opt3_r_highlight_full:	equ 40000h
    94                              <2> opt3_r_highlight_eip:	equ 80000h
    95                              <2> %if _PM
    96                              <2> opt3_ss_b_bit_set:	equ   10_0000h
    97                              <2>  %if _BREAK_INSTALLDPMI
    98                              <2> opt3_break_installdpmi:	equ   20_0000h
    99                              <2>  %endif
   100                              <2> %endif
   101                              <2> %if _DHIGHLIGHT
   102                              <2> opt3_d_highlight:	equ   80_0000h
   103                              <2> %endif
   104                              <2> %if _GETLINEHIGHLIGHT
   105                              <2> opt3_getline_highlight:	equ  100_0000h
   106                              <2> %endif
   107                              <2> opt3_no_idle_2F:	equ  200_0000h
   108                              <2> %if _DELAY_BEFORE_BP
   109                              <2> opt3_delay_before_bp:	equ  400_0000h
   110                              <2> %endif
   111                              <2> opt3_no_call_amis:	equ  800_0000h
   112                              <2> opt3_disable_autorepeat:equ 1000_0000h
   113                              <2> opt3_check_ctrlc_keyb:	equ 2000_0000h
   114                              <2> opt3_check_ctrlc_0bh:	equ 4000_0000h
   115                              <2> opt3_tsr_quit_leave_tf:	equ 8000_0000h
   116                              <2> 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
   119                              <2> 
   120                              <2> 
   121                              <2> opt4_int_2F_hook:	equ 2
   122                              <2> opt4_int_08_hook:	equ 4
   123                              <2> opt4_int_2D_hook:	equ 8
   124                              <2> %if _CATCHINTFAULTCOND
   125                              <2> opt4_int_fault_hook:	equ 10h
   126                              <2> %endif
   127                              <2> opt4_int_serial_force:	equ 1_0000h
   128                              <2> opt4_int_2F_force:	equ 2_0000h
   129                              <2> opt4_int_08_force:	equ 4_0000h
   130                              <2> opt4_int_2D_force:	equ 8_0000h
   131                              <2> %if _CATCHINT0D
   132                              <2> opt4_int_0D_force:	equ   10_0000h
   133                              <2> %endif
   134                              <2> %if _CATCHINT0C
   135                              <2> opt4_int_0C_force:	equ   20_0000h
   136                              <2> %endif
   137                              <2> opt4_int_00_force:	equ  100_0000h
   138                              <2> opt4_int_01_force:	equ  200_0000h
   139                              <2> opt4_int_03_force:	equ  400_0000h
   140                              <2> opt4_int_06_force:	equ  800_0000h
   141                              <2> opt4_int_18_force:	equ 1000_0000h
   142                              <2> opt4_int_19_force:	equ 2000_0000h
   143                              <2> opt4_int_09_force:	equ 4000_0000h	; not used at the same time as 15h
   144                              <2> opt4_int_15_force:	equ 4000_0000h	; not used at the same time as 09h
   145                              <2> opt4_int_07_force:	equ 8000_0000h
   146                              <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook
   147                              <2> 
   148                              <2> 
   149                              <2> %if _VXCHG
   150                              <2> opt6_vv_mode:		equ 1
   151                              <2> opt6_vv_keep:		equ 2
   152                              <2> opt6_vv_int16:		equ 10h
   153                              <2>  %if _VXCHG_DEFAULT_ON
   154                              <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode
   155                              <2>  %else
   156                              <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq
   157                              <2>  %endif
   158                              <2> %else
   159                              <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq
   160                              <2> %endif
   161                              <2> %if _DEBUG
   162                              <2> opt6_debug_exception_late:	equ  20h
   163                              <2> opt6_debug_exception_early:	equ  40h
   164                              <2>  %if _DEBUG_COND
   165                              <2> opt6_debug_exception:	equ  80h
   166                              <2> opt6_debug_mode:	equ 100h
   167                              <2>  %endif
   168                              <2> %endif
   169                              <2> opt6_bios_output:	equ 200h
   170                              <2> opt6_flat_binary:	equ 400h
   171                              <2> opt6_big_stack:		equ 800h
   172                              <2> opt6_40_columns:	equ 1000h
   173                              <2> opt6_40_indent_odd:	equ 2000h
   174                              <2> opt6_40_dash:		equ 4000h
   175                              <2> opt6_share_serial_irq:	equ 1_0000h
   176                              <2> opt6_serial_EOI_call:	equ 2_0000h
   177                              <2> %if _RH
   178                              <2> opt6_rh_mode:		equ 10_0000h
   179                              <2> %endif
   180                              <2> %if _DEBUG
   181                              <2> opt6_debug_putrunint_early:	equ  40_0000h
   182                              <2>  %if _DEBUG_COND
   183                              <2> opt6_debug_putrunint:		equ  80_0000h
   184                              <2>  %endif
   185                              <2> %endif
   186                              <2> opt6_bios_io:		equ 100_0000h
   187                              <2> opt6_immasm_display_uu:	equ 200_0000h
   188                              <2> opt6_immasm_debug:	equ 400_0000h
   189                              <2> opt6_immasm_flag:	equ 800_0000h
   190                              <2> opt6_immasm_nobranch:	equ 1000_0000h
   191                              <2> opt6_r_flags_style2:	equ 2000_0000h
   192                              <2> opt6_r_flags_style3:	equ 4000_0000h
   193                              <2> opt6_r_linebreak_conditional:	equ 8000_0000h
   194                              <2> 
   195                              <2> 
   196                              <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll
   197                              <2> opt7_no_free_oneshot_eld:	equ 1
   198                              <2> opt7_debug_optional_link:	equ 2
   199                              <2> opt7_quiet_install:		equ 4
   200                              <2> opt7_quick_run:			equ 8
   201                              <2> opt7_houdini:			equ 100h
   202                              <2> opt7_debug_run:			equ 200h
   203                              <2> opt7_no_ensure:			equ 1000h
   204                              <2> opt7_no_tsr_ll:			equ 2000h
   205                              <2> 
   206                              <2> 
   207                              <2> oldpacket	equ	  1	; Int25/Int26 packet method available (L, W)
   208                              <2> newpacket	equ	  2	; Int21.7305 packet method available (L, W)
   209                              <2> ntpacket	equ	  4	; VDD registered and usable (L, W)
   210                              <2> pagedcommand	equ	  8	; allows paging in puts
   211                              <2> notstdinput	equ	 10h	; DEBUG's StdIn isn't a device with StdIn bit (is file or other device)
   212                              <2> inputfile	equ	 20h	; DEBUG's StdIn is a file, notstdinput also set
   213                              <2> notstdoutput	equ	 40h	; DEBUG's StdOut isn't a device with StdOut bit (is file or other device)
   214                              <2> outputfile	equ	  80h	; DEBUG's StdOut is a file, notstdoutput also set
   215                              <2> hooked2F	equ	 100h	; Int2F hooked
   216                              <2> nohook2F	equ	 200h	; don't hook Int2F.1687 (required for Win9x, DosEmu?)
   217                              <2> unused_dif1_dpminohlt equ 400h	; DPMI doesn't like hlt
   218                              <2> protectedmode	equ	 800h	; in (DPMI) protected mode
   219                              <2> debuggeeA20	equ	1000h	; state of debuggee's A20
   220                              <2> debuggerA20	equ	2000h	; state of debugger's A20 (will be on if possible)
   221                              <2> nodosloaded	equ	4000h	; No DOS loaded currently (Boot loader mode)
   222                              <2> has386		equ	8000h	; CPU is a 386
   223                              <2> usecharcounter	equ    1_0000h	; don't reset charcounter between calls to puts
   224                              <2> runningnt	equ    2_0000h	; running in NTVDM
   225                              <2> canswitchmode	equ    4_0000h	; can switch modes (auxbuff large enough, DPMI mode switch set up)
   226                              <2> modeswitched	equ    8_0000h	; switched mode (now in the mode that we weren't entered in)
   227                              <2> promptwaiting	equ   10_0000h	; puts: any more output needs to display a prompt first
   228                              <2> switchbuffer	equ   20_0000h	; mode switch needs a buffer (auxbuff)
   229                              <2> tsrmode		equ   40_0000h	; in TSR mode; DPI and DPP not valid
   230                              <2> attachedterm	equ   80_0000h	; the attached process terminated
   231                              <2> runningdosemu	equ  100_0000h	; running in dosemu
   232                              <2> ; load_is_ldp	equ  200_0000h	; boot load: partition specified as "ldp"
   233                              <2> tt_while:	equ  400_0000h	; tt: while condition specified
   234                              <2> tt_p:		equ  800_0000h	; tt: proceed past repeated string instructions
   235                              <2> tt_silent_mode:	equ 1000_0000h	; tt: run should be silent (dump at end)
   236                              <2> tt_silence:	equ 2000_0000h	; tt: silent writing (write to auxbuff instead)
   237                              <2> tt_no_bb:	equ 4000_0000h	; tt: do not use bb breakpoints
   238                              <2> tt_no_bb_first:	equ 8000_0000h	; tt: do not use bb breakpoints at first
   239                              <2> 
   240                              <2> 
   241                              <2> dif2_gg_is_first:	equ   1
   242                              <2> dif2_gg_skip_non_cseip:	equ   2
   243                              <2> dif2_gg_skip_cseip:	equ   4
   244                              <2> dif2_gg_is_gg:		equ   8
   245                              <2> dif2_gg_first_detected:	equ  10h
   246                              <2> dif2_gg_again:		equ  20h
   247                              <2> dif2_tpg_proceed_bp_set:equ  40h
   248                              <2> dif2_tpg_keep_proceed_bp: equ 80h
   249                              <2> dif2_tpg_have_bp:	equ 100h
   250                              <2> dif2_tpg_adjusted_cseip:equ 200h
   251                              <2> dif2_tpg_do_not_adjust:	equ 400h
   252                              <2> dif2_bp_failure:	equ 800h
   253                              <2> dif2_is_pp:		equ 1000h
   254                              <2> %if _SYMBOLIC
   255                              <2> dif2_createdprocess:	equ 800_0000h	; created empty debuggee process
   256                              <2> dif2_sym_req_xms:	equ 2000h
   257                              <2> dif2_sym_req_86mm:	equ 4000h
   258                              <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms
   259                              <2> dif2_no_pm_xms:		equ 1_0000h
   260                              <2> dif2_xms_detection_done:equ 2_0000h
   261                              <2> %endif
   262                              <2> %if _INPUT_FILE_HANDLES
   263                              <2> dif2_input_file:	equ 10_0000h
   264                              <2> dif2_closed_input_file:	equ 20_0000h
   265                              <2> %endif
   266                              <2> dif2_did_getline_file:	equ 40_0000h
   267                              <2> %if _SYMBOLIC
   268                              <2> dif2_poison:		equ 80_0000h
   269                              <2> %endif
   270                              <2> dif2_boot_loaded_kernel:equ 100_0000h
   271                              <2> %if _INPUT_FILE_BOOT
   272                              <2> dif2_input_file_boot:	equ 200_0000h
   273                              <2> dif2_closed_input_file_boot:	equ 400_0000h
   274                              <2> %endif
   275                              <2> dif2_in_silence_dump:	equ 1000_0000h
   276                              <2> dif2_int31_segment:	equ 2000_0000h
   277                              <2> dif2_nn_compat:		equ 4000_0000h
   278                              <2> dif2_nn_capitalise:	equ 8000_0000h
   279                              <2> 
   280                              <2> 
   281                              <2> dif3_load_is_ldp:	equ 1	; boot load: partition specified as "ldp"
   282                              <2> dif3_load_is_sdp:	equ 2	; boot load: partition specified as "sdp"
   283                              <2> dif3_load_is_ydp:	equ 4	; boot load: partition specified as "ydp"
   284                              <2> dif3_load_is_dp:	equ dif3_load_is_ldp 				| dif3_load_is_sdp 				| dif3_load_is_ydp
   287                              <2> dif3_load_dir_dir:	equ 8
   288                              <2> dif3_input_terminal_override:	equ 10h
   289                              <2> dif3_input_serial_override:	equ 20h
   290                              <2> dif3_if_not:		equ 40h
   291                              <2> dif3_partition_changed:	equ 80h
   292                              <2> ;
   293                              <2> dif3_input_cmdline:	equ 100h; input reading from cmdline_buffer
   294                              <2> dif3_input_cmdline_closed: equ 200h
   295                              <2> dif3_at_line_end:	equ 400h
   296                              <2> dif3_quiet_input_single:equ 800h
   297                              <2> dif3_quiet_output:	equ 1000h
   298                              <2> dif3_unquiet_error:	equ 2000h
   299                              <2> dif3_unquiet_prompt:	equ 4000h
   300                              <2> dif3_unquiet:		equ dif3_unquiet_error | dif3_unquiet_prompt
   301                              <2> dif3_return_eof:	equ 8000h
   302                              <2> dif3_highlighting:	equ 1_0000h
   303                              <2> dif3_do_not_highlight:	equ 2_0000h
   304                              <2> dif3_int10_highlight:	equ 2_0000h
   305                              <2> dif3_nosymbols_1:	equ 4_0000h
   306                              <2> dif3_nosymbols_2:	equ 8_0000h
   307                              <2> %if _PM
   308                              <2> dif3_ss_b_bit_set:	equ  10_0000h
   309                              <2> %endif
   310                              <2> dif3_gotint19:		equ  20_0000h
   311                              <2> dif3_prior_pm:		equ  40_0000h
   312                              <2> %if _DELAY_BEFORE_BP
   313                              <2> dif3_delayed		equ  80_0000h
   314                              <2> %endif
   315                              <2> dif3_input_re:		equ 100_0000h	; input reading from re_buffer
   316                              <2> dif3_input_re_closed:	equ 200_0000h
   317                              <2> dif3_accept_getrange_0:	equ 400_0000h
   318                              <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT
   319                              <2> dif3_in_if:		equ 800_0000h
   320                              <2> %endif
   321                              <2> dif3_auxbuff_guarded_1:	equ 1000_0000h
   322                              <2> dif3_auxbuff_guarded_2:	equ 2000_0000h
   323                              <2> dif3_auxbuff_guarded_3:	equ 4000_0000h
   324                              <2> dif3_sss_is_reverse:	equ 8000_0000h
   325                              <2> 
   326                              <2> 
   327                              <2> dif4_int_serial_hooked:	equ 1
   328                              <2> dif4_int_2F_hooked:	equ 2
   329                              <2> dif4_int_08_hooked:	equ 4
   330                              <2> dif4_int_2D_hooked:	equ 8
   331                              <2> %if _CATCHINTFAULTCOND && _CATCHINT0D
   332                              <2> dif4_int_0D_hooked:	equ 10h
   333                              <2> %endif
   334                              <2> %if _CATCHINTFAULTCOND && _CATCHINT0C
   335                              <2> dif4_int_0C_hooked:	equ 20h
   336                              <2> %endif
   337                              <2> %if _LOADER
   338                              <2> dif4_int_18_hooked:	equ 1000h
   339                              <2> dif4_int_19_hooked:	equ 2000h
   340                              <2> %endif
   341                              <2> 
   342                              <2> 
   343                              <2> %if _VXCHG
   344                              <2> dif6_vv_mode:		equ 1
   345                              <2> %endif
   346                              <2> dif6_in_hook2F:		equ 2
   347                              <2> dif6_in_amis_hook2F:	equ 4
   348                              <2> dif6_debug_mode:	equ 100h
   349                              <2> dif6_locked:		equ 200h
   350                              <2> dif6_mcp:		equ 400h
   351                              <2> %if _RH
   352                              <2> dif6_rh_mode_was:	equ  8_0000h
   353                              <2> dif6_rh_mode:		equ 10_0000h
   354                              <2> dif6_rh_mode_2:		equ 20_0000h
   355                              <2> %endif
   356                              <2> dif6_device_mode:	equ 40_0000h
   357                              <2> dif6_cpdepchars:	equ 80_0000h
   358                              <2> %if _IMMASM
   359                              <2> dif6_immasm_no_output:	equ 100_0000h
   360                              <2> dif6_immasm:		equ 200_0000h
   361                              <2> dif6_immasm_rel8:	equ 400_0000h
   362                              <2> %endif
   363                              <2> 
   364                              <2> 
   365                              <2> disasm_lowercase	equ 1
   366                              <2> disasm_commablank	equ 2
   367                              <2> disasm_nasm		equ 4
   368                              <2> disasm_lowercase_refmem:equ 8
   369                              <2> disasm_show_short:	equ 10h
   370                              <2> disasm_show_near:	equ 20h
   371                              <2> disasm_show_far:	equ 40h
   372                              <2> disasm_nec:		equ 80h
   373                              <2> disasm_40_columns:	equ 100h
   374                              <2> disasm_no_indent:	equ 200h
   375                              <2> disasm_msdebug_mnemonofs: equ 400h
   376                              <2> disasm_a16_memref:	equ 1000h
   377                              <2> disasm_a32_memref:	equ 2000h
   378                              <2> disasm_a16_string:	equ 4000h
   379                              <2> disasm_a32_string:	equ 8000h
   380                              <2> disasm_hide_modrm:	equ 10000h
   381                              <2> disasm_asize_loop_nasm:	equ 20000h
   382                              <2> disasm_modrm_always:	equ 40000h
   383                              <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm 	| disasm_a16_memref | disasm_a32_memref 	| disasm_a16_string | disasm_a32_string
   386                              <2> 
   387                              <2> 	; serial_flags values
   388                              <2> sf_init_done:	equ 1
   389                              <2> sf_ctrl_c:	equ 2
   390                              <2> sf_double_ctrl_c:	equ 4
   391                              <2> sf_built_in_fifo:	equ 8
   392                              <2> sf_use_serial:		equ 10h
  1560                              <1> %endif
    20                                   %include "exprops.mac"
     1                              <1> 
     2                              <1> %if 0
     3                              <1> 
     4                              <1> lDebug expression evaluator macros
     5                              <1> 
     6                              <1> Copyright (C) 2008-2026 E. C. Masloch
     7                              <1> 
     8                              <1> Usage of the works is permitted provided that this
     9                              <1> instrument is retained with the works, so that any entity
    10                              <1> that uses the works is notified of this instrument.
    11                              <1> 
    12                              <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    13                              <1> 
    14                              <1> %endif
    15                              <1> 
    16                              <1> 	struc opprecs
    17 00000000 ??                  <1> OPPREC_INVALID:	resb 1
    18 00000001 ??                  <1> OPPREC_COND:	resb 1
    19 00000002 ??                  <1> OPPREC_BOOL_OR:	resb 1
    20 00000003 ??                  <1> OPPREC_BOOL_XOR:resb 1
    21 00000004 ??                  <1> OPPREC_BOOL_AND:resb 1
    22 00000005 ??                  <1> OPPREC_COMPARE:	resb 1
    23 00000006 ??                  <1> OPPREC_BIT_OR:	resb 1
    24 00000007 ??                  <1> OPPREC_BIT_XOR:	resb 1
    25 00000008 ??                  <1> OPPREC_BIT_AND:	resb 1
    26 00000009 ??                  <1> OPPREC_BIT_CLR:	resb 1
    27 0000000A ??                  <1> OPPREC_SHIFT:	resb 1
    28 0000000B ??                  <1> OPPREC_ADDSUB:	resb 1
    29 0000000C ??                  <1> OPPREC_MULDIV:	resb 1
    30 0000000D ??                  <1> OPPREC_POWER:	resb 1
    31                              <1> OPPREC_RIGHTOP:		; (to process it first in getexpression)
    32                              <1> 	endstruc
    33                              <1> 		; The number of precedence levels indicates how many
    34                              <1> 		; intermediate results getexpression might have to save
    35                              <1> 		; on its stack. With thirteen levels of precedence, up to
    36                              <1> 		; twelve intermediate results are pushed by getexpression.
    37                              <1> 		; (With 6 bytes each, that gives a moderate 72 bytes.)
    38                              <1> 		; Key to this is that, in case of a low enough operator
    39                              <1> 		; behind the one that triggered the pushing, the pushed
    40                              <1> 		; value will be popped before proceeding. This way more
    41                              <1> 		; intermediate results may be pushed later but the stack
    42                              <1> 		; never holds intermediate results that don't need to be
    43                              <1> 		; on the stack.
    44                              <1> 
    45                              <1> 		; This is the definition of operator index values. The tables
    46                              <1> 		; operatorprecedences and operatorfunctions are ordered by this.
    47                              <1> 		; The operator dispatchers return one of these.
    48                              <1> 	struc ops
    49 00000000 ??                  <1> OPERATOR_INVALID:		resb 1	; 0 - invalid
    50 00000001 ??                  <1> OPERATOR_PLUS:			resb 1	; +
    51 00000002 ??                  <1> OPERATOR_MINUS:			resb 1	; -
    52 00000003 ??                  <1> OPERATOR_MULTIPLY:		resb 1	; *
    53 00000004 ??                  <1> OPERATOR_DIVIDE:		resb 1	; /
    54 00000005 ??                  <1> OPERATOR_MODULO:		resb 1	; %
    55 00000006 ??                  <1> OPERATOR_POWER:			resb 1	; **
    56 00000007 ??                  <1> OPERATOR_CMP_BELOW:		resb 1	; <
    57 00000008 ??                  <1> OPERATOR_CMP_BELOW_EQUAL:	resb 1	; <=
    58 00000009 ??                  <1> OPERATOR_CMP_ABOVE:		resb 1	; >
    59 0000000A ??                  <1> OPERATOR_CMP_ABOVE_EQUAL:	resb 1	; >=
    60 0000000B ??                  <1> OPERATOR_CMP_EQUAL:		resb 1	; ==
    61 0000000C ??                  <1> OPERATOR_CMP_NOT_EQUAL:		resb 1	; !=
    62 0000000D ??                  <1> OPERATOR_SHIFT_LEFT:		resb 1	; <<
    63 0000000E ??                  <1> OPERATOR_SHIFT_RIGHT:		resb 1	; >>
    64 0000000F ??                  <1> OPERATOR_SHIFT_RIGHT_SIGNED:	resb 1	; >>>
    65 00000010 ??                  <1> OPERATOR_BIT_MIRROR:		resb 1	; ><
    66 00000011 ??                  <1> OPERATOR_BIT_CLR:		resb 1	; clr (bitwise AND with bitwise NOT)
    67 00000012 ??                  <1> OPERATOR_BIT_OR:		resb 1	; |
    68 00000013 ??                  <1> OPERATOR_BIT_XOR:		resb 1	; ^
    69 00000014 ??                  <1> OPERATOR_BIT_AND:		resb 1	; &
    70 00000015 ??                  <1> OPERATOR_BOOL_OR:		resb 1	; ||
    71 00000016 ??                  <1> OPERATOR_BOOL_XOR:		resb 1	; ^^
    72 00000017 ??                  <1> OPERATOR_BOOL_AND:		resb 1	; &&
    73 00000018 ??                  <1> OPERATOR_COND:			resb 1	; ?? :: construct (special)
    74 00000019 ??                  <1> OPERATOR_RIGHTOP:		resb 1	; (dummy right-operand operator)
    75                              <1> 	endstruc
    76                              <1> 		; Order of BIT_* needs to be the same as that of BOOL_*.
    77                              <1> 		; BOOL_* have to follow directly behind BIT_*.
    78                              <1> 		; "R CF op= expr" depends on that (rr4 in rr.asm).
    21                                  %endif
    22                                  
    23                                  
    24                                  	usesection lDEBUG_CODE
    24          ------------------       note: usesection lDEBUG_CODE
    25                                  
    26                                  ..@rr_access_start:
    27                                  		; R command - dump and manipulate registers.
    28                                  rr:
    29 00000000 E8(0000)                	call iseol?
    30                                  %if _RH && !_LOADER
    31 00000003 750D                    	jne @F
    32                                  .r_and_terminate:
    33 00000005 E81309                  	call dumpregs
    34 00000008 D006[0000]              	rol byte [in_re], 1
    35 0000000C 7203E9(0000)            	jnc terminate_silent_dump
    36 00000011 C3                      	retn
    37                                  @@:
    38                                  %else
    39                                  	je dumpregs		; if no parameters -->
    40                                  %endif
    41 00000012 E8(0000)                	call capitalise
    42                                  %if !_LOADER
    43 00000015 3C45                    	cmp al, 'E'
    44 00000017 7514                    	jne @F
    45                                  
    46 00000019 50                      	push ax
    47 0000001A 56                      	push si
    48 0000001B AC                      	lodsb
    49 0000001C 3C2E                    	cmp al, '.'
    50 0000001E 7503E9DA06              	je re_cmd
    51 00000023 E8(0000)                	call iseol?
    52 00000026 5E                      	pop si
    53 00000027 58                      	pop ax
    54 00000028 7503E92B08              	je dumpregs_extended
    55                                  @@:
    56                                  %endif
    57                                  
    58 0000002D 3C43                    	cmp al, 'C'
    59 0000002F 7514                    	jne @F
    60                                  
    61 00000031 50                      	push ax
    62 00000032 56                      	push si
    63 00000033 AC                      	lodsb
    64 00000034 3C2E                    	cmp al, '.'
    65 00000036 7503E9BA06              	je rc_cmd
    66 0000003B E8(0000)                	call iseol?
    67 0000003E 5E                      	pop si
    68 0000003F 58                      	pop ax
    69 00000040 7503E9F407              	je rc_run
    70                                  @@:
    71                                  
    72                                  %if !_ONLYNON386 || (_OPTIONS || _VARIABLES) || (_MMXSUPP && _RM) || _RN
    73 00000045 4E                      	dec si
    74 00000046 4E                      	dec si
    75 00000047 BA[0000]                	mov dx, msg.rvv
    76 0000004A E8(0000)                	call isstring?
    77 0000004D 7503E93C0D              	je dumpallvars
    78 00000052 BA[0000]                	mov dx, msg.rvm
    79 00000055 E8(0000)                	call isstring?
    80 00000058 7503E9790D              	je dumpmemory
    81 0000005D BA[0000]                	mov dx, msg.rvp
    82 00000060 E8(0000)                	call isstring?
    83 00000063 7503E9E30D              	je dumpprocess
    84 00000068 BA[0000]                	mov dx, msg.rvd
    85 0000006B E8(0000)                	call isstring?
    86 0000006E 7503E98C0E              	je dumpdevice
    87                                  %if _RH
    88 00000073 BA[0000]                	mov dx, msg.rh
    89 00000076 E8(0000)                	call isstring?
    90 00000079 7503E9B70E              	je dumphistory
    91                                  %endif
    92                                  %if _MMXSUPP && _RM
    93                                  	cmp byte [has_mmx], 0
    94                                  	je .notrm
    95                                  	mov dx, msg.rm
    96                                  	call isstring?
    97                                  	jne .notrm
    98                                  	call skipcomma
    99                                  	jmp dumpregsMMX
   100                                  .notrm:
   101                                  %endif
   102 0000007E 46                      	inc si
   103 0000007F AC                      	lodsb
   104 00000080 E8(0000)                	call capitalise
   105                                  
   106 00000083 50                      	push ax
   107 00000084 56                      	push si
   108 00000085 E8(0000)                	call skipwhite
   109 00000088 E8(0000)                	call iseol?		; line ends after single character ?
   110 0000008B 5E                      	pop si
   111 0000008C 58                      	pop ax
   112 0000008D 7534                    	jne short rr1		; no, not other kinds of dumps -->
   113                                  
   114 0000008F 3C46                    	cmp al, 'F'		; only valid input to a later check
   115 00000091 7503E98E04              	je rr2.writeprompt	; so go there -->
   116                                  				; (note that byte [si-1] must != '.')
   117                                  %if _OPTIONS || _VARIABLES
   118 00000096 3C56                    	cmp al, 'V'
   119 00000098 7503E9010C              	je dumpvars
   120                                  %endif
   121 0000009D 3C58                    _386	cmp al, 'X'
   122 0000009F 7403                    _386	je short rrx
   123                                  %if _RN
   124                                  	cmp al, 'N'
   125                                  	jne .notrn
   126                                  	cmp byte [has_87], 0
   127                                  	je .notrn
   128                                  	jmp dumpregsFPU
   129                                  .notrn:
   130                                  %endif
   131 000000A1 E9(0000)                	jmp error		; all other single characters are invalid
   132                                  %endif
   133                                  
   134                                  %ifn _ONLYNON386
   135                                  rrx:
   136 000000A4 AC                      	lodsb
   137 000000A5 E8(0000)                	call chkeol
   138 000000A8 8036[0000]01            	xoropt [options], dispregs32
   139 000000AD BA[0000]                	mov dx, msg.regs386
   140 000000B0 E8(0000)                	call putsz
   141 000000B3 BA[0000]                	mov dx, msg.regs386_on
   142 000000B6 F606[0000]01            	testopt [options], dispregs32
   143 000000BB 7503                    	jnz .on
   144 000000BD BA[0000]                	mov dx, msg.regs386_off
   145                                  .on:
   146 000000C0 E9(0000)                	jmp putsz
   147                                  %endif
   148                                  
   149                                  rr1:
   150                                  	lframe
   151                                  	lvar dword, offset
   152                                  	lvar word, segsel
   153                                  	lvar word, memsizestring
   154                                  	lvar word, ismem_high_size_low
   155                                  	lequ ?ismem_high_size_low, size
   156                                  	lequ ?ismem_high_size_low + 1, ismem
   157                                  	lvar word, hhtype_high_rrtype_low
   158                                  	lequ ?hhtype_high_rrtype_low, replace_rrtype
   159                                  %define rrtype bp + ?replace_rrtype
   160                                  	lequ ?hhtype_high_rrtype_low + 1, hhtype
   161                                  	lvar word, replace_rrmask
   162                                  %define rrmask bp + ?replace_rrmask
   163                                  	lvar word, hhoffset
   164                                  %if _MMXSUPP
   165                                  	lvar word, mmx_isvar_type
   166                                  %endif
   167                                  	lequ 16, namebufferlength
   168                                  	lvar ?namebufferlength, namebuffer
   169 000000C3 5589E58D66DE            	lenter
   170                                  %if _MMXSUPP
   171 000000C9 8366EE00                	and word [bp + ?mmx_isvar_type], 0
   172                                  %endif
   173 000000CD 89E7                    	mov di, sp		; -> ?namebuffer
   174 000000CF E8(0000)EB02[0000]      	nearcall isvariable?.return_name
   175 000000D6 7203E94A01              	jnc rr1_variable
   176                                  
   177 000000DB 4E                      	dec si
   178 000000DC BA[0000]                	mov dx, msg.byte
   179 000000DF BB0101                  	mov bx, 101h
   180 000000E2 52                      	push dx
   181 000000E3 E8(0000)                	call isstring?
   182 000000E6 7428                    	je rr1_memory
   183 000000E8 5A                      	pop dx
   184 000000E9 BA[0000]                	mov dx, msg.word
   185 000000EC 43                      	inc bx			; = 102h
   186 000000ED 52                      	push dx
   187 000000EE E8(0000)                	call isstring?
   188 000000F1 741D                    	je rr1_memory
   189 000000F3 5A                      	pop dx
   190 000000F4 BA[0000]                	mov dx, msg.3byte
   191 000000F7 43                      	inc bx			; = 103h
   192 000000F8 52                      	push dx
   193 000000F9 E8(0000)                	call isstring?
   194 000000FC 7412                    	je rr1_memory
   195 000000FE 5A                      	pop dx
   196 000000FF BA[0000]                	mov dx, msg.dword
   197 00000102 43                      	inc bx			; = 104h
   198 00000103 52                      	push dx
   199 00000104 E8(0000)                	call isstring?
   200 00000107 7407                    	je rr1_memory
   201                                  	; pop dx
   202 00000109 89EC5D                  	lleave code
   203 0000010C AC                      	lodsb
   204 0000010D E9EE03                  	jmp rr2
   205                                  
   206                                  rr1_memory:
   207 00000110 8F46F8                  	pop word [bp + ?memsizestring]
   208 00000113 895EF6                  	mov word [bp + ?ismem_high_size_low], bx
   209                                  
   210 00000116 31C0                    	xor ax, ax
   211 00000118 88D8                    	mov al, bl
   212 0000011A F7D8                    	neg ax
   213 0000011C 05[0400]                	add ax, masks + 4	; 4 - size = offset into masks
   214 0000011F 8946F2                  	mov word [rrmask], ax	; -> mask
   215 00000122 E8(0000)                	call skipcomma
   216 00000125 3C5B                    	cmp al, '['
   217 00000127 7403E9(0000)            	jne error
   218 0000012C AC                      	lodsb
   219 0000012D 8B1E[0000]              	mov bx, word [reg_ds]
   220 00000131 E8(0000)EB02[0000]      	nearcall getaddrX
   221 00000138 895EFA                  	mov word [bp + ?segsel], bx
   222 0000013B 66                      	_386_PM_o32
   223 0000013C 8956FC                  	mov word [bp + ?offset], dx
   224 0000013F E8(0000)                	call skipcomm0
   225 00000142 3C5D                    	cmp al, ']'
   226 00000144 7403E9(0000)            	jne error
   227                                  
   228 00000149 E8(0000)                	call skipcomma
   229 0000014C 3C2E                    	cmp al, '.'		; special ?
   230 0000014E 7405                    	je short .writeprompt	; yes -->
   231 00000150 E8(0000)                	call iseol?
   232 00000153 7568                    	jne short .noprompt
   233                                  .writeprompt:
   234                                  				; si -> behind dot if any
   235 00000155 BF[0000]                	mov di, line_out
   236 00000158 56                      	push si
   237 00000159 8B76F8                  	mov si, word [bp + ?memsizestring]
   238                                  				; si -> size string (ASCIZ)
   239 0000015C A8                      	db __TEST_IMM8		; (skip stosb)
   240                                  @@:
   241 0000015D AA                      	stosb			; store next byte
   242 0000015E AC                      	lodsb			; load next byte
   243 0000015F 84C0                    	test al, al		; is zero ?
   244 00000161 75FA                    	jnz @B			; not yet, loop -->
   245 00000163 5E                      	pop si			; (preserve si)
   246 00000164 B8205B                  	mov ax, " ["
   247 00000167 AB                      	stosw
   248 00000168 8B46FA                  	mov ax, word [bp + ?segsel]
   249 0000016B 89C3                    	mov bx, ax
   250 0000016D E8(0000)                	call hexword
   251 00000170 B03A                    	mov al, ':'
   252 00000172 AA                      	stosb
   253 00000173 66                      	_386_PM_o32
   254 00000174 8B46FC                  	mov ax, word [bp + ?offset]
   255                                  %if _PM
   256 00000177 E8(0000)                	call test_high_limit	; 32-bit segment ?
   257 0000017A 7403                    	jz .16
   258 0000017C E8(0000)                	call hexword_high
   259                                  .16:
   260                                  %endif
   261 0000017F E8(0000)                	call hexword
   262 00000182 B85D20                  	mov ax, "] "
   263 00000185 AB                      	stosw
   264                                  
   265 00000186 E84800                  	call rr1_read_mem_dxax
   266                                  
   267 00000189 80F904                  	cmp cl, 4
   268 0000018C 7207                    	jb .pnohigh
   269 0000018E 92                      	xchg ax, dx
   270 0000018F E8(0000)                	call hexword		; display high word
   271 00000192 92                      	xchg ax, dx
   272 00000193 EB0C                    	jmp @F
   273                                  .pnohigh:
   274 00000195 80F903                  	cmp cl, 3
   275 00000198 720A                    	jb @FF
   276 0000019A 86C2                    	xchg al, dl
   277 0000019C E8(0000)                	call hexbyte
   278 0000019F 86C2                    	xchg al, dl
   279                                  @@:
   280                                  %if _RSEPARATE
   281 000001A1 E82100                  	call rseparate
   282                                  %endif
   283                                  @@:
   284 000001A4 80F902                  	cmp cl, 2
   285 000001A7 7207                    	jb .pnobyte
   286 000001A9 86C4                    	xchg al, ah
   287 000001AB E8(0000)                	call hexbyte		; display high byte
   288 000001AE 86C4                    	xchg al, ah
   289                                  .pnobyte:
   290 000001B0 E8(0000)                	call hexbyte		; display low byte
   291                                  
   292                                  %if _MS_PROMPT_COMPAT
   293 000001B3 B000                    	mov al, 0
   294                                  %endif
   295 000001B5 E8F204                  	call dot_prompt
   296 000001B8 7503E90702              	je .return
   297                                  .noprompt:
   298 000001BD 31C9                    	xor cx, cx
   299 000001BF 8A4EF6                  	mov cl, byte [bp + ?size]
   300 000001C2 E9D000                  	jmp rr1_common
   301                                  
   302                                  
   303                                  %if _RSEPARATE
   304                                  rseparate:
   305 000001C5 F606[0200]20            	testopt [options2], opt2_r_separate
   306 000001CA 7404                    	jz @F
   307 000001CC C6055F                  	mov byte [di], '_'
   308 000001CF 47                      	inc di
   309                                  @@:
   310 000001D0 C3                      	retn
   311                                  %endif
   312                                  
   313                                  
   314                                  ..@rr_variable_read_access_start:
   315                                  		; OUT:	cl = ?size
   316                                  		;	dx:ax = value read from memory
   317                                  		; CHG:	bx
   318                                  rr1_read_mem_dxax:
   319 000001D1 E8(0000)                	call prephack
   320 000001D4 E8(0000)                	call dohack
   321 000001D7 31C0                    	xor ax, ax
   322 000001D9 31D2                    	xor dx, dx
   323 000001DB 8A4EF6                  	mov cl, byte [bp + ?size]
   324                                  %if _PM
   325 000001DE 8B5EFA                  	mov bx, word [bp + ?segsel]
   326 000001E1 E8(0000)                	call test_high_limit	; 32-bit segment ?
   327 000001E4 8EDB                    	mov ds, bx
   328                                  %else
   329                                  	mov ds, word [bp + ?segsel]
   330                                  %endif
   331 000001E6 66                      	_386_PM_o32
   332 000001E7 8B5EFC                  	mov bx, word [bp + ?offset]
   333                                  %if _PM
   334 000001EA 741D                    	jz .16
   335                                  
   336                                  [cpu 386]
   337                                  .32:
   338 000001EC 80F902                  	cmp cl, 2
   339 000001EF 7213                    	jb .32_1
   340 000001F1 740D                    	je .32_2
   341 000001F3 80F904                  	cmp cl, 4
   342 000001F6 7204                    	jb .32_3
   343                                  .32_4:
   344 000001F8 678A7303                	mov dh, byte [ebx + 3]
   345                                  .32_3:
   346 000001FC 678A5302                	mov dl, byte [ebx + 2]
   347                                  .32_2:
   348 00000200 678A6301                	mov ah, byte [ebx + 1]
   349                                  .32_1:
   350 00000204 678A03                  	mov al, byte [ebx]
   351 00000207 EB17                    	jmp .ret
   352                                  __CPU__
   353                                  %endif
   354                                  
   355                                  .16:
   356 00000209 80F902                  	cmp cl, 2
   357 0000020C 7210                    	jb .16_1
   358 0000020E 740B                    	je .16_2
   359 00000210 80F904                  	cmp cl, 4
   360 00000213 7203                    	jb .16_3
   361                                  .16_4:
   362 00000215 8A7703                  	mov dh, byte [bx + 3]
   363                                  .16_3:
   364 00000218 8A5702                  	mov dl, byte [bx + 2]
   365                                  .16_2:
   366 0000021B 8A6701                  	mov ah, byte [bx + 1]
   367                                  .16_1:
   368 0000021E 8A07                    	mov al, byte [bx]
   369                                  .ret:
   370 00000220 16                      	push ss
   371 00000221 1F                      	pop ds
   372 00000222 E9(0000)                	jmp unhack
   373                                  ..@rr_variable_read_access_end:
   374                                  
   375                                  
   376                                  rr1_variable:
   377 00000225 897EF2                  	mov word [rrmask], di	; -> mask of read-only bits
   378 00000228 88C8                    	mov al, cl
   379 0000022A B100                    	mov cl, 0
   380 0000022C 4E                      	dec si			; (to reload al)
   381 0000022D 50                      	 push ax		; h = variable's field type, l = its size
   382 0000022E B400                    	mov ah, 0
   383 00000230 8946F6                  	mov word [bp + ?ismem_high_size_low], ax
   384 00000233 86CD                    	xchg cl, ch		; cx = variable's name's length
   385                                  
   386 00000235 E8(0000)                	call skipcomma
   387 00000238 3C2E                    	cmp al, '.'		; special ?
   388 0000023A 7405                    	je short .writeprompt	; yes -->
   389 0000023C E8(0000)                	call iseol?
   390 0000023F 7547                    	jne short .noprompt
   391                                  .writeprompt:
   392 00000241 56                      	 push si		; -> behind dot if any
   393 00000242 8D76DE                  	lea si, [bp + ?namebuffer]
   394                                  				; -> name
   395 00000245 BF[0000]                	mov di, line_out
   396 00000248 F3A4                    	rep movsb
   397 0000024A 5E                      	 pop si			; -> behind dot if any
   398 0000024B B020                    	mov al, 32
   399 0000024D AA                      	stosb
   400 0000024E 59                      	 pop cx 		; h = variable's field type, l = its size
   401 0000024F 87DA                    	xchg bx, dx
   402 00000251 8B07                    	mov ax, word [bx]
   403 00000253 87DA                    	xchg bx, dx
   404 00000255 51                      	 push cx
   405 00000256 80F904                  	cmp cl, 4
   406 00000259 7205                    	jb .pnohigh
   407 0000025B E8(0000)                	call hexword		; display high word
   408 0000025E EB08                    	jmp @F
   409                                  .pnohigh:
   410 00000260 80F903                  	cmp cl, 3
   411 00000263 7206                    	jb @FF
   412 00000265 E8(0000)                	call hexbyte
   413                                  @@:
   414                                  %if _RSEPARATE
   415 00000268 E85AFF                  	call rseparate
   416                                  %endif
   417                                  @@:
   418 0000026B 8B07                    	mov ax, word [bx]
   419 0000026D 80F902                  	cmp cl, 2
   420 00000270 7207                    	jb .pnobyte
   421 00000272 86C4                    	xchg al, ah
   422 00000274 E8(0000)                	call hexbyte		; display high byte
   423 00000277 86C4                    	xchg al, ah
   424                                  .pnobyte:
   425 00000279 E8(0000)                	call hexbyte		; display low byte
   426                                  %if _MS_PROMPT_COMPAT
   427 0000027C B002                    	mov al, 2
   428                                  %endif
   429 0000027E E82904                  	call dot_prompt
   430 00000281 59                      	 pop cx			; h = variable's field type, l = its size
   431 00000282 7503E93D01              	je .return
   432 00000287 A8                      	db __TEST_IMM8		; (skip pop)
   433                                  .noprompt:
   434 00000288 59                      	 pop cx			; h = variable's field type, l = its size
   435                                  %if _MMXSUPP
   436 00000289 894EEE                  	mov word [bp + ?mmx_isvar_type], cx
   437                                  %endif
   438 0000028C 84ED                    	test ch, ch
   439 0000028E 7403E93501              	jnz rr1_readonly_or_mmx
   440                                  rr1_common_do_mmx:
   441 00000293 53                      	 push bx
   442 00000294 52                      	 push dx
   443                                  rr1_common:
   444 00000295 884EF4                  	mov byte [rrtype], cl
   445 00000298 51                      	push cx
   446 00000299 50                      	push ax
   447 0000029A 56                      	push si
   448 0000029B E8(0000)EB02[0000]      	nearcall isoperator?
   449 000002A2 7511                    	jne .nooperator
   450 000002A4 89CB                    	mov bx, cx
   451 000002A6 01DB                    	add bx, bx		; bh = 0 !
   452 000002A8 50                      	push ax
   453 000002A9 E8(0000)EB02[0000]      	nearcall ..@call_operator_dispatchers
   454 000002B0 58                      	pop ax
   455 000002B1 85DB                    	test bx, bx
   456 000002B3 7504                    	jnz .gotoperator
   457                                  .nooperator:
   458 000002B5 BB1900                  	mov bx, OPERATOR_RIGHTOP; set default computation function
   459 000002B8 A8                      	db __TEST_IMM8
   460                                  .gotoperator:
   461 000002B9 AC                      	lodsb
   462                                  
   463 000002BA E82104                  	call isassignmentoperator?
   464 000002BD 731B                    	jnc .assign_op_done	; found an assignment operator -->
   465 000002BF 83FB19                  	cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ?
   466 000002C2 7416                    	je .assign_op_done	; yes, assignment operator not required -->
   467 000002C4 59                      	pop cx
   468 000002C5 58                      	pop ax			; restore al, si in front of operator
   469 000002C6 50                      	push ax
   470 000002C7 51                      	push cx
   471 000002C8 87F1                    	xchg si, cx
   472 000002CA 51                      	push cx
   473 000002CB E8(0000)EB02[0000]      	nearcall isunaryoperator?; is this a valid unary operator too ?
   474 000002D2 59                      	pop cx
   475 000002D3 74E0                    	je .nooperator		; yes -->
   476 000002D5 87F1                    	xchg si, cx
   477                                  errorj9: equ $
   478 000002D7 E9(0000)                	jmp error		; error where the assignment operator needs to be
   479                                  .assign_op_done:
   480 000002DA 59                      	pop cx
   481 000002DB 59                      	pop cx
   482 000002DC 59                      	pop cx
   483 000002DD 53                      	 push bx
   484 000002DE 80FB18                  	cmp bl, OPERATOR_COND
   485 000002E1 7503E9(0000)            	je error
   486 000002E6 E8(0000)                	call skipcomm0
   487                                  
   488 000002E9 E8(0000)EB02[0000]      	nearcall getexpression	; bx:dx = expression result
   489 000002F0 8866F5                  	mov byte [bp + ?hhtype], ah
   490 000002F3 8976F0                  	mov word [bp + ?hhoffset], si
   491 000002F6 E8(0000)                	call chkeol
   492 000002F9 59                      	pop cx			; operator computation function
   493                                  
   494 000002FA 807EF700                	cmp byte [bp + ?ismem], 0
   495 000002FE 7419                    	je .var_hhvar
   496                                  
   497                                  .mem_hhvar:
   498 00000300 89C7                    	mov di, ax
   499 00000302 89D6                    	mov si, dx
   500 00000304 53                      	push bx
   501 00000305 51                      	push cx
   502 00000306 E8C8FE                  	call rr1_read_mem_dxax
   503 00000309 59                      	pop cx
   504 0000030A 5B                      	pop bx
   505 0000030B 52                      	push dx
   506 0000030C 50                      	push ax
   507 0000030D 89F8                    	mov ax, di
   508 0000030F 89F2                    	mov dx, si
   509 00000311 BF[0000]                	mov di, mask_4byte	; di -> zero
   510 00000314 BE[0200]                	mov si, mask_4byte + 2	; si -> zero
   511                                  
   512 00000317 EB06                    	jmp .common_hhvar
   513                                  
   514                                  .var_hhvar:
   515 00000319 5E                      	pop si			; si-> high word
   516 0000031A 5F                      	pop di			; di-> low word
   517 0000031B FF34                    	push word [si]
   518 0000031D FF35                    	push word [di]
   519                                  
   520                                  .common_hhvar:
   521 0000031F 8F06[0000]              	pop word [hhvar]
   522 00000323 8F06[0200]              	pop word [hhvar+2]	; save variable's current value (as left operand)
   523                                  
   524 00000327 C606[0000]00            	mov byte [hhtype], 0	; type info signed=0 pointer=0
   525 0000032C 807EF404                	cmp byte [rrtype], 4
   526 00000330 7317                    	jae .cleardword
   527 00000332 807EF402                	cmp byte [rrtype], 2
   528 00000336 770C                    	ja .clearthreebyte
   529 00000338 7405                    	je .clearword
   530                                  .clearbyte:
   531 0000033A C606[0100]00            	mov byte [hhvar + 1], 0	; clear second byte
   532                                  .clearword:
   533 0000033F C606[0200]00            	mov byte [hhvar + 2], 0	; clear third byte
   534                                  .clearthreebyte:
   535 00000344 C606[0300]00            	mov byte [hhvar + 3], 0	; clear fourth byte
   536                                  .cleardword:
   537 00000349 87CB                    	xchg cx, bx
   538 0000034B 01DB                    	add bx, bx
   539 0000034D 8B9F[0000]              	mov bx, word [bx + operatorfunctions]
   540 00000351 87CB                    	xchg cx, bx		; cx = operator function
   541 00000353 8A66F5                  	mov ah, byte [bp + ?hhtype]
   542                                  %if _DUALCODE && _EXPRDUALCODE
   543 00000356 E8(0000)EB02[0400]      	nearcall ..@rr_operatorfunctions
   544                                  %else
   545                                  	call cx			; compute
   546                                  %endif
   547 0000035D E8(0000)EB02[0000]      	nearcall getexpression.countsignificantbits
   548 00000364 53                      	push bx
   549 00000365 56                      	push si
   550 00000366 31DB                    	xor bx, bx
   551 00000368 8A5EF4                  	mov bl, byte [rrtype]
   552 0000036B 01DB                    	add bx, bx
   553 0000036D 8B76F0                  	mov si, word [bp + ?hhoffset]
   554                                  %if _DUALCODE && _EXPRDUALCODE
   555 00000370 E8(0000)EB02[0000]      	nearcall ..@rr_checksignificantbits
   556                                  
   557                                  	usesection lDEBUG_CODE2
   557          ------------------       note: usesection lDEBUG_CODE2
   558                                  ..@rr_checksignificantbits: section_of_function
   559 00000000 FFA7[0000]              	jmp near word [checksignificantbits_table + bx]
   560                                  
   561                                  	usesection lDEBUG_CODE
   561          ------------------       note: usesection lDEBUG_CODE
   562                                  %else
   563                                  	call near word [checksignificantbits_table + bx]
   564                                  %endif
   565 00000377 5E                      	pop si
   566 00000378 5B                      	pop bx
   567                                  
   568 00000379 97                      		xchg ax, di	; ax -> low word of variable
   569 0000037A 8B7EF2                  	mov di, word [rrmask]	; di -> mask dword
   570 0000037D 53                      	 push bx		; use bx as a scratch space
   571 0000037E 8B0D                    	mov cx, word [di]	; = low word of mask
   572 00000380 51                      	  push cx		; preserve low word of mask
   573 00000381 97                      		xchg ax, di	; di -> low word of variable
   574 00000382 230D                    	and cx, word [di]	; cx = low word value to preserve
   575 00000384 5B                      	  pop bx		; = low word of mask
   576 00000385 F7D3                    	not bx			; = bitmask of bits to use from result
   577 00000387 21DA                    	and dx, bx		; dx = bits to use from result low word
   578 00000389 09CA                    	or dx, cx		; dx = low word compound
   579 0000038B 5B                      	 pop bx			; restore high word after scratch use
   580 0000038C 97                      		xchg ax, di	; di -> mask dword
   581 0000038D 52                      	 push dx		; use dx as a scratch space
   582 0000038E 8B4D02                  	mov cx, word [di + 2]	; = high word of mask
   583 00000391 51                      	  push cx		; preserve high word of mask
   584 00000392 230C                    	and cx, word [si]	; cx = high word value to preserve
   585 00000394 5A                      	  pop dx		; = high word of mask
   586 00000395 F7D2                    	not dx			; = bitmask of bits to use from result
   587 00000397 21D3                    	and bx, dx		; bx = bits to use from result high word
   588 00000399 09CB                    	or bx, cx
   589 0000039B 5A                      	 pop dx			; restore low word after scratch use
   590 0000039C 97                      		xchg ax, di	; di -> low word of variable
   591                                  
   592                                  %if _MMXSUPP
   593 0000039D 807EEF00                	cmp byte [bp + ?mmx_isvar_type + 1], 0
   594 000003A1 7403E9FA00              	jne rr1_mmx_set
   595                                  %endif
   596 000003A6 807EF700                	cmp byte [bp + ?ismem], 0
   597 000003AA 7544                    	jne rr1_mem_set
   598                                  
   599                                  .var_set:
   600 000003AC 807EF402                	cmp byte [rrtype], 2
   601 000003B0 7210                    	jb .setbyte
   602 000003B2 740B                    	je .setword
   603 000003B4 807EF404                	cmp byte [rrtype], 4
   604 000003B8 7203                    	jb .setthreebyte
   605                                  .setdword:
   606 000003BA 887C01                  	mov byte [si + 1], bh	; set fourth byte
   607                                  .setthreebyte:
   608 000003BD 881C                    	mov byte [si], bl	; set third byte
   609                                  .setword:
   610 000003BF 887501                  	mov byte [di + 1], dh	; set second byte
   611                                  .setbyte:
   612 000003C2 8815                    	mov byte [di], dl	; set first byte
   613                                  .return:
   614                                  rr1_memory.return:
   615                                  rr1_variable.return:
   616 000003C4 89EC5D                  	lleave code
   617                                  rr1b:
   618 000003C7 C3                      	retn
   619                                  
   620                                  
   621                                  rr1_readonly_or_mmx:
   622                                  %if _MMXSUPP
   623 000003C8 80FD01                  	cmp ch, 1
   624 000003CB 7415                    	je rr1_readonly
   625 000003CD 803E[0000]00            	cmp byte [has_mmx], 0
   626 000003D2 7403E9BCFE              	jne rr1_common_do_mmx
   627 000003D7 BA[0000]                	mov dx, msg.internal_error_no_mmx
   628 000003DA B80C01                  	mov ax, 010Ch
   629 000003DD E8(0000)                	call setrc
   630 000003E0 EB03                    	jmp rr1_readonly.error
   631                                  %endif
   632                                  
   633                                  rr1_readonly:
   634 000003E2 BA[0000]                	mov dx, msg.readonly
   635                                  .error:
   636 000003E5 E8(0000)                	call putsz_error
   637 000003E8 B80A01                  	mov ax, 010Ah
   638 000003EB E8(0000)                	call setrc
   639 000003EE EBD4                    	jmp rr1_variable.return
   640                                  
   641                                  
   642                                  ..@rr_variable_write_access_start:
   643                                  rr1_mem_set:
   644 000003F0 89D0                    	mov ax, dx
   645 000003F2 89DA                    	mov dx, bx
   646                                  
   647 000003F4 E8(0000)                	call prephack
   648 000003F7 E8(0000)                	call dohack
   649 000003FA 8A4EF6                  	mov cl, byte [bp + ?size]
   650                                  %if _PM
   651 000003FD 8B5EFA                  	mov bx, word [bp + ?segsel]
   652 00000400 E8(0000)                	call verifysegm
   653 00000403 7303E98700              	jc .ro
   654 00000408 E8(0000)                	call test_high_limit	; 32-bit segment ?
   655 0000040B 8EDB                    	mov ds, bx
   656                                  %else
   657                                  	mov ds, word [bp + ?segsel]
   658                                  %endif
   659 0000040D 66                      	_386_PM_o32
   660 0000040E 8B5EFC                  	mov bx, word [bp + ?offset]
   661                                  %if _PM
   662 00000411 7440                    	jz .16
   663                                  
   664                                  [cpu 386]
   665                                  .32:
   666 00000413 80F902                  	cmp cl, 2
   667 00000416 7213                    	jb .32_1
   668 00000418 740D                    	je .32_2
   669 0000041A 80F904                  	cmp cl, 4
   670 0000041D 7204                    	jb .32_3
   671                                  .32_4:
   672 0000041F 67887303                	mov byte [ebx + 3], dh
   673                                  .32_3:
   674 00000423 67885302                	mov byte [ebx + 2], dl
   675                                  .32_2:
   676 00000427 67886301                	mov byte [ebx + 1], ah
   677                                  .32_1:
   678 0000042B 678803                  	mov byte [ebx], al
   679                                  
   680                                  .32_check:
   681 0000042E 80F902                  	cmp cl, 2
   682 00000431 7219                    	jb .32_check_1
   683 00000433 7411                    	je .32_check_2
   684 00000435 80F904                  	cmp cl, 4
   685 00000438 7206                    	jb .32_check_3
   686                                  .32_check_4:
   687 0000043A 673A7303                	cmp dh, byte [ebx + 3]
   688 0000043E 754F                    	jne .ro
   689                                  .32_check_3:
   690 00000440 673A5302                	cmp dl, byte [ebx + 2]
   691 00000444 7549                    	jne .ro
   692                                  .32_check_2:
   693 00000446 673A6301                	cmp ah, byte [ebx + 1]
   694 0000044A 7543                    	jne .ro
   695                                  .32_check_1:
   696 0000044C 673A03                  	cmp al, byte [ebx]
   697 0000044F 753E                    	jne .ro
   698 00000451 EB36                    	jmp .ret
   699                                  __CPU__
   700                                  %endif
   701                                  
   702                                  .16:
   703 00000453 80F902                  	cmp cl, 2
   704 00000456 7210                    	jb .16_1
   705 00000458 740B                    	je .16_2
   706 0000045A 80F904                  	cmp cl, 4
   707 0000045D 7203                    	jb .16_3
   708                                  .16_4:
   709 0000045F 887703                  	mov byte [bx + 3], dh
   710                                  .16_3:
   711 00000462 885702                  	mov byte [bx + 2], dl
   712                                  .16_2:
   713 00000465 886701                  	mov byte [bx + 1], ah
   714                                  .16_1:
   715 00000468 8807                    	mov byte [bx], al
   716                                  
   717                                  .16_check:
   718 0000046A 80F902                  	cmp cl, 2
   719 0000046D 7216                    	jb .16_check_1
   720 0000046F 740F                    	je .16_check_2
   721 00000471 80F904                  	cmp cl, 4
   722 00000474 7205                    	jb .16_check_3
   723                                  .16_check_4:
   724 00000476 3A7703                  	cmp dh, byte [bx + 3]
   725 00000479 7514                    	jne .ro
   726                                  .16_check_3:
   727 0000047B 3A5702                  	cmp dl, byte [bx + 2]
   728 0000047E 750F                    	jne .ro
   729                                  .16_check_2:
   730 00000480 3A6701                  	cmp ah, byte [bx + 1]
   731 00000483 750A                    	jne .ro
   732                                  .16_check_1:
   733 00000485 3A07                    	cmp al, byte [bx]
   734 00000487 7506                    	jne .ro
   735                                  .ret:
   736 00000489 E8(0000)                	call ee0a		; calls unhack
   737                                  rr1_memory.return_j1: equ $
   738 0000048C E935FF                  	jmp rr1_memory.return
   739                                  
   740                                  .ro:
   741 0000048F E8(0000)                	call ee0a
   742 00000492 BA[0000]                	mov dx, msg.readonly_mem
   743 00000495 E8(0000)                	call putsz_error
   744 00000498 B80B01                  	mov ax, 010Bh
   745 0000049B E8(0000)                	call setrc
   746 0000049E EBEC                    	jmp short rr1_memory.return_j1
   747                                  ..@rr_variable_write_access_end:
   748                                  
   749                                  %if _MMXSUPP
   750                                  		; INP:	bx:dx = number
   751                                  		;	byte [bp + ?mmx_isvar_type] = type/register
   752                                  rr1_mmx_set:
   753                                  subcpu 586
   754 000004A0 8A46EF                  	mov al, byte [bp + ?mmx_isvar_type + 1]
   755 000004A3 48                      	dec ax
   756 000004A4 48                      	dec ax			; undo encoding for isvar type return
   757 000004A5 89D9                    	mov cx, bx		; cx:dx = number
   758 000004A7 88C3                    	mov bl, al
   759 000004A9 80E307                  	and bl, 7		; = register number
   760 000004AC 83E018                  	and ax, 11_000b		; = type of write
   761 000004AF C1E802                  	shr ax, 2		; = index into table
   762                                  
   763                                   %if _PM
   764 000004B2 52                      	push dx
   765 000004B3 8B16[0000]              	mov dx, word [code_seg]
   766 000004B7 E8(0000)                	call setes2dx		; es => lDEBUG_CODE (writable)
   767 000004BA 5A                      	pop dx
   768                                  %else
   769                                  	mov es, word [code_seg]	; es => lDEBUG_CODE
   770                                  %endif
   771 000004BB C0E303                  	shl bl, 3		; shift into reg field
   772 000004BE 80CB07                  	or bl, 07h		; code to get our ModR/M byte (r/m = [bx])
   773 000004C1 26881E[D604]            	mov byte [es:.getmmx_modrm], bl
   774                                  				; SMC in section lDEBUG_CODE
   775 000004C6 26881E[E004]            	mov byte [es:.setmmx_modrm], bl
   776                                  				; SMC in section lDEBUG_CODE
   777 000004CB EB00                    	jmp @F			; try to invalidate prefetch
   778                                  @@:
   779 000004CD 16                      	push ss
   780 000004CE 07                      	pop es
   781 000004CF 83EC08                  	sub sp, 8
   782 000004D2 89E3                    	mov bx, sp
   783                                  .getmmx_modrm: equ $+2	; (opcode adjusted for the right MMX reg)
   784 000004D4 0F7F07                  	movq qword [bx], mm0
   785                                  
   786 000004D7 97                      	xchg ax, di
   787 000004D8 31C0                    	xor ax, ax		; = 0
   788 000004DA FF95[0A00]              	call near [mmx_set_table + di]
   789                                  
   790                                  .setmmx_modrm: equ $+2	; (opcode adjusted for the right MMX reg)
   791 000004DE 0F6F07                  	movq mm0, qword [bx]
   792 000004E1 83C408                  	add sp, 8
   793 000004E4 EBA6                    	jmp short rr1_memory.return_j1
   794                                  
   795                                  .signextend:
   796 000004E6 85C9                    	test cx, cx
   797 000004E8 7901                    	jns .zeroextend
   798 000004EA 48                      	dec ax			; = -1
   799                                  
   800                                  .zeroextend:
   801 000004EB 894704                  	mov word [bx + 4], ax
   802 000004EE 894706                  	mov word [bx + 6], ax
   803                                  	;; jmp short .lowonly
   804                                  	; fall through
   805                                  
   806                                  .lowonly:
   807 000004F1 8917                    	mov word [bx], dx
   808 000004F3 894F02                  	mov word [bx + 2], cx
   809 000004F6 C3                      	retn
   810                                  
   811                                  .highonly:
   812 000004F7 895704                  	mov word [bx + 4], dx
   813 000004FA 894F06                  	mov word [bx + 6], cx
   814 000004FD C3                      	retn
   815                                  
   816                                  subcpureset
   817                                  %endif
   818                                  
   819                                  
   820                                  	lleave ctx
   821                                  
   822                                  
   823                                  	usesection lDEBUG_DATA_ENTRY
   823          ------------------       note: usesection lDEBUG_DATA_ENTRY
   824                                  %if _LINK_COMPAT
   825                                  	align 4, db 0
   826                                  %endif
   827                                  
   828                                  	align 2, db 0
   829                                  checksignificantbits_table:
   830 00000000 [0000]                  	dw error_expr
   831 00000002 [0000]                  	dw getbyte.checksignificantbits
   832 00000004 [0000]                  	dw getword.checksignificantbits
   833 00000006 [0000]                  	dw get3byte.checksignificantbits
   834 00000008 [0000]                  	dw retn_expr
   835                                  
   836                                  %if _MMXSUPP
   837                                  	align 2, db 0
   838                                  mmx_set_table:
   839                                  		;	  0 zero extension from 32 bits to write all 64 bits
   840                                  		;	  1 sign extension from 32 bits to write all 64 bits
   841                                  		;	  2 writes only low 32 bits
   842                                  		;	  3 writes only high 32 bits
   843 0000000A [EB04]                  	dw rr1_mmx_set.zeroextend
   844 0000000C [E604]                  	dw rr1_mmx_set.signextend
   845 0000000E [F104]                  	dw rr1_mmx_set.lowonly
   846 00000010 [F704]                  	dw rr1_mmx_set.highonly
   847                                  %endif
   848                                  
   849                                  	usesection lDEBUG_CODE
   849          ------------------       note: usesection lDEBUG_CODE
   850                                  
   851                                  
   852                                  		; Change flag register with mnemonics - F
   853                                  rr2:
   854 000004FE E8(0000)                	call capitalise
   855 00000501 3C46                    	cmp al, 'F'
   856 00000503 7403E9AE00              	jne rr3			; if not 'F' -->
   857 00000508 50                      	push ax
   858 00000509 8A04                    	mov al, byte [si]
   859 0000050B E8(0000)EB02[0000]      	nearcall isseparator?	; valid separator ?
   860 00000512 58                      	pop ax
   861 00000513 7403E99E00              	jne rr3			; no -->
   862                                  .ef:
   863 00000518 E8(0000)                	call skipcomma
   864 0000051B 3C2E                    	cmp al, '.'		; special ?
   865 0000051D 7405                    	je .writeprompt		; yes -->
   866 0000051F E8(0000)                	call iseol?		; end of line ?
   867 00000522 7517                    	jne .noprompt		; no -->
   868                                  .writeprompt:
   869 00000524 BF[0000]                	mov di, line_out
   870                                  %if _REGSHIGHLIGHT
   871 00000527 800E[0200]02            	setopt [internalflags3], dif3_do_not_highlight
   872                                  %endif
   873 0000052C 56                      	push si
   874 0000052D E8BC06                  	call dmpflags
   875 00000530 5E                      	pop si			; -> behind dot if any
   876                                  %if _MS_PROMPT_COMPAT
   877 00000531 B004                    	mov al, 4
   878                                  %endif
   879 00000533 E87401                  	call dot_prompt
   880 00000536 7503E98CFE              	je rr1b			; if no change
   881                                  .noprompt:
   882                                  
   883 0000053B E8A001                  	call isassignmentoperator?
   884 0000053E 56                      	push si
   885 0000053F 7308                    	jnc .noteol		; at least one value is required -->
   886                                  .check_loop:
   887 00000541 E8(0000)                	call skipcomm0
   888 00000544 E8(0000)                	call iseol?
   889 00000547 7424                    	je .really		; return if done
   890                                  .noteol:
   891 00000549 E8(0000)                	call capitalise
   892 0000054C 86C4                    	xchg al, ah
   893 0000054E AC                      	lodsb
   894 0000054F E8(0000)                	call capitalise
   895 00000552 86C4                    	xchg al, ah		; ax = mnemonic
   896 00000554 BF[0000]                	mov di, flagson
   897 00000557 B91000                  	mov cx, 16
   898 0000055A F2AF                    	repne scasw
   899 0000055C 750B                    	jne short .errordec	; if no match
   900 0000055E AC                      	lodsb
   901 0000055F E8(0000)EB02[0000]      	nearcall isseparator?
   902 00000566 74D9                    	je .check_loop
   903                                  .errordec2:
   904 00000568 4E                      	dec si
   905                                  .errordec:
   906                                  errordec: equ $
   907 00000569 4E                      	dec si			; back up one before flagging an error
   908 0000056A E9(0000)                	jmp error
   909                                  
   910                                  .really:
   911 0000056D 5E                      	pop si
   912 0000056E 4E                      	dec si
   913 0000056F AC                      	lodsb
   914                                  .loop:
   915 00000570 E8(0000)                	call iseol?
   916 00000573 7503E94FFE              	je rr1b			; return if done
   917                                  
   918 00000578 E8(0000)                	call capitalise
   919 0000057B 86C4                    	xchg al, ah
   920 0000057D AC                      	lodsb
   921 0000057E E8(0000)                	call capitalise
   922 00000581 86C4                    	xchg al, ah		; ax = mnemonic
   923                                  
   924 00000583 BF[0000]                	mov di, flagson
   925 00000586 B91000                  	mov cx, 16
   926 00000589 F2AF                    	repne scasw
   927 0000058B 75DC                    	jne short .errordec	; if no match
   928 0000058D 81FF[0000]              	cmp di, flagsoff
   929 00000591 770A                    	ja .clear		; if we're clearing
   930                                  %if _LINK
   931 00000593 8B85[FEFF]              	mov ax, word [word di + flagbits - 2]
   932                                   wlcalc word_minusext_flagson, equ $ - 2
   933                                  %elif _LINK_COMPAT
   934                                  	mov ax, word [word di-(flagson-flagbits)-2]
   935                                  %else
   936                                  	mov ax, word [di-(flagson-flagbits)-2]
   937                                  %endif
   938 00000597 0906[0000]              	or word [reg_efl], ax	; set the bit
   939 0000059B EB0A                    	jmp short .common
   940                                  .clear:
   941                                  %if _LINK
   942 0000059D 8B85[FEFF]              	mov ax, word [word di + flagbits - 2]
   943                                   wlcalc word_minusext_flagsoff, equ $ - 2
   944                                  %elif _LINK_COMPAT
   945                                  	mov ax, word [word di-(flagsoff-flagbits)-2]
   946                                  %else
   947                                  	mov ax, word [di-(flagsoff-flagbits)-2]
   948                                  %endif
   949 000005A1 F7D0                    	not ax
   950 000005A3 2106[0000]              	and word [reg_efl], ax	; clear the bit
   951                                  .common:
   952 000005A7 AC                      	lodsb
   953 000005A8 E8(0000)EB02[0000]      	nearcall isseparator?
   954 000005AF 75B7                    	jne short .errordec2
   955 000005B1 E8(0000)                	call skipcomm0
   956 000005B4 EBBA                    	jmp short .loop
   957                                  
   958                                  		; Change flag register with mnemonics - EF
   959                                  rr3:
   960 000005B6 86C4                    	xchg al, ah
   961 000005B8 AC                      	lodsb
   962 000005B9 E8(0000)                	call capitalise
   963 000005BC 86C4                    	xchg al, ah		; ax = next two characters
   964 000005BE 3D4546                  _386	cmp ax, "EF"
   965 000005C1 750F                    _386	jne rr4			; if not "EF" -->
   966 000005C3 50                      _386	push ax
   967 000005C4 8A04                    _386	mov al, byte [si]
   968 000005C6 E8(0000)EB02[0000]      _386	nearcall isseparator?	; valid separator ?
   969 000005CD 58                      _386	pop ax
   970 000005CE 0F8446FF                _386	je rr2.ef
   971                                  
   972                                  		; Change a single flag with mnemonic
   973                                  rr4:
   974 000005D2 BF[0000]                	mov di, flagnames
   975 000005D5 B90800                  	mov cx, 8
   976 000005D8 F2AF                    	repne scasw
   977 000005DA 758D                    	jne short rr2.errordec
   978 000005DC 89C2                    	mov dx, ax
   979 000005DE AC                      	lodsb
   980 000005DF E8(0000)EB02[0000]      	nearcall isseparator?
   981 000005E6 7580                    	jne rr2.errordec2
   982                                  %if _LINK
   983 000005E8 FFB5[FEFF]              	push word [word di + flagbits - 2]
   984                                   wlcalc word_minusext_flagnames, equ $ - 2
   985                                  %elif _LINK_COMPAT
   986                                  	push word [word di-(flagnames-flagbits)-2]
   987                                  %else
   988                                  	push word [di-(flagnames-flagbits)-2]
   989                                  %endif
   990 000005EC E8(0000)                	call skipcomm0
   991 000005EF 3C2E                    	cmp al, '.'		; special ?
   992 000005F1 7405                    	je .writeprompt		; yes -->
   993 000005F3 E8(0000)                	call iseol?
   994 000005F6 751B                    	jne .noprompt
   995                                  .writeprompt:
   996 000005F8 BF[0000]                	mov di, line_out
   997 000005FB 89D0                    	mov ax, dx
   998 000005FD AB                      	stosw
   999 000005FE 58                      	pop ax
  1000 000005FF 50                      	push ax
  1001 00000600 8506[0000]              	test word [reg_efl], ax	; is it off ?
  1002 00000604 B82030                  	mov ax, " 0"		; assume so
  1003 00000607 7402                    	jz .off			; it is off -->
  1004 00000609 FEC4                    	inc ah			; is on, set to '1'
  1005                                  .off:
  1006 0000060B AB                      	stosw
  1007                                  %if _MS_PROMPT_COMPAT
  1008 0000060C B000                    	mov al, 0
  1009                                  %endif
  1010 0000060E E89900                  	call dot_prompt
  1011 00000611 7403                    	je .ret_pop_j_ZR	; if no change -->
  1012                                  .noprompt:
  1013 00000613 E8(0000)                	call iseol?		; end of line ?
  1014                                  .ret_pop_j_ZR:
  1015 00000616 7503E98D00              	je .ret_pop		; yes, no change requested -->
  1016 0000061B 51                      	push cx
  1017 0000061C 50                      	push ax
  1018 0000061D 56                      	push si
  1019 0000061E E8(0000)EB02[0000]      	nearcall isoperator?
  1020 00000625 7523                    	jne .nooperator
  1021 00000627 89CB                    	mov bx, cx
  1022 00000629 01DB                    	add bx, bx		; bh = 0 !
  1023 0000062B 50                      	push ax
  1024 0000062C E8(0000)EB02[0000]      	nearcall ..@call_operator_dispatchers
  1025 00000633 58                      	pop ax
  1026 00000634 85DB                    	test bx, bx
  1027 00000636 7412                    	jz .nooperator
  1028                                  %if OPERATOR_BOOL_XOR != 1 + OPERATOR_BOOL_OR
  1029                                   %error Unexpected layout
  1030                                  %endif
  1031                                  %if OPERATOR_BOOL_AND != 1 + OPERATOR_BOOL_XOR
  1032                                   %error Unexpected layout
  1033                                  %endif
  1034 00000638 80FB17                  	cmp bl, OPERATOR_BOOL_AND
  1035 0000063B 770D                    	ja .nooperator
  1036 0000063D 80FB15                  	cmp bl, OPERATOR_BOOL_OR
  1037 00000640 730C                    	jae .gotoperator
  1038                                  %if OPERATOR_BOOL_OR != 1 + OPERATOR_BIT_AND
  1039                                   %error Unexpected layout
  1040                                  %endif
  1041                                  %if OPERATOR_BIT_XOR != 1 + OPERATOR_BIT_OR
  1042                                   %error Unexpected layout
  1043                                  %endif
  1044                                  %if OPERATOR_BIT_AND != 1 + OPERATOR_BIT_XOR
  1045                                   %error Unexpected layout
  1046                                  %endif
  1047                                  %if OPERATOR_BOOL_XOR - OPERATOR_BIT_XOR != OPERATOR_BOOL_AND - OPERATOR_BIT_AND
  1048                                   %error Unexpected layout
  1049                                  %endif
  1050                                  %if OPERATOR_BOOL_XOR - OPERATOR_BIT_XOR != OPERATOR_BOOL_OR - OPERATOR_BIT_OR
  1051                                   %error Unexpected layout
  1052                                  %endif
  1053 00000642 80C303                  	add bl, OPERATOR_BOOL_OR - OPERATOR_BIT_OR
  1054 00000645 80FB15                  	cmp bl, OPERATOR_BOOL_OR
  1055 00000648 7304                    	jae .gotoperator
  1056                                  .nooperator:
  1057 0000064A BB1900                  	mov bx, OPERATOR_RIGHTOP; set default computation function
  1058 0000064D A8                      	db __TEST_IMM8
  1059                                  .gotoperator:
  1060 0000064E AC                      	lodsb
  1061                                  
  1062 0000064F E88C00                  	call isassignmentoperator?
  1063 00000652 7308                    	jnc .assign_op_done	; found an assignment operator -->
  1064 00000654 83FB19                  	cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ?
  1065                                  %if 1	; since | ^ & are never unary operators
  1066 00000657 7403E9(0000)            	jne error
  1067                                  %else
  1068                                  	je .assign_op_done	; yes, assignment operator not required -->
  1069                                  	pop cx
  1070                                  	pop ax			; restore al, si in front of operator
  1071                                  	push ax
  1072                                  	push cx
  1073                                  	xchg si, cx
  1074                                  	push cx
  1075                                  	nearcall isunaryoperator?; is this a valid unary operator too ?
  1076                                  	pop cx
  1077                                  	je .nooperator		; yes -->
  1078                                  	xchg si, cx
  1079                                  	jmp error		; error where the assignment operator needs to be
  1080                                  %endif
  1081                                  .assign_op_done:
  1082 0000065C 59                      	pop cx
  1083 0000065D 59                      	pop cx
  1084 0000065E 59                      	pop cx
  1085 0000065F 53                      	 push bx
  1086 00000660 E8(0000)EB02[0000]      	nearcall getexpression
  1087 00000667 E8(0000)                	call chkeol
  1088 0000066A E8(0000)EB02[0000]      	nearcall toboolean
  1089 00000671 59                      	 pop cx			; operator index
  1090 00000672 31C0                    	xor ax, ax
  1091 00000674 A2[0000]                	mov byte [hhtype], al
  1092 00000677 A3[0200]                	mov word [hhvar+2], ax
  1093 0000067A 5E                      	 pop si
  1094 0000067B 56                      	 push si		; flag
  1095 0000067C 8536[0000]              	test word [reg_efl], si
  1096 00000680 7401                    	jz .notset
  1097 00000682 40                      	inc ax
  1098                                  .notset:
  1099 00000683 A3[0000]                	mov word [hhvar], ax
  1100 00000686 87CB                    	xchg cx, bx
  1101 00000688 01DB                    	add bx, bx
  1102 0000068A 8B9F[0000]              	mov bx, word [bx+operatorfunctions]
  1103 0000068E 87CB                    	xchg cx, bx		; cx = operator function
  1104                                  %if _DUALCODE && _EXPRDUALCODE
  1105 00000690 E8(0000)EB02[0400]      	nearcall ..@rr_operatorfunctions
  1106                                  
  1107                                  	usesection lDEBUG_CODE2
  1107          ------------------       note: usesection lDEBUG_CODE2
  1108                                  ..@rr_operatorfunctions: section_of_function
  1109 00000004 FFE1                    	jmp cx
  1110                                  
  1111                                  	usesection lDEBUG_CODE
  1111          ------------------       note: usesection lDEBUG_CODE
  1112                                  %else
  1113                                  	call cx			; compute
  1114                                  %endif
  1115 00000697 58                      	pop ax
  1116 00000698 85D2                    	test dx, dx
  1117 0000069A 7405                    	jz .clear
  1118 0000069C 0906[0000]              	or word [reg_efl], ax	; set the bit
  1119 000006A0 C3                      	retn
  1120                                  .clear:
  1121 000006A1 F7D0                    	not ax
  1122 000006A3 2106[0000]              	and word [reg_efl], ax	; clear the bit
  1123 000006A7 C3                      	retn
  1124                                  
  1125                                  .ret_pop:
  1126 000006A8 58                      	pop ax
  1127 000006A9 C3                      	retn
  1128                                  
  1129                                  
  1130                                  		; INP:	di-> behind prompt to display (in line_out)
  1131                                  		;	Iff byte[si-1] == '.',
  1132                                  		;	 only display without actual prompting
  1133                                  		;	 si-> line to check for EOL
  1134                                  		;	if _MS_PROMPT_COMPAT:
  1135                                  		;	 al = offset into dispatch tables, 0 or 2 or 4
  1136                                  		; OUT:	NZ iff actually prompted and got non-empty line,
  1137                                  		;	 al = first character
  1138                                  		;	 si-> next character
  1139                                  		;	 dx, bx preserved
  1140                                  		; CHG:	ax, cx, si, di, dx, bx
  1141                                  dot_prompt:
  1142 000006AA 807CFF2E                	cmp byte [si-1], '.'	; syntax for display without prompt ?
  1143 000006AE 7425                    	je .onlydisplay		; yes -->
  1144 000006B0 53                      	push bx
  1145 000006B1 52                      	push dx
  1146                                  %if _MS_PROMPT_COMPAT
  1147 000006B2 98                      	cbw			; ax = expand offset to word
  1148 000006B3 93                      	xchg bx, ax		; bx = offset
  1149 000006B4 BE[0000]                	mov si, table_getline_prepare_ms_debug
  1150 000006B7 F606[0200]10            	testopt [options2], opt2_r_prompt_compat
  1151 000006BC 7503                    	jnz @F
  1152 000006BE BE[0000]                	mov si, table_getline_prepare_ldebug
  1153                                  @@:
  1154 000006C1 FF10                    	call near [si + bx]	; call prefix/preparation function
  1155 000006C3 E8(0000)                	call getline00
  1156                                  %else
  1157                                  	call getline0
  1158                                  %endif
  1159 000006C6 5A                      	pop dx
  1160 000006C7 5B                      	pop bx
  1161 000006C8 E8(0000)                	call iseol?		; no change requested ?
  1162 000006CB 7410                    	je .ret			; yes --> (ZR)
  1163 000006CD 3C2E                    	cmp al, '.'		; other syntax for no change ?
  1164 000006CF 750C                    	jne .ret		; no --> (NZ)
  1165                                  .chkeol1:
  1166 000006D1 AC                      	lodsb
  1167 000006D2 E9(0000)                	jmp chkeol		; (ZR)
  1168                                  
  1169                                  .onlydisplay:
  1170 000006D5 E8F9FF                  	call .chkeol1
  1171 000006D8 E8(0000)                	call putsline_crlf
  1172 000006DB 38C0                    	cmp al, al		; ZR
  1173                                  .ret:
  1174 000006DD C3                      	retn
  1175                                  
  1176                                  
  1177                                  		; INP:	al = first character
  1178                                  		;	si-> remaining string
  1179                                  		; OUT:	CY if no assignment operator was found
  1180                                  		;	NC if an assignment operator was found,
  1181                                  		;	 al = first character behind it (skipcomma called)
  1182                                  		;	 si-> remaining string behind character al
  1183                                  isassignmentoperator?:
  1184 000006DE 3C3A                    	cmp al, ':'
  1185 000006E0 750A                    	jne .checksingleequality
  1186 000006E2 AC                      	lodsb
  1187 000006E3 3C3D                    	cmp al, '='
  1188 000006E5 7409                    	je .skip		; long form assignment operator -->
  1189                                  		; A single colon. Report "no assignment operator" here.
  1190 000006E7 4E                      	dec si
  1191 000006E8 B03A                    	mov al, ':'		; restore si, al
  1192                                  .return_cy:
  1193 000006EA F9                      	stc
  1194 000006EB C3                      	retn
  1195                                  
  1196                                  .checksingleequality:
  1197 000006EC 3C3D                    	cmp al, '='
  1198 000006EE 75FA                    	jne .return_cy		; no assignment operator -->
  1199                                  .skip:
  1200 000006F0 E8(0000)                	call skipcomma
  1201 000006F3 F8                      	clc
  1202 000006F4 C3                      	retn
  1203                                  
  1204                                  
  1205                                  rc_cmd:
  1206 000006F5 BF[0000]                	mov di, cmdline_buffer
  1207 000006F8 BD[0000]                	mov bp, cmdline_buffer.end
  1208                                  %if !_LOADER
  1209 000006FB EB06                    	jmp @F
  1210                                  
  1211                                  		; INP:	al = '.'
  1212                                  		;	si -> next character
  1213                                  re_cmd:
  1214 000006FD BF[0000]                	mov di, re_buffer
  1215 00000700 BD[0000]                	mov bp, re_buffer.end
  1216                                  %else
  1217                                  re_cmd:
  1218                                  %endif
  1219                                  @@:
  1220 00000703 5A                      	pop dx
  1221 00000704 5A                      	pop dx			; discard si and ax on stack
  1222 00000705 BA[0000]                	mov dx, msg.list
  1223 00000708 E8(0000)                	call isstring?
  1224 0000070B 7503E9B700              	je .list
  1225                                  
  1226                                  %if !_LOADER
  1227 00000710 81FF[0000]              	cmp di, re_buffer
  1228 00000714 741E                    	je @F
  1229                                  %endif
  1230                                  
  1231 00000716 BA[0000]                	mov dx, msg.abort
  1232 00000719 E8(0000)                	call isstring?
  1233 0000071C 7511                    	jne .guard_rc
  1234                                  .abort_rc:
  1235 0000071E E8(0000)                	call yy_reset_buf
  1236 00000721 8026[0100]FE            	clropt [internalflags3], dif3_input_cmdline
  1237 00000726 800E[0100]02            	setopt [internalflags3], dif3_input_cmdline_closed
  1238 0000072B E8(0000)                	call getline_reset_notatty
  1239 0000072E C3                      	retn
  1240                                  
  1241                                  .guard_rc:
  1242 0000072F E8(0000)                	call guard_rc
  1243                                  %if !_LOADER
  1244 00000732 EB03                    	jmp @FF
  1245                                  
  1246                                  @@:
  1247 00000734 E8(0000)                	call guard_re
  1248                                  @@:
  1249                                  %endif
  1250                                  
  1251 00000737 BA[0000]                	mov dx, msg.append
  1252 0000073A E8(0000)                	call isstring?
  1253 0000073D 740D                    	je .append
  1254 0000073F BA[0000]                	mov dx, msg.replace
  1255 00000742 E8(0000)                	call isstring?
  1256 00000745 740D                    	je .common		; di -> at first byte (where to append)
  1257 00000747 B84501                  	mov ax, 0145h
  1258 0000074A EB75                    	jmp .error_common
  1259                                  
  1260                                  .append:
  1261 0000074C 30C0                    	xor al, al
  1262 0000074E B9FFFF                  	mov cx, -1
  1263 00000751 F2AE                    	repne scasb		; di -> after zero byte
  1264 00000753 4F                      	dec di			; -> at zero byte
  1265                                  
  1266                                  .common:
  1267 00000754 E8(0000)                	call skipwhite
  1268                                  
  1269                                  %if _RECMDWHILEBUFFER
  1270                                   %if _WHILEBUFFSIZE < 256
  1271                                    %error WHILE buffer not large enough for re_cmd
  1272                                   %endif
  1273 00000757 BB[0000]                	mov bx, while_buffer
  1274 0000075A F606[0300]04            	testopt [internalflags], tt_while
  1275 0000075F 7409                    	jz .use_whilebuffer
  1276                                  
  1277                                  .use_auxbuff:
  1278                                  %endif
  1279 00000761 E8(0000)                	call guard_auxbuff
  1280 00000764 8E06[0000]              	mov es, word [auxbuff_segorsel]
  1281 00000768 31DB                    	xor bx, bx		; es:bx -> buffer
  1282                                  
  1283                                  .use_whilebuffer:
  1284                                  %if _RECMDWHILEBUFFER
  1285 0000076A 89DA                    	mov dx, bx		; es:dx -> start of buffer
  1286                                  %endif
  1287                                  
  1288 0000076C 50                      	push ax
  1289 0000076D B00D                    	mov al, 13
  1290 0000076F 3845FF                  	cmp byte [di - 1], al	; is there an EOL in front of us?
  1291 00000772 87DF                    	xchg bx, di		; es:di -> auxbuff, bx -> at zero byte
  1292 00000774 7401                    	je @F			; yes -->
  1293                                  
  1294 00000776 AA                      	stosb			; first store a CR
  1295                                  @@:
  1296 00000777 58                      	pop ax
  1297                                  .loop:
  1298 00000778 3C5C                    	cmp al, '\'
  1299 0000077A 750A                    	jne .literal
  1300                                  
  1301 0000077C AC                      	lodsb			; load escaped character
  1302 0000077D E8(0000)                	call iseol?.notsemicolon; EOL ?
  1303 00000780 7437                    	je .error_escaped_cr	; yes, error -->
  1304 00000782 AA                      	stosb			; store escaped literal
  1305 00000783 AC                      	lodsb			; load next
  1306 00000784 EBF2                    	jmp .loop
  1307                                  
  1308                                  .literal:
  1309 00000786 E8(0000)                	call iseol?.notsemicolon; EOL ?
  1310 00000789 7410                    	je .end			; got all -->
  1311 0000078B 3C3B                    	cmp al, ';'		; semicolon ?
  1312 0000078D 7508                    	jne @F
  1313 0000078F B00D                    	mov al, 13
  1314 00000791 AA                      	stosb			; store linebreak
  1315 00000792 E8(0000)                	call skipwhite		; skip leading blanks
  1316 00000795 EBE1                    	jmp .loop
  1317                                  
  1318                                  @@:
  1319 00000797 AA                      	stosb			; store character
  1320 00000798 AC                      	lodsb
  1321 00000799 EBDD                    	jmp .loop
  1322                                  
  1323                                  .end:
  1324                                  		; di -> behind last character
  1325 0000079B 31C0                    	xor ax, ax
  1326 0000079D AA                      	stosb
  1327 0000079E 89D8                    	mov ax, bx
  1328                                  %if _RECMDWHILEBUFFER
  1329 000007A0 29D7                    	sub di, dx
  1330                                  %endif
  1331 000007A2 01F8                    	add ax, di
  1332 000007A4 7218                    	jc .error_too_much
  1333 000007A6 39E8                    	cmp ax, bp
  1334 000007A8 7714                    	ja .error_too_much
  1335                                  %if _RECMDWHILEBUFFER
  1336 000007AA 89D6                    	mov si, dx
  1337                                  %else
  1338                                  	xor si, si
  1339                                  %endif
  1340 000007AC 06                      	push es
  1341 000007AD 1F                      	pop ds
  1342 000007AE 16                      	push ss
  1343 000007AF 07                      	pop es
  1344 000007B0 89F9                    	mov cx, di
  1345 000007B2 89DF                    	mov di, bx
  1346 000007B4 F3A4                    	rep movsb
  1347 000007B6 16                      	push ss
  1348 000007B7 1F                      	pop ds
  1349 000007B8 C3                      	retn
  1350                                  
  1351                                  .error_escaped_cr:
  1352 000007B9 B84601                  	mov ax, 0146h
  1353 000007BC EB03                    	jmp .error_common
  1354                                  
  1355                                  .error_too_much:
  1356 000007BE B80601                  	mov ax, 0106h
  1357                                  
  1358                                  .error_common:
  1359 000007C1 E8(0000)                	call setrc
  1360 000007C4 E9(0000)                	jmp error
  1361                                  
  1362                                  re_cmd.list:
  1363 000007C7 AC                      	lodsb
  1364 000007C8 E8(0000)                	call chkeol
  1365                                  
  1366 000007CB 89FE                    	mov si, di
  1367 000007CD 31C0                    	xor ax, ax		; ah = 0 (flag to escape blanks)
  1368                                  %if _40COLUMNS
  1369                                  	usesection lDEBUG_DATA_ENTRY
  1369          ------------------       note: usesection lDEBUG_DATA_ENTRY
  1370                                  	align 2, db 0
  1371                                  .lastfragmentlength:
  1372 00000012 0000                    	dw 0
  1373                                  
  1374                                  	usesection lDEBUG_CODE
  1374          ------------------       note: usesection lDEBUG_CODE
  1375 000007CF A3[1200]                	mov word [.lastfragmentlength], ax
  1376                                  				; init to zero
  1377                                  %endif
  1378 000007D2 BF[0000]                	mov di, line_out	; write to line_out
  1379                                  		; Note that we cannot depend on line_out being
  1380                                  		;  large enough for every command because we
  1381                                  		;  want to escape initial blanks and all quote
  1382                                  		;  marks as well as backslashes. However, the
  1383                                  		;  quote marks can be entered without escapes
  1384                                  		;  in Rx.APPEND/.REPLACE so line_out may not be
  1385                                  		;  large enough to hold a whole command.
  1386                                  		; Previously we called putsline in the .cr branch
  1387                                  		;  but this is not needed if several short commands
  1388                                  		;  are displayed. The necessary check in .put does
  1389                                  		;  suffice to handle a filled buffer.
  1390                                  .loop:
  1391 000007D5 AC                      	lodsb
  1392 000007D6 84C0                    	test al, al
  1393 000007D8 7453                    	jz .end
  1394 000007DA 3C0D                    	cmp al, 13		; (intentionally not iseol?)
  1395 000007DC 7441                    	je .cr
  1396 000007DE 3C20                    	cmp al, 32
  1397 000007E0 7430                    	je .escapeif
  1398 000007E2 3C09                    	cmp al, 9
  1399 000007E4 742C                    	je .escapeif
  1400 000007E6 B401                    	mov ah, 1		; ah = 1
  1401 000007E8 3C3B                    	cmp al, ';'
  1402 000007EA 742C                    	je .escape
  1403 000007EC 3C22                    	cmp al, '"'
  1404 000007EE 7428                    	je .escape
  1405 000007F0 3C27                    	cmp al, "'"
  1406 000007F2 7424                    	je .escape
  1407 000007F4 3C5C                    	cmp al, '\'
  1408 000007F6 7420                    	je .escape
  1409                                  .put:
  1410                                  		; Check that we are within available buffer space.
  1411                                  		;  Is it enough for 1 more codepoint plus an escape
  1412                                  		;  backslash for the .escape branch?
  1413                                  		;  Is it also enough for 1 more codepoint plus the
  1414                                  		;  semicolon for the .cr branch?
  1415                                  		; The 4 is an exaggeration.
  1416 000007F8 81FF[FCFF]              	cmp di, line_out_end - 4
  1417 000007FC 7211                    	jb @F			; yes -->
  1418                                  %if _40COLUMNS
  1419 000007FE 50                      	push ax
  1420 000007FF A1[1200]                	mov ax, word [.lastfragmentlength]
  1421 00000802 E8(0000)                	call putsline_break_line
  1422 00000805 A3[1200]                	mov word [.lastfragmentlength], ax
  1423                                  		; We cheat: At this point we know that we always
  1424                                  		;  want to display more so we can call the _more
  1425                                  		;  function unconditionally here.
  1426 00000808 E8(0000)                	call puts_break_line_more
  1427 0000080B 58                      	pop ax
  1428                                  %else
  1429                                  	call putsline
  1430                                  %endif
  1431 0000080C BF[0000]                	mov di, line_out
  1432                                  @@:
  1433 0000080F AA                      	stosb
  1434 00000810 EBC3                    	jmp .loop
  1435                                  
  1436                                  .escapeif:
  1437 00000812 84E4                    	test ah, ah
  1438 00000814 75E2                    	jnz .put
  1439 00000816 B401                    	mov ah, 1		; ah = 1
  1440                                  .escape:
  1441 00000818 50                      	push ax
  1442 00000819 B05C                    	mov al, '\'
  1443 0000081B AA                      	stosb			; (always have space)
  1444 0000081C 58                      	pop ax
  1445 0000081D EBD9                    	jmp .put		; checks for buffer space
  1446                                  
  1447                                  .cr:
  1448 0000081F AC                      	lodsb
  1449 00000820 84C0                    	test al, al
  1450 00000822 7409                    	jz .end
  1451 00000824 4E                      	dec si
  1452 00000825 B03B                    	mov al, ';'
  1453 00000827 AA                      	stosb			; (always have space)
  1454 00000828 B82000                  	mov ax, 32		; ah = 0
  1455 0000082B EBCB                    	jmp .put		; checks for buffer space
  1456                                  
  1457                                  .end:
  1458                                  %if _40COLUMNS
  1459 0000082D A1[1200]                	mov ax, word [.lastfragmentlength]
  1460 00000830 E8(0000)                	call putsline_break_line
  1461                                  %else
  1462                                  	call putsline
  1463                                  %endif
  1464 00000833 BA[0000]                	mov dx, crlf
  1465 00000836 E9(0000)                	jmp putsz
  1466                                  
  1467                                  
  1468                                  rc_run:
  1469 00000839 E8(0000)                	call guard_rc
  1470                                  %if !_LOADER
  1471 0000083C E8(0000)                	call guard_re		; do not allow RE command to run RC
  1472                                  				;  (the RE buffer would drain first)
  1473                                  %endif
  1474                                  
  1475 0000083F E8(0000)                	call yy_reset_buf
  1476                                  
  1477 00000842 C706[0000][0000]        	mov word [cmdline_buffer.position], cmdline_buffer
  1478 00000848 8326[0000]00            	and word [rc_count], 0
  1479 0000084D 8326[0200]00            	and word [rc_count + 2], 0
  1480                                  
  1481 00000852 800E[0100]01            	setopt [internalflags3], dif3_input_cmdline
  1482                                  
  1483 00000857 C3                      	retn
  1484                                  
  1485                                  
  1486                                  %if !_LOADER
  1487                                  dumpregs_extended:
  1488 00000858 E8(0000)                	call guard_re
  1489 0000085B 813E[0000]4052          	cmp word [re_buffer], "@R"
  1490 00000861 7408                    	je @F
  1491 00000863 813E[0000]4072          	cmp word [re_buffer], "@r"
  1492 00000869 750A                    	jne .complex
  1493                                  @@:
  1494 0000086B 803E[0200]00            	cmp byte [re_buffer + 2], 0
  1495 00000870 7503E9A300              	je .just_dumpregs
  1496                                  
  1497                                  .complex:
  1498                                  %if _RH || _SWHILEBUFFER || _RECMDWHILEBUFFER || _EXTENSIONS
  1499 00000875 C606[0000]FF            	mov byte [in_re], -1
  1500                                  %endif
  1501                                  %if _RH
  1502 0000087A E87002                  	call enable_rh_2
  1503                                  %endif
  1504                                  
  1505 0000087D F606[0300]20            	testopt [internalflags3], dif3_auxbuff_guarded_2
  1506 00000882 740C                    	jz @F
  1507                                  
  1508 00000884 B80301                  	mov ax, 0103h
  1509 00000887 E8(0000)                	call setrc
  1510 0000088A BA[0000]                	mov dx, msg.unexpected_auxbuff_guard
  1511 0000088D E9(0000)                	jmp putsz
  1512                                  
  1513                                  @@:
  1514                                  %if _SYMBOLIC
  1515                                  	testopt [internalflags3], dif3_nosymbols_2
  1516                                  	jz @F
  1517                                  
  1518                                  	mov ax, 0103h
  1519                                  	call setrc
  1520                                  	mov dx, msg.unexpected_nosymbols
  1521                                  	jmp putsz
  1522                                  
  1523                                  @@:
  1524                                  %endif
  1525 00000890 E8(0000)                	call yy_reset_buf
  1526                                  
  1527 00000893 C706[0000][0000]        	mov word [re_buffer.position], re_buffer
  1528 00000899 8326[0000]00            	and word [re_count], 0
  1529 0000089E 8326[0200]00            	and word [re_count + 2], 0
  1530                                  
  1531 000008A3 FF36[0000]              	push word [rc]
  1532 000008A7 FF36[0000]              	push word [savesp]
  1533 000008AB FF36[0000]              	push word [throwsp]
  1534 000008AF FF36[0000]              	push word [lastcmd]
  1535 000008B3 55                      	push bp
  1536 000008B4 8926[0000]              	mov word [savesp], sp
  1537 000008B8 8926[0000]              	mov word [throwsp], sp
  1538 000008BC 8926[0000]              	mov word [re_sp], sp
  1539                                  
  1540 000008C0 800E[0300]01            	setopt [internalflags3], dif3_input_re
  1541                                  
  1542 000008C5 F606[0300]10            	testopt [internalflags3], dif3_auxbuff_guarded_1
  1543 000008CA 7405                    	jz @F
  1544 000008CC 8036[0300]30            	xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2
  1545                                  @@:
  1546                                  %if _SYMBOLIC
  1547                                  	testopt [internalflags3], dif3_nosymbols_1
  1548                                  	jz @F
  1549                                  	xoropt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2
  1550                                  @@:
  1551                                  %endif
  1552                                  .cmd3:
  1553 000008D1 E9(0000)                	jmp cmd3
  1554                                  
  1555                                  .exit:
  1556 000008D4 8B26[0000]              	mov sp, word [re_sp]
  1557 000008D8 5D                      	pop bp
  1558 000008D9 8F06[0000]              	pop word [lastcmd]
  1559 000008DD 8F06[0000]              	pop word [throwsp]
  1560 000008E1 8F06[0000]              	pop word [savesp]
  1561 000008E5 58                      	pop ax
  1562 000008E6 85C0                    	test ax, ax
  1563 000008E8 7403                    	jz @F
  1564 000008EA A3[0000]                	mov word [rc], ax
  1565                                  @@:
  1566 000008ED 8026[0300]FE            	clropt [internalflags3], dif3_input_re
  1567                                  
  1568 000008F2 F606[0300]20            	testopt [internalflags3], dif3_auxbuff_guarded_2
  1569 000008F7 7405                    	jz @F
  1570 000008F9 8036[0300]30            	xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2
  1571                                  @@:
  1572                                  %if _SYMBOLIC
  1573                                  	testopt [internalflags3], dif3_nosymbols_2
  1574                                  	jz @F
  1575                                  	xoropt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2
  1576                                  @@:
  1577                                  %endif
  1578                                  %if _RH
  1579 000008FE 8026[0200]DF            	clropt [internalflags6], dif6_rh_mode_2
  1580 00000903 E8DA01                  	call enable_rh
  1581                                  
  1582 00000906 E8(0000)                	call terminate_silent_dump.if_nonnull
  1583                                  %endif
  1584                                  %if _RH || _SWHILEBUFFER || _RECMDWHILEBUFFER || _EXTENSIONS
  1585 00000909 C606[0000]00            	mov byte [in_re], 0
  1586                                  %endif
  1587                                  
  1588 0000090E F606[0100]80            	testopt [options2], opt2_re_cancel_tpg
  1589 00000913 7501                    	jnz @F
  1590                                  
  1591 00000915 C3                      	retn
  1592                                  
  1593                                  @@:
  1594                                  %ifn _RH
  1595                                  	call terminate_silent_dump.if_nonnull
  1596                                  %endif
  1597 00000916 EBB9                    	jmp .cmd3
  1598                                  
  1599                                  
  1600                                  .just_dumpregs:
  1601                                  %if _RH
  1602 00000918 E9EAF6                  	jmp rr.r_and_terminate
  1603                                  %endif
  1604                                  %endif
  1605                                  
  1606                                  		; DUMPREGS - Dump registers.
  1607                                  		;
  1608                                  		; 16 bit: 8 regs, line break, first 4 segment regs,
  1609                                  		;	IP, flags
  1610                                  		; 32 bit: 6 regs, line break, 2 regs, flags, line break,
  1611                                  		;	6 segment regs, EIP
  1612                                  		; 16 bit / 40-column mode: 5 regs, line break, 4 segment regs,
  1613                                  		;	SP, line break, IP, SI, DI, shorter flags display
  1614                                  		; CHG:	ax, bx, cx, dx, di, si
  1615                                  dumpregs:
  1616                                  %if _RH
  1617 0000091B E8C201                  	call enable_rh
  1618                                  %endif
  1619                                  
  1620                                  %if _IMMASM
  1621 0000091E E80300                  	call dumpregs_no_disasm
  1622 00000921 E9EC00                  	jmp dumpregs_disasm
  1623                                  
  1624                                  
  1625                                  dumpregs_no_disasm: section_of_function
  1626                                  %endif
  1627                                  %if _REGSLINEBREAK
  1628 00000924 F606[0200]40            	testopt [options2], opt2_r_linebreak_always
  1629 00000929 7521                    	jnz @F
  1630 0000092B F606[0300]80            	testopt [options6], opt6_r_linebreak_conditional
  1631 00000930 7420                    	jz @FF
  1632 00000932 F606[0000]10            	testopt [serial_flags], sf_use_serial
  1633                                  				; serial ?
  1634 00000937 7519                    	jnz @FF			; yes -->
  1635 00000939 E8(0000)                	call InDOS_or_BIOS_output
  1636 0000093C 7414                    	jz @FF
  1637 0000093E B403                    	mov ah, 3
  1638 00000940 8A3E[0000]              	mov bh, byte [vpage]
  1639 00000944 31D2                    	xor dx, dx		; pre-initialise to zero
  1640 00000946 CD10                    	int 10h			; dl = column, dh = row
  1641 00000948 84D2                    	test dl, dl
  1642 0000094A 7406                    	jz @FF
  1643                                  @@:
  1644 0000094C BA[0000]                	mov dx, crlf
  1645 0000094F E8(0000)                	call putsz
  1646                                  @@:
  1647                                  %endif
  1648                                  %if _REGSHIGHLIGHT
  1649 00000952 F606[0200]08            	testopt [options3], opt3_r_highlight_eip
  1650 00000957 750C                    	jnz @F
  1651 00000959 A1[0000]                	mov ax, word [reg_eip]
  1652                                  %if _LINK
  1653 0000095C A3[0000]                	mov word [reg_eip], ax
  1654                                   wlcalc word_minusext_regs, equ $ - 2
  1655                                   wlcalc word_ext_regs_prior, equ $ - 2
  1656                                  %if _PM
  1657 0000095F A1[0200]                	mov ax, word [reg_eip + 2]
  1658 00000962 A3[0200]                	mov word [reg_eip + 2], ax
  1659                                   wlcalc word_minusext_regs, equ $ - 2
  1660                                   wlcalc word_ext_regs_prior, equ $ - 2
  1661                                  %endif
  1662                                  %else
  1663                                  	mov word [reg_eip - regs + regs_prior], ax
  1664                                  %if _PM
  1665                                  	mov ax, word [reg_eip + 2]
  1666                                  	mov word [reg_eip + 2 - regs + regs_prior], ax
  1667                                  %endif
  1668                                  %endif
  1669                                  @@:
  1670                                  %endif
  1671                                  
  1672 00000965 BE[0000]                	mov si, reg16names
  1673 00000968 BF[0000]                	mov di, line_out
  1674 0000096B B90800                  	mov cx, 8			; display all 8 standard regs (16-bit)
  1675 0000096E F606[0000]01            	testopt [options], dispregs32
  1676 00000973 7404                    	jz .firstrow16
  1677 00000975 B106                    	mov cl, 6			; room for 6 standard regs (32-bit) only
  1678                                  %if _40COLUMNS
  1679 00000977 EB4D                    	jmp .firstrow_not40
  1680                                  %endif
  1681                                  .firstrow16:
  1682                                  %if _40COLUMNS
  1683 00000979 F606[0100]10            	testopt [options6], opt6_40_columns
  1684 0000097E 7446                    	jz .firstrow_not40
  1685 00000980 B104                    	mov cl, 4
  1686 00000982 57                      	push di
  1687 00000983 E87201                  	call dmpr1			; ax, bx, cx, dx
  1688 00000986 46                      	inc si
  1689 00000987 46                      	inc si				; skip sp
  1690 00000988 41                      	inc cx				; = 1
  1691 00000989 E86C01                  	call dmpr1			; bp
  1692 0000098C E8(0000)                	call trimputs
  1693 0000098F 5F                      	pop di
  1694 00000990 57                      	push di
  1695 00000991 BE[1600]                	mov si, reg16names + 11 * 2	; cs
  1696 00000994 B90100                  	mov cx, 1
  1697 00000997 E85E01                  	call dmpr1
  1698 0000099A BE[1000]                	mov si, reg16names + 8 * 2	; ds, es, ss
  1699 0000099D B103                    	mov cl, 3
  1700 0000099F E85601                  	call dmpr1
  1701 000009A2 BE[0800]                	mov si, reg16names + 4 * 2	; sp
  1702 000009A5 41                      	inc cx
  1703 000009A6 E84F01                  	call dmpr1
  1704 000009A9 E8(0000)                	call trimputs
  1705 000009AC 5F                      	pop di
  1706 000009AD BE[1C00]                	mov si, reg16names + 14 * 2	; ip
  1707 000009B0 B90100                  	mov cx, 1
  1708 000009B3 E84201                  	call dmpr1
  1709 000009B6 BE[0C00]                	mov si, reg16names + 6 * 2	; si, di
  1710 000009B9 B102                    	mov cl, 2
  1711 000009BB E83A01                  	call dmpr1
  1712 000009BE E89B02                  	call dmpshortflags
  1713 000009C1 E82E02                  	call dmpflags.40
  1714 000009C4 EB3B                    	jmp .lastrowdone
  1715                                  
  1716                                  %endif
  1717                                  .firstrow_not40:
  1718 000009C6 9C                      	pushf
  1719 000009C7 57                      	push di
  1720 000009C8 E82D01                  	call dmpr1			; display first row
  1721 000009CB E8(0000)                	call trimputs
  1722 000009CE 5F                      	pop di				; (reset di)
  1723 000009CF 9D                      	popf				; (reset ZF)
  1724 000009D0 7515                    	jnz .secondrow32
  1725 000009D2 B90400                  	mov cx, 4			; display 4 segment regs
  1726 000009D5 E82001                  	call dmpr1
  1727 000009D8 83C604                  	add si, byte 2*2		; skip FS+GS
  1728 000009DB 41                      	inc cx				; (= 1)
  1729 000009DC E81901                  	call dmpr1			; display IP
  1730 000009DF E88501                  	call stosb_if_rr_compat		; third blank if MS Debug compat
  1731 000009E2 E80702                  	call dmpflags			; display flags in 16-bit display
  1732 000009E5 EB1A                    	jmp short .lastrowdone
  1733                                  .secondrow32:
  1734 000009E7 57                      	push di
  1735 000009E8 B90200                  	mov cx, 2			; display rest of 32-bit standard regs
  1736 000009EB E80A01                  	call dmpr1
  1737 000009EE 56                      	push si
  1738 000009EF E8FA01                  	call dmpflags			; display flags in 32-bit display
  1739 000009F2 E8(0000)                	call putsline_crlf
  1740 000009F5 5E                      	pop si
  1741 000009F6 5F                      	pop di				; (reset di)
  1742 000009F7 B90600                  	mov cx, 6			; display all segment registers
  1743 000009FA E8FB00                  	call dmpr1
  1744 000009FD 41                      	inc cx				; (= 1)
  1745 000009FE E8F700                  	call dmpr1			; display EIP
  1746                                  .lastrowdone:
  1747 00000A01 E8(0000)                	call trimputs
  1748                                  
  1749                                  %if _REGSHIGHLIGHT
  1750 00000A04 BE[0000]                	mov si, regs
  1751 00000A07 BF[0000]                	mov di, regs_prior
  1752 00000A0A B9[0000]                	mov cx, regs_prior.size_w
  1753 00000A0D F3A5                    	rep movsw			; update prior regs save area
  1754                                  %endif
  1755                                  %if _IMMASM
  1756 00000A0F C3                      	retn
  1757                                  
  1758                                  
  1759                                  dumpregs_disasm:
  1760                                  %endif
  1761                                  %if !_LOADER
  1762                                  		; Set U address to CS:(E)IP.
  1763 00000A10 BE[0000]                	mov si, reg_eip
  1764 00000A13 BF[0000]                	mov di, u_addr
  1765 00000A16 A5                      	movsw				; first word of saOffset
  1766                                  %if saSegSel == 4
  1767 00000A17 A5                      	movsw				; second word of saOffset
  1768                                  %endif
  1769 00000A18 A1[0000]                	mov ax, word [reg_cs]
  1770 00000A1B AB                      	stosw				; saSegSel
  1771                                  %if _PM
  1772 00000A1C E8(0000)                	call ispm
  1773 00000A1F 7501                    	jnz .86m
  1774                                  .pm:
  1775 00000A21 AF                      	scasw				; skip saSegment, sto to saSelector
  1776                                  .86m:
  1777 00000A22 AB                      	stosw				; (if jumped to .86m) saSegment
  1778                                  @@:
  1779                                  %endif
  1780                                  
  1781 00000A23 B80300                  	mov ax, DIS_F_REPT | DIS_F_SHOW
  1782 00000A26 F606[0300]10            	testopt [options], rr_disasm_no_rept
  1783 00000A2B 7402                    	jz @F
  1784 00000A2D 24FE                    	and al, ~ DIS_F_REPT
  1785                                  @@:
  1786 00000A2F F606[0300]20            	testopt [options], rr_disasm_no_show
  1787 00000A34 7402                    	jz @F
  1788 00000A36 24FD                    	and al, ~ DIS_F_SHOW
  1789                                  @@:
  1790 00000A38 A3[0000]                	mov word [disflags], ax
  1791 00000A3B E8(0000)                	call disasm
  1792                                  
  1793                                  		; Set ABO to address after the dumpregs disassembly.
  1794 00000A3E BF[0000]                	mov di, behind_r_u_addr
  1795 00000A41 BE[0000]                	mov si, u_addr
  1796 00000A44 A5                      	movsw				; first word of saOffset
  1797                                  %if saSegSel == 4
  1798 00000A45 A5                      	movsw				; second word of saOffset
  1799                                  %endif
  1800 00000A46 A5                      	movsw				; saSegSel
  1801                                  %if _PM
  1802 00000A47 A5                      	movsw				; saSegment
  1803 00000A48 A5                      	movsw				; saSelector
  1804                                  %endif
  1805                                  %ifn _LINK
  1806                                  %if (behind_r_u_addr + SEGADR_size) != u_addr
  1807                                   %error Expected u_addr behind behind_r_u_addr
  1808                                  	; mov di, u_addr
  1809                                  %endif
  1810                                  %endif
  1811                                  		; Reset U offset to (E)IP.
  1812 00000A49 BE[0000]                	mov si, reg_eip
  1813 00000A4C A5                      	movsw				; first word of saOffset
  1814 00000A4D A5                      _386_PM	movsw				; second word of saOffset
  1815                                  
  1816                                  
  1817                                  %if _ACCESS_VARIABLES_AMOUNT
  1818                                  dumpregs_set_access_variables:
  1819 00000A4E 31C0                    	xor ax, ax
  1820 00000A50 BF[1400]                	mov di, reading_access_variables
  1821 00000A53 B92000                  	mov cx, words(_ACCESS_VARIABLES_AMOUNT * 8 * 2)
  1822 00000A56 F3AB                    	rep stosw
  1823                                  
  1824 00000A58 8B0E[0000]              	mov cx, [memrefs.free]
  1825 00000A5C E349                    	jcxz .none
  1826 00000A5E 31F6                    	xor si, si
  1827                                  .loop:
  1828 00000A60 89F3                    	mov bx, si
  1829 00000A62 E8(0000)                	call get_memref_index_bx
  1830 00000A65 8B87[0A00]              	mov ax, word [memrefs + bx + mrFlags]
  1831 00000A69 A801                    	test al, mrfBranchDirect
  1832 00000A6B 7537                    	jnz .next
  1833 00000A6D 31D2                    	xor dx, dx			; 0 = reading
  1834 00000A6F A840                    	test al, mrfStringSource
  1835 00000A71 751C                    	jnz .gotmsg
  1836 00000A73 42                      	inc dx				; 1 = writing
  1837 00000A74 A880                    	test al, mrfStringDest
  1838 00000A76 7517                    	jnz .gotmsg
  1839 00000A78 88C2                    	mov dl, al
  1840 00000A7A 80E20C                  	and dl, mrfMemSource | mrfMemDest
  1841 00000A7D 80FA0C                  	cmp dl, mrfMemSource | mrfMemDest
  1842 00000A80 B202                    	mov dl, 2			; 2 = r/w
  1843 00000A82 740B                    	je .gotmsg
  1844 00000A84 31D2                    	xor dx, dx			; 0 = reading
  1845 00000A86 A804                    	test al, mrfMemSource
  1846 00000A88 7505                    	jnz .gotmsg
  1847 00000A8A 42                      	inc dx				; 1 = writing
  1848 00000A8B A808                    	test al, mrfMemDest
  1849                                  	; jnz .gotmsg
  1850 00000A8D 7415                    	jz .next
  1851                                  .gotmsg:
  1852                                  
  1853 00000A8F 84D2                    	test dl, dl
  1854 00000A91 740B                    	jz .read
  1855                                  
  1856                                  .write:
  1857 00000A93 BF[3400]                	mov di, writing_access_variables
  1858 00000A96 E80F00                  	call add_access_variable
  1859 00000A99 80FA01                  	cmp dl, 1
  1860 00000A9C 7406                    	je .next
  1861                                  
  1862                                  .read:
  1863 00000A9E BF[1400]                	mov di, reading_access_variables
  1864 00000AA1 E80400                  	call add_access_variable
  1865                                  
  1866                                  .next:
  1867 00000AA4 46                      	inc si
  1868 00000AA5 E2B9                    	loop .loop
  1869                                  .none:
  1870                                  %endif
  1871                                  %endif
  1872 00000AA7 C3                      	retn
  1873                                  
  1874                                  
  1875                                  %if _ACCESS_VARIABLES_AMOUNT
  1876                                  add_access_variable:
  1877 00000AA8 93                      	xchg ax, bx
  1878 00000AA9 31DB                    	xor bx, bx
  1879                                  .loop:
  1880 00000AAB 83790400                	cmp word [di + bx + 4], 0
  1881 00000AAF 7525                    	jne .next
  1882 00000AB1 83790600                	cmp word [di + bx + 4 + 2], 0
  1883 00000AB5 751F                    	jne .next
  1884 00000AB7 93                      	xchg ax, bx
  1885 00000AB8 FFB7[0200]              	 push word [memrefs + bx + mrLinear + 2]
  1886 00000ABC FFB7[0000]              	 push word [memrefs + bx + mrLinear]
  1887 00000AC0 FFB7[0E00]              	 push word [memrefs + bx + mrLength + 2]
  1888 00000AC4 FFB7[0C00]              	 push word [memrefs + bx + mrLength]
  1889 00000AC8 93                      	xchg ax, bx
  1890 00000AC9 8F4104                  	 pop word [di + bx + 4]
  1891 00000ACC 8F4106                  	 pop word [di + bx + 4 + 2]
  1892 00000ACF 8F01                    	 pop word [di + bx]
  1893 00000AD1 8F4102                  	 pop word [di + bx + 2]
  1894 00000AD4 93                      	xchg ax, bx
  1895 00000AD5 C3                      	retn
  1896                                  
  1897                                  .next:
  1898 00000AD6 83C308                  	add bx, 8
  1899 00000AD9 83FB20                  	cmp bx, _ACCESS_VARIABLES_AMOUNT * 8
  1900 00000ADC 72CD                    	jb .loop
  1901 00000ADE 93                      	xchg ax, bx
  1902 00000ADF C3                      	retn
  1903                                  
  1904                                  
  1905                                  	usesection lDEBUG_DATA_ENTRY
  1905          ------------------       note: usesection lDEBUG_DATA_ENTRY
  1906                                  	align 4, db 0
  1907                                  reading_access_variables:
  1908 00000014 00<rep 20h>             	times _ACCESS_VARIABLES_AMOUNT * 8 db 0
  1909                                  
  1910                                  writing_access_variables:
  1911 00000034 00<rep 20h>             	times _ACCESS_VARIABLES_AMOUNT * 8 db 0
  1912                                  
  1913                                  	usesection lDEBUG_CODE
  1913          ------------------       note: usesection lDEBUG_CODE
  1914                                  %endif
  1915                                  
  1916                                  
  1917                                  %if _RH
  1918                                  enable_rh:
  1919 00000AE0 F606[0200]10            	testopt [options6], opt6_rh_mode
  1920 00000AE5 7405                    	jz @F
  1921 00000AE7 800E[0200]10            	setopt [internalflags6], dif6_rh_mode		; NZ
  1922                                  @@:
  1923 00000AEC C3                      	retn
  1924                                  
  1925                                  enable_rh_2:
  1926 00000AED E8F0FF                  	call enable_rh
  1927 00000AF0 74FA                    	jz @B
  1928 00000AF2 800E[0200]20            	setopt [internalflags6], dif6_rh_mode_2
  1929 00000AF7 C3                      	retn
  1930                                  %endif
  1931                                  
  1932                                  
  1933                                  		; Function to display multiple register entries.
  1934                                  		;
  1935                                  		; INP:	[options]&dispregs32 = whether to display 32-bit registers,
  1936                                  		;				except segment registers which are always 16-bit
  1937                                  		;	si-> 2-byte register name in table
  1938                                  		;	cx = number of registers to display
  1939                                  		; OUT:	si-> register name in table after the last one displayed
  1940                                  		;	cx = 0
  1941                                  		;	al = 32
  1942                                  		; CHG:	bx, ah, dx
  1943                                  dmpr1:
  1944                                  .:
  1945                                  %if _LINK
  1946 00000AF8 8D9C[0000]              	lea bx, [word si + reg16names]
  1947                                   wlcalc word_subr_0, equ $ - 2
  1948                                  %else
  1949                                  	lea bx, [si-(reg16names+DATASECTIONFIXUP)]
  1950                                  %endif
  1951 00000AFC 01DB                    	add bx, bx			; index * 4
  1952 00000AFE 807C0153                	cmp byte [si+1], 'S'		; segment register ?
  1953 00000B02 740A                    	je .no_e			; always 16-bit --> (ZR)
  1954 00000B04 F606[0000]01            	testopt [options], dispregs32	; display 32-bit register ?
  1955 00000B09 7403                    	jz .no_e			; no --> (ZR)
  1956 00000B0B B045                    	mov al, 'E'
  1957 00000B0D AA                      	stosb				; store E for Exx register name
  1958                                  .no_e:
  1959 00000B0E A5                      	movsw				; store register name, increase pointer
  1960 00000B0F B03D                    	mov al, '='
  1961 00000B11 AA                      	stosb				; store equality sign
  1962 00000B12 742E                    	jz .no_high			; (ZF left from before)
  1963                                  
  1964                                  %if _REGSHIGHLIGHT
  1965 00000B14 8026[0200]FE            	clropt [internalflags3], dif3_highlighting
  1966 00000B19 8B87[0200]              	mov ax, word [regs + bx + 2]
  1967 00000B1D 8B97[0200]              	mov dx, word [regs_prior + bx + 2]
  1968 00000B21 F606[0200]04            	testopt [options3], opt3_r_highlight_full
  1969 00000B26 7417                    	jz @F
  1970 00000B28 39C2                    	cmp dx, ax
  1971 00000B2A 7510                    	jne .highlighthigh
  1972 00000B2C 52                      	push dx
  1973 00000B2D 50                      	push ax
  1974 00000B2E 8B87[0000]              	mov ax, word [regs + bx]
  1975 00000B32 8B97[0000]              	mov dx, word [regs_prior + bx]
  1976 00000B36 39C2                    	cmp dx, ax
  1977 00000B38 58                      	pop ax
  1978 00000B39 5A                      	pop dx
  1979 00000B3A 7403                    	je @F
  1980                                  .highlighthigh:
  1981 00000B3C E83F00                  	call highlight
  1982                                  @@:
  1983 00000B3F E86A00                  	call hexword_diff		; store high word (only if 32-bit register)
  1984                                  .no_high:
  1985 00000B42 8B87[0000]              	mov ax, word [regs + bx]
  1986 00000B46 8B97[0000]              	mov dx, word [regs_prior + bx]
  1987 00000B4A F606[0200]04            	testopt [options3], opt3_r_highlight_full
  1988 00000B4F 7407                    	jz @F
  1989 00000B51 39C2                    	cmp dx, ax
  1990 00000B53 7403                    	je @F
  1991 00000B55 E82600                  	call highlight
  1992                                  @@:
  1993 00000B58 E85100                  	call hexword_diff		; store low word
  1994                                  
  1995 00000B5B E83700                  	call unhighlight
  1996                                  %else
  1997                                  	mov ax, word [regs + bx + 2]
  1998                                  	call hexword			; store high word (only if 32-bit register)
  1999                                  .no_high:
  2000                                  	mov ax, word [regs + bx]
  2001                                  	call hexword			; store low word
  2002                                  %endif
  2003                                  
  2004 00000B5E B020                    	mov al, 32
  2005 00000B60 AA                      	stosb				; store space
  2006 00000B61 E80300                  	call stosb_if_rr_compat		; another blank if MS Debug compat
  2007 00000B64 E292                    	loop .
  2008 00000B66 C3                      	retn
  2009                                  			; Note:	This code doesn't use 386+ registers to display our internal
  2010                                  			;	variables for these. Currently, setting the RX bit of options
  2011                                  			;	will display the 32-bit variables even on non-386 machines.
  2012                                  			;	Changing this code to require EAX would require changes to our
  2013                                  			;	check too.
  2014                                  			;	32-bit code probably wouldn't be much shorter than the current
  2015                                  			;	implementation as well.
  2016                                  
  2017                                  
  2018                                  		; INP:	al = what to store (32)
  2019                                  		;	option flags for R compat, RX, and 40-column mode
  2020                                  		;	es:di -> where to store
  2021                                  		; OUT:	stored if the flags are right
  2022                                  		;	di updated if stored
  2023                                  		; CHG:	-
  2024                                  		; STT:	ds = ss
  2025                                  		;	UP
  2026                                  stosb_if_rr_compat:
  2027 00000B67 F606[0200]08            	testopt [options2], opt2_rr16_compat
  2028 00000B6C 740F                    	jz .ret
  2029 00000B6E F606[0000]01            	testopt [options], dispregs32
  2030 00000B73 7508                    	jnz .ret
  2031                                  %if _40COLUMNS
  2032 00000B75 F606[0100]10            	testopt [options6], opt6_40_columns
  2033 00000B7A 7501                    	jnz .ret
  2034                                  %endif
  2035 00000B7C AA                      	stosb
  2036                                  .ret:
  2037 00000B7D C3                      	retn
  2038                                  
  2039                                  
  2040                                  %if _REGSHIGHLIGHT
  2041                                  highlight:
  2042 00000B7E F606[0200]01            	testopt [internalflags3], dif3_highlighting
  2043 00000B83 750F                    	jnz @F
  2044 00000B85 800E[0200]01            	setopt [internalflags3], dif3_highlighting
  2045 00000B8A 56                      	push si
  2046 00000B8B 51                      	push cx
  2047 00000B8C BE[0000]                	mov si, msg.highlight
  2048 00000B8F E8(0000)                	call copy_single_counted_string
  2049 00000B92 59                      	pop cx
  2050 00000B93 5E                      	pop si
  2051                                  @@:
  2052 00000B94 C3                      	retn
  2053                                  
  2054                                  unhighlight:
  2055 00000B95 F606[0200]01            	testopt [internalflags3], dif3_highlighting
  2056 00000B9A 740F                    	jz @F
  2057 00000B9C 8026[0200]FE            	clropt [internalflags3], dif3_highlighting
  2058 00000BA1 56                      	push si
  2059 00000BA2 51                      	push cx
  2060 00000BA3 BE[0000]                	mov si, msg.unhighlight
  2061 00000BA6 E8(0000)                	call copy_single_counted_string
  2062 00000BA9 59                      	pop cx
  2063 00000BAA 5E                      	pop si
  2064                                  @@:
  2065 00000BAB C3                      	retn
  2066                                  
  2067                                  hexword_diff:
  2068 00000BAC F606[0200]01            	testopt [options3], opt3_r_highlight_diff
  2069 00000BB1 7407                    	jz @F
  2070 00000BB3 F606[0200]04            	testopt [options3], opt3_r_highlight_full
  2071 00000BB8 7403                    	jz @FF
  2072                                  @@:
  2073 00000BBA E9(0000)                	jmp hexword
  2074                                  
  2075                                  @@:
  2076                                  .hexword:
  2077 00000BBD 86C4                    	xchg al, ah
  2078 00000BBF 86D6                    	xchg dl, dh
  2079 00000BC1 E80400                  	call .hexbyte
  2080 00000BC4 86C4                    	xchg al, ah
  2081 00000BC6 86D6                    	xchg dl, dh
  2082                                  
  2083                                  .hexbyte:
  2084 00000BC8 51                      	push cx
  2085 00000BC9 B104                    	mov cl, 4
  2086 00000BCB D2C0                    	rol al, cl
  2087 00000BCD D2C2                    	rol dl, cl
  2088 00000BCF E80500                  	call .hexnyb
  2089 00000BD2 D2C0                    	rol al, cl
  2090 00000BD4 D2C2                    	rol dl, cl
  2091 00000BD6 59                      	pop cx
  2092                                  
  2093                                  .hexnyb:
  2094 00000BD7 50                      	push ax
  2095 00000BD8 88D4                    	mov ah, dl
  2096 00000BDA 250F0F                  	and ax, 0F0Fh
  2097 00000BDD 38E0                    	cmp al, ah
  2098 00000BDF 7405                    	je .unhighlight
  2099                                  .highlight:
  2100 00000BE1 E89AFF                  	call highlight
  2101 00000BE4 EB03                    	jmp .common
  2102                                  
  2103                                  .unhighlight:
  2104 00000BE6 E8ACFF                  	call unhighlight
  2105                                  .common:
  2106                                  		; INP:	original ax on stack, then return near address
  2107                                  		;	al = nybble value to display, 0..15
  2108                                  		;	es:di -> where to store
  2109                                  		; OUT:	es:di incremented
  2110                                  		;	ax restored
  2111                                  		;	return to near address that was on stack
  2112 00000BE9 E9(0000)                	jmp hexnyb.common
  2113                                  %endif
  2114                                  
  2115                                  
  2116                                   %define extcall nearcall
  2117                                   %define extcallcall nearcall
  2118                                   %imacro internalcoderelocation 0-*.nolist
  2119                                   %endmacro
  2120                                   %imacro internaldatarelocation 0-*.nolist
  2121                                   %endmacro
  2122                                   %imacro linkdatarelocation 0-*.nolist
  2123                                   %endmacro
  2124                                   %define relocated(address) address
  2125                                   %assign ELD 0
  2126                                  
  2127                                  %if _RN
  2128                                   %include "rnshared.asm"
  2129                                  %endif
  2130                                  
  2131                                  %if _MMXSUPP && _RM
  2132                                   %include "rmshared.asm"
  2133                                  %endif
  2134                                  
  2135                                   %undef extcall
  2136                                   %undef extcallcall
  2137                                   %unimacro internalcoderelocation 0-*.nolist
  2138                                   %unimacro internaldatarelocation 0-*.nolist
  2139                                   %unimacro linkdatarelocation 0-*.nolist
  2140                                   %undef relocated
  2141                                  
  2142                                  
  2143                                  		; DMPFLAGS - Dump flags output.
  2144                                  dmpflags:
  2145                                  %if _40COLUMNS
  2146                                  .80:
  2147                                  %if _LINK
  2148 00000BEC 55                      	push bp
  2149 00000BED BD[0000]                	mov bp, flagbits_for_80
  2150                                   wlcalc word_opext_shl_flagbits_for_shl, equ $ - 2
  2151 00000BF0 EB04                    	jmp @F
  2152                                  .40:
  2153 00000BF2 55                      	push bp
  2154 00000BF3 BD[0000]                	mov bp, flagbits_for_40
  2155                                   wlcalc word_opext_shl_flagbits_for_shl, equ $ - 2
  2156                                  %else
  2157                                  	push bp
  2158                                  	mov bp, flagbits_for_80 << flagbits_for_shl
  2159                                  	jmp @F
  2160                                  .40:
  2161                                  	push bp
  2162                                  	mov bp, flagbits_for_40 << flagbits_for_shl
  2163                                  %endif
  2164                                  @@:
  2165                                  %endif
  2166                                  %if _REGSHIGHLIGHT || _REGSREADABLEFLAGS
  2167 00000BF6 52                      	push dx
  2168 00000BF7 53                      	push bx
  2169                                  %endif
  2170 00000BF8 BE[0000]                	mov si, flagbits
  2171 00000BFB B9[0000]                	mov cx, flagbits.amount
  2172 00000BFE AD                      .loop:	lodsw
  2173                                  %if _40COLUMNS
  2174 00000BFF D1E5                    	shl bp, 1
  2175 00000C01 7352                    	jnc .next
  2176                                  %endif
  2177                                  %if _REGSHIGHLIGHT
  2178                                  %if _LINK
  2179 00000C03 8B16[0000]              	mov dx, word [reg_efl]
  2180                                   wlcalc word_minusext_regs, equ $ - 2
  2181                                   wlcalc word_ext_regs_prior, equ $ - 2
  2182                                  %else
  2183                                  	mov dx, word [reg_efl - regs + regs_prior]
  2184                                  %endif
  2185 00000C07 21C2                    	and dx, ax
  2186 00000C09 8B1E[0000]              	mov bx, word [reg_efl]
  2187 00000C0D 21C3                    	and bx, ax
  2188 00000C0F 39DA                    	cmp dx, bx
  2189 00000C11 7411                    	je @F
  2190 00000C13 F606[0200]05            	testopt [options3], opt3_r_highlight_diff | opt3_r_highlight_full
  2191 00000C18 740A                    	jz @F
  2192 00000C1A F606[0200]02            	testopt [internalflags3], dif3_do_not_highlight
  2193 00000C1F 7503                    	jnz @F
  2194 00000C21 E85AFF                  	call highlight
  2195                                  @@:
  2196 00000C24 85DB                    	test bx, bx
  2197                                  %else
  2198                                  	test ax, word [reg_efl]
  2199                                  %endif
  2200                                  
  2201                                  
  2202                                   %if _LINK
  2203 00000C26 8B84[FEFF]              	mov ax, word [word si+(flagsoff)-2]
  2204                                   wlcalc word_minusext_flagbits, equ $ - 2
  2205                                  %if _REGSREADABLEFLAGS
  2206 00000C2A 8B9C[FEFF]              	mov bx, word [word si+(flagsoff_style2)-2]
  2207                                   wlcalc word_minusext_flagbits, equ $ - 2
  2208 00000C2E 8B94[FEFF]              	mov dx, word [word si+(flagsoff_style3)-2]
  2209                                   wlcalc word_minusext_flagbits, equ $ - 2
  2210                                  %endif
  2211 00000C32 740A                    	jz .off			; if not set
  2212 00000C34 8B84[FEFF]              	mov ax, word [word si+(flagson)-2]
  2213                                   wlcalc word_minusext_flagbits, equ $ - 2
  2214                                  %if _REGSREADABLEFLAGS
  2215 00000C38 8B9C[FEFF]              	mov bx, word [word si+(flagson_style23)-2]
  2216                                   wlcalc word_minusext_flagbits, equ $ - 2
  2217 00000C3C 89DA                    	mov dx, bx
  2218                                  %endif
  2219                                  .off:
  2220                                   %else
  2221                                  %if _LINK_COMPAT
  2222                                   %define FORCEWORD word
  2223                                  %else
  2224                                   %define FORCEWORD
  2225                                  %endif
  2226                                  	mov ax, word [FORCEWORD si+(flagsoff-flagbits)-2]
  2227                                  %if _REGSREADABLEFLAGS
  2228                                  	mov bx, word [FORCEWORD si+(flagsoff_style2-flagbits)-2]
  2229                                  	mov dx, word [FORCEWORD si+(flagsoff_style3-flagbits)-2]
  2230                                  %endif
  2231                                  	jz .off			; if not set
  2232                                  	mov ax, word [FORCEWORD si+(flagson-flagbits)-2]
  2233                                  %if _REGSREADABLEFLAGS
  2234                                  	mov bx, word [FORCEWORD si+(flagson_style23-flagbits)-2]
  2235                                  	mov dx, bx
  2236                                  %endif
  2237                                  .off:
  2238                                   %endif
  2239                                  %if _REGSREADABLEFLAGS
  2240 00000C3E F606[0300]20            	testopt [options6], opt6_r_flags_style2
  2241 00000C43 7401                    	jz @F
  2242 00000C45 93                      	xchg ax, bx
  2243                                  @@:
  2244 00000C46 F606[0300]40            	testopt [options6], opt6_r_flags_style3
  2245 00000C4B 7401                    	jz @F
  2246 00000C4D 92                      	xchg ax, dx
  2247                                  @@:
  2248                                  %endif
  2249 00000C4E AB                      	stosw
  2250                                  %if _REGSHIGHLIGHT
  2251 00000C4F E843FF                  	call unhighlight
  2252                                  %endif
  2253 00000C52 B020                    	mov al, 32
  2254 00000C54 AA                      	stosb
  2255                                  .next:
  2256 00000C55 E2A7                    	loop .loop
  2257 00000C57 4F                      	dec di			; -> last (unnecessary) blank
  2258                                  %if _REGSHIGHLIGHT || _REGSREADABLEFLAGS
  2259 00000C58 5B                      	pop bx
  2260 00000C59 5A                      	pop dx
  2261                                  %endif
  2262                                  %if _40COLUMNS
  2263 00000C5A 5D                      	pop bp
  2264                                  %endif
  2265 00000C5B C3                      	retn
  2266                                  
  2267                                  
  2268                                  %if _40COLUMNS
  2269                                  dmpshortflags:
  2270                                  %if _REGSHIGHLIGHT
  2271 00000C5C 52                      	push dx
  2272 00000C5D 53                      	push bx
  2273                                  %endif
  2274 00000C5E BE[0000]                	mov si, shortflagbits
  2275 00000C61 B9[0000]                	mov cx, shortflagbits.amount
  2276 00000C64 AD                      .loop:	lodsw
  2277                                  %if _REGSHIGHLIGHT
  2278                                   %if _LINK
  2279 00000C65 8B16[0000]              	mov dx, word [reg_efl]
  2280                                   wlcalc word_minusext_regs, equ $ - 2
  2281                                   wlcalc word_ext_regs_prior, equ $ - 2
  2282                                   %else
  2283                                  	mov dx, word [reg_efl - regs + regs_prior]
  2284                                   %endif
  2285 00000C69 21C2                    	and dx, ax
  2286 00000C6B 8B1E[0000]              	mov bx, word [reg_efl]
  2287 00000C6F 21C3                    	and bx, ax
  2288 00000C71 39DA                    	cmp dx, bx
  2289 00000C73 7411                    	je @F
  2290 00000C75 F606[0200]05            	testopt [options3], opt3_r_highlight_diff | opt3_r_highlight_full
  2291 00000C7A 740A                    	jz @F
  2292 00000C7C F606[0200]02            	testopt [internalflags3], dif3_do_not_highlight
  2293 00000C81 7503                    	jnz @F
  2294 00000C83 E8F8FE                  	call highlight
  2295                                  @@:
  2296 00000C86 85DB                    	test bx, bx
  2297                                  %else
  2298                                  	test ax, word [reg_efl]
  2299                                  %endif
  2300                                   %if _LINK
  2301 00000C88 8B84[FEFF]              	mov ax, word [word si+(shortflagsoff)-2]
  2302                                   wlcalc word_minusext_shortflagbits, equ $ - 2
  2303 00000C8C 7404                    	jz .off			; if not set
  2304 00000C8E 8B84[FEFF]              	mov ax, word [word si+(shortflagson)-2]
  2305                                   wlcalc word_minusext_shortflagbits, equ $ - 2
  2306                                   %else
  2307                                  	mov ax, word [FORCEWORD si+(shortflagsoff-shortflagbits)-2]
  2308                                  	jz .off			; if not set
  2309                                  	mov ax, word [FORCEWORD si+(shortflagson-shortflagbits)-2]
  2310                                   %endif
  2311 00000C92 AA                      .off:	stosb
  2312                                  %if _REGSHIGHLIGHT
  2313 00000C93 E8FFFE                  	call unhighlight
  2314                                  %endif
  2315 00000C96 B020                    	mov al, 32
  2316 00000C98 AA                      	stosb
  2317                                  .next:
  2318 00000C99 E2C9                    	loop .loop
  2319                                  %if _REGSHIGHLIGHT
  2320 00000C9B 5B                      	pop bx
  2321 00000C9C 5A                      	pop dx
  2322                                  %endif
  2323 00000C9D C3                      	retn
  2324                                  %endif
  2325                                  
  2326                                  
  2327                                  %if _OPTIONS || _VARIABLES
  2328                                  dumpvars:
  2329                                  %if _VARIABLES
  2330 00000C9E BE[0000]                	mov si, vregs
  2331                                  %endif
  2332 00000CA1 31DB                    	xor bx, bx
  2333                                  .loop:
  2334 00000CA3 BF[0000]                	mov di, line_out
  2335 00000CA6 31D2                    	xor dx, dx
  2336                                  %if _VARIABLES
  2337 00000CA8 B90400                  	mov cx, 4
  2338 00000CAB E8B100                  	call .dump		; display four variables
  2339 00000CAE 43                      	inc bx			; (would be one off here)
  2340 00000CAF 56                      	push si
  2341                                  %else
  2342                                  	add bx, byte 4		; (no motivation to optimize that)
  2343                                  %endif
  2344                                  %if _OPTIONS
  2345                                   %if _VARIABLES
  2346 00000CB0 B020                    	mov al, 32
  2347 00000CB2 AA                      	stosb			; more blanks inbetween
  2348                                   %endif
  2349 00000CB3 80FB10                  	cmp bl, 16
  2350 00000CB6 7439                    	je .3
  2351 00000CB8 80FB08                  	cmp bl, 8
  2352 00000CBB 7721                    	ja .2
  2353 00000CBD 7411                    	je .1
  2354                                  
  2355                                  		; First line, display DCO and DCS
  2356                                  .0:
  2357 00000CBF B8434F                  	mov ax, "CO"
  2358 00000CC2 BE[0000]                	mov si, options
  2359 00000CC5 E88600                  	call .dump_option
  2360 00000CC8 B84353                  	mov ax, "CS"
  2361 00000CCB BE[0000]                	mov si, startoptions
  2362 00000CCE EB44                    	jmp short .next
  2363                                  
  2364                                  		; Second line, DAO and DAS
  2365                                  .1:
  2366                                  %if !_LOADER
  2367 00000CD0 B8414F                  	mov ax, "AO"
  2368 00000CD3 BE[0000]                	mov si, asm_options
  2369 00000CD6 E87500                  	call .dump_option
  2370 00000CD9 B84153                  	mov ax, "AS"
  2371                                  	; asm_startoptions follows directly behind asm_options
  2372 00000CDC EB36                    	jmp short .next
  2373                                  %else
  2374                                  	jmp short .nextskip
  2375                                  %endif
  2376                                  
  2377                                  		; Third line, DIF and DPI
  2378                                  .2:
  2379 00000CDE B84946                  	mov ax, "IF"
  2380 00000CE1 BE[0000]                	mov si, internalflags
  2381 00000CE4 E86700                  	call .dump_option
  2382 00000CE7 B85049                  	mov ax, "PI"
  2383                                  %if !_LOADER
  2384 00000CEA BE[0000]                	mov si, psp22
  2385 00000CED 42                      	inc dx
  2386 00000CEE 42                      	inc dx
  2387 00000CEF EB23                    	jmp short .next
  2388                                  %else
  2389                                  	inc dx
  2390                                  	inc dx
  2391                                  	jmp short .nextskip
  2392                                  %endif
  2393                                  
  2394                                  		; Fourth line, DPR, DPS (if _PM) and DPP
  2395                                  .3:
  2396 00000CF1 42                      	inc dx
  2397 00000CF2 B85052                  	mov ax, "PR"
  2398 00000CF5 BE[0000]                	mov si, pspdbg
  2399 00000CF8 E85300                  	call .dump_option
  2400                                   %if _PM
  2401 00000CFB 31C0                    	xor ax, ax
  2402 00000CFD E8(0000)                	call ispm
  2403 00000D00 7502                    	jnz .3_rm
  2404 00000D02 1E                      	push ds
  2405 00000D03 A8                      	db __TEST_IMM8		; (skip push)
  2406                                  .3_rm:
  2407 00000D04 50                      	push ax
  2408 00000D05 B85053                  	mov ax, "PS"
  2409 00000D08 89E6                    	mov si, sp
  2410 00000D0A E84100                  	call .dump_options
  2411 00000D0D 58                      	pop ax
  2412                                   %else
  2413                                  	mov ax, 32<<8|32
  2414                                  	stosw
  2415                                  	stosw
  2416                                   %endif
  2417                                  %if !_LOADER
  2418 00000D0E B85050                  	mov ax, "PP"
  2419 00000D11 BE[0000]                	mov si, parent
  2420                                  %else
  2421                                  	jmp short .nextskip
  2422                                  %endif
  2423                                  
  2424                                  .next:
  2425 00000D14 E83700                  	call .dump_options
  2426                                  .nextskip:
  2427                                  %endif
  2428 00000D17 53                      	push bx
  2429 00000D18 E8(0000)                	call putsline_crlf	; display line
  2430 00000D1B 5B                      	pop bx			; (retain counter)
  2431                                  %if _VARIABLES
  2432 00000D1C 5E                      	pop si			; (retain pointer to next variable)
  2433                                  %endif
  2434 00000D1D 80FB10                  	cmp bl, 16		; was end ?
  2435 00000D20 7581                    	jne .loop		; no, loop -->
  2436                                  
  2437                                  				; done
  2438                                  .mode:
  2439 00000D22 BA[0000]                	mov dx, msg.rv_mode.before
  2440 00000D25 E8(0000)                	call putsz
  2441                                  %if _PM
  2442 00000D28 E8(0000)                	call ispm
  2443 00000D2B 7511                    	jnz .mode_86m
  2444 00000D2D BA[0000]                	mov dx, msg.rv_mode_dpmi_16
  2445 00000D30 8B1E[0000]              	mov bx, word [reg_cs]
  2446 00000D34 E8(0000)                	call test_d_b_bit
  2447 00000D37 7412                    	jz @F
  2448 00000D39 BA[0000]                	mov dx, msg.rv_mode_dpmi_32
  2449 00000D3C EB0D                    	jmp @F
  2450                                  
  2451                                  .mode_86m:
  2452                                  %endif
  2453 00000D3E BA[0000]                	mov dx, msg.rv_mode_r86m
  2454                                  		; (only 386+ has the V86M so even though smsw ax is a
  2455                                  		;  286 level instruction, so could be used without a 386,
  2456                                  		;  we only really need it on a 386+.)
  2457 00000D41 0F01E0                  _386	smsw ax
  2458 00000D44 A801                    _386	test al, 1
  2459 00000D46 7403                    _386	jz @F
  2460 00000D48 BA[0000]                _386	mov dx, msg.rv_mode_v86m
  2461                                  @@:
  2462 00000D4B E9(0000)                	jmp putsz
  2463                                  
  2464                                  
  2465                                  		; INP:	ax = 2-byte option name ('N' will precede this)
  2466                                  		;	d[si] = value
  2467                                  		; OUT:	si-> behind value
  2468                                  		;	cx = 0
  2469                                  		; CHG:	ax
  2470                                  .dump_options:
  2471                                  %if _VARIABLES
  2472                                  .dump_option:
  2473 00000D4E C7052044                	mov word [di], " D"
  2474 00000D52 AF                      	scasw
  2475                                  %else
  2476                                  	mov byte [di], ' '
  2477                                  	inc di
  2478                                  .dump_option:
  2479                                  	mov byte [di], 'D'
  2480                                  	inc di
  2481                                  %endif
  2482 00000D53 AB                      	stosw
  2483                                  %if _VARIABLES		; falls through otherwise, always count 1
  2484 00000D54 B90100                  	mov cx, 1
  2485                                   %if _RSEPARATE
  2486 00000D57 B600                    	mov dh, 0
  2487                                   %endif
  2488 00000D59 EB0E                    	jmp short .dump_one
  2489                                  %endif
  2490                                  
  2491                                  %if 0
  2492                                  PM && OPTIONS && VARIABLES
  2493                                  V0=00000000 V1=00000000 V2=00000000 V3=00000000   DCO=00000000 DCS=00000000
  2494                                  V4=00000000 V5=00000000 V6=00000000 V7=00000000   DAO=00000000 DAS=00000000
  2495                                  V8=00000000 V9=00000000 VA=00000000 VB=00000000   DIF=0000840D DPI=0616:01DE
  2496                                  VC=00000000 VD=00000000 VE=00000000 VF=00000000   DPR=0984 DPS=0000 DPP=0616
  2497                                  
  2498                                  !PM && OPTIONS && VARIABLES
  2499                                  V0=00000000 V1=00000000 V2=00000000 V3=00000000   DCO=00000000 DCS=00000000
  2500                                  V4=00000000 V5=00000000 V6=00000000 V7=00000000   DAO=00000000 DAS=00000000
  2501                                  V8=00000000 V9=00000000 VA=00000000 VB=00000000   DIF=0000840D DPI=0616:01DE
  2502                                  VC=00000000 VD=00000000 VE=00000000 VF=00000000   DPR=0984     DPP=0616
  2503                                  
  2504                                  !OPTIONS && VARIABLES
  2505                                  V0=00000000 V1=00000000 V2=00000000 V3=00000000
  2506                                  V4=00000000 V5=00000000 V6=00000000 V7=00000000
  2507                                  V8=00000000 V9=00000000 VA=00000000 VB=00000000
  2508                                  VC=00000000 VD=00000000 VE=00000000 VF=00000000
  2509                                  
  2510                                  !PM && OPTIONS && !VARIABLES
  2511                                  DCO=00000000 DCS=00000000
  2512                                  DAO=00000000 DAS=00000000
  2513                                  DIF=0000840D DPI=0616:01DE
  2514                                  DPR=0984     DPP=0616
  2515                                  
  2516                                  PM && OPTIONS && !VARIABLES
  2517                                  DCO=00000000 DCS=00000000
  2518                                  DAO=00000000 DAS=00000000
  2519                                  DIF=0000840D DPI=0616:01DE
  2520                                  DPR=0984 DPS=0000 DPP=0616
  2521                                  
  2522                                  !OPTIONS && !VARIABLES
  2523                                  %endif
  2524                                  %if 0
  2525                                  DCO Debugger Common Options
  2526                                  DCS Debugger Common Startup options
  2527                                  DIF Debugger Internal Flags
  2528                                  DPR Debugger Process (Real-mode segment)
  2529                                  DPS Debugger Process Selector, or zero
  2530                                  DPP Debugger Parent Process
  2531                                  DPI Debugger Parent Interrupt 22h
  2532                                  DAO Debugger Assembler/disassembler Options
  2533                                  DAS Debugger Assembler/disassembler Startup options
  2534                                  %endif
  2535                                  
  2536                                  %if _VARIABLES
  2537                                  .dump_loop:
  2538 00000D5B 43                      	inc bx
  2539 00000D5C B020                    	mov al, 32
  2540 00000D5E AA                      	stosb
  2541                                  .dump:
  2542 00000D5F B056                    	mov al, 'V'
  2543 00000D61 AA                      	stosb
  2544 00000D62 88D8                    	mov al, bl
  2545 00000D64 E8(0000)                	call hexnyb
  2546                                   %if _RSEPARATE
  2547 00000D67 B6FF                    	mov dh, -1
  2548                                   %endif
  2549                                  %endif
  2550                                  .dump_one:
  2551 00000D69 B03D                    	mov al, '='
  2552 00000D6B AA                      	stosb
  2553 00000D6C AD                      	lodsw
  2554 00000D6D 80FA01                  	cmp dl, 1
  2555 00000D70 7416                    	je .dumpw
  2556 00000D72 50                      	push ax
  2557 00000D73 AD                      	lodsw
  2558 00000D74 9C                      	pushf
  2559 00000D75 E8(0000)                	call hexword
  2560 00000D78 9D                      	popf				; CF
  2561 00000D79 7205                    	jb .nocolon
  2562 00000D7B B03A                    	mov al, ':'
  2563 00000D7D AA                      	stosb
  2564                                  %if _RSEPARATE
  2565 00000D7E EB07                    	jmp @F
  2566                                  .nocolon:
  2567 00000D80 84F6                    	test dh, dh
  2568 00000D82 7903                    	jns @F
  2569 00000D84 E83EF4                  	call rseparate
  2570                                  @@:
  2571                                  %else
  2572                                  .nocolon:
  2573                                  %endif
  2574 00000D87 58                      	pop ax
  2575                                  .dumpw:
  2576 00000D88 E8(0000)                	call hexword
  2577                                  %if _VARIABLES
  2578 00000D8B E2CE                    	loop .dump_loop
  2579                                  %endif
  2580 00000D8D C3                      	retn
  2581                                  %endif
  2582                                  
  2583                                  
  2584                                  dumpallvars:
  2585 00000D8E AC                      	lodsb
  2586 00000D8F E8(0000)                	call chkeol
  2587 00000D92 BE[0000]                	mov si, vregs
  2588 00000D95 31DB                    	xor bx, bx
  2589                                  .loop:
  2590 00000D97 BF[0000]                	mov di, line_out
  2591 00000D9A B90400                  	mov cx, 4
  2592 00000D9D 31D2                    	xor dx, dx
  2593 00000D9F E81500                  	call .dump		; display four variables
  2594 00000DA2 43                      	inc bx			; (would be one off here)
  2595 00000DA3 85D2                    	test dx, dx
  2596 00000DA5 7407                    	jz @F
  2597 00000DA7 56                      	push si
  2598 00000DA8 53                      	push bx
  2599 00000DA9 E8(0000)                	call putsline_crlf	; display line
  2600 00000DAC 5B                      	pop bx			; (retain counter)
  2601 00000DAD 5E                      	pop si			; (retain pointer to next variable)
  2602                                  @@:
  2603 00000DAE 84DB                    	test bl, bl		; was end ?
  2604 00000DB0 75E5                    	jnz .loop		; no, loop -->
  2605 00000DB2 C3                      	retn
  2606                                  
  2607                                  .dump_loop:
  2608 00000DB3 43                      	inc bx
  2609 00000DB4 B020                    	mov al, 32
  2610 00000DB6 AA                      	stosb
  2611                                  .dump:
  2612 00000DB7 B056                    	mov al, 'V'
  2613 00000DB9 AA                      	stosb
  2614 00000DBA 88D8                    	mov al, bl
  2615 00000DBC E8(0000)                	call hexbyte
  2616                                  .dump_one:
  2617 00000DBF B03D                    	mov al, '='
  2618 00000DC1 AA                      	stosb
  2619 00000DC2 AD                      	lodsw
  2620 00000DC3 09C2                    	or dx, ax
  2621 00000DC5 50                      	push ax
  2622 00000DC6 AD                      	lodsw
  2623 00000DC7 09C2                    	or dx, ax
  2624 00000DC9 E8(0000)                	call hexword
  2625                                  %if _RSEPARATE
  2626 00000DCC E8F6F3                  	call rseparate
  2627                                  %endif
  2628 00000DCF 58                      	pop ax
  2629 00000DD0 E8(0000)                	call hexword
  2630 00000DD3 E2DE                    	loop .dump_loop
  2631 00000DD5 C3                      	retn
  2632                                  
  2633                                  
  2634                                  dumpmemory:
  2635 00000DD6 AC                      	lodsb
  2636 00000DD7 E8(0000)                	call chkeol
  2637                                  
  2638 00000DDA A1[0000]                	mov ax, word [code_seg]
  2639                                  %if _PM
  2640 00000DDD 8B16[0000]              	mov dx, word [code_sel]
  2641                                  %endif
  2642 00000DE1 BE[0000]                	mov si, msg.vm_codeseg
  2643 00000DE4 E84900                  	call .line
  2644                                  
  2645                                  %if _DUALCODE
  2646 00000DE7 A1[0000]                	mov ax, word [code2_seg]
  2647                                   %if _PM
  2648 00000DEA 8B16[0000]              	mov dx, word [code2_sel]
  2649                                   %endif
  2650 00000DEE BE[0000]                	mov si, msg.vm_code2seg
  2651 00000DF1 E83C00                  	call .line
  2652                                  %endif
  2653                                  
  2654                                  %if _PM
  2655 00000DF4 A1[0000]                	mov ax, word [pspdbg]
  2656 00000DF7 8CD2                    	mov dx, ss
  2657                                  %else
  2658                                  	mov ax, ss
  2659                                  %endif
  2660 00000DF9 BE[0000]                	mov si, msg.vm_dataseg
  2661 00000DFC E83100                  	call .line
  2662                                  
  2663                                  %if _PM
  2664 00000DFF A1[0000]                	mov ax, word [pspdbg]
  2665 00000E02 8B16[0000]              	mov dx, word [cssel]
  2666                                  %else
  2667                                  	mov ax, ss
  2668                                  %endif
  2669 00000E06 BE[0000]                	mov si, msg.vm_entryseg
  2670 00000E09 E82400                  	call .line
  2671                                  
  2672                                  %if _MESSAGESEGMENT
  2673 00000E0C A1[0000]                	mov ax, word [messageseg]
  2674                                   %if _PM
  2675 00000E0F 8B16[0000]              	mov dx, word [messagesel]
  2676                                   %endif
  2677 00000E13 BE[0000]                	mov si, msg.vm_messageseg
  2678 00000E16 E81700                  	call .line
  2679                                  %endif
  2680                                  
  2681                                  %if _PM
  2682 00000E19 A1[0200]                	mov ax, word [auxbuff_segorsel + soaSegment]
  2683 00000E1C 8B16[0400]              	mov dx, word [auxbuff_segorsel + soaSelector]
  2684                                  %else
  2685                                  	mov ax, word [auxbuff_segorsel]
  2686                                  %endif
  2687 00000E20 BE[0000]                	mov si, msg.vm_auxseg
  2688                                  %if _HISTORY_SEPARATE_FIXED && _HISTORY
  2689 00000E23 E80A00                  	call .line
  2690                                  
  2691                                   %if _PM
  2692 00000E26 A1[0200]                	mov ax, word [history.segorsel + soaSegment]
  2693 00000E29 8B16[0400]              	mov dx, word [history.segorsel + soaSelector]
  2694                                   %else
  2695                                  	mov ax, word [history.segorsel]
  2696                                   %endif
  2697 00000E2D BE[0000]                	mov si, msg.vm_hisseg
  2698                                  %endif
  2699                                  
  2700                                  .line:
  2701 00000E30 BF[0000]                	mov di, line_out
  2702 00000E33 E8(0000)                	call copy_single_counted_string
  2703 00000E36 E8(0000)                	call hexword
  2704                                  %if _PM
  2705 00000E39 E8(0000)                	call ispm
  2706 00000E3C 750A                    	jnz @F
  2707 00000E3E BE[0000]                	mov si, msg.vm_selector
  2708 00000E41 E8(0000)                	call copy_single_counted_string
  2709 00000E44 92                      	xchg ax, dx
  2710 00000E45 E8(0000)                	call hexword
  2711                                  @@:
  2712                                  %endif
  2713 00000E48 E9(0000)                	jmp putsline_crlf
  2714                                  
  2715                                  
  2716                                  dumpprocess:
  2717 00000E4B AC                      	lodsb
  2718 00000E4C E8(0000)                	call chkeol
  2719                                  
  2720                                  %if !_LOADER
  2721                                  %if _PM
  2722 00000E4F E8(0000)EB02[0000]      	nearcall var_psps_setup
  2723                                  %endif
  2724 00000E56 E8(0000)EB02[0000]      	nearcall var_ppr_setup
  2725 00000E5D E8(0000)EB02[0000]      	nearcall var_ppi_setup
  2726                                  %endif
  2727                                  
  2728                                  %if _BOOTLDR
  2729 00000E64 BA[0000]                	mov dx, msg.rvp_boot
  2730                                   %if _APPLICATION || _DEVICE
  2731 00000E67 F606[0100]40            	testopt [internalflags], nodosloaded
  2732 00000E6C 7523                    	jnz @F
  2733                                   %else
  2734                                  	jmp @F
  2735                                   %endif
  2736                                  %endif
  2737                                  
  2738                                  %if _DEVICE
  2739                                   %if _APPLICATION
  2740 00000E6E F606[0200]40            	testopt [internalflags6], dif6_device_mode
  2741 00000E73 740F                    	jz .notdevice
  2742                                   %endif
  2743                                  
  2744                                   %if _ATTACH
  2745 00000E75 BA[0000]                	mov dx, msg.rvp_device_attached
  2746 00000E78 F606[0200]40            	testopt [internalflags], tsrmode
  2747 00000E7D 7412                    	jz @F
  2748                                   %endif
  2749 00000E7F BA[0000]                	mov dx, msg.rvp_device
  2750                                   %if _APPLICATION
  2751 00000E82 EB0D                    	jmp @F
  2752                                   %endif
  2753                                  %endif
  2754                                  
  2755                                  %if _APPLICATION
  2756                                  .notdevice:
  2757                                   %if _TSR
  2758 00000E84 BA[0000]                	mov dx, msg.rvp_tsr
  2759 00000E87 F606[0200]40            	testopt [internalflags], tsrmode
  2760 00000E8C 7503                    	jnz @F
  2761                                   %endif
  2762 00000E8E BA[0000]                	mov dx, msg.rvp_application
  2763                                  %endif
  2764                                  @@:
  2765 00000E91 E8(0000)                	call putsz
  2766                                  
  2767 00000E94 BF[0000]                	mov di, line_out
  2768                                  
  2769                                  %if !_LOADER
  2770 00000E97 A1[0000]                	mov ax, word [pspdbe]
  2771 00000E9A BE[0000]                	mov si, msg.vp_pspsegment
  2772 00000E9D E85900                  	call .line
  2773                                  
  2774 00000EA0 A1[0000]                	mov ax, word [psp_parent]
  2775 00000EA3 BE[0000]                	mov si, msg.vp_parent
  2776 00000EA6 E85000                  	call .line
  2777                                  
  2778 00000EA9 A1[0200]                	mov ax, word [psp_pra + 2]
  2779 00000EAC BE[0000]                	mov si, msg.vp_pra
  2780 00000EAF E84700                  	call .line
  2781 00000EB2 B03A                    	mov al, ':'
  2782 00000EB4 AA                      	stosb
  2783 00000EB5 A1[0000]                	mov ax, word [psp_pra]
  2784 00000EB8 E8(0000)                	call hexword
  2785                                  
  2786                                  %if _PM
  2787 00000EBB A1[0000]                	mov ax, word [psp_selector]
  2788 00000EBE BE[0000]                	mov si, msg.vp_pspsel
  2789 00000EC1 E83500                  	call .line
  2790                                  %endif
  2791 00000EC4 E8(0000)                	call putsline_crlf
  2792                                  %endif
  2793                                  
  2794 00000EC7 BF[0000]                	mov di, line_out
  2795                                  
  2796 00000ECA A1[0000]                	mov ax, word [pspdbg]
  2797 00000ECD BE[0000]                	mov si, msg.vp_dpspsegment
  2798 00000ED0 E82600                  	call .line
  2799                                  
  2800                                  %if !_LOADER
  2801 00000ED3 A1[0000]                	mov ax, word [parent]
  2802 00000ED6 BE[0000]                	mov si, msg.vp_dparent
  2803 00000ED9 E81D00                  	call .line
  2804                                  
  2805 00000EDC A1[0200]                	mov ax, word [psp22 + 2]
  2806 00000EDF BE[0000]                	mov si, msg.vp_dpra
  2807 00000EE2 E81400                  	call .line
  2808 00000EE5 B03A                    	mov al, ':'
  2809 00000EE7 AA                      	stosb
  2810 00000EE8 A1[0000]                	mov ax, word [psp22]
  2811 00000EEB E8(0000)                	call hexword
  2812                                  %endif
  2813                                  
  2814                                  %if _PM
  2815 00000EEE 8CD0                    	mov ax, ss
  2816 00000EF0 BE[0000]                	mov si, msg.vp_dpspsel
  2817 00000EF3 E80300                  	call .line
  2818                                  %endif
  2819 00000EF6 E9(0000)                	jmp putsline_crlf
  2820                                  
  2821                                  .line:
  2822 00000EF9 E8(0000)                	call copy_single_counted_string
  2823 00000EFC E9(0000)                	jmp hexword
  2824                                  
  2825                                  
  2826                                  dumpdevice:
  2827 00000EFF AC                      	lodsb
  2828 00000F00 E8(0000)                	call chkeol
  2829                                  
  2830                                  %if _APPLICATION || _BOOTLDR
  2831                                  %if _DEVICE
  2832 00000F03 F606[0200]40            	testopt [internalflags6], dif6_device_mode
  2833 00000F08 7507                    	jnz @F
  2834                                  %endif
  2835 00000F0A BA[0000]                	mov dx, msg.rvd_not_device
  2836 00000F0D E8(0000)                	call putsz
  2837 00000F10 C3                      	retn
  2838                                  %endif
  2839                                  
  2840                                  %if _DEVICE
  2841                                  @@:
  2842 00000F11 A1[0200]                	mov ax, word [device_header_address + 2]
  2843 00000F14 BE[0000]                	mov si, msg.rvd_deviceheader
  2844 00000F17 E81500                  	call .line
  2845 00000F1A B03A                    	mov al, ':'
  2846 00000F1C AA                      	stosb
  2847 00000F1D A1[0000]                	mov ax, word [device_header_address]
  2848 00000F20 E8(0000)                	call hexword
  2849                                  
  2850 00000F23 A1[0000]                	mov ax, word [device_mcb_paragraphs]
  2851 00000F26 BE[0000]                	mov si, msg.rvd_size
  2852 00000F29 E80300                  	call .line
  2853 00000F2C E9(0000)                	jmp putsline_crlf
  2854                                  
  2855                                  .line:
  2856 00000F2F E8(0000)                	call copy_single_counted_string
  2857 00000F32 E9(0000)                	jmp hexword
  2858                                  %endif
  2859                                  
  2860                                  
  2861                                  %if _RH
  2862                                  dumphistory:
  2863 00000F35 E8(0000)                	call guard_re
  2864                                   %if _PM
  2865 00000F38 A1[0000]                	mov ax, word [auxbuff_switchbuffer_size]
  2866                                   %else
  2867                                  	xor ax, ax
  2868                                   %endif
  2869 00000F3B A3[0000]                	mov word [auxbuff_start_silent], ax
  2870 00000F3E E8(0000)                	call skipcomma
  2871                                  
  2872 00000F41 C606[0000]00            	mov byte [rh_display_with_count], 0
  2873 00000F46 4E                      	dec si
  2874 00000F47 BA[0000]                	mov dx, msg.count
  2875 00000F4A E8(0000)                	call isstring?
  2876 00000F4D 7508                    	jne .not_count
  2877                                  
  2878 00000F4F F616[0000]              	not byte [rh_display_with_count]
  2879 00000F53 E8(0000)                	call skipcomma
  2880 00000F56 4E                      	dec si
  2881                                  
  2882                                  .not_count:
  2883 00000F57 BA[0000]                	mov dx, msg.in
  2884 00000F5A E8(0000)                	call isstring?
  2885 00000F5D 7557                    	jne .not_in
  2886                                  
  2887 00000F5F E8(0000)                	call skipcomma
  2888 00000F62 4E                      	dec si
  2889 00000F63 56                      	push si
  2890                                  
  2891                                  .in.loop:
  2892 00000F64 E8(0000)                	call skipwhite
  2893 00000F67 4E                      	dec si
  2894                                  
  2895 00000F68 E8(0000)EB02[0000]      	nearcall get_value_range; OUT:	cx:di = from, bx:dx = to
  2896 00000F6F 7307                    	jnc @F
  2897 00000F71 7502                    	jnz .error
  2898 00000F73 E30B                    	jcxz .in.next
  2899                                  .error:
  2900 00000F75 E9(0000)                	jmp error
  2901                                  
  2902                                  @@:
  2903 00000F78 E302                    	jcxz @F
  2904 00000F7A EBF9                    	jmp .error
  2905                                  
  2906                                  @@:
  2907 00000F7C 85DB                    	test bx, bx
  2908 00000F7E 75F5                    	jnz .error
  2909                                  
  2910                                  .in.next:
  2911                                  @@:
  2912 00000F80 E8(0000)                	call skipwh0
  2913 00000F83 3C2C                    	cmp al, ','
  2914 00000F85 74DD                    	je .in.loop
  2915 00000F87 E8(0000)                	call chkeol
  2916 00000F8A 5E                      	pop si
  2917                                  
  2918                                  .indo.loop:
  2919 00000F8B E8(0000)                	call skipwhite
  2920 00000F8E 4E                      	dec si
  2921                                  
  2922 00000F8F E8(0000)EB02[0000]      	nearcall get_value_range; OUT:	cx:di = from, bx:dx = to
  2923 00000F96 7213                    	jc .indo.next
  2924                                  
  2925 00000F98 89D3                    	mov bx, dx
  2926 00000F9A 89FA                    	mov dx, di
  2927 00000F9C A8                      	db __TEST_IMM8		; (skip dec)
  2928                                  @@:
  2929 00000F9D 4B                      	dec bx
  2930 00000F9E 52                      	push dx
  2931 00000F9F 53                      	push bx
  2932 00000FA0 56                      	push si
  2933 00000FA1 E84F00                  	call .do
  2934 00000FA4 5E                      	pop si
  2935 00000FA5 5B                      	pop bx
  2936 00000FA6 5A                      	pop dx
  2937 00000FA7 39D3                    	cmp bx, dx
  2938 00000FA9 77F2                    	ja @B
  2939                                  
  2940                                  .indo.next:
  2941 00000FAB 4E                      	dec si
  2942 00000FAC E8(0000)                	call skipwhite
  2943 00000FAF 3C2C                    	cmp al, ','
  2944 00000FB1 74D8                    	je .indo.loop
  2945                                  .ret:
  2946 00000FB3 C3                      	retn
  2947                                  
  2948                                  .ret_pop:
  2949 00000FB4 58                      	pop ax
  2950 00000FB5 C3                      	retn
  2951                                  
  2952                                  
  2953                                  .not_in:
  2954 00000FB6 AC                      	lodsb
  2955 00000FB7 E8(0000)                	call iseol?
  2956 00000FBA 7453                    	je .simple
  2957 00000FBC E8(0000)EB02[0000]      	nearcall getword
  2958 00000FC3 89D3                    	mov bx, dx
  2959 00000FC5 E8(0000)                	call iseol?
  2960 00000FC8 7429                    	je .one
  2961 00000FCA E8(0000)EB02[0000]      	nearcall getword
  2962 00000FD1 E8(0000)                	call chkeol
  2963 00000FD4 53                      	push bx
  2964 00000FD5 E8(0000)EB02[0000]      	nearcall var_rhcount_setup
  2965                                  	; mov ax, [bx]
  2966 00000FDC 5B                      	pop bx
  2967 00000FDD 53                      	push bx
  2968 00000FDE 29C3                    	sub bx, ax		; cmp bx, ax
  2969 00000FE0 720D                    	jb .several_below	; if bx below amount -->
  2970 00000FE2 85D2                    	test dx, dx		; special: zero ?
  2971 00000FE4 7405                    	jz .several_first_ax
  2972 00000FE6 43                      	inc bx			; how many to hide
  2973                                  		; Can overflow if given FFFFh and 0 in buffer.
  2974                                  		;  However, if 0 in buffer then nothing will
  2975                                  		;  be displayed regardless where we branch.
  2976 00000FE7 29DA                    	sub dx, bx		; = how many remain
  2977 00000FE9 76C9                    	jbe .ret_pop		; <= 0 remain, do nothing
  2978                                  				; if > 0 remain
  2979                                  .several_first_ax:
  2980 00000FEB 5B                      	pop bx
  2981 00000FEC 93                      	xchg bx, ax
  2982 00000FED 4B                      	dec bx
  2983 00000FEE A8                      	db __TEST_IMM8		; (skip pop)
  2984                                  
  2985                                  .several_below:
  2986 00000FEF 5B                      	pop bx
  2987 00000FF0 92                      	xchg ax, dx
  2988 00000FF1 EB10                    	jmp .several
  2989                                  
  2990                                  .do:
  2991                                  .one:
  2992 00000FF3 53                      	push bx
  2993 00000FF4 E8(0000)EB02[0000]      	nearcall var_rhcount_setup
  2994                                  	; mov ax, [bx]
  2995 00000FFB 5B                      	pop bx
  2996 00000FFC 39C3                    	cmp bx, ax
  2997 00000FFE 73B3                    	jae .ret
  2998                                  
  2999 00001000 B80100                  	mov ax, 1
  3000                                  .several:
  3001 00001003 891E[0000]              	mov word [rh_count_number], bx
  3002 00001007 43                      	inc bx
  3003 00001008 891E[0000]              	mov word [tt_silent_mode_number], bx
  3004 0000100C E9(0000)                	jmp silence_dump.rh
  3005                                  
  3006                                  .simple:
  3007 0000100F E8(0000)EB02[0000]      	nearcall var_rhcount_setup
  3008                                  	; mov ax, [bx]
  3009 00001016 48                      	dec ax
  3010 00001017 A3[0000]                	mov word [rh_count_number], ax
  3011 0000101A 8326[0000]00            	and word [tt_silent_mode_number], 0
  3012 0000101F E9(0000)                	jmp silence_dump.rh.all
  3013                                  %endif
  3014                                  ..@rr_access_end:
