=== Trace listing source: ../lst/debug.obj/aa.lst 1 2 %if 0 3 4 lDebug A command - Assembler 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 "aa.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00001492 ???????? eldhSignature: resb 4 ; "ELD1" 0 00001496 ?????? resb 3 ; reserved 0 00001499 ?? resb 1 ; 26 (Ctrl-Z) 0 0000149A ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000149E ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 000014A0 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 000014A2 ???????? eldhDataOffset: resd 1 0 000014A6 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 000014A8 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000014AA ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000014AC ???????? eldhReserved: resb 4 ; reserved 0 000014B0 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 000014B2 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000014B6 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000014BA ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000014BE ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00001492 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000149A ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000149E ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 000014A0 ???? 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 0 00001492 ???? 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 0 00001494 ???? eldltAmount: resw 1 0 00001496 ???????? 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 0 00001492 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00001494 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00001496 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00001498 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000149A ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 000014A2 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00001492 ???? eldlSignature: resw 1 ; 0E1D1h 0 00001494 ???????? eldlReserved: resw 2 0 00001498 ???? eldlUseLinkHash: resw 1 0 0000149A ???? eldlDataAmount: resw 1 0 0000149C ???? eldlDataPrefixes: resw 1 0 0000149E ???? eldlDataEntries: resw 1 0 000014A0 ???? eldlDataAddresses: resw 1 0 000014A2 ???? eldlCodeAmount: resw 1 0 000014A4 ???? eldlCodePrefixes: resw 1 0 000014A6 ???? eldlCodeEntries: resw 1 0 000014A8 ???? 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 0 00001492 ???? ifKeyword: resw 1 0 00001494 ???? ifDescription: resw 1 0 00001496 ???? ifOptions: resw 1 0 00001498 ???? ifValue: resw 1 0 0000149A ???? ifTrying: resw 1 0 0000149C ???? 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 0 00001492 ???????? saOffset: resd 1 0 00001496 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00001492 ???? so16aOffset: resw 1 0 00001494 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00001492 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00001492 ?????? bsJump: resb 3 0 00001495 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00001492 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00001494 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00001495 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00001497 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00001498 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000149A ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000149C ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000149D ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 0000149F ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 000014A1 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 000014A3 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 000014A7 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 000014AB ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 000014AF ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 000014B1 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 000014B3 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 000014B7 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 000014B9 ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00001492 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00001493 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00001494 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00001495 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 000014A4 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00001492 ???????????????? deName: resb 8 0 0000149A ?????? deExt: resb 3 0 0000149D ?? deAttrib: resb 1 0 0000149E ?? dePlusSize: resb 1 0 0000149F ?????????????? resb 7 0 000014A6 ???? deClusterHigh: resw 1 0 000014A8 ???? deTime: resw 1 0 000014AA ???? deDate: resw 1 0 000014AC ???? deClusterLow: resw 1 0 000014AE ???????? 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 0 100001482 ???????? lsvFirstCluster: resd 1 0 100001486 ???????? lsvFATSector: resd 1 0 10000148A ???? lsvFATSeg: resw 1 0 10000148C ???? lsvLoadSeg: resw 1 0 10000148E ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100001472 ???? ldMemoryTop: resw 1 0 100001474 ???? ldLoadTop: resw 1 0 100001476 ???? ldSectorSeg: resw 1 0 100001478 ?? ldFATType: resb 1 92 <2> ldFlags: 0 100001479 ?? ldHasLBA: resb 1 0 10000147A ???? ldClusterSize: resw 1 0 10000147C ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 10000147E ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100001480 ?? .partition: resb 1 ; byte 0 100001481 ?? .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 <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 0 100001462 ???????? ldRootSector: resd 1 0 100001466 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 100001468 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 10000146A ???? ldParasLeft: resw 1 0 10000146C ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 100001452 ???????? ldMaxCluster: resd 1 0 100001456 ???????? ldFileSize: resd 1 0 10000145A ???????? ldCurrentCluster: resd 1 0 10000145E ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00001492 ???????? liiSignature: resb 4 ; "NLDR" 0 00001496 ???? liiVersion: resb 2 ; "00" 0 00001498 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000149A ???? liiAmountParagraphs: resw 1 0 0000149C ???????????? liiReserved: resw 3 0 000014A2 ???? 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 0 000014A4 ???? 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 0 000014A6 ???? 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 0 000014A8 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00001492 ???? lpSize: resw 1 0 00001494 ???? lpCount: resw 1 0 00001496 ???????? lpBuffer: resd 1 0 0000149A ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00001492 ?? piBoot: resb 1 0 00001493 ?????? piStartCHS: resb 3 0 00001496 ?? piType: resb 1 0 00001497 ?????? piEndCHS: resb 3 0 0000149A ???????? piStart: resd 1 0 0000149E ???????? 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 0 00001492 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00001494 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00001496 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00001498 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000149A ???? lsOptions: resw 1 ; option flags 0 0000149C ???? lsSegment: resw 1 ; => where to load file 0 0000149E ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 000014A2 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 000014A6 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 000014A8 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 000014AA ???????????????? 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 0 00001492 ???? exact_struc_at 00h, exeSignature: resw 1 0 00001494 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00001496 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00001498 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000149A ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 0000149C ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 0000149E ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 000014A0 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 000014A2 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 000014A4 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 000014A6 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 000014A8 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 000014AA ???? 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. 0 000014AC ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00001492 ???? ifhHandle: resw 1 0 00001494 ???? ifhFlags: resw 1 0 00001496 ???????? 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 <1> areastrucEntry: resb 24 0 000014AA ???????? areastrucNext: resd 1 0 000014AE ???????? areastrucPrev: resd 1 0 000014B2 ???? areastrucSubAmount: resw 1 0 000014B4 ???? areastrucSubOffset: resw 1 0 000014B6 ???? areastrucFunAmount: resw 1 0 000014B8 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00001492 ???????? areastrucsubLinear: resd 1 0 00001496 ???????? areastrucsubLinearEnd: resd 1 0 0000149A ???? areastrucsubListOffset: resw 1 0 0000149C ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00001492 ???????? areastrucfunLinear: resd 1 0 00001496 ???????? areastrucfunLinearEnd: resd 1 0 0000149A ???? areastrucfunListOffset: resw 1 0 0000149C ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00001492 ???? areastart: resw 1 0 00001494 ???? areaend: resw 1 0 00001496 ???? areamessage: resw 1 0 00001498 ???? 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 0 00001492 ???? 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.) 0 00001494 ???? ivFlags: resw 1 0 00001496 ???? 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. 0 00001498 ???? 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 0 0000149A ?? 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. 0 0000149B ?? 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 0 00001492 ???????? mrLinear: resd 1 0 00001496 ???????? mrOffset: resd 1 0 0000149A ???? mrSegmentSelector: resw 1 0 0000149C ???? mrFlags: resw 1 0 0000149E ???????? 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 0 00001492 ???????? .size_: resd 1 0 00001496 ???? .srchdl: resw 1 0 00001498 ???????? .srcadr: resd 1 0 0000149C ???? .dsthdl: resw 1 0 0000149E ???????? .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 "asmops.mac" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug assembler/disassembler table operands 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2026 E. C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> ; Equates for instruction operands. 19 <1> ; First the sizes. 20 <1> 21 <1> OP_ALL equ 40h ; byte/word/dword operand (could be 30h but ...) 22 <1> OP_1632 equ 50h ; word or dword operand 23 <1> OP_8 equ 60h ; byte operand 24 <1> OP_16 equ 70h ; word operand 25 <1> OP_32 equ 80h ; dword operand 26 <1> OP_64 equ 90h ; qword operand 27 <1> OP_1632_DEFAULT equ 0A0h ; word or dword or default opsize 28 <1> OP_1632_DEFAULT_ASM equ 0B0h; asm: word or dword or default opsize, 29 <1> ; disasm: word or dword 30 <1> 31 <1> OP_SIZE equ OP_ALL ; the lowest of these 32 <1> 33 <1> ; These operand types need to be combined with a size. 34 <1> ; Bits 0 to 3 give one of these types (maximum 15), 35 <1> ; and bits 4 to 7 specify the size. Table entries 36 <1> ; for these are identified by detecting that they 37 <1> ; are above-or-equal OP_SIZE. 38 <1> ; The first parameter to the opsizeditem macro is the 39 <1> ; name of the item. It has to match the names used in 40 <1> ; the instr.key and debugtbl.inc files. 41 <1> ; The second parameter is the entry for bittab that 42 <1> ; is used by aa.asm (the assembler). 43 <1> ; The third parameter is the suffix used to create the 44 <1> ; entry for asmjmp (prefix aop_) and disjmp2 (dop_). 45 <1> 46 <1> %macro opsizeditem 3.nolist 47 <1> %1 equ nextindex 48 <1> %xdefine BITTAB_OPSIZEDITEMS BITTAB_OPSIZEDITEMS,%2 49 <1> %xdefine ASMJMP_OPSIZEDITEMS ASMJMP_OPSIZEDITEMS,aop_%3 50 <1> %xdefine DISJMP2_OPSIZEDITEMS DISJMP2_OPSIZEDITEMS,dop_%3 51 <1> %assign nextindex nextindex + 1 52 <1> %endmacro 53 <1> %assign nextindex 0 54 <1> %define BITTAB_OPSIZEDITEMS "" 55 <1> %define ASMJMP_OPSIZEDITEMS "" 56 <1> %define DISJMP2_OPSIZEDITEMS "" 57 <1> opsizeditem OP_IMM, ARG_IMMED, imm ; immediate 58 <1> opsizeditem OP_IMM_NOT_EXTEND, ARG_IMMED, imm_not_extend ; immediate 59 <1> ; This one is for showing the WORD/DWORD size keyword if the 60 <1> ; value could fit into an imms8. 61 <1> opsizeditem OP_RM,ARG_DEREF+ARG_JUSTREG,rm ; reg/mem 62 <1> opsizeditem OP_M, ARG_DEREF, m ; mem (but not reg) 63 <1> opsizeditem OP_R_MOD, ARG_JUSTREG, r_mod ; register, determined from MOD R/M part 64 <1> opsizeditem OP_MOFFS, ARG_DEREF, moffs ; memory offset; e.g., [1234] 65 <1> opsizeditem OP_R, ARG_JUSTREG, r ; reg part of reg/mem byte 66 <1> opsizeditem OP_R_ADD, ARG_JUSTREG, r_add ; register, determined from instruction byte 67 <1> opsizeditem OP_AX, ARG_JUSTREG, ax ; al or ax or eax 68 <1> %if nextindex > 16 69 <1> %error Too many op sized items 70 <1> %endif 71 <1> 72 <1> ; These don't need a size. 73 <1> ; Because the size needs to be clear to indicate 74 <1> ; that one of these is to be used, the maximum 75 <1> ; value for these is 63 (as 64 is OP_SIZE). 76 <1> ; The minimum value for these is 1 because a 0 77 <1> ; without size means the end of an op list (OP_END). 78 <1> ; The first parameter to the opitem macro is the name 79 <1> ; of the item. It has to match the names used in the 80 <1> ; instr.key and debugtbl.inc files. 81 <1> ; The second parameter is the entry for bittab that 82 <1> ; is used by aa.asm (the assembler). The third 83 <1> ; parameter is the entry for asmjmp. 84 <1> ; The fourth parameter is the entry for optab as used 85 <1> ; by uu.asm (the disassembler). 86 <1> ; 87 <1> ; asm_siznum contains entries for OP_M64 to OP_MXX. 88 <1> ; (The order has to match their opitem order.) 89 <1> ; asm_regnum contains entries for OP_DX to OP_GS. 90 <1> ; (The order has to match their opitem order.) 91 <1> 92 <1> %macro opitem 4.nolist 93 <1> %1 equ nextindex 94 <1> %xdefine BITTAB_OPITEMS BITTAB_OPITEMS,%2 95 <1> %xdefine ASMJMP_OPITEMS ASMJMP_OPITEMS,%3 96 <1> %xdefine OPTAB_OPITEMS OPTAB_OPITEMS,%4 97 <1> %assign nextindex nextindex + 1 98 <1> %endmacro 99 <1> OP_END equ 0 100 <1> %assign nextindex 1 101 <1> %define BITTAB_OPITEMS "" 102 <1> %define ASMJMP_OPITEMS "" 103 <1> %define OPTAB_OPITEMS "" 104 <1> ; order of the following (ao17 entries) must match asm_siznum in aa.asm 105 <1> OP_FIRST_ASM_SIZNUM equ nextindex ; corresponding to asm_siznum start 106 <1> opitem OP_M64, ARG_DEREF, ao17,dop_m64 ; qword memory (obsolete?) 107 <1> opitem OP_MFLOAT, ARG_DEREF, ao17,dop_mfloat ; float memory 108 <1> opitem OP_MDOUBLE, ARG_DEREF, ao17,dop_mdouble; double-precision floating memory 109 <1> opitem OP_M80, ARG_DEREF, ao17,dop_m80 ; tbyte memory 110 <1> opitem OP_MXX, ARG_DEREF, ao17,dop_mxx ; memory (size unknown) 111 <1> opitem OP_FARIMM, ARG_FARADDR, ao21,dop_farimm ; far16/far32 immediate 112 <1> opitem OP_FAR_OFFSET, ARG_IMMED, aop_faroffset,da_internal_error ; far offset-only 113 <1> opitem OP_REL8, ARG_IMMED, ao23,dop_rel8 ; byte address relative to IP 114 <1> opitem OP_REL1632, ARG_IMMED, ao25,dop_rel1632; word or dword address relative to IP 115 <1> opitem OP_1CHK, ARG_WEIRDREG, ao29,dop49 ; check for ST(1) 116 <1> opitem OP_STI, ARG_WEIRDREG, aop_sti,dop_sti ; ST(I) 117 <1> opitem OP_CR, ARG_WEIRDREG, aop_cr,dop_cr ; CRx 118 <1> opitem OP_DR, ARG_WEIRDREG, ao34,dop_dr ; DRx 119 <1> opitem OP_TR, ARG_WEIRDREG, ao35,dop_tr ; TRx 120 <1> opitem OP_SEGREG, ARG_WEIRDREG, ao39,dop_segreg ; segment register 121 <1> opitem OP_IMMS8, ARG_IMMED, ao41,dop_imms8 ; sign extended immediate byte 122 <1> opitem OP_IMMS8_EXTEND, ARG_IMMED, ao41_extend,dop_imms8 ; add etc word/dword r/m, imms8 123 <1> opitem OP_IMM8, ARG_IMMED, ao42,dop_imm8 ; immediate byte (other args may be (d)word) 124 <1> opitem OP_IMM8_OPTIONAL,ARG_IMMED, ao42,dop_imm8_optional 125 <1> opitem OP_IMM8_INT, ARG_IMMED, ao42,dop_imm8_int ; immediate byte for int 126 <1> opitem OP_IMM8_SHIFTROT,ARG_IMMED, ao42,dop_imm8_shiftrot ; immediate byte for shift/rotate 127 <1> opitem OP_MMX, ARG_WEIRDREG, aop_mmx,dop_mmx ; MMx 128 <1> opitem OP_MMX_MOD, ARG_WEIRDREG, aop_mmx_mod,dop_mmx_mod ; MMx, but in ModR/M part 129 <1> opitem OP_X, 0FFh, ao_x, dop_x ; OPX byte follows 130 <1> opitem OP_SHOSIZ, 0FFh, ao44, dop_shosiz ; set flag to always show the size 131 <1> opitem OP_ASM_MOVX, 0FFh, ao_movx,dop60a ; enforce next operand size to be specified 132 <1> opitem OP_SHORT, 0FFh, ao_short,dop_short ; allow short keyword 133 <1> opitem OP_NEAR, 0FFh, ao_near,dop_near ; allow near keyword 134 <1> opitem OP_FAR, 0FFh, ao_far, dop_far ; allow far keyword 135 <1> opitem OP_FAR_REQUIRED, 0FFh, ao_far_required,dop_far_required ; require far keyword 136 <1> opitem OP_FAR_M, 0FFh, ao_modifier_continue,dop_far_m ; les, lds, lss, lfs, lgs, or jmp/call far mem 137 <1> opitem OP_DOUBLE_M, 0FFh, ao_modifier_continue,dop_double_m ; bound 138 <1> opitem OP_M_SRC, 0FFh, ao_modifier_continue,dop_m_src 139 <1> opitem OP_M_DST, 0FFh, ao_modifier_continue,dop_m_dst 140 <1> opitem OP_M_SRC_DST, 0FFh, ao_modifier_continue,dop_m_src_dst 141 <1> opitem OP_STACK_PUSH, 0FFh, ac09_internal_error,dop_stack_push 142 <1> opitem OP_STACK_POP, 0FFh, ac09_internal_error,dop_stack_pop 143 <1> opitem OP_STACK_SPECIAL,0FFh, ac09_internal_error,dop_stack_special 144 <1> opitem OP_M_ALWAYS_16, 0FFh, ao_m_always_16,dop_m_always_16 145 <1> opitem OP_E_CX, ARG_JUSTREG, aop_e_cx, da_e_cx ; (E)CX 146 <1> OP_FIRST_STRING equ nextindex 147 <1> opitem OP_1, ARG_IMMED, ao46, "1" ; 1 (simple "string" ops from here on) 148 <1> opitem OP_3, ARG_IMMED, ao47, "3" ; 3 149 <1> ; order of the following (ao48 entries) must match asm_regnum in aa.asm 150 <1> OP_FIRST_ASM_REGNUM equ nextindex ; corresponding to asm_regnum start 151 <1> opitem OP_DX, ARG_JUSTREG, ao48, "DX" ; DX 152 <1> opitem OP_CL, ARG_JUSTREG, ao48, "CL" ; CL 153 <1> opitem OP_ST, ARG_WEIRDREG, ao48, "ST" ; ST (top of coprocessor stack) 154 <1> opitem OP_CS, ARG_WEIRDREG, ao48, "CS" ; CS 155 <1> opitem OP_DS, ARG_WEIRDREG, ao48, "DS" ; DS 156 <1> opitem OP_ES, ARG_WEIRDREG, ao48, "ES" ; ES 157 <1> opitem OP_FS, ARG_WEIRDREG, ao48, "FS" ; FS 158 <1> opitem OP_GS, ARG_WEIRDREG, ao48, "GS" ; GS 159 <1> opitem OP_SS, ARG_WEIRDREG, ao48, "SS" ; SS 160 <1> OP_AFTER_LAST equ nextindex 161 <1> %if nextindex > OP_SIZE 162 <1> %error Too many op items 163 <1> %endif 164 <1> OP_AMOUNT_TABLE equ nextindex + 16 - 1 165 <1> ; nextindex: amount sizeless types 166 <1> ; 16: OP_SIZE combined types 167 <1> ; -1: OP_END does not occur in tables 168 <1> 169 <1> ; The following are extensions to sizeless OP_ items. 170 <1> ; After an OP_X operand, a byte giving an index into 171 <1> ; the OPX tables follows in the list. This is never 172 <1> ; used with a size so we can make use of the full 173 <1> ; eight bits. First macro parameter is the name which 174 <1> ; matches the use in instr.key. Second parameter is 175 <1> ; the routine in the assembler to dispatch to. Third 176 <1> ; parameter is the routine in the disassembler. 177 <1> ; Only used for some disassembler extensions for now. 178 <1> 179 <1> %macro opxitem 3.nolist 180 <1> %1 equ nextindex 181 <1> %xdefine ASMJMP_OPXITEMS ASMJMP_OPXITEMS,%2 182 <1> %xdefine DISJMP_OPXITEMS DISJMP_OPXITEMS,%3 183 <1> %assign nextindex nextindex + 1 184 <1> %endmacro 185 <1> %assign nextindex 0 186 <1> %define ASMJMP_OPXITEMS "" 187 <1> %define DISJMP_OPXITEMS "" 188 <1> opxitem OPX_NOTHING, ao_modifier_continue, dop60a 189 <1> opxitem OPX_MOD_IF_REG, ao_modifier_continue, dop_mod_if_reg 190 <1> opxitem OPX_MOD_IF_MEMOFFS_AND_OTHER_REG_AL_AX_EAX, ao_modifier_continue, dop_mod_if_memoffs_and_other_acc 192 <1> opxitem OPX_MOD_IF_OTHER_REG_AX_EAX, ao_modifier_continue, dop_mod_if_other_acc_1632 194 <1> opxitem OPX_MOD_IF_REG_1632, ao_modifier_continue, dop_mod_if_reg_1632 196 <1> opxitem OPX_MOD_IF_REG_AL_AX_EAX, ao_modifier_continue, dop_mod_if_reg_acc 198 <1> opxitem OPX_MOD_IF_REG_AX_EAX, ao_modifier_continue, dop_mod_if_reg_acc_1632 200 <1> opxitem OPX_MODALWAYS_IF_REG, ao_modifier_continue, dop_modalways_if_reg 202 <1> opxitem OPX_LOOP_OPTION, ac09_internal_error, dop_loop_option 203 <1> opxitem OPX_MOD_FORCE_3, ao_modifier_continue, dop_mod_force_3 204 <1> %if nextindex > 256 205 <1> %error Too many opx items 206 <1> %endif 21 %if !_LOADER 22 %include "asmtabs.asm" 1 <1> [list -] 360 <1> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 360 ------------------ <1> note: usesection ASMTABLE2 361 <1> asmtab: 362 <1> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 362 ------------------ <1> note: usesection ASMTABLE1 363 <1> 364 <1> strdef TABLENAME, "debugtbl.inc" 365 <1> %include _TABLENAME 1 <2> 2 <2> ;--- This file was generated by mktables.exe. 3 <2> 4 <2> OPTYPES_BASE EQU 0Ch 5 <2> 6 <2> ;--- Operand type lists. 7 <2> ;--- They were read from file instr.key. 8 <2> 9 <2> oplists label byte 0 00006150 00 opl OP_END ; idx=0, ofs=Ch, used=99 0 00006151 484100 opl OP_ALL+OP_AX, OP_ALL+OP_IMM_NOT_EXTEND, OP_END ; idx=1, ofs=Dh, used=18 0 00006154 180523424100 opl OP_X, OPX_MOD_IF_REG_AL_AX_EAX, OP_M_SRC_DST, OP_ALL+OP_RM, OP_ALL+OP_IMM_NOT_EXTEND, OP_END ; idx=2, ofs=10h, used=7 0 0000615A 180521424100 opl OP_X, OPX_MOD_IF_REG_AL_AX_EAX, OP_M_SRC, OP_ALL+OP_RM, OP_ALL+OP_IMM_NOT_EXTEND, OP_END ; idx=3, ofs=16h, used=3 0 00006160 221801424000 opl OP_M_DST, OP_X, OPX_MOD_IF_REG, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=4, ofs=1Ch, used=1 0 00006166 231805521100 opl OP_M_SRC_DST, OP_X, OPX_MOD_IF_REG_AL_AX_EAX, OP_1632+OP_RM, OP_IMMS8_EXTEND, OP_END ; idx=5, ofs=22h, used=7 0 0000616C 211805521100 opl OP_M_SRC, OP_X, OPX_MOD_IF_REG_AL_AX_EAX, OP_1632+OP_RM, OP_IMMS8_EXTEND, OP_END ; idx=6, ofs=28h, used=1 0 00006172 231807424600 opl OP_M_SRC_DST, OP_X, OPX_MODALWAYS_IF_REG, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=7, ofs=2Eh, used=19 0 00006178 211807424600 opl OP_M_SRC, OP_X, OPX_MODALWAYS_IF_REG, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=8, ofs=34h, used=4 0 0000617E 2218021807424600 opl OP_M_DST, OP_X, OPX_MOD_IF_MEMOFFS_AND_OTHER_REG_AL_AX_EAX, OP_X, OPX_MODALWAYS_IF_REG, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=9, ofs=3Ah, used=2 0 00006186 462118014200 opl OP_ALL+OP_R, OP_M_SRC, OP_X, OPX_MOD_IF_REG, OP_ALL+OP_RM, OP_END ; idx=10, ofs=42h, used=17 0 0000618C 4621180218014200 opl OP_ALL+OP_R, OP_M_SRC, OP_X, OPX_MOD_IF_MEMOFFS_AND_OTHER_REG_AL_AX_EAX, OP_X, OPX_MOD_IF_REG, OP_ALL+OP_RM, OP_END ; idx=11, ofs=48h, used=2 0 00006194 462318061803180742 opl OP_ALL+OP_R, OP_M_SRC_DST, OP_X, OPX_MOD_IF_REG_AX_EAX, OP_X, OPX_MOD_IF_OTHER_REG_AX_EAX, OP_X, OPX_MODALWAYS_IF_REG, OP_ALL+OP_RM, OP_END ; idx=12, ofs=50h, used=2 0 0000619D 00 0 0000619E 23727600 opl OP_M_SRC_DST, OP_16+OP_RM, OP_16+OP_R, OP_END ; idx=13, ofs=5Ah, used=1 0 000061A2 56211F5300 opl OP_1632+OP_R, OP_M_SRC, OP_FAR_M, OP_1632+OP_M, OP_END ; idx=14, ofs=5Eh, used=5 0 000061A7 56215200 opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=15, ofs=63h, used=35 0 000061AB 8700 opl OP_32+OP_R_ADD, OP_END ; idx=16, ofs=67h, used=8 0 000061AD 23525600 opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=17, ofs=69h, used=3 0 000061B1 21525600 opl OP_M_SRC, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=18, ofs=6Dh, used=1 0 000061B5 2352 opl OP_M_SRC_DST, OP_1632+OP_RM ; idx=19, ofs=71h, used=3 0 000061B7 1200 opl OP_IMM8, OP_END ; idx=20, ofs=73h, used=0 + 3 0 000061B9 21521200 opl OP_M_SRC, OP_1632+OP_RM, OP_IMM8, OP_END ; idx=21, ofs=75h, used=1 0 000061BD 24 opl OP_STACK_PUSH ; idx=22, ofs=79h, used=1 0 000061BE 1C0900 opl OP_NEAR, OP_REL1632, OP_END ; idx=23, ofs=7Ah, used=31 + 1 0 000061C1 26 opl OP_STACK_SPECIAL ; idx=24, ofs=7Dh, used=1 0 000061C2 1D0600 opl OP_FAR, OP_FARIMM, OP_END ; idx=25, ofs=7Eh, used=1 + 1 0 000061C5 26 opl OP_STACK_SPECIAL ; idx=26, ofs=81h, used=1 0 000061C6 1E0700 opl OP_FAR_REQUIRED, OP_FAR_OFFSET, OP_END ; idx=27, ofs=82h, used=1 + 1 0 000061C9 26 opl OP_STACK_SPECIAL ; idx=28, ofs=85h, used=1 0 000061CA 1E211FA300 opl OP_FAR_REQUIRED, OP_M_SRC, OP_FAR_M, OP_1632_DEFAULT+OP_M, OP_END ; idx=29, ofs=86h, used=1 + 1 0 000061CF 230100 opl OP_M_SRC_DST, OP_M64, OP_END ; idx=30, ofs=8Bh, used=1 0 000061D2 210100 opl OP_M_SRC, OP_M64, OP_END ; idx=31, ofs=8Eh, used=1 0 000061D5 220100 opl OP_M_DST, OP_M64, OP_END ; idx=32, ofs=91h, used=1 0 000061D8 1804 opl OP_X, OPX_MOD_IF_REG_1632 ; idx=33, ofs=94h, used=4 0 000061DA 234200 opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_END ; idx=34, ofs=96h, used=2 + 4 0 000061DD 214200 opl OP_M_SRC, OP_ALL+OP_RM, OP_END ; idx=35, ofs=99h, used=4 0 000061E0 24 opl OP_STACK_PUSH ; idx=36, ofs=9Ch, used=8 0 000061E1 5700 opl OP_1632+OP_R_ADD, OP_END ; idx=37, ofs=9Dh, used=16 + 8 0 000061E3 255700 opl OP_STACK_POP, OP_1632+OP_R_ADD, OP_END ; idx=38, ofs=9Fh, used=8 0 000061E6 24701200 opl OP_STACK_PUSH, OP_16+OP_IMM, OP_IMM8, OP_END ; idx=39, ofs=A2h, used=1 0 000061EA 210200 opl OP_M_SRC, OP_MFLOAT, OP_END ; idx=40, ofs=A6h, used=9 0 000061ED 220200 opl OP_M_DST, OP_MFLOAT, OP_END ; idx=41, ofs=A9h, used=2 0 000061F0 210300 opl OP_M_SRC, OP_MDOUBLE, OP_END ; idx=42, ofs=ACh, used=9 0 000061F3 220300 opl OP_M_DST, OP_MDOUBLE, OP_END ; idx=43, ofs=AFh, used=2 0 000061F6 2D opl OP_ST ; idx=44, ofs=B2h, used=20 0 000061F7 0B00 opl OP_STI, OP_END ; idx=45, ofs=B3h, used=4 + 20 0 000061F9 0A opl OP_1CHK ; idx=46, ofs=B5h, used=6 0 000061FA 0B2D00 opl OP_STI, OP_ST, OP_END ; idx=47, ofs=B6h, used=6 + 6 0 000061FD 218300 opl OP_M_SRC, OP_32+OP_M, OP_END ; idx=48, ofs=B9h, used=9 0 00006200 228300 opl OP_M_DST, OP_32+OP_M, OP_END ; idx=49, ofs=BCh, used=2 0 00006203 217300 opl OP_M_SRC, OP_16+OP_M, OP_END ; idx=50, ofs=BFh, used=10 0 00006206 227300 opl OP_M_DST, OP_16+OP_M, OP_END ; idx=51, ofs=C2h, used=4 0 00006209 210400 opl OP_M_SRC, OP_M80, OP_END ; idx=52, ofs=C5h, used=2 0 0000620C 220400 opl OP_M_DST, OP_M80, OP_END ; idx=53, ofs=C8h, used=2 0 0000620F 0A0B00 opl OP_1CHK, OP_STI, OP_END ; idx=54, ofs=CBh, used=9 0 00006212 21 opl OP_M_SRC ; idx=55, ofs=CEh, used=4 0 00006213 0500 opl OP_MXX, OP_END ; idx=56, ofs=CFh, used=1 + 4 0 00006215 220500 opl OP_M_DST, OP_MXX, OP_END ; idx=57, ofs=D1h, used=4 0 00006218 7800 opl OP_16+OP_AX, OP_END ; idx=58, ofs=D4h, used=1 0 0000621A 5621521000 opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_IMMS8, OP_END ; idx=59, ofs=D6h, used=1 0 0000621F 54561000 opl OP_1632+OP_R_MOD, OP_1632+OP_R, OP_IMMS8, OP_END ; idx=60, ofs=DBh, used=1 0 00006223 5621525100 opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_1632+OP_IMM_NOT_EXTEND, OP_END ; idx=61, ofs=DFh, used=1 0 00006228 54565100 opl OP_1632+OP_R_MOD, OP_1632+OP_R, OP_1632+OP_IMM_NOT_EXTEND, OP_END ; idx=62, ofs=E4h, used=1 0 0000622C 481200 opl OP_ALL+OP_AX, OP_IMM8, OP_END ; idx=63, ofs=E8h, used=2 0 0000622F 482B00 opl OP_ALL+OP_AX, OP_DX, OP_END ; idx=64, ofs=EBh, used=2 0 00006232 262A00 opl OP_STACK_SPECIAL, OP_3, OP_END ; idx=65, ofs=EEh, used=1 0 00006235 1300 opl OP_IMM8_OPTIONAL, OP_END ; idx=66, ofs=F1h, used=2 0 00006237 1808 opl OP_X, OPX_LOOP_OPTION ; idx=67, ofs=F3h, used=3 0 00006239 1B0800 opl OP_SHORT, OP_REL8, OP_END ; idx=68, ofs=F5h, used=42 + 3 0 0000623C 24211801B200 opl OP_STACK_PUSH, OP_M_SRC, OP_X, OPX_MOD_IF_REG, OP_1632_DEFAULT_ASM+OP_RM, OP_END ; idx=69, ofs=F8h, used=1 0 00006242 225200 opl OP_M_DST, OP_1632+OP_RM, OP_END ; idx=70, ofs=FEh, used=2 0 00006245 217200 opl OP_M_SRC, OP_16+OP_RM, OP_END ; idx=71, ofs=101h, used=5 0 00006248 227200 opl OP_M_DST, OP_16+OP_RM, OP_END ; idx=72, ofs=104h, used=1 0 0000624B 2722520F00 opl OP_M_ALWAYS_16, OP_M_DST, OP_1632+OP_RM, OP_SEGREG, OP_END ; idx=73, ofs=107h, used=1 0 00006250 270F215200 opl OP_M_ALWAYS_16, OP_SEGREG, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=74, ofs=10Ch, used=1 0 00006255 48214500 opl OP_ALL+OP_AX, OP_M_SRC, OP_ALL+OP_MOFFS, OP_END ; idx=75, ofs=111h, used=2 0 00006259 22454800 opl OP_M_DST, OP_ALL+OP_MOFFS, OP_ALL+OP_AX, OP_END ; idx=76, ofs=115h, used=2 0 0000625D 676000 opl OP_8+OP_R_ADD, OP_8+OP_IMM, OP_END ; idx=77, ofs=119h, used=8 0 00006260 575000 opl OP_1632+OP_R_ADD, OP_1632+OP_IMM, OP_END ; idx=78, ofs=11Ch, used=8 0 00006263 5619211A6200 opl OP_1632+OP_R, OP_SHOSIZ, OP_M_SRC, OP_ASM_MOVX, OP_8+OP_RM, OP_END ; idx=79, ofs=11Fh, used=2 0 00006269 5619211A7200 opl OP_1632+OP_R, OP_SHOSIZ, OP_M_SRC, OP_ASM_MOVX, OP_16+OP_RM, OP_END ; idx=80, ofs=125h, used=2 0 0000626F 124800 opl OP_IMM8, OP_ALL+OP_AX, OP_END ; idx=81, ofs=12Bh, used=2 0 00006272 2B4800 opl OP_DX, OP_ALL+OP_AX, OP_END ; idx=82, ofs=12Eh, used=2 0 00006275 25221801B200 opl OP_STACK_POP, OP_M_DST, OP_X, OPX_MOD_IF_REG, OP_1632_DEFAULT_ASM+OP_RM, OP_END ; idx=83, ofs=131h, used=1 0 0000627B 2419A100 opl OP_STACK_PUSH, OP_SHOSIZ, OP_1632_DEFAULT+OP_IMM_NOT_EXTEND, OP_END ; idx=84, ofs=137h, used=2 0 0000627F 24191000 opl OP_STACK_PUSH, OP_SHOSIZ, OP_IMMS8, OP_END ; idx=85, ofs=13Bh, used=2 0 00006283 23422900 opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_1, OP_END ; idx=86, ofs=13Fh, used=9 0 00006287 23422C00 opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_CL, OP_END ; idx=87, ofs=143h, used=9 0 0000628B 23421500 opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_IMM8_SHIFTROT, OP_END ; idx=88, ofs=147h, used=9 0 0000628F 25 opl OP_STACK_POP ; idx=89, ofs=14Bh, used=2 0 00006290 7000 opl OP_16+OP_IMM, OP_END ; idx=90, ofs=14Ch, used=1 + 2 0 00006292 267000 opl OP_STACK_SPECIAL, OP_16+OP_IMM, OP_END ; idx=91, ofs=14Eh, used=1 0 00006295 226200 opl OP_M_DST, OP_8+OP_RM, OP_END ; idx=92, ofs=151h, used=30 0 00006298 2352561200 opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_IMM8, OP_END ; idx=93, ofs=154h, used=2 0 0000629D 2352562C00 opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_CL, OP_END ; idx=94, ofs=159h, used=2 0 000062A2 585700 opl OP_1632+OP_AX, OP_1632+OP_R_ADD, OP_END ; idx=95, ofs=15Eh, used=7 0 000062A5 575800 opl OP_1632+OP_R_ADD, OP_1632+OP_AX, OP_END ; idx=96, ofs=161h, used=1 0 000062A8 24 opl OP_STACK_PUSH ; idx=97, ofs=164h, used=1 0 000062A9 3000 opl OP_ES, OP_END ; idx=98, ofs=165h, used=1 + 1 0 000062AB 24 opl OP_STACK_PUSH ; idx=99, ofs=167h, used=1 0 000062AC 2E00 opl OP_CS, OP_END ; idx=100, ofs=168h, used=1 + 1 0 000062AE 24 opl OP_STACK_PUSH ; idx=101, ofs=16Ah, used=1 0 000062AF 3300 opl OP_SS, OP_END ; idx=102, ofs=16Bh, used=1 + 1 0 000062B1 24 opl OP_STACK_PUSH ; idx=103, ofs=16Dh, used=1 0 000062B2 2F00 opl OP_DS, OP_END ; idx=104, ofs=16Eh, used=1 + 1 0 000062B4 24 opl OP_STACK_PUSH ; idx=105, ofs=170h, used=1 0 000062B5 3100 opl OP_FS, OP_END ; idx=106, ofs=171h, used=1 + 1 0 000062B7 24 opl OP_STACK_PUSH ; idx=107, ofs=173h, used=1 0 000062B8 3200 opl OP_GS, OP_END ; idx=108, ofs=174h, used=1 + 1 0 000062BA 253000 opl OP_STACK_POP, OP_ES, OP_END ; idx=109, ofs=176h, used=1 0 000062BD 253300 opl OP_STACK_POP, OP_SS, OP_END ; idx=110, ofs=179h, used=1 0 000062C0 252F00 opl OP_STACK_POP, OP_DS, OP_END ; idx=111, ofs=17Ch, used=1 0 000062C3 253100 opl OP_STACK_POP, OP_FS, OP_END ; idx=112, ofs=17Fh, used=1 0 000062C6 253200 opl OP_STACK_POP, OP_GS, OP_END ; idx=113, ofs=182h, used=1 0 000062C9 1809840C00 opl OP_X, OPX_MOD_FORCE_3, OP_32+OP_R_MOD, OP_CR, OP_END ; idx=114, ofs=185h, used=1 0 000062CE 18090C8400 opl OP_X, OPX_MOD_FORCE_3, OP_CR, OP_32+OP_R_MOD, OP_END ; idx=115, ofs=18Ah, used=1 0 000062D3 1809840D00 opl OP_X, OPX_MOD_FORCE_3, OP_32+OP_R_MOD, OP_DR, OP_END ; idx=116, ofs=18Fh, used=1 0 000062D8 18090D8400 opl OP_X, OPX_MOD_FORCE_3, OP_DR, OP_32+OP_R_MOD, OP_END ; idx=117, ofs=194h, used=1 0 000062DD 1809840E00 opl OP_X, OPX_MOD_FORCE_3, OP_32+OP_R_MOD, OP_TR, OP_END ; idx=118, ofs=199h, used=1 0 000062E2 18090E8400 opl OP_X, OPX_MOD_FORCE_3, OP_TR, OP_32+OP_R_MOD, OP_END ; idx=119, ofs=19Eh, used=1 0 000062E7 16218200 opl OP_MMX, OP_M_SRC, OP_32+OP_RM, OP_END ; idx=120, ofs=1A3h, used=1 0 000062EB 22821600 opl OP_M_DST, OP_32+OP_RM, OP_MMX, OP_END ; idx=121, ofs=1A7h, used=1 0 000062EF 16219200 opl OP_MMX, OP_M_SRC, OP_64+OP_RM, OP_END ; idx=122, ofs=1ABh, used=45 0 000062F3 22921600 opl OP_M_DST, OP_64+OP_RM, OP_MMX, OP_END ; idx=123, ofs=1AFh, used=1 0 000062F7 171200 opl OP_MMX_MOD, OP_IMM8, OP_END ; idx=124, ofs=1B3h, used=8 0 000062FA 560500 opl OP_1632+OP_R, OP_MXX, OP_END ; idx=125, ofs=1B6h, used=1 0 000062FD 24 opl OP_STACK_PUSH ; idx=126, ofs=1B9h, used=1 0 000062FE 1C21A200 opl OP_NEAR, OP_M_SRC, OP_1632_DEFAULT+OP_RM, OP_END ; idx=127, ofs=1BAh, used=1 + 1 0 00006302 5621205300 opl OP_1632+OP_R, OP_M_SRC, OP_DOUBLE_M, OP_1632+OP_M, OP_END ; idx=128, ofs=1BEh, used=1 0 00006307 261400 opl OP_STACK_SPECIAL, OP_IMM8_INT, OP_END ; idx=129, ofs=1C3h, used=1 0 0000630A 1B082800 opl OP_SHORT, OP_REL8, OP_E_CX, OP_END ; idx=130, ofs=1C6h, used=5 0 0000630E 2500 opl OP_STACK_POP, OP_END ; idx=131, ofs=1CAh, used=3 0 00006310 2400 opl OP_STACK_PUSH, OP_END ; idx=132, ofs=1CCh, used=1 0 00006312 2600 opl OP_STACK_SPECIAL, OP_END ; idx=133, ofs=1CEh, used=11 144 <2> 145 <2> ASMMOD EQU opidx 146 <2> 147 <2> ;--- Assembler: data on groups. 148 <2> ;--- If > 100h, it's a "0F-prefix" group. 149 <2> 150 <2> align 2, db 0 151 <2> agroups label word 0 00006314 FE00 dw 0FEh ; 0 0 00006316 8300 dw 083h ; 1 0 00006318 8000 dw 080h ; 2 0 0000631A BA01 dw 1BAh ; 3 0 0000631C FF00 dw 0FFh ; 4 0 0000631E C701 dw 1C7h ; 5 0 00006320 F600 dw 0F6h ; 6 0 00006322 0101 dw 101h ; 7 0 00006324 0001 dw 100h ; 8 0 00006326 C600 dw 0C6h ; 9 0 00006328 7101 dw 171h ; 10 0 0000632A 7201 dw 172h ; 11 0 0000632C 7301 dw 173h ; 12 0 0000632E 8F00 dw 08Fh ; 13 0 00006330 D000 dw 0D0h ; 14 0 00006332 D200 dw 0D2h ; 15 0 00006334 C000 dw 0C0h ; 16 169 <2> 170 <2> ;--- List of assembler mnemonics and data. 171 <2> ;--- variant's 1. argument (=a): 172 <2> ;--- if a < 0x100: one byte opcode. 173 <2> ;--- if a >= 0x100 && a < 0x200: two byte "0F"-opcode. 174 <2> ;--- if a >= 0x200 && a < 0x240: fp instruction. 175 <2> ;--- if a >= 0x240: refers to agroups [macro AGRP() is used]. 176 <2> ;--- variant's 2. argument is index into array opindex. 177 <2> 178 <2> mnlist label near 179 <2> mnsuffix 180 <2> 181 <2> mne A32, ASM_SPECIAL ; ofs=0h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007870 FF db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007A56 0300 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007A58 413332 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 182 <2> mne A16, ASM_SPECIAL ; ofs=2h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007871 FF db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007A5B 1300 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007A5D 413136 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 183 <2> mne O32, ASM_SPECIAL ; ofs=4h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007872 FF db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007A60 2300 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007A62 4F3332 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 184 <2> mne O16, ASM_SPECIAL ; ofs=6h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007873 FF db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007A65 3300 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007A67 4F3136 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 185 <2> mne BOXCB ; ofs=8h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007A6A 4500 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007A6C 424F584342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007874 F43D84 variant AGRP(0,7), 90 186 ------------------ <2> note: usesection ASMTABLE2 0 00007877 FF endvariant 187 ------------------ <2> note: usesection ASMTABLE2 188 <2> mne AAA ; ofs=Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007A71 8300 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007A73 414141 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007878 1CCA variant 037h, 0 189 ------------------ <2> note: usesection ASMTABLE2 0 0000787A FF endvariant 190 ------------------ <2> note: usesection ASMTABLE2 191 <2> mne AAD, ASM_SPECIAL ; ofs=Fh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 0000787B FF db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007A76 B300 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007A78 414144 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000787C 6FC0 variant 0D5h, 66 192 ------------------ <2> note: usesection ASMTABLE2 0 0000787E FF endvariant 193 ------------------ <2> note: usesection ASMTABLE2 194 <2> mne AAM, ASM_SPECIAL ; ofs=13h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 0000787F FF db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007A7B F300 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007A7D 41414D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007880 6F3A variant 0D4h, 66 195 ------------------ <2> note: usesection ASMTABLE2 0 00007882 FF endvariant 196 ------------------ <2> note: usesection ASMTABLE2 197 <2> mne AAS ; ofs=17h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007A80 3301 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007A82 414153 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007883 20FA variant 03Fh, 0 198 ------------------ <2> note: usesection ASMTABLE2 0 00007885 FF endvariant 199 ------------------ <2> note: usesection ASMTABLE2 200 <2> mne ADC ; ofs=1Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007A85 6301 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007A87 414443 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007886 FBF43EC1 variant AGRP(1,2), 5, ASM_LOCKABLE 201 ------------------ <2> note: usesection ASMTABLE2 0 0000788A 0A79 variant 014h, 1 202 ------------------ <2> note: usesection ASMTABLE2 0 0000788C FBF442EE variant AGRP(2,2), 2, ASM_LOCKABLE 203 ------------------ <2> note: usesection ASMTABLE2 0 00007890 FB0867 variant 010h, 7, ASM_LOCKABLE 204 ------------------ <2> note: usesection ASMTABLE2 0 00007893 0976 variant 012h, 10 205 ------------------ <2> note: usesection ASMTABLE2 0 00007895 FF endvariant 206 ------------------ <2> note: usesection ASMTABLE2 207 <2> mne ADD ; ofs=2Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007A8A 6302 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007A8C 414444 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007896 FBF43DB5 variant AGRP(1,0), 5, ASM_LOCKABLE 208 ------------------ <2> note: usesection ASMTABLE2 0 0000789A 0219 variant 004h, 1 209 ------------------ <2> note: usesection ASMTABLE2 0 0000789C FBF441E2 variant AGRP(2,0), 2, ASM_LOCKABLE 210 ------------------ <2> note: usesection ASMTABLE2 0 000078A0 FB0007 variant 000h, 7, ASM_LOCKABLE 211 ------------------ <2> note: usesection ASMTABLE2 0 000078A3 0116 variant 002h, 10 212 ------------------ <2> note: usesection ASMTABLE2 0 000078A5 FF endvariant 213 ------------------ <2> note: usesection ASMTABLE2 214 <2> mne AND ; ofs=3Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007A8F 6303 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007A91 414E44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000078A6 FBF43FCD variant AGRP(1,4), 5, ASM_LOCKABLE 215 ------------------ <2> note: usesection ASMTABLE2 0 000078AA 12D9 variant 024h, 1 216 ------------------ <2> note: usesection ASMTABLE2 0 000078AC FBF443FA variant AGRP(2,4), 2, ASM_LOCKABLE 217 ------------------ <2> note: usesection ASMTABLE2 0 000078B0 FB10C7 variant 020h, 7, ASM_LOCKABLE 218 ------------------ <2> note: usesection ASMTABLE2 0 000078B3 11D6 variant 022h, 10 219 ------------------ <2> note: usesection ASMTABLE2 0 000078B5 FF endvariant 220 ------------------ <2> note: usesection ASMTABLE2 221 <2> mne ARPL ; ofs=4Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007A94 6404 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007A96 4152504C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000078B6 F633DF variant 063h, 13, ASM_MACH2 222 ------------------ <2> note: usesection ASMTABLE2 0 000078B9 FF endvariant 223 ------------------ <2> note: usesection ASMTABLE2 224 <2> mne BOUND ; ofs=4Eh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007A9A A504 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007A9C 424F554E44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000078BA F533CC variant 062h, 128, ASM_MACH1 225 ------------------ <2> note: usesection ASMTABLE2 0 000078BD FF endvariant 226 ------------------ <2> note: usesection ASMTABLE2 227 <2> mne BSF ; ofs=52h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007AA1 E304 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007AA3 425346 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000078BE F7E877 variant 1BCh, 15, ASM_MACH3 228 ------------------ <2> note: usesection ASMTABLE2 0 000078C1 FF endvariant 229 ------------------ <2> note: usesection ASMTABLE2 230 <2> mne BSR ; ofs=56h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007AA6 2305 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007AA8 425352 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000078C2 F7E8FD variant 1BDh, 15, ASM_MACH3 231 ------------------ <2> note: usesection ASMTABLE2 0 000078C5 FF endvariant 232 ------------------ <2> note: usesection ASMTABLE2 233 <2> mne BSWAP, ASM_D32 ; ofs=5Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000078C6 FD db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007AAB 6505 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007AAD 4253574150 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000078C7 F8EEC0 variant 1C8h, 16, ASM_MACH4 234 ------------------ <2> note: usesection ASMTABLE2 0 000078CA FF endvariant 235 ------------------ <2> note: usesection ASMTABLE2 236 <2> mne BT ; ofs=5Fh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007AB2 B205 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007AB4 4254 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000078CB F7DB64 variant 1A3h, 18, ASM_MACH3 237 ------------------ <2> note: usesection ASMTABLE2 0 000078CE F7F4483D variant AGRP(3,4), 21, ASM_MACH3 238 ------------------ <2> note: usesection ASMTABLE2 0 000078D2 FF endvariant 239 ------------------ <2> note: usesection ASMTABLE2 240 <2> mne BTC ; ofs=67h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007AB6 3306 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007AB8 425443 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000078D3 FBF7E7F3 variant 1BBh, 17, ASM_LOCKABLE, ASM_MACH3 241 ------------------ <2> note: usesection ASMTABLE2 0 000078D7 FBF7F449CD variant AGRP(3,7), 19, ASM_LOCKABLE, ASM_MACH3 242 ------------------ <2> note: usesection ASMTABLE2 0 000078DC FF endvariant 243 ------------------ <2> note: usesection ASMTABLE2 244 <2> mne BTR ; ofs=71h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007ABB D306 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007ABD 425452 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000078DD FBF7E3C3 variant 1B3h, 17, ASM_LOCKABLE, ASM_MACH3 245 ------------------ <2> note: usesection ASMTABLE2 0 000078E1 FBF7F44947 variant AGRP(3,6), 19, ASM_LOCKABLE, ASM_MACH3 246 ------------------ <2> note: usesection ASMTABLE2 0 000078E6 FF endvariant 247 ------------------ <2> note: usesection ASMTABLE2 248 <2> mne BTS ; ofs=7Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007AC0 7307 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007AC2 425453 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000078E7 FBF7DF93 variant 1ABh, 17, ASM_LOCKABLE, ASM_MACH3 249 ------------------ <2> note: usesection ASMTABLE2 0 000078EB FBF7F448C1 variant AGRP(3,5), 19, ASM_LOCKABLE, ASM_MACH3 250 ------------------ <2> note: usesection ASMTABLE2 0 000078F0 FF endvariant 251 ------------------ <2> note: usesection ASMTABLE2 252 <2> mne CALL ; ofs=85h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007AC5 1408 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007AC7 43414C4C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000078F1 50B6 variant 09Ah, 26 253 ------------------ <2> note: usesection ASMTABLE2 0 000078F3 7986 variant 0E8h, 22 254 ------------------ <2> note: usesection ASMTABLE2 0 000078F5 F44BCA variant AGRP(4,2), 126 255 ------------------ <2> note: usesection ASMTABLE2 0 000078F8 F44BEE variant AGRP(4,3), 28 256 ------------------ <2> note: usesection ASMTABLE2 0 000078FB 50B4 variant 09Ah, 24 257 ------------------ <2> note: usesection ASMTABLE2 0 000078FD FF endvariant 258 ------------------ <2> note: usesection ASMTABLE2 259 <2> mne CBW, ASM_D16 ; ofs=92h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000078FE FC db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007ACB E308 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007ACD 434257 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 260 <2> mne CWDE, ASM_D32 ; ofs=93h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000078FF FD db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007AD0 F408 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007AD2 43574445 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007900 4F90 variant 098h, 0 261 ------------------ <2> note: usesection ASMTABLE2 0 00007902 FF endvariant 262 ------------------ <2> note: usesection ASMTABLE2 263 <2> mne CLC ; ofs=97h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007AD6 3309 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007AD8 434C43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007903 81D0 variant 0F8h, 0 264 ------------------ <2> note: usesection ASMTABLE2 0 00007905 FF endvariant 265 ------------------ <2> note: usesection ASMTABLE2 266 <2> mne CLD ; ofs=9Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007ADB 6309 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007ADD 434C44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007906 83E8 variant 0FCh, 0 267 ------------------ <2> note: usesection ASMTABLE2 0 00007908 FF endvariant 268 ------------------ <2> note: usesection ASMTABLE2 269 <2> mne CLI ; ofs=9Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007AE0 9309 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007AE2 434C49 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007909 82DC variant 0FAh, 0 270 ------------------ <2> note: usesection ASMTABLE2 0 0000790B FF endvariant 271 ------------------ <2> note: usesection ASMTABLE2 272 <2> mne CLTS ; ofs=A0h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007AE5 C409 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007AE7 434C5453 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000790C F68924 variant 106h, 0, ASM_MACH2 273 ------------------ <2> note: usesection ASMTABLE2 0 0000790F FF endvariant 274 ------------------ <2> note: usesection ASMTABLE2 275 <2> mne CMC ; ofs=A4h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007AEB 030A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007AED 434D43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007910 803E variant 0F5h, 0 276 ------------------ <2> note: usesection ASMTABLE2 0 00007912 FF endvariant 277 ------------------ <2> note: usesection ASMTABLE2 278 <2> mne CMOVA ; ofs=A7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007AF0 350A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007AF2 434D4F5641 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007913 FAAB39 variant 147h, 15, ASM_MACH6 279 ------------------ <2> note: usesection ASMTABLE2 0 00007916 FF endvariant 280 ------------------ <2> note: usesection ASMTABLE2 281 <2> mne CMOVAE ; ofs=ABh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007AF7 760A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007AF9 434D4F564145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007917 FAA921 variant 143h, 15, ASM_MACH6 282 ------------------ <2> note: usesection ASMTABLE2 0 0000791A FF endvariant 283 ------------------ <2> note: usesection ASMTABLE2 284 <2> mne CMOVB ; ofs=AFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007AFF B50A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B01 434D4F5642 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000791B FAA89B variant 142h, 15, ASM_MACH6 285 ------------------ <2> note: usesection ASMTABLE2 0 0000791E FF endvariant 286 ------------------ <2> note: usesection ASMTABLE2 287 <2> mne CMOVBE ; ofs=B3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B06 F60A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B08 434D4F564245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000791F FAAAB3 variant 146h, 15, ASM_MACH6 288 ------------------ <2> note: usesection ASMTABLE2 0 00007922 FF endvariant 289 ------------------ <2> note: usesection ASMTABLE2 290 <2> mne CMOVC ; ofs=B7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B0E 350B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B10 434D4F5643 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007923 FAA89B variant 142h, 15, ASM_MACH6 291 ------------------ <2> note: usesection ASMTABLE2 0 00007926 FF endvariant 292 ------------------ <2> note: usesection ASMTABLE2 293 <2> mne CMOVE ; ofs=BBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B15 750B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B17 434D4F5645 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007927 FAA9A7 variant 144h, 15, ASM_MACH6 294 ------------------ <2> note: usesection ASMTABLE2 0 0000792A FF endvariant 295 ------------------ <2> note: usesection ASMTABLE2 296 <2> mne CMOVG ; ofs=BFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B1C B50B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B1E 434D4F5647 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000792B FAAF69 variant 14Fh, 15, ASM_MACH6 297 ------------------ <2> note: usesection ASMTABLE2 0 0000792E FF endvariant 298 ------------------ <2> note: usesection ASMTABLE2 299 <2> mne CMOVGE ; ofs=C3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B23 F60B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B25 434D4F564745 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000792F FAAE5D variant 14Dh, 15, ASM_MACH6 300 ------------------ <2> note: usesection ASMTABLE2 0 00007932 FF endvariant 301 ------------------ <2> note: usesection ASMTABLE2 302 <2> mne CMOVL ; ofs=C7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B2B 350C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B2D 434D4F564C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007933 FAADD7 variant 14Ch, 15, ASM_MACH6 303 ------------------ <2> note: usesection ASMTABLE2 0 00007936 FF endvariant 304 ------------------ <2> note: usesection ASMTABLE2 305 <2> mne CMOVLE ; ofs=CBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B32 760C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B34 434D4F564C45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007937 FAAEE3 variant 14Eh, 15, ASM_MACH6 306 ------------------ <2> note: usesection ASMTABLE2 0 0000793A FF endvariant 307 ------------------ <2> note: usesection ASMTABLE2 308 <2> mne CMOVNA ; ofs=CFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B3A B60C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B3C 434D4F564E41 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000793B FAAAB3 variant 146h, 15, ASM_MACH6 309 ------------------ <2> note: usesection ASMTABLE2 0 0000793E FF endvariant 310 ------------------ <2> note: usesection ASMTABLE2 311 <2> mne CMOVNAE ; ofs=D3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B42 F70C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B44 434D4F564E4145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000793F FAA89B variant 142h, 15, ASM_MACH6 312 ------------------ <2> note: usesection ASMTABLE2 0 00007942 FF endvariant 313 ------------------ <2> note: usesection ASMTABLE2 314 <2> mne CMOVNB ; ofs=D7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B4B 360D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B4D 434D4F564E42 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007943 FAA921 variant 143h, 15, ASM_MACH6 315 ------------------ <2> note: usesection ASMTABLE2 0 00007946 FF endvariant 316 ------------------ <2> note: usesection ASMTABLE2 317 <2> mne CMOVNBE ; ofs=DBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B53 770D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B55 434D4F564E4245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007947 FAAB39 variant 147h, 15, ASM_MACH6 318 ------------------ <2> note: usesection ASMTABLE2 0 0000794A FF endvariant 319 ------------------ <2> note: usesection ASMTABLE2 320 <2> mne CMOVNC ; ofs=DFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B5C B60D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B5E 434D4F564E43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000794B FAA921 variant 143h, 15, ASM_MACH6 321 ------------------ <2> note: usesection ASMTABLE2 0 0000794E FF endvariant 322 ------------------ <2> note: usesection ASMTABLE2 323 <2> mne CMOVNE ; ofs=E3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B64 F60D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B66 434D4F564E45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000794F FAAA2D variant 145h, 15, ASM_MACH6 324 ------------------ <2> note: usesection ASMTABLE2 0 00007952 FF endvariant 325 ------------------ <2> note: usesection ASMTABLE2 326 <2> mne CMOVNG ; ofs=E7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B6C 360E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B6E 434D4F564E47 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007953 FAAEE3 variant 14Eh, 15, ASM_MACH6 327 ------------------ <2> note: usesection ASMTABLE2 0 00007956 FF endvariant 328 ------------------ <2> note: usesection ASMTABLE2 329 <2> mne CMOVNGE ; ofs=EBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B74 770E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B76 434D4F564E4745 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007957 FAADD7 variant 14Ch, 15, ASM_MACH6 330 ------------------ <2> note: usesection ASMTABLE2 0 0000795A FF endvariant 331 ------------------ <2> note: usesection ASMTABLE2 332 <2> mne CMOVNL ; ofs=EFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B7D B60E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B7F 434D4F564E4C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000795B FAAE5D variant 14Dh, 15, ASM_MACH6 333 ------------------ <2> note: usesection ASMTABLE2 0 0000795E FF endvariant 334 ------------------ <2> note: usesection ASMTABLE2 335 <2> mne CMOVNLE ; ofs=F3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B85 F70E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B87 434D4F564E4C45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000795F FAAF69 variant 14Fh, 15, ASM_MACH6 336 ------------------ <2> note: usesection ASMTABLE2 0 00007962 FF endvariant 337 ------------------ <2> note: usesection ASMTABLE2 338 <2> mne CMOVNO ; ofs=F7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B8E 360F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B90 434D4F564E4F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007963 FAA815 variant 141h, 15, ASM_MACH6 339 ------------------ <2> note: usesection ASMTABLE2 0 00007966 FF endvariant 340 ------------------ <2> note: usesection ASMTABLE2 341 <2> mne CMOVNP ; ofs=FBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B96 760F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007B98 434D4F564E50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007967 FAAD51 variant 14Bh, 15, ASM_MACH6 342 ------------------ <2> note: usesection ASMTABLE2 0 0000796A FF endvariant 343 ------------------ <2> note: usesection ASMTABLE2 344 <2> mne CMOVNS ; ofs=FFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007B9E B60F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007BA0 434D4F564E53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000796B FAAC45 variant 149h, 15, ASM_MACH6 345 ------------------ <2> note: usesection ASMTABLE2 0 0000796E FF endvariant 346 ------------------ <2> note: usesection ASMTABLE2 347 <2> mne CMOVNZ ; ofs=103h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007BA6 F60F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007BA8 434D4F564E5A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000796F FAAA2D variant 145h, 15, ASM_MACH6 348 ------------------ <2> note: usesection ASMTABLE2 0 00007972 FF endvariant 349 ------------------ <2> note: usesection ASMTABLE2 350 <2> mne CMOVO ; ofs=107h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007BAE 3510 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007BB0 434D4F564F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007973 FAA78F variant 140h, 15, ASM_MACH6 351 ------------------ <2> note: usesection ASMTABLE2 0 00007976 FF endvariant 352 ------------------ <2> note: usesection ASMTABLE2 353 <2> mne CMOVP ; ofs=10Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007BB5 7510 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007BB7 434D4F5650 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007977 FAACCB variant 14Ah, 15, ASM_MACH6 354 ------------------ <2> note: usesection ASMTABLE2 0 0000797A FF endvariant 355 ------------------ <2> note: usesection ASMTABLE2 356 <2> mne CMOVPE ; ofs=10Fh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007BBC B610 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007BBE 434D4F565045 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000797B FAACCB variant 14Ah, 15, ASM_MACH6 357 ------------------ <2> note: usesection ASMTABLE2 0 0000797E FF endvariant 358 ------------------ <2> note: usesection ASMTABLE2 359 <2> mne CMOVPO ; ofs=113h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007BC4 F610 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007BC6 434D4F56504F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000797F FAAD51 variant 14Bh, 15, ASM_MACH6 360 ------------------ <2> note: usesection ASMTABLE2 0 00007982 FF endvariant 361 ------------------ <2> note: usesection ASMTABLE2 362 <2> mne CMOVS ; ofs=117h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007BCC 3511 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007BCE 434D4F5653 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007983 FAABBF variant 148h, 15, ASM_MACH6 363 ------------------ <2> note: usesection ASMTABLE2 0 00007986 FF endvariant 364 ------------------ <2> note: usesection ASMTABLE2 365 <2> mne CMOVZ ; ofs=11Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007BD3 7511 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007BD5 434D4F565A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007987 FAA9A7 variant 144h, 15, ASM_MACH6 366 ------------------ <2> note: usesection ASMTABLE2 0 0000798A FF endvariant 367 ------------------ <2> note: usesection ASMTABLE2 368 <2> mne CMP ; ofs=11Fh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007BDA B311 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007BDC 434D50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000798B F44160 variant AGRP(1,7), 6 369 ------------------ <2> note: usesection ASMTABLE2 0 0000798E 1F69 variant 03Ch, 1 370 ------------------ <2> note: usesection ASMTABLE2 0 00007990 F4458D variant AGRP(2,7), 3 371 ------------------ <2> note: usesection ASMTABLE2 0 00007993 1D58 variant 038h, 8 372 ------------------ <2> note: usesection ASMTABLE2 0 00007995 1E66 variant 03Ah, 10 373 ------------------ <2> note: usesection ASMTABLE2 0 00007997 FF endvariant 374 ------------------ <2> note: usesection ASMTABLE2 375 <2> mne CMPSB ; ofs=12Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007BDF 8512 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007BE1 434D505342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007998 56E4 variant 0A6h, 0 376 ------------------ <2> note: usesection ASMTABLE2 0 0000799A FF endvariant 377 ------------------ <2> note: usesection ASMTABLE2 378 <2> mne CMPXCHG ; ofs=132h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007BE6 B712 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007BE8 434D5058434847 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000799B FBF8E227 variant 1B0h, 7, ASM_LOCKABLE, ASM_MACH4 379 ------------------ <2> note: usesection ASMTABLE2 0 0000799F FF endvariant 380 ------------------ <2> note: usesection ASMTABLE2 381 <2> mne CMPXCHG8B ; ofs=137h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007BEF 0913 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007BF1 434D50584348473842 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079A0 F9F44F14 variant AGRP(5,1), 30, ASM_MACH5 382 ------------------ <2> note: usesection ASMTABLE2 0 000079A4 FF endvariant 383 ------------------ <2> note: usesection ASMTABLE2 384 <2> mne CPUID ; ofs=13Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007BFA 5513 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007BFC 4350554944 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079A5 F9DACC variant 1A2h, 0, ASM_MACH5 385 ------------------ <2> note: usesection ASMTABLE2 0 000079A8 FF endvariant 386 ------------------ <2> note: usesection ASMTABLE2 387 <2> mne CWD, ASM_D16 ; ofs=140h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000079A9 FC db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C01 9313 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C03 435744 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 388 <2> mne CDQ, ASM_D32 ; ofs=141h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000079AA FD db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C06 A313 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C08 434451 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079AB 5016 variant 099h, 0 389 ------------------ <2> note: usesection ASMTABLE2 0 000079AD FF endvariant 390 ------------------ <2> note: usesection ASMTABLE2 391 <2> mne DAA ; ofs=145h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C0B E313 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C0D 444141 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079AE 146A variant 027h, 0 392 ------------------ <2> note: usesection ASMTABLE2 0 000079B0 FF endvariant 393 ------------------ <2> note: usesection ASMTABLE2 394 <2> mne DAS ; ofs=148h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C10 1314 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C12 444153 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079B1 189A variant 02Fh, 0 395 ------------------ <2> note: usesection ASMTABLE2 0 000079B3 FF endvariant 396 ------------------ <2> note: usesection ASMTABLE2 397 <2> mne DB, ASM_SPECIAL ; ofs=14Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000079B4 FF db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C15 4214 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C17 4442 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 398 <2> mne DD, ASM_SPECIAL ; ofs=14Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000079B5 FF db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C19 5214 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C1B 4444 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 399 <2> mne DEC ; ofs=14Fh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C1D 6314 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C1F 444543 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079B6 25D5 variant 048h, 37 400 ------------------ <2> note: usesection ASMTABLE2 0 000079B8 FBF43A27 variant AGRP(0,1), 33, ASM_LOCKABLE 401 ------------------ <2> note: usesection ASMTABLE2 0 000079BC FF endvariant 402 ------------------ <2> note: usesection ASMTABLE2 403 <2> mne DIV ; ofs=156h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C22 D314 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C24 444956 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079BD F455E7 variant AGRP(6,6), 35 404 ------------------ <2> note: usesection ASMTABLE2 0 000079C0 FF endvariant 405 ------------------ <2> note: usesection ASMTABLE2 406 <2> mne DW, ASM_SPECIAL ; ofs=15Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000079C1 FF db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C27 1215 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C29 4457 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 407 <2> mne EMMS ; ofs=15Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C2B 2415 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C2D 454D4D53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079C2 F9C44A variant 177h, 0, ASM_MACH5 408 ------------------ <2> note: usesection ASMTABLE2 0 000079C5 FF endvariant 409 ------------------ <2> note: usesection ASMTABLE2 410 <2> mne F2XM1 ; ofs=164h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C31 6515 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C33 4632584D31 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079C6 7196F0 fpvariant 0D9h, 0, 0F0h 411 ------------------ <2> note: usesection ASMTABLE2 411 ------------------ <2> note: usesection ASMTABLE2 0 000079C9 FF endvariant 412 ------------------ <2> note: usesection ASMTABLE2 413 <2> mne FABS ; ofs=168h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C38 A415 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C3A 46414253 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079CA 7196E1 fpvariant 0D9h, 0, 0E1h 414 ------------------ <2> note: usesection ASMTABLE2 414 ------------------ <2> note: usesection ASMTABLE2 0 000079CD FF endvariant 415 ------------------ <2> note: usesection ASMTABLE2 416 <2> mne FADD ; ofs=16Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C3E E415 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C40 46414444 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079CE F41828 variant 200h, 40 417 ------------------ <2> note: usesection ASMTABLE2 0 000079D1 F41A42 variant 204h, 42 418 ------------------ <2> note: usesection ASMTABLE2 0 000079D4 713CC0 fpvariant 0D8h, 44, 0C0h 419 ------------------ <2> note: usesection ASMTABLE2 419 ------------------ <2> note: usesection ASMTABLE2 0 000079D7 7357C0 fpvariant 0DCh, 47, 0C0h 420 ------------------ <2> note: usesection ASMTABLE2 420 ------------------ <2> note: usesection ASMTABLE2 0 000079DA FF endvariant 421 ------------------ <2> note: usesection ASMTABLE2 422 <2> mne FADDP ; ofs=179h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C44 B516 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C46 4641444450 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079DB 7462C0 fpvariant 0DEh, 46, 0C0h 423 ------------------ <2> note: usesection ASMTABLE2 423 ------------------ <2> note: usesection ASMTABLE2 0 000079DE 7434C1 fpvariant 0DEh, 0, 0C1h 424 ------------------ <2> note: usesection ASMTABLE2 424 ------------------ <2> note: usesection ASMTABLE2 0 000079E1 FF endvariant 425 ------------------ <2> note: usesection ASMTABLE2 426 <2> mne FIADD ; ofs=180h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C4B 2517 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C4D 4649414444 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079E2 F4193C variant 202h, 48 427 ------------------ <2> note: usesection ASMTABLE2 0 000079E5 F41B56 variant 206h, 50 428 ------------------ <2> note: usesection ASMTABLE2 0 000079E8 FF endvariant 429 ------------------ <2> note: usesection ASMTABLE2 430 <2> mne FBLD ; ofs=187h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C52 9417 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C54 46424C44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079E9 F42C9E variant 227h, 52 431 ------------------ <2> note: usesection ASMTABLE2 0 000079EC FF endvariant 432 ------------------ <2> note: usesection ASMTABLE2 433 <2> mne FBSTP ; ofs=18Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C58 D517 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C5A 4642535450 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079ED F434FF variant 237h, 53 434 ------------------ <2> note: usesection ASMTABLE2 0 000079F0 FF endvariant 435 ------------------ <2> note: usesection ASMTABLE2 436 <2> mne FCHS ; ofs=18Fh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C5F 1418 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C61 46434853 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079F1 7196E0 fpvariant 0D9h, 0, 0E0h 437 ------------------ <2> note: usesection ASMTABLE2 437 ------------------ <2> note: usesection ASMTABLE2 0 000079F4 FF endvariant 438 ------------------ <2> note: usesection ASMTABLE2 439 <2> mne FCLEX, ASM_WAIT ; ofs=193h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000079F5 FE db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C65 5518 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C67 46434C4558 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 440 <2> mne FNCLEX ; ofs=194h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C6C 6618 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C6E 464E434C4558 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079F6 72A2E2 fpvariant 0DBh, 0, 0E2h 441 ------------------ <2> note: usesection ASMTABLE2 441 ------------------ <2> note: usesection ASMTABLE2 0 000079F9 FF endvariant 442 ------------------ <2> note: usesection ASMTABLE2 443 <2> mne FCMOVA ; ofs=198h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C74 A618 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C76 46434D4F5641 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079FA FA72CED0 fpvariant 0DBh, 44, 0D0h, ASM_MACH6 444 ------------------ <2> note: usesection ASMTABLE2 444 ------------------ <2> note: usesection ASMTABLE2 0 000079FE FF endvariant 445 ------------------ <2> note: usesection ASMTABLE2 446 <2> mne FCMOVAE ; ofs=19Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C7C F718 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C7E 46434D4F564145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000079FF FA72CEC0 fpvariant 0DBh, 44, 0C0h, ASM_MACH6 447 ------------------ <2> note: usesection ASMTABLE2 447 ------------------ <2> note: usesection ASMTABLE2 0 00007A03 FF endvariant 448 ------------------ <2> note: usesection ASMTABLE2 449 <2> mne FCMOVB ; ofs=1A2h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C85 4619 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C87 46434D4F5642 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A04 FA7248C0 fpvariant 0DAh, 44, 0C0h, ASM_MACH6 450 ------------------ <2> note: usesection ASMTABLE2 450 ------------------ <2> note: usesection ASMTABLE2 0 00007A08 FF endvariant 451 ------------------ <2> note: usesection ASMTABLE2 452 <2> mne FCMOVBE ; ofs=1A7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C8D 9719 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C8F 46434D4F564245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A09 FA7248D0 fpvariant 0DAh, 44, 0D0h, ASM_MACH6 453 ------------------ <2> note: usesection ASMTABLE2 453 ------------------ <2> note: usesection ASMTABLE2 0 00007A0D FF endvariant 454 ------------------ <2> note: usesection ASMTABLE2 455 <2> mne FCMOVE ; ofs=1ACh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C96 E619 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007C98 46434D4F5645 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A0E FA7248C8 fpvariant 0DAh, 44, 0C8h, ASM_MACH6 456 ------------------ <2> note: usesection ASMTABLE2 456 ------------------ <2> note: usesection ASMTABLE2 0 00007A12 FF endvariant 457 ------------------ <2> note: usesection ASMTABLE2 458 <2> mne FCMOVNA ; ofs=1B1h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007C9E 371A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007CA0 46434D4F564E41 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A13 FA7248D0 fpvariant 0DAh, 44, 0D0h, ASM_MACH6 459 ------------------ <2> note: usesection ASMTABLE2 459 ------------------ <2> note: usesection ASMTABLE2 0 00007A17 FF endvariant 460 ------------------ <2> note: usesection ASMTABLE2 461 <2> mne FCMOVNAE ; ofs=1B6h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007CA7 881A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007CA9 46434D4F564E4145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A18 FA7248C0 fpvariant 0DAh, 44, 0C0h, ASM_MACH6 462 ------------------ <2> note: usesection ASMTABLE2 462 ------------------ <2> note: usesection ASMTABLE2 0 00007A1C FF endvariant 463 ------------------ <2> note: usesection ASMTABLE2 464 <2> mne FCMOVNB ; ofs=1BBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007CB1 D71A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007CB3 46434D4F564E42 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A1D FA72CEC0 fpvariant 0DBh, 44, 0C0h, ASM_MACH6 465 ------------------ <2> note: usesection ASMTABLE2 465 ------------------ <2> note: usesection ASMTABLE2 0 00007A21 FF endvariant 466 ------------------ <2> note: usesection ASMTABLE2 467 <2> mne FCMOVNBE ; ofs=1C0h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007CBA 281B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007CBC 46434D4F564E4245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A22 FA72CED0 fpvariant 0DBh, 44, 0D0h, ASM_MACH6 468 ------------------ <2> note: usesection ASMTABLE2 468 ------------------ <2> note: usesection ASMTABLE2 0 00007A26 FF endvariant 469 ------------------ <2> note: usesection ASMTABLE2 470 <2> mne FCMOVNE ; ofs=1C5h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007CC4 771B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007CC6 46434D4F564E45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A27 FA72CEC8 fpvariant 0DBh, 44, 0C8h, ASM_MACH6 471 ------------------ <2> note: usesection ASMTABLE2 471 ------------------ <2> note: usesection ASMTABLE2 0 00007A2B FF endvariant 472 ------------------ <2> note: usesection ASMTABLE2 473 <2> mne FCMOVNU ; ofs=1CAh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007CCD C71B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007CCF 46434D4F564E55 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A2C FA72CED8 fpvariant 0DBh, 44, 0D8h, ASM_MACH6 474 ------------------ <2> note: usesection ASMTABLE2 474 ------------------ <2> note: usesection ASMTABLE2 0 00007A30 FF endvariant 475 ------------------ <2> note: usesection ASMTABLE2 476 <2> mne FCMOVNZ ; ofs=1CFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007CD6 171C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007CD8 46434D4F564E5A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A31 FA72CEC8 fpvariant 0DBh, 44, 0C8h, ASM_MACH6 477 ------------------ <2> note: usesection ASMTABLE2 477 ------------------ <2> note: usesection ASMTABLE2 0 00007A35 FF endvariant 478 ------------------ <2> note: usesection ASMTABLE2 479 <2> mne FCMOVU ; ofs=1D4h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007CDF 661C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007CE1 46434D4F5655 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A36 FA7248D8 fpvariant 0DAh, 44, 0D8h, ASM_MACH6 480 ------------------ <2> note: usesection ASMTABLE2 480 ------------------ <2> note: usesection ASMTABLE2 0 00007A3A FF endvariant 481 ------------------ <2> note: usesection ASMTABLE2 482 <2> mne FCMOVZ ; ofs=1D9h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007CE7 B61C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007CE9 46434D4F565A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A3B FA7248C8 fpvariant 0DAh, 44, 0C8h, ASM_MACH6 483 ------------------ <2> note: usesection ASMTABLE2 483 ------------------ <2> note: usesection ASMTABLE2 0 00007A3F FF endvariant 484 ------------------ <2> note: usesection ASMTABLE2 485 <2> mne FCOM ; ofs=1DEh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007CEF 041D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007CF1 46434F4D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A40 F42088 variant 210h, 40 486 ------------------ <2> note: usesection ASMTABLE2 0 00007A43 F422A2 variant 214h, 42 487 ------------------ <2> note: usesection ASMTABLE2 0 00007A46 7146D0 fpvariant 0D8h, 54, 0D0h 488 ------------------ <2> note: usesection ASMTABLE2 488 ------------------ <2> note: usesection ASMTABLE2 0 00007A49 7110D1 fpvariant 0D8h, 0, 0D1h 489 ------------------ <2> note: usesection ASMTABLE2 489 ------------------ <2> note: usesection ASMTABLE2 0 00007A4C FF endvariant 490 ------------------ <2> note: usesection ASMTABLE2 491 <2> mne FCOMI ; ofs=1EBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007CF5 D51D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007CF7 46434F4D49 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A4D FA72D8F0 fpvariant 0DBh, 54, 0F0h, ASM_MACH6 492 ------------------ <2> note: usesection ASMTABLE2 492 ------------------ <2> note: usesection ASMTABLE2 0 00007A51 FA72A2F1 fpvariant 0DBh, 0, 0F1h, ASM_MACH6 493 ------------------ <2> note: usesection ASMTABLE2 493 ------------------ <2> note: usesection ASMTABLE2 0 00007A55 FF endvariant 494 ------------------ <2> note: usesection ASMTABLE2 495 <2> mne FCOMIP ; ofs=1F4h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007CFC 661E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007CFE 46434F4D4950 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A56 FA74F0F0 fpvariant 0DFh, 54, 0F0h, ASM_MACH6 496 ------------------ <2> note: usesection ASMTABLE2 496 ------------------ <2> note: usesection ASMTABLE2 0 00007A5A FA74BAF1 fpvariant 0DFh, 0, 0F1h, ASM_MACH6 497 ------------------ <2> note: usesection ASMTABLE2 497 ------------------ <2> note: usesection ASMTABLE2 0 00007A5E FF endvariant 498 ------------------ <2> note: usesection ASMTABLE2 499 <2> mne FCOMP ; ofs=1FDh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D04 F51E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D06 46434F4D50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A5F F424B8 variant 218h, 40 500 ------------------ <2> note: usesection ASMTABLE2 0 00007A62 F426D2 variant 21Ch, 42 501 ------------------ <2> note: usesection ASMTABLE2 0 00007A65 7146D8 fpvariant 0D8h, 54, 0D8h 502 ------------------ <2> note: usesection ASMTABLE2 502 ------------------ <2> note: usesection ASMTABLE2 0 00007A68 7110D9 fpvariant 0D8h, 0, 0D9h 503 ------------------ <2> note: usesection ASMTABLE2 503 ------------------ <2> note: usesection ASMTABLE2 0 00007A6B FF endvariant 504 ------------------ <2> note: usesection ASMTABLE2 505 <2> mne FCOMPP ; ofs=20Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D0B C61F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D0D 46434F4D5050 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A6C 7434D9 fpvariant 0DEh, 0, 0D9h 506 ------------------ <2> note: usesection ASMTABLE2 506 ------------------ <2> note: usesection ASMTABLE2 0 00007A6F FF endvariant 507 ------------------ <2> note: usesection ASMTABLE2 508 <2> mne FCOS ; ofs=20Eh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D13 0420 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D15 46434F53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A70 F77196FF fpvariant 0D9h, 0, 0FFh, ASM_MACH3 509 ------------------ <2> note: usesection ASMTABLE2 509 ------------------ <2> note: usesection ASMTABLE2 0 00007A74 FF endvariant 510 ------------------ <2> note: usesection ASMTABLE2 511 <2> mne FDECSTP ; ofs=213h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D19 5720 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D1B 46444543535450 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A75 7196F6 fpvariant 0D9h, 0, 0F6h 512 ------------------ <2> note: usesection ASMTABLE2 512 ------------------ <2> note: usesection ASMTABLE2 0 00007A78 FF endvariant 513 ------------------ <2> note: usesection ASMTABLE2 514 <2> mne FDISI, ASM_WAIT ; ofs=217h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007A79 FE db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D22 9520 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D24 4644495349 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 515 <2> mne FNDISI ; ofs=218h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D29 A620 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D2B 464E44495349 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A7A 72A2E1 fpvariant 0DBh, 0, 0E1h 516 ------------------ <2> note: usesection ASMTABLE2 516 ------------------ <2> note: usesection ASMTABLE2 0 00007A7D FF endvariant 517 ------------------ <2> note: usesection ASMTABLE2 518 <2> mne FDIV ; ofs=21Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D31 E420 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D33 46444956 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A7E F43148 variant 230h, 40 519 ------------------ <2> note: usesection ASMTABLE2 0 00007A81 F43362 variant 234h, 42 520 ------------------ <2> note: usesection ASMTABLE2 0 00007A84 713CF0 fpvariant 0D8h, 44, 0F0h 521 ------------------ <2> note: usesection ASMTABLE2 521 ------------------ <2> note: usesection ASMTABLE2 0 00007A87 7357F8 fpvariant 0DCh, 47, 0F8h 522 ------------------ <2> note: usesection ASMTABLE2 522 ------------------ <2> note: usesection ASMTABLE2 0 00007A8A FF endvariant 523 ------------------ <2> note: usesection ASMTABLE2 524 <2> mne FDIVP ; ofs=229h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D37 B521 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D39 4644495650 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A8B 7462F8 fpvariant 0DEh, 46, 0F8h 525 ------------------ <2> note: usesection ASMTABLE2 525 ------------------ <2> note: usesection ASMTABLE2 0 00007A8E 7434F9 fpvariant 0DEh, 0, 0F9h 526 ------------------ <2> note: usesection ASMTABLE2 526 ------------------ <2> note: usesection ASMTABLE2 0 00007A91 FF endvariant 527 ------------------ <2> note: usesection ASMTABLE2 528 <2> mne FIDIV ; ofs=230h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D3E 2522 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D40 4649444956 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A92 F4325C variant 232h, 48 529 ------------------ <2> note: usesection ASMTABLE2 0 00007A95 F43476 variant 236h, 50 530 ------------------ <2> note: usesection ASMTABLE2 0 00007A98 FF endvariant 531 ------------------ <2> note: usesection ASMTABLE2 532 <2> mne FDIVR ; ofs=237h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D45 9522 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D47 4644495652 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007A99 F43578 variant 238h, 40 533 ------------------ <2> note: usesection ASMTABLE2 0 00007A9C F43792 variant 23Ch, 42 534 ------------------ <2> note: usesection ASMTABLE2 0 00007A9F 713CF8 fpvariant 0D8h, 44, 0F8h 535 ------------------ <2> note: usesection ASMTABLE2 535 ------------------ <2> note: usesection ASMTABLE2 0 00007AA2 7357F0 fpvariant 0DCh, 47, 0F0h 536 ------------------ <2> note: usesection ASMTABLE2 536 ------------------ <2> note: usesection ASMTABLE2 0 00007AA5 FF endvariant 537 ------------------ <2> note: usesection ASMTABLE2 538 <2> mne FDIVRP ; ofs=244h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D4C 6623 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D4E 464449565250 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007AA6 7462F0 fpvariant 0DEh, 46, 0F0h 539 ------------------ <2> note: usesection ASMTABLE2 539 ------------------ <2> note: usesection ASMTABLE2 0 00007AA9 7434F1 fpvariant 0DEh, 0, 0F1h 540 ------------------ <2> note: usesection ASMTABLE2 540 ------------------ <2> note: usesection ASMTABLE2 0 00007AAC FF endvariant 541 ------------------ <2> note: usesection ASMTABLE2 542 <2> mne FIDIVR ; ofs=24Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D54 D623 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D56 464944495652 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007AAD F4368C variant 23Ah, 48 543 ------------------ <2> note: usesection ASMTABLE2 0 00007AB0 F438A6 variant 23Eh, 50 544 ------------------ <2> note: usesection ASMTABLE2 0 00007AB3 FF endvariant 545 ------------------ <2> note: usesection ASMTABLE2 546 <2> mne FENI, ASM_WAIT ; ofs=252h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007AB4 FE db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D5C 4424 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D5E 46454E49 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 547 <2> mne FNENI ; ofs=253h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D62 5524 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D64 464E454E49 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007AB5 72A2E0 fpvariant 0DBh, 0, 0E0h 548 ------------------ <2> note: usesection ASMTABLE2 548 ------------------ <2> note: usesection ASMTABLE2 0 00007AB8 FF endvariant 549 ------------------ <2> note: usesection ASMTABLE2 550 <2> mne FFREE ; ofs=257h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D69 9524 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D6B 4646524545 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007AB9 73DBC0 fpvariant 0DDh, 45, 0C0h 551 ------------------ <2> note: usesection ASMTABLE2 551 ------------------ <2> note: usesection ASMTABLE2 0 00007ABC FF endvariant 552 ------------------ <2> note: usesection ASMTABLE2 553 <2> mne FICOM ; ofs=25Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D70 D524 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D72 4649434F4D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007ABD F4219C variant 212h, 48 554 ------------------ <2> note: usesection ASMTABLE2 0 00007AC0 F423B6 variant 216h, 50 555 ------------------ <2> note: usesection ASMTABLE2 0 00007AC3 FF endvariant 556 ------------------ <2> note: usesection ASMTABLE2 557 <2> mne FICOMP ; ofs=262h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D77 4625 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D79 4649434F4D50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007AC4 F425CC variant 21Ah, 48 558 ------------------ <2> note: usesection ASMTABLE2 0 00007AC7 F427E6 variant 21Eh, 50 559 ------------------ <2> note: usesection ASMTABLE2 0 00007ACA FF endvariant 560 ------------------ <2> note: usesection ASMTABLE2 561 <2> mne FILD ; ofs=269h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D7F B425 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D81 46494C44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007ACB F419C2 variant 203h, 48 562 ------------------ <2> note: usesection ASMTABLE2 0 00007ACE F41BDC variant 207h, 50 563 ------------------ <2> note: usesection ASMTABLE2 0 00007AD1 F430B9 variant 22Fh, 31 564 ------------------ <2> note: usesection ASMTABLE2 0 00007AD4 FF endvariant 565 ------------------ <2> note: usesection ASMTABLE2 566 <2> mne FINCSTP ; ofs=273h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D85 5726 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D87 46494E43535450 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007AD5 7196F7 fpvariant 0D9h, 0, 0F7h 567 ------------------ <2> note: usesection ASMTABLE2 567 ------------------ <2> note: usesection ASMTABLE2 0 00007AD8 FF endvariant 568 ------------------ <2> note: usesection ASMTABLE2 569 <2> mne FINIT, ASM_WAIT ; ofs=277h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007AD9 FE db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D8E 9526 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D90 46494E4954 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 570 <2> mne FNINIT ; ofs=278h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D95 A626 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D97 464E494E4954 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007ADA 72A2E3 fpvariant 0DBh, 0, 0E3h 571 ------------------ <2> note: usesection ASMTABLE2 571 ------------------ <2> note: usesection ASMTABLE2 0 00007ADD FF endvariant 572 ------------------ <2> note: usesection ASMTABLE2 573 <2> mne FIST ; ofs=27Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007D9D E426 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007D9F 46495354 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007ADE F42223 variant 213h, 49 574 ------------------ <2> note: usesection ASMTABLE2 0 00007AE1 F4243D variant 217h, 51 575 ------------------ <2> note: usesection ASMTABLE2 0 00007AE4 FF endvariant 576 ------------------ <2> note: usesection ASMTABLE2 577 <2> mne FISTP ; ofs=283h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007DA3 5527 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007DA5 4649535450 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007AE5 F42653 variant 21Bh, 49 578 ------------------ <2> note: usesection ASMTABLE2 0 00007AE8 F4286D variant 21Fh, 51 579 ------------------ <2> note: usesection ASMTABLE2 0 00007AEB F4391A variant 23Fh, 32 580 ------------------ <2> note: usesection ASMTABLE2 0 00007AEE FF endvariant 581 ------------------ <2> note: usesection ASMTABLE2 582 <2> mne FLD ; ofs=28Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007DAA F327 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007DAC 464C44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007AEF F418AE variant 201h, 40 583 ------------------ <2> note: usesection ASMTABLE2 0 00007AF2 F41AC8 variant 205h, 42 584 ------------------ <2> note: usesection ASMTABLE2 0 00007AF5 F42EB6 variant 22Bh, 52 585 ------------------ <2> note: usesection ASMTABLE2 0 00007AF8 71C3C0 fpvariant 0D9h, 45, 0C0h 586 ------------------ <2> note: usesection ASMTABLE2 586 ------------------ <2> note: usesection ASMTABLE2 0 00007AFB FF endvariant 587 ------------------ <2> note: usesection ASMTABLE2 588 <2> mne FLD1 ; ofs=29Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007DAF C428 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007DB1 464C4431 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007AFC 7196E8 fpvariant 0D9h, 0, 0E8h 589 ------------------ <2> note: usesection ASMTABLE2 589 ------------------ <2> note: usesection ASMTABLE2 0 00007AFF FF endvariant 590 ------------------ <2> note: usesection ASMTABLE2 591 <2> mne FLDL2T ; ofs=29Eh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007DB5 0629 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007DB7 464C444C3254 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B00 7196E9 fpvariant 0D9h, 0, 0E9h 592 ------------------ <2> note: usesection ASMTABLE2 592 ------------------ <2> note: usesection ASMTABLE2 0 00007B03 FF endvariant 593 ------------------ <2> note: usesection ASMTABLE2 594 <2> mne FLDL2E ; ofs=2A2h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007DBD 4629 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007DBF 464C444C3245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B04 7196EA fpvariant 0D9h, 0, 0EAh 595 ------------------ <2> note: usesection ASMTABLE2 595 ------------------ <2> note: usesection ASMTABLE2 0 00007B07 FF endvariant 596 ------------------ <2> note: usesection ASMTABLE2 597 <2> mne FLDPI ; ofs=2A6h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007DC5 8529 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007DC7 464C445049 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B08 7196EB fpvariant 0D9h, 0, 0EBh 598 ------------------ <2> note: usesection ASMTABLE2 598 ------------------ <2> note: usesection ASMTABLE2 0 00007B0B FF endvariant 599 ------------------ <2> note: usesection ASMTABLE2 600 <2> mne FLDLG2 ; ofs=2AAh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007DCC C629 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007DCE 464C444C4732 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B0C 7196EC fpvariant 0D9h, 0, 0ECh 601 ------------------ <2> note: usesection ASMTABLE2 601 ------------------ <2> note: usesection ASMTABLE2 0 00007B0F FF endvariant 602 ------------------ <2> note: usesection ASMTABLE2 603 <2> mne FLDLN2 ; ofs=2AEh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007DD4 062A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007DD6 464C444C4E32 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B10 7196ED fpvariant 0D9h, 0, 0EDh 604 ------------------ <2> note: usesection ASMTABLE2 604 ------------------ <2> note: usesection ASMTABLE2 0 00007B13 FF endvariant 605 ------------------ <2> note: usesection ASMTABLE2 606 <2> mne FLDZ ; ofs=2B2h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007DDC 442A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007DDE 464C445A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B14 7196EE fpvariant 0D9h, 0, 0EEh 607 ------------------ <2> note: usesection ASMTABLE2 607 ------------------ <2> note: usesection ASMTABLE2 0 00007B17 FF endvariant 608 ------------------ <2> note: usesection ASMTABLE2 609 <2> mne FLDCW, ASM_WAIT ; ofs=2B6h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007B18 FE db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007DE2 852A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007DE4 464C444357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 610 <2> mne FNLDCW ; ofs=2B7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007DE9 962A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007DEB 464E4C444357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B19 F42DA8 variant 229h, 50 611 ------------------ <2> note: usesection ASMTABLE2 0 00007B1C FF endvariant 612 ------------------ <2> note: usesection ASMTABLE2 613 <2> mne FMUL ; ofs=2BFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007DF1 D42A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007DF3 464D554C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B1D F41C58 variant 208h, 40 614 ------------------ <2> note: usesection ASMTABLE2 0 00007B20 F41E72 variant 20Ch, 42 615 ------------------ <2> note: usesection ASMTABLE2 0 00007B23 713CC8 fpvariant 0D8h, 44, 0C8h 616 ------------------ <2> note: usesection ASMTABLE2 616 ------------------ <2> note: usesection ASMTABLE2 0 00007B26 7357C8 fpvariant 0DCh, 47, 0C8h 617 ------------------ <2> note: usesection ASMTABLE2 617 ------------------ <2> note: usesection ASMTABLE2 0 00007B29 FF endvariant 618 ------------------ <2> note: usesection ASMTABLE2 619 <2> mne FMULP ; ofs=2CCh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007DF7 A52B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007DF9 464D554C50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B2A 7462C8 fpvariant 0DEh, 46, 0C8h 620 ------------------ <2> note: usesection ASMTABLE2 620 ------------------ <2> note: usesection ASMTABLE2 0 00007B2D 7434C9 fpvariant 0DEh, 0, 0C9h 621 ------------------ <2> note: usesection ASMTABLE2 621 ------------------ <2> note: usesection ASMTABLE2 0 00007B30 FF endvariant 622 ------------------ <2> note: usesection ASMTABLE2 623 <2> mne FIMUL ; ofs=2D3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007DFE 152C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E00 46494D554C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B31 F41D6C variant 20Ah, 48 624 ------------------ <2> note: usesection ASMTABLE2 0 00007B34 F41F86 variant 20Eh, 50 625 ------------------ <2> note: usesection ASMTABLE2 0 00007B37 FF endvariant 626 ------------------ <2> note: usesection ASMTABLE2 627 <2> mne FNOP ; ofs=2DAh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E05 842C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E07 464E4F50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B38 7196D0 fpvariant 0D9h, 0, 0D0h 628 ------------------ <2> note: usesection ASMTABLE2 628 ------------------ <2> note: usesection ASMTABLE2 0 00007B3B FF endvariant 629 ------------------ <2> note: usesection ASMTABLE2 630 <2> mne FPATAN ; ofs=2DEh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E0B C62C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E0D 46504154414E db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B3C 7196F3 fpvariant 0D9h, 0, 0F3h 631 ------------------ <2> note: usesection ASMTABLE2 631 ------------------ <2> note: usesection ASMTABLE2 0 00007B3F FF endvariant 632 ------------------ <2> note: usesection ASMTABLE2 633 <2> mne FPREM ; ofs=2E2h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E13 052D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E15 465052454D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B40 7196F8 fpvariant 0D9h, 0, 0F8h 634 ------------------ <2> note: usesection ASMTABLE2 634 ------------------ <2> note: usesection ASMTABLE2 0 00007B43 FF endvariant 635 ------------------ <2> note: usesection ASMTABLE2 636 <2> mne FPREM1 ; ofs=2E6h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E1A 462D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E1C 465052454D31 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B44 F77196F5 fpvariant 0D9h, 0, 0F5h, ASM_MACH3 637 ------------------ <2> note: usesection ASMTABLE2 637 ------------------ <2> note: usesection ASMTABLE2 0 00007B48 FF endvariant 638 ------------------ <2> note: usesection ASMTABLE2 639 <2> mne FPTAN ; ofs=2EBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E22 952D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E24 465054414E db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B49 7196F2 fpvariant 0D9h, 0, 0F2h 640 ------------------ <2> note: usesection ASMTABLE2 640 ------------------ <2> note: usesection ASMTABLE2 0 00007B4C FF endvariant 641 ------------------ <2> note: usesection ASMTABLE2 642 <2> mne FRNDINT ; ofs=2EFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E29 D72D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E2B 46524E44494E54 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B4D 7196FC fpvariant 0D9h, 0, 0FCh 643 ------------------ <2> note: usesection ASMTABLE2 643 ------------------ <2> note: usesection ASMTABLE2 0 00007B50 FF endvariant 644 ------------------ <2> note: usesection ASMTABLE2 645 <2> mne FSCALE ; ofs=2FCh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E32 162E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E34 465343414C45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B51 7196FD fpvariant 0D9h, 0, 0FDh 646 ------------------ <2> note: usesection ASMTABLE2 646 ------------------ <2> note: usesection ASMTABLE2 0 00007B54 FF endvariant 647 ------------------ <2> note: usesection ASMTABLE2 648 <2> mne FSETPM, ASM_WAIT ; ofs=300h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007B55 FE db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E3A 562E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E3C 46534554504D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 649 <2> mne FNSETPM ; ofs=301h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E42 672E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E44 464E534554504D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B56 F672A2E4 fpvariant 0DBh, 0, 0E4h, ASM_MACH2 650 ------------------ <2> note: usesection ASMTABLE2 650 ------------------ <2> note: usesection ASMTABLE2 0 00007B5A FF endvariant 651 ------------------ <2> note: usesection ASMTABLE2 652 <2> mne FSIN ; ofs=306h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E4B B42E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E4D 4653494E db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B5B F77196FE fpvariant 0D9h, 0, 0FEh, ASM_MACH3 653 ------------------ <2> note: usesection ASMTABLE2 653 ------------------ <2> note: usesection ASMTABLE2 0 00007B5F FF endvariant 654 ------------------ <2> note: usesection ASMTABLE2 655 <2> mne FSINCOS ; ofs=30Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E51 072F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E53 4653494E434F53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B60 F77196FB fpvariant 0D9h, 0, 0FBh, ASM_MACH3 656 ------------------ <2> note: usesection ASMTABLE2 656 ------------------ <2> note: usesection ASMTABLE2 0 00007B64 FF endvariant 657 ------------------ <2> note: usesection ASMTABLE2 658 <2> mne FSQRT ; ofs=310h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E5A 552F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E5C 4653515254 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B65 7196FA fpvariant 0D9h, 0, 0FAh 659 ------------------ <2> note: usesection ASMTABLE2 659 ------------------ <2> note: usesection ASMTABLE2 0 00007B68 FF endvariant 660 ------------------ <2> note: usesection ASMTABLE2 661 <2> mne FST ; ofs=314h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E61 932F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E63 465354 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B69 F4210F variant 211h, 41 662 ------------------ <2> note: usesection ASMTABLE2 0 00007B6C F42329 variant 215h, 43 663 ------------------ <2> note: usesection ASMTABLE2 0 00007B6F 73DBD0 fpvariant 0DDh, 45, 0D0h 664 ------------------ <2> note: usesection ASMTABLE2 664 ------------------ <2> note: usesection ASMTABLE2 0 00007B72 FF endvariant 665 ------------------ <2> note: usesection ASMTABLE2 666 <2> mne FSTP ; ofs=31Eh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E66 3430 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E68 46535450 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B73 F4253F variant 219h, 41 667 ------------------ <2> note: usesection ASMTABLE2 0 00007B76 F42759 variant 21Dh, 43 668 ------------------ <2> note: usesection ASMTABLE2 0 00007B79 F43717 variant 23Bh, 53 669 ------------------ <2> note: usesection ASMTABLE2 0 00007B7C 73DBD8 fpvariant 0DDh, 45, 0D8h 670 ------------------ <2> note: usesection ASMTABLE2 670 ------------------ <2> note: usesection ASMTABLE2 0 00007B7F FF endvariant 671 ------------------ <2> note: usesection ASMTABLE2 672 <2> mne FSTCW, ASM_WAIT ; ofs=32Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007B80 FE db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E6C 0531 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E6E 4653544357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 673 <2> mne FNSTCW ; ofs=32Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E73 1631 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E75 464E53544357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B81 F43609 variant 239h, 51 674 ------------------ <2> note: usesection ASMTABLE2 0 00007B84 FF endvariant 675 ------------------ <2> note: usesection ASMTABLE2 676 <2> mne FSTSW, ASM_WAIT ; ofs=335h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007B85 FE db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E7B 5531 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E7D 4653545357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 677 <2> mne FNSTSW ; ofs=336h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E82 6631 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E84 464E53545357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B86 74F4E0 fpvariant 0DFh, 58, 0E0h 678 ------------------ <2> note: usesection ASMTABLE2 678 ------------------ <2> note: usesection ASMTABLE2 0 00007B89 F43821 variant 23Dh, 51 679 ------------------ <2> note: usesection ASMTABLE2 0 00007B8C FF endvariant 680 ------------------ <2> note: usesection ASMTABLE2 681 <2> mne FSUB ; ofs=33Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E8A D431 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E8C 46535542 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B8D F428E8 variant 220h, 40 682 ------------------ <2> note: usesection ASMTABLE2 0 00007B90 F42B02 variant 224h, 42 683 ------------------ <2> note: usesection ASMTABLE2 0 00007B93 713CE0 fpvariant 0D8h, 44, 0E0h 684 ------------------ <2> note: usesection ASMTABLE2 684 ------------------ <2> note: usesection ASMTABLE2 0 00007B96 7357E8 fpvariant 0DCh, 47, 0E8h 685 ------------------ <2> note: usesection ASMTABLE2 685 ------------------ <2> note: usesection ASMTABLE2 0 00007B99 FF endvariant 686 ------------------ <2> note: usesection ASMTABLE2 687 <2> mne FSUBP ; ofs=34Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E90 A532 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E92 4653554250 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007B9A 7462E8 fpvariant 0DEh, 46, 0E8h 688 ------------------ <2> note: usesection ASMTABLE2 688 ------------------ <2> note: usesection ASMTABLE2 0 00007B9D 7434E9 fpvariant 0DEh, 0, 0E9h 689 ------------------ <2> note: usesection ASMTABLE2 689 ------------------ <2> note: usesection ASMTABLE2 0 00007BA0 FF endvariant 690 ------------------ <2> note: usesection ASMTABLE2 691 <2> mne FISUB ; ofs=351h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E97 1533 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007E99 4649535542 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007BA1 F429FC variant 222h, 48 692 ------------------ <2> note: usesection ASMTABLE2 0 00007BA4 F42C16 variant 226h, 50 693 ------------------ <2> note: usesection ASMTABLE2 0 00007BA7 FF endvariant 694 ------------------ <2> note: usesection ASMTABLE2 695 <2> mne FSUBR ; ofs=358h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007E9E 8533 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007EA0 4653554252 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007BA8 F42D18 variant 228h, 40 696 ------------------ <2> note: usesection ASMTABLE2 0 00007BAB F42F32 variant 22Ch, 42 697 ------------------ <2> note: usesection ASMTABLE2 0 00007BAE 713CE8 fpvariant 0D8h, 44, 0E8h 698 ------------------ <2> note: usesection ASMTABLE2 698 ------------------ <2> note: usesection ASMTABLE2 0 00007BB1 7357E0 fpvariant 0DCh, 47, 0E0h 699 ------------------ <2> note: usesection ASMTABLE2 699 ------------------ <2> note: usesection ASMTABLE2 0 00007BB4 FF endvariant 700 ------------------ <2> note: usesection ASMTABLE2 701 <2> mne FSUBRP ; ofs=365h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007EA5 5634 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007EA7 465355425250 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007BB5 7462E0 fpvariant 0DEh, 46, 0E0h 702 ------------------ <2> note: usesection ASMTABLE2 702 ------------------ <2> note: usesection ASMTABLE2 0 00007BB8 7434E1 fpvariant 0DEh, 0, 0E1h 703 ------------------ <2> note: usesection ASMTABLE2 703 ------------------ <2> note: usesection ASMTABLE2 0 00007BBB FF endvariant 704 ------------------ <2> note: usesection ASMTABLE2 705 <2> mne FISUBR ; ofs=36Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007EAD C634 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007EAF 464953554252 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007BBC F42E2C variant 22Ah, 48 706 ------------------ <2> note: usesection ASMTABLE2 0 00007BBF F43046 variant 22Eh, 50 707 ------------------ <2> note: usesection ASMTABLE2 0 00007BC2 FF endvariant 708 ------------------ <2> note: usesection ASMTABLE2 709 <2> mne FTST ; ofs=373h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007EB5 3435 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007EB7 46545354 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007BC3 7196E4 fpvariant 0D9h, 0, 0E4h 710 ------------------ <2> note: usesection ASMTABLE2 710 ------------------ <2> note: usesection ASMTABLE2 0 00007BC6 FF endvariant 711 ------------------ <2> note: usesection ASMTABLE2 712 <2> mne FUCOM ; ofs=377h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007EBB 7535 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007EBD 4655434F4D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007BC7 F773E4E0 fpvariant 0DDh, 54, 0E0h, ASM_MACH3 713 ------------------ <2> note: usesection ASMTABLE2 713 ------------------ <2> note: usesection ASMTABLE2 0 00007BCB F773AEE1 fpvariant 0DDh, 0, 0E1h, ASM_MACH3 714 ------------------ <2> note: usesection ASMTABLE2 714 ------------------ <2> note: usesection ASMTABLE2 0 00007BCF FF endvariant 715 ------------------ <2> note: usesection ASMTABLE2 716 <2> mne FUCOMI ; ofs=380h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007EC2 0636 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007EC4 4655434F4D49 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007BD0 FA72D8E8 fpvariant 0DBh, 54, 0E8h, ASM_MACH6 717 ------------------ <2> note: usesection ASMTABLE2 717 ------------------ <2> note: usesection ASMTABLE2 0 00007BD4 FA72A2E9 fpvariant 0DBh, 0, 0E9h, ASM_MACH6 718 ------------------ <2> note: usesection ASMTABLE2 718 ------------------ <2> note: usesection ASMTABLE2 0 00007BD8 FF endvariant 719 ------------------ <2> note: usesection ASMTABLE2 720 <2> mne FUCOMIP ; ofs=389h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007ECA 9736 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007ECC 4655434F4D4950 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007BD9 FA74F0E8 fpvariant 0DFh, 54, 0E8h, ASM_MACH6 721 ------------------ <2> note: usesection ASMTABLE2 721 ------------------ <2> note: usesection ASMTABLE2 0 00007BDD FA74BAE9 fpvariant 0DFh, 0, 0E9h, ASM_MACH6 722 ------------------ <2> note: usesection ASMTABLE2 722 ------------------ <2> note: usesection ASMTABLE2 0 00007BE1 FF endvariant 723 ------------------ <2> note: usesection ASMTABLE2 724 <2> mne FUCOMP ; ofs=392h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007ED3 2637 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007ED5 4655434F4D50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007BE2 F773E4E8 fpvariant 0DDh, 54, 0E8h, ASM_MACH3 725 ------------------ <2> note: usesection ASMTABLE2 725 ------------------ <2> note: usesection ASMTABLE2 0 00007BE6 F773AEE9 fpvariant 0DDh, 0, 0E9h, ASM_MACH3 726 ------------------ <2> note: usesection ASMTABLE2 726 ------------------ <2> note: usesection ASMTABLE2 0 00007BEA FF endvariant 727 ------------------ <2> note: usesection ASMTABLE2 728 <2> mne FUCOMPP ; ofs=39Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007EDB B737 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007EDD 4655434F4D5050 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007BEB F7721CE9 fpvariant 0DAh, 0, 0E9h, ASM_MACH3 729 ------------------ <2> note: usesection ASMTABLE2 729 ------------------ <2> note: usesection ASMTABLE2 0 00007BEF FF endvariant 730 ------------------ <2> note: usesection ASMTABLE2 731 <2> mne FWAIT ; ofs=3A0h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007EE4 0538 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007EE6 4657414954 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007BF0 5122 variant 09Bh, 0 732 ------------------ <2> note: usesection ASMTABLE2 0 00007BF2 FF endvariant 733 ------------------ <2> note: usesection ASMTABLE2 734 <2> mne FXAM ; ofs=3A3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007EEB 3438 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007EED 4658414D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007BF3 7196E5 fpvariant 0D9h, 0, 0E5h 735 ------------------ <2> note: usesection ASMTABLE2 735 ------------------ <2> note: usesection ASMTABLE2 0 00007BF6 FF endvariant 736 ------------------ <2> note: usesection ASMTABLE2 737 <2> mne FXCH ; ofs=3A7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007EF1 7438 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007EF3 46584348 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007BF7 71CCC8 fpvariant 0D9h, 54, 0C8h 738 ------------------ <2> note: usesection ASMTABLE2 738 ------------------ <2> note: usesection ASMTABLE2 0 00007BFA 7196C9 fpvariant 0D9h, 0, 0C9h 739 ------------------ <2> note: usesection ASMTABLE2 739 ------------------ <2> note: usesection ASMTABLE2 0 00007BFD FF endvariant 740 ------------------ <2> note: usesection ASMTABLE2 741 <2> mne FXTRACT ; ofs=3AEh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007EF7 E738 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007EF9 46585452414354 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007BFE 7196F4 fpvariant 0D9h, 0, 0F4h 742 ------------------ <2> note: usesection ASMTABLE2 742 ------------------ <2> note: usesection ASMTABLE2 0 00007C01 FF endvariant 743 ------------------ <2> note: usesection ASMTABLE2 744 <2> mne FYL2X ; ofs=3B2h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F00 2539 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F02 46594C3258 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C02 7196F1 fpvariant 0D9h, 0, 0F1h 745 ------------------ <2> note: usesection ASMTABLE2 745 ------------------ <2> note: usesection ASMTABLE2 0 00007C05 FF endvariant 746 ------------------ <2> note: usesection ASMTABLE2 747 <2> mne FYL2XP1 ; ofs=3B6h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F07 6739 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F09 46594C32585031 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C06 7196F9 fpvariant 0D9h, 0, 0F9h 748 ------------------ <2> note: usesection ASMTABLE2 748 ------------------ <2> note: usesection ASMTABLE2 0 00007C09 FF endvariant 749 ------------------ <2> note: usesection ASMTABLE2 750 <2> mne HLT ; ofs=3BAh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F10 A339 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F12 484C54 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C0A 7FB8 variant 0F4h, 0 751 ------------------ <2> note: usesection ASMTABLE2 0 00007C0C FF endvariant 752 ------------------ <2> note: usesection ASMTABLE2 753 <2> mne IDIV ; ofs=3BDh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F15 D439 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F17 49444956 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C0D F4566D variant AGRP(6,7), 35 754 ------------------ <2> note: usesection ASMTABLE2 0 00007C10 FF endvariant 755 ------------------ <2> note: usesection ASMTABLE2 756 <2> mne IMUL ; ofs=3C1h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F1B 143A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F1D 494D554C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C11 F45561 variant AGRP(6,5), 35 757 ------------------ <2> note: usesection ASMTABLE2 0 00007C14 F7E1A9 variant 1AFh, 15, ASM_MACH3 758 ------------------ <2> note: usesection ASMTABLE2 0 00007C17 F5383D variant 06Bh, 59, ASM_MACH1 759 ------------------ <2> note: usesection ASMTABLE2 0 00007C1A F5383E variant 06Bh, 60, ASM_MACH1 760 ------------------ <2> note: usesection ASMTABLE2 0 00007C1D F53733 variant 069h, 61, ASM_MACH1 761 ------------------ <2> note: usesection ASMTABLE2 0 00007C20 F53734 variant 069h, 62, ASM_MACH1 762 ------------------ <2> note: usesection ASMTABLE2 0 00007C23 FF endvariant 763 ------------------ <2> note: usesection ASMTABLE2 764 <2> mne IN ; ofs=3D4h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F21 423B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F23 494E db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C24 7797 variant 0E4h, 63 765 ------------------ <2> note: usesection ASMTABLE2 0 00007C26 7BC8 variant 0ECh, 64 766 ------------------ <2> note: usesection ASMTABLE2 0 00007C28 FF endvariant 767 ------------------ <2> note: usesection ASMTABLE2 768 <2> mne INC ; ofs=3D9h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F25 933B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F27 494E43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C29 21A5 variant 040h, 37 769 ------------------ <2> note: usesection ASMTABLE2 0 00007C2B FBF439A1 variant AGRP(0,0), 33, ASM_LOCKABLE 770 ------------------ <2> note: usesection ASMTABLE2 0 00007C2F FF endvariant 771 ------------------ <2> note: usesection ASMTABLE2 772 <2> mne INSB ; ofs=3E0h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F2A 043C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F2C 494E5342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C30 F53888 variant 06Ch, 0, ASM_MACH1 773 ------------------ <2> note: usesection ASMTABLE2 0 00007C33 FF endvariant 774 ------------------ <2> note: usesection ASMTABLE2 775 <2> mne INT ; ofs=3E8h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F30 433C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F32 494E54 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C34 6B09 variant 0CCh, 65 776 ------------------ <2> note: usesection ASMTABLE2 0 00007C36 6BCF variant 0CDh, 129 777 ------------------ <2> note: usesection ASMTABLE2 0 00007C38 FF endvariant 778 ------------------ <2> note: usesection ASMTABLE2 779 <2> mne INT1 ; ofs=3EDh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F35 943C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F37 494E5431 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C39 FA7EAB variant 0F1h, 133, ASM_MACH6 780 ------------------ <2> note: usesection ASMTABLE2 0 00007C3C FF endvariant 781 ------------------ <2> note: usesection ASMTABLE2 782 <2> mne INT01 ; ofs=3F1h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F3B D53C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F3D 494E543031 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C3D FA7EAB variant 0F1h, 133, ASM_MACH6 783 ------------------ <2> note: usesection ASMTABLE2 0 00007C40 FF endvariant 784 ------------------ <2> note: usesection ASMTABLE2 785 <2> mne ICEBP ; ofs=3F5h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F42 153D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F44 4943454250 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C41 FA7EAB variant 0F1h, 133, ASM_MACH6 786 ------------------ <2> note: usesection ASMTABLE2 0 00007C44 FF endvariant 787 ------------------ <2> note: usesection ASMTABLE2 788 <2> mne INT3 ; ofs=3F9h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F49 543D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F4B 494E5433 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C45 6B4D variant 0CCh, 133 789 ------------------ <2> note: usesection ASMTABLE2 0 00007C47 FF endvariant 790 ------------------ <2> note: usesection ASMTABLE2 791 <2> mne INT03 ; ofs=3FCh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F4F 853D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F51 494E543033 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C48 6B4D variant 0CCh, 133 792 ------------------ <2> note: usesection ASMTABLE2 0 00007C4A FF endvariant 793 ------------------ <2> note: usesection ASMTABLE2 794 <2> mne INTO ; ofs=3FFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F56 B43D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F58 494E544F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C4B 6C59 variant 0CEh, 133 795 ------------------ <2> note: usesection ASMTABLE2 0 00007C4D FF endvariant 796 ------------------ <2> note: usesection ASMTABLE2 797 <2> mne INVD ; ofs=402h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F5C E43D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F5E 494E5644 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C4E F88A30 variant 108h, 0, ASM_MACH4 798 ------------------ <2> note: usesection ASMTABLE2 0 00007C51 FF endvariant 799 ------------------ <2> note: usesection ASMTABLE2 800 <2> mne INVLPG ; ofs=406h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F62 263E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F64 494E564C5047 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C52 F8F45AB2 variant AGRP(7,7), 56, ASM_MACH4 801 ------------------ <2> note: usesection ASMTABLE2 0 00007C56 FF endvariant 802 ------------------ <2> note: usesection ASMTABLE2 803 <2> mne JA ; ofs=40Eh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F6A 723E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F6C 4A41 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C57 3E8E variant 077h, 68 804 ------------------ <2> note: usesection ASMTABLE2 0 00007C59 F7CCC1 variant 187h, 23, ASM_MACH3 805 ------------------ <2> note: usesection ASMTABLE2 0 00007C5C FF endvariant 806 ------------------ <2> note: usesection ASMTABLE2 807 <2> mne JAE ; ofs=414h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F6E D33E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F70 4A4145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C5D 3C76 variant 073h, 68 808 ------------------ <2> note: usesection ASMTABLE2 0 00007C5F F7CAA9 variant 183h, 23, ASM_MACH3 809 ------------------ <2> note: usesection ASMTABLE2 0 00007C62 FF endvariant 810 ------------------ <2> note: usesection ASMTABLE2 811 <2> mne JB ; ofs=41Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F73 323F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F75 4A42 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C63 3BF0 variant 072h, 68 812 ------------------ <2> note: usesection ASMTABLE2 0 00007C65 F7CA23 variant 182h, 23, ASM_MACH3 813 ------------------ <2> note: usesection ASMTABLE2 0 00007C68 FF endvariant 814 ------------------ <2> note: usesection ASMTABLE2 815 <2> mne JBE ; ofs=420h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F77 933F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F79 4A4245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C69 3E08 variant 076h, 68 816 ------------------ <2> note: usesection ASMTABLE2 0 00007C6B F7CC3B variant 186h, 23, ASM_MACH3 817 ------------------ <2> note: usesection ASMTABLE2 0 00007C6E FF endvariant 818 ------------------ <2> note: usesection ASMTABLE2 819 <2> mne JC ; ofs=426h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F7C F23F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F7E 4A43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C6F 3BF0 variant 072h, 68 820 ------------------ <2> note: usesection ASMTABLE2 0 00007C71 F7CA23 variant 182h, 23, ASM_MACH3 821 ------------------ <2> note: usesection ASMTABLE2 0 00007C74 FF endvariant 822 ------------------ <2> note: usesection ASMTABLE2 823 <2> mne JCXZ, ASM_D16 ; ofs=42Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007C75 FC db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F80 5440 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F82 4A43585A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 824 <2> mne JECXZ, ASM_D32 ; ofs=42Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007C76 FD db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F86 6540 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F88 4A4543585A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C77 7716 variant 0E3h, 68 825 ------------------ <2> note: usesection ASMTABLE2 0 00007C79 FF endvariant 826 ------------------ <2> note: usesection ASMTABLE2 827 <2> mne JE ; ofs=431h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F8D A240 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F8F 4A45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C7A 3CFC variant 074h, 68 828 ------------------ <2> note: usesection ASMTABLE2 0 00007C7C F7CB2F variant 184h, 23, ASM_MACH3 829 ------------------ <2> note: usesection ASMTABLE2 0 00007C7F FF endvariant 830 ------------------ <2> note: usesection ASMTABLE2 831 <2> mne JG ; ofs=437h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F91 0241 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F93 4A47 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C80 42BE variant 07Fh, 68 832 ------------------ <2> note: usesection ASMTABLE2 0 00007C82 F7D0F1 variant 18Fh, 23, ASM_MACH3 833 ------------------ <2> note: usesection ASMTABLE2 0 00007C85 FF endvariant 834 ------------------ <2> note: usesection ASMTABLE2 835 <2> mne JGE ; ofs=43Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F95 6341 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F97 4A4745 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C86 41B2 variant 07Dh, 68 836 ------------------ <2> note: usesection ASMTABLE2 0 00007C88 F7CFE5 variant 18Dh, 23, ASM_MACH3 837 ------------------ <2> note: usesection ASMTABLE2 0 00007C8B FF endvariant 838 ------------------ <2> note: usesection ASMTABLE2 839 <2> mne JL ; ofs=443h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F9A C241 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007F9C 4A4C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C8C 412C variant 07Ch, 68 840 ------------------ <2> note: usesection ASMTABLE2 0 00007C8E F7CF5F variant 18Ch, 23, ASM_MACH3 841 ------------------ <2> note: usesection ASMTABLE2 0 00007C91 FF endvariant 842 ------------------ <2> note: usesection ASMTABLE2 843 <2> mne JLE ; ofs=449h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F9E 2342 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FA0 4A4C45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C92 4238 variant 07Eh, 68 844 ------------------ <2> note: usesection ASMTABLE2 0 00007C94 F7D06B variant 18Eh, 23, ASM_MACH3 845 ------------------ <2> note: usesection ASMTABLE2 0 00007C97 FF endvariant 846 ------------------ <2> note: usesection ASMTABLE2 847 <2> mne JNA ; ofs=44Fh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FA3 8342 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FA5 4A4E41 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C98 3E08 variant 076h, 68 848 ------------------ <2> note: usesection ASMTABLE2 0 00007C9A F7CC3B variant 186h, 23, ASM_MACH3 849 ------------------ <2> note: usesection ASMTABLE2 0 00007C9D FF endvariant 850 ------------------ <2> note: usesection ASMTABLE2 851 <2> mne JNAE ; ofs=455h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FA8 E442 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FAA 4A4E4145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007C9E 3BF0 variant 072h, 68 852 ------------------ <2> note: usesection ASMTABLE2 0 00007CA0 F7CA23 variant 182h, 23, ASM_MACH3 853 ------------------ <2> note: usesection ASMTABLE2 0 00007CA3 FF endvariant 854 ------------------ <2> note: usesection ASMTABLE2 855 <2> mne JNB ; ofs=45Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FAE 4343 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FB0 4A4E42 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CA4 3C76 variant 073h, 68 856 ------------------ <2> note: usesection ASMTABLE2 0 00007CA6 F7CAA9 variant 183h, 23, ASM_MACH3 857 ------------------ <2> note: usesection ASMTABLE2 0 00007CA9 FF endvariant 858 ------------------ <2> note: usesection ASMTABLE2 859 <2> mne JNBE ; ofs=461h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FB3 A443 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FB5 4A4E4245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CAA 3E8E variant 077h, 68 860 ------------------ <2> note: usesection ASMTABLE2 0 00007CAC F7CCC1 variant 187h, 23, ASM_MACH3 861 ------------------ <2> note: usesection ASMTABLE2 0 00007CAF FF endvariant 862 ------------------ <2> note: usesection ASMTABLE2 863 <2> mne JNC ; ofs=467h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FB9 0344 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FBB 4A4E43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CB0 3C76 variant 073h, 68 864 ------------------ <2> note: usesection ASMTABLE2 0 00007CB2 F7CAA9 variant 183h, 23, ASM_MACH3 865 ------------------ <2> note: usesection ASMTABLE2 0 00007CB5 FF endvariant 866 ------------------ <2> note: usesection ASMTABLE2 867 <2> mne JNE ; ofs=46Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FBE 6344 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FC0 4A4E45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CB6 3D82 variant 075h, 68 868 ------------------ <2> note: usesection ASMTABLE2 0 00007CB8 F7CBB5 variant 185h, 23, ASM_MACH3 869 ------------------ <2> note: usesection ASMTABLE2 0 00007CBB FF endvariant 870 ------------------ <2> note: usesection ASMTABLE2 871 <2> mne JNG ; ofs=473h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FC3 C344 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FC5 4A4E47 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CBC 4238 variant 07Eh, 68 872 ------------------ <2> note: usesection ASMTABLE2 0 00007CBE F7D06B variant 18Eh, 23, ASM_MACH3 873 ------------------ <2> note: usesection ASMTABLE2 0 00007CC1 FF endvariant 874 ------------------ <2> note: usesection ASMTABLE2 875 <2> mne JNGE ; ofs=479h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FC8 2445 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FCA 4A4E4745 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CC2 412C variant 07Ch, 68 876 ------------------ <2> note: usesection ASMTABLE2 0 00007CC4 F7CF5F variant 18Ch, 23, ASM_MACH3 877 ------------------ <2> note: usesection ASMTABLE2 0 00007CC7 FF endvariant 878 ------------------ <2> note: usesection ASMTABLE2 879 <2> mne JNL ; ofs=47Fh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FCE 8345 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FD0 4A4E4C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CC8 41B2 variant 07Dh, 68 880 ------------------ <2> note: usesection ASMTABLE2 0 00007CCA F7CFE5 variant 18Dh, 23, ASM_MACH3 881 ------------------ <2> note: usesection ASMTABLE2 0 00007CCD FF endvariant 882 ------------------ <2> note: usesection ASMTABLE2 883 <2> mne JNLE ; ofs=485h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FD3 E445 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FD5 4A4E4C45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CCE 42BE variant 07Fh, 68 884 ------------------ <2> note: usesection ASMTABLE2 0 00007CD0 F7D0F1 variant 18Fh, 23, ASM_MACH3 885 ------------------ <2> note: usesection ASMTABLE2 0 00007CD3 FF endvariant 886 ------------------ <2> note: usesection ASMTABLE2 887 <2> mne JNO ; ofs=48Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FD9 4346 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FDB 4A4E4F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CD4 3B6A variant 071h, 68 888 ------------------ <2> note: usesection ASMTABLE2 0 00007CD6 F7C99D variant 181h, 23, ASM_MACH3 889 ------------------ <2> note: usesection ASMTABLE2 0 00007CD9 FF endvariant 890 ------------------ <2> note: usesection ASMTABLE2 891 <2> mne JNP ; ofs=491h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FDE A346 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FE0 4A4E50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CDA 40A6 variant 07Bh, 68 892 ------------------ <2> note: usesection ASMTABLE2 0 00007CDC F7CED9 variant 18Bh, 23, ASM_MACH3 893 ------------------ <2> note: usesection ASMTABLE2 0 00007CDF FF endvariant 894 ------------------ <2> note: usesection ASMTABLE2 895 <2> mne JNS ; ofs=497h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FE3 0347 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FE5 4A4E53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CE0 3F9A variant 079h, 68 896 ------------------ <2> note: usesection ASMTABLE2 0 00007CE2 F7CDCD variant 189h, 23, ASM_MACH3 897 ------------------ <2> note: usesection ASMTABLE2 0 00007CE5 FF endvariant 898 ------------------ <2> note: usesection ASMTABLE2 899 <2> mne JNZ ; ofs=49Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FE8 6347 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FEA 4A4E5A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CE6 3D82 variant 075h, 68 900 ------------------ <2> note: usesection ASMTABLE2 0 00007CE8 F7CBB5 variant 185h, 23, ASM_MACH3 901 ------------------ <2> note: usesection ASMTABLE2 0 00007CEB FF endvariant 902 ------------------ <2> note: usesection ASMTABLE2 903 <2> mne JO ; ofs=4A3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FED C247 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FEF 4A4F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CEC 3AE4 variant 070h, 68 904 ------------------ <2> note: usesection ASMTABLE2 0 00007CEE F7C917 variant 180h, 23, ASM_MACH3 905 ------------------ <2> note: usesection ASMTABLE2 0 00007CF1 FF endvariant 906 ------------------ <2> note: usesection ASMTABLE2 907 <2> mne JP ; ofs=4A9h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FF1 2248 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FF3 4A50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CF2 4020 variant 07Ah, 68 908 ------------------ <2> note: usesection ASMTABLE2 0 00007CF4 F7CE53 variant 18Ah, 23, ASM_MACH3 909 ------------------ <2> note: usesection ASMTABLE2 0 00007CF7 FF endvariant 910 ------------------ <2> note: usesection ASMTABLE2 911 <2> mne JPE ; ofs=4AFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FF5 8348 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FF7 4A5045 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CF8 4020 variant 07Ah, 68 912 ------------------ <2> note: usesection ASMTABLE2 0 00007CFA F7CE53 variant 18Ah, 23, ASM_MACH3 913 ------------------ <2> note: usesection ASMTABLE2 0 00007CFD FF endvariant 914 ------------------ <2> note: usesection ASMTABLE2 915 <2> mne JPO ; ofs=4B5h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FFA E348 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00007FFC 4A504F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007CFE 40A6 variant 07Bh, 68 916 ------------------ <2> note: usesection ASMTABLE2 0 00007D00 F7CED9 variant 18Bh, 23, ASM_MACH3 917 ------------------ <2> note: usesection ASMTABLE2 0 00007D03 FF endvariant 918 ------------------ <2> note: usesection ASMTABLE2 919 <2> mne JS ; ofs=4BBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FFF 4249 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008001 4A53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D04 3F14 variant 078h, 68 920 ------------------ <2> note: usesection ASMTABLE2 0 00007D06 F7CD47 variant 188h, 23, ASM_MACH3 921 ------------------ <2> note: usesection ASMTABLE2 0 00007D09 FF endvariant 922 ------------------ <2> note: usesection ASMTABLE2 923 <2> mne JZ ; ofs=4C1h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008003 A249 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008005 4A5A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D0A 3CFC variant 074h, 68 924 ------------------ <2> note: usesection ASMTABLE2 0 00007D0C F7CB2F variant 184h, 23, ASM_MACH3 925 ------------------ <2> note: usesection ASMTABLE2 0 00007D0F FF endvariant 926 ------------------ <2> note: usesection ASMTABLE2 927 <2> mne JMP ; ofs=4C7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008007 034A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008009 4A4D50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D10 7A97 variant 0EAh, 27 928 ------------------ <2> note: usesection ASMTABLE2 0 00007D12 7B46 variant 0EBh, 68 929 ------------------ <2> note: usesection ASMTABLE2 0 00007D14 7A0D variant 0E9h, 23 930 ------------------ <2> note: usesection ASMTABLE2 0 00007D16 F44CD7 variant AGRP(4,4), 127 931 ------------------ <2> note: usesection ASMTABLE2 0 00007D19 F44CFB variant AGRP(4,5), 29 932 ------------------ <2> note: usesection ASMTABLE2 0 00007D1C 7A95 variant 0EAh, 25 933 ------------------ <2> note: usesection ASMTABLE2 0 00007D1E FF endvariant 934 ------------------ <2> note: usesection ASMTABLE2 935 <2> mne LAHF ; ofs=4D6h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000800C F44A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000800E 4C414846 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D1F 533A variant 09Fh, 0 936 ------------------ <2> note: usesection ASMTABLE2 0 00007D21 FF endvariant 937 ------------------ <2> note: usesection ASMTABLE2 938 <2> mne LAR ; ofs=4D9h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008012 234B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008014 4C4152 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D22 F6871B variant 102h, 15, ASM_MACH2 939 ------------------ <2> note: usesection ASMTABLE2 0 00007D25 FF endvariant 940 ------------------ <2> note: usesection ASMTABLE2 941 <2> mne LDS ; ofs=4DDh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008017 634B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008019 4C4453 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D26 672C variant 0C5h, 14 942 ------------------ <2> note: usesection ASMTABLE2 0 00007D28 FF endvariant 943 ------------------ <2> note: usesection ASMTABLE2 944 <2> mne LSS ; ofs=4E0h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000801C 934B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000801E 4C5353 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D29 F7E33A variant 1B2h, 14, ASM_MACH3 945 ------------------ <2> note: usesection ASMTABLE2 0 00007D2C FF endvariant 946 ------------------ <2> note: usesection ASMTABLE2 947 <2> mne LES ; ofs=4E4h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008021 D34B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008023 4C4553 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D2D 66A6 variant 0C4h, 14 948 ------------------ <2> note: usesection ASMTABLE2 0 00007D2F FF endvariant 949 ------------------ <2> note: usesection ASMTABLE2 950 <2> mne LFS ; ofs=4E7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008026 034C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008028 4C4653 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D30 F7E446 variant 1B4h, 14, ASM_MACH3 951 ------------------ <2> note: usesection ASMTABLE2 0 00007D33 FF endvariant 952 ------------------ <2> note: usesection ASMTABLE2 953 <2> mne LGS ; ofs=4EBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000802B 434C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000802D 4C4753 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D34 F7E4CC variant 1B5h, 14, ASM_MACH3 954 ------------------ <2> note: usesection ASMTABLE2 0 00007D37 FF endvariant 955 ------------------ <2> note: usesection ASMTABLE2 956 <2> mne LEA ; ofs=4EFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008030 834C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008032 4C4541 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D38 4A4B variant 08Dh, 125 957 ------------------ <2> note: usesection ASMTABLE2 0 00007D3A FF endvariant 958 ------------------ <2> note: usesection ASMTABLE2 959 <2> mne LGDT ; ofs=4F6h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008035 B44C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008037 4C474454 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D3B F6F45813 variant AGRP(7,2), 55, ASM_MACH2 960 ------------------ <2> note: usesection ASMTABLE2 0 00007D3F FF endvariant 961 ------------------ <2> note: usesection ASMTABLE2 962 <2> mne LIDT ; ofs=4FBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000803B 044D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000803D 4C494454 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D40 F6F45899 variant AGRP(7,3), 55, ASM_MACH2 963 ------------------ <2> note: usesection ASMTABLE2 0 00007D44 FF endvariant 964 ------------------ <2> note: usesection ASMTABLE2 965 <2> mne LLDT ; ofs=500h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008041 544D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008043 4C4C4454 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D45 F6F45C53 variant AGRP(8,2), 71, ASM_MACH2 966 ------------------ <2> note: usesection ASMTABLE2 0 00007D49 FF endvariant 967 ------------------ <2> note: usesection ASMTABLE2 968 <2> mne LMSW ; ofs=505h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008047 A44D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008049 4C4D5357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D4A F6F45A3B variant AGRP(7,6), 71, ASM_MACH2 969 ------------------ <2> note: usesection ASMTABLE2 0 00007D4E FF endvariant 970 ------------------ <2> note: usesection ASMTABLE2 971 <2> mne LOCK, ASM_SPECIAL, 0F0h ; ofs=50Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007D4F FFF0 db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000804D F44D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000804F 4C4F434B db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 972 <2> mne LODSB ; ofs=50Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008053 154E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008055 4C4F445342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D51 5A08 variant 0ACh, 0 973 ------------------ <2> note: usesection ASMTABLE2 0 00007D53 FF endvariant 974 ------------------ <2> note: usesection ASMTABLE2 975 <2> mne LOOP ; ofs=521h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000805A 444E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000805C 4C4F4F50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D54 76CE variant 0E2h, 130 976 ------------------ <2> note: usesection ASMTABLE2 0 00007D56 7690 variant 0E2h, 68 977 ------------------ <2> note: usesection ASMTABLE2 0 00007D58 FF endvariant 978 ------------------ <2> note: usesection ASMTABLE2 979 <2> mne LOOPZ ; ofs=526h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008060 954E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008062 4C4F4F505A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D59 7648 variant 0E1h, 130 980 ------------------ <2> note: usesection ASMTABLE2 0 00007D5B 760A variant 0E1h, 68 981 ------------------ <2> note: usesection ASMTABLE2 0 00007D5D FF endvariant 982 ------------------ <2> note: usesection ASMTABLE2 983 <2> mne LOOPE ; ofs=52Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008067 E54E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008069 4C4F4F5045 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D5E 7648 variant 0E1h, 130 984 ------------------ <2> note: usesection ASMTABLE2 0 00007D60 760A variant 0E1h, 68 985 ------------------ <2> note: usesection ASMTABLE2 0 00007D62 FF endvariant 986 ------------------ <2> note: usesection ASMTABLE2 987 <2> mne LOOPNZ ; ofs=530h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000806E 364F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008070 4C4F4F504E5A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D63 75C2 variant 0E0h, 130 988 ------------------ <2> note: usesection ASMTABLE2 0 00007D65 7584 variant 0E0h, 68 989 ------------------ <2> note: usesection ASMTABLE2 0 00007D67 FF endvariant 990 ------------------ <2> note: usesection ASMTABLE2 991 <2> mne LOOPNE ; ofs=535h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008076 864F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008078 4C4F4F504E45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D68 75C2 variant 0E0h, 130 992 ------------------ <2> note: usesection ASMTABLE2 0 00007D6A 7584 variant 0E0h, 68 993 ------------------ <2> note: usesection ASMTABLE2 0 00007D6C FF endvariant 994 ------------------ <2> note: usesection ASMTABLE2 995 <2> mne LSL ; ofs=53Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000807E D34F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008080 4C534C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D6D F687A1 variant 103h, 15, ASM_MACH2 996 ------------------ <2> note: usesection ASMTABLE2 0 00007D70 FF endvariant 997 ------------------ <2> note: usesection ASMTABLE2 998 <2> mne LTR ; ofs=53Eh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008083 1350 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008085 4C5452 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D71 F6F45CD9 variant AGRP(8,3), 71, ASM_MACH2 999 ------------------ <2> note: usesection ASMTABLE2 0 00007D75 FF endvariant 1000 ------------------ <2> note: usesection ASMTABLE2 1001 <2> mne MOV ; ofs=543h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008088 6350 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000808A 4D4F56 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D76 540B variant 0A0h, 75 1002 ------------------ <2> note: usesection ASMTABLE2 0 00007D78 5518 variant 0A2h, 76 1003 ------------------ <2> note: usesection ASMTABLE2 0 00007D7A 4739 variant 088h, 9 1004 ------------------ <2> note: usesection ASMTABLE2 0 00007D7C 4847 variant 08Ah, 11 1005 ------------------ <2> note: usesection ASMTABLE2 0 00007D7E 4991 variant 08Ch, 73 1006 ------------------ <2> note: usesection ASMTABLE2 0 00007D80 4A9E variant 08Eh, 74 1007 ------------------ <2> note: usesection ASMTABLE2 0 00007D82 5C6D variant 0B0h, 77 1008 ------------------ <2> note: usesection ASMTABLE2 0 00007D84 609E variant 0B8h, 78 1009 ------------------ <2> note: usesection ASMTABLE2 0 00007D86 F45F34 variant AGRP(9,0), 4 1010 ------------------ <2> note: usesection ASMTABLE2 0 00007D89 F79732 variant 120h, 114, ASM_MACH3 1011 ------------------ <2> note: usesection ASMTABLE2 0 00007D8C F7983F variant 122h, 115, ASM_MACH3 1012 ------------------ <2> note: usesection ASMTABLE2 0 00007D8F F797BA variant 121h, 116, ASM_MACH3 1013 ------------------ <2> note: usesection ASMTABLE2 0 00007D92 F798C7 variant 123h, 117, ASM_MACH3 1014 ------------------ <2> note: usesection ASMTABLE2 0 00007D95 F7994E variant 124h, 118, ASM_MACH3 1015 ------------------ <2> note: usesection ASMTABLE2 0 00007D98 F79A5B variant 126h, 119, ASM_MACH3 1016 ------------------ <2> note: usesection ASMTABLE2 0 00007D9B FF endvariant 1017 ------------------ <2> note: usesection ASMTABLE2 1018 <2> mne MOVD ; ofs=569h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000808D C452 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000808F 4D4F5644 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007D9C F9C00C variant 16Eh, 120, ASM_MACH5 1019 ------------------ <2> note: usesection ASMTABLE2 0 00007D9F F9C86D variant 17Eh, 121, ASM_MACH5 1020 ------------------ <2> note: usesection ASMTABLE2 0 00007DA2 FF endvariant 1021 ------------------ <2> note: usesection ASMTABLE2 1022 <2> mne MOVQ ; ofs=570h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008093 3453 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008095 4D4F5651 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DA3 F9C094 variant 16Fh, 122, ASM_MACH5 1023 ------------------ <2> note: usesection ASMTABLE2 0 00007DA6 F9C8F5 variant 17Fh, 123, ASM_MACH5 1024 ------------------ <2> note: usesection ASMTABLE2 0 00007DA9 FF endvariant 1025 ------------------ <2> note: usesection ASMTABLE2 1026 <2> mne PACKSSDW ; ofs=577h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008099 A853 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000809B 5041434B53534457 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DAA F9BE7C variant 16Bh, 122, ASM_MACH5 1027 ------------------ <2> note: usesection ASMTABLE2 0 00007DAD FF endvariant 1028 ------------------ <2> note: usesection ASMTABLE2 1029 <2> mne PACKSSWB ; ofs=57Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080A3 E853 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000080A5 5041434B53535742 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DAE F9BA4C variant 163h, 122, ASM_MACH5 1030 ------------------ <2> note: usesection ASMTABLE2 0 00007DB1 FF endvariant 1031 ------------------ <2> note: usesection ASMTABLE2 1032 <2> mne PACKUSWB ; ofs=57Fh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080AD 2854 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000080AF 5041434B55535742 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DB2 F9BC64 variant 167h, 122, ASM_MACH5 1033 ------------------ <2> note: usesection ASMTABLE2 0 00007DB5 FF endvariant 1034 ------------------ <2> note: usesection ASMTABLE2 1035 <2> mne PADDB ; ofs=583h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080B7 6554 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000080B9 5041444442 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DB6 F9F41662 variant 1FCh, 122, ASM_MACH5 1036 ------------------ <2> note: usesection ASMTABLE2 0 00007DBA FF endvariant 1037 ------------------ <2> note: usesection ASMTABLE2 1038 <2> mne PADDW ; ofs=588h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080BE B554 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000080C0 5041444457 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DBB F9F416E8 variant 1FDh, 122, ASM_MACH5 1039 ------------------ <2> note: usesection ASMTABLE2 0 00007DBF FF endvariant 1040 ------------------ <2> note: usesection ASMTABLE2 1041 <2> mne PADDD ; ofs=58Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080C5 0555 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000080C7 5041444444 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DC0 F9F4176E variant 1FEh, 122, ASM_MACH5 1042 ------------------ <2> note: usesection ASMTABLE2 0 00007DC4 FF endvariant 1043 ------------------ <2> note: usesection ASMTABLE2 1044 <2> mne PADDSB ; ofs=592h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080CC 5655 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000080CE 504144445342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DC5 F9F40E02 variant 1ECh, 122, ASM_MACH5 1045 ------------------ <2> note: usesection ASMTABLE2 0 00007DC9 FF endvariant 1046 ------------------ <2> note: usesection ASMTABLE2 1047 <2> mne PADDSW ; ofs=597h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080D4 A655 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000080D6 504144445357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DCA F9F40E88 variant 1EDh, 122, ASM_MACH5 1048 ------------------ <2> note: usesection ASMTABLE2 0 00007DCE FF endvariant 1049 ------------------ <2> note: usesection ASMTABLE2 1050 <2> mne PADDUSB ; ofs=59Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080DC F755 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000080DE 50414444555342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DCF F9F405A2 variant 1DCh, 122, ASM_MACH5 1051 ------------------ <2> note: usesection ASMTABLE2 0 00007DD3 FF endvariant 1052 ------------------ <2> note: usesection ASMTABLE2 1053 <2> mne PADDUSW ; ofs=5A1h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080E5 4756 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000080E7 50414444555357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DD4 F9F40628 variant 1DDh, 122, ASM_MACH5 1054 ------------------ <2> note: usesection ASMTABLE2 0 00007DD8 FF endvariant 1055 ------------------ <2> note: usesection ASMTABLE2 1056 <2> mne PAND ; ofs=5A6h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080EE 9456 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000080F0 50414E44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DD9 F9F4051C variant 1DBh, 122, ASM_MACH5 1057 ------------------ <2> note: usesection ASMTABLE2 0 00007DDD FF endvariant 1058 ------------------ <2> note: usesection ASMTABLE2 1059 <2> mne PANDN ; ofs=5ABh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080F4 E556 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000080F6 50414E444E db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DDE F9F40734 variant 1DFh, 122, ASM_MACH5 1060 ------------------ <2> note: usesection ASMTABLE2 0 00007DE2 FF endvariant 1061 ------------------ <2> note: usesection ASMTABLE2 1062 <2> mne PCMPEQB ; ofs=5B0h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080FB 3757 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000080FD 50434D50455142 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DE3 F9C332 variant 174h, 122, ASM_MACH5 1063 ------------------ <2> note: usesection ASMTABLE2 0 00007DE6 FF endvariant 1064 ------------------ <2> note: usesection ASMTABLE2 1065 <2> mne PCMPEQW ; ofs=5B4h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008104 7757 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008106 50434D50455157 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DE7 F9C3B8 variant 175h, 122, ASM_MACH5 1066 ------------------ <2> note: usesection ASMTABLE2 0 00007DEA FF endvariant 1067 ------------------ <2> note: usesection ASMTABLE2 1068 <2> mne PCMPEQD ; ofs=5B8h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000810D B757 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000810F 50434D50455144 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DEB F9C43E variant 176h, 122, ASM_MACH5 1069 ------------------ <2> note: usesection ASMTABLE2 0 00007DEE FF endvariant 1070 ------------------ <2> note: usesection ASMTABLE2 1071 <2> mne PCMPGTB ; ofs=5BCh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008116 F757 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008118 50434D50475442 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DEF F9BAD2 variant 164h, 122, ASM_MACH5 1072 ------------------ <2> note: usesection ASMTABLE2 0 00007DF2 FF endvariant 1073 ------------------ <2> note: usesection ASMTABLE2 1074 <2> mne PCMPGTW ; ofs=5C0h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000811F 3758 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008121 50434D50475457 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DF3 F9BB58 variant 165h, 122, ASM_MACH5 1075 ------------------ <2> note: usesection ASMTABLE2 0 00007DF6 FF endvariant 1076 ------------------ <2> note: usesection ASMTABLE2 1077 <2> mne PCMPGTD ; ofs=5C4h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008128 7758 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000812A 50434D50475444 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DF7 F9BBDE variant 166h, 122, ASM_MACH5 1078 ------------------ <2> note: usesection ASMTABLE2 0 00007DFA FF endvariant 1079 ------------------ <2> note: usesection ASMTABLE2 1080 <2> mne PMADDWD ; ofs=5C8h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008131 B758 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008133 504D4144445744 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DFB F9F412B8 variant 1F5h, 122, ASM_MACH5 1081 ------------------ <2> note: usesection ASMTABLE2 0 00007DFF FF endvariant 1082 ------------------ <2> note: usesection ASMTABLE2 1083 <2> mne PMULHW ; ofs=5CDh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000813A 0659 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000813C 504D554C4857 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E00 F9F40A58 variant 1E5h, 122, ASM_MACH5 1084 ------------------ <2> note: usesection ASMTABLE2 0 00007E04 FF endvariant 1085 ------------------ <2> note: usesection ASMTABLE2 1086 <2> mne PMULLW ; ofs=5D2h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008142 5659 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008144 504D554C4C57 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E05 F9F401F8 variant 1D5h, 122, ASM_MACH5 1087 ------------------ <2> note: usesection ASMTABLE2 0 00007E09 FF endvariant 1088 ------------------ <2> note: usesection ASMTABLE2 1089 <2> mne POR ; ofs=5D7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000814A A359 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000814C 504F52 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E0A F9F40D7C variant 1EBh, 122, ASM_MACH5 1090 ------------------ <2> note: usesection ASMTABLE2 0 00007E0E FF endvariant 1091 ------------------ <2> note: usesection ASMTABLE2 1092 <2> mne PSLLW ; ofs=5DCh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000814F F559 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008151 50534C4C57 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E0F F9F410A0 variant 1F1h, 122, ASM_MACH5 1093 ------------------ <2> note: usesection ASMTABLE2 0 00007E13 F9F46700 variant AGRP(10,6), 124, ASM_MACH5 1094 ------------------ <2> note: usesection ASMTABLE2 0 00007E17 FF endvariant 1095 ------------------ <2> note: usesection ASMTABLE2 1096 <2> mne PSLLD ; ofs=5E5h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008156 855A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008158 50534C4C44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E18 F9F41126 variant 1F2h, 122, ASM_MACH5 1097 ------------------ <2> note: usesection ASMTABLE2 0 00007E1C F9F46B30 variant AGRP(11,6), 124, ASM_MACH5 1098 ------------------ <2> note: usesection ASMTABLE2 0 00007E20 FF endvariant 1099 ------------------ <2> note: usesection ASMTABLE2 1100 <2> mne PSLLQ ; ofs=5EEh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000815D 155B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000815F 50534C4C51 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E21 F9F411AC variant 1F3h, 122, ASM_MACH5 1101 ------------------ <2> note: usesection ASMTABLE2 0 00007E25 F9F46F60 variant AGRP(12,6), 124, ASM_MACH5 1102 ------------------ <2> note: usesection ASMTABLE2 0 00007E29 FF endvariant 1103 ------------------ <2> note: usesection ASMTABLE2 1104 <2> mne PSRAW ; ofs=5F7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008164 A55B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008166 5053524157 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E2A F9F40840 variant 1E1h, 122, ASM_MACH5 1105 ------------------ <2> note: usesection ASMTABLE2 0 00007E2E F9F465F4 variant AGRP(10,4), 124, ASM_MACH5 1106 ------------------ <2> note: usesection ASMTABLE2 0 00007E32 FF endvariant 1107 ------------------ <2> note: usesection ASMTABLE2 1108 <2> mne PSRAD ; ofs=600h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000816B 355C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000816D 5053524144 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E33 F9F408C6 variant 1E2h, 122, ASM_MACH5 1109 ------------------ <2> note: usesection ASMTABLE2 0 00007E37 F9F46A24 variant AGRP(11,4), 124, ASM_MACH5 1110 ------------------ <2> note: usesection ASMTABLE2 0 00007E3B FF endvariant 1111 ------------------ <2> note: usesection ASMTABLE2 1112 <2> mne PSRLW ; ofs=609h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008172 C55C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008174 5053524C57 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E3C F9F3E0 variant 1D1h, 122, ASM_MACH5 1113 ------------------ <2> note: usesection ASMTABLE2 0 00007E3F F9F464E8 variant AGRP(10,2), 124, ASM_MACH5 1114 ------------------ <2> note: usesection ASMTABLE2 0 00007E43 FF endvariant 1115 ------------------ <2> note: usesection ASMTABLE2 1116 <2> mne PSRLD ; ofs=611h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008179 455D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000817B 5053524C44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E44 F9F40066 variant 1D2h, 122, ASM_MACH5 1117 ------------------ <2> note: usesection ASMTABLE2 0 00007E48 F9F46918 variant AGRP(11,2), 124, ASM_MACH5 1118 ------------------ <2> note: usesection ASMTABLE2 0 00007E4C FF endvariant 1119 ------------------ <2> note: usesection ASMTABLE2 1120 <2> mne PSRLQ ; ofs=61Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008180 D55D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008182 5053524C51 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E4D F9F400EC variant 1D3h, 122, ASM_MACH5 1121 ------------------ <2> note: usesection ASMTABLE2 0 00007E51 F9F46D48 variant AGRP(12,2), 124, ASM_MACH5 1122 ------------------ <2> note: usesection ASMTABLE2 0 00007E55 FF endvariant 1123 ------------------ <2> note: usesection ASMTABLE2 1124 <2> mne PSUBB ; ofs=623h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008187 655E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008189 5053554242 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E56 F9F4144A variant 1F8h, 122, ASM_MACH5 1125 ------------------ <2> note: usesection ASMTABLE2 0 00007E5A FF endvariant 1126 ------------------ <2> note: usesection ASMTABLE2 1127 <2> mne PSUBW ; ofs=628h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000818E B55E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008190 5053554257 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E5B F9F414D0 variant 1F9h, 122, ASM_MACH5 1128 ------------------ <2> note: usesection ASMTABLE2 0 00007E5F FF endvariant 1129 ------------------ <2> note: usesection ASMTABLE2 1130 <2> mne PSUBD ; ofs=62Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008195 055F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008197 5053554244 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E60 F9F41556 variant 1FAh, 122, ASM_MACH5 1131 ------------------ <2> note: usesection ASMTABLE2 0 00007E64 FF endvariant 1132 ------------------ <2> note: usesection ASMTABLE2 1133 <2> mne PSUBSB ; ofs=632h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000819C 565F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000819E 505355425342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E65 F9F40BEA variant 1E8h, 122, ASM_MACH5 1134 ------------------ <2> note: usesection ASMTABLE2 0 00007E69 FF endvariant 1135 ------------------ <2> note: usesection ASMTABLE2 1136 <2> mne PSUBSW ; ofs=637h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081A4 A65F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000081A6 505355425357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E6A F9F40C70 variant 1E9h, 122, ASM_MACH5 1137 ------------------ <2> note: usesection ASMTABLE2 0 00007E6E FF endvariant 1138 ------------------ <2> note: usesection ASMTABLE2 1139 <2> mne PSUBUSB ; ofs=63Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081AC F75F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000081AE 50535542555342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E6F F9F4038A variant 1D8h, 122, ASM_MACH5 1140 ------------------ <2> note: usesection ASMTABLE2 0 00007E73 FF endvariant 1141 ------------------ <2> note: usesection ASMTABLE2 1142 <2> mne PSUBUSW ; ofs=641h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081B5 4760 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000081B7 50535542555357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E74 F9F40410 variant 1D9h, 122, ASM_MACH5 1143 ------------------ <2> note: usesection ASMTABLE2 0 00007E78 FF endvariant 1144 ------------------ <2> note: usesection ASMTABLE2 1145 <2> mne PUNPCKHBW ; ofs=646h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081BE 9960 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000081C0 50554E50434B484257 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E79 F9BCEA variant 168h, 122, ASM_MACH5 1146 ------------------ <2> note: usesection ASMTABLE2 0 00007E7C FF endvariant 1147 ------------------ <2> note: usesection ASMTABLE2 1148 <2> mne PUNPCKHWD ; ofs=64Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081C9 D960 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000081CB 50554E50434B485744 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E7D F9BD70 variant 169h, 122, ASM_MACH5 1149 ------------------ <2> note: usesection ASMTABLE2 0 00007E80 FF endvariant 1150 ------------------ <2> note: usesection ASMTABLE2 1151 <2> mne PUNPCKHDQ ; ofs=64Eh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081D4 1961 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000081D6 50554E50434B484451 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E81 F9BDF6 variant 16Ah, 122, ASM_MACH5 1152 ------------------ <2> note: usesection ASMTABLE2 0 00007E84 FF endvariant 1153 ------------------ <2> note: usesection ASMTABLE2 1154 <2> mne PUNPCKLBW ; ofs=652h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081DF 5961 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000081E1 50554E50434B4C4257 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E85 F9B8BA variant 160h, 122, ASM_MACH5 1155 ------------------ <2> note: usesection ASMTABLE2 0 00007E88 FF endvariant 1156 ------------------ <2> note: usesection ASMTABLE2 1157 <2> mne PUNPCKLWD ; ofs=656h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081EA 9961 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000081EC 50554E50434B4C5744 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E89 F9B940 variant 161h, 122, ASM_MACH5 1158 ------------------ <2> note: usesection ASMTABLE2 0 00007E8C FF endvariant 1159 ------------------ <2> note: usesection ASMTABLE2 1160 <2> mne PUNPCKLDQ ; ofs=65Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081F5 D961 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000081F7 50554E50434B4C4451 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E8D F9B9C6 variant 162h, 122, ASM_MACH5 1161 ------------------ <2> note: usesection ASMTABLE2 0 00007E90 FF endvariant 1162 ------------------ <2> note: usesection ASMTABLE2 1163 <2> mne PXOR ; ofs=65Eh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008200 1462 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008202 50584F52 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E91 F9F40F94 variant 1EFh, 122, ASM_MACH5 1164 ------------------ <2> note: usesection ASMTABLE2 0 00007E95 FF endvariant 1165 ------------------ <2> note: usesection ASMTABLE2 1166 <2> mne MOVSB ; ofs=663h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008206 6562 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008208 4D4F565342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E96 55D8 variant 0A4h, 0 1167 ------------------ <2> note: usesection ASMTABLE2 0 00007E98 FF endvariant 1168 ------------------ <2> note: usesection ASMTABLE2 1169 <2> mne MOVSX ; ofs=669h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000820D 9562 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000820F 4D4F565358 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E99 F7E9C3 variant 1BEh, 79, ASM_MACH3 1170 ------------------ <2> note: usesection ASMTABLE2 0 00007E9C F7EA4A variant 1BFh, 80, ASM_MACH3 1171 ------------------ <2> note: usesection ASMTABLE2 0 00007E9F FF endvariant 1172 ------------------ <2> note: usesection ASMTABLE2 1173 <2> mne MOVZX ; ofs=670h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008214 0563 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008216 4D4F565A58 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EA0 F7E593 variant 1B6h, 79, ASM_MACH3 1174 ------------------ <2> note: usesection ASMTABLE2 0 00007EA3 F7E61A variant 1B7h, 80, ASM_MACH3 1175 ------------------ <2> note: usesection ASMTABLE2 0 00007EA6 FF endvariant 1176 ------------------ <2> note: usesection ASMTABLE2 1177 <2> mne MUL ; ofs=677h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000821B 7363 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000821D 4D554C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EA7 F454DB variant AGRP(6,4), 35 1178 ------------------ <2> note: usesection ASMTABLE2 0 00007EAA FF endvariant 1179 ------------------ <2> note: usesection ASMTABLE2 1180 <2> mne NEG ; ofs=67Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008220 B363 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008222 4E4547 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EAB FBF45454 variant AGRP(6,3), 34, ASM_LOCKABLE 1181 ------------------ <2> note: usesection ASMTABLE2 0 00007EAF FF endvariant 1182 ------------------ <2> note: usesection ASMTABLE2 1183 <2> mne NOP ; ofs=680h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008225 0364 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008227 4E4F50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EB0 4B60 variant 090h, 0 1184 ------------------ <2> note: usesection ASMTABLE2 0 00007EB2 FF endvariant 1185 ------------------ <2> note: usesection ASMTABLE2 1186 <2> mne NOT ; ofs=683h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000822A 3364 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000822C 4E4F54 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EB3 FBF453CE variant AGRP(6,2), 34, ASM_LOCKABLE 1187 ------------------ <2> note: usesection ASMTABLE2 0 00007EB7 FF endvariant 1188 ------------------ <2> note: usesection ASMTABLE2 1189 <2> mne OR ; ofs=688h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000822F 8264 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008231 4F52 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EB8 FBF43E3B variant AGRP(1,1), 5, ASM_LOCKABLE 1190 ------------------ <2> note: usesection ASMTABLE2 0 00007EBC 0649 variant 00Ch, 1 1191 ------------------ <2> note: usesection ASMTABLE2 0 00007EBE FBF44268 variant AGRP(2,1), 2, ASM_LOCKABLE 1192 ------------------ <2> note: usesection ASMTABLE2 0 00007EC2 FB0437 variant 008h, 7, ASM_LOCKABLE 1193 ------------------ <2> note: usesection ASMTABLE2 0 00007EC5 0546 variant 00Ah, 10 1194 ------------------ <2> note: usesection ASMTABLE2 0 00007EC7 FF endvariant 1195 ------------------ <2> note: usesection ASMTABLE2 1196 <2> mne ORG, ASM_SPECIAL ; ofs=698h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007EC8 FF db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008233 8365 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008235 4F5247 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 1197 <2> mne OUT ; ofs=69Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008238 9365 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000823A 4F5554 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EC9 78B5 variant 0E6h, 81 1198 ------------------ <2> note: usesection ASMTABLE2 0 00007ECB 7CE6 variant 0EEh, 82 1199 ------------------ <2> note: usesection ASMTABLE2 0 00007ECD FF endvariant 1200 ------------------ <2> note: usesection ASMTABLE2 1201 <2> mne OUTSB ; ofs=69Fh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000823D E565 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000823F 4F55545342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007ECE F53994 variant 06Eh, 0, ASM_MACH1 1202 ------------------ <2> note: usesection ASMTABLE2 0 00007ED1 FF endvariant 1203 ------------------ <2> note: usesection ASMTABLE2 1204 <2> mne POP ; ofs=6A7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008244 2366 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008246 504F50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007ED2 2E36 variant 058h, 38 1205 ------------------ <2> note: usesection ASMTABLE2 0 00007ED4 F47043 variant AGRP(13,0), 83 1206 ------------------ <2> note: usesection ASMTABLE2 0 00007ED7 10A9 variant 01Fh, 111 1207 ------------------ <2> note: usesection ASMTABLE2 0 00007ED9 0417 variant 007h, 109 1208 ------------------ <2> note: usesection ASMTABLE2 0 00007EDB 0C78 variant 017h, 110 1209 ------------------ <2> note: usesection ASMTABLE2 0 00007EDD F7DAB6 variant 1A1h, 112, ASM_MACH3 1210 ------------------ <2> note: usesection ASMTABLE2 0 00007EE0 F7DEE7 variant 1A9h, 113, ASM_MACH3 1211 ------------------ <2> note: usesection ASMTABLE2 0 00007EE3 FF endvariant 1212 ------------------ <2> note: usesection ASMTABLE2 1213 <2> mne PUSH ; ofs=6C0h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008249 4467 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000824B 50555348 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EE4 2A04 variant 050h, 36 1214 ------------------ <2> note: usesection ASMTABLE2 0 00007EE6 F44DA9 variant AGRP(4,6), 69 1215 ------------------ <2> note: usesection ASMTABLE2 0 00007EE9 F537D1 variant 06Ah, 85, ASM_MACH1 1216 ------------------ <2> note: usesection ASMTABLE2 0 00007EEC F536C4 variant 068h, 84, ASM_MACH1 1217 ------------------ <2> note: usesection ASMTABLE2 0 00007EEF 07B7 variant 00Eh, 99 1218 ------------------ <2> note: usesection ASMTABLE2 0 00007EF1 0BE9 variant 016h, 101 1219 ------------------ <2> note: usesection ASMTABLE2 0 00007EF3 101B variant 01Eh, 103 1220 ------------------ <2> note: usesection ASMTABLE2 0 00007EF5 0385 variant 006h, 97 1221 ------------------ <2> note: usesection ASMTABLE2 0 00007EF7 F7DA29 variant 1A0h, 105, ASM_MACH3 1222 ------------------ <2> note: usesection ASMTABLE2 0 00007EFA F7DE5B variant 1A8h, 107, ASM_MACH3 1223 ------------------ <2> note: usesection ASMTABLE2 0 00007EFD FF endvariant 1224 ------------------ <2> note: usesection ASMTABLE2 1225 <2> mne RCL ; ofs=6E8h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000824F E368 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008251 52434C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EFE F47582 variant AGRP(14,2), 86 1226 ------------------ <2> note: usesection ASMTABLE2 0 00007F01 F479B3 variant AGRP(15,2), 87 1227 ------------------ <2> note: usesection ASMTABLE2 0 00007F04 F5F47DE4 variant AGRP(16,2), 88, ASM_MACH1 1228 ------------------ <2> note: usesection ASMTABLE2 0 00007F08 FF endvariant 1229 ------------------ <2> note: usesection ASMTABLE2 1230 <2> mne RCR ; ofs=6F3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008254 9369 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008256 524352 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F09 F47608 variant AGRP(14,3), 86 1231 ------------------ <2> note: usesection ASMTABLE2 0 00007F0C F47A39 variant AGRP(15,3), 87 1232 ------------------ <2> note: usesection ASMTABLE2 0 00007F0F F5F47E6A variant AGRP(16,3), 88, ASM_MACH1 1233 ------------------ <2> note: usesection ASMTABLE2 0 00007F13 FF endvariant 1234 ------------------ <2> note: usesection ASMTABLE2 1235 <2> mne ROL ; ofs=6FEh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008259 436A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000825B 524F4C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F14 F47476 variant AGRP(14,0), 86 1236 ------------------ <2> note: usesection ASMTABLE2 0 00007F17 F478A7 variant AGRP(15,0), 87 1237 ------------------ <2> note: usesection ASMTABLE2 0 00007F1A F5F47CD8 variant AGRP(16,0), 88, ASM_MACH1 1238 ------------------ <2> note: usesection ASMTABLE2 0 00007F1E FF endvariant 1239 ------------------ <2> note: usesection ASMTABLE2 1240 <2> mne ROR ; ofs=709h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000825E F36A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008260 524F52 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F1F F474FC variant AGRP(14,1), 86 1241 ------------------ <2> note: usesection ASMTABLE2 0 00007F22 F4792D variant AGRP(15,1), 87 1242 ------------------ <2> note: usesection ASMTABLE2 0 00007F25 F5F47D5E variant AGRP(16,1), 88, ASM_MACH1 1243 ------------------ <2> note: usesection ASMTABLE2 0 00007F29 FF endvariant 1244 ------------------ <2> note: usesection ASMTABLE2 1245 <2> mne RDMSR ; ofs=714h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008263 A56B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008265 52444D5352 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F2A F9A02C variant 132h, 0, ASM_MACH5 1246 ------------------ <2> note: usesection ASMTABLE2 0 00007F2D FF endvariant 1247 ------------------ <2> note: usesection ASMTABLE2 1248 <2> mne RDTSC ; ofs=718h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000826A E56B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000826C 5244545343 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F2E F99FA6 variant 131h, 0, ASM_MACH5 1249 ------------------ <2> note: usesection ASMTABLE2 0 00007F31 FF endvariant 1250 ------------------ <2> note: usesection ASMTABLE2 1251 <2> mne REP, ASM_SPECIAL, 0F3h ; ofs=71Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007F32 FFF3 db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008271 236C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008273 524550 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 1252 <2> mne REPZ, ASM_SPECIAL, 0F3h ; ofs=71Eh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007F34 FFF3 db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008276 446C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008278 5245505A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 1253 <2> mne REPNZ, ASM_SPECIAL, 0F2h ; ofs=720h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007F36 FFF2 db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000827C 656C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000827E 5245504E5A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 1254 <2> mne REPE, ASM_SPECIAL, 0F3h ; ofs=722h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007F38 FFF3 db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008283 846C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008285 52455045 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 1255 <2> mne REPNE, ASM_SPECIAL, 0F2h ; ofs=724h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007F3A FFF2 db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008289 A56C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000828B 5245504E45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 1256 <2> mne RSM ; ofs=735h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008290 C36C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008292 52534D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F3C F9DEFC variant 1AAh, 0, ASM_MACH5 1257 ------------------ <2> note: usesection ASMTABLE2 0 00007F3F FF endvariant 1258 ------------------ <2> note: usesection ASMTABLE2 1259 <2> mne SAHF ; ofs=739h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008295 046D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008297 53414846 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F40 52B4 variant 09Eh, 0 1260 ------------------ <2> note: usesection ASMTABLE2 0 00007F42 FF endvariant 1261 ------------------ <2> note: usesection ASMTABLE2 1262 <2> mne SAL ; ofs=73Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000829B 336D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000829D 53414C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F43 F4768E variant AGRP(14,4), 86 1263 ------------------ <2> note: usesection ASMTABLE2 0 00007F46 F47ABF variant AGRP(15,4), 87 1264 ------------------ <2> note: usesection ASMTABLE2 0 00007F49 F5F47EF0 variant AGRP(16,4), 88, ASM_MACH1 1265 ------------------ <2> note: usesection ASMTABLE2 0 00007F4D FF endvariant 1266 ------------------ <2> note: usesection ASMTABLE2 1267 <2> mne SAR ; ofs=747h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082A0 E36D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082A2 534152 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F4E F47820 variant AGRP(14,7), 86 1268 ------------------ <2> note: usesection ASMTABLE2 0 00007F51 F47C51 variant AGRP(15,7), 87 1269 ------------------ <2> note: usesection ASMTABLE2 0 00007F54 F5F48082 variant AGRP(16,7), 88, ASM_MACH1 1270 ------------------ <2> note: usesection ASMTABLE2 0 00007F58 FF endvariant 1271 ------------------ <2> note: usesection ASMTABLE2 1272 <2> mne SEG ; ofs=752h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082A5 936E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082A7 534547 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F59 1446 variant 026h, 98 1273 ------------------ <2> note: usesection ASMTABLE2 0 00007F5B 1878 variant 02Eh, 100 1274 ------------------ <2> note: usesection ASMTABLE2 0 00007F5D 1CAA variant 036h, 102 1275 ------------------ <2> note: usesection ASMTABLE2 0 00007F5F 20DC variant 03Eh, 104 1276 ------------------ <2> note: usesection ASMTABLE2 0 00007F61 F734C2 variant 064h, 106, ASM_MACH3 1277 ------------------ <2> note: usesection ASMTABLE2 0 00007F64 F7354A variant 065h, 108, ASM_MACH3 1278 ------------------ <2> note: usesection ASMTABLE2 0 00007F67 FF endvariant 1279 ------------------ <2> note: usesection ASMTABLE2 1280 <2> mne ES, ASM_SPECIAL, 026h ; ofs=761h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007F68 FF26 db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082AA 826F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082AC 4553 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 1281 <2> mne CS, ASM_SPECIAL, 02Eh ; ofs=763h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007F6A FF2E db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082AE A26F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082B0 4353 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 1282 <2> mne SS, ASM_SPECIAL, 036h ; ofs=765h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007F6C FF36 db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082B2 C26F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082B4 5353 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 1283 <2> mne DS, ASM_SPECIAL, 03Eh ; ofs=767h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007F6E FF3E db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082B6 E26F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082B8 4453 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 1284 <2> mne FS, ASM_SPECIAL, ASM_MACH3, 064h ; ofs=769h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007F70 FFF764 db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082BA 0270 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082BC 4653 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 1285 <2> mne GS, ASM_SPECIAL, ASM_MACH3, 065h ; ofs=76Ch 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00007F73 FFF765 db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082BE 3270 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082C0 4753 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 1286 <2> mne SHL ; ofs=76Fh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082C2 6370 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082C4 53484C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F76 F4768E variant AGRP(14,4), 86 1287 ------------------ <2> note: usesection ASMTABLE2 0 00007F79 F47ABF variant AGRP(15,4), 87 1288 ------------------ <2> note: usesection ASMTABLE2 0 00007F7C F5F47EF0 variant AGRP(16,4), 88, ASM_MACH1 1289 ------------------ <2> note: usesection ASMTABLE2 0 00007F80 FF endvariant 1290 ------------------ <2> note: usesection ASMTABLE2 1291 <2> mne SHR ; ofs=77Ah 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082C7 1371 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082C9 534852 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F81 F47714 variant AGRP(14,5), 86 1292 ------------------ <2> note: usesection ASMTABLE2 0 00007F84 F47B45 variant AGRP(15,5), 87 1293 ------------------ <2> note: usesection ASMTABLE2 0 00007F87 F5F47F76 variant AGRP(16,5), 88, ASM_MACH1 1294 ------------------ <2> note: usesection ASMTABLE2 0 00007F8B FF endvariant 1295 ------------------ <2> note: usesection ASMTABLE2 1296 <2> mne SBB ; ofs=785h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082CC C371 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082CE 534242 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F8C FBF43F47 variant AGRP(1,3), 5, ASM_LOCKABLE 1297 ------------------ <2> note: usesection ASMTABLE2 0 00007F90 0EA9 variant 01Ch, 1 1298 ------------------ <2> note: usesection ASMTABLE2 0 00007F92 FBF44374 variant AGRP(2,3), 2, ASM_LOCKABLE 1299 ------------------ <2> note: usesection ASMTABLE2 0 00007F96 FB0C97 variant 018h, 7, ASM_LOCKABLE 1300 ------------------ <2> note: usesection ASMTABLE2 0 00007F99 0DA6 variant 01Ah, 10 1301 ------------------ <2> note: usesection ASMTABLE2 0 00007F9B FF endvariant 1302 ------------------ <2> note: usesection ASMTABLE2 1303 <2> mne SCASB ; ofs=795h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082D1 C572 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082D3 5343415342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F9C 5B14 variant 0AEh, 0 1304 ------------------ <2> note: usesection ASMTABLE2 0 00007F9E FF endvariant 1305 ------------------ <2> note: usesection ASMTABLE2 1306 <2> mne SETA ; ofs=79Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082D8 F472 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082DA 53455441 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F9F F7D566 variant 197h, 92, ASM_MACH3 1307 ------------------ <2> note: usesection ASMTABLE2 0 00007FA2 FF endvariant 1308 ------------------ <2> note: usesection ASMTABLE2 1309 <2> mne SETAE ; ofs=79Fh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082DE 3573 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082E0 5345544145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FA3 F7D34E variant 193h, 92, ASM_MACH3 1310 ------------------ <2> note: usesection ASMTABLE2 0 00007FA6 FF endvariant 1311 ------------------ <2> note: usesection ASMTABLE2 1312 <2> mne SETB ; ofs=7A3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082E5 7473 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082E7 53455442 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FA7 F7D2C8 variant 192h, 92, ASM_MACH3 1313 ------------------ <2> note: usesection ASMTABLE2 0 00007FAA FF endvariant 1314 ------------------ <2> note: usesection ASMTABLE2 1315 <2> mne SETBE ; ofs=7A7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082EB B573 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082ED 5345544245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FAB F7D4E0 variant 196h, 92, ASM_MACH3 1316 ------------------ <2> note: usesection ASMTABLE2 0 00007FAE FF endvariant 1317 ------------------ <2> note: usesection ASMTABLE2 1318 <2> mne SETC ; ofs=7ABh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082F2 F473 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082F4 53455443 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FAF F7D2C8 variant 192h, 92, ASM_MACH3 1319 ------------------ <2> note: usesection ASMTABLE2 0 00007FB2 FF endvariant 1320 ------------------ <2> note: usesection ASMTABLE2 1321 <2> mne SETE ; ofs=7AFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082F8 3474 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000082FA 53455445 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FB3 F7D3D4 variant 194h, 92, ASM_MACH3 1322 ------------------ <2> note: usesection ASMTABLE2 0 00007FB6 FF endvariant 1323 ------------------ <2> note: usesection ASMTABLE2 1324 <2> mne SETG ; ofs=7B3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082FE 7474 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008300 53455447 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FB7 F7D996 variant 19Fh, 92, ASM_MACH3 1325 ------------------ <2> note: usesection ASMTABLE2 0 00007FBA FF endvariant 1326 ------------------ <2> note: usesection ASMTABLE2 1327 <2> mne SETGE ; ofs=7B7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008304 B574 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008306 5345544745 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FBB F7D88A variant 19Dh, 92, ASM_MACH3 1328 ------------------ <2> note: usesection ASMTABLE2 0 00007FBE FF endvariant 1329 ------------------ <2> note: usesection ASMTABLE2 1330 <2> mne SETL ; ofs=7BBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000830B F474 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000830D 5345544C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FBF F7D804 variant 19Ch, 92, ASM_MACH3 1331 ------------------ <2> note: usesection ASMTABLE2 0 00007FC2 FF endvariant 1332 ------------------ <2> note: usesection ASMTABLE2 1333 <2> mne SETLE ; ofs=7BFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008311 3575 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008313 5345544C45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FC3 F7D910 variant 19Eh, 92, ASM_MACH3 1334 ------------------ <2> note: usesection ASMTABLE2 0 00007FC6 FF endvariant 1335 ------------------ <2> note: usesection ASMTABLE2 1336 <2> mne SETNA ; ofs=7C3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008318 7575 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000831A 5345544E41 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FC7 F7D4E0 variant 196h, 92, ASM_MACH3 1337 ------------------ <2> note: usesection ASMTABLE2 0 00007FCA FF endvariant 1338 ------------------ <2> note: usesection ASMTABLE2 1339 <2> mne SETNAE ; ofs=7C7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000831F B675 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008321 5345544E4145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FCB F7D2C8 variant 192h, 92, ASM_MACH3 1340 ------------------ <2> note: usesection ASMTABLE2 0 00007FCE FF endvariant 1341 ------------------ <2> note: usesection ASMTABLE2 1342 <2> mne SETNB ; ofs=7CBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008327 F575 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008329 5345544E42 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FCF F7D34E variant 193h, 92, ASM_MACH3 1343 ------------------ <2> note: usesection ASMTABLE2 0 00007FD2 FF endvariant 1344 ------------------ <2> note: usesection ASMTABLE2 1345 <2> mne SETNBE ; ofs=7CFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000832E 3676 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008330 5345544E4245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FD3 F7D566 variant 197h, 92, ASM_MACH3 1346 ------------------ <2> note: usesection ASMTABLE2 0 00007FD6 FF endvariant 1347 ------------------ <2> note: usesection ASMTABLE2 1348 <2> mne SETNC ; ofs=7D3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008336 7576 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008338 5345544E43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FD7 F7D34E variant 193h, 92, ASM_MACH3 1349 ------------------ <2> note: usesection ASMTABLE2 0 00007FDA FF endvariant 1350 ------------------ <2> note: usesection ASMTABLE2 1351 <2> mne SETNE ; ofs=7D7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000833D B576 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000833F 5345544E45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FDB F7D45A variant 195h, 92, ASM_MACH3 1352 ------------------ <2> note: usesection ASMTABLE2 0 00007FDE FF endvariant 1353 ------------------ <2> note: usesection ASMTABLE2 1354 <2> mne SETNG ; ofs=7DBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008344 F576 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008346 5345544E47 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FDF F7D910 variant 19Eh, 92, ASM_MACH3 1355 ------------------ <2> note: usesection ASMTABLE2 0 00007FE2 FF endvariant 1356 ------------------ <2> note: usesection ASMTABLE2 1357 <2> mne SETNGE ; ofs=7DFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000834B 3677 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000834D 5345544E4745 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FE3 F7D804 variant 19Ch, 92, ASM_MACH3 1358 ------------------ <2> note: usesection ASMTABLE2 0 00007FE6 FF endvariant 1359 ------------------ <2> note: usesection ASMTABLE2 1360 <2> mne SETNL ; ofs=7E3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008353 7577 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008355 5345544E4C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FE7 F7D88A variant 19Dh, 92, ASM_MACH3 1361 ------------------ <2> note: usesection ASMTABLE2 0 00007FEA FF endvariant 1362 ------------------ <2> note: usesection ASMTABLE2 1363 <2> mne SETNLE ; ofs=7E7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000835A B677 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000835C 5345544E4C45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FEB F7D996 variant 19Fh, 92, ASM_MACH3 1364 ------------------ <2> note: usesection ASMTABLE2 0 00007FEE FF endvariant 1365 ------------------ <2> note: usesection ASMTABLE2 1366 <2> mne SETNO ; ofs=7EBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008362 F577 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008364 5345544E4F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FEF F7D242 variant 191h, 92, ASM_MACH3 1367 ------------------ <2> note: usesection ASMTABLE2 0 00007FF2 FF endvariant 1368 ------------------ <2> note: usesection ASMTABLE2 1369 <2> mne SETNP ; ofs=7EFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008369 3578 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000836B 5345544E50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FF3 F7D77E variant 19Bh, 92, ASM_MACH3 1370 ------------------ <2> note: usesection ASMTABLE2 0 00007FF6 FF endvariant 1371 ------------------ <2> note: usesection ASMTABLE2 1372 <2> mne SETNS ; ofs=7F3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008370 7578 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008372 5345544E53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FF7 F7D672 variant 199h, 92, ASM_MACH3 1373 ------------------ <2> note: usesection ASMTABLE2 0 00007FFA FF endvariant 1374 ------------------ <2> note: usesection ASMTABLE2 1375 <2> mne SETNZ ; ofs=7F7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008377 B578 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008379 5345544E5A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FFB F7D45A variant 195h, 92, ASM_MACH3 1376 ------------------ <2> note: usesection ASMTABLE2 0 00007FFE FF endvariant 1377 ------------------ <2> note: usesection ASMTABLE2 1378 <2> mne SETO ; ofs=7FBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000837E F478 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008380 5345544F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FFF F7D1BC variant 190h, 92, ASM_MACH3 1379 ------------------ <2> note: usesection ASMTABLE2 0 00008002 FF endvariant 1380 ------------------ <2> note: usesection ASMTABLE2 1381 <2> mne SETP ; ofs=7FFh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008384 3479 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008386 53455450 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008003 F7D6F8 variant 19Ah, 92, ASM_MACH3 1382 ------------------ <2> note: usesection ASMTABLE2 0 00008006 FF endvariant 1383 ------------------ <2> note: usesection ASMTABLE2 1384 <2> mne SETPE ; ofs=803h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000838A 7579 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000838C 5345545045 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008007 F7D6F8 variant 19Ah, 92, ASM_MACH3 1385 ------------------ <2> note: usesection ASMTABLE2 0 0000800A FF endvariant 1386 ------------------ <2> note: usesection ASMTABLE2 1387 <2> mne SETPO ; ofs=807h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008391 B579 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008393 534554504F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000800B F7D77E variant 19Bh, 92, ASM_MACH3 1388 ------------------ <2> note: usesection ASMTABLE2 0 0000800E FF endvariant 1389 ------------------ <2> note: usesection ASMTABLE2 1390 <2> mne SETS ; ofs=80Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008398 F479 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000839A 53455453 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000800F F7D5EC variant 198h, 92, ASM_MACH3 1391 ------------------ <2> note: usesection ASMTABLE2 0 00008012 FF endvariant 1392 ------------------ <2> note: usesection ASMTABLE2 1393 <2> mne SETZ ; ofs=80Fh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000839E 347A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083A0 5345545A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008013 F7D3D4 variant 194h, 92, ASM_MACH3 1394 ------------------ <2> note: usesection ASMTABLE2 0 00008016 FF endvariant 1395 ------------------ <2> note: usesection ASMTABLE2 1396 <2> mne SGDT ; ofs=813h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083A4 747A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083A6 53474454 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008017 F6F45709 variant AGRP(7,0), 57, ASM_MACH2 1397 ------------------ <2> note: usesection ASMTABLE2 0 0000801B FF endvariant 1398 ------------------ <2> note: usesection ASMTABLE2 1399 <2> mne SIDT ; ofs=818h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083AA C47A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083AC 53494454 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000801C F6F4578F variant AGRP(7,1), 57, ASM_MACH2 1400 ------------------ <2> note: usesection ASMTABLE2 0 00008020 FF endvariant 1401 ------------------ <2> note: usesection ASMTABLE2 1402 <2> mne SHLD ; ofs=81Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083B0 147B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083B2 53484C44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008021 F7DC35 variant 1A4h, 93, ASM_MACH3 1403 ------------------ <2> note: usesection ASMTABLE2 0 00008024 F7DCBC variant 1A5h, 94, ASM_MACH3 1404 ------------------ <2> note: usesection ASMTABLE2 0 00008027 FF endvariant 1405 ------------------ <2> note: usesection ASMTABLE2 1406 <2> mne SHRD ; ofs=824h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083B6 847B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083B8 53485244 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008028 F7E065 variant 1ACh, 93, ASM_MACH3 1407 ------------------ <2> note: usesection ASMTABLE2 0 0000802B F7E0EC variant 1ADh, 94, ASM_MACH3 1408 ------------------ <2> note: usesection ASMTABLE2 0 0000802E FF endvariant 1409 ------------------ <2> note: usesection ASMTABLE2 1410 <2> mne SLDT ; ofs=82Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083BC F47B dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083BE 534C4454 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000802F F6F45B46 variant AGRP(8,0), 70, ASM_MACH2 1411 ------------------ <2> note: usesection ASMTABLE2 0 00008033 FF endvariant 1412 ------------------ <2> note: usesection ASMTABLE2 1413 <2> mne SMSW ; ofs=830h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083C2 447C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083C4 534D5357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008034 F6F4592E variant AGRP(7,4), 70, ASM_MACH2 1414 ------------------ <2> note: usesection ASMTABLE2 0 00008038 FF endvariant 1415 ------------------ <2> note: usesection ASMTABLE2 1416 <2> mne STC ; ofs=835h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083C8 937C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083CA 535443 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008039 8256 variant 0F9h, 0 1417 ------------------ <2> note: usesection ASMTABLE2 0 0000803B FF endvariant 1418 ------------------ <2> note: usesection ASMTABLE2 1419 <2> mne STD ; ofs=838h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083CD C37C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083CF 535444 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000803C 846E variant 0FDh, 0 1420 ------------------ <2> note: usesection ASMTABLE2 0 0000803E FF endvariant 1421 ------------------ <2> note: usesection ASMTABLE2 1422 <2> mne STI ; ofs=83Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083D2 F37C dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083D4 535449 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000803F 8362 variant 0FBh, 0 1423 ------------------ <2> note: usesection ASMTABLE2 0 00008041 FF endvariant 1424 ------------------ <2> note: usesection ASMTABLE2 1425 <2> mne STOSB ; ofs=83Eh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083D7 257D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083D9 53544F5342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008042 58FC variant 0AAh, 0 1426 ------------------ <2> note: usesection ASMTABLE2 0 00008044 FF endvariant 1427 ------------------ <2> note: usesection ASMTABLE2 1428 <2> mne STR ; ofs=844h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083DE 537D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083E0 535452 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008045 F6F45BCE variant AGRP(8,1), 72, ASM_MACH2 1429 ------------------ <2> note: usesection ASMTABLE2 0 00008049 FF endvariant 1430 ------------------ <2> note: usesection ASMTABLE2 1431 <2> mne SUB ; ofs=849h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083E3 A37D dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083E5 535542 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000804A FBF44053 variant AGRP(1,5), 5, ASM_LOCKABLE 1432 ------------------ <2> note: usesection ASMTABLE2 0 0000804E 1709 variant 02Ch, 1 1433 ------------------ <2> note: usesection ASMTABLE2 0 00008050 FBF44480 variant AGRP(2,5), 2, ASM_LOCKABLE 1434 ------------------ <2> note: usesection ASMTABLE2 0 00008054 FB14F7 variant 028h, 7, ASM_LOCKABLE 1435 ------------------ <2> note: usesection ASMTABLE2 0 00008057 1606 variant 02Ah, 10 1436 ------------------ <2> note: usesection ASMTABLE2 0 00008059 FF endvariant 1437 ------------------ <2> note: usesection ASMTABLE2 1438 <2> mne SALC ; ofs=859h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083E8 A47E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083EA 53414C43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000805A F67004 variant 0D6h, 0, ASM_MACH2 1439 ------------------ <2> note: usesection ASMTABLE2 0 0000805D FF endvariant 1440 ------------------ <2> note: usesection ASMTABLE2 1441 <2> mne SETALC ; ofs=85Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083EE E67E dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083F0 534554414C43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000805E F67004 variant 0D6h, 0, ASM_MACH2 1442 ------------------ <2> note: usesection ASMTABLE2 0 00008061 FF endvariant 1443 ------------------ <2> note: usesection ASMTABLE2 1444 <2> mne TEST ; ofs=861h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083F6 247F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083F8 54455354 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008062 57F1 variant 0A8h, 1 1445 ------------------ <2> note: usesection ASMTABLE2 0 00008064 F452A3 variant AGRP(6,0), 3 1446 ------------------ <2> note: usesection ASMTABLE2 0 00008067 4520 variant 084h, 8 1447 ------------------ <2> note: usesection ASMTABLE2 0 00008069 4522 variant 084h, 10 1448 ------------------ <2> note: usesection ASMTABLE2 0 0000806B FF endvariant 1449 ------------------ <2> note: usesection ASMTABLE2 1450 <2> mne UD0 ; ofs=86Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083FC C37F dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000083FE 554430 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000806C F5F4177A variant 1FFh, 0, ASM_MACH1 1451 ------------------ <2> note: usesection ASMTABLE2 0 00008070 FF endvariant 1452 ------------------ <2> note: usesection ASMTABLE2 1453 <2> mne UD1 ; ofs=870h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008401 1380 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008403 554431 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008071 F5E6D6 variant 1B9h, 0, ASM_MACH1 1454 ------------------ <2> note: usesection ASMTABLE2 0 00008074 FF endvariant 1455 ------------------ <2> note: usesection ASMTABLE2 1456 <2> mne UD2 ; ofs=874h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008406 5380 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008408 554432 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008075 F58BC2 variant 10Bh, 0, ASM_MACH1 1457 ------------------ <2> note: usesection ASMTABLE2 0 00008078 FF endvariant 1458 ------------------ <2> note: usesection ASMTABLE2 1459 <2> mne VERR ; ofs=878h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000840B 9480 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000840D 56455252 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008079 F6F45D5F variant AGRP(8,4), 71, ASM_MACH2 1460 ------------------ <2> note: usesection ASMTABLE2 0 0000807D FF endvariant 1461 ------------------ <2> note: usesection ASMTABLE2 1462 <2> mne VERW ; ofs=87Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008411 E480 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008413 56455257 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000807E F6F45DE5 variant AGRP(8,5), 71, ASM_MACH2 1463 ------------------ <2> note: usesection ASMTABLE2 0 00008082 FF endvariant 1464 ------------------ <2> note: usesection ASMTABLE2 1465 <2> mne WAIT ; ofs=882h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008417 3481 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008419 57414954 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008083 5122 variant 09Bh, 0 1466 ------------------ <2> note: usesection ASMTABLE2 0 00008085 FF endvariant 1467 ------------------ <2> note: usesection ASMTABLE2 1468 <2> mne WBINVD ; ofs=885h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000841D 6681 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000841F 5742494E5644 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008086 F88AB6 variant 109h, 0, ASM_MACH4 1469 ------------------ <2> note: usesection ASMTABLE2 0 00008089 FF endvariant 1470 ------------------ <2> note: usesection ASMTABLE2 1471 <2> mne WRMSR ; ofs=889h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008425 A581 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008427 57524D5352 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000808A F99F20 variant 130h, 0, ASM_MACH5 1472 ------------------ <2> note: usesection ASMTABLE2 0 0000808D FF endvariant 1473 ------------------ <2> note: usesection ASMTABLE2 1474 <2> mne XADD ; ofs=88Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000842C E481 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000842E 58414444 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000808E FBF8EA87 variant 1C0h, 7, ASM_LOCKABLE, ASM_MACH4 1475 ------------------ <2> note: usesection ASMTABLE2 0 00008092 FF endvariant 1476 ------------------ <2> note: usesection ASMTABLE2 1477 <2> mne XCHG ; ofs=892h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008432 3482 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008434 58434847 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008093 4BBF variant 090h, 95 1478 ------------------ <2> note: usesection ASMTABLE2 0 00008095 4BC0 variant 090h, 96 1479 ------------------ <2> note: usesection ASMTABLE2 0 00008097 FB4630 variant 086h, 12, ASM_LOCKABLE 1480 ------------------ <2> note: usesection ASMTABLE2 0 0000809A FB462B variant 086h, 7, ASM_LOCKABLE 1481 ------------------ <2> note: usesection ASMTABLE2 0 0000809D FF endvariant 1482 ------------------ <2> note: usesection ASMTABLE2 1483 <2> mne XLAT ; ofs=89Dh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008438 E482 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000843A 584C4154 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000809E 708A variant 0D7h, 0 1484 ------------------ <2> note: usesection ASMTABLE2 0 000080A0 FF endvariant 1485 ------------------ <2> note: usesection ASMTABLE2 1486 <2> mne XLATB ; ofs=8A0h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000843E 1583 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008440 584C415442 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080A1 708A variant 0D7h, 0 1487 ------------------ <2> note: usesection ASMTABLE2 0 000080A3 FF endvariant 1488 ------------------ <2> note: usesection ASMTABLE2 1489 <2> mne XOR ; ofs=8A3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008445 4383 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008447 584F52 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080A4 FBF440D9 variant AGRP(1,6), 5, ASM_LOCKABLE 1490 ------------------ <2> note: usesection ASMTABLE2 0 000080A8 1B39 variant 034h, 1 1491 ------------------ <2> note: usesection ASMTABLE2 0 000080AA FBF44506 variant AGRP(2,6), 2, ASM_LOCKABLE 1492 ------------------ <2> note: usesection ASMTABLE2 0 000080AE FB1927 variant 030h, 7, ASM_LOCKABLE 1493 ------------------ <2> note: usesection ASMTABLE2 0 000080B1 1A36 variant 032h, 10 1494 ------------------ <2> note: usesection ASMTABLE2 0 000080B3 FF endvariant 1495 ------------------ <2> note: usesection ASMTABLE2 1496 <2> 1497 <2> ; The following mnemonics allow an address size suffix 1498 <2> ; but do not require it. 1499 <2> 1500 <2> mnlist_a_suffix_allowed label near 1501 <2> mnsuffix _ASA 1502 <2> 1503 <2> mne LOOP ; ofs=512h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000844A 4484 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000844C 4C4F4F50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080B4 7690 variant 0E2h, 68 1504 ------------------ <2> note: usesection ASMTABLE2 0 000080B6 FF endvariant 1505 ------------------ <2> note: usesection ASMTABLE2 1506 <2> mne LOOPZ ; ofs=515h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008450 7584 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008452 4C4F4F505A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080B7 760A variant 0E1h, 68 1507 ------------------ <2> note: usesection ASMTABLE2 0 000080B9 FF endvariant 1508 ------------------ <2> note: usesection ASMTABLE2 1509 <2> mne LOOPE ; ofs=518h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008457 A584 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008459 4C4F4F5045 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080BA 760A variant 0E1h, 68 1510 ------------------ <2> note: usesection ASMTABLE2 0 000080BC FF endvariant 1511 ------------------ <2> note: usesection ASMTABLE2 1512 <2> mne LOOPNZ ; ofs=51Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000845E D684 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008460 4C4F4F504E5A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080BD 7584 variant 0E0h, 68 1513 ------------------ <2> note: usesection ASMTABLE2 0 000080BF FF endvariant 1514 ------------------ <2> note: usesection ASMTABLE2 1515 <2> mne LOOPNE ; ofs=51Eh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008466 0685 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008468 4C4F4F504E45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080C0 7584 variant 0E0h, 68 1516 ------------------ <2> note: usesection ASMTABLE2 0 000080C2 FF endvariant 1517 ------------------ <2> note: usesection ASMTABLE2 1518 <2> 1519 <2> ; The following mnemonics allow an operand size suffix 1520 <2> ; but do not require it. 1521 <2> 1522 <2> mnlist_o_suffix_allowed label near 1523 <2> mnsuffix _OSA 1524 <2> 1525 <2> mne ENTER ; ofs=160h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000846E 3585 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008470 454E544552 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080C3 F568D7 variant 0C8h, 39, ASM_MACH1 1526 ------------------ <2> note: usesection ASMTABLE2 0 000080C6 FF endvariant 1527 ------------------ <2> note: usesection ASMTABLE2 1528 <2> mne FLDENV ; ofs=2BBh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008475 7685 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008477 464C44454E56 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080C7 F4297D variant 221h, 55 1529 ------------------ <2> note: usesection ASMTABLE2 0 000080CA FF endvariant 1530 ------------------ <2> note: usesection ASMTABLE2 1531 <2> mne FRSTOR ; ofs=2F3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000847D B685 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000847F 465253544F52 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080CB F42B95 variant 225h, 55 1532 ------------------ <2> note: usesection ASMTABLE2 0 000080CE FF endvariant 1533 ------------------ <2> note: usesection ASMTABLE2 1534 <2> mne FSAVE, ASM_WAIT ; ofs=2F7h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000080CF FE db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008485 F585 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008487 4653415645 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 1535 <2> mne FNSAVE ; ofs=2F8h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000848C 0686 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000848E 464E53415645 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080D0 F433F7 variant 235h, 57 1536 ------------------ <2> note: usesection ASMTABLE2 0 000080D3 FF endvariant 1537 ------------------ <2> note: usesection ASMTABLE2 1538 <2> mne FSTENV, ASM_WAIT ; ofs=330h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000080D4 FE db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008494 4686 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008496 465354454E56 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 1539 <2> mne FNSTENV ; ofs=331h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000849C 5786 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 0000849E 464E5354454E56 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080D5 F431DF variant 231h, 57 1540 ------------------ <2> note: usesection ASMTABLE2 0 000080D8 FF endvariant 1541 ------------------ <2> note: usesection ASMTABLE2 1542 <2> mne IRET ; ofs=40Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084A5 9486 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000084A7 49524554 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080D9 6CDF variant 0CFh, 133 1543 ------------------ <2> note: usesection ASMTABLE2 0 000080DB FF endvariant 1544 ------------------ <2> note: usesection ASMTABLE2 1545 <2> mne LEAVE ; ofs=4F2h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084AB C586 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000084AD 4C45415645 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080DC F569BB variant 0C9h, 133, ASM_MACH1 1546 ------------------ <2> note: usesection ASMTABLE2 0 000080DF FF endvariant 1547 ------------------ <2> note: usesection ASMTABLE2 1548 <2> mne POPA ; ofs=6B9h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084B2 0487 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000084B4 504F5041 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080E0 F5334B variant 061h, 133, ASM_MACH1 1549 ------------------ <2> note: usesection ASMTABLE2 0 000080E3 FF endvariant 1550 ------------------ <2> note: usesection ASMTABLE2 1551 <2> mne POPF ; ofs=6BDh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084B8 4487 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000084BA 504F5046 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080E4 52B1 variant 09Dh, 131 1552 ------------------ <2> note: usesection ASMTABLE2 0 000080E6 FF endvariant 1553 ------------------ <2> note: usesection ASMTABLE2 1554 <2> mne PUSH ; ofs=6DAh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084BE 7487 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000084C0 50555348 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080E7 F537D1 variant 06Ah, 85, ASM_MACH1 1555 ------------------ <2> note: usesection ASMTABLE2 0 000080EA F536C4 variant 068h, 84, ASM_MACH1 1556 ------------------ <2> note: usesection ASMTABLE2 0 000080ED FF endvariant 1557 ------------------ <2> note: usesection ASMTABLE2 1558 <2> mne PUSHA ; ofs=6E1h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084C4 E587 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000084C6 5055534841 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080EE F532C5 variant 060h, 133, ASM_MACH1 1559 ------------------ <2> note: usesection ASMTABLE2 0 000080F1 FF endvariant 1560 ------------------ <2> note: usesection ASMTABLE2 1561 <2> mne PUSHF ; ofs=6E5h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084CB 2588 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000084CD 5055534846 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080F2 522C variant 09Ch, 132 1562 ------------------ <2> note: usesection ASMTABLE2 0 000080F4 FF endvariant 1563 ------------------ <2> note: usesection ASMTABLE2 1564 <2> mne RETN ; ofs=726h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084D2 5488 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000084D4 5245544E db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080F5 6695 variant 0C3h, 131 1565 ------------------ <2> note: usesection ASMTABLE2 0 000080F7 65E5 variant 0C2h, 89 1566 ------------------ <2> note: usesection ASMTABLE2 0 000080F9 FF endvariant 1567 ------------------ <2> note: usesection ASMTABLE2 1568 <2> mne RET ; ofs=72Bh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084D8 A388 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000084DA 524554 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080FA 6695 variant 0C3h, 131 1569 ------------------ <2> note: usesection ASMTABLE2 0 000080FC 65E5 variant 0C2h, 89 1570 ------------------ <2> note: usesection ASMTABLE2 0 000080FE FF endvariant 1571 ------------------ <2> note: usesection ASMTABLE2 1572 <2> mne RETF ; ofs=730h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084DD F488 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000084DF 52455446 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080FF 6AC7 variant 0CBh, 133 1573 ------------------ <2> note: usesection ASMTABLE2 0 00008101 6A17 variant 0CAh, 91 1574 ------------------ <2> note: usesection ASMTABLE2 0 00008103 FF endvariant 1575 ------------------ <2> note: usesection ASMTABLE2 1576 <2> 1577 <2> ; The following mnemonics require an operand size suffix. 1578 <2> 1579 <2> mnlist_o_suffix_required label near 1580 <2> mnsuffix _OSR 1581 <2> 1582 <2> mne CMPS ; ofs=12Fh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084E3 4489 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000084E5 434D5053 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008104 576A variant 0A7h, 0 1583 ------------------ <2> note: usesection ASMTABLE2 0 00008106 FF endvariant 1584 ------------------ <2> note: usesection ASMTABLE2 1585 <2> mne INS ; ofs=3E4h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084E9 7389 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000084EB 494E53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008107 F5390E variant 06Dh, 0, ASM_MACH1 1586 ------------------ <2> note: usesection ASMTABLE2 0 0000810A FF endvariant 1587 ------------------ <2> note: usesection ASMTABLE2 1588 <2> mne LODS ; ofs=50Fh 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084EE B489 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000084F0 4C4F4453 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000810B 5A8E variant 0ADh, 0 1589 ------------------ <2> note: usesection ASMTABLE2 0 0000810D FF endvariant 1590 ------------------ <2> note: usesection ASMTABLE2 1591 <2> mne MOVS ; ofs=666h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084F4 E489 dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000084F6 4D4F5653 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000810E 565E variant 0A5h, 0 1592 ------------------ <2> note: usesection ASMTABLE2 0 00008110 FF endvariant 1593 ------------------ <2> note: usesection ASMTABLE2 1594 <2> mne OUTS ; ofs=6A3h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084FA 148A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 000084FC 4F555453 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008111 F53A1A variant 06Fh, 0, ASM_MACH1 1595 ------------------ <2> note: usesection ASMTABLE2 0 00008114 FF endvariant 1596 ------------------ <2> note: usesection ASMTABLE2 1597 <2> mne SCAS ; ofs=798h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008500 548A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008502 53434153 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008115 5B9A variant 0AFh, 0 1598 ------------------ <2> note: usesection ASMTABLE2 0 00008117 FF endvariant 1599 ------------------ <2> note: usesection ASMTABLE2 1600 <2> mne STOS ; ofs=841h 87 <3> %push 88 <3> usesection ASMTABLE2, 1 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> __SECT__ 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008506 848A dw (%$currofs)<<4|%$string_size 100 <3> %if _LINK 101 <3> MN_%1%[MNSUFFIX] equ $ - mnlist 102 <3> %endif 103 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 0 00008508 53544F53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008118 5982 variant 0ABh, 0 1601 ------------------ <2> note: usesection ASMTABLE2 0 0000811A FF endvariant 1602 ------------------ <2> note: usesection ASMTABLE2 1603 <2> 1604 <2> end_mnlist label near 1605 <2> 1606 <2> ;--- Disassembler: compressed table of the opcode types. 1607 <2> ;--- If the item has the format OT(xx), it refers to table 'oplists'. 1608 <2> ;--- Otherwise it's an offset for internal table 'disjmp'. 1609 <2> 0 0000850C 00 align 8, db 0 1611 <2> optypes label byte 0 00008510 131316160D0D6D79 db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(61),OT(6D) ; 00 - 07 (main opcode part) 0 00008518 131316160D0D6F02 db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(63), 002h ; 08 - 0F 0 00008520 131316160D0D717A db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(65),OT(6E) ; 10 - 17 0 00008528 131316160D0D737B db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(67),OT(6F) ; 18 - 1F 0 00008530 131316160D0D0A0C db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 20 - 27 0 00008538 131316160D0D0A0C db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 28 - 2F 0 00008540 131316160D0D0A0C db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 30 - 37 0 00008548 141416160D0D0A0C db OT(08),OT(08),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 38 - 3F 0 00008550 3131313131313131 db OT(25),OT(25),OT(25),OT(25),OT(25),OT(25),OT(25),OT(25) ; 40 - 47 0 00008558 3131313131313131 db OT(25),OT(25),OT(25),OT(25),OT(25),OT(25),OT(25),OT(25) ; 48 - 4F 0 00008560 3030303030303030 db OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24) ; 50 - 57 0 00008568 3232323232323232 db OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26) ; 58 - 5F 0 00008570 91918C190A0A0A0A db OT(85),OT(85),OT(80),OT(0D), 00Ah, 00Ah, 00Ah, 00Ah ; 60 - 67 0 00008578 604961470C0C0C0C db OT(54),OT(3D),OT(55),OT(3B),OT(00),OT(00),OT(00),OT(00) ; 68 - 6F 0 00008580 5050505050505050 db OT(44),OT(44),OT(44),OT(44),OT(44),OT(44),OT(44),OT(44) ; 70 - 77 0 00008588 5050505050505050 db OT(44),OT(44),OT(44),OT(44),OT(44),OT(44),OT(44),OT(44) ; 78 - 7F 0 00008590 0404040414141818 db 004h, 004h, 004h, 004h,OT(08),OT(08),OT(0C),OT(0C) ; 80 - 87 0 00008598 1515171755895604 db OT(09),OT(09),OT(0B),OT(0B),OT(49),OT(7D),OT(4A), 004h ; 88 - 8F 0 000085A0 0C6B6B6B6B6B6B6B db OT(00),OT(5F),OT(5F),OT(5F),OT(5F),OT(5F),OT(5F),OT(5F) ; 90 - 97 0 000085A8 0C0C240C908F0C0C db OT(00),OT(00),OT(18),OT(00),OT(84),OT(83),OT(00),OT(00) ; 98 - 9F 0 000085B0 575758580C0C0C0C db OT(4B),OT(4B),OT(4C),OT(4C),OT(00),OT(00),OT(00),OT(00) ; A0 - A7 0 000085B8 0D0D0C0C0C0C0C0C db OT(01),OT(01),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; A8 - AF 0 000085C0 5959595959595959 db OT(4D),OT(4D),OT(4D),OT(4D),OT(4D),OT(4D),OT(4D),OT(4D) ; B0 - B7 0 000085C8 5A5A5A5A5A5A5A5A db OT(4E),OT(4E),OT(4E),OT(4E),OT(4E),OT(4E),OT(4E),OT(4E) ; B8 - BF 0 000085D0 0404658F1A1A0404 db 004h, 004h,OT(59),OT(83),OT(0E),OT(0E), 004h, 004h ; C0 - C7 0 000085D8 33916791918D9191 db OT(27),OT(85),OT(5B),OT(85),OT(85),OT(81),OT(85),OT(85) ; C8 - CF 0 000085E0 040404044E4E0C0C db 004h, 004h, 004h, 004h,OT(42),OT(42),OT(00),OT(00) ; D0 - D7 0 000085E8 0606060606060606 db 006h, 006h, 006h, 006h, 006h, 006h, 006h, 006h ; D8 - DF 0 000085F0 4F4F4F504B4B5D5D db OT(43),OT(43),OT(43),OT(44),OT(3F),OT(3F),OT(51),OT(51) ; E0 - E7 0 000085F8 222325504C4C5E5E db OT(16),OT(17),OT(19),OT(44),OT(40),OT(40),OT(52),OT(52) ; E8 - EF 0 00008600 0A910A0A0C0C0404 db 00Ah,OT(85), 00Ah, 00Ah,OT(00),OT(00), 004h, 004h ; F0 - F7 0 00008608 0C0C0C0C0C0C0404 db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 004h, 004h ; F8 - FF 0 00008610 0E0E0E0E0E0E0E0F db OT(02),OT(02),OT(02),OT(02),OT(02),OT(02),OT(02),OT(03) ; 100 - 107 (Intel group 1) 0 00008618 1111111111111112 db OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(06) ; 108 - 10F 0 00008620 6262626262626262 db OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56) ; 110 - 117 (Intel group 2) 0 00008628 6363636363636363 db OT(57),OT(57),OT(57),OT(57),OT(57),OT(57),OT(57),OT(57) ; 118 - 11F 0 00008630 6464646464646464 db OT(58),OT(58),OT(58),OT(58),OT(58),OT(58),OT(58),OT(58) ; 120 - 127 (Intel group 2a) 0 00008638 0F0F2E2E2F2F2F2F db OT(03),OT(03),OT(22),OT(22),OT(23),OT(23),OT(23),OT(23) ; 128 - 12F (Intel group 3) 0 00008640 2D2D8A288B295100 db OT(21),OT(21),OT(7E),OT(1C),OT(7F),OT(1D),OT(45), 000h ; 130 - 137 (Intel group 5) 0 00008648 5254535353530000 db OT(46),OT(48),OT(47),OT(47),OT(47),OT(47), 000h, 000h ; 138 - 13F (Intel group 6) 0 00008650 4545434352005344 db OT(39),OT(39),OT(37),OT(37),OT(46), 000h,OT(47),OT(38) ; 140 - 147 (Intel group 7) 0 00008658 3434343434343434 db OT(28),OT(28),OT(28),OT(28),OT(28),OT(28),OT(28),OT(28) ; 148 - 14F (Coprocessor d8) 0 00008660 3838424238383838 db OT(2C),OT(2C),OT(36),OT(36),OT(2C),OT(2C),OT(2C),OT(2C) ; 150 - 157 0 00008668 34003535433E453F db OT(28), 000h,OT(29),OT(29),OT(37),OT(32),OT(39),OT(33) ; 158 - 15F (Coprocessor d9) 0 00008670 3942080008080808 db OT(2D),OT(36), 008h, 000h, 008h, 008h, 008h, 008h ; 160 - 167 0 00008678 3C3C3C3C3C3C3C3C db OT(30),OT(30),OT(30),OT(30),OT(30),OT(30),OT(30),OT(30) ; 168 - 16F (Coprocessor da) 0 00008680 3838383800080000 db OT(2C),OT(2C),OT(2C),OT(2C), 000h, 008h, 000h, 000h ; 170 - 177 0 00008688 3C003D3D00400041 db OT(30), 000h,OT(31),OT(31), 000h,OT(34), 000h,OT(35) ; 178 - 17F (Coprocessor db) 0 00008690 3838383808424200 db OT(2C),OT(2C),OT(2C),OT(2C), 008h,OT(36),OT(36), 000h ; 180 - 187 0 00008698 3636363636363636 db OT(2A),OT(2A),OT(2A),OT(2A),OT(2A),OT(2A),OT(2A),OT(2A) ; 188 - 18F (Coprocessor dc) 0 000086A0 3B3B00003B3B3B3B db OT(2F),OT(2F), 000h, 000h,OT(2F),OT(2F),OT(2F),OT(2F) ; 190 - 197 0 000086A8 360037374300453F db OT(2A), 000h,OT(2B),OT(2B),OT(37), 000h,OT(39),OT(33) ; 198 - 19F (Coprocessor dd) 0 000086B0 3900393942420000 db OT(2D), 000h,OT(2D),OT(2D),OT(36),OT(36), 000h, 000h ; 1A0 - 1A7 0 000086B8 3E3E3E3E3E3E3E3E db OT(32),OT(32),OT(32),OT(32),OT(32),OT(32),OT(32),OT(32) ; 1A8 - 1AF (Coprocessor de) 0 000086C0 3A3A00083A3A3A3A db OT(2E),OT(2E), 000h, 008h,OT(2E),OT(2E),OT(2E),OT(2E) ; 1B0 - 1B7 0 000086C8 3E003F3F402B412C db OT(32), 000h,OT(33),OT(33),OT(34),OT(1F),OT(35),OT(20) ; 1B8 - 1BF (Coprocessor df) 0 000086D0 0000000008424200 db 000h, 000h, 000h, 000h, 008h,OT(36),OT(36), 000h ; 1C0 - 1C7 0 000086D8 0C0C0C0C0C0C0C00 db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 000h ; 1C8 - 1CF (Coprocessor groups) 0 000086E0 0C0C0C0C0C0C0C0C db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; 1D0 - 1D7 0 000086E8 0C0C0C0C0C0C0C0C db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; 1D8 - 1DF 1672 <2> ;--- The rest of these are squeezed. 0 000086F0 0004041B1B0C0C0C db 0, 004h, 004h,OT(0F),OT(0F),OT(00),OT(00),OT(00) ; 00 0 000086F8 0C7E807F8182830C db OT(00),OT(72),OT(74),OT(73),OT(75),OT(76),OT(77),OT(00) ; 08 0 00008700 0C0C1B1B1B1B1B1B db OT(00),OT(00),OT(0F),OT(0F),OT(0F),OT(0F),OT(0F),OT(0F) ; 10 0 00008708 1B1B1B1B1B1B1B1B db OT(0F),OT(0F),OT(0F),OT(0F),OT(0F),OT(0F),OT(0F),OT(0F) ; 18 0 00008710 1B1B868686868686 db OT(0F),OT(0F),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A) ; 20 0 00008718 8686868686868486 db OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(78),OT(7A) ; 28 0 00008720 0404048686860C85 db 004h, 004h, 004h,OT(7A),OT(7A),OT(7A),OT(00),OT(79) ; 30 0 00008728 8723232323232323 db OT(7B),OT(17),OT(17),OT(17),OT(17),OT(17),OT(17),OT(17) ; 38 0 00008730 2323232323232323 db OT(17),OT(17),OT(17),OT(17),OT(17),OT(17),OT(17),OT(17) ; 40 0 00008738 2368686868686868 db OT(17),OT(5C),OT(5C),OT(5C),OT(5C),OT(5C),OT(5C),OT(5C) ; 48 0 00008740 6868686868686868 db OT(5C),OT(5C),OT(5C),OT(5C),OT(5C),OT(5C),OT(5C),OT(5C) ; 50 0 00008748 68757C0C1E696A77 db OT(5C),OT(69),OT(70),OT(00),OT(12),OT(5D),OT(5E),OT(6B) ; 58 0 00008750 7D0C1D696A1B1313 db OT(71),OT(00),OT(11),OT(5D),OT(5E),OT(0F),OT(07),OT(07) ; 60 0 00008758 1A1D1A1A5B5C0C04 db OT(0E),OT(11),OT(0E),OT(0E),OT(4F),OT(50),OT(00), 004h ; 68 0 00008760 1D1B1B5B5C131304 db OT(11),OT(0F),OT(0F),OT(4F),OT(50),OT(07),OT(07), 004h ; 70 0 00008768 1C1C1C1C1C1C1C1C db OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10) ; 78 0 00008770 8686868686868686 db OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A) ; 80 0 00008778 8686868686868686 db OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A) ; 88 0 00008780 8686868686868686 db OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A) ; 90 0 00008788 86868686860C2D2D db OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(00),OT(21),OT(21) ; 98 0 00008790 66211F1F1F2A5F10 db OT(5A),OT(15),OT(13),OT(13),OT(13),OT(1E),OT(53),OT(04) ; A0 0 00008798 8888888888888888 db OT(7C),OT(7C),OT(7C),OT(7C),OT(7C),OT(7C),OT(7C),OT(7C) ; A8 0 000087A0 0C0C0C0C0C0C0C0C db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; B0 0 000087A8 0C0C0C0C46 db OT(00),OT(00),OT(00),OT(00),OT(3A) 1697 <2> 1698 <2> P186 equ 1000h 1699 <2> P286 equ 2000h 1700 <2> P386 equ 3000h 1701 <2> P486 equ 4000h 1702 <2> P586 equ 5000h 1703 <2> P686 equ 6000h 1704 <2> 1705 <2> ;--- Disassembler: compressed table of additional information. 1706 <2> ;--- Bits 0-11 usually are the offset of the mnemonics table. 1707 <2> ;--- Bits 12-15 are the CPU which introduced this opcode. 1708 <2> 0 000087AD 00 align 2, db 0 1710 <2> opinfo label word 0 000087AE 3600360036003600 dw MN_ADD, MN_ADD, MN_ADD, MN_ADD ; 00 0 000087B6 36003600F507F007 dw MN_ADD, MN_ADD, MN_PUSH, MN_POP ; 04 0 000087BE DB07DB07DB07DB07 dw MN_OR, MN_OR, MN_OR, MN_OR ; 08 0 000087C6 DB07DB07F507E001 dw MN_OR, MN_OR, MN_PUSH, 01E0h ; 0C 0 000087CE 3100310031003100 dw MN_ADC, MN_ADC, MN_ADC, MN_ADC ; 10 0 000087D6 31003100F507F007 dw MN_ADC, MN_ADC, MN_PUSH, MN_POP ; 14 0 000087DE 7808780878087808 dw MN_SBB, MN_SBB, MN_SBB, MN_SBB ; 18 0 000087E6 78087808F507F007 dw MN_SBB, MN_SBB, MN_PUSH, MN_POP ; 1C 0 000087EE 3B003B003B003B00 dw MN_AND, MN_AND, MN_AND, MN_AND ; 20 0 000087F6 3B003B000100B701 dw MN_AND, MN_AND, 0001h, MN_DAA ; 24 0 000087FE 8F098F098F098F09 dw MN_SUB, MN_SUB, MN_SUB, MN_SUB ; 28 0 00008806 8F098F090101BC01 dw MN_SUB, MN_SUB, 0101h, MN_DAS ; 2C 0 0000880E F109F109F109F109 dw MN_XOR, MN_XOR, MN_XOR, MN_XOR ; 30 0 00008816 F109F10901021D00 dw MN_XOR, MN_XOR, 0201h, MN_AAA ; 34 0 0000881E 8601860186018601 dw MN_CMP, MN_CMP, MN_CMP, MN_CMP ; 38 0 00008826 8601860101032C00 dw MN_CMP, MN_CMP, 0301h, MN_AAS ; 3C 0 0000882E D104D104D104D104 dw MN_INC, MN_INC, MN_INC, MN_INC ; 40 0 00008836 D104D104D104D104 dw MN_INC, MN_INC, MN_INC, MN_INC ; 44 0 0000883E C901C901C901C901 dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 48 0 00008846 C901C901C901C901 dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 4C 0 0000884E F507F507F507F507 dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 50 0 00008856 F507F507F507F507 dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 54 0 0000885E F007F007F007F007 dw MN_POP, MN_POP, MN_POP, MN_POP ; 58 0 00008866 F007F007F007F007 dw MN_POP, MN_POP, MN_POP, MN_POP ; 5C 0 0000886E 701A5E1A46104020 dw P186 + MN_PUSHA_OSA, P186 + MN_POPA_OSA, P186 + MN_BOUND, P286 + MN_ARPL ; 60 0 00008876 0134013510302030 dw P386 + 0401h, P386 + 0501h, P386 + 0010h, P386 + 0020h ; 64 0 0000887E 6A1AC7146A1AC714 dw P186 + MN_PUSH_OSA, P186 + MN_IMUL, P186 + MN_PUSH_OSA, P186 + MN_IMUL ; 68 0 00008886 D614951AE917A61A dw P186 + MN_INSB, P186 + MN_INS_OSR, P186 + MN_OUTSB, P186 + MN_OUTS_OSR ; 6C 0 0000888E 990585051F051A05 dw MN_JO, MN_JNO, MN_JB, MN_JAE ; 70 0 00008896 AF05940523051605 dw MN_JZ, MN_JNZ, MN_JBE, MN_JA ; 74 0 0000889E AB058F05A105A605 dw MN_JS, MN_JNS, MN_JPE, MN_JPO ; 78 0 000088A6 460541054A053D05 dw MN_JL, MN_JGE, MN_JLE, MN_JG ; 7C 0 000088AE 0001000100010801 dw 0100h, 0100h, 0100h, 0108h ; 80 0 000088B6 A209A209DE09DE09 dw MN_TEST, MN_TEST, MN_XCHG, MN_XCHG ; 84 0 000088BE 3406340634063406 dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; 88 0 000088C6 3406DC053406F802 dw MN_MOV, MN_LEA, MN_MOV, 02F8h ; 8C 0 000088CE D107DE09DE09DE09 dw MN_NOP, MN_XCHG, MN_XCHG, MN_XCHG ; 90 0 000088D6 DE09DE09DE09DE09 dw MN_XCHG, MN_XCHG, MN_XCHG, MN_XCHG ; 94 0 000088DE 7700AD017100C309 dw MN_CBW, MN_CWD, MN_CALL, MN_WAIT ; 98 0 000088E6 770A640A4108B805 dw MN_PUSHF_OSA, MN_POPF_OSA, MN_SAHF, MN_LAHF ; 9C 0 000088EE 3406340634063406 dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; A0 0 000088F6 B207A00A8B018F0A dw MN_MOVSB, MN_MOVS_OSR, MN_CMPSB, MN_CMPS_OSR ; A4 0 000088FE A209A2098309B20A dw MN_TEST, MN_TEST, MN_STOSB, MN_STOS_OSR ; A8 0 00008906 FF059A0A7D08AC0A dw MN_LODSB, MN_LODS_OSR, MN_SCASB, MN_SCAS_OSR ; AC 0 0000890E 3406340634063406 dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B0 0 00008916 3406340634063406 dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B4 0 0000891E 3406340634063406 dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B8 0 00008926 3406340634063406 dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; BC 0 0000892E 200120017E0A7E0A dw 0120h, 0120h, MN_RETN_OSA, MN_RETN_OSA ; C0 0 00008936 CD05C30500030003 dw MN_LES, MN_LDS, 0300h, 0300h ; C4 0 0000893E 1A1A571A890A890A dw P186 + MN_ENTER_OSA, P186 + MN_LEAVE_OSA, MN_RETF_OSA, MN_RETF_OSA ; C8 0 00008946 F504DC040205510A dw MN_INT3, MN_INT, MN_INTO, MN_IRET_OSA ; CC 0 0000894E 1001100118011801 dw 0110h, 0110h, 0118h, 0118h ; D0 0 00008956 270022009A29EA09 dw MN_AAM, MN_AAD, P286 + MN_SETALC, MN_XLATB ; D4 0 0000895E 4801580168017801 dw 0148h, 0158h, 0168h, 0178h ; D8 0 00008966 88019801A801B801 dw 0188h, 0198h, 01A8h, 01B8h ; DC 0 0000896E 0A0AFC09F6092C05 dw MN_LOOPNZ_ASA, MN_LOOPZ_ASA, MN_LOOP_ASA, MN_JCXZ ; E0 0 00008976 CD04CD04E407E407 dw MN_IN, MN_IN, MN_OUT, MN_OUT ; E4 0 0000897E 7100B305B305B305 dw MN_CALL, MN_JMP, MN_JMP, MN_JMP ; E8 0 00008986 CD04CD04E407E407 dw MN_IN, MN_IN, MN_OUT, MN_OUT ; EC 0 0000898E 0800E16402000600 dw 0008h, P686 + MN_INT1, 0002h, 0006h ; F0 0 00008996 BC04970028012801 dw MN_HLT, MN_CMC, 0128h, 0128h ; F4 0 0000899E 820074098C007E09 dw MN_CLC, MN_STC, MN_CLI, MN_STI ; F8 0 000089A6 87007909E0023001 dw MN_CLD, MN_STD, 02E0h, 0130h ; FC 0 000089AE 3600DB0731007808 dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 100 0 000089B6 3B008F09F1098601 dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 104 0 000089BE 3600DB0731007808 dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 108 0 000089C6 3B008F09F1098601 dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 10C 0 000089CE 05080A08FB070008 dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 110 0 000089D6 6E0873086E084C08 dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 114 0 000089DE 05080A08FB070008 dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 118 0 000089E6 6E0873086E084C08 dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 11C 0 000089EE 05180A18FB170018 dw P186 + MN_ROL, P186 + MN_ROR, P186 + MN_RCL, P186 + MN_RCR ; 120 0 000089F6 6E1873186E184C18 dw P186 + MN_SHL, P186 + MN_SHR, P186 + MN_SHL, P186 + MN_SAR ; 124 0 000089FE A209A209D607CC07 dw MN_TEST, MN_TEST, MN_NOT, MN_NEG ; 128 0 00008A06 C707C704CE01C104 dw MN_MUL, MN_IMUL, MN_DIV, MN_IDIV ; 12C 0 00008A0E D104C90171007100 dw MN_INC, MN_DEC, MN_CALL, MN_CALL ; 130 0 00008A16 B305B305F5070000 dw MN_JMP, MN_JMP, MN_PUSH, 0000h ; 134 0 00008A1E 68298A29ED252F26 dw P286 + MN_SLDT, P286 + MN_STR, P286 + MN_LLDT, P286 + MN_LTR ; 138 0 00008A26 B729BD2900000000 dw P286 + MN_VERR, P286 + MN_VERW, 0000h, 0000h ; 13C 0 00008A2E 50295629E125E725 dw P286 + MN_SGDT, P286 + MN_SIDT, P286 + MN_LGDT, P286 + MN_LIDT ; 140 0 00008A36 6E290000F3250E45 dw P286 + MN_SMSW, 0000h, P286 + MN_LMSW, P486 + MN_INVLPG ; 144 0 00008A3E EA019D039B02B002 dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 148 0 00008A46 36044A04DD02F102 dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 14C 0 00008A4E EA019D039B02B002 dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 150 0 00008A56 36044A04DD02F102 dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 154 0 00008A5E 560300000D041204 dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 158 0 00008A66 210A9503480A1F04 dw MN_FLDENV_OSA, MN_FNLDCW, MN_FNSTENV_OSA, MN_FNSTCW ; 15C 0 00008A6E 56039D0420030000 dw MN_FLD, MN_FXCH, 0320h, 0000h ; 160 0 00008A76 2803C801D001D801 dw 0328h, 01C8h, 01D0h, 01D8h ; 164 0 00008A7E F701AA031C032303 dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 168 0 00008A86 43045904EA020003 dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 16C 0 00008A8E 3162426239628B62 dw P686 + MN_FCMOVB, P686 + MN_FCMOVE, P686 + MN_FCMOVBE, P686 + MN_FCMOVU ; 170 0 00008A96 0000300300000000 dw 0000h, 0330h, 0000h, 0000h ; 174 0 00008A9E 2B03000049034F03 dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 178 0 00008AA6 0000560300001204 dw 0000h, MN_FLD, 0000h, MN_FSTP ; 17C 0 00008AAE 5D62706266627962 dw P686 + MN_FCMOVNB, P686 + MN_FCMOVNE, P686 + MN_FCMOVNBE, P686 + MN_FCMOVNU ; 180 0 00008AB6 38036E64A1620000 dw 0338h, P686 + MN_FUCOMI, P686 + MN_FCOMI, 0000h ; 184 0 00008ABE EA019D039B02B002 dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 188 0 00008AC6 36044A04DD02F102 dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 18C 0 00008ACE EA019D0300000000 dw MN_FADD, MN_FMUL, 0000h, 0000h ; 190 0 00008AD6 4A043604F102DD02 dw MN_FSUBR, MN_FSUB, MN_FDIVR, MN_FDIV ; 194 0 00008ADE 560300000D041204 dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 198 0 00008AE6 290A0000380A2E04 dw MN_FRSTOR_OSA, 0000h, MN_FNSAVE_OSA, MN_FNSTSW ; 19C 0 00008AEE 150300000D041204 dw MN_FFREE, 0000h, MN_FST, MN_FSTP ; 1A0 0 00008AF6 67347F3400000000 dw P386 + MN_FUCOM, P386 + MN_FUCOMP, 0000h, 0000h ; 1A4 0 00008AFE F701AA031C032303 dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 1A8 0 00008B06 43045904EA020003 dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 1AC 0 00008B0E F001A30300004003 dw MN_FADDP, MN_FMULP, 0000h, 0340h ; 1B0 0 00008B16 51043C04F802E302 dw MN_FSUBRP, MN_FSUBP, MN_FDIVRP, MN_FDIVP ; 1B4 0 00008B1E 2B03000049034F03 dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 1B8 0 00008B26 FE012B0304024F03 dw MN_FBLD, MN_FILD, MN_FBSTP, MN_FISTP ; 1BC 0 00008B2E 0000000000000000 dw 0000h, 0000h, 0000h, 0000h ; 1C0 0 00008B36 48037664A8620000 dw 0348h, P686 + MN_FUCOMIP, P686 + MN_FCOMIP, 0000h ; 1C4 0 00008B3E 5B03610369037103 dw MN_FLD1, MN_FLDL2T, MN_FLDL2E, MN_FLDPI ; 1C8 0 00008B46 7803800388030000 dw MN_FLDLG2, MN_FLDLN2, MN_FLDZ, 0000h ; 1CC 0 00008B4E DD01AC04CE03B703 dw MN_F2XM1, MN_FYL2X, MN_FPTAN, MN_FPATAN ; 1D0 0 00008B56 A304C633C5023103 dw MN_FXTRACT, P386 + MN_FPREM1, MN_FDECSTP, MN_FINCSTP ; 1D4 0 00008B5E BF03B3040604FD33 dw MN_FPREM, MN_FYL2XP1, MN_FSQRT, P386 + MN_FSINCOS ; 1D8 0 00008B66 D503DE03F733BF32 dw MN_FRNDINT, MN_FSCALE, P386 + MN_FSIN, P386 + MN_FCOS ; 1DC 1831 <2> ;--- The rest of these are squeezed. 0 00008B6E 000038014001BE25 dw 0, 0138h, 0140h, P286 + MN_LAR ; 00 0 00008B76 2A2691200845C949 dw P286 + MN_LSL, P286 + MN_CLTS, P486 + MN_INVD, P486 + MN_WBINVD ; 04 0 00008B7E B219343634363436 dw P186 + MN_UD2, P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV ; 08 0 00008B86 343634363436D159 dw P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV, P586 + MN_WRMSR ; 0C 0 00008B8E 16580F585A613A61 dw P586 + MN_RDTSC, P586 + MN_RDMSR, P686 + MN_CMOVO, P686 + MN_CMOVNO ; 10 0 00008B96 AB60A3607F615261 dw P686 + MN_CMOVB, P686 + MN_CMOVAE, P686 + MN_CMOVZ, P686 + MN_CMOVNZ ; 14 0 00008B9E B2609C6078614A61 dw P686 + MN_CMOVBE, P686 + MN_CMOVA, P686 + MN_CMOVS, P686 + MN_CMOVNS ; 18 0 00008BA6 68617061D760CF60 dw P686 + MN_CMOVPE, P686 + MN_CMOVPO, P686 + MN_CMOVL, P686 + MN_CMOVGE ; 1C 0 00008BAE DE60C8608B579657 dw P686 + MN_CMOVLE, P686 + MN_CMOVG, P586 + MN_PUNPCKLBW, P586 + MN_PUNPCKLWD ; 20 0 00008BB6 A1574F56C256CB56 dw P586 + MN_PUNPCKLDQ, P586 + MN_PACKSSWB, P586 + MN_PCMPGTB, P586 + MN_PCMPGTW ; 24 0 00008BBE D45659566A577557 dw P586 + MN_PCMPGTD, P586 + MN_PACKUSWB, P586 + MN_PUNPCKHBW, P586 + MN_PUNPCKHWD ; 28 0 00008BC6 8057455639563F56 dw P586 + MN_PUNPCKHDQ, P586 + MN_PACKSSDW, P586 + MN_MOVD, P586 + MN_MOVQ ; 2C 0 00008BCE 080310031803A756 dw 0308h, 0310h, 0318h, P586 + MN_PCMPEQB ; 30 0 00008BD6 B056B956D7513956 dw P586 + MN_PCMPEQW, P586 + MN_PCMPEQD, P586 + MN_EMMS, P586 + MN_MOVD ; 34 0 00008BDE 3F56993585351F35 dw P586 + MN_MOVQ, P386 + MN_JO, P386 + MN_JNO, P386 + MN_JB ; 38 0 00008BE6 1A35AF3594352335 dw P386 + MN_JAE, P386 + MN_JZ, P386 + MN_JNZ, P386 + MN_JBE ; 3C 0 00008BEE 1635AB358F35A135 dw P386 + MN_JA, P386 + MN_JS, P386 + MN_JNS, P386 + MN_JPE ; 40 0 00008BF6 A635463541354A35 dw P386 + MN_JPO, P386 + MN_JL, P386 + MN_JGE, P386 + MN_JLE ; 44 0 00008BFE 3D352A390E399138 dw P386 + MN_JG, P386 + MN_SETO, P386 + MN_SETNO, P386 + MN_SETB ; 48 0 00008C06 8A384A3923399738 dw P386 + MN_SETAE, P386 + MN_SETZ, P386 + MN_SETNZ, P386 + MN_SETBE ; 4C 0 00008C0E 843844391C393639 dw P386 + MN_SETA, P386 + MN_SETS, P386 + MN_SETNS, P386 + MN_SETPE ; 50 0 00008C16 3D39B738B038BD38 dw P386 + MN_SETPO, P386 + MN_SETL, P386 + MN_SETGE, P386 + MN_SETLE ; 54 0 00008C1E AA38F537F037A651 dw P386 + MN_SETG, P386 + MN_PUSH, P386 + MN_POP, P586 + MN_CPUID ; 58 0 00008C26 5E305C395C39F537 dw P386 + MN_BT, P386 + MN_SHLD, P386 + MN_SHLD, P386 + MN_PUSH ; 5C 0 00008C2E F0373C586C306239 dw P386 + MN_POP, P586 + MN_RSM, P386 + MN_BTS, P386 + MN_SHRD ; 60 0 00008C36 6239C73492419241 dw P386 + MN_SHRD, P386 + MN_IMUL, P486 + MN_CMPXCHG, P486 + MN_CMPXCHG ; 64 0 00008C3E C8356730D235D735 dw P386 + MN_LSS, P386 + MN_BTR, P386 + MN_LFS, P386 + MN_LGS ; 68 0 00008C46 C037C037AD19E802 dw P386 + MN_MOVZX, P386 + MN_MOVZX, P186 + MN_UD1, 02E8h ; 6C 0 00008C4E 62304D305230B937 dw P386 + MN_BTC, P386 + MN_BSF, P386 + MN_BSR, P386 + MN_MOVSX ; 70 0 00008C56 B937D849D849F002 dw P386 + MN_MOVSX, P486 + MN_XADD, P486 + MN_XADD, 02F0h ; 74 0 00008C5E 5740574057405740 dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 78 0 00008C66 5740574057405740 dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 7C 0 00008C6E 1E5725572C57EE56 dw P586 + MN_PSRLW, P586 + MN_PSRLD, P586 + MN_PSRLQ, P586 + MN_PMULLW ; 80 0 00008C76 585761579A568856 dw P586 + MN_PSUBUSB, P586 + MN_PSUBUSW, P586 + MN_PAND, P586 + MN_PADDUSB ; 84 0 00008C7E 9156A05610571757 dw P586 + MN_PADDUSW, P586 + MN_PANDN, P586 + MN_PSRAW, P586 + MN_PSRAD ; 88 0 00008C86 E65648575057F656 dw P586 + MN_PMULHW, P586 + MN_PSUBSB, P586 + MN_PSUBSW, P586 + MN_POR ; 8C 0 00008C8E 78568056AC57FB56 dw P586 + MN_PADDSB, P586 + MN_PADDSW, P586 + MN_PXOR, P586 + MN_PSLLW ; 90 0 00008C96 02570957DD563357 dw P586 + MN_PSLLD, P586 + MN_PSLLQ, P586 + MN_PMADDWD, P586 + MN_PSUBB ; 94 0 00008C9E 3A57415763566A56 dw P586 + MN_PSUBW, P586 + MN_PSUBD, P586 + MN_PADDB, P586 + MN_PADDW ; 98 0 00008CA6 7156A819D104C901 dw P586 + MN_PADDD, P186 + MN_UD0, MN_INC, MN_DEC ; 9C 0 00008CAE 16005E306C306730 dw MN_BOXCB, P386 + MN_BT, P386 + MN_BTS, P386 + MN_BTR ; A0 0 00008CB6 62309B51F0073406 dw P386 + MN_BTC, P586 + MN_CMPXCHG8B, MN_POP, MN_MOV ; A4 0 00008CBE 1E571057FB562557 dw P586 + MN_PSRLW, P586 + MN_PSRAW, P586 + MN_PSLLW, P586 + MN_PSRLD ; A8 0 00008CC6 175702572C570957 dw P586 + MN_PSRAD, P586 + MN_PSLLD, P586 + MN_PSRLQ, P586 + MN_PSLLQ ; AC 0 00008CCE B1030B02E4016104 dw MN_FNOP, MN_FCHS, MN_FABS, MN_FTST ; B0 0 00008CD6 970487340E03D502 dw MN_FXAM, P386 + MN_FUCOMPP, MN_FNENI, MN_FNDISI ; B4 0 00008CDE 18024103EE23B702 dw MN_FNCLEX, MN_FNINIT, P286 + MN_FNSETPM, MN_FCOMPP ; B8 0 00008CE6 2E04 dw MN_FNSTSW 1880 <2> 1881 <2> ;--- Disassembler: table converts unsqueezed numbers to squeezed. 1882 <2> 1883 <2> align 8, db 0 1884 <2> sqztab label byte 0 00008CE8 0102030400000500 db 1, 2, 3, 4, 0, 0, 5, 0 ; 1E0 0 00008CF0 0607000800000000 db 6, 7, 0, 8, 0, 0, 0, 0 ; 1E8 0 00008CF8 0000000000000000 db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F0 0 00008D00 0000000000000000 db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F8 0 00008D08 090A0B0C0D000E00 db 9, 10, 11, 12, 13, 0, 14, 0 ; 200 0 00008D10 0000000000000000 db 0, 0, 0, 0, 0, 0, 0, 0 ; 208 0 00008D18 0F10110000000000 db 15, 16, 17, 0, 0, 0, 0, 0 ; 210 0 00008D20 0000000000000000 db 0, 0, 0, 0, 0, 0, 0, 0 ; 218 0 00008D28 1213141516171819 db 18, 19, 20, 21, 22, 23, 24, 25 ; 220 0 00008D30 1A1B1C1D1E1F2021 db 26, 27, 28, 29, 30, 31, 32, 33 ; 228 0 00008D38 0000000000000000 db 0, 0, 0, 0, 0, 0, 0, 0 ; 230 0 00008D40 0000000000000000 db 0, 0, 0, 0, 0, 0, 0, 0 ; 238 0 00008D48 2223242526272829 db 34, 35, 36, 37, 38, 39, 40, 41 ; 240 0 00008D50 2A2B2C2D00002E2F db 42, 43, 44, 45, 0, 0, 46, 47 ; 248 0 00008D58 0030313233343536 db 0, 48, 49, 50, 51, 52, 53, 54 ; 250 0 00008D60 0000000000003738 db 0, 0, 0, 0, 0, 0, 55, 56 ; 258 0 00008D68 393A3B3C3D3E3F40 db 57, 58, 59, 60, 61, 62, 63, 64 ; 260 0 00008D70 4142434445464748 db 65, 66, 67, 68, 69, 70, 71, 72 ; 268 0 00008D78 494A4B4C4D4E4F50 db 73, 74, 75, 76, 77, 78, 79, 80 ; 270 0 00008D80 5152535455565758 db 81, 82, 83, 84, 85, 86, 87, 88 ; 278 0 00008D88 595A5B5C5D5E0000 db 89, 90, 91, 92, 93, 94, 0, 0 ; 280 0 00008D90 5F60616263640065 db 95, 96, 97, 98, 99,100, 0,101 ; 288 0 00008D98 666768696A6B6C6D db 102,103,104,105,106,107,108,109 ; 290 0 00008DA0 006E6F7071727374 db 0,110,111,112,113,114,115,116 ; 298 0 00008DA8 7576000000000077 db 117,118, 0, 0, 0, 0, 0,119 ; 2A0 0 00008DB0 78797A7B7C7D7E7F db 120,121,122,123,124,125,126,127 ; 2A8 0 00008DB8 0080818200830000 db 0,128,129,130, 0,131, 0, 0 ; 2B0 0 00008DC0 8485008687880089 db 132,133, 0,134,135,136, 0,137 ; 2B8 0 00008DC8 008A8B00008C0000 db 0,138,139, 0, 0,140, 0, 0 ; 2C0 0 00008DD0 8D8E008F90910092 db 141,142, 0,143,144,145, 0,146 ; 2C8 0 00008DD8 0093949500960000 db 0,147,148,149, 0,150, 0, 0 ; 2D0 0 00008DE0 979899009A9B9C9D db 151,152,153, 0,154,155,156,157 ; 2D8 0 00008DE8 9E9F0000000000A0 db 158,159, 0, 0, 0, 0, 0,160 ; 2E0 0 00008DF0 00000000A1A2A3A4 db 0, 0, 0, 0,161,162,163,164 ; 2E8 0 00008DF8 00A5000000000000 db 0,165, 0, 0, 0, 0, 0, 0 ; 2F0 0 00008E00 A600000000000000 db 166, 0, 0, 0, 0, 0, 0, 0 ; 2F8 0 00008E08 A700000000000000 db 167, 0, 0, 0, 0, 0, 0, 0 ; 300 0 00008E10 0000A800A900AA00 db 0, 0,168, 0,169, 0,170, 0 ; 308 0 00008E18 0000AB00AC00AD00 db 0, 0,171, 0,172, 0,173, 0 ; 310 0 00008E20 0000AE000000AF00 db 0, 0,174, 0, 0, 0,175, 0 ; 318 0 00008E28 B000000000000000 db 176, 0, 0, 0, 0, 0, 0, 0 ; 320 0 00008E30 B1B20000B3B40000 db 177,178, 0, 0,179,180, 0, 0 ; 328 0 00008E38 00B5000000000000 db 0,181, 0, 0, 0, 0, 0, 0 ; 330 0 00008E40 B6B7B8B9BA000000 db 182,183,184,185,186, 0, 0, 0 ; 338 0 00008E48 00BB000000000000 db 0,187, 0, 0, 0, 0, 0, 0 ; 340 0 00008E50 BC00000000000000 db 188, 0, 0, 0, 0, 0, 0, 0 ; 348 1931 <2> 1932 <2> ;--- Disassembler: table of mnemonics that change in the presence of a WAIT 1933 <2> ;--- instruction. 1934 <2> 1935 <2> align 2, db 0 1936 <2> wtab1 label word 0 00008E58 3A03390338033B035D dw 033Ah,0339h,0338h,033Bh,015Dh,019Eh,033Ch,015Fh 0 00008E61 019E013C035F01 0 00008E68 5E0148039F01 dw 015Eh,0348h,019Fh 1939 <2> wtab2 label word 0 00008E6E 1102 dw MN_FCLEX 0 00008E70 CE02 dw MN_FDISI 0 00008E72 0803 dw MN_FENI 0 00008E74 3A03 dw MN_FINIT 0 00008E76 8E03 dw MN_FLDCW 0 00008E78 310A dw MN_FSAVE_OSA 0 00008E7A E603 dw MN_FSETPM 0 00008E7C 1804 dw MN_FSTCW 0 00008E7E 400A dw MN_FSTENV_OSA 0 00008E80 2704 dw MN_FSTSW 0 00008E82 2704 dw MN_FSTSW 1951 <2> N_WTAB equ ($ - wtab2) / 2 1952 <2> 1953 <2> ;--- Disassembler: table for operands which have a different mnemonic for 1954 <2> ;--- their 32 bit versions (66h prefix). 1955 <2> 1956 <2> align 2, db 0 1957 <2> ltabo1 label word 0 00008E84 98009900 dw 098h,099h 1959 <2> ltabo2 label word 0 00008E88 7C00 dw MN_CWDE 0 00008E8A B201 dw MN_CDQ 1962 <2> N_LTABO equ ($ - ltabo2) / 2 1963 <2> 1964 <2> ;--- Disassembler: table for operands which have a different mnemonic for 1965 <2> ;--- their 32 bit versions (67h prefix). 1966 <2> 1967 <2> align 2, db 0 1968 <2> ltaba1 label word 0 00008E8C E300 dw 0E3h 1970 <2> ltaba2 label word 0 00008E8E 3205 dw MN_JECXZ 1972 <2> N_LTABA equ ($ - ltaba2) / 2 1973 <2> 1974 <2> ;--- Disassembler: table of lockable instructions 1975 <2> 1976 <2> align 2, db 0 1977 <2> locktab label word 0 00008E90 0A0102011000110008 dw 010Ah,0102h,010h,011h,0108h,0100h,00h,01h 0 00008E99 01000100000100 0 00008EA0 0C010401200021009B dw 010Ch,0104h,020h,021h,029Bh,02EFh,0293h,02EEh 0 00008EA9 02EF029302EE02 0 00008EB0 8B02ED0290029102E1 dw 028Bh,02EDh,0290h,0291h,02E1h,0131h,02E0h,0130h 0 00008EB9 023101E0023001 0 00008EC0 2B012A010901010108 dw 012Bh,012Ah,0109h,0101h,08h,09h,010Bh,0103h 0 00008EC9 0009000B010301 0 00008ED0 180019000D01050128 dw 018h,019h,010Dh,0105h,028h,029h,02A0h,02A1h 0 00008ED9 002900A002A102 0 00008EE0 860087000E01060130 dw 086h,087h,010Eh,0106h,030h,031h 0 00008EE9 003100 1984 <2> N_LOCK equ ($ - locktab) / 2 1985 <2> 1986 <2> ;--- Equates used in the assembly-language code. 1987 <2> 1988 <2> SPARSE_BASE equ 01E0h 1989 <2> SFPGROUP3 equ 0338h 1990 <2> GROUP7 equ 0130h 1991 <2> SGROUP4 equ 02F8h 366 <1> [list +] 367 <1> opindex: 368 <1> [list -] 0 00008EEC 01 db %$index 386 <2> [list -] 0 00008EED 00 db %$index 386 <2> [list -] 0 00008EEE 01 db %$index 386 <2> [list -] 0 00008EEF 05 db %$index 386 <2> [list -] 0 00008EF0 09 db %$index 386 <2> [list -] 0 00008EF1 0D db %$index 386 <2> [list -] 0 00008EF2 11 db %$index 386 <2> [list -] 0 00008EF3 15 db %$index 386 <2> [list -] 0 00008EF4 19 db %$index 386 <2> [list -] 0 00008EF5 1D db %$index 386 <2> [list -] 0 00008EF6 23 db %$index 386 <2> [list -] 0 00008EF7 27 db %$index 386 <2> [list -] 0 00008EF8 2D db %$index 386 <2> [list -] 0 00008EF9 35 db %$index 386 <2> [list -] 0 00008EFA 37 db %$index 386 <2> [list -] 0 00008EFB 3A db %$index 386 <2> [list -] 0 00008EFC 3C db %$index 386 <2> [list -] 0 00008EFD 3C db %$index 386 <2> [list -] 0 00008EFE 3E db %$index 386 <2> [list -] 0 00008EFF 40 db %$index 386 <2> [list -] 0 00008F00 40 db %$index 386 <2> [list -] 0 00008F01 40 db %$index 386 <2> [list -] 0 00008F02 42 db %$index 386 <2> [list -] 0 00008F03 41 db %$index 386 <2> [list -] 0 00008F04 42 db %$index 386 <2> [list -] 0 00008F05 41 db %$index 386 <2> [list -] 0 00008F06 42 db %$index 386 <2> [list -] 0 00008F07 41 db %$index 386 <2> [list -] 0 00008F08 42 db %$index 386 <2> [list -] 0 00008F09 41 db %$index 386 <2> [list -] 0 00008F0A 44 db %$index 386 <2> [list -] 0 00008F0B 45 db %$index 386 <2> [list -] 0 00008F0C 46 db %$index 386 <2> [list -] 0 00008F0D 47 db %$index 386 <2> [list -] 0 00008F0E 47 db %$index 386 <2> [list -] 0 00008F0F 48 db %$index 386 <2> [list -] 0 00008F10 49 db %$index 386 <2> [list -] 0 00008F11 48 db %$index 386 <2> [list -] 0 00008F12 48 db %$index 386 <2> [list -] 0 00008F13 49 db %$index 386 <2> [list -] 0 00008F14 4B db %$index 386 <2> [list -] 0 00008F15 4C db %$index 386 <2> [list -] 0 00008F16 4D db %$index 386 <2> [list -] 0 00008F17 4E db %$index 386 <2> [list -] 0 00008F18 4F db %$index 386 <2> [list -] 0 00008F19 4E db %$index 386 <2> [list -] 0 00008F1A 4E db %$index 386 <2> [list -] 0 00008F1B 4D db %$index 386 <2> [list -] 0 00008F1C 4E db %$index 386 <2> [list -] 0 00008F1D 4F db %$index 386 <2> [list -] 0 00008F1E 50 db %$index 386 <2> [list -] 0 00008F1F 51 db %$index 386 <2> [list -] 0 00008F20 52 db %$index 386 <2> [list -] 0 00008F21 53 db %$index 386 <2> [list -] 0 00008F22 54 db %$index 386 <2> [list -] 0 00008F23 55 db %$index 386 <2> [list -] 0 00008F24 54 db %$index 386 <2> [list -] 0 00008F25 54 db %$index 386 <2> [list -] 0 00008F26 55 db %$index 386 <2> [list -] 0 00008F27 55 db %$index 386 <2> [list -] 0 00008F28 58 db %$index 386 <2> [list -] 0 00008F29 5A db %$index 386 <2> [list -] 0 00008F2A 5D db %$index 386 <2> [list -] 0 00008F2B 5F db %$index 386 <2> [list -] 0 00008F2C 60 db %$index 386 <2> [list -] 0 00008F2D 61 db %$index 386 <2> [list -] 0 00008F2E 62 db %$index 386 <2> [list -] 0 00008F2F 62 db %$index 386 <2> [list -] 0 00008F30 62 db %$index 386 <2> [list -] 0 00008F31 63 db %$index 386 <2> [list -] 0 00008F32 67 db %$index 386 <2> [list -] 0 00008F33 68 db %$index 386 <2> [list -] 0 00008F34 69 db %$index 386 <2> [list -] 0 00008F35 6A db %$index 386 <2> [list -] 0 00008F36 6D db %$index 386 <2> [list -] 0 00008F37 70 db %$index 386 <2> [list -] 0 00008F38 72 db %$index 386 <2> [list -] 0 00008F39 74 db %$index 386 <2> [list -] 0 00008F3A 75 db %$index 386 <2> [list -] 0 00008F3B 76 db %$index 386 <2> [list -] 0 00008F3C 7A db %$index 386 <2> [list -] 0 00008F3D 7E db %$index 386 <2> [list -] 0 00008F3E 7F db %$index 386 <2> [list -] 0 00008F3F 80 db %$index 386 <2> [list -] 0 00008F40 84 db %$index 386 <2> [list -] 0 00008F41 86 db %$index 386 <2> [list -] 0 00008F42 88 db %$index 386 <2> [list -] 0 00008F43 8A db %$index 386 <2> [list -] 0 00008F44 8C db %$index 386 <2> [list -] 0 00008F45 8E db %$index 386 <2> [list -] 0 00008F46 8D db %$index 386 <2> [list -] 0 00008F47 8D db %$index 386 <2> [list -] 0 00008F48 8E db %$index 386 <2> [list -] 0 00008F49 8F db %$index 386 <2> [list -] 0 00008F4A 92 db %$index 386 <2> [list -] 0 00008F4B 95 db %$index 386 <2> [list -] 0 00008F4C 96 db %$index 386 <2> [list -] 0 00008F4D 97 db %$index 386 <2> [list -] 0 00008F4E 96 db %$index 386 <2> [list -] 0 00008F4F 96 db %$index 386 <2> [list -] 0 00008F50 95 db %$index 386 <2> [list -] 0 00008F51 95 db %$index 386 <2> [list -] 0 00008F52 94 db %$index 386 <2> [list -] 0 00008F53 94 db %$index 386 <2> [list -] 0 00008F54 93 db %$index 386 <2> [list -] 0 00008F55 93 db %$index 386 <2> [list -] 0 00008F56 92 db %$index 386 <2> [list -] 0 00008F57 92 db %$index 386 <2> [list -] 0 00008F58 91 db %$index 386 <2> [list -] 0 00008F59 91 db %$index 386 <2> [list -] 0 00008F5A 92 db %$index 386 <2> [list -] 0 00008F5B 93 db %$index 386 <2> [list -] 0 00008F5C 94 db %$index 386 <2> [list -] 0 00008F5D 95 db %$index 386 <2> [list -] 0 00008F5E 96 db %$index 386 <2> [list -] 0 00008F5F 99 db %$index 386 <2> [list -] 0 00008F60 9C db %$index 386 <2> [list -] 0 00008F61 9F db %$index 386 <2> [list -] 0 00008F62 A2 db %$index 386 <2> [list -] 0 00008F63 A5 db %$index 386 <2> [list -] 0 00008F64 A8 db %$index 386 <2> [list -] 0 00008F65 AA db %$index 386 <2> [list -] 0 00008F66 AC db %$index 386 <2> [list -] 0 00008F67 AE db %$index 386 <2> [list -] 0 00008F68 B0 db %$index 386 <2> [list -] 0 00008F69 B1 db %$index 386 <2> [list -] 0 00008F6A B2 db %$index 386 <2> [list -] 0 00008F6B B1 db %$index 386 <2> [list -] 0 00008F6C B3 db %$index 386 <2> [list -] 0 00008F6D B6 db %$index 386 <2> [list -] 0 00008F6E B7 db %$index 386 <2> [list -] 0 00008F6F B9 db %$index 386 <2> [list -] 0 00008F70 B9 db %$index 386 <2> [list -] 0 00008F71 B9 db %$index 386 <2> [list -] 386 ****************** <2> warning: Most assembler table prefix bytes: 1 (ofs 4h) mne BOXCB variant (240h + 0*8 + 7),90,, [-w+user] 450 <1> 451 <1> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 451 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY 23 %endif 24 %endif 25 26 27 %if !_LINK || !_LOADER 28 usesection lDEBUG_DATA_ENTRY 28 ------------------ note: usesection lDEBUG_DATA_ENTRY 29 30 align 2, db 0 0 00001492 0000 aa13a_mnemposition: dw 0 ; -> mnemonic, to display error 0 00001494 00 aa_mnemsuffix: db 0 ; 0 = none, 'W' = W suffix, 'D' = D suffix 33 0 00001495 00 asm_mn_flags: db 0 ; flags for the mnemonic 35 AMF_D32 equ 1 ; 32-bit opcode/data operand 36 AMF_WAIT equ 2 37 AMF_A32 equ 4 ; address operand is 32-bit 38 AMF_SIB equ 8 ; there's a SIB in the arguments 39 AMF_MSEG equ 10h ; if a seg prefix was given before mnemonic 40 AMF_FSGS equ 20h ; if FS or GS was encountered 41 AMF_D16 equ 40h ; 16-bit opcode/data operand 42 AMF_ADDR equ 80h ; address operand is given (write address size prefix) 43 0 00001496 00 aa_saved_prefix:db 0 ; WAIT or REP... prefix 45 ; aa_saved_prefix and aa_seg_pre must be consecutive. 0 00001497 00 aa_seg_pre: db 0 ; segment prefix 47 48 align 2, db 0 0 00001498 0000 mneminfo: dw 0 ; address associated with the mnemonic 50 51 ; The following 8 words (including modrmflag) must all be consecutive. 0 0000149A 0000 rmaddr: dw 0 ; address of operand giving the R/M byte 53 ; regmem and sibbyte must be consecutive 0 0000149C 00 regmem: db 0 ; mod reg r/m part of instruction 0 0000149D 00 sibbyte: db 0 ; SIB byte 0 0000149E 0000 immaddr: dw 0 ; address of operand giving the immed stf 0 000014A0 0000 xxaddr: dw 0 ; address of additional stuff 58 ; dismach and dmflags must be consecutive 0 000014A2 00 dismach: db 0 ; type of processor needed 0 000014A3 00 dmflags: db 0 ; flags for extra processor features 61 62 %if 0 ; moved to debug.mac 63 DM_COPR equ 1 ; math coprocessor 64 DM_MMX equ 2 ; MMX extensions 65 %endif 66 0 000014A4 00 opcode_or: db 0 ; extra bits in the op code 0 000014A5 00 opsize: db 0 ; size of this operation (2 or 4) 0 000014A6 00 varflags: db 0 ; flags for this variant 70 71 VAR_LOCKABLE equ 1 ; variant is lockable 72 VAR_MODRM equ 2 ; if there's a MOD R/M here 73 VAR_SIZ_GIVN equ 4 ; if a size was given 74 VAR_SIZ_FORCD equ 8 ; if only one size is permitted 75 VAR_SIZ_NEED equ 10h ; if we need the size 76 VAR_D16 equ 20h ; if operand size is WORD 77 VAR_D32 equ 40h ; if operand size is DWORD 78 VAR_M_ALWAYS_16 equ 80h 0 000014A7 00 alloweddist: db 0 0 000014A8 00 modrmalready: db 0 0 000014A9 00 modrmflag: db 0 ; must be directly after modrmalready 82 0 000014AA 00 a_reqsize: db 0 ; size that this arg should be 0 000014AB 00 align 2, db 0 0 000014AC 0000 a_opcode: dw 0 ; op code info for this variant 86 87 align 2, db 0 0 000014AE 0000 a_opcode2: dw 0 ; copy of a_opcode for obs-instruction 0 000014B0 E0DBE1DBE4DB240126 a_obstab: dw 0DBE0h,0DBE1h,0DBE4h,124h,126h ; obs. instruction codes 0 000014B9 01 0 000014BA 0101020404 obsmach: db 1,1,2,4,4 ; max permissible machine for the above 91 ; This is used to search for obsolete instructions: 92 ; DBE0h: feni 93 ; DBE1h: fdisi 94 ; DBE4h: fsetpm 95 ; 124h: mov trX, reg 96 ; 126h: mov reg, trX 97 0 000014BF 00040201 aadbsiz: db 0,4,2,1 ; table for max size of db operand 0 000014C3 00 align 2, db 0 0 000014C4 0000 aadbsto: dw 0 0 000014C6 [2403] dw aa_sto_dword 0 000014C8 [2C03] dw aa_sto_word 0 000014CA [3403] dw aa_sto_byte ; table for routine to store a number 104 105 align 2, db 0 ; (modrmtab really is an array of words) 0 000014CC 0B000D00 modrmtab: db REG_BX,0,REG_BP,0 ; [bx], [bp] 0 000014D0 0F000E00 db REG_DI,0,REG_SI,0 ; [di], [si] 0 000014D4 0F0D0E0D db REG_DI,REG_BP,REG_SI,REG_BP ; [bp+di],[bp+si] 0 000014D8 0F0B0E0B db REG_DI,REG_BX,REG_SI,REG_BX ; [bx+di],[bx+si] 110 111 %if _IMMASM 0 000014DC [3000] aa_ret: dw aa01_main_loop ; used by immasm 113 %endif 0 000014DE 610D aam_args: db 'a',13 115 116 ; Equates for parsed arguments, stored in OPRND.flags 117 ARG_DEREF equ 1 ; non-immediate memory reference 118 ARG_MODRM equ 2 ; if we've computed the MOD R/M byte 119 ARG_JUSTREG equ 4 ; a solo register 120 ARG_WEIRDREG equ 8 ; if it's a segment register or CR, etc. 121 ARG_IMMED equ 10h ; if it's just a number 122 ARG_FARADDR equ 20h ; if it's of the form xxxx:yyyyyyyy 123 ARG_ECX_SPECIAL equ 80h ; have to overflow loop displacement 124 125 ; For each operand type in the following table, the value 126 ; is the bits at least one of which must be present. 127 ; For each entry in bittab, there's an entry in asmjmp. 128 ; Entries are defined in the debug.asm opsizeditem list. 129 bittab: 0 000014E0 101005010401040404 db BITTAB_OPSIZEDITEMS 0 000014E9 00 times 16 - ($ - bittab) db 0 ; unused OP_SIZE combined types 132 133 ; OP_END does not have a table entry. Subsequent 134 ; entries are defined in the debug.asm opitem list. 0 000014F0 010101010120101010 db BITTAB_OPITEMS 0 000014F9 080808080808101010 0 00001502 1010100808FFFFFFFF 0 0000150B FFFFFFFFFFFFFFFFFF 0 00001514 FFFFFF041010040408 0 0000151D 080808080808 136 %if ($ - bittab) != OP_AMOUNT_TABLE 137 %error bittab has wrong size 138 %endif 139 140 ; Jump table for operand types. 141 ; Entries are defined in the debug.asm opsizeditem list. 0 00001523 00 align 2, db 0 143 asmjmp: 0 00001524 [E809][E809][CA09] dw ASMJMP_OPSIZEDITEMS 0 0000152A [CA09][CA09][EE09] 0 00001530 [CF09][DE09][F909] 0 00001536 [4C0D] times 16 - (($ - asmjmp) / 2) dw ao50 ; unused size-combined types (reject) 146 147 ; OP_END does not have a table entry. Subsequent 148 ; entries are defined in the debug.asm opitem list. 0 00001544 [8E0A][8E0A][8E0A] dw ASMJMP_OPITEMS 0 0000154A [8E0A][8E0A][9D0A] 0 00001550 [970A][D80A][570B] 0 00001556 [B60B][BA0B][CF0B] 0 0000155C [EB0B][EF0B][190C] 0 00001562 [300C][350C][3E0C] 0 00001568 [3E0C][3E0C][3E0C] 0 0000156E [C10B][C50B][BA0C] 0 00001574 [C40C][F70C][120D] 0 0000157A [1A0D][240D][1E0D] 0 00001580 [F30C][F30C][F30C] 0 00001586 [F30C][F30C][0808] 0 0000158C [0808][0808][0B0D] 0 00001592 [7E0C][280D][350D] 0 00001598 [420D][420D][420D] 0 0000159E [420D][420D][420D] 0 000015A4 [420D][420D][420D] 150 %if ($ - asmjmp) / 2 != OP_AMOUNT_TABLE 151 %error asmjmp has wrong size 152 %endif 153 154 align 2, db 0 155 asmjmp_opx: 0 000015AA [F30C][F30C][F30C] dw ASMJMP_OPXITEMS 0 000015B0 [F30C][F30C][F30C] 0 000015B6 [F30C][F30C][0808] 0 000015BC [F30C] 157 158 159 %macro defgpr 1.nolist 160 REG_ %+ %1: equ ($ - rgnam816) / 2 161 %defstr %%string %1 162 db %%string 163 %endmacro 164 %macro defsr 1.nolist 165 REG_ %+ %1: equ REG_NO_GPR + ($ - segrgnam) / 2 166 %defstr %%string %1 167 db %%string 168 %endmacro 169 170 REG_NO_GPR equ 24 ; 16..23 are registers eax..edi 171 172 align 2, db 0 173 ; Tables of register names. 174 ; rgnam816/rgnam16/segrgnam/xregnam must be consecutive. 175 rgnam816: 0 000015BE 414C defgpr AL 0 000015C0 434C defgpr CL 0 000015C2 444C defgpr DL 0 000015C4 424C defgpr BL 0 000015C6 4148 defgpr AH 0 000015C8 4348 defgpr CH 0 000015CA 4448 defgpr DH 0 000015CC 4248 defgpr BH ; 0..7 184 rgnam16: 0 000015CE 4158 defgpr AX 0 000015D0 4358 defgpr CX 0 000015D2 4458 defgpr DX 0 000015D4 4258 defgpr BX 0 000015D6 5350 defgpr SP 0 000015D8 4250 defgpr BP 0 000015DA 5349 defgpr SI 0 000015DC 4449 defgpr DI ; 8..15 (16-bit), 16..23 (32-bit) 193 N_REGS16 equ ($ - rgnam16) >> 1 194 segrgnam: 0 000015DE 4553 defsr ES 0 000015E0 4353 defsr CS 0 000015E2 5353 defsr SS 0 000015E4 4453 defsr DS 0 000015E6 4653 defsr FS 0 000015E8 4753 defsr GS ; 24..29 201 N_SEGREGS equ ($ - segrgnam) >> 1 202 xregnam: 0 000015EA 5354 defsr ST 0 000015EC 4D4D defsr MM 0 000015EE 4352 defsr CR 0 000015F0 4452 defsr DR 0 000015F2 5452 defsr TR ; 30..34 208 N_ALLREGS equ ($ - rgnam816) >> 1 209 210 211 ; special ops DX, CL, ST, CS, DS, ES, FS, GS, SS 212 ; entry required if ao48 is used in the opitem list 213 ; order has to match opitem order 214 ; refer to aagetreg comment for the number assignments 0 000015F4 0A011E asm_regnum: db REG_DX, REG_CL, REG_ST 0 000015F7 191B181C1D1A db REG_CS, REG_DS, REG_ES, REG_FS, REG_GS, REG_SS 217 218 ; sizes for OP_M64, OP_MFLOAT, OP_MDOUBLE, OP_M80, OP_MXX 219 ; entry required if ao17 is used in the opitem list 220 ; order has to match opitem order 0 000015FD 05060708 asm_siznum: db SIZ_QWORD, SIZ_FLOAT, SIZ_DOUBLE, SIZ_TBYTE 0 00001601 FF db -1 ; none 223 224 ; size qualifier 225 ; 1 BY = BYTE 226 ; 2 WO = WORD 227 ; 3 unused 228 ; 4 DW = DWORD 229 ; 5 QW = QWORD 230 ; 6 FL = FLOAT (REAL4) 231 ; 7 DO = DOUBLE (REAL8) 232 ; 8 TB = TBYTE (REAL10) 233 234 SIZ_NONE equ 0 235 SIZ_BYTE equ 1 236 SIZ_WORD equ 2 237 SIZ_DWORD equ 4 238 SIZ_QWORD equ 5 239 SIZ_FLOAT equ 6 240 SIZ_DOUBLE equ 7 241 SIZ_TBYTE equ 8 242 243 align 2, db 0 244 sizedisnam: 0 00001602 4259574F574F4457 sizetcnam: db "BY","WO","WO","DW" 246 endarea sizedisnam 0 0000160A 5157464C444F5442 db "QW","FL","DO","TB" 248 endarea sizetcnam 249 250 align 2, db 0 0 00001612 53484E454641 distnam: db "SH","NE","FA" 252 endarea distnam 253 254 255 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 255 ------------------ note: usesection lDEBUG_CODE 256 257 ..@aa_access_start: 258 259 aa_cmd3_check: 0 000015CF AC lodsb 0 000015D0 E8[0000] call chkeol 262 aa_cmd3: 0 000015D3 E9[0000] jmp cmd3 ; exit assembler mode --> 264 265 266 aa: 0 000015D6 E8[0000] call guard_re 268 %if _ATTACH 0 000015D9 4E dec si 0 000015DA 4E dec si 0 000015DB BA[0000] mov dx, msg.attach 0 000015DE E8[0000] call isstring? 0 000015E1 AC lodsb 0 000015E2 7503E9[0000] je attach 0 000015E7 AC lodsb 276 %endif 0 000015E8 8B1E[0000] mov bx, word [ reg_cs ] ; default segment to use 278 aa00a_set_address: 0 000015EC E8[0000] call iseol? 0 000015EF 740E je aa01_main_loop ; if end of line --> 0 000015F1 E8[0000] nearcall getaddrX ; get address into bx:(e)dx 282 ; (no scratchsel) 0 000015F4 E8[0000] call chkeol ; expect end of line here 284 _386_PM_o32 ; mov dword [ a_addr ], edx 0 000015F7 8916[0000] mov word [ a_addr ], dx ; save the address 0 000015FB 891E[0400] mov word [a_addr + saSegSel], bx 287 %if _PM 288 call ispm 289 jnz .86m 290 .pm: 291 mov word [a_addr + saSelector], bx 292 jmp @F 293 .86m: 294 mov word [a_addr + saSegment], bx 295 @@: 296 %endif 297 298 ; Begin loop over input lines. 299 aa01_main_loop: 300 %if _IMMASM 0 000015FF C706[4A00][3000] mov word [ aa_ret ], aa01_main_loop 302 %endif 0 00001605 C706[0000][3000] mov word [ errret ], aa01_main_loop 0 0000160B 8B26[0000] mov sp, word [ savesp ] ; restore the stack (this implies no "retn") 0 0000160F BF[0000] mov di, line_out 0 00001612 A1[0400] mov ax, word [a_addr + saSegSel] 307 %if _PM 308 mov bx, ax ; this is the original selector, 309 ; not the scratchsel 310 %endif 0 00001615 E8[0000] call hexword 0 00001618 B03A mov al, ':' 0 0000161A AA stosb 314 %if _PM 315 mov byte [ bCSAttr ], 0 316 call test_d_b_bit 317 jz .16 318 mov byte [ bCSAttr ], 40h ; set 32-bit attrib for later checks here 319 mov ax, word [ a_addr+2 ] 320 call hexword 321 .16: 322 %endif 0 0000161B A1[0000] mov ax, word [ a_addr+0 ] 0 0000161E E8[0000] call hexword 0 00001621 B020 mov al, 32 0 00001623 AA stosb 327 %if _EXTENSIONS 0 00001624 8B0E[0000] mov cx, word [ext_aa_before_getline_handler] 0 00001628 E303 jcxz aa_before_getline 0 0000162A E9[0000] jmp transfer_ext_cx 331 332 aa_before_getline: section_of_function 0 0000162D 8B26[0000] mov sp, word [ savesp ] ; restore stack 334 0 00001631 31C9 xor cx, cx 0 00001633 870E[0000] xchg cx, word [ext_aa_inject_handler] 0 00001637 E303 jcxz aa_not_inject 0 00001639 E9[0000] jmp transfer_ext_cx 339 340 aa_not_inject: section_of_function 0 0000163C 8B26[0000] mov sp, word [ savesp ] ; restore stack 0 00001640 E8[0000] call getline00 343 aa_injected: section_of_function 0 00001643 8B26[0000] mov sp, word [ savesp ] ; restore stack 345 0 00001647 8B0E[0000] mov cx, word [ext_aa_after_getline_handler] 0 0000164B E303 jcxz aa_after_getline 0 0000164D E9[0000] jmp transfer_ext_cx 349 350 aa_after_getline: section_of_function 0 00001650 8B26[0000] mov sp, word [ savesp ] ; restore stack 352 %else 353 call getline00 354 %endif 0 00001654 3C2E cmp al, '.' 0 00001656 7503E974FF je aa_cmd3_check 0 0000165B 3C3B cmp al, ';' 0 0000165D 74A0 je aa01_main_loop ; if comment 0 0000165F E8[0000] call iseol?.notsemicolon 0 00001662 7503E96CFF je aa_cmd3 ; if done, return to command line --> 361 aa_imm_entry: section_of_function 0 00001667 C606[0300]00 mov byte [ asm_mn_flags ], 0 0 0000166C 8326[0400]00 and word [ aa_saved_prefix ], 0 ; clear aa_saved_prefix and aa_seg_pre 364 365 ; Get mnemonic and look it up. 366 ; (At this point, it has been determined that it is not empty.) 367 ; 368 ; INP: al = first character 369 ; si-> remaining string (al isn't EOL) 370 aa02_parse_mnem: 0 00001671 BF[0000] mov di, line_out ; -> buffer 0 00001674 31C9 xor cx, cx ; = 0 0 00001676 8936[0000] mov [ aa13a_mnemposition ], si 374 0 0000167A A9 db __TEST_IMM16 ; skip stosb,lodsb initially 376 @@: 0 0000167B AA stosb 0 0000167C AC lodsb 0 0000167D 41 inc cx ; count length 0 0000167E E8[0000] call capitalise 0 00001681 E8[0000] call iseol? ; end of mnemonic ? 0 00001684 740C je @F 0 00001686 3C3A cmp al, ':' 0 00001688 7408 je @F ; (for prefixes, else will be an error later) 0 0000168A 3C20 cmp al, 32 0 0000168C 7404 je @F 0 0000168E 3C09 cmp al, 9 0 00001690 75E9 jne @B ; not yet --> 389 @@: 390 0 00001692 49 dec cx ; = length of input 0 00001693 E8[0000] call skipwh0 ; skip to next field 0 00001696 4E dec si 394 0 00001697 8A45FF mov al, [di-1] ; get last stored character 0 0000169A 3C57 cmp al, 'W' ; possible suffix? 0 0000169C 7406 je @F 0 0000169E 3C44 cmp al, 'D' 0 000016A0 7402 je @F ; yes --> 0 000016A2 30C0 xor al, al 401 @@: 0 000016A4 A2[0200] mov [aa_mnemsuffix], al ; store 'D', 'W', or 0 403 0 000016A7 56 push si ; save position in input line 405 0 000016A8 BE[E601] mov si, mnlist ; -> first area: no or optional suffix 0 000016AB BA[730C] mov dx, mnlist_o_suffix_required; -> end of first area 408 409 ; [line_out] = name to search 410 ; cx = length of name to search 411 ; si-> next mnlist entry 412 ; dx-> behind last mnlist entry of this area 413 ; w[ss:sp]-> next field in input line (operand or EOL) 414 aa_mnemlistloop: 0 000016AE AD lodsw ; load combined word, si-> name 0 000016AF 83E00F and ax, 0Fh ; separate mnemonic length 0 000016B2 39C8 cmp ax, cx ; length matches ? 0 000016B4 741D je .length_match ; yes, check name --> 419 .cmps_mismatch: 0 000016B6 01C6 add si, ax ; -> behind entry 0 000016B8 39D6 cmp si, dx ; at end of this list area ? 0 000016BA 72F2 jb aa_mnemlistloop ; not yet, check next entry --> 423 0 000016BC 81FA[730C] cmp dx, mnlist_o_suffix_required; was first or second area ? 0 000016C0 750D jne .mnem_invalid ; second, not found --> 426 0 000016C2 BE[DA0B] mov si, mnlist_a_suffix_allowed ; -> second area: optional or required suffix 0 000016C5 BA[9C0C] mov dx, end_mnlist ; -> end of second area 429 0 000016C8 49 dec cx ; prepare for second look-up 0 000016C9 3826[0200] cmp [aa_mnemsuffix], ah ; is there a valid suffix ? (ah still 0) 0 000016CD 75DF jne aa_mnemlistloop ; yes, check for suffixed instruction --> 433 434 .mnem_invalid: 0 000016CF 58 pop ax ; (discard) 0 000016D0 E98801 jmp aa13a_error ; complain --> 437 438 .length_match: ; found a name of correct length 0 000016D3 BF[0000] mov di, line_out ; -> all-capitals input 0 000016D6 89F3 mov bx, si ; -> name 0 000016D8 F3A6 repe cmpsb ; compare names 0 000016DA 89DE mov si, bx 0 000016DC 89C1 mov cx, ax ; restore length 0 000016DE 75D6 jne .cmps_mismatch ; not this, continue --> 445 446 ; We found the mnemonic. 447 ; (bx=si)-> entry's mnemonic 448 ; dx-> behind last mnlist entry of this area 449 ; w[ss:sp]-> next field in input line (operand or EOL) 0 000016E0 89F0 mov ax, si ; -> mnemonic's name 451 0 000016E2 81FA[9C0C] cmp dx, end_mnlist ; was first or second area ? 0 000016E6 7409 je .handlesuffix ; second, there's a suffix to handle --> 454 0 000016E8 3D[DA0B] cmp ax, mnlist_a_suffix_allowed ; optional suffix that was not specified? 0 000016EB 7232 jb aa_mnemonic_found ; no, done with the suffixes already --> 457 458 %if _PM 459 mov dl, byte [ bCSAttr ] ; dl = whether a 32-bit CS 460 %else 0 000016ED 30D2 xor dl, dl ; 86 Mode is always 16-bit 462 %endif 0 000016EF EB09 jmp sho .suffix_decide 464 465 .handlesuffix: 466 0 000016F1 8A16[0200] mov dl, byte [ aa_mnemsuffix ] ; dl = 'W' or 'D'. 'W' is odd, 'D' is even 0 000016F5 F6D2 not dl ; make 'W' an even value, 'D' an odd one 0 000016F7 80E201 and dl, 1 ; 'W' results in 0, 'D' in 1 470 471 .suffix_decide: 0 000016FA 3D[FE0B] cmp ax, mnlist_o_suffix_allowed ; address size suffix ? 0 000016FD 7212 jb .a_suffix ; yes --> 474 475 ; Operand size suffix. 0 000016FF 84D2 test dl, dl ; which ? 0 00001701 7407 jz .o_suffix_w 0 00001703 800E[0300]01 or byte [asm_mn_flags], AMF_D32 ; o32 0 00001708 EB15 jmp sho aa_mnemonic_found 480 481 .o_suffix_w: 0 0000170A 800E[0300]40 or byte [asm_mn_flags], AMF_D16 ; o16 0 0000170F EB0E jmp sho aa_mnemonic_found 484 485 ; Address size suffix. 486 .a_suffix: 0 00001711 84D2 test dl, dl ; which ? 0 00001713 7405 jz .a_suffix_w 0 00001715 800E[0300]84 or byte [asm_mn_flags], AMF_ADDR|AMF_A32; a32 490 .a_suffix_w: 0 0000171A 800E[0300]80 or byte [asm_mn_flags], AMF_ADDR ; a16 (AMF_A32 still clear) 492 493 aa_mnemonic_found: 0 0000171F C606[1000]00 mov byte [dismach], 0 0 00001724 B104 mov cl, 4 0 00001726 8B74FE mov si, [si-2] ; get the combined word 0 00001729 D3EE shr si, cl ; extract offset into asmtab 0 0000172B 81C6[0000] add si, asmtab ; -> asmtab sequence 499 500 ; bx-> name of matching mnlist entry 501 ; If this mnemonic is suffixable/suffixed, 502 ; AMF_D32,AMF_D16,AMF_ADDR,AMF_A32 show suffix status 503 ; si-> associated asmtab sequence 504 ; w[ss:sp]-> next field in input line (operand or EOL) 505 506 %if 0 507 508 Now si points to the spot in asmtab corresponding to this mnemonic. 509 The format of the assembler table is as follows. 510 First, there is optionally one of the following bytes: 511 512 ASM_SPECIAL This is a special mnemonic (directive or AAx). 513 ASM_WAIT The instruction is prefixed by a WAIT. 514 ASM_D32 This is a 32-bit instruction variant. 515 ASM_D16 This is a 16-bit instruction variant. 516 517 Then, except for non-AAx ASM_SPECIAL, this is followed by one or 518 more of the following sequences, indicating an instruction variant. 519 520 ASM_LOCKABLE Indicates that this instruction can follow a LOCK prefix. 521 ASM_MACHx Indicates the CPU this instruction requires, 1..6 (186..686). 522 ASM_ESCAPE Escapes a large following word. The assembler table contains 523 as many escapes as necessary; each escape means to add the 524 value of ASM_ESCAPE to the following high byte of the info 525 word. This will easily overflow the word, so a dword is 526 required to process the info word. ASM_ESCAPE currently 527 needs to be equal to ASM_FIRST (ie. the lowest assembler 528 table prefix byte) because otherwise some values would have 529 no valid encoding. _ASM_ESCAPE_USED is a preprocessor 530 variable which will be 0 in case there are no ASM_ESCAPE 531 bytes to be found in the table. 532 [word] This is a 16-bit integer, most significant byte first, giving 533 ASMMOD * a + b, where b is an index into the array opindex 534 (indicating the operand list), and a is as follows (hex): 535 0..FF The (one-byte) instruction. 536 100..1FF The lower 8 bits give the second byte of 537 a two-byte instruction beginning with 0Fh. 538 200..23F Bits 2-0 say which floating point instruction 539 this is (D8h-DFh), and 5-3 give the /r field. 540 240..1247 (a-240h)/8 is the index in the array agroups 541 (which gives the real value of a), and the 542 low-order 3 bits gives the /r field. 543 [byte] This gives the second byte of a floating point 544 instruction if 0D8h <= a <= 0DFh. 545 546 Following these is an ASM_END byte. (ASM_SPECIAL has the same value as 547 ASM_END, but the context allows to decide which one is meant.) 548 549 Exceptions: 550 ASM_SPECIAL are not followed by this opcode information (except AAx). 551 ; ASM_SPECIAL segment, LOCK and REP prefixes are followed by the literal 552 prefix byte. 553 ASM_SPECIAL for all mnemonics except AAx and the prefixes are not 554 followed by anything at all. 555 556 The ASM_ symbols are defined where debugtbl.inc is included in debug.asm. 557 558 %endif 559 560 ; To do: BITS, USE16, USE32, USEAUTO, CPU 0 0000172F AC lodsb ; get a possible prefix 562 .checkprefix: 563 %if 1 0 00001730 3CFF cmp al, ASM_SPECIAL ; a special mnemonic ? 0 00001732 7403E99A00 jne .notspecial ; no --> 566 567 ; Dispatch based on mnemonic. 568 %ifdef MN_O32 0 00001737 31C0 xor ax, ax 0 00001739 81FB[F701] cmp bx, mnlist+MN_O16 0 0000173D 7503E9A600 je aa_sizeprefix ; o16 (ax = 0) --> 0 00001742 40 inc ax 0 00001743 81FB[ED01] cmp bx, mnlist+MN_A16 0 00001747 7503E99C00 je aa_sizeprefix ; a16 (ax = 1) --> 0 0000174C B402 mov ah, 2 0 0000174E 81FB[E801] cmp bx, mnlist+MN_A32 0 00001752 7503E99100 je aa_sizeprefix ; a32 (ax = 201h) --> 0 00001757 48 dec ax 0 00001758 81FB[F201] cmp bx, mnlist+MN_O32 0 0000175C 7503E98700 je aa_sizeprefix ; o32 (ax = 200h) --> 581 %endif 0 00001761 81FB[DF07] cmp bx, mnlist+MN_LOCK 0 00001765 7503E9E800 je aa18_lockrep_prefix ; lock --> 0 0000176A 81FB[030A] cmp bx, mnlist+MN_REP 0 0000176E 7209 jb .notreplock 0 00001770 81FB[1B0A] cmp bx, mnlist+MN_REPNE 0 00001774 7703E9D900 jbe aa18_lockrep_prefix ; rep, repe, repne --> 588 .notreplock: 0 00001779 81FB[3C0A] cmp bx, mnlist+MN_ES 0 0000177D 7209 jb .notseg 591 %ifdef MN_GS 0 0000177F 81FB[500A] cmp bx, mnlist+MN_GS 0 00001783 7703E9B400 jbe aa17_seg_prefix ; single segment prefix --> 594 %else 595 cmp bx, mnlist+MN_DS 596 jbe aa17_seg_prefix ; single segment prefix --> 597 %endif 598 .notseg: 0 00001788 81FB[0802] cmp bx, mnlist+MN_AAD 0 0000178C 7503E97401 je aa_aax ; aad --> 0 00001791 81FB[0D02] cmp bx, mnlist+MN_AAM 0 00001795 7503E96B01 je aa_aax ; aam --> 0 0000179A 833E[0400]00 cmp word [ aa_saved_prefix ], byte 0 0 0000179F 7403E9B700 jne aa13a_error ; if there was a prefix or a segment, error --> 0 000017A4 5E pop si ; get position in input line 606 ;cmp bx, mnlist+MN_SEG 607 ;je aa_seg ; SEG mnemonic, process --> 0 000017A5 81FB[C509] cmp bx, mnlist+MN_ORG 0 000017A9 7503E9B400 je aa_org 0 000017AE B80100 mov ax, 1 0 000017B1 81FB[AB03] cmp bx, mnlist+MN_DD 0 000017B5 7503E9B000 je aa20m_dx ; dd (ax = 1) --> 0 000017BA 40 inc ax 0 000017BB 81FB[B903] cmp bx, mnlist+MN_DW 0 000017BF 7503E9A600 je aa20m_dx ; dw (ax = 2) --> 0 000017C4 40 inc ax 0 000017C5 81FB[A703] cmp bx, mnlist+MN_DB 0 000017C9 7503E99C00 je aa20m_dx ; db (ax = 3) --> 0 000017CE E98A00 jmp aa13a_error ; unhandled special mnemonic --> 620 621 .notspecial: 0 000017D1 2CFC sub al, ASM_D16 ; mnemonic has a prefix ? 0 000017D3 7207 jb .normal ; no --> 0 000017D5 7409 je .d16 ; it is a 16-bit mnemonic form --> 625 %else 626 cmp al, ASM_O16PREF 627 jb .normal ; no special mnemonic --> 628 cmp al, ASM_A32PREF 629 jbe aa_sizeprefix ; 386 address/operand size prefix --> 630 631 sub al, ASM_LOCKREP ; check for mnemonic flag byte, 632 ; and convert it to 0..9 if one 633 jb .normal ; if none --> 634 je aa18_lockrep_prefix ; if LOCK/REP --> 635 cbw 636 dec ax 637 jz aa17_seg_prefix ; if segment prefix (ASM_SEG) --> 638 dec ax 639 jz aa_aax ; if aad or aam (ASM_AAX) --> 640 dec ax 641 jz .d16 ; if ASM_D16 --> 642 cmp al, 3 643 jae aa20 ; if ASM_ORG or ASM_DD or ASM_DW or ASM_DB --> 644 %endif 0 000017D7 0806[0300] or [ asm_mn_flags ], al ; save AMF_D32 or AMF_WAIT (1 or 2) 0 000017DB A8 db __TEST_IMM8 ; (skip dec) 647 .normal: 0 000017DC 4E dec si ; -> first byte of mnemonic info 649 .ab01: 0 000017DD E93501 jmp ab01_process_args ; now process the arguments 651 .d16: 0 000017E0 800E[0300]40 or byte [ asm_mn_flags ], AMF_D16 0 000017E5 46 inc si ; skip the ASM_D32 byte 0 000017E6 EBF5 jmp short .ab01 ; now process the arguments 655 656 %ifdef MN_O32 657 aa_sizeprefix: 658 %if 0 659 sub al, ASM_O16PREF ; 0 = o16, 1 = a16, 2 = o32, 3 = a32 660 mov ah, al 661 and ax, (2<<8)|1 ; ah = 2 if 32-bit prefix, al = 1 if ASIZE 662 %endif 663 %if _PM 664 or ah, byte [ bCSAttr ] 665 jz .nobyte ; 16-bit CS and 16-bit prefix, no output --> 666 cmp ah, 40h| 2 667 je .nobyte ; 32-bit CS and 32-bit prefix, no output --> 668 %else 0 000017E8 84E4 test ah, ah 0 000017EA 7409 jz .nobyte ; 16-bit CS and 16-bit prefix --> 671 %endif 672 673 ; CS differs from the prefix's type. 674 ; Output a prefix byte. 0 000017EC 0466 add al, 66h ; 66h if OSIZE, 67h if ASIZE 0 000017EE BF[0000] mov di, line_out 0 000017F1 AA stosb 0 000017F2 E8D400 call aa_copymem 679 .nobyte: 680 %endif 681 aa_handleprefixes: 0 000017F5 5E pop si 0 000017F6 AC lodsb ; get character 0 000017F7 3C3A cmp al, ':' 0 000017F9 7503 jne .nocolon 0 000017FB E8[0000] call skipwhite ; skip a colon 687 .nocolon: 0 000017FE E8[0000] call iseol? ; end of line? 0 00001801 7403E96BFE jne aa02_parse_mnem ; no, process instruction --> 690 691 ; No instruction follows. 692 ; Write out saved LOCK/REP and/or segment prefix. 0 00001806 A0[0500] mov al, byte [ aa_seg_pre ] 0 00001809 84C0 test al, al 0 0000180B 7409 jz .noseg 0 0000180D BF[0000] mov di, line_out 0 00001810 AA stosb 0 00001811 56 push si 0 00001812 E8B400 call aa_copymem 0 00001815 5E pop si 701 .noseg: 0 00001816 A0[0400] mov al, byte [ aa_saved_prefix ] 0 00001819 84C0 test al, al 0 0000181B 7409 jz .noreplock 0 0000181D BF[0000] mov di, line_out 0 00001820 AA stosb 0 00001821 56 push si 0 00001822 E8A400 call aa_copymem 0 00001825 5E pop si 710 .noreplock: 711 0 00001826 BF[1E00] mov di, a_obstab ; info on this instruction 0 00001829 31C9 xor cx, cx 0 0000182B E8[0000] call sm1 ; get machine message into si, length into cx 0 0000182E E308 jcxz .ac33 ; if no message 0 00001830 BF[0000] mov di, line_out 0 00001833 F3A4 rep movsb ; copy the line to line_out 0 00001835 E8[0000] call putsline_crlf 719 .ac33: 720 721 aa01_j1: 722 %if _IMMASM 0 00001838 FF26[4A00] jmp near [ aa_ret ] ; return to prompt 724 %else 725 jmp aa01_main_loop 726 %endif 727 728 729 %if 0 730 ; SEG directive (segment prefix follows) 731 aa_seg: 732 call skipwhite 733 mov ah, byte [si] 734 and ax, ~2020h 735 mov di, segrgnam 736 mov cx, 6 737 repne scasw 738 jne aa24_error ; if not found 739 push si ; save si in case there's no colon 740 inc si ; skip "?s" 741 call skipwhite 742 pop si 743 call chkeol 744 mov bx, prefixlist + 5 745 sub bx, cx 746 mov al, byte [ bx ] ; look up the prefix byte 747 mov di, line_out 748 stosb 749 push si 750 call aa_copymem 751 pop si 752 jmp short aa01_j1 753 %endif 754 755 ; segment prefix 756 aa17_seg_prefix: 0 0000183C AC lodsb ; get prefix value 0 0000183D 3CF5 cmp al, ASM_MACH1 0 0000183F 7207 jb @F 0 00001841 2CF5 sub al, ASM_MACH1 0 00001843 40 inc ax 0 00001844 A2[1000] mov byte [dismach], al ; save machine type 0 00001847 AC lodsb 764 @@: 0 00001848 A2[0500] mov byte [ aa_seg_pre ], al 0 0000184B 800E[0300]10 or byte [ asm_mn_flags ], AMF_MSEG 0 00001850 EBA3 jmp short aa_handleprefixes 768 769 ; LOCK or REP prefix 770 aa18_lockrep_prefix: 0 00001852 AC lodsb ; get prefix value 0 00001853 8606[0400] xchg al, byte [ aa_saved_prefix ] 0 00001857 84C0 test al, al 0 00001859 749A jz aa_handleprefixes 775 ; if there already was a saved prefix: 776 aa13a_error: 0 0000185B 8B36[0000] mov si, [ aa13a_mnemposition ] 0 0000185F E9[0000] jmp error 779 780 %if 0 781 ; Pseudo ops (org or db/dw/dd). 782 aa20: 783 cmp word [ aa_saved_prefix ], byte 0 784 jne aa13a_error ; if there was a prefix or a segment, error --> 785 pop si ; get position in input line 786 sub al, 3 ; AX=0 if org, 1 if dd, 2 if dw, 3 if db. 787 jne aa20m_dx ; if not ORG 788 %endif 789 790 aa_org: 791 ; Process ORG pseudo op. 0 00001862 AC lodsb 0 00001863 8B1E[0400] mov bx, word [a_addr + saSegSel]; default segment 0 00001867 E982FD jmp aa00a_set_address ; go to top, set address if any given 795 796 ; Data instructions (DB/DW/DD). 797 aa20m_dx: 798 %if _IMMASM 0 0000186A F606[0300]02 testopt [internalflags6], dif6_immasm 0 0000186F 7548 jnz aa24_error 801 %endif 0 00001871 BF[0000] mov di, line_out ; put the bytes here when we get them 0 00001874 93 xchg ax, bx ; mov bx,ax 0 00001875 8A87[2D00] mov al, byte [ aadbsiz+bx ] ; move maximum size 0 00001879 A2[2D00] mov byte [ aadbsiz ], al 0 0000187C D1E3 shl bx, 1 0 0000187E 8B87[3200] mov ax, word [ aadbsto+bx ] ; move address of storage routine 0 00001882 A3[3200] mov word [ aadbsto ],ax 0 00001885 E8[0000] call skipwhite 0 00001888 E8[0000] call iseol? 0 0000188B 7438 je aa27_main_loop ; if end of line 812 813 aa21_dx_loop: 0 0000188D 88C4 mov ah, al 0 0000188F 3C22 cmp al, '"' 0 00001891 7416 je aa22_dx_into_quote ; if string 0 00001893 3C27 cmp al, "'" 0 00001895 7412 je aa22_dx_into_quote ; if string 0 00001897 E8F30A call aageti ; get a numerical value into dx:bx, size into cl 0 0000189A 3A0E[2D00] cmp cl, byte [ aadbsiz ] 0 0000189E 7719 ja aa24_error ; if overflow 0 000018A0 93 xchg ax, bx 0 000018A1 FF16[3200] call near [ aadbsto ] ; store the value 0 000018A5 93 xchg ax, bx 0 000018A6 EB15 jmp short aa26_dx_next ; done with this one 826 827 aa23_dx_quoted_loop: 0 000018A8 AA stosb 829 aa22_dx_into_quote: 0 000018A9 AC lodsb 0 000018AA E8[0000] call iseol?.notsemicolon 0 000018AD 740A je aa24_error ; if end of line (closing quote missing) --> 0 000018AF 38E0 cmp al, ah 0 000018B1 7409 je aa25_dx_out_quote ; if end of string 0 000018B3 81FF[FFFF] cmp di, line_out_end - 1 0 000018B7 76EF jbe aa23_dx_quoted_loop ; if output line not overflowing 837 aa24_error: 0 000018B9 E9[0000] jmp error ; error 839 aa25_dx_out_quote: 0 000018BC AC lodsb 841 aa26_dx_next: 0 000018BD E8[0000] call skipcomm0 0 000018C0 E8[0000] call iseol? 0 000018C3 75C8 jne aa21_dx_loop ; if not end of line 845 846 ; End of line. Copy it to debuggee's memory. 847 aa27_main_loop: 848 %if _IMMASM 0 000018C5 FF36[4A00] push word [ aa_ret ] 850 %else 851 mov ax, aa01_main_loop 852 push ax 853 %endif 854 855 ; INP: di-> behind memory to copy (starts at line_out) 856 ; [a_addr]-> destination 857 ; word [ss:sp] -> in input line behind this prefix 858 ; OUT: memory copied 859 ; a_addr offset updated 860 ; es set to ss 861 ; CHG: (e)si, (e)cx, (e)di 862 aa_copymem: 0 000018C9 BE[0000] mov si, line_out ; ds:si-> data 0 000018CC 89F9 mov cx, di ; -> behind data 0 000018CE 29F1 sub cx, si ; = size of data 866 %if _PM 867 push bx 868 mov bx, word [a_addr + saSegSel] 869 call verifysegm_or_error 870 mov es, bx 871 pop bx 872 %else 0 000018D0 8E06[0400] mov es, word [a_addr + saSegSel] 874 %endif 875 _386_PM_o32 ; mov edi, dword [ a_addr+0 ] 0 000018D4 8B3E[0000] mov di, word [ a_addr+0 ] ; es:(e)di-> destination 877 _386_PM movzx ecx, cx 878 _386_PM movzx esi, si ; fix high words 879 _386_PM_a32 0 000018D8 F3A4 rep movsb ; copy it 881 _386_PM_o32 ; mov dword [ a_addr+0 ], edi 0 000018DA 893E[0000] mov word [ a_addr+0 ], di ; save new address 0 000018DE 16 push ss 0 000018DF 07 pop es 885 %if _IMMASM && (!_IMMASM_AUXBUFF || _AUXBUFFSIZE < (128 + 16)) 0 000018E0 F606[0300]02 testopt [internalflags6], dif6_immasm 0 000018E5 740B jz @F 888 %if _LINK_COMPAT 0 000018E7 81FF[F0FF] cmp di, strict word immasm_length - 16 890 %else 891 cmp di, immasm_length - 16 892 %endif 0 000018EB 7605 jbe @F 0 000018ED 5E pop si ; discard near return address 0 000018EE 5E pop si ; get offset in input line 0 000018EF E9[0000] jmp error 897 898 @@: 899 %endif 0 000018F2 C3 retn 901 902 ; Routines to store a byte/word/dword, 903 ; into a buffer in our memory. 904 aa_sto_dword: 0 000018F3 81FF[FCFF] cmp di, line_out_end - 4 0 000018F7 77C0 ja aa24_error ; if output line overflow --> 0 000018F9 AB stosw ; store a dword value 0 000018FA 92 xchg ax, dx 909 aa_sto_word: 0 000018FB 81FF[FEFF] cmp di, line_out_end - 2 0 000018FF 77B8 ja aa24_error ; if output line overflow --> 0 00001901 AB stosw ; store a word value 0 00001902 C3 retn 914 915 aa_sto_byte: 916 ; cmp di, line_out_end - 1 917 ; ja aa24_error ; if output line overflow --> 918 ; User can provide no more than 256 bytes of input. Every 919 ; byte to DB takes up at least 2 text bytes. line_out is 920 ; >256 bytes. Therefore this cannot overflow. 0 00001903 AA stosb ; store a byte value 0 00001904 C3 retn 923 924 %if _PM && 0 925 aa_use16: 926 cmp word [ aa_saved_prefix ], byte 0 927 jne aa13a_error 928 pop si 929 lodsb 930 call chkeol 931 mov dl, 16 932 jmp short aa_bits.parse 933 934 aa_use32: 935 cmp word [ aa_saved_prefix ], byte 0 936 jne aa13a_error 937 pop si 938 lodsb 939 call chkeol 940 mov dl, 32 941 jmp short aa_bits.parse 942 943 aa_useauto: 944 cmp word [ aa_saved_prefix ], byte 0 945 jne aa13a_error 946 pop si 947 lodsb 948 call chkeol 949 jmp short aa_bits.auto 950 951 aa_bits: 952 cmp word [ aa_saved_prefix ], byte 0 953 jne aa13a_error ; if there was a prefix or a segment, error --> 954 pop si ; get position in input line 955 956 ; Check whether "AUTO" requested. 957 push si 958 lodsw 959 and ax, ~2020h 960 cmp ax, "AU" 961 jne .notauto 962 lodsw 963 and ax, ~2020h 964 cmp ax, "TO" 965 jne .notauto 966 lodsb 967 call iseol? 968 jne .notauto 969 pop ax 970 .auto: 971 xor ax, ax 972 mov al, byte [ bCSAttr+1 ] 973 test al, al ; any saved ? 974 jz aa01_j1 ; no --> 975 mov word [ bCSAttr ], ax ; restore 976 jmp short aa01_j1 977 978 .notauto: 979 pop si 980 lodsb 981 push si 982 nearcall getbyte 983 call chkeol 984 pop si 985 .parse: 986 mov ax, word [ bCSAttr ] 987 or al, 1 988 cmp dl, 16 989 je .16 990 cmp dl, 16h 991 je .16 992 cmp dl, 32 993 je .32 994 cmp dl, 32h 995 jne aa24_error 996 .32: 997 _no386 jmp aa24_error 998 test ah, ah 999 mov ah, al 1000 mov al, 40h 1001 jmp short .save 1002 1003 .16: 1004 test ah, ah 1005 mov ah, al 1006 mov al, 0 1007 .save: 1008 jnz .saved 1009 mov byte [ bCSAttr+1 ], ah 1010 .saved: 1011 mov byte [ bCSAttr ], al 1012 jmp short aa01_j1 1013 %endif 1014 1015 ; Here we process the AAD and AAM instructions. They are special 1016 ; in that they may take a one-byte argument, or none (in which case 1017 ; the argument defaults to 0Ah = ten). 1018 aa_aax: 0 00001905 8936[0600] mov word [ mneminfo ], si ; save this address 0 00001909 5E pop si 0 0000190A AC lodsb 0 0000190B E8[0000] call iseol? 0 0000190E 750B jne ab01b_process_args ; if not end of line --> 0 00001910 BE[4C00] mov si, aam_args ; fake a 0Ah argument if none given 0 00001913 EB05 jmp short ab01a_process_args 1026 1027 1028 ; Process normal instructions. 1029 1030 ; First we parse each argument into the following structure, 1031 ; stored consecutively at line_out, line_out+OPRND_size, etc. 1032 ; 1033 ; For arguments of the form xxxx:yyyyyyyy, xxxx is stored in 1034 ; OPRND.num2, and yyyyyyyy in OPRND.num. The number of bytes 1035 ; in yyyyyyyy is stored in opsize, 2 is stored in OPRND.numadd, 1036 ; and di is stored in xxaddr. 1037 struc OPRND 0 000015CF ?? .flags: resb 1 ; 0 flags (ARG_DEREF, etc) 0 000015D0 ?? .distflags: resb 1 ; 1 distance flags 1040 ; (short = 1, near = 2, far = 4) 0 000015D1 ?? .sizearg: resb 1 ; 2 size argument, if any 1042 ; (1=byte, 2=word, 4=dword, 5=qword, 6=float, 7=double, 8=tbyte) 1043 ; (refer to SIZ_ equs, sizetcnam, and asm_siznum) 0 000015D2 ?? .sizedis: resb 1 ; 3 size of ModR/M displacement 1045 ; 0 = not set yet, 1 = byte, 2 = word, 4 = dword 1046 .reg1: ; 4 ModR/M byte or first register (byte) 0 000015D3 ?? .numadd: resb 1 ; 4 number of additional bytes at num2 (up to 4) 1048 .num2: ; 5 second number (word) 0 000015D4 ?? .reg2: resb 1 ; 5 index register, second register or SIB byte 1050 ; reg2 needs to follow reg1 immediately 0 000015D5 ?? .index: resb 1 ; 6 index factor 0 000015D6 ?? .orednum: resb 1 ; 7 sizes of numbers are ORed here 0 000015D7 ???????? .num: resd 1 ; 8 number 1054 endstruc 1 1055 1056 odfShort: equ 1 1057 odfNear: equ 2 1058 odfFar: equ 4 1059 odfModRM: equ 8 1060 1061 1062 ab01_process_args: 0 00001915 8936[0600] mov word [ mneminfo ], si ; save this address 0 00001919 5E pop si ; get position in line 1065 ab01a_process_args: 0 0000191A AC lodsb 1067 ab01b_process_args: 0 0000191B BF[0000] mov di, line_out 1069 1070 ; Loop over operands. 1071 ab02_process_loop: 0 0000191E E8[0000] call iseol? 0 00001921 7503 jne .ab04 ; if not end of line 0 00001923 E9BF03 jmp ab99_match_args ; to next phase 1075 1076 .ab04: 0 00001926 57 push di ; clear out the next storage area 0 00001927 B90600 mov cx, OPRND_size_w 0 0000192A 31C0 xor ax, ax 0 0000192C F3AB rep stosw 0 0000192E 5F pop di 1082 1083 ; Small loop over "BYTE PTR" and segment prefixes. 1084 ab05_keyword_loop: 0 0000192F 4E dec si 0 00001930 8B04 mov ax, word [ si ] 0 00001932 25DFDF and ax, TOUPPER_W 0 00001935 3D4D4F cmp ax, "MO" 0 00001938 7506 jne .checksize 0 0000193A 804D0108 or byte [di + OPRND.distflags], odfModRM 0 0000193E EB54 jmp .skipalpha 1092 1093 .checksize: 0 00001940 807D0200 cmp byte [ di+OPRND.sizearg ], SIZ_NONE 0 00001944 750C jne .notsize ; if already have a size qualifier ("BYTE PTR",...) 0 00001946 57 push di 0 00001947 BF[7001] mov di, sizetcnam 0 0000194A B90800 mov cx, sizetcnam_size_w 0 0000194D F2AF repne scasw 0 0000194F 5F pop di 0 00001950 742D je .size ; if found --> 1102 .notsize: 1103 .checkdist: 0 00001952 F6450107 test byte [ di + OPRND.distflags ], odfShort | odfNear | odfFar 0 00001956 7541 jnz .notdist 0 00001958 57 push di 0 00001959 BF[8001] mov di, distnam 0 0000195C B90300 mov cx, distnam_size_w 0 0000195F F2AF repne scasw 0 00001961 5F pop di 0 00001962 7535 jne .notdist 0 00001964 85C9 test cx, cx 0 00001966 7509 jnz .dist ; if not "FA" 0 00001968 8A4402 mov al, byte [ si+2 ] 0 0000196B 24DF and al, TOUPPER 0 0000196D 3C52 cmp al, 'R' 0 0000196F 7528 jne .notdist ; if not "FAR" (could be hexadecimal) --> 1118 .dist: 1119 ; 0 = far, 1 = near, 2 = short 0 00001971 80E902 sub cl, distnam_size_w - 1 1121 ; -2 = far, -1 = near, -0 = short 0 00001974 F6D9 neg cl 1123 ; 2 = far, 1 = near, 0 = short 0 00001976 B501 mov ch, 1 0 00001978 D2E5 shl ch, cl 1126 ; 4 = far, 2 = near, 1 = short 1127 ; 1128 ; This matches odfFar = 4, odfNear = 2, odfShort = 1 0 0000197A 086D01 or byte [ di + OPRND.distflags ], ch 0 0000197D EB08 jmp .skipptr 1131 1132 .size: 0 0000197F 80E908 sub cl, sizetcnam_size_w 0 00001982 F6D9 neg cl ; convert to 1..8 0 00001984 884D02 mov byte [ di+OPRND.sizearg ], cl 1136 .skipptr: 0 00001987 E8[0000] call skipalpha ; go to next token 0 0000198A 8A24 mov ah, byte [si] 0 0000198C 25DFDF and ax, TOUPPER_W 0 0000198F 3D5054 cmp ax, "PT" 0 00001992 7503 jne ab05_j1 ; if not "PTR" 1142 .skipalpha: 0 00001994 E8[0000] call skipalpha ; go to next token (ignore "PTR") 1144 ab05_j1: equ $ 0 00001997 EB96 jmp ab05_keyword_loop 1146 1147 .notdist: 0 00001999 E80400 call ab08_keyword_seg 0 0000199C 7531 jne ab09_keyword_done ; not a segment prefix --> 0 0000199E EBF7 jmp short ab05_j1 ; if it was a segment prefix --> 1151 1152 ; Test for and process segment prefix 1153 ; 1154 ; INP: b[aa_seg_pre] 1155 ; si-> string 1156 ; ax = w[si] (uppercased) 1157 ; OUT: NZ if no segment prefix, 1158 ; si unchanged 1159 ; ZR if segment prefix, 1160 ; si-> behind prefix + 1 1161 ; al = character behind prefix 1162 ; CHG: ax, bx, cx 1163 ab08_keyword_seg: 0 000019A0 803E[0500]00 cmp byte [ aa_seg_pre ], 0 0 000019A5 7525 jne .ret ; if we already have a segment prefix --> (NZ) 0 000019A7 57 push di 0 000019A8 BF[4C01] mov di, segrgnam 1168 %ifdef MN_GS 0 000019AB B90600 mov cx, N_SEGREGS 1170 %else 1171 mov cx, N_SEGREGS - 2 1172 %endif 0 000019AE F2AF repne scasw 0 000019B0 5F pop di 0 000019B1 7519 jne .ret ; if not found --> (NZ) 0 000019B3 56 push si ; save si in case there's no colon 0 000019B4 AD lodsw ; skip "?s" 0 000019B5 E8[0000] call skipwhite 0 000019B8 3C3A cmp al, ':' 0 000019BA 7511 jne .retpopsi ; if not followed by ':' --> (NZ) 0 000019BC 58 pop ax ; discard saved si 0 000019BD E8[0000] call skipwhite ; skip it 0 000019C0 BB[FFFF] mov bx, prefixlist.after_segment - 1 0 000019C3 29CB sub bx, cx 0 000019C5 8A07 mov al, byte [ bx ] ; look up the prefix byte 0 000019C7 A2[0500] mov byte [ aa_seg_pre ], al ; save it away 0 000019CA 38C0 cmp al, al ; ZR, valid segment prefix 1188 .ret: 0 000019CC C3 retn 1190 1191 .retpopsi: 0 000019CD 5E pop si 0 000019CE C3 retn 1194 1195 ; Begin parsing main part of argument. 1196 1197 ; First check registers. 1198 ab09_keyword_done: 0 000019CF 57 push di ; check for solo registers 0 000019D0 BF[2C01] mov di, rgnam816 0 000019D3 B91B00 mov cx, N_ALLREGS ; 27 0 000019D6 E8620A call aagetreg 0 000019D9 5F pop di 0 000019DA 727F jc ab14_not_reg ; if not a register 0 000019DC 800D04 or byte [di+OPRND.flags], ARG_JUSTREG 0 000019DF 885D04 mov byte [di+OPRND.reg1], bl ; save register number 0 000019E2 80FB18 cmp bl, 24 ; 0..23 = AL..DH, AX..DI, EAX..EDI 0 000019E5 730B jae .ab09a ; if it's not a normal register 0 000019E7 93 xchg ax, bx ; mov al, bl 0 000019E8 B103 mov cl, 3 0 000019EA D2E8 shr al, cl ; al = size: 0 -> byte, 1 -> word, 2 -> dword 0 000019EC 04FE add al, -2 0 000019EE 1403 adc al, 3 ; convert to 1, 2, 4 (respectively) 1214 ; matching SIZ_BYTE, SIZ_WORD, SIZ_DWORD 0 000019F0 EB5A jmp short ab13_handle_size 1216 1217 .ab09a: 0 000019F2 80350C xor byte [di+OPRND.flags], ARG_JUSTREG|ARG_WEIRDREG 0 000019F5 B002 mov al, SIZ_WORD ; register size 0 000019F7 80FB1E cmp bl, REG_ST ; 24..29 = segment registers 0 000019FA 7737 ja ab11_special_reg; if it's MM, CR, DR, or TR --> 0 000019FC 740C je .ab09b ; if it's ST --> 0 000019FE 80FB1C cmp bl, 28 0 00001A01 7249 jb ab13_handle_size; if it's a non-386 segment register --> 0 00001A03 800E[0300]20 or byte [asm_mn_flags], AMF_FSGS ; else flag it 0 00001A08 EB42 jmp short ab13_handle_size 1227 1228 ; ST registers 1229 .ab09b: 0 00001A0A AC lodsb 1231 ; Check for NASM FPU register notation: ST0..ST7 0 00001A0B 3C30 cmp al, '0' ; digit following ? 0 00001A0D 720B jb .par 0 00001A0F 3C37 cmp al, '7' 0 00001A11 7707 ja .par ; no --> 0 00001A13 2C30 sub al, '0' 0 00001A15 884505 mov byte [di+OPRND.reg2], al ; save number 0 00001A18 EB30 jmp short ab12_size_0 ; --> 1239 1240 .par: 1241 ; Check for MASM FPU register notation: ST(0)..ST(7) 0 00001A1A 3C28 cmp al, '(' ; parenthesis following ? 0 00001A1C 7403 je .ispar ; yes --> 1244 ; Plain ST (= ST0) 0 00001A1E 4E dec si 0 00001A1F EB29 jmp short ab12_size_0 1247 1248 .ispar: 0 00001A21 AC lodsb ; get digit 0 00001A22 2C30 sub al, '0' 0 00001A24 3C07 cmp al, 7 0 00001A26 7708 ja ab10_error ; if not 0..7 0 00001A28 884505 mov byte [di+OPRND.reg2], al ; save the number 0 00001A2B AC lodsb 0 00001A2C 3C29 cmp al, ')' ; validate that there's a closing parenthesis 0 00001A2E 741A je ab12_size_0 ; okay --> 1257 ab10_error: 1258 aa24_j2: 0 00001A30 E986FE jmp aa24_error ; error 1260 1261 ; other registers: 31..34 (MM, CR, DR, TR) 1262 ab11_special_reg: 0 00001A33 AC lodsb 0 00001A34 2C30 sub al, '0' ; get digit 0 00001A36 3C07 cmp al, 7 0 00001A38 77F6 ja ab10_error ; if error --> 0 00001A3A 884505 mov byte [di+OPRND.reg2], al ; save the number 0 00001A3D B004 mov al, SIZ_DWORD ; register size 0 00001A3F 80FB1F cmp bl, REG_MM 0 00001A42 7508 jne ab13_handle_size; if not MM register 0 00001A44 800D04 or byte [di+OPRND.flags], ARG_JUSTREG 0 00001A47 B005 mov al, SIZ_QWORD 0 00001A49 A9 db __TEST_IMM16 ; (skip mov) 1274 ab12_size_0: 0 00001A4A B000 mov al, 0 ; size for ST registers 1276 ab13_handle_size: 0 00001A4C 3A4502 cmp al, byte [di+OPRND.sizearg] ; compare with stated size 0 00001A4F 7407 je .ab13a ; if same 0 00001A51 864502 xchg al, byte [di+OPRND.sizearg] 0 00001A54 84C0 test al, al ; SIZ_NONE ? 0 00001A56 75D8 jnz ab10_error ; if wrong size given, error --> 1282 .ab13a: 0 00001A58 E96C02 jmp ab44 ; done with this operand 1284 1285 ; It's not a register reference. Try for a number. 1286 ab14_not_reg: 0 00001A5B AC lodsb 0 00001A5C E80A09 call aaifnum 0 00001A5F 7236 jc ab17_not_num ; it's not a number 1290 0 00001A61 E82909 call aageti ; get the number 0 00001A64 884D07 mov byte [di+OPRND.orednum], cl 0 00001A67 895D08 mov word [di+OPRND.num+0], bx 0 00001A6A 89550A mov word [di+OPRND.num+2], dx 0 00001A6D E8[0000] call skipwh0 0 00001A70 80F902 cmp cl, 2 0 00001A73 7F22 jg ab17_not_num ; if we can't have a colon here 0 00001A75 3C3A cmp al, ':' 0 00001A77 751E jne ab17_not_num ; if not xxxx:yyyy 0 00001A79 E8[0000] call skipwhite 0 00001A7C E80E09 call aageti 0 00001A7F 8B4D08 mov cx, word [di+OPRND.num+0] 0 00001A82 894D05 mov word [di+OPRND.num2], cx 0 00001A85 895D08 mov word [di+OPRND.num+0], bx 0 00001A88 89550A mov word [di+OPRND.num+2], dx 0 00001A8B 800D20 or byte [di+OPRND.flags], ARG_FARADDR 0 00001A8E E93502 jmp ab43 ; done with this operand 1308 1309 ab15: 0 00001A91 E9E600 jmp ab30 ; do post-processing 1311 1312 ; Check for [...]. 1313 ab16_loop_bracket: 0 00001A94 E8[0000] call skipwhite 1315 ab17_not_num: 0 00001A97 3C5B cmp al, '[' ; begin loop over sets of [] 0 00001A99 75F6 jne ab15 ; if not [ 0 00001A9B 800D01 or byte [di+OPRND.flags], ARG_DEREF ; set the flag 1319 1320 ; Process NASM segment prefix inside brackets if any 0 00001A9E E8[0000] call skipwhite 0 00001AA1 8A24 mov ah, byte [si] 0 00001AA3 25DFDF and ax, TOUPPER_W 0 00001AA6 4E dec si ; set up for ab08 0 00001AA7 E8F6FE call ab08_keyword_seg 0 00001AAA 7403 jz ab19 ; if segment prefix (called skipwhite) 1327 ab18: 0 00001AAC E8[0000] call skipwhite 1329 ab19: 0 00001AAF 3C5D cmp al, ']' ; begin loop within [] 0 00001AB1 74E1 je ab16_loop_bracket ; if done 1332 0 00001AB3 4E dec si 0 00001AB4 8B04 mov ax, word [ si ] 0 00001AB6 25DFDF and ax, TOUPPER_W 1336 .checksize: 0 00001AB9 807D0300 cmp byte [ di + OPRND.sizedis ], SIZ_NONE 0 00001ABD 7527 jne .notsize ; if already have a size qualifier ("BYTE PTR",...) 0 00001ABF 57 push di 0 00001AC0 BF[7001] mov di, sizedisnam 0 00001AC3 B90400 mov cx, sizedisnam_size_w 0 00001AC6 F2AF repne scasw 0 00001AC8 5F pop di 0 00001AC9 751B jne .notsize 1345 1346 .size: 0 00001ACB 80E904 sub cl, sizedisnam_size_w 0 00001ACE F6D9 neg cl ; convert to 1..8 0 00001AD0 884D03 mov byte [ di + OPRND.sizedis ], cl 1350 .skipptr: 0 00001AD3 E8[0000] call skipalpha ; go to next token 0 00001AD6 8A24 mov ah, byte [si] 0 00001AD8 25DFDF and ax, TOUPPER_W 0 00001ADB 3D5054 cmp ax, "PT" 0 00001ADE 7503 jne ab28_j1 ; if not "PTR" 0 00001AE0 E8[0000] call skipalpha ; go to next token (ignore "PTR") 1357 ab28_j1: equ $ 0 00001AE3 E98600 jmp ab28 1359 1360 .notsize: 1361 ; Check for a register (within []). 0 00001AE6 57 push di 0 00001AE7 BF[3C01] mov di, rgnam16 0 00001AEA B90800 mov cx, N_REGS16 0 00001AED E84B09 call aagetreg 0 00001AF0 5F pop di 0 00001AF1 7244 jc ab25 ; if not a register 0 00001AF3 80FB10 cmp bl, 16 0 00001AF6 7305 jae ab20 ; if 32-bit register 0 00001AF8 80C308 add bl, 8 ; adjust 0..7 to 8..15 0 00001AFB EB1E jmp short ab21 1372 ab20: 0 00001AFD 807D0500 cmp byte [di+OPRND.reg2], 0 0 00001B01 7518 jnz ab21 ; if we already have an index 0 00001B03 E8[0000] call skipwhite 0 00001B06 4E dec si 0 00001B07 3C2A cmp al, '*' 0 00001B09 7510 jne ab21 ; if not followed by '*' 0 00001B0B 46 inc si 0 00001B0C 885D05 mov byte [di+OPRND.reg2], bl ; save index register 0 00001B0F E8[0000] call skipwhite 0 00001B12 E87808 call aageti 0 00001B15 E80109 call aaconvindex 0 00001B18 4E dec si 0 00001B19 EB14 jmp short ab23 ; ready for next part 1386 1387 ab21: 0 00001B1B 807D0400 cmp byte [di+OPRND.reg1], 0 0 00001B1F 7505 jne ab22 ; if there's already a register 0 00001B21 885D04 mov byte [di+OPRND.reg1], bl 0 00001B24 EB09 jmp ab23 1392 ab22: 0 00001B26 807D0500 cmp byte [di+OPRND.reg2], 0 0 00001B2A 7508 jne ab24 ; if too many registers 0 00001B2C 885D05 mov byte [di+OPRND.reg2], bl 1396 ab23: 0 00001B2F E8[0000] call skipwhite 0 00001B32 EB38 jmp short ab28 ; ready for next part 1399 1400 ab24: 1401 aa24_j3: 0 00001B34 E982FD jmp aa24_error ; error 1403 1404 ; Try for a number (within []). 1405 ab25: 0 00001B37 AC lodsb 1407 ab26: 0 00001B38 E85208 call aageti ; get a number (or flag an error) 0 00001B3B E8[0000] call skipwh0 0 00001B3E 3C2A cmp al, '*' 0 00001B40 740B je ab27 ; if it's an index factor 0 00001B42 084D07 or byte [di+OPRND.orednum], cl 0 00001B45 015D08 add word [di+OPRND.num+0], bx 0 00001B48 11550A adc word [di+OPRND.num+2], dx 0 00001B4B EB1F jmp short ab28 ; next part ... 1416 1417 ab27: 0 00001B4D E8C908 call aaconvindex 0 00001B50 E8[0000] call skipwhite 0 00001B53 4E dec si 0 00001B54 57 push di 0 00001B55 BF[3C01] mov di, rgnam16 0 00001B58 31C9 xor cx, cx 0 00001B5A E8DE08 call aagetreg 0 00001B5D 5F pop di 0 00001B5E 72D4 jc ab24 ; if error 0 00001B60 807D0500 cmp byte [di+OPRND.reg2], 0 0 00001B64 75CE jne ab24 ; if there is already a register 0 00001B66 885D05 mov byte [di+OPRND.reg2], bl 0 00001B69 E8[0000] call skipwhite 1431 1432 ; Ready for the next term within []. 1433 ab28: 0 00001B6C 3C2D cmp al, '-' 0 00001B6E 74C8 je ab26 ; if a (negative) number is next 0 00001B70 3C2B cmp al, '+' 0 00001B72 7503 jne ab29 ; if no next term (presumably) 0 00001B74 E935FF jmp ab18 1439 ab29: 0 00001B77 E935FF jmp ab19 ; back for more 1441 1442 ; Post-processing for complicated arguments. 1443 ab30: 0 00001B7A 837D0400 cmp word [di+OPRND.reg1], 0 0 00001B7E 756D jne ab32 ; if registers were given ( ==> create MOD R/M) 0 00001B80 807D0700 cmp byte [di+OPRND.orednum], 0 0 00001B84 7424 je ab31 ; if nothing was given ( ==> error) 0 00001B86 803D00 cmp byte [di+OPRND.flags], 0 0 00001B89 7506 jne ab30b ; if it was not immediate 0 00001B8B 800D10 or byte [di+OPRND.flags], ARG_IMMED 1451 ab30a: 0 00001B8E E93501 jmp ab43 ; done with this argument 1453 ab30b: 0 00001B91 800E[0300]80 or byte [asm_mn_flags], AMF_ADDR 0 00001B96 B002 mov al, 2 ; size of the displacement 0 00001B98 F6450704 test byte [di+OPRND.orednum], 4 0 00001B9C 7407 jz ab30c ; if no 32-bit displacement --> 0 00001B9E 40 inc ax 0 00001B9F 40 inc ax ; al = 4 0 00001BA0 800E[0300]04 or byte [asm_mn_flags], AMF_A32 ; 32-bit addressing 1461 ab30c: 0 00001BA5 E80400 call ab_set_sizedis.offset_only 0 00001BA8 EBE4 jmp short ab30a ; done with this argument 1464 ab31: 0 00001BAA EB88 jmp short aa24_j3 ; flag an error 1466 1467 1468 ab_set_sizedis: 1469 1470 ; INP: al = minimum displacement to set 1471 ; byte [di + OPRND.sizedis] = 0 or a given size 1472 .offset_only: 0 00001BAC 384503 cmp byte [di + OPRND.sizedis], al 0 00001BAF 743B je .skip 0 00001BB1 807D0304 cmp byte [di + OPRND.sizedis], SIZ_DWORD 0 00001BB5 7408 je .a32 0 00001BB7 807D0300 cmp byte [di + OPRND.sizedis], SIZ_NONE 0 00001BBB 75ED jne ab31 0 00001BBD EB2A jmp .set_al 1480 1481 .a32: 0 00001BBF 800E[0300]04 or byte [asm_mn_flags], AMF_A32 ; 32-bit addressing 0 00001BC4 C3 retn 1484 1485 ; INP: al = minimum displacement to set 1486 ; byte [di + OPRND.sizedis] = 0 or a given size 1487 ; ah = max displacement (4 if a32, 2 if a16) 1488 ; (only used if al != SIZ_DWORD) 1489 ; cx = ModR/M + SIB calculated so far 1490 ; (used unmodified if al == SIZ_DWORD) 1491 ; (top 2 bits modified if sizedis > al) 1492 ; OUT: byte [di + OPRND.sizedis] = size 1493 ; word [di + OPRND.reg1] = ModR/M + SIB bytes 1494 ; branches to ab31 (error) if invalid sizes specified 1495 .modrm: 0 00001BC5 807D0300 cmp byte [di + OPRND.sizedis], SIZ_NONE 0 00001BC9 741B je .set_al_cx ; trivial case --> 0 00001BCB 384503 cmp byte [di + OPRND.sizedis], al 0 00001BCE 72DA jb ab31 ; specified is smaller than needed --> 0 00001BD0 7414 je .set_al_cx ; same specified as needed --> 1501 1502 ; cannot get here if al = SIZ_DWORD 0 00001BD2 8A4503 mov al, byte [di + OPRND.sizedis] ; get forced size 0 00001BD5 80E13F and cl, ~ (11b << 6) 0 00001BD8 80C940 or cl, 01b << 6 ; set Mod=01b (prepare for byte size) 0 00001BDB 3C01 cmp al, SIZ_BYTE ; byte size ? 0 00001BDD 7407 je .set_al_cx ; yes --> 0 00001BDF 38E0 cmp al, ah ; word/dword size ? 0 00001BE1 75C7 jne ab31 ; no, error --> 1510 .set_modify_cx_2: 0 00001BE3 80F1C0 xor cl, 11b << 6 ; set Mod=10b 1512 1513 .set_al_cx: 0 00001BE6 894D04 mov word [di+OPRND.reg1], cx ; store MOD R/M and maybe SIB 1515 .set_al: 0 00001BE9 884503 mov byte [di + OPRND.sizedis], al ; store displacement size 1517 .skip: 0 00001BEC C3 retn 1519 1520 1521 ; Create the MOD R/M byte. 1522 ; (For disp-only or register, this will be done later as needed.) 1523 ab32: 0 00001BED 800D02 or byte [di+OPRND.flags], ARG_MODRM 0 00001BF0 8A4504 mov al, byte [di+OPRND.reg1] 0 00001BF3 0A4505 or al, byte [di+OPRND.reg2] 0 00001BF6 A810 test al, 10h 0 00001BF8 7525 jnz ab34 ; if 32-bit addressing 0 00001BFA F6450704 test byte [di+OPRND.orednum], 4 0 00001BFE 751F jnz ab34 ; if 32-bit addressing 0 00001C00 800E[0300]80 or byte [asm_mn_flags], AMF_ADDR 0 00001C05 8B4504 mov ax, word [di+OPRND.reg1] ; get reg1 and reg2 0 00001C08 38E0 cmp al, ah 0 00001C0A 7702 ja ab33 ; make sure al >= ah 0 00001C0C 86C4 xchg al, ah 1536 ab33: 0 00001C0E 57 push di 0 00001C0F BF[3A00] mov di, modrmtab 0 00001C12 B90800 mov cx, 8 0 00001C15 F2AF repne scasw 0 00001C17 5F pop di 0 00001C18 7590 jne ab31 ; if not among the possibilities (error) 0 00001C1A BB0602 mov bx, 206h ; max disp = 2 bytes; 6 ==> (non-existent) [bp] 0 00001C1D EB65 jmp short ab39 ; done (just about) 1545 1546 ; 32-bit addressing 1547 ab34: 0 00001C1F 800E[0300]84 or byte [asm_mn_flags], AMF_A32 | AMF_ADDR ; 32-bit addressing 1549 %if 0 1550 mov al, byte [di+OPRND.reg1] 1551 or al, byte [di+OPRND.index] 1552 jnz ab35 ; if we can't optimize [Exx*1] to [Exx] 1553 mov ax, word [di+OPRND.reg1] 1554 xchg al, ah 1555 mov word [di+OPRND.reg1], ax 1556 ab35: 1557 %endif 0 00001C24 BB0504 mov bx, 405h ; max disp = 4 bytes; 5 ==> (non-existent) [bp] 0 00001C27 807D0500 cmp byte [di+OPRND.reg2], 0 0 00001C2B 7513 jne ab36 ; if there's a SIB 0 00001C2D 8A4D04 mov cl, byte [di+OPRND.reg1] 0 00001C30 80F910 cmp cl, 16 0 00001C33 7D03E972FF jl ab31 ; if wrong register type 0 00001C38 80E107 and cl, 7 0 00001C3B 80F904 cmp cl, 4 ; check for ESP 0 00001C3E 7544 jne ab39 ; if not, then we're done (otherwise do SIB) 1567 1568 ab36: 0 00001C40 800E[0300]08 or byte [asm_mn_flags], AMF_SIB ; form SIB 0 00001C45 8A6D06 mov ch, byte [di+OPRND.index] ; get SS bits 0 00001C48 B103 mov cl, 3 0 00001C4A D2E5 shl ch, cl ; shift them halfway into place 0 00001C4C 8A4505 mov al, byte [di+OPRND.reg2] ; index register 0 00001C4F 3C14 cmp al, 20 0 00001C51 7503E954FF je ab31 ; if ESP ( ==> error) 0 00001C56 3C00 cmp al, 0 0 00001C58 7502 jne ab37 ; if not zero 0 00001C5A B014 mov al, 20 ; set it for index byte 4 1579 ab37: 0 00001C5C 3C10 cmp al, 16 0 00001C5E 7D03E947FF jl ab31 ; if wrong register type 0 00001C63 2407 and al, 7 0 00001C65 08C5 or ch, al ; put it into the SIB 0 00001C67 D2E5 shl ch, cl ; shift it into place 0 00001C69 41 inc cx ; R/M for SIB = 4 0 00001C6A 8A4504 mov al, byte [di+OPRND.reg1] ; now get the low 3 bits 0 00001C6D 84C0 test al, al 0 00001C6F 7505 jnz ab38 ; if there was a first register 0 00001C71 80CD05 or ch, 5 0 00001C74 EB4B jmp short ab42_no_pop ; MOD = 0, disp is 4 bytes 1591 1592 ab38: 0 00001C76 3C10 cmp al, 16 0 00001C78 7C68 jl ab45 ; if wrong register type 0 00001C7A 2407 and al, 7 ; first register 0 00001C7C 08C5 or ch, al ; put it into the SIB 0 00001C7E 88FC mov ah, bh ; longest displacement 0 00001C80 3C05 cmp al, 5 0 00001C82 7408 je ab40 ; if it's EBP, then we don't recognize disp=0 1600 ; otherwise bl will be set to 0 1601 1602 ; Find the size of the displacement. 1603 ab39: 0 00001C84 88FC mov ah, bh ; longest displacement 0 00001C86 38D9 cmp cl, bl 0 00001C88 7402 je ab40 ; if it's [(E)BP], then disp=0 is still 1 byte 0 00001C8A B300 mov bl, 0 ; allow 0-byte disp 1608 1609 ab40: 0 00001C8C 50 push ax 0 00001C8D 51 push cx 0 00001C8E 8A4508 mov al, byte [di+OPRND.num+0] 0 00001C91 B107 mov cl, 7 0 00001C93 D2F8 sar al, cl 0 00001C95 59 pop cx 0 00001C96 8A6509 mov ah, byte [di+OPRND.num+1] 0 00001C99 38E0 cmp al, ah 0 00001C9B 7520 jne ab41 ; if it's bigger than 1 byte 1619 1620 ; Special case for "mov dx, [bx + FFFF]", an 1621 ; a16 with negative disp8, high word zero. 0 00001C9D F606[0300]04 testopt [asm_mn_flags], AMF_A32 0 00001CA2 7506 jnz @F 0 00001CA4 837D0A00 cmp word [di + OPRND.num + 2], 0 1625 ; high word is zero ? 0 00001CA8 7405 je @FF ; yes, do not require sign extension --> 1627 @@: 0 00001CAA 3B450A cmp ax, word [di + OPRND.num + 2] 1629 ; high word is sign extension ? 0 00001CAD 750E jne ab41 ; no, need more than 1 byte --> 1631 @@: 0 00001CAF B700 mov bh, 0 ; no displacement 0 00001CB1 0A5D08 or bl, byte [di+OPRND.num+0] 0 00001CB4 740A jz ab42 ; if disp = 0 and it's not (E)BP 0 00001CB6 FEC7 inc bh ; disp = 1 byte 0 00001CB8 80C940 or cl, 40h ; set MOD = 1 0 00001CBB EB03 jmp short ab42 ; done 1638 1639 ab41: 0 00001CBD 80C980 or cl, 80h ; set MOD = 2 1641 1642 ab42: 0 00001CC0 58 pop ax ; ah = max displacement 1644 ab42_no_pop: ; here bh = SIZ_DWORD 0 00001CC1 88F8 mov al, bh ; al = displacement, ah = max displacement 0 00001CC3 E8FFFE call ab_set_sizedis.modrm 1647 1648 ; Finish up with the operand. 1649 ab43: 0 00001CC6 4E dec si 1651 ab44: 0 00001CC7 E8[0000] call skipwhite 0 00001CCA 83C70C add di, byte OPRND_size 0 00001CCD E8[0000] call iseol? 0 00001CD0 7413 je ab99_match_args ; if end of line --> 0 00001CD2 3C2C cmp al, ',' 0 00001CD4 750C jne ab45 ; if not comma ( ==> error) 0 00001CD6 81FF[2400] cmp di, line_out+3*OPRND_size 0 00001CDA 7306 jae ab45 ; if too many operands 0 00001CDC E8[0000] call skipwhite 0 00001CDF E93CFC jmp ab02_process_loop 1662 1663 ab45: 0 00001CE2 E9D4FB jmp aa24_error ; error jump 1665 1666 ab99_match_args: 0 00001CE5 C605FF mov byte [di+OPRND.flags], -1 ; end of parsing phase 1668 1669 %if 0 1670 For the next phase, we match the parsed arguments with the set of 1671 permissible argument lists for the opcode. The first match wins. 1672 Therefore the argument lists should be ordered such that the 1673 cheaper ones come first. 1674 1675 There is a tricky issue regarding sizes of memory references. 1676 Here are the rules: 1677 1. If a memory reference is given with a size, then it's OK. 1678 2. If a memory reference is given without a size, but some 1679 other argument is a register (which implies a size), 1680 then the memory reference inherits that size. 1681 Exceptions: OP_CL does not imply a size (it's the shift counter) 1682 OP_SHOSIZ 1683 3. If 1 and 2 do not apply, but this is the last possible argument 1684 list, and if the argument list requires a particular size, then 1685 that size is used. 1686 4. In all other cases, flag an error. 1687 %endif 1688 1689 ac01: 0 00001CE8 31C0 xor ax, ax 0 00001CEA BF[0800] mov di, rmaddr 0 00001CED B90800 mov cx, 8 0 00001CF0 F3AB rep stosw ; clear variant-specific variables 1694 ; cx = 0 0 00001CF2 8B36[0600] mov si, word [mneminfo] 1696 ; -> the next argument variant 1697 %if _ASM_ESCAPE_USED 0 00001CF6 31DB xor bx, bx ; cx:bx = counter of ASM_ESCAPEs 1699 %endif 1700 ; Parse the variant's assembler table entry 1701 ; si-> next argument variant 1702 ; variant-specific variables cleared 1703 ; cx:bx = 0 1704 1705 ac02: 0 00001CF8 AC lodsb 1707 %if _ASM_ESCAPE_USED 0 00001CF9 3CF4 cmp al, ASM_ESCAPE 0 00001CFB 750B jne .notescape 0 00001CFD 81C300F4 add bx, ASM_ESCAPE << 8 0 00001D01 83D100 adc cx, byte 0 0 00001D04 7219 jc ac04 ; if this branches, too many escapes --> 0 00001D06 EBF0 jmp short ac02 1714 .notescape: 1715 %endif 0 00001D08 2CF5 sub al, ASM_MACH1 0 00001D0A 7216 jb ac05 ; if no more special bytes 0 00001D0C 3C06 cmp al, ASM_LOCKABLE-ASM_MACH1 0 00001D0E 7408 je ac03 ; if ASM_LOCKABLE 0 00001D10 770D ja ac04 ; if ASM_END or another (--> error) 0 00001D12 40 inc ax 0 00001D13 A2[1000] mov byte [dismach], al ; save machine type 0 00001D16 EBE0 jmp short ac02 ; back for next byte 1724 ac03: 0 00001D18 800E[1400]01 or byte [varflags], VAR_LOCKABLE 0 00001D1D EBD9 jmp short ac02 ; back for next byte 1727 1728 ac04: 0 00001D1F E939FB jmp aa13a_error ; error 1730 1731 ; Get and unpack the word. 1732 ac05: 0 00001D22 4E dec si 0 00001D23 AD lodsw 0 00001D24 86C4 xchg al, ah ; put into little-endian order 0 00001D26 31D2 xor dx, dx 1737 %if _ASM_ESCAPE_USED 0 00001D28 01D8 add ax, bx ; add in the ASM_ESCAPE adjustment 0 00001D2A 11CA adc dx, cx ; account for overflow (cx = 0) 1740 %endif 0 00001D2C BB8600 mov bx, ASMMOD 0 00001D2F F7F3 div bx ; ax = a_opcode; dx = index into opindex 0 00001D31 A3[1A00] mov word [a_opcode], ax ; save ax 0 00001D34 A3[1C00] mov word [a_opcode2], ax ; save the second copy 0 00001D37 3DDF00 cmp ax, 0DFh ; a coprocessor instruction ? 0 00001D3A 7717 ja ac05a 0 00001D3C 3CD8 cmp al, 0D8h 0 00001D3E 7213 jb ac05a ; if no coprocessor instruction --> 0 00001D40 800E[1100]01 or byte [dmflags], DM_COPR ; flag it as an x87 instruction 0 00001D45 88C4 mov ah, al ; ah = low order byte of opcode 0 00001D47 AC lodsb ; get extra byte 0 00001D48 A2[0A00] mov byte [regmem], al ; save it in regmem 0 00001D4B A3[1C00] mov word [a_opcode2], ax ; save this for obsolete-instruction detection 0 00001D4E 800E[1400]02 or byte [varflags], VAR_MODRM ; flag its presence 1755 ac05a: 0 00001D53 8936[0600] mov [mneminfo], si ; save si back again 0 00001D57 89D6 mov si, dx 1758 %if ASMMOD > 0FFh 1759 xor bx, bx 1760 %endif 0 00001D59 8A9C[7C16] mov bl, byte [opindex+si] 0 00001D5D 01D2 add dx, dx 0 00001D5F 4A dec dx 0 00001D60 01D3 add bx, dx ; adjust to get correct index into oplists 0 00001D62 8DB7[0000] lea si, [oplists+bx] ; si = the address of our operand list 0 00001D66 BF[0000] mov di, line_out 1767 1768 ; Begin loop over operands. 1769 ; [a_opcode] etc set for opcode 1770 ; si-> operand list 1771 ; di-> next parsed operand 1772 ; [mneminfo]-> mnemonic's next variant in assembler table 1773 ac06: 0 00001D69 AC lodsb ; get next operand byte 0 00001D6A 3C00 cmp al, OP_END 0 00001D6C 7478 je ac10 ; if end of list 1777 1778 ; The OP_STACK_* operand types don't really need another 1779 ; operand structure. So handle them before checking for 1780 ; a valid operand structure. This is required for the 1781 ; cases with no regular operands following the stack hint. 1782 ; Because they aren't needed by the assembler anyway we 1783 ; just loop back to ac06 to load the next operand type. 1784 %if (OP_STACK_PUSH + 1 != OP_STACK_POP) || (OP_STACK_POP + 1 != OP_STACK_SPECIAL) 1785 %error Unexpected layout 1786 %endif 0 00001D6E 3C24 cmp al, OP_STACK_PUSH 0 00001D70 7204 jb @F ; below stack hinting operand types --> 0 00001D72 3C26 cmp al, OP_STACK_SPECIAL 0 00001D74 76F3 jbe ac06 ; in range of the stack hinting operand types --> 1791 @@: 1792 1793 ; Actual operand, or one of these always followed by one 1794 ; or more actual operands (OP_M_*, OP_SHORT|NEAR|FAR), 1795 ; so check for another valid operand structure. 0 00001D76 803DFF cmp byte [di+OPRND.flags], -1 0 00001D79 7468 je ac01_j1 ; if too few operands were given 0 00001D7B 3C40 cmp al, OP_SIZE 0 00001D7D 720E jb ac07 ; if no size needed 1800 %if 1 0 00001D7F B400 mov ah, 0 0 00001D81 B104 mov cl, 4 0 00001D83 D3E0 shl ax, cl ; move bits 4..7 (size) to ah (OP_1632=5, OP_8=6, OP_16=7, ...) 0 00001D85 D2E8 shr al, cl ; move bits 0..3 back 1805 %else 1806 aam 16 ; ax=00XY -> ax=0X0Y 1807 %endif 0 00001D87 8826[1800] mov byte [a_reqsize], ah ; save it away 0 00001D8B EB02 jmp short ac08 1810 1811 ac07: ; al = OP_M64.. 1812 ; have al = 1..x 1813 ; want al = 16..y 0 00001D8D 040F add al, 16-1 ; adjust for the 16 start entries in asmjmp 1815 1816 ac08: 0 00001D8F 98 cbw ; al = 0..7 or 16..y, 1818 ; al < 128, thus ax = al 0 00001D90 93 xchg ax, bx ; now bx contains the index 0 00001D91 8A87[4E00] mov al, byte [bittab+bx] 0 00001D95 D1E3 shl bx, 1 ; = offset into word array 0 00001D97 8B8F[9200] mov cx, word [asmjmp + bx] 1823 ; subroutine address 0 00001D9B D1EB shr bx, 1 ; return to index 0 00001D9D 83FB43 cmp bx, OP_AMOUNT_TABLE 0 00001DA0 7335 jae ac09_internal_error ; internal error 0 00001DA2 8405 test al, byte [di+OPRND.flags] 0 00001DA4 743D jz ac09 ; if no required bits are present 0 00001DA6 B400 mov ah, 0 ; (insure ah = 0 for ao90) 0 00001DA8 FFD1 call cx ; call its specific routine 0 00001DAA A0[1500] mov al, [alloweddist] 0 00001DAD F6D0 not al 0 00001DAF 2407 and al, odfShort | odfNear | odfFar 0 00001DB1 844501 test byte [di + OPRND.distflags], al 0 00001DB4 752D jnz ac09 ; if invalid distance specified --> 1836 0 00001DB6 A1[1600] mov ax, word [modrmalready] 0 00001DB9 F6450108 test byte [di + OPRND.distflags], odfModRM 0 00001DBD 7405 jz @F 0 00001DBF 3D00FF cmp ax, 0FF00h ; modrmflag set, modrmalready clear ? 0 00001DC2 751F jne ac09 ; no --> 1842 @@: 0 00001DC4 08E0 or al, ah ; al |= prior modrmflag 0 00001DC6 B400 mov ah, 0 ; clear modrmflag 0 00001DC8 A3[1600] mov word [modrmalready], ax 1846 0 00001DCB 817CFF5456 cmp word [si-1], (OP_1632|OP_R)<<8|(OP_1632|OP_R_MOD) 0 00001DD0 7403 je ac06_j1 ; (hack) for IMUL instruction 0 00001DD2 83C70C add di, byte OPRND_size 1850 ; -> next operand 1851 ac06_j1: 0 00001DD5 EB92 jmp ac06 ; back for more 1853 1854 ac09_internal_error: 0 00001DD7 B80D01 mov ax, 010Dh 0 00001DDA E8[0000] call setrc 0 00001DDD BA[0000] mov dx, msg.aa_internal_error 0 00001DE0 E8[0000] call putsz 1859 ac09: 1860 ac01_j1: 0 00001DE3 E902FF jmp ac01 ; back to next possibility 1862 1863 ; End of operand list. 1864 ac10: 0 00001DE6 803DFF cmp byte [di+OPRND.flags], -1 0 00001DE9 75F8 jne ac09 ; if too many operands were given 1867 0 00001DEB F606[1400]02 test byte [varflags], VAR_MODRM 0 00001DF0 740C jz @F ; if no ModR/M --> 0 00001DF2 803E[0A00]C0 cmp byte [regmem], 0C0h 0 00001DF7 7205 jb @F ; if not both high bits set --> 1872 ; both bits are set, ModR/M is for a register operand 0 00001DF9 8026[1400]7F clropt [varflags], VAR_M_ALWAYS_16 1874 ; do not special case mov with segreg and a GPR 1875 @@: 1876 1877 ; Final check on sizes 0 00001DFE A0[1400] mov al, byte [varflags] 0 00001E01 A810 test al, VAR_SIZ_NEED 0 00001E03 7414 jz ac12 ; if no size needed 0 00001E05 A804 test al, VAR_SIZ_GIVN 0 00001E07 7510 jnz ac12 ; if a size was given 0 00001E09 A808 test al, VAR_SIZ_FORCD 0 00001E0B 74D6 jz ac09 ; if the size was not forced ( ==> reject) 0 00001E0D 8B36[0600] mov si, word [mneminfo] 0 00001E11 803CFF cmp byte [si], ASM_END 0 00001E14 7403 je ac12 ; if this is the last one 1888 ac11: 0 00001E16 E942FA jmp aa13a_error ; it was not, error --> (not a retry) 1890 1891 ac12: 0 00001E19 A880 test al, VAR_M_ALWAYS_16 0 00001E1B 740E jz @F 0 00001E1D A0[1300] mov al, byte [opsize] 0 00001E20 3C00 cmp al, SIZ_NONE 0 00001E22 7407 je @F 0 00001E24 3C02 cmp al, SIZ_WORD 0 00001E26 7403 je @F 0 00001E28 E930FA jmp aa13a_error 1900 @@: 1901 1902 ; Check other prefixes. 0 00001E2B A0[0400] mov al, byte [aa_saved_prefix] 0 00001E2E 3C00 cmp al, 0 0 00001E30 7421 je ac14 ; if no saved prefixes to check 0 00001E32 3CF0 cmp al, 0F0h 0 00001E34 7509 jne ac13 ; if it's a rep prefix 0 00001E36 F606[1400]01 test byte [varflags], VAR_LOCKABLE 0 00001E3B 74D9 jz ac11 ; if this variant is not lockable, error --> 0 00001E3D EB14 jmp short ac14 ; done 1911 1912 ac13: 0 00001E3F A1[1A00] mov ax, word [a_opcode] ; check if opcode is OK for rep{,z,nz} 0 00001E42 24FE and al, ~1 ; clear low order bit (MOVSW -> MOVSB) 1915 0 00001E44 3DFF00 cmp ax, 0FFh 0 00001E47 77CD ja ac11 ; if it's not a 1-byte instruction, error --> 0 00001E49 BF[0000] mov di, replist ; list of instructions that go with rep 0 00001E4C B9[0000] mov cx, REP_LEN ; scan all (REP + REPxx) 0 00001E4F F2AE repne scasb 0 00001E51 75C3 jne ac11 ; if it's not among them, error --> 1922 1923 ac14: 0 00001E53 F606[0300]10 test byte [asm_mn_flags], AMF_MSEG 0 00001E58 7412 jz ac15 ; if no segment prefix before mnemonic --> 0 00001E5A A1[1A00] mov ax, word [a_opcode] ; check if opcode allows this 0 00001E5D 3DFF00 cmp ax, 0FFh 0 00001E60 77B4 ja ac11 ; if it's not a 1-byte instruction, error --> 0 00001E62 BF[0000] mov di, segprfxtab 0 00001E65 B9[0000] mov cx, SEGP_LEN 0 00001E68 F2AE repne scasb 0 00001E6A 75AA jne ac11 ; if it's not in the list, error --> 1933 1934 ac15: 0 00001E6C 8B1E[0C00] mov bx, word [immaddr] 0 00001E70 09DB or bx, bx 0 00001E72 740C jz ac16 ; if no immediate data 0 00001E74 A0[1300] mov al, byte [opsize] 0 00001E77 F6D8 neg al 0 00001E79 D0E0 shl al, 1 1941 ; This use is why the :F2/:F3 forms of jmp and call in 1942 ; instr.set must be before :0C/:GC. The OP_REL1632 code 1943 ; (even if it ultimately fails due to FAR distance) does 1944 ; overwrite this variable (writing to dword [OPRND.num2]) 1945 ; so the check here may fail. If the OP_FAR_OFFSET oplist 1946 ; comes first then OPRND.orednum is preserved up to here. 0 00001E7B 844707 test al, byte [bx + OPRND.orednum] 0 00001E7E 7596 jnz ac11 ; if the immediate data was too big, error --> 1949 1950 ; Put the instruction together 1951 ; (maybe is this why they call it an assembler) 1952 1953 ; First, the prefixes (including preceding WAIT instruction) 1954 ac16: 1955 _386_PM_o32 ; mov edi, dword [a_addr] 0 00001E80 8B3E[0000] mov di, word [a_addr] 1957 %if _PM 1958 mov bx, word [a_addr + saSegSel] 1959 call verifysegm_or_error 1960 mov es, bx 1961 %else 0 00001E84 8E06[0400] mov es, word [a_addr + saSegSel] 1963 %endif 0 00001E88 F606[0300]02 test byte [asm_mn_flags], AMF_WAIT 0 00001E8D 7403 jz .nowaitprefix ; if no wait instruction beforehand 0 00001E8F B09B mov al, 9Bh 1967 _386_PM_a32 0 00001E91 AA stosb 1969 .nowaitprefix: 1970 0 00001E92 A0[0400] mov al,[aa_saved_prefix] 0 00001E95 84C0 test al, al 0 00001E97 7401 jz .noprefix ; if no LOCK or REP prefix 1974 _386_PM_a32 0 00001E99 AA stosb 1976 .noprefix: 1977 1978 ;--- a 67h address size prefix is needed 1979 ;--- 1. for CS16: if AMF_ADDR=1 and AMF_A32=1 1980 ;--- 2. for CS32: if AMF_ADDR=1 and AMF_A32=0 1981 0 00001E9A A0[0300] mov al, byte [asm_mn_flags] 0 00001E9D A880 test al, AMF_ADDR 0 00001E9F 7407 jz .noaddressprefix 0 00001EA1 2404 and al, AMF_A32 1986 %if _PM 1987 or al, byte [bCSAttr] 1988 jz .noaddressprefix ; if 16-bit CS and 16-bit addressing --> 1989 cmp al, AMF_A32| 40h 1990 jz .noaddressprefix ; if 32-bit CS and 32-bit addressing --> 1991 %else 0 00001EA3 7403 jz .noaddressprefix ; 16-bit addressing in RM --> 1993 %endif 1994 ; Otherwise, the CS and addressing bitness mismatch. Write a prefix. 0 00001EA5 B067 mov al, 67h 1996 _386_PM_a32 0 00001EA7 AA stosb ; store address size prefix 1998 .noaddressprefix: 1999 2000 ;--- a 66h data size prefix is needed 2001 ;--- for CS16: if VAR_D32 == 1 or AMF_D32 == 1 2002 ;--- for CS32: if VAR_D16 == 1 or AMF_D16 == 1 2003 0 00001EA8 F606[1400]80 testopt [varflags], VAR_M_ALWAYS_16 0 00001EAD 750F jnz .nodataprefix ; mov segreg never emits an osize --> 0 00001EAF 8A26[0300] mov ah, byte [asm_mn_flags] 0 00001EB3 A0[1400] mov al, byte [varflags] 2008 %if _PM 2009 test byte [bCSAttr], 40h 2010 jz .dataprefix_rm 2011 test ax, VAR_D16|(AMF_D16<<8) 2012 jnz .dataprefix 2013 jmp short .nodataprefix 2014 .dataprefix_rm: 2015 %endif 0 00001EB6 A94001 test ax, VAR_D32|(AMF_D32<<8) 0 00001EB9 7403 jz .nodataprefix 2018 .dataprefix: 0 00001EBB B066 mov al, 66h 2020 _386_PM_a32 0 00001EBD AA stosb ; store operand size prefix 2022 .nodataprefix: 2023 0 00001EBE A0[0500] mov al, [aa_seg_pre] 0 00001EC1 3C00 cmp al, 0 0 00001EC3 740A je ac22 ; if no segment prefix 2027 _386_PM_a32 0 00001EC5 AA stosb 0 00001EC6 3C64 cmp al, 64h 0 00001EC8 7205 jb ac22 ; if not 64 or 65 (FS or GS) --> 0 00001ECA 800E[0300]20 or byte [asm_mn_flags], AMF_FSGS ; flag it 2032 ac22: 2033 2034 ; Now emit the instruction itself. 0 00001ECF A1[1A00] mov ax, word [a_opcode] 0 00001ED2 89C3 mov bx, ax 0 00001ED4 81EB4002 sub bx, 240h 0 00001ED8 7317 jae ac23 ; if 576.. (AGRP) --> 0 00001EDA 3D0002 cmp ax, 200h 0 00001EDD 7229 jb ac24 ; if regular instruction --> 0 00001EDF 800E[1100]01 or byte [dmflags], DM_COPR ; flag it as an x87 instruction 0 00001EE4 2438 and al, 38h ; get register part 0 00001EE6 0806[0A00] or byte [regmem], al 0 00001EEA 93 xchg ax, bx ; mov ax, bx (the low bits of bx are good) 0 00001EEB 2407 and al, 7 0 00001EED 0CD8 or al, 0D8h 0 00001EEF EB20 jmp short ac25 ; on to decoding the instruction 2048 2049 ac23: 0 00001EF1 800E[1400]02 or byte [varflags], VAR_MODRM ; flag presence of ModR/M byte 0 00001EF6 B103 mov cl, 3 ; one instruction of a group 0 00001EF8 D3EB shr bx, cl ; separate AGRP()'s num part 0 00001EFA 2407 and al, 7 ; separate ModR/M register value 0 00001EFC D2E0 shl al, cl 0 00001EFE 0806[0A00] or byte [regmem], al ; fix ModR/M byte 0 00001F02 D1E3 shl bx, 1 0 00001F04 8B87[C401] mov ax, word [agroups+bx] ; get actual opcode 2058 2059 ac24: 0 00001F08 84E4 test ah, ah 0 00001F0A 7405 jz ac25 ; if no 0Fh first --> 0 00001F0C 50 push ax ; store a 0Fh 0 00001F0D B00F mov al, 0Fh 2064 _386_PM_a32 0 00001F0F AA stosb 0 00001F10 58 pop ax 2067 ac25: 0 00001F11 0A06[1200] or al, byte [opcode_or] ; put additional bits into the opcode 2069 _386_PM_a32 0 00001F15 AA stosb ; store the op code itself 2071 2072 ; Now store the extra stuff that comes with the instruction. 0 00001F16 A1[0A00] mov ax, word [regmem] 0 00001F19 F606[1400]02 test byte [varflags], VAR_MODRM 0 00001F1E 740B jz ac26 ; if no ModR/M --> 2076 _386_PM_a32 0 00001F20 AA stosb ; store the ModR/M byte 0 00001F21 F606[0300]08 test byte [asm_mn_flags], AMF_SIB 0 00001F26 7403 jz ac26 ; if no SIB --> 0 00001F28 88E0 mov al, ah 2081 _386_PM_a32 0 00001F2A AA stosb ; store the SIB byte, too 2083 ac26: 2084 0 00001F2B 8B1E[0800] mov bx, word [rmaddr] 0 00001F2F 85DB test bx, bx 0 00001F31 740A jz ac27 ; if no offset associated with the R/M --> 2088 _386_PM_o32 ; xor ecx, ecx 0 00001F33 31C9 xor cx, cx 0 00001F35 8A4F03 mov cl, byte [bx+OPRND.sizedis] 2091 _386_PM_o32 ; lea esi, [bx+OPRND.num] 0 00001F38 8D7708 lea si, [bx+OPRND.num] 2093 _386_PM_a32 0 00001F3B F3A4 rep movsb ; store the R/M offset (or memory offset) 2095 ac27: 2096 2097 ; Now store immediate data 0 00001F3D 8B1E[0C00] mov bx, word [immaddr] 0 00001F41 85DB test bx, bx 0 00001F43 740B jz ac28 ; if no immediate data --> 2101 _386_PM_o32 ; xor ecx, ecx 0 00001F45 31C9 xor cx, cx 0 00001F47 8A0E[1300] mov cl, byte [opsize] 2104 _386_PM_o32 ; lea esi, [bx+OPRND.num] 0 00001F4B 8D7708 lea si, [bx+OPRND.num] 2106 _386_PM_a32 0 00001F4E F3A4 rep movsb 2108 ac28: 2109 2110 ; Now store additional bytes (needed for, e.g., enter instruction 2111 ; and far memory address) 0 00001F50 8B1E[0E00] mov bx, word [xxaddr] 0 00001F54 85DB test bx, bx 0 00001F56 7409 jz ac29 ; if no additional data --> 2115 _386_PM_o32 ; lea esi, [bx+OPRND.numadd] 0 00001F58 8D7704 lea si, [bx+OPRND.numadd] 2117 _386_PM_o32 ; xor eax, eax 0 00001F5B 31C0 xor ax, ax 0 00001F5D AC lodsb 2120 _386_PM_o32 ; xchg eax, ecx 0 00001F5E 91 xchg ax, cx ; (mov cx, ax) 2122 _386_PM_a32 0 00001F5F F3A4 rep movsb 2124 ac29: 2125 2126 ; Done emitting. Update assembler address offset. 0 00001F61 16 push ss 0 00001F62 07 pop es ; restore es 2129 _386_PM_o32 ; mov dword [a_addr], edi 0 00001F63 893E[0000] mov word [a_addr], di 2131 2132 ; Compute machine type. 0 00001F67 803E[1000]03 cmp byte [dismach], 3 0 00001F6C 7313 jae ac31 ; if we already know a 386 is needed 0 00001F6E F606[0300]25 test byte [asm_mn_flags], AMF_D32 | AMF_A32 | AMF_FSGS 0 00001F73 7507 jnz ac30 ; if 386 --> 0 00001F75 F606[1400]40 test byte [varflags], VAR_D32 0 00001F7A 7405 jz ac31 ; if not 386 --> 2139 ac30: 0 00001F7C C606[1000]03 mov byte [dismach], 3 2141 ac31: 0 00001F81 BF[1E00] mov di, a_obstab ; info on this instruction 0 00001F84 8B0E[1C00] mov cx, word [a_opcode2] 0 00001F88 E8[0000] call showmach ; get machine message into si, length into cx 0 00001F8B E308 jcxz ac33 ; if no message 2146 2147 ac32: 0 00001F8D BF[0000] mov di, line_out 0 00001F90 F3A4 rep movsb ; copy the line to line_out 0 00001F92 E8[0000] call putsline_crlf 2151 2152 ac33: 2153 %if _IMMASM 0 00001F95 FF26[4A00] jmp near [ aa_ret ] ; back for the next input line 2155 %else 2156 jmp aa01_main_loop 2157 %endif 2158 2159 2160 %if 0 2161 ; This is debugging code. It assumes that the original value 2162 ; of a_addr is on the top of the stack. 2163 pop si ; get orig. a_addr 2164 mov ax, word [a_addr + saSegSel] 2165 mov word [u_addr], si 2166 mov word [u_addr + saSegSel], ax ; (doesn't work with 32-bit CS) 2167 %if _PM 2168 mov ax, word [a_addr + saSegment] 2169 mov word [u_addr + saSegment], ax 2170 mov ax, word [a_addr + saSelector] 2171 mov word [u_addr + saSelector], ax 2172 %endif 2173 mov bx, word [a_addr] 2174 sub bx, si 2175 mov di, line_out 2176 mov cx, 10 2177 mov al, ' ' 2178 rep stosb 2179 mov ds, word [a_addr + saSegSel] 2180 2181 ax1: lodsb 2182 call hexbyte ; display the generated bytes 2183 dec bx 2184 jnz ax1 2185 push ss 2186 pop ds 2187 call putsline_crlf 2188 and word [disflags], 0 2189 call disasm ; disassemble the new instruction 2190 %if _IMMASM 2191 jmp near [ aa_ret ] ; back to next input line 2192 %else 2193 jmp aa01_main_loop 2194 %endif 2195 %endif 2196 2197 ; Routines to check for specific operand types. 2198 ; Upon success, the routine returns. 2199 ; Upon failure, it pops the return address and jumps to ac01. 2200 ; The routines must preserve si and di. 2201 2202 ; OP_RM, OP_M, OP_R_MOD: form MOD R/M byte. 2203 aop_rm: 2204 aop_m: 2205 aop_r_mod: 0 00001F99 E89203 call ao90 ; form reg/mem byte 0 00001F9C EB30 jmp short ao07 ; go to the size check 2208 2209 ; OP_R: register. 2210 aop_r: 0 00001F9E 8A4504 mov al, byte [di+OPRND.reg1] ; register number 0 00001FA1 2407 and al, 7 0 00001FA3 B103 mov cl, 3 0 00001FA5 D2E0 shl al, cl ; shift it into place 0 00001FA7 0806[0A00] or byte [regmem], al ; put it into the reg/mem byte 0 00001FAB EB21 jmp short ao07 ; go to the size check 2217 2218 ; OP_R_ADD: register, added to the instruction. 2219 aop_r_add: 0 00001FAD 8A4504 mov al, byte [di+OPRND.reg1] 0 00001FB0 2407 and al, 7 0 00001FB2 A2[1200] mov byte [opcode_or], al ; put it there 0 00001FB5 EB17 jmp short ao07 ; go to the size check 2224 2225 ; OP_IMM: immediate data. 2226 aop_imm: 2227 aop_imm_not_extend: 0 00001FB7 893E[0C00] mov word [immaddr], di ; save the location of this 0 00001FBB EB11 jmp short ao07 ; go to the size check 2230 2231 ; OP_MOFFS: just the memory offset 2232 aop_moffs: 0 00001FBD F60502 test byte [di+OPRND.flags], ARG_MODRM 0 00001FC0 7553 jnz ao11 ; if MOD R/M byte ( ==> reject) 0 00001FC2 893E[0800] mov word [rmaddr], di ; save the operand pointer 0 00001FC6 EB06 jmp short ao07 ; go to the size check 2237 2238 ; OP_AX: check for AL/AX/EAX 2239 aop_ax: 0 00001FC8 F6450407 test byte [di+OPRND.reg1], 7 0 00001FCC 7547 jnz ao11 ; if wrong register, reject --> 2242 ; jmp short ao07 ; go to the size check 2243 2244 ; Size check 2245 ao07: 0 00001FCE 800E[1400]10 or byte [varflags], VAR_SIZ_NEED 0 00001FD3 A0[1800] mov al, byte [a_reqsize] 0 00001FD6 2C05 sub al, 5 ; OP_1632 >> 4 0 00001FD8 7C3E jl ao12 ; if OP_ALL 0 00001FDA 745E je ao13 ; if OP_1632 0 00001FDC 3C05 cmp al, 5 ; OP_1632_DEFAULT ? 0 00001FDE 7448 je ao_1632_default 0 00001FE0 3C06 cmp al, 6 ; OP_1632_DEFAULT_ASM ? 0 00001FE2 7444 je ao_1632_default 2255 ; OP_8 = 1, OP_16 = 2, OP_32 = 3, OP_64 = 4 0 00001FE4 04FD add al, -3 0 00001FE6 1403 adc al, 3 ; convert 3 --> 4 and 4 --> 5 2258 ao08: 0 00001FE8 800E[1400]18 or byte [varflags], VAR_SIZ_FORCD| VAR_SIZ_NEED 2260 ao08_1: 0 00001FED 8A5D02 mov bl, byte [di+OPRND.sizearg] 0 00001FF0 84DB test bl, bl ; SIZ_NONE ? 0 00001FF2 7409 jz ao09 ; yes, if no size given --> 0 00001FF4 800E[1400]04 or byte [varflags], VAR_SIZ_GIVN 0 00001FF9 38D8 cmp al, bl 0 00001FFB 7518 jne ao11 ; if sizes conflict, reject --> 2267 ao09: 0 00001FFD 3A06[1300] cmp al, byte [opsize] 0 00002001 7411 je ao10 ; if sizes agree --> 0 00002003 3CFF cmp al, -1 ; is it OP_MXX (for lea) ? 0 00002005 740D je ao10 0 00002007 8606[1300] xchg al, byte [opsize] 0 0000200B 3C00 cmp al, SIZ_NONE 0 0000200D 7506 jne ao11 ; if sizes disagree, reject --> 0 0000200F 800E[1400]04 or byte [varflags], VAR_SIZ_GIVN ; added in DEBUG/X 1.18 2276 ao10: 0 00002014 C3 retn 2278 2279 ao11: 2280 ao50_j1: 0 00002015 E90303 jmp ao50 ; reject 2282 2283 ; OP_ALL - Allow all sizes. 2284 ao12: 0 00002018 8A4502 mov al, byte [di+OPRND.sizearg] 0 0000201B 3C01 cmp al, SIZ_BYTE 0 0000201D 7436 je ao15 ; if byte 0 0000201F 721C jb ao14 ; if unknown (SIZ_NONE) --> 0 00002021 800E[1200]01 or byte [opcode_or], 1 ; set bit in instruction 0 00002026 EB15 jmp short ao14 ; if size is 16 or 32 2291 2292 ; OP_1632_DEFAULT 2293 ao_1632_default: 0 00002028 8A4502 mov al, byte [di+OPRND.sizearg] 0 0000202B 84C0 test al, al ; SIZ_NONE ? 0 0000202D 7512 jnz @F ; no --> 0 0000202F A0[1300] mov al, byte [opsize] ; (for push imm16/32) 0 00002032 84C0 test al, al ; SIZ_NONE ? 0 00002034 750B jnz @F ; no --> 0 00002036 B002 mov al, SIZ_WORD 2301 %if _PM 2302 test byte [bCSAttr], 40h 2303 jz @F 2304 mov al, SIZ_DWORD 2305 %endif 0 00002038 EB07 jmp @F 2307 2308 ; OP_1632 - word or dword. 2309 ao13: 0 0000203A 8A4502 mov al, byte [di+OPRND.sizearg] 2311 ao14: 0 0000203D 84C0 test al, al ; SIZ_NONE ? 0 0000203F 741B jz ao16 ; yes, if still unknown --> 2314 @@: 0 00002041 3C02 cmp al, SIZ_WORD 0 00002043 7507 jne ao15_1 ; if word 0 00002045 800E[1400]20 or byte [varflags], VAR_D16 0 0000204A EB09 jmp short ao15 2319 ao15_1: 0 0000204C 3C04 cmp al, SIZ_DWORD 0 0000204E 75C5 jne ao11 ; if not dword 0 00002050 800E[1400]40 or byte [varflags], VAR_D32 ; set flag 2323 ao15: 0 00002055 800E[1400]04 or byte [varflags], VAR_SIZ_GIVN 2325 ; hack for pushd/pushw imm: check for match 0 0000205A EBA1 jmp ao09 2327 ao16: 0 0000205C C3 retn 2329 2330 ; OP_M64 - 64-bit memory reference. 2331 ; OP_MFLOAT - single-precision floating point memory reference. 2332 ; OP_MDOUBLE - double-precision floating point memory reference. 2333 ; OP_M80 - 80-bit memory reference. 2334 ; OP_MXX - memory reference, size unknown. 2335 ; INP: (from ac08 calling this:) 2336 ; bx = index into bittab 2337 ao17: 0 0000205D E8CE02 call ao90 ; form reg/mem byte 0 00002060 8A87[5B01] mov al, byte [asm_siznum + bx - (OP_FIRST_ASM_SIZNUM + 16 - 1)] 0 00002064 EB82 jmp ao08 ; check size 2341 2342 2343 ; OP_FAR_OFFSET - immediate offset specified with FAR keyword 2344 ; 2345 ; Quote from the Debug/X sources: 2346 ; 2347 ; 3. MS debug accepts call near/far x (adding current cs as 2348 ; seg if far), Debug rejects both 2349 ; 2350 ; Reference: https://github.com/Baron-von-Riedesel/DOS-debug/commit/9a7c66cebe17254db65de4f70f61a0aa22ee8682#diff-20872ca9cde35e29fad36f69db24d50e1fab449f3e4080e60562e7fe0176de21R7 2351 aop_faroffset: 0 00002066 A1[0400] mov ax, word [a_addr + saSegSel] 2353 ; get the cs we're assembling to 0 00002069 894505 mov word [di + OPRND.num2], ax 2355 ; overwrites OPRND.reg2 and OPRND.index 2356 ; (they aren't used for immediates) 2357 2358 ; OP_FARIMM - far address contained in instruction 2359 ao21: 0 0000206C 8A4502 mov al, byte [di+OPRND.sizearg] 0 0000206F 84C0 test al, al ; have a size ? (check for not SIZ_NONE) 0 00002071 7502 jnz @F ; yes --> 0 00002073 B002 mov al, SIZ_WORD ; default to word, assuming 16-bit CS 2364 %if _PM 2365 test byte [bCSAttr], 40h; is it a 32-bit CS ? 2366 jz @F ; no --> 2367 mov al, SIZ_DWORD ; yes, default to dword 2368 %endif 2369 2370 @@: 0 00002075 3C02 cmp al, SIZ_WORD ; is it word ? 0 00002077 750D jne .o32_check ; no, check for dword size --> 2373 .o16: 0 00002079 800E[1400]20 or byte [varflags], VAR_D16 2375 ; mark flag for o16 prefix if needed 2376 0 0000207E 837D0A00 cmp word [di+OPRND.num+2], byte 0 0 00002082 7504 jne ..@ao50_j_NZ ; if not a 16-bit offset --> 2379 0 00002084 EB0C jmp short .common 2381 2382 .o32_check: 0 00002086 3C04 cmp al, SIZ_DWORD ; is it dword ? 2384 ..@ao50_j_NZ: 0 00002088 7403E98E02 jne ao50 ; no, invalid --> 2386 .o32: 0 0000208D 800E[1400]40 or byte [varflags], VAR_D32 2388 ; mark flag for o32 prefix if needed 2389 2390 .common: 0 00002092 800E[1400]04 or byte [varflags], VAR_SIZ_GIVN 2392 0 00002097 C6450402 mov byte [di+OPRND.numadd], 2 ; 2 additional bytes (segment part) 0 0000209B 893E[0C00] mov word [immaddr], di 0 0000209F A2[1300] mov byte [opsize], al ; size of offset, 2 or 4 2396 ao22a: 0 000020A2 893E[0E00] mov word [xxaddr], di 0 000020A6 C3 retn 2399 2400 ; OP_REL8 - relative address 2401 ao23: 0 000020A7 807D0200 cmp byte [di+OPRND.sizearg], SIZ_NONE 0 000020AB 75DB jne ..@ao50_j_NZ 2404 2405 _386_PM_o32 0 000020AD A1[0000] mov ax, word [a_addr] ; offset 2407 _386_PM_o32 0 000020B0 40 inc ax 2409 _386_PM_o32 0 000020B1 40 inc ax ; $ 0 000020B2 8A0E[0300] mov cl, byte [asm_mn_flags] 2412 0 000020B6 F6C180 test cl, AMF_ADDR 0 000020B9 7517 jnz ao23aa 2415 ; JxCXZ, LOOPx, LOOPZx and LOOPNZx need a 67h, not a 66h prefix 0 000020BB F6C141 test cl, AMF_D32 | AMF_D16 0 000020BE 7418 jz ao23b ; if not JxCXZ, LOOPx 0 000020C0 F6C101 test cl, AMF_D32 0 000020C3 7403 jz ao23a 0 000020C5 80C904 or cl, AMF_A32 2421 ao23a: 0 000020C8 80E1BE and cl, ~(AMF_D32 | AMF_D16) 0 000020CB 80C980 or cl, AMF_ADDR 0 000020CE 880E[0300] mov byte [asm_mn_flags], cl 2425 ao23aa: 0 000020D2 80E104 and cl, AMF_A32 2427 %if _PM 2428 or cl, byte [bCSAttr] 2429 jz ao23b ; 16-bit CS and addressing --> 2430 cmp cl, AMF_A32| 40h 2431 je ao23b ; 32-bit CS and addressing --> 2432 %else 0 000020D5 7401 jz ao23b ; RM CS and 16-bit addressing --> 2434 %endif 2435 _386_PM_o32 0 000020D7 40 inc ax ; adjust $ for the prefix that will be used 2437 ao23b: 0 000020D8 89C3 mov bx, ax 0 000020DA 31C9 xor cx, cx 2440 _386_PM push eax 2441 _386_PM pop ax 2442 _386_PM pop cx 0 000020DC 8B4508 mov ax, word [di+OPRND.num+0] 0 000020DF 8B550A mov dx, word [di+OPRND.num+2] 2445 2446 %if _IMMASM 0 000020E2 F606[0300]02 testopt [internalflags6], dif6_immasm 0 000020E7 7410 jz @F 2449 0 000020E9 A3[0000] mov word [immasm_rel8_target+0], ax 0 000020EC 8916[0200] mov word [immasm_rel8_target+2], dx 0 000020F0 800E[0300]04 setopt [internalflags6], dif6_immasm_rel8 2453 0 000020F5 89D8 mov ax, bx 0 000020F7 89CA mov dx, cx 2456 @@: 2457 %endif 2458 0 000020F9 29D8 sub ax, bx 0 000020FB 19CA sbb dx, cx 2461 0 000020FD 884505 mov byte [di+OPRND.num2], al 0 00002100 3D8000 cmp ax, 80h ; just one byte beyond range ? 0 00002103 750E jne @F 0 00002105 85D2 test dx, dx 0 00002107 750A jnz @F ; no --> 0 00002109 803C28 cmp byte [si], OP_E_CX ; we're trying for loop with (e)cx explicit ? 0 0000210C 7505 jne @F ; no --> 0 0000210E 800D80 setopt [di + OPRND.flags], ARG_ECX_SPECIAL 2470 ; remember that we have to overflow 0 00002111 EB0C jmp @FF 2472 @@: 0 00002113 B107 mov cl, 7 0 00002115 D2F8 sar al, cl 0 00002117 38E0 cmp al, ah 0 00002119 7567 jne ao24 ; if too big, reject --> 0 0000211B 39D0 cmp ax, dx 0 0000211D 7563 jne ao24 ; if too big, reject --> 2479 @@: 0 0000211F C6450401 mov byte [di+OPRND.numadd], 1 ; save the length 0 00002123 E97CFF jmp ao22a ; save it away 2482 2483 2484 ; OP_REL1632: relative jump/call to a longer address. 2485 ; 2486 ; size of instruction is 2487 ; a) CS 16-bit: 2488 ; 3 (xx xxxx, near jmp/call E9/E8) or 2489 ; 4 (0F xx xxxx, near jcc 0F 80+cc) 2490 ; 6 (66 xx xxxxxxxx, near 32-bit jmp/call E9/E8) 2491 ; 7 (66 0F xx xxxxxxxx, near 32-bit jcc 0F 80+cc) 2492 ; 2493 ; b) CS 32-bit: 2494 ; 5 (xx xxxxxxxx, near jmp/call E9/E8) or 2495 ; 6 (0F xx xxxxxxxx, near jcc 0F 80+cc) 2496 ; 4 (66 xx xxxx, near 16-bit jmp/call E9/E8) 2497 ; 5 (66 0F xx xxxx, near 16-bit jcc 0F 80+cc) 2498 ao25: 0 00002126 8B1E[0000] mov bx, word [a_addr+0] 2500 %if _PM 2501 mov cx, word [a_addr+2] 2502 %else 0 0000212A 31C9 xor cx, cx 2504 %endif 2505 0 0000212C 31C0 xor ax, ax 0 0000212E 8A4502 mov al, byte [di+OPRND.sizearg] 0 00002131 84C0 test al, al ; SIZ_NONE ? 0 00002133 7502 jnz @F ; no --> 0 00002135 B002 mov al, SIZ_WORD ; in 16-bit CS default to word (2) 2511 %if _PM 2512 test byte [bCSAttr], 40h 2513 jz @F 2514 mov al, SIZ_DWORD ; in 32-bit CS default to dword (4) 2515 %endif 2516 @@: 0 00002137 50 push ax ; preserve size 2518 2519 %if _PM 2520 test byte [bCSAttr], 40h 2521 jz .adjust_16bitcs 2522 .adjust_32bitcs: 2523 cmp al, SIZ_DWORD ; default size ? 2524 jmp .adjust_common 2525 %endif 2526 2527 .adjust_16bitcs: 0 00002138 3C02 cmp al, SIZ_WORD ; default size ? 2529 .adjust_common: 0 0000213A 7401 je .adjust_done 0 0000213C 40 inc ax ; no, increment for 66h prefix (osize) 2532 .adjust_done: 2533 0 0000213D 40 inc ax ; add size of opcode (E8h/E9h/80h+cc) 2535 0 0000213E 813E[1A00]0001 cmp word [a_opcode], 100h 2537 ; is it a 0Fh-prefixed opcode ? 2538 ; (that is, a 0Fh 80h+cc conditional jump) 0 00002144 7201 jb @F 0 00002146 40 inc ax ; add size of 0Fh prefix opcode 2541 @@: 0 00002147 01C3 add bx, ax 0 00002149 83D100 adc cx, byte 0 0 0000214C 58 pop ax ; restore size (2 or 4) 0 0000214D 8B550A mov dx, word [di+OPRND.num+2] 2546 0 00002150 3C04 cmp al, SIZ_DWORD 0 00002152 740B je ao27_1 ; if the size given was "dword" --> 2549 2550 ao27: 0 00002154 85D2 test dx, dx 0 00002156 752A jnz ao24 ; if operand is too big, reject --> 0 00002158 800E[1400]20 or byte [varflags], VAR_D16 0 0000215D EB05 jmp short ao28 2555 2556 ao27_1: 0 0000215F 800E[1400]40 or byte [varflags], VAR_D32 2558 2559 ao28: 0 00002164 884504 mov byte [di+OPRND.numadd], al ; store the size 0 00002167 8B4508 mov ax, word [di+OPRND.num+0] 2562 %if _IMMASM 0 0000216A A3[0000] mov word [immasm_rel1632_target+0], ax 0 0000216D 8916[0200] mov word [immasm_rel1632_target+2], dx 2565 %endif 0 00002171 31C9 xor cx, cx 0 00002173 29D8 sub ax, bx 0 00002175 19CA sbb dx, cx ; compute DX:AX - CX:BX 0 00002177 894505 mov word [di+OPRND.num2+0], ax 0 0000217A 895507 mov word [di+OPRND.num2+2], dx 0 0000217D 893E[0E00] mov word [xxaddr], di 0 00002181 C3 retn 2573 2574 ao24: 2575 ao50_j2: 0 00002182 E99601 jmp ao50 ; reject 2577 2578 ; OP_1CHK - The assembler can ignore this one. 2579 ao29: 0 00002185 58 pop ax ; discard return address 2581 ac06_j2: 0 00002186 E94CFC jmp ac06_j1 ; next operand 2583 2584 ; OP_STI - ST(I). 2585 aop_sti: 0 00002189 B01E mov al, REG_ST ; code for ST 0 0000218B 8A5D05 mov bl, byte [di+OPRND.reg2] 0 0000218E EB47 jmp short ao38 ; to common code --> 2589 2590 ; OP_MMX (previously was OP_ECX (used for LOOPx)) 2591 aop_mmx: 0 00002190 B01F mov al, REG_MM 0 00002192 EB3C jmp short ao37 ; to common code --> 2594 2595 ; OP_MMX_MOD 2596 aop_mmx_mod: 0 00002194 B01F mov al, REG_MM 0 00002196 8A5D05 mov bl, byte [di+OPRND.reg2] 0 00002199 80CBC0 or bl, 0C0h 0 0000219C EB39 jmp short ao38 2601 2602 ; OP_CR 2603 aop_cr: 0 0000219E 8A4505 mov al, byte [di+OPRND.reg2] ; get the index 0 000021A1 3C04 cmp al, 4 0 000021A3 77DD ja ao24 ; if too big, reject --> 0 000021A5 7505 jne ao32 ; if not CR4 0 000021A7 C606[1000]05 mov byte [dismach], 5 ; CR4 is new to the 586 2609 ao32: 0 000021AC 3C01 cmp al, 1 0 000021AE 7506 jne ao33 0 000021B0 807D0CFF cmp byte [di+OPRND_size+OPRND.flags], -1 0 000021B4 75CC jne ao24 ; reject if no other arg (can't mov CR1,xx) 2614 ao33: 0 000021B6 B020 mov al, REG_CR ; code for CR 0 000021B8 EB16 jmp short ao37 ; to common code 2617 2618 ; OP_DR 2619 ao34: 0 000021BA B021 mov al, REG_DR ; code for DR 0 000021BC EB12 jmp short ao37 ; to common code 2622 2623 ; OP_TR 2624 ao35: 0 000021BE 8A4505 mov al, byte [di+OPRND.reg2] ; get the index 0 000021C1 3C03 cmp al, 3 0 000021C3 72BD jb ao24 ; if too small, reject --> 0 000021C5 3C06 cmp al, 6 0 000021C7 7305 jae ao36 0 000021C9 C606[1000]04 mov byte [dismach], 4 ; TR3-5 are new to the 486 2631 ao36: 0 000021CE B022 mov al, REG_TR ; code for TR 2633 2634 ; Common code for these weird registers. 2635 ao37: 0 000021D0 8A5D05 mov bl, byte [di+OPRND.reg2] 0 000021D3 B103 mov cl, 3 0 000021D5 D2E3 shl bl, cl 2639 ao38: 0 000021D7 081E[0A00] or byte [regmem], bl 0 000021DB 800E[1400]02 or byte [varflags], VAR_MODRM 0 000021E0 3A4504 cmp al, byte [di+OPRND.reg1] ; check for the right numbered register 0 000021E3 7419 je ao40 ; if yes, then return 2644 ao38a: 0 000021E5 E93301 jmp ao50 ; reject --> 2646 2647 ; OP_SEGREG 2648 ao39: 0 000021E8 8A4504 mov al, byte [di+OPRND.reg1] 0 000021EB 2C18 sub al, 24 0 000021ED 3C06 cmp al, 6 0 000021EF 73F4 jae ao38a ; if not a segment register, reject --> 0 000021F1 B103 mov cl, 3 0 000021F3 D2E0 shl al, cl 0 000021F5 0806[0A00] or byte [regmem], al 2656 ;--- v1.26: don't force size for MOV sreg, mxx / MOV mxx, sreg 0 000021F9 800E[1400]04 or byte [varflags], VAR_SIZ_GIVN 2658 ao40: 0 000021FE C3 retn 2660 2661 ; OP_IMMS8 - Sign-extended immediate byte (PUSH xx) 2662 ; Also used for IMUL, but clearing VAR_SIZ_NEED has 2663 ; no effect because there is always a reg operand. 2664 ao41: 0 000021FF 8026[1400]EF and byte [varflags], ~VAR_SIZ_NEED ; added for v1.09. Ok? 2666 2667 ; OP_IMMS8_EXTEND - Sign-extended imm8 which does not 2668 ; count as a size specified (mem op needs a size). 2669 ; This is used for arithmetic operations in which an 2670 ; imm8 is sign-extended to operate on a 16- or 32-bit 2671 ; operand (reg/mem). 2672 ao41_extend: 0 00002204 8B4508 mov ax, word [di+OPRND.num+0] 0 00002207 B107 mov cl, 7 0 00002209 D2F8 sar al, cl 0 0000220B EB05 jmp short ao43 ; common code 2677 2678 ; OP_IMM8 - Immediate byte 2679 ao42: 0 0000220D 8B4508 mov ax, word [di+OPRND.num+0] 0 00002210 B000 mov al, 0 2682 ao43: 0 00002212 38E0 cmp al, ah 0 00002214 7403E90201 jne ao50 ; if too big, reject --> 2685 2686 ; The following code allows to optimise an 2687 ; "adc dx, FFFF" to the imms8 form, where 2688 ; previously only "adc dx, -1" would work. 2689 ; Now adapted to work with 3-operand imul 2690 ; like "imul dx, dx, FFFF" as well. 2691 ; Updated to allow "push FFFF" in a 16-bit CS 2692 ; as well as "pushw FFFF" to optimise to an 2693 ; imms8 form as well. 2694 ; 2695 ; Bug: "adc dx, FFFF_FFFF" is still accepted 2696 ; as well. We do want to allow the all-1s 2697 ; bit pattern here if we parsed it as -1 but 2698 ; not if it came in as an unsigned number. 2699 ; However, this bug is not too bad, it only 2700 ; accepts invalid input when it shouldn't. 0 00002219 81FF[0C00] cmp di, line_out + OPRND_size 2702 ; are we operating on the first operand ? 0 0000221D 7309 jae .notfirstoperand ; no --> 2704 2705 .firstoperand: 2706 ; This is either an OP_IMM8 (eg "int", "out") 2707 ; in which case running .compare16bit doesn't 2708 ; change anything, or it is "push imms8". 0 0000221F 803E[1300]02 cmp byte [opsize], SIZ_WORD 2710 ; "pushw" instruction ? 2711 %if _PM 2712 je .compare16bit ; yes --> 2713 ja @F ; SIZ_DWORD = "pushd", skip past .compare16bit --> 2714 test byte [bCSAttr], 40h; D-bit set / o32 cs ? 2715 jz .compare16bit ; no --> 2716 %else 0 00002224 7609 jbe .compare16bit ; not SIZ_DWORD = "pushd" --> 2718 %endif 0 00002226 EB0D jmp @F ; "pushd" or D-bit set, skip .compare16bit --> 2720 2721 .notfirstoperand: 0 00002228 803E[0200]02 cmp byte [line_out + OPRND.sizearg], SIZ_WORD 2723 ; is first operand a word ? 0 0000222D 7506 jne @F ; no --> 2725 .compare16bit: 0 0000222F 837D0A00 cmp word [di + OPRND.num + 2], 0 2727 ; is our high word zero ? 0 00002233 7408 je @FF ; yes, accept 16-bit value --> 2729 @@: 0 00002235 3B450A cmp ax, word [di+OPRND.num+2] 0 00002238 7403E9DE00 jne ao50 ; if too big, reject --> 2732 @@: 0 0000223D B001 mov al, SIZ_BYTE 0 0000223F E8DE00 call aasizchk ; check that size == 0 or 1 0 00002242 8A6508 mov ah, byte [di+OPRND.num+0] ; store the byte, length 1 0 00002245 894504 mov word [di+OPRND.numadd], ax ; store length (0/1) + the byte 0 00002248 893E[0E00] mov word [xxaddr], di 2738 ao43r: 0 0000224C C3 retn 2740 2741 2742 aop_e_cx: 0 0000224D B980FB mov cx, AMF_ADDR | 0 | (~AMF_A32 << 8) 0 00002250 837D0409 cmp word [di + OPRND.reg1], REG_CX 0 00002254 740B je .a16 2746 .a32: 0 00002256 B984FF mov cx, AMF_ADDR | AMF_A32 | (~0 << 8) 0 00002259 E80500 call .common 0 0000225C B011 mov al, REG_CX + 8 0 0000225E E9B400 jmp ao48a 2751 2752 .a16: 2753 .common: 0 00002261 202E[0300] and byte [asm_mn_flags], ch 0 00002265 080E[0300] or byte [asm_mn_flags], cl 2756 0 00002269 8B1E[0E00] mov bx, word [xxaddr] 0 0000226D 8A0E[0300] mov cl, byte [asm_mn_flags] 0 00002271 80E104 and cl, AMF_A32 2760 %if _PM 2761 or cl, byte [bCSAttr] 2762 jz .noprefix ; 16-bit CS and addressing --> 2763 cmp cl, AMF_A32| 40h 2764 je .noprefix ; 32-bit CS and addressing --> 2765 %else 0 00002274 740B jz .noprefix ; 86 Mode CS and 16-bit addressing --> 2767 %endif 0 00002276 FE4F05 dec byte [bx + OPRND.num2] 0 00002279 7105 jno .ret ; (no need to check special flag) 2770 .prefix_overflow: 0 0000227B F60780 testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 0 0000227E 7406 jz .ao50 ; not special, overflow -128 to +127 2773 ; special, accept +128 to +127 2774 .ret: 0 00002280 C3 retn 2776 2777 .noprefix: 0 00002281 F60780 testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 0 00002284 74FA jz .ret ; not special, no prefix 2780 ; special and no prefix: reject 2781 .ao50: 0 00002286 E99200 jmp ao50 2783 2784 2785 ao_x: 0 00002289 AC lodsb 0 0000228A B400 mov ah, 0 0 0000228C 93 xchg bx, ax 0 0000228D 01DB add bx, bx 0 0000228F FFA7[1801] jmp [asmjmp_opx + bx] 2791 2792 2793 ; OP_SHOSIZ - force the user to declare the size of the next operand 2794 ao44: 0 00002293 F606[1400]10 test byte [varflags], VAR_SIZ_NEED 0 00002298 7407 jz ao45 ; if no testing needs to be done 0 0000229A F606[1400]04 test byte [varflags], VAR_SIZ_GIVN 0 0000229F 747A jz ao50 ; if size was given ( ==> reject) 2799 ao45: 0 000022A1 8026[1400]FB and byte [varflags], ~VAR_SIZ_GIVN ; clear the flag 0 000022A6 800E[1400]10 or byte [varflags], VAR_SIZ_NEED 2802 2803 ; hack for pushd/pushw imm (the only OP_SHOSIZ with suffix), 2804 ; set operand size to 2 for pushw, 4 for pushd. 2805 ; this is checked by ao15 later so as to match. 0 000022AB B002 mov al, 2 0 000022AD 8A26[0200] mov ah, byte [aa_mnemsuffix] 2808 ; 0 = normal, 'W' suffix, or 'D' suffix 0 000022B1 80FC44 cmp ah, 'D' 0 000022B4 7407 je @F ; if D, al = 2 --> 0 000022B6 48 dec ax ; al = 1 0 000022B7 80FC57 cmp ah, 'W' 0 000022BA 7401 je @F ; if W, al = 1 --> 0 000022BC 48 dec ax ; al = 0 2815 @@: 0 000022BD 00C0 add al, al ; 0 = no suffix, 2 = 'W' suffix, 4 = 'D' suffix 2817 ; as 0 = SIZ_NONE, 2 = SIZ_WORD, 4 = SIZ_DWORD 0 000022BF A2[1300] mov byte [opsize], al 2819 ao_modifier_continue: 0 000022C2 58 pop ax ; discard return address 0 000022C3 E9C0FE jmp ac06_j2 ; next operand 2822 2823 2824 ; OP_ASM_MOVX - Next operand is movsx/movzx source 2825 ; 2826 ; Make sure that either a size is specified for the source, 2827 ; or the first operand is a 16-bit register and the source 2828 ; operand type is OP_8 (implied byte size if unspecified). 2829 ao_movx: 0 000022C6 803E[0200]02 cmp byte [line_out + OPRND.sizearg], SIZ_WORD 2831 ; first operand is 16-bit ? 0 000022CB 7505 jne @F ; no, make no exception --> 0 000022CD 803C70 cmp byte [si], OP_16 ; is OP_8 ? 0 000022D0 7206 jb .done ; yes, this exception is valid --> 2835 @@: 0 000022D2 807D0200 cmp byte [di + OPRND.sizearg], SIZ_NONE 2837 ; size specified ? 0 000022D6 7443 je ao50 ; no, error --> 2839 .done: 0 000022D8 EBE8 jmp ao_modifier_continue 2841 2842 2843 ao_m_always_16: 0 000022DA 800E[1400]80 setopt [varflags], VAR_M_ALWAYS_16 0 000022DF EBE1 jmp ao_modifier_continue 2846 2847 2848 ao_short: 0 000022E1 B001 mov al, odfShort 2850 ao_distance: 0 000022E3 0806[1500] or byte [alloweddist], al 0 000022E7 EBD9 jmp ao_modifier_continue 2853 2854 ao_near: 0 000022E9 B002 mov al, odfNear 0 000022EB EBF6 jmp ao_distance 2857 2858 ao_far_required: 0 000022ED F6450104 test byte [di + OPRND.distflags], odfFar 0 000022F1 7428 jz ao50 ; if not far, reject --> 2861 ao_far: 0 000022F3 B004 mov al, odfFar 0 000022F5 EBEC jmp ao_distance 2864 2865 2866 ; OP_1 (shift/rotate without immediate) 2867 ao46: 0 000022F7 807D0200 cmp byte [di + OPRND.sizearg], SIZ_NONE 0 000022FB 751E jne ao50 ; if BYTE is specified, reject this --> 0 000022FD 817D070101 cmp word [di+OPRND.orednum], 101h 2871 ; check both size and value (OPRND.num) 0 00002302 EB15 jmp short ao49 ; test it later 2873 2874 ; OP_3 (int 3 / int3) 2875 ao47: 0 00002304 807D0200 cmp byte [di + OPRND.sizearg], SIZ_NONE 0 00002308 7511 jne ao50 ; if BYTE is specified, reject this --> 0 0000230A 817D070103 cmp word [di+OPRND.orednum], 301h 2879 ; check both size and value (OPRND.num) 0 0000230F EB08 jmp short ao49 ; test it later 2881 2882 ; OP_DX, OP_CL, OP_ST, OP_ES, ..., OP_GS 2883 ; INP: (from ac08 calling this:) 2884 ; bx = index into bittab 2885 ao48: 0 00002311 8A87[2801] mov al, [asm_regnum + bx - (OP_FIRST_ASM_REGNUM + 16 - 1)] 2887 ao48a: 0 00002315 98 cbw 0 00002316 3B4504 cmp ax, word [di+OPRND.reg1] 2890 2891 ao49: 0 00002319 7404 je ao51 2893 2894 ; Reject this operand list. 2895 ao50: 0 0000231B 58 pop ax ; discard return address 0 0000231C E9C9F9 jmp ac01 ; go back to try the next alternative 2898 2899 ao51: 0 0000231F C3 retn 2901 2902 ; AASIZCHK - Check that the size given is 0 or AL. 2903 aasizchk: 0 00002320 807D0200 cmp byte [di+OPRND.sizearg], SIZ_NONE 0 00002324 74F9 je ao51 0 00002326 384502 cmp byte [di+OPRND.sizearg], al 0 00002329 74F4 je ao51 0 0000232B 58 pop ax ; discard return address 0 0000232C EBED jmp short ao50 ; reject this list --> 2910 2911 ; Do reg/mem processing. 2912 ; 2913 ; INP: di-> OPRND structure 2914 ; CHG: ax 2915 ao90: 0 0000232E F60504 test byte [di+OPRND.flags], ARG_JUSTREG 0 00002331 7516 jnz ao92 ; if just register 0 00002333 F60502 test byte [di+OPRND.flags], ARG_MODRM 0 00002336 7405 jz ao91 ; if no precomputed MOD R/M byte 0 00002338 8B4504 mov ax, word [di+OPRND.reg1] ; get the precomputed bytes 0 0000233B EB1A jmp short ao93 ; done 2922 2923 ao91: 0 0000233D B006 mov al, 6 ; convert plain displacement to MOD R/M 0 0000233F F606[0300]04 test byte [asm_mn_flags], AMF_A32 0 00002344 7411 jz ao93 ; if 16-bit addressing 0 00002346 48 dec ax 0 00002347 EB0E jmp short ao93 ; done 2929 2930 ao92: 0 00002349 8A4504 mov al, byte [di+OPRND.reg1] ; convert register to MOD R/M 2932 %if 1 0 0000234C 3C1F cmp al, REG_MM 0 0000234E 7503 jne .notmm 0 00002350 8A4505 mov al, byte [di+OPRND.reg2] 2936 .notmm: 2937 %endif 0 00002353 2407 and al, 7 ; get low 3 bits 0 00002355 0CC0 or al, 0C0h 2940 2941 ao93: 0 00002357 0906[0A00] or word [regmem], ax ; store the MOD R/M and SIB 0 0000235B 800E[1400]02 or byte [varflags], VAR_MODRM ; flag its presence 0 00002360 F616[1700] not byte [modrmflag] ; indicate ModR/M 0 00002364 893E[0800] mov word [rmaddr], di ; save a pointer 0 00002368 C3 retn ; done 2947 2948 ; AAIFNUM - Determine if a number starts here 2949 ; 2950 ; INP: al = first character 2951 ; si-> next character 2952 ; OUT: CY if no number starts there 2953 ; NC if a number starts there 2954 ; CHG: - 2955 ; 2956 ; Note: Actually checks for a plus or minus sign that 2957 ; is followed by a valid (hexadecimal) digit, 2958 ; or just a digit without specified sign. 2959 aaifnum: 0 00002369 56 push si 0 0000236A 50 push ax 0 0000236B 3C2D cmp al, '-' ; minus or plus sign ? 0 0000236D 7404 je @F 0 0000236F 3C2B cmp al, '+' 0 00002371 7503 jne @FF ; no --> 2966 @@: 0 00002373 E8[0000] call skipwhite ; skip sign, and (if any) blanks 2968 @@: 0 00002376 3C28 cmp al, '(' 0 00002378 F9 stc 0 00002379 7404 je @F 0 0000237B 2C30 sub al, '0' 0 0000237D 3C0A cmp al, 10 2974 @@: 0 0000237F 58 pop ax 0 00002380 7208 jb @F ; if a decimal digit --> 2977 0 00002382 50 push ax 0 00002383 24DF and al, TOUPPER 0 00002385 2C41 sub al, 'A' 0 00002387 3C06 cmp al, 6 0 00002389 58 pop ax 2983 @@: 0 0000238A F5 cmc ; carry clear <==> it's a number 0 0000238B 5E pop si 0 0000238C C3 retn 2987 2988 2989 ; AAGETI - Get a number from the input line. 2990 ; 2991 ; Entry AL First character of number 2992 ; SI Address of next character of number 2993 ; Exit DX:BX Resulting number 2994 ; CL 1 if it's a byte, 2 if a word, 4 if a dword 2995 ; AL Next character not in number 2996 ; SI Address of next character after that 2997 ; Uses AH, CH 2998 aageti: 0 0000238D 3C2D cmp al, '-' 0 0000238F 7416 je aag1 ; if negative number --> 0 00002391 3C2B cmp al, '+' ; (unnecessary) plus sign ? 0 00002393 7503 jne @F ; no --> 0 00002395 E8[0000] call skipwhite ; skip it, plus blanks 3004 @@: 0 00002398 E84100 call aag4 ; get the bare number 0 0000239B B90100 mov cx, 1 ; set up cx 0 0000239E 09D2 or dx, dx 0 000023A0 7536 jnz aag2 ; if dword 0 000023A2 08FF or bh, bh 0 000023A4 7534 jnz aag3 ; if word 0 000023A6 C3 retn ; it's a byte 3012 3013 aag1: 0 000023A7 E8[0000] call skipwhite 0 000023AA E82F00 call aag4 ; get the bare number 0 000023AD 89D9 mov cx, bx 0 000023AF 09D1 or cx, dx 0 000023B1 B90100 mov cx, 1 0 000023B4 7421 jz aag1a ; if -0 0 000023B6 F7D2 not dx ; negate the answer 0 000023B8 F7DB neg bx 0 000023BA F5 cmc 0 000023BB 83D200 adc dx, byte 0 0 000023BE F6C680 test dh, 80h 0 000023C1 7453 jz aag7 ; if error 0 000023C3 83FAFF cmp dx, byte -1 0 000023C6 7510 jne aag2 ; if dword 0 000023C8 F6C780 test bh, 80h 0 000023CB 740B jz aag2 ; if dword 0 000023CD 80FFFF cmp bh, -1 0 000023D0 7508 jne aag3 ; if word 0 000023D2 F6C380 test bl, 80h 0 000023D5 7403 jz aag3 ; if word 3034 aag1a: 3035 aag4.got_expr: 0 000023D7 C3 retn ; it's a byte 3037 3038 aag2: 0 000023D8 41 inc cx ;return: it's a dword 0 000023D9 41 inc cx 3041 aag3: 0 000023DA 41 inc cx ;return: it's a word 0 000023DB C3 retn 3044 3045 aag4: 0 000023DC 3C28 cmp al, '(' 0 000023DE 7511 jne .not_expr 0 000023E0 AC lodsb ; skip opening paren 0 000023E1 E8[0000] nearcall getexpression ; returns bx:dx = numerical value 0 000023E4 87DA xchg bx, dx ; dx:bx = number 0 000023E6 E8[0000] call skipwh0 0 000023E9 3C29 cmp al, ')' 0 000023EB AC lodsb 0 000023EC 74E9 je .got_expr 0 000023EE 4E dec si 0 000023EF EB25 jmp aag7 3057 3058 .not_expr: 0 000023F1 31DB xor bx, bx ; get the basic integer 0 000023F3 31D2 xor dx, dx 0 000023F5 E8[0000] nearcall getnyb 0 000023F8 721C jc aag7 ; if not a hex digit 3063 aag5: 0 000023FA 08C3 or bl, al ; add it to the number 3065 @@: 0 000023FC AC lodsb 0 000023FD 3C5F cmp al, '_' 0 000023FF 74FB je @B 0 00002401 E8[0000] nearcall getnyb 0 00002404 72D1 jc aag1a ; if done 0 00002406 F6C6F0 test dh, 0F0h 0 00002409 750B jnz aag7 ; if overflow 0 0000240B B90400 mov cx, 4 3074 aag6: 0 0000240E D1E3 shl bx, 1 ; shift it by 4 0 00002410 D1D2 rcl dx, 1 0 00002412 E2FA loop aag6 0 00002414 EBE4 jmp short aag5 3079 3080 aag7: 0 00002416 E9[0000] jmp error 3082 3083 ; AACONVINDEX - Convert results from AAGETI and store index value 3084 ; 3085 ; Entry DX:BX,CL As in exit from AAGETI 3086 ; DI Points to information record for this arg 3087 ; Exit SS bits stored in [di+OPRND.index] 3088 ; Uses DL 3089 aaconvindex: 0 00002419 80F901 cmp cl, 1 0 0000241C 7517 jne aacv1 ; if the number is too large 0 0000241E 80FB01 cmp bl, 1 0 00002421 7414 je aacv2 ; if 1 0 00002423 42 inc dx 0 00002424 80FB02 cmp bl, 2 0 00002427 740E je aacv2 ; if 2 0 00002429 42 inc dx 0 0000242A 80FB04 cmp bl, 4 0 0000242D 7408 je aacv2 ; if 4 0 0000242F 42 inc dx 0 00002430 80FB08 cmp bl, 8 0 00002433 7402 je aacv2 ; if 8 3103 aacv1: 0 00002435 EBDF jmp short aag7 ; error 3105 3106 aacv2: 0 00002437 885506 mov byte [di+OPRND.index], dl ; save the value 0 0000243A C3 retn 3109 3110 ; AAGETREG - Get register for the assembler. 3111 ; 3112 ; Entry DI Start of register table 3113 ; CX Length of register table (or 0) 3114 ; SI Address of first character in register name 3115 ; Exit NC if a register was found, 3116 ; SI Updated if a register was found 3117 ; BX Register number, defined as in the table below 3118 ; Uses AX, CX, DI 3119 ; 3120 ; Exit value of BX: 3121 ; DI = rgnam816, CX = 27 DI = rgnam16, CX = 8 3122 ; ---------------------- -------------------- 3123 ; 0 .. 7: AL .. BH 0 .. 7: AX .. DI 3124 ; 8 .. 15: AX .. DI 3125 ; 16 .. 23: EAX..EDI 16 .. 23: EAX..EDI 3126 ; 24 .. 29: ES .. GS 3127 ; 30 .. 34: ST .. TR 3128 ; (This has to match the REG_ equs defined in uu.asm 3129 ; around rgnam816 and following.) 3130 aagetreg: 0 0000243B 8B04 mov ax, word [si] 0 0000243D 25DFDF and ax, TOUPPER_W ; convert to upper case 0 00002440 3C45 cmp al, 'E' ; check for EAX, etc. 0 00002442 7522 jne aagr1 ; if not 'E' --> (NZ) 0 00002444 50 push ax 0 00002445 88E0 mov al, ah 0 00002447 8A6402 mov ah, byte [si+2] 0 0000244A 80E4DF and ah, TOUPPER 0 0000244D 57 push di 0 0000244E BF[3C01] mov di, rgnam16 0 00002451 51 push cx 0 00002452 B90800 mov cx, N_REGS16 0 00002455 F2AF repne scasw 0 00002457 89CB mov bx, cx 0 00002459 59 pop cx 0 0000245A 5F pop di 0 0000245B 58 pop ax 0 0000245C 7508 jne aagr1 ; if no match --> (NZ) 0 0000245E 46 inc si 0 0000245F F7D3 not bx 0 00002461 80C318 add bl, 8+16 ; adjust BX 0 00002464 EB11 jmp short aagr2 ; finish up 3153 3154 aagr1: ; (entered with NZ) 0 00002466 89CB mov bx, cx ; (if cx = 0, this is always reached with 0 00002468 F2AF repne scasw ; ZF clear, that is, NZ) 0 0000246A 750F jne aagr3 ; if no match 0 0000246C 29CB sub bx, cx 0 0000246E 4B dec bx 0 0000246F 80FB10 cmp bl, 16 0 00002472 7203 jb aagr2 ; if AL .. BH or AX .. DI 0 00002474 80C308 add bl, 8 3163 aagr2: 0 00002477 46 inc si ; skip the register name 0 00002478 46 inc si 0 00002479 F8 clc 0 0000247A C3 retn 3168 aagr3: 0 0000247B F9 stc ; not found 0 0000247C C3 retn 3171 3172 ..@aa_access_end: 3173 %endif === Trace listing source: ../lst/debug.obj/amis.lst 1 2 %if 0 3 4 lDebug AMIS interface 5 6 Copyright (C) 2008-2026 E. C. Masloch 7 8 Usage of the works is permitted provided that this 9 instrument is retained with the works, so that any entity 10 that uses the works is notified of this instrument. 11 12 DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 14 %endif 15 16 %define SOURCEFILENAME "amis.asm" 17 %ifidni __OUTPUT_FORMAT__, obj 18 %include "debug.mac" 1 <1> [list -] 14 <3> [list -] 14 <2> [list -] 86 <1> [list -] 86 ------------------ <1> note: Disable usesection detection === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00001618 ???????? eldhSignature: resb 4 ; "ELD1" 0 0000161C ?????? resb 3 ; reserved 0 0000161F ?? resb 1 ; 26 (Ctrl-Z) 0 00001620 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00001624 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00001626 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00001628 ???????? eldhDataOffset: resd 1 0 0000162C ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000162E ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00001630 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00001632 ???????? eldhReserved: resb 4 ; reserved 0 00001636 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00001638 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 0000163C ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00001640 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00001644 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00001618 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00001620 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00001624 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00001626 ???? 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 0 00001618 ???? 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 0 0000161A ???? eldltAmount: resw 1 0 0000161C ???????? 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 0 00001618 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 0000161A ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 0000161C ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000161E ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00001620 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00001628 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00001618 ???? eldlSignature: resw 1 ; 0E1D1h 0 0000161A ???????? eldlReserved: resw 2 0 0000161E ???? eldlUseLinkHash: resw 1 0 00001620 ???? eldlDataAmount: resw 1 0 00001622 ???? eldlDataPrefixes: resw 1 0 00001624 ???? eldlDataEntries: resw 1 0 00001626 ???? eldlDataAddresses: resw 1 0 00001628 ???? eldlCodeAmount: resw 1 0 0000162A ???? eldlCodePrefixes: resw 1 0 0000162C ???? eldlCodeEntries: resw 1 0 0000162E ???? 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 0 00001618 ???? ifKeyword: resw 1 0 0000161A ???? ifDescription: resw 1 0 0000161C ???? ifOptions: resw 1 0 0000161E ???? ifValue: resw 1 0 00001620 ???? ifTrying: resw 1 0 00001622 ???? 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 0 00001618 ???????? saOffset: resd 1 0 0000161C ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00001618 ???? so16aOffset: resw 1 0 0000161A ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00001618 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00001618 ?????? bsJump: resb 3 0 0000161B ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00001618 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 0000161A ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 0000161B ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 0000161D ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 0000161E ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 00001620 ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 00001622 ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 00001623 ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00001625 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00001627 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00001629 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 0000162D ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 00001631 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00001635 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00001637 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00001639 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 0000163D ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 0000163F ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00001618 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00001619 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 0000161A ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 0000161B ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 0000162A ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00001618 ???????????????? deName: resb 8 0 00001620 ?????? deExt: resb 3 0 00001623 ?? deAttrib: resb 1 0 00001624 ?? dePlusSize: resb 1 0 00001625 ?????????????? resb 7 0 0000162C ???? deClusterHigh: resw 1 0 0000162E ???? deTime: resw 1 0 00001630 ???? deDate: resw 1 0 00001632 ???? deClusterLow: resw 1 0 00001634 ???????? 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 0 100001608 ???????? lsvFirstCluster: resd 1 0 10000160C ???????? lsvFATSector: resd 1 0 100001610 ???? lsvFATSeg: resw 1 0 100001612 ???? lsvLoadSeg: resw 1 0 100001614 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 1000015F8 ???? ldMemoryTop: resw 1 0 1000015FA ???? ldLoadTop: resw 1 0 1000015FC ???? ldSectorSeg: resw 1 0 1000015FE ?? ldFATType: resb 1 92 <2> ldFlags: 0 1000015FF ?? ldHasLBA: resb 1 0 100001600 ???? ldClusterSize: resw 1 0 100001602 ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100001604 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100001606 ?? .partition: resb 1 ; byte 0 100001607 ?? .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 <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 0 1000015E8 ???????? ldRootSector: resd 1 0 1000015EC ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 1000015EE ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 1000015F0 ???? ldParasLeft: resw 1 0 1000015F2 ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000015D8 ???????? ldMaxCluster: resd 1 0 1000015DC ???????? ldFileSize: resd 1 0 1000015E0 ???????? ldCurrentCluster: resd 1 0 1000015E4 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00001618 ???????? liiSignature: resb 4 ; "NLDR" 0 0000161C ???? liiVersion: resb 2 ; "00" 0 0000161E ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 00001620 ???? liiAmountParagraphs: resw 1 0 00001622 ???????????? liiReserved: resw 3 0 00001628 ???? 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 0 0000162A ???? 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 0 0000162C ???? 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 0 0000162E ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00001618 ???? lpSize: resw 1 0 0000161A ???? lpCount: resw 1 0 0000161C ???????? lpBuffer: resd 1 0 00001620 ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00001618 ?? piBoot: resb 1 0 00001619 ?????? piStartCHS: resb 3 0 0000161C ?? piType: resb 1 0 0000161D ?????? piEndCHS: resb 3 0 00001620 ???????? piStart: resd 1 0 00001624 ???????? 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 0 00001618 ???? lsKernelName: resw 1 ; -> kernel file default name 0 0000161A ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 0000161C ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 0000161E ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 00001620 ???? lsOptions: resw 1 ; option flags 0 00001622 ???? lsSegment: resw 1 ; => where to load file 0 00001624 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00001628 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 0000162C ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 0000162E ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 00001630 ???????????????? 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 0 00001618 ???? exact_struc_at 00h, exeSignature: resw 1 0 0000161A ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 0000161C ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 0000161E ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 00001620 ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 00001622 ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00001624 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00001626 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00001628 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 0000162A ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 0000162C ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 0000162E ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 00001630 ???? 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. 0 00001632 ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00001618 ???? ifhHandle: resw 1 0 0000161A ???? ifhFlags: resw 1 0 0000161C ???????? 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 <1> areastrucEntry: resb 24 0 00001630 ???????? areastrucNext: resd 1 0 00001634 ???????? areastrucPrev: resd 1 0 00001638 ???? areastrucSubAmount: resw 1 0 0000163A ???? areastrucSubOffset: resw 1 0 0000163C ???? areastrucFunAmount: resw 1 0 0000163E ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00001618 ???????? areastrucsubLinear: resd 1 0 0000161C ???????? areastrucsubLinearEnd: resd 1 0 00001620 ???? areastrucsubListOffset: resw 1 0 00001622 ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00001618 ???????? areastrucfunLinear: resd 1 0 0000161C ???????? areastrucfunLinearEnd: resd 1 0 00001620 ???? areastrucfunListOffset: resw 1 0 00001622 ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00001618 ???? areastart: resw 1 0 0000161A ???? areaend: resw 1 0 0000161C ???? areamessage: resw 1 0 0000161E ???? 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 0 00001618 ???? 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.) 0 0000161A ???? ivFlags: resw 1 0 0000161C ???? 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. 0 0000161E ???? 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 0 00001620 ?? 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. 0 00001621 ?? 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 0 00001618 ???????? mrLinear: resd 1 0 0000161C ???????? mrOffset: resd 1 0 00001620 ???? mrSegmentSelector: resw 1 0 00001622 ???? mrFlags: resw 1 0 00001624 ???????? 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 0 00001618 ???????? .size_: resd 1 0 0000161C ???? .srchdl: resw 1 0 0000161E ???????? .srcadr: resd 1 0 00001622 ???? .dsthdl: resw 1 0 00001624 ???????? .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 19 %endif 20 21 22 usesection lDEBUG_DATA_ENTRY 22 ------------------ note: usesection lDEBUG_DATA_ENTRY 23 24 align 2, db 0 0 00001618 0000 debuggerfunction: dw 0 26 27 %if ! _CATCHINT2D 28 align 2, db 0 29 debuggeramissig: 30 .ven: fill 8,32,db "ecm" ; vendor 31 .prod: fill 8,32,db "lDebug" ; product 32 db 0, 0 33 34 try_debugger_amis_multiplex_number: 35 db -1 36 %else 37 %if 0 38 39 Supported Int2D functions: 40 41 AMIS - Installation check 42 INP: al = 00h 43 OUT: al = 0FFh 44 cx = Private version number (currently 0100h) 45 dx:di-> signature: "ecm ", "lDebug " 46 47 AMIS - Get private entry point - NOP: no private entry point 48 INP: al = 01h 49 OUT: al = 00h 50 51 AMIS - Uninstall - NOP: can't uninstall 52 INP: al = 02h 53 OUT: al = 00h (not implemented) 54 55 AMIS - Request pop-up - NOP: no pop-up 56 INP: al = 03h 57 OUT: al = 00h 58 59 AMIS - Determine chained interrupts 60 INP: al = 04h 61 OUT: al = 04h 62 dx:bx -> interrupt hook list (Int2D always.) 63 64 AMIS - Get hotkeys - NOP: no hotkeys 65 INP: al = 05h 66 OUT: al = 00h 67 68 AMIS - Get device driver information 69 INP: al = 06h 70 OUT: al = 00h if not device mode 71 al = 01h to indicate one device, 72 ah = device flags = 01h 73 (01h set = installed from CONFIG.SYS, 74 02h clear = device is linked into DOS device chain, 75 04h clear = inreentrant device) 76 dx:bx -> device header 77 78 AMIS - Reserved for AMIS 79 INP: al = 07h..0Fh 80 OUT: al = 00h 81 82 TSR - Reserved for TSR 83 INP: al = 10h..2Fh 84 OUT: al = 00h 85 86 lDebug - Update IISP Header 87 INP: al = 30h 88 ds:si -> source IISP header (or pseudo header) 89 es:di -> destination IISP header 90 OUT: al = FFh to indicate suppported, 91 si and di both incremented by 6 92 destination's ieNext field updated from source 93 al != FFh if not supported, 94 si and di unchanged 95 CHG: - 96 REM: This function is intended to aid in debugging 97 handler re-ordering, removal, or insertion. 98 The 32-bit far pointer needs to be updated 99 as atomically as possible to avoid using 100 an incorrect pointer. 101 Test case: Run a program such as our TSRs' 102 uninstaller or SHUFHOOK and step through it 103 with "tp fffff" when operating on something 104 crucial such as interrupt 21h. Without this 105 function the machine will crash! 106 To enable this function to be called, first run 107 the command "r dco4 or= 8", or "INSTALL AMIS" 108 (install our AMIS multiplexer handler). 109 Other workaround: Use SILENT for TP and disable 110 DCO3 flag 4000_0000 (do not call int 21.0B to 111 check for Ctrl-C status). 112 Yet another workaround: Set flag DCO 8 (enable 113 fake InDOS mode, avoid calling int 21h). 114 REM: The source may be a pseudo IISP header. In this 115 case the ieEntry field should hold 0FEEBh 116 (jmp short $) and the ieSignature field 117 should indicate the source, eg "VT" for the IVT 118 or "NH" for inserting a New Handler. 119 120 lDebugX - Install DPMI hook 121 INP: al = 31h 122 OUT: al = FFh if installed 123 al = FEh..F0h if not installed but call is supported 124 al = 00h if not supported 125 CHG: - 126 STT: not in DOS 127 128 lDebugX - Reserved 129 INP: al = 32h 130 131 lDebugX - Install fault areas 132 INP: al = 33h 133 dx:bx -> fault area structure of client 134 OUT: al = FFh if installed 135 al = FEh..01h if not installed but call is supported 136 al = 00h if not supported 137 CHG: al, bx, cx, dx, si, di, es, ds 138 REM: The area structure is defined in the lDebug sources' 139 debug.mac file. The first 32 bytes of the structure 140 start with a signature word, which is equal to the 141 word value CBF9h (encoding the instruction sequence 142 of stc \ retf) if the structure is not currently 143 installed into any debugger. The remainder of the 144 32 bytes, as well as the details of how the first 145 two bytes are used otherwise, are private to the 146 debugger that provides this service (the server). 147 The area structure may be far-called in 86 Mode. The 148 only currently defined function (in al) for this call 149 is function 00h, which attempts to uninstall the area 150 structure which is being called. It is valid for 151 either the server or the client to uninstall an 152 area structure if they so wish. 153 The fields of the structure behind the first 32 bytes 154 point to a number of sub-structures and area function 155 lists and area lists. All of these structures are 156 to be accessed using the same segment as the main 157 area structure. They contain linear start and linear 158 end addresses, which the client sets up before it 159 tries to install the areas. The linear start address 160 is also assumed to point to the segment base address 161 which is used as the reference for the area functions 162 and areas. (They do not have to match the offset part 163 actually used to run the code, but the lists must be 164 based on the linear start address.) 165 166 TSR - Reserved for TSR 167 INP: al = 34h..3Fh 168 OUT: al = 00h 169 170 lDebug - AMIS message ELD - Display message to debugger terminal 171 INP: al = 40h 172 dx:bx -> ASCIZ message, will be truncated if > 384 Bytes 173 OUT: al = 00h if not supported 174 al = FFh if supported and full message stored 175 (older revisions unconditionally returned al = FFh) 176 al = FEh if supported and truncated message stored 177 (truncation may occur at 383 or 384 Bytes of non-NUL text) 178 REM: Older versions of the ELD only had a buffer of 128 Bytes. 179 180 lDebug - AMIS message ELD - Query message status 181 INP: al = 41h 182 OUT: al = 00h if not supported 183 al = 01h if supported and no message is stored 184 al = 02h if supported and message is still stored (not yet displayed) 185 186 lDebug - AMIS other debugger link ELD - Get other link data 187 INP: al = 42h 188 OUT: al = 00h if not supported 189 al = FFh if supported 190 bx (86M segment) => link tables 191 cx (selector) => link tables 192 dx (86M segment) => PSP 193 si (selector) => PSP 194 di -> link info in link tables section 195 REM: If the debugger is without DPMI support or if not in PM, 196 the selector values may be uninitialised or stale. 197 198 lDebug - AMIS command ELD - Inject a debugger command 199 INP: al = 43h 200 cx = flags, all reserved for now (must pass as 0) 201 dx:bx -> message in byte-counted string, 202 1 byte length (<= 254) 203 N bytes text, length matching the value of length byte 204 1 byte Carriage Return (= 13) 205 OUT: al = 00h if not supported 206 al = 01h if supported, but buffer is full 207 al = 02h if supported, but unknown bit set in cx 208 al = FFh if successfully stored in buffer 209 210 lDebug - Reserved for ELD interfacing 211 INP: al = 44h..4Fh 212 OUT: al = 00h 213 214 TSR - Reserved for TSR 215 INP: al = 50h..FFh 216 OUT: al = 00h 217 218 %endif 219 220 align 2, db 0 221 debuggeramissig: 222 %if _LOADER 223 .ven: fill 8,32,db "ecm" ; vendor 224 .prod: fill 8,32,db "lDebug" ; product 225 226 align 2, db 0 227 %endif 228 amissig: 0 0000161A 65636D20 .ven: fill 8,32,db "ecm" ; vendor 230 %if _LOADER 231 .prod: fill 8,32,db "Loader" ; product 232 .desc: asciz _PROGNAME,_VERSION,"." 233 ; description 234 %else 0 00001622 6C446562756720 .prod: fill 8,32,db "lDebug" ; product 0 00001622 0 0000162A 6C4465627567202832 .desc: asciz _PROGNAME,_VERSION,", debugger." 0 00001633 3032362D30332D3133 0 0000163C 292C20646562756767 0 00001645 65722E00 237 ; description 238 %endif 239 %if $ - .desc > 64 240 %error AMIS description too long 241 %endif 0 00001649 00 _fill_at_least 56,0,.desc 243 244 try_amis_multiplex_number: 0 00001662 00 db 0 246 try_debugger_amis_multiplex_number: 0 00001663 FF db -1 248 249 0 00001664 CB90EB10FFFFFFFF4B iispentry int2D 0 0000166D 4200EBF300 0 00001678 80FC00 cmp ah, 0 ; magic bytes, used by ecm RENUMBER 252 amis_multiplex_number equ $-1 ; AMIS multiplex number (data for cmp opcode) 253 ; SMC in section lDEBUG_DATA_ENTRY 0 0000167B 7405 je .handle ; our multiplex number --> 0 0000167D 2EFF2E[5000] jmp far [cs:.next] ; else go to next handler --> 256 257 .handle: 0 00001682 FC cld 259 %if _EXTENSIONS 0 00001683 50 push ax 0 00001684 53 push bx 0 00001685 51 push cx 0 00001686 52 push dx 0 00001687 1E push ds 0 00001688 0E push cs 0 00001689 1F pop ds 0 0000168A 8B0E[0000] mov cx, word [ext_amis_handler] 268 ; clc ; (already NC from cmp) 0 0000168E E304 jcxz @F 270 ; INP: NC 271 ; ds => entry segment 272 ; ss:sp -> far return address, ds, dx, cx, bx, ax, iret frame 273 ; cx destroyed 274 ; ax, bx, dx, bp, si, di, es, ss = original 275 ; fs, gs, high words = original 276 ; OUT: stack frame modified if desired 277 ; CY to iret after popping frame, 278 ; should retf (not use downlink) 279 ; NC to process function as usual (stack al = function), 280 ; may use downlink 281 ; STT: Real/Virtual 86 Mode 282 ; ss != debugger data/entry/stack segment 283 ; UP 284 ; DI 0 00001690 0E push cs 0 00001691 E84700 call .transfer_to_ext 287 @@: 0 00001694 1F pop ds 0 00001695 5A pop dx 0 00001696 59 pop cx 0 00001697 5B pop bx 0 00001698 58 pop ax 0 00001699 721D jc .iret 294 %endif 0 0000169B 84C0 test al, al 0 0000169D 740F jz .installationcheck ; installation check --> 297 ; cmp al, 02h 298 ; je .uninstall ; uninstallation --> 0 0000169F 3C04 cmp al, 04h 0 000016A1 7416 je .determineinterrupts ; determine hooked interrupts --> 301 %if _DEVICE 0 000016A3 3C06 cmp al, 06h 0 000016A5 7419 je .getdevice 304 %endif 0 000016A7 3C30 cmp al, 30h 0 000016A9 7429 je .updateiispheader 307 %if _PM 308 cmp al, 31h 309 je .installdpmihook 310 %endif 311 %if _AREAS_HOOK_SERVER 312 cmp al, 33h 313 je .installareas 314 %endif 315 ; all other functions are reserved or not supported by TSR 316 .uninstall: 317 .nop: 0 000016AB B000 mov al, 0 ; show not implemented 0 000016AD CF iret 320 321 .installationcheck: 0 000016AE FEC8 dec al ; (= FFh) show we're here 0 000016B0 B90001 mov cx, 0100h ; = version 0 000016B3 BF[0200] mov di, amissig ; dx:di -> AMIS signature strings of this program 325 .iret_dx_cs: 0 000016B6 8CCA mov dx, cs 327 .iret: 0 000016B8 CF iret 329 330 .determineinterrupts: ; al = 04h, always returns list 0 000016B9 2E8B1E[0000] mov bx, word [cs:amisintr_offset] 332 ; dx:bx -> hooked interrupts list 0 000016BE EBF6 jmp short .iret_dx_cs 334 335 %if _DEVICE 336 .getdevice: 337 %if _APPLICATION || _BOOTLDR 0 000016C0 2EF606[0200]40 testopt [cs:internalflags6], dif6_device_mode 0 000016C6 74E3 jz .nop 340 %endif 0 000016C8 B80101 mov ax, 0101h ; CONFIG.SYS, one device 0 000016CB 31DB xor bx, bx 0 000016CD 8CCA mov dx, cs 344 %if _LINK 0 000016CF 81EA[1000] sub dx, strict word deviceshim_size + 10h 346 wlcalc word_shr_4, equ $ - 2 347 %elif _LINK_COMPAT 348 sub dx, strict word paras(deviceshim_size + 10h) 349 %else 350 sub dx, paras(deviceshim_size + 10h) 351 %endif 352 ; -> device header 0 000016D3 CF iret 354 %endif 355 356 .updateiispheader: 0 000016D4 B0FF mov al, 0FFh ; show supported 0 000016D6 FA cli ; try to rest while updating chain 0 000016D7 A7 cmpsw ; skip over first word (entrypoint) 360 ; (generally xxEBh or 0EA90h) 0 000016D8 A5 movsw 0 000016D9 A5 movsw ; transfer source ieNext to dest ieNext 0 000016DA CF iret 364 365 %if _PM 366 .installdpmihook: 367 push bx 368 push ax 369 push cx 370 push dx 371 push di 372 push es 373 push ds 374 push cs 375 pop ds 376 setopt [internalflags6], dif6_in_amis_hook2F 377 push cs 378 call .installdpmitocode 379 clropt [internalflags6], dif6_in_amis_hook2F 380 pop ds 381 pop es 382 pop di 383 pop dx 384 pop cx 385 pop bx 386 mov ah, bh 387 pop bx 388 iret 389 390 .installdpmitocode: 391 call entry_to_code_seg 392 dw .installdpmicode 393 394 usesection lDEBUG_CODE 395 .installdpmicode: 396 %if _APPLICATION || _DEVICE 397 call hook2F.not_in_dos 398 %else 399 mov al, 0F1h 400 %endif 401 ; CHG: bx, cx, dx, di, es 402 ; STT: V86/RM 403 ; ds = debugger data segment 404 retf 405 %endif 406 407 408 usesection lDEBUG_DATA_ENTRY 408 ------------------ note: usesection lDEBUG_DATA_ENTRY 409 410 %if _EXTENSIONS 411 .transfer_to_ext: 0 000016DB FF36[0000] push word [extseg] 0 000016DF 51 push cx 0 000016E0 CB retf 415 %endif 416 417 418 %if _AREAS_HOOK_SERVER 419 .installareas: 420 push ax 421 push cs 422 pop ds 423 mov es, dx 424 cmp word [es:bx + areastrucEntry], 0CBF9h 425 mov cl, 1 426 jne .areasend 427 428 ; Set new prev = old last 429 mov ax, word [ddebugareas.prev] 430 mov word [es:bx + areastrucPrev], ax 431 mov ax, word [ddebugareas.prev + 2] 432 mov word [es:bx + areastrucPrev + 2], ax 433 434 ; Set old last's next to new 435 lds si, [ddebugareas.prev] 436 mov word [si + areastrucNext], bx 437 mov word [si + areastrucNext + 2], dx 438 439 ; Set new's next to entry 440 mov word [es:bx + areastrucNext], ddebugareas. 441 mov word [es:bx + areastrucNext + 2], cs 442 443 ; Set entry's prev to new 444 push cs 445 pop ds 446 mov word [ddebugareas.prev], bx 447 mov word [ddebugareas.prev + 2], dx 448 449 mov di, bx 450 mov si, .areascode 451 mov cx, words(.areascodelength) 452 rep movsw 453 454 mov cl, 0FFh 455 .areasend: 456 pop ax 457 mov al, cl 458 iret 459 460 461 align 2, db 0 462 .areascode: 463 call 0:areastruc_entry 464 ..@patch_entry_seg: equ $ - 2 465 .areasaftercall: 466 nop 467 468 align 2, nop 469 .areascodelength: equ $ - .areascode 470 471 align 2, db 0 472 ddebugareas: 473 istruc AREASTRUC 474 .: 475 at areastrucEntry 476 mov al, 81h 477 stc 478 retf 479 at areastrucNext 480 .next: dw ., 0 481 at areastrucPrev 482 .prev: dw ., 0 483 iend 484 485 486 ; INP; al = function number (up to 7Fh) 487 ; dword [ss:sp] -> after far call 16:16 of areas struc 488 ; dword [ss:sp + 4] = far return address to caller 489 ; OUT: al = 0FFh if success 490 ; al = 80h if function not supported 491 ; al = 80h..0FEh if supported but error 492 ; al = unchanged INP:al if not supported 493 ; (probably area struc not installed) 494 ; CHG: ax, bx, cx, dx, si, di, ds, es 495 areastruc_entry: 496 pop bx 497 pop dx 498 sub bx, int2D.areasaftercall - int2D.areascode 499 .qq_entry: 500 cmp al, 0 501 je .uninstall 502 stc 503 mov al, 80h 504 retf 505 506 507 ; INP: al = 00h 508 ; dx:bx -> areas struc 509 ; OUT: al = 0FFh if success 510 ; al = 80h if function not supported 511 ; al = 81h if your area struc not found in our list 512 ; al = 82h if your prev does not match our next to you 513 ; al = 83h if your next's prev does not match you 514 ; al = 84h if your area struc not found and malformed list 515 ; al = 80h..0FEh if supported but error 516 ; al = unchanged INP:al if not supported 517 ; CHG: ax, bx, cx, dx, si, di, ds, es 518 .uninstall: 519 mov cx, cs 520 mov ds, cx 521 mov si, ddebugareas 522 523 xor di, di 524 .uninstall_loop: 525 dec di 526 mov al, 84h 527 jz .uninstall_error 528 cmp word [si + areastrucNext], bx 529 jne .uninstall_next 530 cmp word [si + areastrucNext + 2], dx 531 je .uninstall_found 532 .uninstall_next: 533 lds si, [si + areastrucNext] 534 mov ax, ds 535 cmp ax, cx 536 jne .uninstall_loop 537 cmp si, ddebugareas 538 jne .uninstall_loop 539 mov al, 81h 540 db __TEST_IMM16 541 .uninstall_error_2: 542 mov al, 82h 543 .uninstall_error: 544 stc 545 retf 546 547 .uninstall_found: 548 mov es, dx 549 cmp word [es:bx + areastrucPrev], si 550 jne .uninstall_error_2 551 mov ax, ds 552 cmp word [es:bx + areastrucPrev + 2], ax 553 jne .uninstall_error_2 554 555 push ds 556 push si 557 lds si, [es:bx + areastrucNext] 558 cmp word [si + areastrucPrev], bx 559 jne @F 560 cmp word [si + areastrucPrev + 2], dx 561 pop si 562 pop ds 563 @@: 564 mov al, 83h 565 jne .uninstall_error 566 567 mov ax, word [es:bx + areastrucNext] 568 mov word [si + areastrucNext], ax 569 mov ax, word [es:bx + areastrucNext + 2] 570 mov word [si + areastrucNext + 2], ax 571 572 lds si, [es:bx + areastrucNext] 573 mov ax, word [es:bx + areastrucPrev] 574 mov word [si + areastrucPrev], ax 575 mov ax, word [es:bx + areastrucPrev + 2] 576 mov word [si + areastrucPrev + 2], ax 577 578 mov al, 0FFh 579 clc 580 mov word [es:bx + areastrucEntry], 0CBF9h 581 retf 582 %endif ; _AREAS_HOOK_SERVER 583 584 %endif ; _CATCHINT2D === Trace listing source: ../lst/debug.obj/bb.lst 1 2 %if 0 3 4 lDebug B commands (permanent breakpoints, break upwards) 5 6 Copyright (C) 2008-2026 E. C. Masloch 7 8 Usage of the works is permitted provided that this 9 instrument is retained with the works, so that any entity 10 that uses the works is notified of this instrument. 11 12 DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 14 %endif 15 16 %define SOURCEFILENAME "bb.asm" 17 %ifidni __OUTPUT_FORMAT__, obj 18 %include "debug.mac" 1 <1> [list -] 14 <3> [list -] 14 <2> [list -] 86 <1> [list -] 86 ------------------ <1> note: Disable usesection detection === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 000016E2 ???????? eldhSignature: resb 4 ; "ELD1" 0 000016E6 ?????? resb 3 ; reserved 0 000016E9 ?? resb 1 ; 26 (Ctrl-Z) 0 000016EA ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 000016EE ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 000016F0 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 000016F2 ???????? eldhDataOffset: resd 1 0 000016F6 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 000016F8 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000016FA ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000016FC ???????? eldhReserved: resb 4 ; reserved 0 00001700 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00001702 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00001706 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000170A ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000170E ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 000016E2 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 000016EA ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 000016EE ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 000016F0 ???? 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 0 000016E2 ???? 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 0 000016E4 ???? eldltAmount: resw 1 0 000016E6 ???????? 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 0 000016E2 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 000016E4 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 000016E6 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 000016E8 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 000016EA ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 000016F2 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 000016E2 ???? eldlSignature: resw 1 ; 0E1D1h 0 000016E4 ???????? eldlReserved: resw 2 0 000016E8 ???? eldlUseLinkHash: resw 1 0 000016EA ???? eldlDataAmount: resw 1 0 000016EC ???? eldlDataPrefixes: resw 1 0 000016EE ???? eldlDataEntries: resw 1 0 000016F0 ???? eldlDataAddresses: resw 1 0 000016F2 ???? eldlCodeAmount: resw 1 0 000016F4 ???? eldlCodePrefixes: resw 1 0 000016F6 ???? eldlCodeEntries: resw 1 0 000016F8 ???? 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 0 000016E2 ???? ifKeyword: resw 1 0 000016E4 ???? ifDescription: resw 1 0 000016E6 ???? ifOptions: resw 1 0 000016E8 ???? ifValue: resw 1 0 000016EA ???? ifTrying: resw 1 0 000016EC ???? 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 0 000016E2 ???????? saOffset: resd 1 0 000016E6 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 000016E2 ???? so16aOffset: resw 1 0 000016E4 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 000016E2 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 000016E2 ?????? bsJump: resb 3 0 000016E5 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 000016E2 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 000016E4 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 000016E5 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 000016E7 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 000016E8 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 000016EA ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 000016EC ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 000016ED ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 000016EF ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 000016F1 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 000016F3 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 000016F7 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 000016FB ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 000016FF ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00001701 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00001703 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00001707 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 00001709 ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 000016E2 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 000016E3 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 000016E4 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 000016E5 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 000016F4 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 000016E2 ???????????????? deName: resb 8 0 000016EA ?????? deExt: resb 3 0 000016ED ?? deAttrib: resb 1 0 000016EE ?? dePlusSize: resb 1 0 000016EF ?????????????? resb 7 0 000016F6 ???? deClusterHigh: resw 1 0 000016F8 ???? deTime: resw 1 0 000016FA ???? deDate: resw 1 0 000016FC ???? deClusterLow: resw 1 0 000016FE ???????? 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 0 1000016D2 ???????? lsvFirstCluster: resd 1 0 1000016D6 ???????? lsvFATSector: resd 1 0 1000016DA ???? lsvFATSeg: resw 1 0 1000016DC ???? lsvLoadSeg: resw 1 0 1000016DE ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 1000016C2 ???? ldMemoryTop: resw 1 0 1000016C4 ???? ldLoadTop: resw 1 0 1000016C6 ???? ldSectorSeg: resw 1 0 1000016C8 ?? ldFATType: resb 1 92 <2> ldFlags: 0 1000016C9 ?? ldHasLBA: resb 1 0 1000016CA ???? ldClusterSize: resw 1 0 1000016CC ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 1000016CE ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 1000016D0 ?? .partition: resb 1 ; byte 0 1000016D1 ?? .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 <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 0 1000016B2 ???????? ldRootSector: resd 1 0 1000016B6 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 1000016B8 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 1000016BA ???? ldParasLeft: resw 1 0 1000016BC ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000016A2 ???????? ldMaxCluster: resd 1 0 1000016A6 ???????? ldFileSize: resd 1 0 1000016AA ???????? ldCurrentCluster: resd 1 0 1000016AE ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 000016E2 ???????? liiSignature: resb 4 ; "NLDR" 0 000016E6 ???? liiVersion: resb 2 ; "00" 0 000016E8 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 000016EA ???? liiAmountParagraphs: resw 1 0 000016EC ???????????? liiReserved: resw 3 0 000016F2 ???? 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 0 000016F4 ???? 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 0 000016F6 ???? 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 0 000016F8 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 000016E2 ???? lpSize: resw 1 0 000016E4 ???? lpCount: resw 1 0 000016E6 ???????? lpBuffer: resd 1 0 000016EA ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 000016E2 ?? piBoot: resb 1 0 000016E3 ?????? piStartCHS: resb 3 0 000016E6 ?? piType: resb 1 0 000016E7 ?????? piEndCHS: resb 3 0 000016EA ???????? piStart: resd 1 0 000016EE ???????? 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 0 000016E2 ???? lsKernelName: resw 1 ; -> kernel file default name 0 000016E4 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 000016E6 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 000016E8 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 000016EA ???? lsOptions: resw 1 ; option flags 0 000016EC ???? lsSegment: resw 1 ; => where to load file 0 000016EE ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 000016F2 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 000016F6 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 000016F8 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 000016FA ???????????????? 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 0 000016E2 ???? exact_struc_at 00h, exeSignature: resw 1 0 000016E4 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 000016E6 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 000016E8 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 000016EA ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 000016EC ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 000016EE ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 000016F0 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 000016F2 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 000016F4 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 000016F6 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 000016F8 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 000016FA ???? 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. 0 000016FC ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 000016E2 ???? ifhHandle: resw 1 0 000016E4 ???? ifhFlags: resw 1 0 000016E6 ???????? 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 <1> areastrucEntry: resb 24 0 000016FA ???????? areastrucNext: resd 1 0 000016FE ???????? areastrucPrev: resd 1 0 00001702 ???? areastrucSubAmount: resw 1 0 00001704 ???? areastrucSubOffset: resw 1 0 00001706 ???? areastrucFunAmount: resw 1 0 00001708 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 000016E2 ???????? areastrucsubLinear: resd 1 0 000016E6 ???????? areastrucsubLinearEnd: resd 1 0 000016EA ???? areastrucsubListOffset: resw 1 0 000016EC ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 000016E2 ???????? areastrucfunLinear: resd 1 0 000016E6 ???????? areastrucfunLinearEnd: resd 1 0 000016EA ???? areastrucfunListOffset: resw 1 0 000016EC ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 000016E2 ???? areastart: resw 1 0 000016E4 ???? areaend: resw 1 0 000016E6 ???? areamessage: resw 1 0 000016E8 ???? 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 0 000016E2 ???? 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.) 0 000016E4 ???? ivFlags: resw 1 0 000016E6 ???? 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. 0 000016E8 ???? 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 0 000016EA ?? 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. 0 000016EB ?? 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 0 000016E2 ???????? mrLinear: resd 1 0 000016E6 ???????? mrOffset: resd 1 0 000016EA ???? mrSegmentSelector: resw 1 0 000016EC ???? mrFlags: resw 1 0 000016EE ???????? 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 0 000016E2 ???????? .size_: resd 1 0 000016E6 ???? .srchdl: resw 1 0 000016E8 ???????? .srcadr: resd 1 0 000016EC ???? .dsthdl: resw 1 0 000016EE ???????? .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 19 %endif 20 21 22 usesection lDEBUG_DATA_ENTRY 22 ------------------ note: usesection lDEBUG_DATA_ENTRY 23 %if _LINK_COMPAT 24 align 2, db 0 25 %endif 26 27 bb_dispatch: 28 .scan: 29 %if _BREAKPOINTS 0 000016E2 43 db 'C' 0 000016E3 44 db 'D' 0 000016E4 45 db 'E' 0 000016E5 54 db 'T' 0 000016E6 50 db 'P' 0 000016E7 4E db 'N' 0 000016E8 4C db 'L' 0 000016E9 49 db 'I' 0 000016EA 57 db 'W' 39 %if BPSIZE == 6 || BPSIZE == 9 0 000016EB 4F db 'O' 41 %endif 0 000016EC 53 db 'S' 43 %endif 0 000016ED 55 db 'U' ; BU command 0 000016EE 00 db 0 ; placeholder, never matches 46 .scanamount: equ $ - .scan 47 48 ; REM: Dispatch table in section lDEBUG_CODE 0 000016EF 00 align 2, db 0 50 .offset: 51 %if _BREAKPOINTS 0 000016F0 [A304] dw point_clear_enable_disable_toggle_common ; C 0 000016F2 [A304] dw point_clear_enable_disable_toggle_common ; D 0 000016F4 [A304] dw point_clear_enable_disable_toggle_common ; E 0 000016F6 [A304] dw point_clear_enable_disable_toggle_common ; T 0 000016F8 [3A00] dw point_set ; P 0 000016FA [FE01] dw point_number ; N 0 000016FC [BE05] dw point_list ; L 0 000016FE [4D02] dw point_id ; I 0 00001700 [8703] dw point_when ; W 61 %if BPSIZE == 6 || BPSIZE == 9 0 00001702 [2E03] dw point_offset ; O 63 %endif 0 00001704 [5608] dw point_swap ; S 65 %endif 0 00001706 [FA08] dw bu_breakpoint; U 0 00001708 [3500] dw error_at_bx ; if none matched 68 .offsetamount: equ ($ - .offset) / 2 69 70 %if .scanamount != .offsetamount 71 %error bb dispatch mismatch 72 %endif 73 74 align 2, db 0 75 .di: 76 %if _BREAKPOINTS 0 0000170A [8404] dw point_clear ; C 0 0000170C [B405] dw point_disable; D 0 0000170E [AD05] dw point_enable ; E 0 00001710 [B905] dw point_toggle ; T 81 %endif 82 83 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 83 ------------------ note: usesection lDEBUG_CODE 84 %if _LINK_COMPAT 85 align 2, db 0 86 %endif 87 88 bb: 89 %if _BOOTLDR 90 %if _APPLICATION || _DEVICE 0 0000247E F606[0100]40 testopt [internalflags], nodosloaded 0 00002483 740F jz @F 93 %endif 0 00002485 4E dec si 0 00002486 4E dec si ; -> at 'B' 0 00002487 BA[0000] mov dx, msg.boot 0 0000248A E8[0000] call isstring? ; check for "BOOT" 0 0000248D 7503E9[0000] je bootcmd 0 00002492 46 inc si ; skip 'B' 0 00002493 AC lodsb ; load next 101 @@: 102 %endif 0 00002494 E8[0000] call capitalise 0 00002497 BF[0000] mov di, bb_dispatch.scan 0 0000249A B90D00 mov cx, bb_dispatch.scanamount 0 0000249D F2AE repne scasb 107 ; di -> behind the NUL if no valid subcommand 0 0000249F 81EF[0100] sub di, bb_dispatch.scan + 1 109 ; get 0-based index 0 000024A3 D1E7 shl di, 1 ; byte index to word index 0 000024A5 89F3 mov bx, si 0 000024A7 E8[0000] call skipcomma ; (most commands shared this) 0 000024AA FFB5[0E00] push word [bb_dispatch.offset + di] 114 ; dispatch into (near word) table 0 000024AE 8BBD[2800] mov di, word [bb_dispatch.di + di] 0 000024B2 C3 retn ; jump to routine 117 118 error_at_bx: 0 000024B3 89DE mov si, bx 0 000024B5 E9[0000] jmp error 121 122 123 %if _BREAKPOINTS 124 point_set: 0 000024B8 E87407 call getpointat ; "AT" keyword ? 0 000024BB 720B jc .not_at ; no --> 0 000024BD BF[8300] mov di, .get_saved ; access saved address later 0 000024C0 E82A07 call findpointat ; do we find it ? 0 000024C3 7210 jc .find_new ; no, treat as if "NEW" keyword given --> 130 ; point index is in dx 0 000024C5 52 push dx ; stack = point index 0 000024C6 EB57 jmp @FF ; skip check whether used 133 134 .not_at: 0 000024C8 BF[7700] mov di, .get_addr ; get address from input command line later 0 000024CB E88207 call getpointindex 0 000024CE 733E jnc @F ; got an index --> 0 000024D0 7503E9[0000] jz error ; "ALL" is invalid 139 ; got "NEW" keyword 140 .find_new: 0 000024D5 31C9 xor cx, cx ; loop counter = 0 (start with point index 0) 0 000024D7 50 push ax ; stack = next text byte 143 .new_loop: 0 000024D8 89C8 mov ax, cx ; try this index 0 000024DA E80107 call calcpointbit ; bx, ah = offset and mask 146 %if ((_NUM_B_BP+7)>>3) != 1 0 000024DD 84A7[0000] test byte [b_bplist.used_mask+bx], ah 148 %else 149 test byte [b_bplist.used_mask], ah 150 %endif 0 000024E1 7427 jz .new_found ; found unused one --> 152 0 000024E3 41 inc cx ; = next index 0 000024E4 83F910 cmp cx, _NUM_B_BP ; valid ? 0 000024E7 72EF jb .new_loop ; yes, try next --> 156 0 000024E9 BA[0000] mov dx, msg.bb_no_new ; no free point found 0 000024EC B80801 mov ax, 0108h 0 000024EF E8[0000] call setrc 0 000024F2 E9[0000] jmp prnquit 161 162 163 ; INP: al=, si-> input line 164 ; OUT: al=, si-> after 165 ; bx:dx = linear adddress 166 ; does not return if error 167 ; CHG: edxh 168 .get_addr: 0 000024F5 8B1E[0000] mov bx, word [reg_cs] ; default seg/sel is cs 0 000024F9 E8[0000] call getlinearaddr ; parse address (segmented or "@ " linear) 0 000024FC 730B jnc .retn ; success --> 0 000024FE E9[0000] jmp error 173 174 175 ; INP: al=, si-> input line 176 ; OUT: bx:dx = linear address 177 ; CHG: - 178 .get_saved: 0 00002501 8B16[0000] mov dx, word [..@bb_saved_linear] 0 00002505 8B1E[0200] mov bx, word [..@bb_saved_linear + 2] 181 .retn: 0 00002509 C3 retn 183 184 185 .new_found: 0 0000250A 58 pop ax ; restore text byte in al 0 0000250B 51 push cx ; stack = point index 0 0000250C EB11 jmp @FF 189 190 @@: 0 0000250E 52 push dx ; preserve point index 0 0000250F 50 push ax 0 00002510 89D0 mov ax, dx 0 00002512 E8C906 call calcpointbit 195 %if ((_NUM_B_BP+7)>>3) != 1 0 00002515 84A7[0000] test byte [b_bplist.used_mask+bx], ah 197 %else 198 test byte [b_bplist.used_mask], ah 199 %endif 0 00002519 58 pop ax 0 0000251A 7403E9[0000] jnz error 202 @@: 0 0000251F FFD7 call di ; call either .get_addr or .get_saved 204 ; in any case, bx:dx = linear address 0 00002521 BF0080 mov di, 8000h ; default counter 0 00002524 52 push dx ; preserve linear low word 0 00002525 31D2 xor dx, dx 208 0 00002527 8916[0000] mov word [..@bb_id_length], dx 0 0000252B 8916[0000] mov word [..@bb_when_length], dx 211 ; initialise to empty ID and WHEN condition 0 0000252F 52 push dx ; stack = 0 initially 213 .loop_additional: 0 00002530 E8[0000] call skipcomm0 0 00002533 4E dec si 0 00002534 BA[0000] mov dx, msg.number 0 00002537 E8[0000] call isstring? 0 0000253A 7435 je .additional_number 0 0000253C BA[0000] mov dx, msg.counter 0 0000253F E8[0000] call isstring? 0 00002542 742D je .additional_number 0 00002544 BA[0000] mov dx, msg.id 0 00002547 E8[0000] call isstring? 0 0000254A 7454 je .additional_id 0 0000254C BA[0000] mov dx, msg.when 0 0000254F E8[0000] call isstring? 0 00002552 743E je .additional_when 228 %if BPSIZE == 6 || BPSIZE == 9 0 00002554 BA[0000] mov dx, msg.offset 0 00002557 E8[0000] call isstring? 0 0000255A 7425 je .additional_offset 232 %endif 0 0000255C AC lodsb 0 0000255D E8[0000] call iseol? 0 00002560 7445 je .no_additional 0 00002562 5A pop dx ; get stack (0 if no number yet) 0 00002563 85D2 test dx, dx ; already got a number without keyword? 0 00002565 7403E9[0000] jnz error ; yes --> 0 0000256A 42 inc dx ; remember for subsequent iterations 0 0000256B 52 push dx ; stack = nonzero 0 0000256C E8[0000] call skipwh0 0 0000256F EB0B jmp @F 243 244 .additional_number: 0 00002571 E8[0000] call skipequals 0 00002574 E8[0000] call iseol? 0 00002577 7503E9[0000] je error 248 @@: 0 0000257C E8C900 call getcounter 0 0000257F EBAF jmp .loop_additional 251 252 %if BPSIZE == 6 || BPSIZE == 9 253 .additional_offset: 0 00002581 5A pop dx 0 00002582 80CA01 or dl, 1 ; remember for subsequent iterations 256 ; not to accept number without keyword 0 00002585 52 push dx 0 00002586 E8[0000] call skipequals 259 %if _PM 260 push bx 261 nearcall getdword 262 mov word [bp_offset], dx 263 mov word [bp_offset + 2], bx 264 pop bx 265 %else 0 00002589 E8[0000] nearcall getword 0 0000258C 8916[0000] mov word [bp_offset], dx 268 %endif 0 00002590 EB9E jmp .loop_additional 270 %endif 271 272 .additional_when: 0 00002592 5A pop dx 0 00002593 80CA01 or dl, 1 ; remember for subsequent iterations 275 ; not to accept number without keyword 0 00002596 52 push dx 0 00002597 E8[0000] call skipequals 0 0000259A 4E dec si 0 0000259B E87F00 call get_when 0 0000259E EB90 jmp .loop_additional 281 282 .additional_id: 0 000025A0 E8[0000] call skipequals 0 000025A3 4E dec si 0 000025A4 E84600 call get_id 286 287 .no_additional: 0 000025A7 5A pop dx ; discard non-keyword NUMBER indicator 0 000025A8 5A pop dx ; restore dx = low word of linear 290 0 000025A9 87DA xchg bx, dx ; dx:bx = linear 0 000025AB 93 xchg bx, ax ; dx:ax = linear 0 000025AC 5B pop bx ; = 0-based point index to set 0 000025AD 52 push dx 0 000025AE 50 push ax ; on stack: dword linear 296 0 000025AF 57 push di ; stack = counter 0 000025B0 87D3 xchg dx, bx ; dx = point index 299 300 ; As for set_id, set_when will free a prior condition 301 ; when writing the new one. However, we check for the 302 ; appropriate buffer size being still free before 303 ; calling set_when because we want to cancel the point 304 ; initialisation if either the ID or the condition do 305 ; not fit, without having yet written anything. 0 000025B2 E8D402 call check_when_space ; CHG ax, bx, cx, si, di 307 308 ; Note that point_clear and init both leave the 309 ; empty word in the ID array. Therefore we can 310 ; always handle this by freeing the prior value 311 ; first, which is required if we're resetting 312 ; an existing point with BP AT. 313 ; The set_id function takes care of this. 0 000025B5 E84F01 call set_id ; CHG ax, bx, cx, si, di 315 316 ; After check_when_space then set_id both returned, 317 ; we have finally checked all error conditions and 318 ; are now actually modifying things. 0 000025B8 E89302 call set_when ; CHG ax, bx, cx, si, di 0 000025BB 92 xchg ax, dx ; ax = point index 321 0 000025BC 89C3 mov bx, ax 0 000025BE 01DB add bx, bx ; * 2 0 000025C0 8F87[0000] pop word [ b_bplist.counter + bx ] 325 ; = counter value 0 000025C4 01DB add bx, bx ; * 4 327 %if BPSIZE == 4 328 %elif BPSIZE == 5 329 add bx, ax ; * 5 330 %elif BPSIZE == 6 0 000025C6 01C3 add bx, ax ; * 5 0 000025C8 01C3 add bx, ax ; * 6 333 %elif BPSIZE == 9 334 add bx, bx ; * 8 335 add bx, ax ; * 9 336 %else 337 %error Unexpected breakpoint size 338 %endif 0 000025CA 8F87[0000] pop word [ b_bplist.bp + bx ] 340 ; These two instructions need to stay in that order. 341 ; For the non-PM version, the pop overwrites the byte 342 ; that is then initialized to 0CCh (the breakpoint 343 ; content byte). 344 ; (This is not true for BPSIZE == 6. Instead, the pop 345 ; overwrites the first byte of the preferred offset.) 0 000025CE 8F87[0200] pop word [ b_bplist.bp + bx + 2 ] 0 000025D2 C687[0500]CC mov byte [ b_bplist.bp + bx + BPSIZE - 1 ], 0CCh 348 %if BPSIZE == 6 0 000025D7 FF36[0000] push word [bp_offset] 0 000025DB 8F87[0300] pop word [ b_bplist.bp + bx + 3 ] 351 %elif BPSIZE == 9 352 push word [bp_offset] 353 pop word [ b_bplist.bp + bx + 4 ] 354 push word [bp_offset + 2] 355 pop word [ b_bplist.bp + bx + 6 ] 356 %endif 0 000025DF E8FC05 call calcpointbit ; bx, ah = offset and mask 358 %if ((_NUM_B_BP+7)>>3) != 1 0 000025E2 08A7[0000] or byte [b_bplist.used_mask+bx], ah 360 ; mark as used 0 000025E6 F6D4 not ah 0 000025E8 20A7[0000] and byte [b_bplist.disabled_mask+bx], ah 363 ; clear disabled flag 364 %if _BREAKPOINTS_STICKY 365 and byte [b_bplist.sticky_mask+bx], ah 366 %endif 367 %else 368 or byte [b_bplist.used_mask], ah 369 not ah 370 and byte [b_bplist.disabled_mask], ah 371 %if _BREAKPOINTS_STICKY 372 and byte [b_bplist.sticky_mask], ah 373 %endif 374 %endif 0 000025EC C3 retn ; done 376 377 378 ; INP: si -> first non-blank character 379 ; OUT: ..@bb_id_start and ..@bb_id_length set 380 ; does not return if error (too long) 381 ; CHG: ax, cx, si 382 get_id: 0 000025ED 8936[0000] mov word [..@bb_id_start], si 384 ; -> text to use 385 @@: 0 000025F1 AC lodsb ; load next text byte 0 000025F2 E8[0000] call iseol?.notsemicolon; end reached ? 0 000025F5 75FA jne @B ; not yet --> 389 ; si -> after EOL char 390 ; si - 1 -> EOL char 391 @@: 0 000025F7 4E dec si ; -> past text to use 0 000025F8 3B36[0000] cmp si, word [..@bb_id_start] 394 ; start reached ? 0 000025FC 740C je @F ; yes, avoid underflow --> 0 000025FE 807CFF20 cmp byte [si - 1], 32 ; last byte is a blank ? 0 00002602 74F3 je @B 0 00002604 807CFF09 cmp byte [si - 1], 9 0 00002608 74ED je @B ; yes, decrement offset --> 400 @@: 0 0000260A 89F1 mov cx, si ; -> past text 0 0000260C 2B0E[0000] sub cx, word [..@bb_id_start] 403 ; = length of text to use 0 00002610 890E[0000] mov word [..@bb_id_length], cx 405 ; store the length 0 00002614 83F93F cmp cx, 63 ; may fit ? 0 00002617 7603E9[0000] ja error ; no --> 408 409 %if 0 410 push dx 411 mov dx, msg.id 412 call putsz 413 mov al, 32 414 call putc 415 mov al, '"' 416 call putc 417 mov dx, word [..@bb_id_start] 418 mov cx, word [..@bb_id_length] 419 call disp_message_length_cx 420 mov al, '"' 421 call putc 422 mov dx, crlf 423 call putsz 424 pop dx 425 %endif 0 0000261C C3 retn 427 428 429 ; INP: si -> first non-blank character 430 ; OUT: ..@bb_when_start and ..@bb_when_length set 431 ; does not return if error 432 ; al = character after the condition, si -> next 433 ; CHG: ax, cx, si 434 get_when: 0 0000261D 8936[0000] mov word [..@bb_when_start], si 436 ; -> text to use 437 @@: 0 00002621 AC lodsb 0 00002622 52 push dx 0 00002623 53 push bx 0 00002624 E8[0000] nearcall getexpression ; parse the number 0 00002627 5B pop bx 0 00002628 5A pop dx 444 ; si -> after next nonblank 445 ; si - 1 -> next nonblank 446 @@: 0 00002629 4E dec si ; -> past text to use 0 0000262A 3B36[0000] cmp si, word [..@bb_when_start] 449 ; start reached ? 0 0000262E 740C je @F ; yes, avoid underflow --> 451 ; (cannot actually be reached) 0 00002630 807CFF20 cmp byte [si - 1], 32 ; last byte is a blank ? 0 00002634 74F3 je @B 0 00002636 807CFF09 cmp byte [si - 1], 9 0 0000263A 74ED je @B ; yes, decrement offset --> 456 @@: 0 0000263C 89F1 mov cx, si ; -> past text 0 0000263E 2B0E[0000] sub cx, word [..@bb_when_start] 459 ; = length of text to use 0 00002642 890E[0000] mov word [..@bb_when_length], cx 461 ; store the length 462 0 00002646 AC lodsb 464 %if 0 465 push dx 466 mov dx, msg.when 467 call putsz 468 mov al, 32 469 call putc 470 mov al, '"' 471 call putc 472 mov dx, word [..@bb_when_start] 473 mov cx, word [..@bb_when_length] 474 call disp_message_length_cx 475 mov al, '"' 476 call putc 477 mov dx, crlf 478 call putsz 479 dec si 480 lodsb 481 pop dx 482 %endif 0 00002647 C3 retn 484 485 486 ; INP: al = first character, si -> next character 487 ; di = default value 488 ; OUT: di = counter value (default if EOL) 489 ; al = first character after number, si -> next 490 ; CHG: - 491 ; does not return if error encountered 492 getcounter: 493 .: 0 00002648 E8[0000] call skipwh0 0 0000264B E8[0000] call iseol? 0 0000264E 7407 je .got_counter 0 00002650 52 push dx 0 00002651 E8[0000] nearcall getword 0 00002654 89D7 mov di, dx 0 00002656 5A pop dx 501 .got_counter: 0 00002657 C3 retn 503 504 505 ; INP: al = first character, si -> next character 506 ; OUT: di = counter value (defaults to 8000h) 507 ; CHG: ax, si (flags not changed) 508 ; does not return if error encountered 509 .pushf_chkeol: 0 00002658 BF0080 mov di, 8000h ; default counter 0 0000265B 9C pushf 0 0000265C 52 push dx 0 0000265D 4E dec si ; -> text 0 0000265E BA[0000] mov dx, msg.number ; NUMBER= keyword ? 0 00002661 E8[0000] call isstring? 0 00002664 7408 je @F 0 00002666 BA[0000] mov dx, msg.counter ; COUNTER= keyword ? 0 00002669 E8[0000] call isstring? 0 0000266C 7504 jne @FF ; no --> 520 @@: 0 0000266E E8[0000] call skipequals ; yes, eat optional equals sign 0 00002671 A8 db __TEST_IMM8 ; (skip lodsb) 523 @@: 0 00002672 AC lodsb 0 00002673 5A pop dx 0 00002674 E8D1FF call . ; get the counter 0 00002677 E8[0000] call chkeol ; make sure we end line 0 0000267A 9D popf 0 0000267B C3 retn 530 531 532 point_number: 0 0000267C E8B005 call getpointat ; "AT" keyword ? 0 0000267F 720D jc .not_at ; no --> 0 00002681 E86905 call findpointat ; do we find it ? 0 00002684 7303E9[0000] jc error ; not found --> 0 00002689 E8CCFF call getcounter.pushf_chkeol 0 0000268C EB26 jmp @F ; point index is in dx --> 539 540 .not_at: 0 0000268E E8BF05 call getpointindex 0 00002691 E8C4FF call getcounter.pushf_chkeol 0 00002694 731E jnc @F 0 00002696 7403E9[0000] jnz error ; "NEW" is invalid --> 545 0 0000269B 31C9 xor cx, cx 547 .all_loop: 0 0000269D 89C8 mov ax, cx 0 0000269F 89CA mov dx, cx 0 000026A1 E83A05 call calcpointbit 551 %if ((_NUM_B_BP+7)>>3) != 1 0 000026A4 84A7[0000] test byte [b_bplist.used_mask+bx], ah 553 %else 554 test byte [b_bplist.used_mask], ah 555 %endif 0 000026A8 7403 jz .all_next ; skip if unused --> 0 000026AA E81500 call .setnumber 558 .all_next: 0 000026AD 41 inc cx ; next point 0 000026AE 83F910 cmp cx, _NUM_B_BP ; more to go ? 0 000026B1 72EA jb .all_loop ; yes --> 0 000026B3 C3 retn ; done 563 564 @@: 0 000026B4 89D0 mov ax, dx 0 000026B6 E82505 call calcpointbit 567 %if ((_NUM_B_BP+7)>>3) != 1 0 000026B9 84A7[0000] test byte [b_bplist.used_mask+bx], ah 569 %else 570 test byte [b_bplist.used_mask], ah 571 %endif ; in use ? 0 000026BD 7503E9[0000] jz error ; no --> 573 574 .setnumber: 0 000026C2 89D3 mov bx, dx ; = index 0 000026C4 01DB add bx, bx ; * 2, = word index 0 000026C6 89BF[0000] mov word [b_bplist.counter + bx], di 0 000026CA C3 retn 579 580 581 point_id: 0 000026CB E86105 call getpointat ; "AT" keyword ? 0 000026CE 720A jc .not_at ; no --> 0 000026D0 E81A05 call findpointat ; do we find it ? 0 000026D3 7303E9[0000] jc error ; not found --> 0 000026D8 EB08 jmp @F ; point index is in dx --> 587 588 .not_at: 0 000026DA E87305 call getpointindex 0 000026DD 7303E9[0000] jc error ; "NEW" and "ALL" keywords are invalid --> 591 592 @@: 0 000026E2 50 push ax ; preserve text 0 000026E3 89D0 mov ax, dx 0 000026E5 E8F604 call calcpointbit 596 %if ((_NUM_B_BP+7)>>3) != 1 0 000026E8 84A7[0000] test byte [b_bplist.used_mask+bx], ah 598 %else 599 test byte [b_bplist.used_mask], ah 600 %endif 0 000026EC 7503E9[0000] jz error 0 000026F1 58 pop ax ; restore al = text 603 0 000026F2 E8[0000] call skipcomm0 605 0 000026F5 4E dec si ; si -> nonblank 0 000026F6 52 push dx 0 000026F7 BA[0000] mov dx, msg.id ; "ID=" keyword ? 0 000026FA E8[0000] call isstring? 0 000026FD 7504 jne .no_id_kw ; no --> 0 000026FF E8[0000] call skipequals ; skip optional equals sign 0 00002702 4E dec si ; si -> nonblank 613 .no_id_kw: 0 00002703 5A pop dx 0 00002704 E8E6FE call get_id ; set ID variables 616 617 ; INP: ..@bb_id_start 618 ; ..@bb_id_length 619 ; dx = point index 620 ; OUT: jumps to error if failure (too long) 621 ; CHG: ax, bx, cx, si, di 622 set_id: 0 00002707 BBFFFF mov bx, -1 ; just get, do not set 0 0000270A E84000 call get_set_id_offset_length 0 0000270D B10A mov cl, 10 0 0000270F 89D8 mov ax, bx 0 00002711 D3EB shr bx, cl ; bx = length of ID to free 628 0 00002713 8B36[0000] mov si, word [b_bplist.idbuffer.free] 630 ; displacement free 0 00002717 F7DE neg si ; - displacement free 0 00002719 81C68001 add si, _NUM_B_ID_BYTES 633 ; 1024 - displacement free = amount free 0 0000271D 01DE add si, bx ; amount free + length of ID to free 0 0000271F 8B0E[0000] mov cx, word [..@bb_id_length] 0 00002723 E33F jcxz .empty ; if no ID to set --> 0 00002725 39CE cmp si, cx ; enough free ? 0 00002727 8B36[0000] mov si, word [..@bb_id_start] 639 ; -> ID string 0 0000272B 7303E9[0000] jb error ; no --> 641 0 00002730 51 push cx 0 00002731 E83700 call free_id ; actually free it now 0 00002734 59 pop cx 0 00002735 51 push cx 0 00002736 89CB mov bx, cx ; length 0 00002738 B10A mov cl, 10 ; offset part is 10 bits (0..1023) 0 0000273A D3E3 shl bx, cl ; length is in top 6 bits (0..63) 0 0000273C 59 pop cx 0 0000273D 8B3E[0000] mov di, word [b_bplist.idbuffer.free] 651 ; = displacement of free part 0 00002741 010E[0000] add word [b_bplist.idbuffer.free], cx 653 ; mark space as used 0 00002745 09FB or bx, di ; OR in the offset 0 00002747 81C7[0000] add di, b_bplist.idbuffer 656 ; -> into buffer space 0 0000274B F3A4 rep movsb ; write 658 659 ; now remember this 660 .after_empty: 661 ; INP: dx = 0-based point index 662 ; bx = word to set (-1 if not to modify) 663 ; OUT: bx = word read 664 get_set_id_offset_length: equ $ 0 0000274D 87D3 xchg dx, bx ; bx = index, dx = to set 0 0000274F D1E3 shl bx, 1 ; bx = word index (undone later) 0 00002751 FFB7[0000] push word [b_bplist.id + bx] 668 ; stack = get it 0 00002755 83FAFF cmp dx, -1 ; get only ? 0 00002758 7404 je @F ; yes --> 0 0000275A 8997[0000] mov word [b_bplist.id + bx], dx 672 ; set it 673 @@: 0 0000275E 5A pop dx ; get it from stack 0 0000275F D1EB shr bx, 1 ; undo to get back (byte) index 0 00002761 87D3 xchg dx, bx 0 00002763 C3 retn 678 679 .empty: 0 00002764 E80400 call free_id 0 00002767 31DB xor bx, bx ; offset = 0 and length = 0 0 00002769 EBE2 jmp .after_empty 683 684 685 ; INP: ax = offset/length word of ID to free 686 ; (length zero means none) 687 ; b_bplist.id = ID array (ONE of which matches ax) 688 ; CHG: ax, bx, cx 689 ; OUT: b_bplist.id entries adjusted 690 ; (the one that is being freed is unaffected) 691 ; b_bplist.idbuffer adjusted 692 ; STT: UP, ss = ds = es 693 ; REM: The b_bplist.id array contains zeroes as 694 ; indicators of unused entries. This implies 695 ; that the length field is zero too. However, 696 ; the canonical NULL entry is *all* zeros. 697 free_id: 0 0000276B B10A mov cl, 10 0 0000276D 89C3 mov bx, ax 0 0000276F 80E703 and bh, 1023 >> 8 ; bx = offset of ID to free 0 00002772 D3E8 shr ax, cl ; ax = length of ID to free 0 00002774 91 xchg cx, ax ; cx = length of ID to free 703 0 00002775 56 push si 0 00002776 57 push di 706 0 00002777 E330 jcxz .return ; if none to free --> 708 0 00002779 51 push cx 0 0000277A 8DBF[0000] lea di, [b_bplist.idbuffer + bx] 711 ; -> ID to be freed 712 ; (destination of following data) 0 0000277E 89FE mov si, di 0 00002780 01CE add si, cx ; -> behind ID to be freed 715 ; (source of following data) 0 00002782 89F1 mov cx, si 0 00002784 F7D9 neg cx ; minus pointer to first subsequent data 0 00002786 81C1[8001] add cx, b_bplist.idbuffer + _NUM_B_ID_BYTES 719 ; pointer behind buffer - pointer subsequent data 720 ; = length of data to move 0 0000278A F3A4 rep movsb ; now di -> first uninitialised byte 0 0000278C 59 pop cx ; = length of data freed 723 0 0000278D 290E[0000] sub word [b_bplist.idbuffer.free], cx 725 ; mark as free 0 00002791 51 push cx 0 00002792 30C0 xor al, al 0 00002794 F3AA rep stosb ; clear the buffer trailer (uninitialised part) 0 00002796 5F pop di ; di = length of data freed 730 0 00002797 BE[0000] mov si, b_bplist.id 732 %if _NUM_B_BP < 256 0 0000279A B110 mov cl, _NUM_B_BP 734 %else 735 mov cx, _NUM_B_BP 736 %endif 737 .loop: 0 0000279C AD lodsw 0 0000279D 25FF03 and ax, 1023 ; get offset 0 000027A0 39D8 cmp ax, bx ; offset matches what we're freeing ?, OR 741 ; is it below/equal the offset we're freeing ? 0 000027A2 7603 jbe .next ; yes --> (also jumps if ax == 0) 0 000027A4 297CFE sub word [si - 2], di ; adjust offset 744 ; This subtraction shouldn't underflow the 10 bits 745 ; used for the offset, so it should leave the top 746 ; 6 bits for the ID length unchanged. 747 .next: 0 000027A7 E2F3 loop .loop 749 750 .return: 0 000027A9 5F pop di 0 000027AA 5E pop si 0 000027AB C3 retn 754 755 756 %if BPSIZE == 6 || BPSIZE == 9 757 point_offset: 0 000027AC E88004 call getpointat ; "AT" keyword ? 0 000027AF 720A jc .not_at ; no --> 0 000027B1 E83904 call findpointat ; do we find it ? 0 000027B4 7303E9[0000] jc error ; not found --> 0 000027B9 EB08 jmp @F ; point index is in dx --> 763 764 .not_at: 0 000027BB E89204 call getpointindex 0 000027BE 7303E9[0000] jc error ; "NEW" and "ALL" keywords are invalid --> 767 768 @@: 0 000027C3 50 push ax 0 000027C4 89D0 mov ax, dx 0 000027C6 E81504 call calcpointbit 772 %if ((_NUM_B_BP+7)>>3) != 1 0 000027C9 84A7[0000] test byte [b_bplist.used_mask+bx], ah 774 %else 775 test byte [b_bplist.used_mask], ah 776 %endif 0 000027CD 7503E9[0000] jz error 0 000027D2 58 pop ax 779 0 000027D3 E8[0000] call skipcomm0 0 000027D6 52 push dx ; stack = point index 0 000027D7 BAFFFF mov dx, -1 ; all-1s pattern to uninit offset 783 %if BPSIZE == 9 784 mov bx, dx ; upper word of all-1s pattern 785 %endif 0 000027DA E8[0000] call iseol? 0 000027DD 7414 je @F ; uninit it --> 0 000027DF 4E dec si 0 000027E0 BA[0000] mov dx, msg.offset 0 000027E3 E8[0000] call isstring? 0 000027E6 7504 jne .no_offset_kw 0 000027E8 E8[0000] call skipequals 0 000027EB 4E dec si 794 .no_offset_kw: 0 000027EC AC lodsb 796 %if BPSIZE == 9 797 nearcall getdword ; bx:dx = offset 798 %else 0 000027ED E8[0000] nearcall getword ; dx = offset 800 %endif 0 000027F0 E8[0000] call chkeol 802 @@: 0 000027F3 58 pop ax ; = point index 0 000027F4 89C7 mov di, ax 0 000027F6 01FF add di, di ; * 2 0 000027F8 01FF add di, di ; * 4 807 %if BPSIZE == 6 0 000027FA 01C7 add di, ax ; * 5 0 000027FC 01C7 add di, ax ; * 6 0 000027FE 81C7[0300] add di, b_bplist.bp + 3 ; +3 = skip 24-bit linear address 811 %elif BPSIZE == 9 812 add di, di ; * 8 813 add di, ax ; * 9 814 add di, b_bplist.bp + 4 ; +4 = skip 32-bit linear address 815 %else 816 %error Unexpected breakpoint size 817 %endif 0 00002802 92 xchg ax, dx 0 00002803 AB stosw ; store low word of offset 820 %if BPSIZE == 9 821 xchg ax, bx 822 stosw ; store high word of offset 823 %endif 0 00002804 C3 retn ; done 825 %endif 826 827 828 point_when: 0 00002805 E82704 call getpointat ; "AT" keyword ? 0 00002808 720A jc .not_at ; no --> 0 0000280A E8E003 call findpointat ; do we find it ? 0 0000280D 7303E9[0000] jc error ; not found --> 0 00002812 EB08 jmp @F ; point index is in dx --> 834 835 .not_at: 0 00002814 E83904 call getpointindex 0 00002817 7303E9[0000] jc error ; "NEW" and "ALL" keywords are invalid --> 838 839 @@: 0 0000281C 50 push ax ; preserve text 0 0000281D 89D0 mov ax, dx 0 0000281F E8BC03 call calcpointbit 843 %if ((_NUM_B_BP+7)>>3) != 1 0 00002822 84A7[0000] test byte [b_bplist.used_mask+bx], ah 845 %else 846 test byte [b_bplist.used_mask], ah 847 %endif 0 00002826 7503E9[0000] jz error 0 0000282B 58 pop ax ; restore text 850 0 0000282C E8[0000] call skipcomm0 0 0000282F 8326[0000]00 and word [..@bb_when_length], 0 853 ; init variable to empty (length = 0) 0 00002834 E8[0000] call iseol? ; EOL ? 0 00002837 7415 je @F ; yes, set immediately --> 0 00002839 4E dec si ; -> nonblank 0 0000283A 52 push dx ; stack = point index 0 0000283B BA[0000] mov dx, msg.when ; "WHEN=" keyword ? 0 0000283E E8[0000] call isstring? 0 00002841 7504 jne .no_when_kw ; no --> 0 00002843 E8[0000] call skipequals ; skip optional equals sign 0 00002846 4E dec si ; -> nonblank 863 .no_when_kw: 0 00002847 5A pop dx ; = point index 0 00002848 E8D2FD call get_when ; set WHEN variables 0 0000284B E8[0000] call chkeol 867 @@: 868 869 870 ; INP: ..@bb_when_start 871 ; ..@bb_when_length 872 ; dx = point index 873 ; OUT: jumps to error if failure (too long) 874 ; CHG: ax, bx, cx, si, di 875 ; STT: UP, ss = ds = es 876 set_when: 0 0000284E E83800 call check_when_space ; cx = length (with terminating NUL) or 0, 878 ; si -> clause (if cx != 0), 879 ; ax = prior pointer or 0 0 00002851 E32F jcxz .empty 881 0 00002853 51 push cx 0 00002854 E86A00 call free_when ; actually free it now (INP ax) 0 00002857 59 pop cx 0 00002858 8B3E[0000] mov di, word [b_bplist.whenbuffer.free] 886 ; = displacement of free part 0 0000285C 010E[0000] add word [b_bplist.whenbuffer.free], cx 888 ; mark space as used 0 00002860 81C7[0000] add di, b_bplist.whenbuffer 890 ; -> into buffer space 0 00002864 89FB mov bx, di ; bx -> buffer for clause, for set function 892 ; si -> new clause (left by check function) 0 00002866 F3A4 rep movsb ; write (with space for the NUL) 0 00002868 884DFF mov byte [di - 1], cl ; actually write a NUL 895 896 ; now remember this 897 .after_empty: 898 ; INP: dx = 0-based point index 899 ; bx = word to set (-1 if not to modify) 900 ; OUT: bx = word read 901 get_set_when_offset: equ $ 0 0000286B 87D3 xchg dx, bx ; bx = index, dx = to set 0 0000286D D1E3 shl bx, 1 ; bx = word index (undone later) 0 0000286F FFB7[0000] push word [b_bplist.when + bx] 905 ; stack = get it 0 00002873 83FAFF cmp dx, -1 ; get only ? 0 00002876 7404 je @F ; yes --> 0 00002878 8997[0000] mov word [b_bplist.when + bx], dx 909 ; set it 910 @@: 0 0000287C 5A pop dx ; get it from stack 0 0000287D D1EB shr bx, 1 ; undo to get back (byte) index 0 0000287F 87D3 xchg dx, bx 0 00002881 C3 retn 915 916 .empty: 0 00002882 E83C00 call free_when 0 00002885 31DB xor bx, bx ; offset = 0 0 00002887 EBE2 jmp .after_empty 920 921 922 ; INP: ..@bb_when_start 923 ; ..@bb_when_length 924 ; dx = point index 925 ; OUT: jumps to error if failure (too long) 926 ; ax = prior pointer from array (to be freed), 927 ; or 0 if no prior clause to free 928 ; cx = length (including terminating NUL) 929 ; or = 0 if no WHEN clause 930 ; (if cx != 0) si -> WHEN clause data 931 ; CHG: ax, bx, cx, si, di 932 ; STT: UP, ss = ds = es 933 check_when_space: 0 00002889 BBFFFF mov bx, -1 0 0000288C E8DCFF call get_set_when_offset 936 0 0000288F 53 push bx 0 00002890 85DB test bx, bx ; any ? 0 00002892 740D jz @F ; no --> 0 00002894 89DF mov di, bx ; -> current condition 0 00002896 B9FFFF mov cx, -1 0 00002899 B000 mov al, 0 ; NUL 0 0000289B F2AE repne scasb ; scan it 0 0000289D F7D1 not cx ; = length to free (including terminating NUL) 0 0000289F 89CB mov bx, cx 946 @@: ; bx = length to free 0 000028A1 58 pop ax ; ax -> prior clause in .whenbuffer (or 0) 948 0 000028A2 8B36[0000] mov si, word [b_bplist.whenbuffer.free] 950 ; displacement free 0 000028A6 F7DE neg si ; - displacement free 0 000028A8 81C60004 add si, _NUM_B_WHEN_BYTES 953 ; 1024 - displacement free = amount free 0 000028AC 01DE add si, bx ; amount free + length of condition to free 0 000028AE 8B0E[0000] mov cx, word [..@bb_when_length] 0 000028B2 E30C jcxz .empty ; if no condition to set --> 0 000028B4 41 inc cx ; count terminating NUL 0 000028B5 39CE cmp si, cx ; enough free ? 0 000028B7 8B36[0000] mov si, word [..@bb_when_start] 960 ; -> condition string 0 000028BB 7303E9[0000] jb error ; no --> 962 .empty: 0 000028C0 C3 retn 964 965 966 ; INP: ax = offset word of condition to free 967 ; (zero means none) 968 ; b_bplist.when = condition array (ONE of which matches ax) 969 ; CHG: ax, bx, cx 970 ; OUT: b_bplist.when entries adjusted 971 ; (the one that is being freed is unaffected) 972 ; b_bplist.whenbuffer adjusted 973 ; STT: UP, ss = ds = es 974 ; REM: The b_bplist.when array contains actual offsets 975 ; into the b_bplist.whenbuffer space. Therefore 976 ; a value of zero acts as a NULL pointer and valid 977 ; values are >= b_bplist.whenbuffer. 978 free_when: 0 000028C1 56 push si 0 000028C2 57 push di 981 0 000028C3 85C0 test ax, ax ; nothing stored ? 0 000028C5 7438 jz .return ; yes, just return --> 984 0 000028C7 89C7 mov di, ax 0 000028C9 89C3 mov bx, ax 987 ; -> condition to be freed 988 ; (destination of following data) 0 000028CB 57 push di 0 000028CC B9FFFF mov cx, -1 0 000028CF B000 mov al, 0 ; NUL 0 000028D1 F2AE repne scasb ; scan it 0 000028D3 F7D1 not cx ; = length to free (including terminating NUL) 0 000028D5 5F pop di ; -> destination of following data 0 000028D6 51 push cx ; length to free 0 000028D7 89FE mov si, di 0 000028D9 01CE add si, cx ; -> behind condition to be freed 998 ; (source of following data) 0 000028DB 89F1 mov cx, si 0 000028DD F7D9 neg cx ; minus pointer to first subsequent data 0 000028DF 81C1[0004] add cx, b_bplist.whenbuffer + _NUM_B_WHEN_BYTES 1002 ; pointer behind buffer - pointer subsequent data 1003 ; = length of data to move 0 000028E3 F3A4 rep movsb ; now di -> first uninitialised byte 0 000028E5 59 pop cx ; = length of data freed 1006 0 000028E6 290E[0000] sub word [b_bplist.whenbuffer.free], cx 1008 ; mark as free 0 000028EA 51 push cx 0 000028EB 30C0 xor al, al 0 000028ED F3AA rep stosb ; clear the buffer trailer (uninitialised part) 0 000028EF 5F pop di ; di = length of data freed 1013 0 000028F0 BE[0000] mov si, b_bplist.when ; -> list of words pointing into WHEN buffer 1015 %if _NUM_B_BP < 256 0 000028F3 B110 mov cl, _NUM_B_BP ; cx = number of points 1017 %else 1018 mov cx, _NUM_B_BP 1019 %endif 1020 .loop: 0 000028F5 AD lodsw 0 000028F6 39D8 cmp ax, bx ; offset we're freeing ?, OR 1023 ; is it below/equal the offset we're freeing ? 0 000028F8 7603 jbe .next ; yes --> (also jumps if ax == 0) 0 000028FA 297CFE sub word [si - 2], di ; adjust offset 1026 .next: 0 000028FD E2F6 loop .loop 1028 1029 .return: 0 000028FF 5F pop di 0 00002900 5E pop si 0 00002901 C3 retn 1033 1034 1035 point_clear: 0 00002902 F7D0 not ax 1037 %if ((_NUM_B_BP+7)>>3) != 1 0 00002904 20A7[0000] and byte [b_bplist.used_mask+bx], ah 0 00002908 20A7[0000] and byte [b_bplist.disabled_mask+bx], ah 1040 %else 1041 and byte [b_bplist.used_mask], ah 1042 and byte [b_bplist.disabled_mask], ah 1043 %endif 0 0000290C 51 push cx 1045 0 0000290D 31DB xor bx, bx ; replace by empty word 0 0000290F E83BFE call get_set_id_offset_length 0 00002912 93 xchg ax, bx ; ax = word what to free 0 00002913 E855FE call free_id ; actually free it now 1050 0 00002916 31DB xor bx, bx ; replace by empty word 0 00002918 E850FF call get_set_when_offset 0 0000291B 93 xchg ax, bx ; ax = word what to free 0 0000291C E8A2FF call free_when ; actually free it now 1055 1056 %if 0 1057 xor cx, cx 1058 1059 mov bx, dx 1060 add bx, bx ; * 2 1061 mov word [b_bplist.counter + bx], cx 1062 1063 add bx, bx ; * 4 1064 %if BPSIZE == 4 1065 %elif BPSIZE == 5 1066 add bx, dx ; * 5 1067 %elif BPSIZE == 6 1068 add bx, dx ; * 5 1069 add bx, dx ; * 6 1070 %elif BPSIZE == 9 1071 add bx, bx ; * 8 1072 add bx, dx ; * 9 1073 %else 1074 %error Unexpected breakpoint size 1075 %endif 1076 add bx, b_bplist.bp 1077 mov word [bx], cx 1078 mov word [bx + 2], cx 1079 %if BPSIZE == 4 1080 %elif BPSIZE == 5 1081 mov byte [bx + 4], cl 1082 %elif BPSIZE == 6 1083 mov word [bx + 4], cx 1084 %elif BPSIZE == 9 1085 mov word [bx + 4], cx 1086 mov word [bx + 6], cx 1087 mov byte [bx + 8], cl 1088 %else 1089 %error Unexpected breakpoint size 1090 %endif 1091 1092 %endif 1093 0 0000291F 59 pop cx 0 00002920 C3 retn 1096 1097 point_clear_enable_disable_toggle_common: 1098 ; di -> bb handler 1099 ; INP: dx = point index 1100 ; bx = offset into bit arrays 1101 ; ah = mask for bit arrays 1102 ; CHG: ax, bx 1103 1104 ; bp -> handle next point in dx (if not "ALL" keyword) 1105 ; INP: di = bb handler, call eventually 1106 ; al = text, si -> subsequent text 1107 ; dx = from below function, or point index 1108 ; cx = from below function, or 1 1109 ; branch to .in to continue looping, 1110 ; al = text, si -> subsequent text 1111 ; return near if second loop is done 1112 ; in first loop only: 1113 ; ss:sp -> word start of list 1114 ; in second loop: 1115 ; ss:sp -> near return address in cmd4 1116 ; REM: This is called to handle the next point. 1117 ; Should loop to .in to continue parsing 1118 ; if more IN values follow. 1119 ; These form two IN loops: After the only 1120 ; parsing is done si-> is restored and the 1121 ; doing (execution of bb handler) starts. 1122 ; For non-IN this just handles the point 1123 ; and immediately returns to the caller. 1124 1125 ; word [cs:bp - 2] -> parse index of next point 1126 ; INP: di = bb handler, preserve 1127 ; al = text, si -> subsequent text 1128 ; OUT: NC if no keyword (always if IN), 1129 ; dx = point index 1130 ; (cx = number of points if IN) 1131 ; CY if keyword, 1132 ; NZ if "NEW" 1133 ; ZR if "ALL" 1134 ; al = text, si -> subsequent text 1135 ; REM: This is called first, in the main loop, 1136 ; if an "AT" keyword wasn't used. Outputs 1137 ; have to be valid for bp -> function if 1138 ; the return is NC. 0 00002921 BD[9205] mov bp, .checkend 0 00002924 4E dec si ; -> nonblank 0 00002925 BA[0000] mov dx, msg.in ; "IN" keyword ? 0 00002928 E8[0000] call isstring? 0 0000292B 7403E9A200 jne .notin ; no --> 0 00002930 BD[3E05] mov bp, .parse_next ; set up for IN list 0 00002933 E8[0000] call skipcomma 0 00002936 4E dec si 0 00002937 BA[0000] mov dx, msg.existing ; "EXISTING" keyword ? 0 0000293A E8[0000] call isstring? 0 0000293D AC lodsb 0 0000293E 7506 jne .notexisting ; no --> 0 00002940 BD[1605] mov bp, .parse_next_existing 1152 ; set up for IN EXISTING list 0 00002943 E8[0000] call skipcomm0 1154 .notexisting: 0 00002946 56 push si ; stack -> start of list 0 00002947 E98700 jmp .in 1157 1158 ; INP: di = preserve 1159 ; si -> subsequent text 1160 ; si - 1 -> text 1161 ; OUT: NC, 1162 ; dx = point start 1163 ; cx = amount points 1164 ; branches to error on invalid specification 1165 .in_multiple: ; parse an IN point spec 0 0000294A 57 push di 0 0000294B 4E dec si ; si -> nonblank 0 0000294C E8[0000] nearcall get_value_range; OUT: cx:di = from, bx:dx = to 0 0000294F 730C jnc @F ; normal value range --> 0 00002951 7507 jnz .error ; NZ if nonzero length --> 0 00002953 83FF10 cmp di, _NUM_B_BP ; start in range ? 0 00002956 7302 jae .error ; no --> 0 00002958 E31A jcxz .in_multiple.next ; yes --> (cx = 0) 1174 .error: 0 0000295A E9[0000] jmp error 1176 1177 @@: 0 0000295D 83FF10 cmp di, _NUM_B_BP ; start in range ? 0 00002960 73F8 jae .error 0 00002962 E302 jcxz @F 0 00002964 EBF4 jmp .error ; no --> 1182 1183 @@: 0 00002966 85DB test bx, bx ; end in range ? 0 00002968 75F0 jnz .error 0 0000296A 83FA10 cmp dx, _NUM_B_BP 0 0000296D 73EB jae .error ; no --> 1188 0 0000296F 89D1 mov cx, dx ; = end 0 00002971 29F9 sub cx, di ; = end - start = amount - 1 0 00002973 41 inc cx ; = amount (nonzero) 1192 .in_multiple.next: 0 00002974 89FA mov dx, di ; dx = first index 0 00002976 5F pop di 0 00002977 F8 clc ; no keywords 0 00002978 C3 retn 1197 1198 0 00002979 00 align 2, db 0 0 0000297A [CC04] dw .in_multiple 1201 .do_next_existing: 0 0000297C E30A jcxz @FFF ; value range with length zero ? 1203 @@: 0 0000297E E8A000 call .checkindex_internal 0 00002981 7402 jz @F ; skip unused point --> 0 00002983 FFD7 call di ; has to preserve cx, dx, di, si, bp 1207 @@: 0 00002985 42 inc dx 0 00002986 E2F6 loop @BB ; loop through value range 1210 @@: 0 00002988 4E dec si 0 00002989 E8[0000] call skipcomma 0 0000298C E8[0000] call iseol? ; EOL reached ? 0 0000298F 7540 jne .in ; not yet --> 0 00002991 C3 retn ; yes, done 1216 1217 align 2, db 0 0 00002992 [CC04] dw .in_multiple 1219 .parse_next_existing: 1220 ; REM: no check done here, any return from 1221 ; the .in_multiple value range is ok. 0 00002994 4E dec si 0 00002995 E8[0000] call skipcomma 0 00002998 E8[0000] call iseol? ; EOL reached ? 0 0000299B 7534 jne .in ; not yet --> 1226 0 0000299D 5E pop si ; restore -> start of list 0 0000299E BD[FE04] mov bp, .do_next_existing 1229 ; next do them 0 000029A1 EB2E jmp .in ; and loop again 1231 0 000029A3 00 align 2, db 0 0 000029A4 [CC04] dw .in_multiple 1234 .do_next: 0 000029A6 E308 jcxz @FFF ; value range with length zero ? 1236 @@: 0 000029A8 E86D00 call .checkindex ; error if invalid/unused point 0 000029AB FFD7 call di ; has to preserve cx, dx, di, si, bp 1239 @@: 0 000029AD 42 inc dx ; next point 0 000029AE E2F8 loop @BB ; loop through value range 1242 @@: 0 000029B0 4E dec si 0 000029B1 E8[0000] call skipcomma 0 000029B4 E8[0000] call iseol? ; EOL reached ? 0 000029B7 7518 jne .in ; not yet --> 0 000029B9 C3 retn ; done 1248 1249 align 2, db 0 0 000029BA [CC04] dw .in_multiple 1251 .parse_next: ; cx = length, dx = start 0 000029BC E306 jcxz @FFF ; value range with length zero ? 1253 @@: 0 000029BE E85700 call .checkindex ; error if invalid/unused point 1255 @@: 0 000029C1 42 inc dx ; next point 0 000029C2 E2FA loop @BB ; loop through value range 1258 @@: 0 000029C4 4E dec si 0 000029C5 E8[0000] call skipcomma 0 000029C8 E8[0000] call iseol? 0 000029CB 7504 jne .in ; more elements follow --> 1263 0 000029CD 5E pop si ; restore -> start of list 0 000029CE BD[2805] mov bp, .do_next ; set up handler to do, next 1266 ; (fall through) and loop again 1267 1268 .in: 0 000029D1 4E dec si ; -> next nonblank 1270 .notin: 0 000029D2 AC lodsb ; load first text byte 0 000029D3 E85902 call getpointat ; "AT" keyword ? 0 000029D6 720D jc .not_at ; no --> 0 000029D8 E81202 call findpointat ; do we find it ? 0 000029DB 7303E9[0000] jc error ; not found --> 0 000029E0 B90100 mov cx, 1 ; (for bb IN) 0 000029E3 EB26 jmp @F ; point index is in dx --> 1278 1279 .not_at: 0 000029E5 2EFF56FE call near word [cs:bp - 2] 1281 ; parse point indices 1282 ; (value range or single getpointindex) 0 000029E9 7320 jnc @F ; point index is in dx, no keyword --> 1284 .error_NZ: 0 000029EB 7403E9[0000] jnz error ; "NEW" is invalid --> 1286 0 000029F0 E8[0000] call chkeol ; check that after "ALL" there is EOL 0 000029F3 31C9 xor cx, cx 1289 .all_loop: 0 000029F5 89C8 mov ax, cx 0 000029F7 E8E401 call calcpointbit ; get offset and mask 1292 %if ((_NUM_B_BP+7)>>3) != 1 0 000029FA 84A7[0000] test byte [b_bplist.used_mask+bx], ah 1294 %else 1295 test byte [b_bplist.used_mask], ah 1296 %endif 0 000029FE 7404 jz .all_next ; skip unused point --> 0 00002A00 89CA mov dx, cx ; dx = point index 0 00002A02 FFD7 call di ; has to preserve cx, dx, di, si, bp 1300 .all_next: 0 00002A04 41 inc cx 0 00002A05 83F910 cmp cx, _NUM_B_BP 0 00002A08 72EB jb .all_loop ; do for all points 0 00002A0A C3 retn ; done 1305 1306 @@: 0 00002A0B FFE5 jmp bp ; handle dx = point, cx = amount 1308 ; with di = handler, si -> text 1309 0 00002A0D 00 align 2, db 0 0 00002A0E [D207] dw getpointindex 1312 .checkend: 0 00002A10 E8[0000] call chkeol 0 00002A13 E80200 call .checkindex ; specified a valid point ? 0 00002A16 FFE7 jmp di ; tailcall, dx = point index, 1316 ; bx, ah = offset and mask 1317 1318 ; INP: dx = point index 1319 ; OUT: ah = mask 1320 ; bx = offset into bplist bit arrays 1321 ; branches to error on unused point 1322 .checkindex: 0 00002A18 E80600 call .checkindex_internal 0 00002A1B 7503E9[0000] jz error 0 00002A20 C3 retn 1326 1327 ; INP: dx = point index 1328 ; OUT: NZ if valid used point 1329 ; ah = mask 1330 ; bx = offset into bplist bit arrays 1331 .checkindex_internal: 0 00002A21 89D0 mov ax, dx 0 00002A23 E8B801 call calcpointbit ; bx, ah = offset and mask 1334 %if ((_NUM_B_BP+7)>>3) != 1 0 00002A26 84A7[0000] test byte [b_bplist.used_mask+bx], ah 1336 %else 1337 test byte [b_bplist.used_mask], ah 1338 %endif 0 00002A2A C3 retn 1340 1341 1342 point_enable: 0 00002A2B F7D0 not ax 1344 %if ((_NUM_B_BP+7)>>3) != 1 0 00002A2D 20A7[0000] and byte [b_bplist.disabled_mask+bx], ah 1346 %else 1347 and byte [b_bplist.disabled_mask], ah 1348 %endif 0 00002A31 C3 retn 1350 1351 1352 point_disable: 1353 %if ((_NUM_B_BP+7)>>3) != 1 0 00002A32 08A7[0000] or byte [b_bplist.disabled_mask+bx], ah 1355 %else 1356 or byte [b_bplist.disabled_mask], ah 1357 %endif 0 00002A36 C3 retn 1359 1360 1361 point_toggle: 1362 %if ((_NUM_B_BP+7)>>3) != 1 0 00002A37 30A7[0000] xor byte [b_bplist.disabled_mask+bx], ah 1364 %else 1365 xor byte [b_bplist.disabled_mask], ah 1366 %endif 0 00002A3B C3 retn 1368 1369 1370 point_list: 0 00002A3C E8[0000] call iseol? 0 00002A3F 747D je .all 1373 0 00002A41 E8EB01 call getpointat ; "AT" keyword ? 0 00002A44 7258 jc .not_at ; no --> 0 00002A46 E8A401 call findpointat ; do we find it ? 1377 ; Here we ignore the point index in dx, we just 1378 ; take note that at least one point matching the 1379 ; specified address exists. The points are matched 1380 ; against the linear address in ..@bb_saved_linear. 0 00002A49 7307 jnc .all_matching 1382 0 00002A4B BA[0000] mov dx, msg.bpnone_at 0 00002A4E E8[0000] call putsz 0 00002A51 C3 retn 1386 1387 1388 .all_matching: 0 00002A52 31ED xor bp, bp 0 00002A54 31DB xor bx, bx 0 00002A56 31D2 xor dx, dx 0 00002A58 BF[0000] mov di, line_out 1393 .loop_matching: 0 00002A5B 89DE mov si, bx 0 00002A5D 01F6 add si, si ; * 2 0 00002A5F 01F6 add si, si ; * 4 1397 %if BPSIZE == 4 1398 %elif BPSIZE == 5 1399 add si, bx ; * 5 1400 %elif BPSIZE == 6 0 00002A61 01DE add si, bx ; * 5 0 00002A63 01DE add si, bx ; * 6 1403 %elif BPSIZE == 9 1404 add si, si ; * 8 1405 add si, bx ; * 9 1406 %else 1407 %error Unexpected breakpoint size 1408 %endif 0 00002A65 81C6[0000] add si, b_bplist.bp ; -> bp structure 0 00002A69 AD lodsw 0 00002A6A 3906[0000] cmp word [..@bb_saved_linear], ax 0 00002A6E 7526 jne .next_matching 1413 %if _PM 1414 lodsw 1415 %else 0 00002A70 31C0 xor ax, ax 0 00002A72 AC lodsb ; ax = high byte 1418 %endif 0 00002A73 3906[0200] cmp word [..@bb_saved_linear + 2], ax 0 00002A77 751D jne .next_matching 1421 0 00002A79 57 push di 0 00002A7A B020 mov al, 32 0 00002A7C B92800 mov cx, 40 0 00002A7F F3AA rep stosb ; initialize field with blanks 0 00002A81 30C0 xor al, al 0 00002A83 AA stosb ; terminate it 0 00002A84 5F pop di 1429 0 00002A85 E88000 call .single ; fill buffer 1431 0 00002A88 52 push dx 0 00002A89 53 push bx 1434 %if 0 1435 test dl, 1 ; an odd point ? 1436 jnz .odd_matching ; yes --> 1437 mov di, line_out + 40 ; write next point after the field 1438 jmp .was_even_matching 1439 .odd_matching: 1440 %endif 0 00002A8A E8[0000] call putsline_crlf ; put line with linebreak (and no excess blanks) 0 00002A8D E83401 call handle_bl_when 0 00002A90 BF[0000] mov di, line_out ; write next point at start of field 1444 .was_even_matching: 0 00002A93 5B pop bx 0 00002A94 5A pop dx 0 00002A95 42 inc dx ; increment odd/even counter 1448 .next_matching: 0 00002A96 43 inc bx ; increment breakpoint index 0 00002A97 83FB10 cmp bx, _NUM_B_BP 0 00002A9A 75BF jne .loop_matching 0 00002A9C EB51 jmp .end 1453 1454 1455 .not_at: 0 00002A9E E8AF01 call getpointindex 0 00002AA1 730A jnc @F 0 00002AA3 7403E9[0000] jnz error ; "NEW" is invalid --> 1459 0 00002AA8 E8[0000] call chkeol 0 00002AAB EB11 jmp .all 1462 @@: 0 00002AAD E8[0000] call chkeol 0 00002AB0 89D3 mov bx, dx 0 00002AB2 BF[0000] mov di, line_out 0 00002AB5 E85000 call .single 0 00002AB8 E8[0000] call putsline_crlf 0 00002ABB E90601 jmp handle_bl_when 1469 1470 1471 .all: 0 00002ABE 31ED xor bp, bp ; high byte: any set points encountered yet, 1473 ; low byte: current line has any set points 0 00002AC0 31DB xor bx, bx 0 00002AC2 BF[0000] mov di, line_out 1476 .loop: 0 00002AC5 57 push di 0 00002AC6 B020 mov al, 32 0 00002AC8 B92800 mov cx, 40 0 00002ACB F3AA rep stosb ; initialize field with blanks 0 00002ACD 30C0 xor al, al 0 00002ACF AA stosb ; terminate it 0 00002AD0 5F pop di 1484 0 00002AD1 E83400 call .single ; fill buffer 1486 0 00002AD4 53 push bx 1488 %if 0 1489 test bl, 1 ; an odd point ? 1490 jnz .odd ; yes --> 1491 mov di, line_out + 40 ; write next point after the field 1492 jmp .was_even 1493 .odd: 1494 %endif 0 00002AD5 F7C5FF00 test bp, 00FFh ; any point set in this line ? 0 00002AD9 740A jz .skip_putsline ; no --> 0 00002ADB E8[0000] call putsline_crlf ; put line with linebreak (and no excess blanks) 0 00002ADE E8E300 call handle_bl_when 1499 0 00002AE1 81E500FF and bp, ~00FFh ; clear flag for next line processing 1501 .skip_putsline: 0 00002AE5 BF[0000] mov di, line_out ; write next point at start of field 1503 .was_even: 0 00002AE8 5B pop bx 0 00002AE9 43 inc bx 0 00002AEA 83FB10 cmp bx, _NUM_B_BP 0 00002AED 75D6 jne .loop 1508 .end: 0 00002AEF 81FF[0000] cmp di, line_out 0 00002AF3 7406 je @F 0 00002AF5 E8[0000] call putsline_crlf 0 00002AF8 E8C900 call handle_bl_when 1513 @@: 0 00002AFB F7C500FF test bp, 0FF00h 0 00002AFF 7506 jnz @F 0 00002B01 BA[0000] mov dx, msg.bpnone 0 00002B04 E8[0000] call putsz 1518 @@: 0 00002B07 C3 retn 1520 1521 .single: 0 00002B08 BE[0000] mov si, msg.bp 0 00002B0B E8[0000] call showstring 0 00002B0E 53 push bx 0 00002B0F 89D8 mov ax, bx 0 00002B11 E8[0000] call hexbyte ; store index of this point 0 00002B14 E8C700 call calcpointbit 0 00002B17 BE[0000] mov si, msg.bpunused 1529 %if ((_NUM_B_BP+7)>>3) != 1 0 00002B1A 84A7[0000] test byte [b_bplist.used_mask+bx], ah 1531 %else 1532 test byte [b_bplist.used_mask], ah 1533 %endif 0 00002B1E 7508 jnz @F ; if set --> 0 00002B20 E8[0000] call showstring 0 00002B23 31F6 xor si, si 0 00002B25 E99A00 jmp .unused 1538 1539 @@: 0 00002B28 81CD0101 or bp, 0101h ; flag that there was a point set in this line 0 00002B2C BE[0000] mov si, msg.bpdisabled 1542 %if ((_NUM_B_BP+7)>>3) != 1 0 00002B2F 84A7[0000] test byte [b_bplist.disabled_mask+bx], ah 1544 %else 1545 test byte [b_bplist.disabled_mask], ah 1546 %endif 0 00002B33 7503 jnz .disabled ; disabled --> (D) 0 00002B35 BE[0000] mov si, msg.bpenabled 1549 .disabled: 0 00002B38 E8[0000] call showstring 0 00002B3B BE[0000] mov si, msg.bpaddress 0 00002B3E E8[0000] call showstring 0 00002B41 58 pop ax 0 00002B42 50 push ax 0 00002B43 89C6 mov si, ax 0 00002B45 01F6 add si, si ; * 2 0 00002B47 01F6 add si, si ; * 4 1558 %if BPSIZE == 4 1559 %elif BPSIZE == 5 1560 add si, ax ; * 5 1561 %elif BPSIZE == 6 0 00002B49 01C6 add si, ax ; * 5 0 00002B4B 01C6 add si, ax ; * 6 1564 %elif BPSIZE == 9 1565 add si, si ; * 8 1566 add si, ax ; * 9 1567 %else 1568 %error Unexpected breakpoint size 1569 %endif 0 00002B4D 81C6[0000] add si, b_bplist.bp ; -> point 0 00002B51 52 push dx 0 00002B52 AD lodsw 0 00002B53 92 xchg ax, dx 1574 %if _PM 1575 lodsw 1576 call hexword 1577 %else 0 00002B54 31C0 xor ax, ax 0 00002B56 AC lodsb ; ax = high byte 0 00002B57 E8[0000] call hexbyte 1581 %endif 0 00002B5A 50 push ax 0 00002B5B B05F mov al, '_' 0 00002B5D AA stosb 0 00002B5E 58 pop ax 0 00002B5F 92 xchg ax, dx 0 00002B60 E8[0000] call hexword ; display (linear) address 1588 %if BPSIZE == 6 || BPSIZE == 9 1589 ; INP: dx:ax = linear address 1590 ; si -> (d)word offset 1591 ; di -> where to store 1592 ; OUT: cx = length displayed 1593 ; si -> after offset 1594 ; di -> after stored string 1595 ; CHG: ax, dx 0 00002B63 E80E01 call bp_display_offset ; BPSIZE implied 1597 %else 1598 xor cx, cx 1599 %endif 0 00002B66 5A pop dx 0 00002B67 AC lodsb 0 00002B68 50 push ax 0 00002B69 BE[0000] mov si, msg.bpcontent 0 00002B6C E8[0000] call showstring 0 00002B6F 58 pop ax 0 00002B70 E8[0000] call hexbyte ; display content 0 00002B73 BE[0000] mov si, msg.bpcounter 0 00002B76 E8[0000] call showstring 0 00002B79 58 pop ax 0 00002B7A 50 push ax 0 00002B7B 89C3 mov bx, ax 0 00002B7D 52 push dx 0 00002B7E 89C2 mov dx, ax 0 00002B80 01DB add bx, bx ; * 2 0 00002B82 8B87[0000] mov ax, word [b_bplist.counter + bx] 0 00002B86 E8[0000] call hexword 1617 0 00002B89 BBFFFF mov bx, -1 0 00002B8C E8BEFB call get_set_id_offset_length 0 00002B8F F6C7FC test bh, 63 << 2 ; length nonzero ? 0 00002B92 7425 jz @F ; no --> 1622 1623 ; The maximum length of a short ID is based on 1624 ; how much space there is assuming 80 columns. 0 00002B94 BE[0000] mov si, msg.bb_hitpass_id.short 1626 ; set up message for short ID 0 00002B97 D0E1 shl cl, 1 0 00002B99 D0E1 shl cl, 1 ; length offset displayed << 2 1629 ; (bx >> 10 is ID length, ie bh >> 2) 0 00002B9B F6D9 neg cl ; minus displayed 0 00002B9D 80C18C add cl, 35 << 2 ; 35 minus displayed 0 00002BA0 38CF cmp bh, cl ; long ? 0 00002BA2 7203 jb .trigger_short_id 1634 ; This jump MUST be a jb, not jbe. The jbe 1635 ; would not match ZR for words where the 1636 ; idbuffer offset is a nonzero value. 0 00002BA4 BE[0000] mov si, msg.bb_hitpass_id.long 1638 ; use long ID message imstead 1639 .trigger_short_id: 1640 0 00002BA7 E8[0000] call copy_single_counted_string 0 00002BAA 88F9 mov cl, bh 0 00002BAC D0E9 shr cl, 1 0 00002BAE D0E9 shr cl, 1 ; cx = length 0 00002BB0 80E703 and bh, 1023 >> 8 ; bx = offset 0 00002BB3 8DB7[0000] lea si, [b_bplist.idbuffer + bx] 1647 ; -> ID in buffer 0 00002BB7 F3A4 rep movsb ; copy ID 1649 1650 @@: 1651 0 00002BB9 BBFFFF mov bx, -1 0 00002BBC E8ACFC call get_set_when_offset 0 00002BBF 89DE mov si, bx 0 00002BC1 5A pop dx 1656 1657 .unused: 0 00002BC2 5B pop bx ; restore counter (if displaying all) 0 00002BC3 C3 retn 1660 1661 1662 ; CHG: si, al 1663 handle_bl_when: 0 00002BC4 87D6 xchg dx, si 0 00002BC6 85D2 test dx, dx ; no WHEN condition ? 0 00002BC8 7411 jz @F ; yes --> 0 00002BCA 52 push dx 0 00002BCB BA[0000] mov dx, msg.bb_when 0 00002BCE E8[0000] call putsz ; display label 0 00002BD1 5A pop dx 0 00002BD2 E8[0000] call putsz ; display condition 1672 %if 0 1673 mov al, '$' 1674 call putc 1675 %endif 0 00002BD5 BA[0000] mov dx, crlf 0 00002BD8 E8[0000] call putsz ; display trailer 1678 @@: 0 00002BDB 87D6 xchg dx, si 0 00002BDD C3 retn 1681 1682 1683 ; INP: ax = 0-based index of point 1684 ; OUT: (bx-> byte to access. only if at least 9 points) 1685 ; (bx = 0 always if 8 or fewer points) 1686 ; ah = value to access 1687 ; CHG: al 1688 calcpointbit: 1689 %if ((_NUM_B_BP+7)>>3) != 1 0 00002BDE 89C3 mov bx, ax ; index 1691 %endif 0 00002BE0 2407 and al, 7 ; 0 to 7 0 00002BE2 B401 mov ah, 1 ; prepare mask 0 00002BE4 91 xchg ax, cx ; cl = counter 0 to 7, ch = mask prepared 0 00002BE5 D2E5 shl ch, cl ; shift mask to access correct bit 1696 %if ((_NUM_B_BP+7)>>3) != 1 0 00002BE7 B103 mov cl, 3 0 00002BE9 D3EB shr bx, cl ; get offset 1699 %else 1700 xor bx, bx ; offset = 0 1701 %endif 0 00002BEB 91 xchg ax, cx ; ah = mask 0 00002BEC C3 retn 1704 1705 1706 ; INP: bx:dx = linear address 1707 ; OUT: NC if point found, 1708 ; dx = point index 1709 ; CY if point not found, 1710 ; bx:dx unchanged 1711 ; CHG: di 1712 findpointat: 1713 lframe near 0 00002BED 5589E5 lenter 1715 lvar word, orig_ax 0 00002BF0 50 push ax 1717 lvar word, orig_si 0 00002BF1 56 push si 1719 lvar dword, orig_bxdx 0 00002BF2 53 push bx 0 00002BF3 52 push dx 0 00002BF4 31D2 xor dx, dx 1723 .loop: 0 00002BF6 89D0 mov ax, dx 0 00002BF8 E8E3FF call calcpointbit 1726 %if ((_NUM_B_BP+7)>>3) != 1 0 00002BFB 84A7[0000] test byte [b_bplist.used_mask + bx], ah 1728 %else 1729 test byte [b_bplist.used_mask], ah 1730 %endif ; in use ? 0 00002BFF 741F jz .next ; no --> 1732 0 00002C01 89D6 mov si, dx 0 00002C03 01F6 add si, si ; * 2 0 00002C05 01F6 add si, si ; * 4 1736 %if BPSIZE == 4 1737 %elif BPSIZE == 5 1738 add si, dx ; * 5 1739 %elif BPSIZE == 6 0 00002C07 01D6 add si, dx ; * 5 0 00002C09 01D6 add si, dx ; * 6 1742 %elif BPSIZE == 9 1743 add si, si ; * 8 1744 add si, dx ; * 9 1745 %else 1746 %error Unexpected breakpoint size 1747 %endif 0 00002C0B 81C6[0000] add si, b_bplist.bp ; -> point 0 00002C0F AD lodsw 0 00002C10 3946F8 cmp word [bp + ?orig_bxdx], ax 0 00002C13 750B jne .next 1752 %if _PM 1753 lodsw 1754 %else 0 00002C15 31C0 xor ax, ax 0 00002C17 AC lodsb ; ax = high byte 1757 %endif 0 00002C18 3946FA cmp word [bp + ?orig_bxdx + 2], ax 0 00002C1B 7503 jne .next 1760 ; (NC) 0 00002C1D 5B pop bx ; discard dx on stack, clobbering bx 0 00002C1E EB08 jmp .ret_with_dx 1763 1764 .next: 0 00002C20 42 inc dx 0 00002C21 83FA10 cmp dx, _NUM_B_BP 0 00002C24 72D0 jb .loop 1768 0 00002C26 F9 stc 1770 .ret: 0 00002C27 5A pop dx 1772 .ret_with_dx: 0 00002C28 5B pop bx ; pop ?orig_bxdx 0 00002C29 5E pop si ; pop ?orig_si 0 00002C2A 58 pop ax ; pop ?orig_ax 0 00002C2B 89EC5D lleave 0 00002C2E C3 lret 1778 1779 1780 ; INP: si->, al= 1781 ; OUT: CY if no "AT" keyword + address, 1782 ; si, al unchanged 1783 ; NC if "AT" keyword + address, 1784 ; si->, al= after 1785 ; bx:dx = dword [..@bb_saved_linear] = linear address 1786 ; CHG: edx, bx 1787 getpointat: 0 00002C2F 4E dec si ; -> nonblank 0 00002C30 BA[0000] mov dx, msg.at ; "AT" keyword ? 0 00002C33 E8[0000] call isstring? 0 00002C36 AC lodsb ; load separator or nonblank 0 00002C37 7402 je .at ; yes --> 0 00002C39 F9 stc ; no 0 00002C3A C3 retn 1795 1796 .at: 0 00002C3B 8B1E[0000] mov bx, word [reg_cs] 0 00002C3F E8[0000] call getlinearaddr ; get address 0 00002C42 7303E9[0000] jc error 0 00002C47 8916[0000] mov word [..@bb_saved_linear], dx 0 00002C4B 891E[0200] mov word [..@bb_saved_linear + 2], bx 1802 ; also store this 0 00002C4F C3 retn 1804 1805 1806 ; INP: si->, al= 1807 ; OUT: NC if a point is specified, 1808 ; dx = point index (0-based, below _NUM_B_BP) 1809 ; CY if a keyword is specified, 1810 ; ZR if "ALL" keyword specified 1811 ; NZ if "NEW" keyword specified 1812 getpointindex: 0 00002C50 4E dec si 0 00002C51 BA[0000] mov dx, msg.all ; "ALL" keyword ? 0 00002C54 E8[0000] call isstring? 0 00002C57 7418 je .is_all ; yes --> (ZR) 0 00002C59 BA[0000] mov dx, msg.new ; "NEW" keyword ? 0 00002C5C E8[0000] call isstring? 0 00002C5F 740E je .is_new ; yes --> 0 00002C61 AC lodsb 0 00002C62 E8[0000] nearcall getword ; get index 0 00002C65 83FA10 cmp dx, _NUM_B_BP ; valid index ? 0 00002C68 7203E9[0000] jae error ; no --> 0 00002C6D F8 clc ; (NC) 0 00002C6E C3 retn 1826 1827 .is_new: 0 00002C6F 85F6 test si, si ; (NZ) (si points into line_in) 1829 .is_all: 0 00002C71 F9 stc ; (CY) 0 00002C72 AC lodsb ; al = separator, si-> after 0 00002C73 C3 retn 1833 %endif 1834 1835 1836 %if BPSIZE == 6 || BPSIZE == 9 1837 ; INP: dx:ax = linear address 1838 ; si -> (d)word offset 1839 ; di -> where to store 1840 ; OUT: cx = length displayed 1841 ; si -> after offset 1842 ; di -> after stored string 1843 ; CHG: ax, dx 1844 bp_display_offset: 1845 lframe 1846 lvar dword, offset 0 00002C74 5589E55050 lenter 1848 lvar dword, linear 0 00002C79 52 push dx 0 00002C7A 50 push ax 0 00002C7B B82020 mov ax, " " 1852 lvar word, prefix 0 00002C7E 50 push ax ; prefix: two blanks 1854 lvar word, start_write 0 00002C7F 57 push di 0 00002C80 53 push bx 0 00002C81 AD lodsw 1858 %if _PM 1859 xchg ax, dx 1860 lodsw 1861 cmp ax, -1 ; high word is all-1s ? 1862 xchg ax, dx 1863 jne @F ; no --> 1864 %else 0 00002C82 31D2 xor dx, dx 1866 %endif 0 00002C84 83F8FF cmp ax, -1 ; all-1s ? 0 00002C87 7436 je .skip ; yes --> 1869 @@: 0 00002C89 8956FE mov word [bp + ?offset + 2], dx 0 00002C8C 8946FC mov word [bp + ?offset], ax 1872 0 00002C8F 8B56FA mov dx, word [bp + ?linear + 2] 0 00002C92 8B46F8 mov ax, word [bp + ?linear] 0 00002C95 2B46FC sub ax, word [bp + ?offset] 0 00002C98 1B56FE sbb dx, word [bp + ?offset + 2] 1877 ; = base we want 1878 1879 %if _PM 1880 call ispm 1881 jnz .r86m 1882 1883 push dx 1884 push ax ; stack = wanted base 1885 mov ax, 6 1886 mov bx, word [reg_cs] ; user CS 1887 int 31h ; cx:dx = CS base 1888 mov bx, dx ; cx:bx = base 1889 pop ax 1890 pop dx ; dx:ax = wanted base 1891 jc .try_r86m 1892 1893 cmp cx, dx ; does it match CS ? 1894 jne .try_r86m 1895 cmp bx, ax 1896 jne .try_r86m ; no --> 1897 ; yes 1898 mov ax, " " 1899 stosw 1900 mov ax, "CS" 1901 stosw 1902 jmp .offset 1903 1904 .try_r86m: 1905 mov byte [bp + ?prefix + 1], '$' 1906 ; change prefix to " $" to indicate 86M 1907 %endif 1908 1909 .r86m: 0 00002C9B B90400 mov cx, 4 0 00002C9E A80F test al, 15 ; on a paragraph boundary ? 0 00002CA0 7527 jnz .questionmarks ; no --> 0 00002CA2 F7C2F0FF test dx, 0FFF0h ; segment base <= 0F_FFF0h ? 0 00002CA6 7521 jnz .questionmarks ; no --> 0 00002CA8 D3E8 shr ax, cl ; = low 12 bits of base segment 0 00002CAA D3CA ror dx, cl ; move high 4 bits of base segment up 0 00002CAC 09C2 or dx, ax ; = base 0 00002CAE 8B46F6 mov ax, word [bp + ?prefix] 0 00002CB1 AB stosw ; store the prefix 0 00002CB2 92 xchg ax, dx 0 00002CB3 E8[0000] call hexword ; write address 1922 1923 .offset: 0 00002CB6 B03A mov al, ':' 0 00002CB8 AA stosb ; store a colon 1926 %if _PM 1927 mov ax, word [bp + ?offset + 2] 1928 test ax, ax 1929 jz @F 1930 call hexword ; nonzero upper word 1931 @@: 1932 %endif 0 00002CB9 8B46FC mov ax, word [bp + ?offset] 0 00002CBC E8[0000] call hexword ; lower word 1935 1936 .skip: 0 00002CBF 5B pop bx 0 00002CC0 59 pop cx ; get ?start_write 0 00002CC1 F7D9 neg cx ; minus start offset 0 00002CC3 01F9 add cx, di ; end offset minus start offset = length 0 00002CC5 89EC5D lleave 0 00002CC8 C3 retn 1943 1944 .questionmarks: 0 00002CC9 B82020 mov ax, " " 0 00002CCC AB stosw 0 00002CCD B83F3F mov ax, "??" 0 00002CD0 AB stosw 0 00002CD1 AB stosw ; fill with question marks 0 00002CD2 EBE2 jmp .offset 1951 1952 1953 %if _BREAKPOINTS 1954 point_swap: 0 00002CD4 E879FF call getpointindex 0 00002CD7 7303E99900 jc .error 0 00002CDC 89D5 mov bp, dx ; bp = first index 0 00002CDE E86FFF call getpointindex ; dx = second index 0 00002CE1 7303E98F00 jc .error 0 00002CE6 E8[0000] call chkeol 1961 0 00002CE9 B90200 mov cx, 2 ; loop across pushing twice 1963 .loop_push: 0 00002CEC 89D0 mov ax, dx 0 00002CEE E8EDFE call calcpointbit 0 00002CF1 88E0 mov al, ah ; al = ah = mask 0 00002CF3 22A7[0000] and ah, byte [b_bplist.used_mask + bx] 0 00002CF7 2287[0000] and al, byte [b_bplist.disabled_mask + bx] 1969 ; ah = nonzero if used, al = nonzero if disabled 0 00002CFB 50 push ax ; push flag bits word 0 00002CFC 89D3 mov bx, dx 0 00002CFE 01DB add bx, bx ; * 2 0 00002D00 FFB7[0000] push word [b_bplist.counter + bx] 0 00002D04 FFB7[0000] push word [b_bplist.id + bx] 0 00002D08 FFB7[0000] push word [b_bplist.when + bx] 1976 ; push array entries 1977 0 00002D0C 01DB add bx, bx ; * 4 1979 %if BPSIZE == 4 1980 %elif BPSIZE == 5 1981 add bx, dx ; * 5 1982 %elif BPSIZE == 6 0 00002D0E 01D3 add bx, dx ; * 5 0 00002D10 01D3 add bx, dx ; * 6 1985 %elif BPSIZE == 9 1986 add bx, bx ; * 8 1987 add bx, dx ; * 9 1988 %else 1989 %error Unexpected breakpoint size 1990 %endif 0 00002D12 FFB7[0000] push word [b_bplist.bp + bx] 0 00002D16 FFB7[0200] push word [b_bplist.bp + bx + 2] 1993 %if BPSIZE == 4 1994 %elif BPSIZE == 5 1995 push word [b_bplist.bp + bx + 4] 1996 %elif BPSIZE == 6 0 00002D1A FFB7[0400] push word [b_bplist.bp + bx + 4] 1998 %elif BPSIZE == 9 1999 push word [b_bplist.bp + bx + 4] 2000 push word [b_bplist.bp + bx + 6] 2001 push word [b_bplist.bp + bx + 8] 2002 %else 2003 %error Unexpected breakpoint size 2004 %endif ; push point 0 00002D1E 87EA xchg bp, dx ; swap to the other point 0 00002D20 E2CA loop .loop_push ; iterate for two times pushing 2007 0 00002D22 B102 mov cl, 2 ; loop across popping twice 2009 .loop_pop: 0 00002D24 89D3 mov bx, dx 0 00002D26 01DB add bx, bx ; * 2 0 00002D28 01DB add bx, bx ; * 4 2013 %if BPSIZE == 4 2014 %elif BPSIZE == 5 2015 add bx, dx ; * 5 2016 %elif BPSIZE == 6 0 00002D2A 01D3 add bx, dx ; * 5 0 00002D2C 01D3 add bx, dx ; * 6 2019 %elif BPSIZE == 9 2020 add bx, bx ; * 8 2021 add bx, dx ; * 9 2022 %else 2023 %error Unexpected breakpoint size 2024 %endif 2025 %if BPSIZE == 4 2026 %elif BPSIZE == 5 2027 pop ax 2028 mov byte [b_bplist.bp + bx + 4], al 2029 %elif BPSIZE == 6 0 00002D2E 8F87[0400] pop word [b_bplist.bp + bx + 4] 2031 %elif BPSIZE == 9 2032 pop ax 2033 mov byte [b_bplist.bp + bx + 8], al 2034 pop word [b_bplist.bp + bx + 6] 2035 pop word [b_bplist.bp + bx + 4] 2036 %else 2037 %error Unexpected breakpoint size 2038 %endif 0 00002D32 8F87[0200] pop word [b_bplist.bp + bx + 2] 0 00002D36 8F87[0000] pop word [b_bplist.bp + bx] 2041 ; pop point 2042 0 00002D3A 89D3 mov bx, dx 0 00002D3C 01DB add bx, bx ; * 2 0 00002D3E 8F87[0000] pop word [b_bplist.when + bx] 0 00002D42 8F87[0000] pop word [b_bplist.id + bx] 0 00002D46 8F87[0000] pop word [b_bplist.counter + bx] 2048 ; pop array entries 0 00002D4A 5E pop si 0 00002D4B 89D0 mov ax, dx 0 00002D4D E88EFE call calcpointbit 0 00002D50 87F2 xchg si, dx 0 00002D52 F6D4 not ah ; mask to turn off flag bits 0 00002D54 20A7[0000] and byte [b_bplist.used_mask + bx], ah 0 00002D58 20A7[0000] and byte [b_bplist.disabled_mask + bx], ah 2056 ; clear bits 0 00002D5C F6D4 not ah ; get back mask to turn on 0 00002D5E 84D2 test dl, dl ; nonzero if disabled 0 00002D60 7404 jz @F ; not disabled --> 0 00002D62 08A7[0000] or byte [b_bplist.disabled_mask + bx], ah 2061 @@: 0 00002D66 84F6 test dh, dh ; nonzero if used 0 00002D68 7404 jz @F ; not used --> 0 00002D6A 08A7[0000] or byte [b_bplist.used_mask + bx], ah 2065 @@: 0 00002D6E 87F2 xchg si, dx ; restore dx = point index 0 00002D70 87EA xchg bp, dx ; swap to the other point 0 00002D72 E2B0 loop .loop_pop 0 00002D74 C3 retn 2070 2071 .error: 0 00002D75 E9[0000] jmp error 2073 %endif 2074 %endif 2075 2076 %if _DUALCODE 2077 usesection lDEBUG_CODE2 2078 2079 section_of bu_relocated 2080 dualfunction 2081 bu_relocated: section_of_function 2082 lframe dualdistance 2083 lpar word, sign 2084 lenter 2085 mov ax, word [bp + ?sign] 2086 mov di, msg.bu_relocated.sign 2087 nearcall hexword 2088 mov dx, msg.bu_relocated 2089 nearcall putsz 2090 lleave 2091 dualreturn 2092 lret 2093 2094 usesection lDEBUG_CODE 2095 %endif 2096 2097 bu_breakpoint: 2098 %if _DUALCODE 2099 cmp al, '2' 2100 je .2 2101 %endif 0 00002D78 E8[0000] call chkeol 2103 %if _DEBUG || _LOADER 2104 %if _DEBUG_COND 2105 testopt [internalflags6], dif6_debug_mode 2106 jnz @F 2107 mov ax, 013Ah 2108 call setrc 2109 mov dx, msg.bu_disabled 2110 jmp putsz 2111 @@: 2112 %endif 2113 mov dx, msg.bu 2114 call putsz 2115 pop dx ; discard near return address 2116 mov dx, dmycmd ; point dx to empty function 2117 jmp cmd4.int3 ; run a breakpoint right before dispatcher 2118 %else 0 00002D7B B83B01 mov ax, 013Bh 0 00002D7E E8[0000] call setrc 0 00002D81 BA[0000] mov dx, msg.notbu 0 00002D84 E9[0000] jmp putsz 2123 %endif 2124 2125 %if _DUALCODE 2126 .2: 2127 call skipwhite 2128 call chkeol 2129 mov ax, 2642h 2130 push ax 2131 dualcall bu_relocated 2132 retn 2133 %endif === Trace listing source: ../lst/debug.obj/boot.lst 1 2 %if 0 3 4 lDebug "boot" commands - boot loading 5 6 Copyright (C) 2008-2026 E. C. Masloch 7 8 Usage of the works is permitted provided that this 9 instrument is retained with the works, so that any entity 10 that uses the works is notified of this instrument. 11 12 DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 14 %endif 15 16 %define SOURCEFILENAME "boot.asm" 17 %ifidni __OUTPUT_FORMAT__, obj 18 %include "debug.mac" 1 <1> [list -] 14 <3> [list -] 14 <2> [list -] 86 <1> [list -] 86 ------------------ <1> note: Disable usesection detection === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00005BC0 ???????? eldhSignature: resb 4 ; "ELD1" 0 00005BC4 ?????? resb 3 ; reserved 0 00005BC7 ?? resb 1 ; 26 (Ctrl-Z) 0 00005BC8 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00005BCC ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00005BCE ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00005BD0 ???????? eldhDataOffset: resd 1 0 00005BD4 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00005BD6 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00005BD8 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00005BDA ???????? eldhReserved: resb 4 ; reserved 0 00005BDE ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00005BE0 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00005BE4 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00005BE8 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00005BEC ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00005BC0 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00005BC8 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00005BCC ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00005BCE ???? 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 0 00005BC0 ???? 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 0 00005BC2 ???? eldltAmount: resw 1 0 00005BC4 ???????? 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 0 00005BC0 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00005BC2 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00005BC4 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00005BC6 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00005BC8 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00005BD0 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00005BC0 ???? eldlSignature: resw 1 ; 0E1D1h 0 00005BC2 ???????? eldlReserved: resw 2 0 00005BC6 ???? eldlUseLinkHash: resw 1 0 00005BC8 ???? eldlDataAmount: resw 1 0 00005BCA ???? eldlDataPrefixes: resw 1 0 00005BCC ???? eldlDataEntries: resw 1 0 00005BCE ???? eldlDataAddresses: resw 1 0 00005BD0 ???? eldlCodeAmount: resw 1 0 00005BD2 ???? eldlCodePrefixes: resw 1 0 00005BD4 ???? eldlCodeEntries: resw 1 0 00005BD6 ???? 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 0 00005BC0 ???? ifKeyword: resw 1 0 00005BC2 ???? ifDescription: resw 1 0 00005BC4 ???? ifOptions: resw 1 0 00005BC6 ???? ifValue: resw 1 0 00005BC8 ???? ifTrying: resw 1 0 00005BCA ???? 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 0 00005BC0 ???????? saOffset: resd 1 0 00005BC4 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00005BC0 ???? so16aOffset: resw 1 0 00005BC2 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00005BC0 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00005BC0 ?????? bsJump: resb 3 0 00005BC3 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00005BC0 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00005BC2 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00005BC3 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00005BC5 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00005BC6 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 00005BC8 ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 00005BCA ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 00005BCB ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00005BCD ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00005BCF ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00005BD1 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00005BD5 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 00005BD9 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00005BDD ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00005BDF ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00005BE1 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00005BE5 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 00005BE7 ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00005BC0 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00005BC1 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00005BC2 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00005BC3 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00005BD2 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00005BC0 ???????????????? deName: resb 8 0 00005BC8 ?????? deExt: resb 3 0 00005BCB ?? deAttrib: resb 1 0 00005BCC ?? dePlusSize: resb 1 0 00005BCD ?????????????? resb 7 0 00005BD4 ???? deClusterHigh: resw 1 0 00005BD6 ???? deTime: resw 1 0 00005BD8 ???? deDate: resw 1 0 00005BDA ???? deClusterLow: resw 1 0 00005BDC ???????? 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 0 100005BB0 ???????? lsvFirstCluster: resd 1 0 100005BB4 ???????? lsvFATSector: resd 1 0 100005BB8 ???? lsvFATSeg: resw 1 0 100005BBA ???? lsvLoadSeg: resw 1 0 100005BBC ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100005BA0 ???? ldMemoryTop: resw 1 0 100005BA2 ???? ldLoadTop: resw 1 0 100005BA4 ???? ldSectorSeg: resw 1 0 100005BA6 ?? ldFATType: resb 1 92 <2> ldFlags: 0 100005BA7 ?? ldHasLBA: resb 1 0 100005BA8 ???? ldClusterSize: resw 1 0 100005BAA ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100005BAC ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100005BAE ?? .partition: resb 1 ; byte 0 100005BAF ?? .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 <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 0 100005B90 ???????? ldRootSector: resd 1 0 100005B94 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 100005B96 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 100005B98 ???? ldParasLeft: resw 1 0 100005B9A ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 100005B80 ???????? ldMaxCluster: resd 1 0 100005B84 ???????? ldFileSize: resd 1 0 100005B88 ???????? ldCurrentCluster: resd 1 0 100005B8C ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00005BC0 ???????? liiSignature: resb 4 ; "NLDR" 0 00005BC4 ???? liiVersion: resb 2 ; "00" 0 00005BC6 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 00005BC8 ???? liiAmountParagraphs: resw 1 0 00005BCA ???????????? liiReserved: resw 3 0 00005BD0 ???? 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 0 00005BD2 ???? 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 0 00005BD4 ???? 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 0 00005BD6 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00005BC0 ???? lpSize: resw 1 0 00005BC2 ???? lpCount: resw 1 0 00005BC4 ???????? lpBuffer: resd 1 0 00005BC8 ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00005BC0 ?? piBoot: resb 1 0 00005BC1 ?????? piStartCHS: resb 3 0 00005BC4 ?? piType: resb 1 0 00005BC5 ?????? piEndCHS: resb 3 0 00005BC8 ???????? piStart: resd 1 0 00005BCC ???????? 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 0 00005BC0 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00005BC2 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00005BC4 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00005BC6 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 00005BC8 ???? lsOptions: resw 1 ; option flags 0 00005BCA ???? lsSegment: resw 1 ; => where to load file 0 00005BCC ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00005BD0 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00005BD4 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00005BD6 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 00005BD8 ???????????????? 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 0 00005BC0 ???? exact_struc_at 00h, exeSignature: resw 1 0 00005BC2 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00005BC4 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00005BC6 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 00005BC8 ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 00005BCA ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00005BCC ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00005BCE ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00005BD0 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00005BD2 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00005BD4 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00005BD6 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 00005BD8 ???? 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. 0 00005BDA ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00005BC0 ???? ifhHandle: resw 1 0 00005BC2 ???? ifhFlags: resw 1 0 00005BC4 ???????? 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 <1> areastrucEntry: resb 24 0 00005BD8 ???????? areastrucNext: resd 1 0 00005BDC ???????? areastrucPrev: resd 1 0 00005BE0 ???? areastrucSubAmount: resw 1 0 00005BE2 ???? areastrucSubOffset: resw 1 0 00005BE4 ???? areastrucFunAmount: resw 1 0 00005BE6 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00005BC0 ???????? areastrucsubLinear: resd 1 0 00005BC4 ???????? areastrucsubLinearEnd: resd 1 0 00005BC8 ???? areastrucsubListOffset: resw 1 0 00005BCA ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00005BC0 ???????? areastrucfunLinear: resd 1 0 00005BC4 ???????? areastrucfunLinearEnd: resd 1 0 00005BC8 ???? areastrucfunListOffset: resw 1 0 00005BCA ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00005BC0 ???? areastart: resw 1 0 00005BC2 ???? areaend: resw 1 0 00005BC4 ???? areamessage: resw 1 0 00005BC6 ???? 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 0 00005BC0 ???? 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.) 0 00005BC2 ???? ivFlags: resw 1 0 00005BC4 ???? 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. 0 00005BC6 ???? 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 0 00005BC8 ?? 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. 0 00005BC9 ?? 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 0 00005BC0 ???????? mrLinear: resd 1 0 00005BC4 ???????? mrOffset: resd 1 0 00005BC8 ???? mrSegmentSelector: resw 1 0 00005BCA ???? mrFlags: resw 1 0 00005BCC ???????? 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 0 00005BC0 ???????? .size_: resd 1 0 00005BC4 ???? .srchdl: resw 1 0 00005BC6 ???????? .srcadr: resd 1 0 00005BCA ???? .dsthdl: resw 1 0 00005BCC ???????? .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 19 %endif 20 21 22 %if _LINK && !_BOOTLDR 23 usesection lDEBUG_CODE2 24 global behind_code_truncated 25 behind_code_truncated: 26 %endif 27 28 %if !_LINK || _BOOTLDR 29 usesection lDEBUG_DATA_ENTRY 29 ------------------ note: usesection lDEBUG_DATA_ENTRY 30 31 align 16, db 0 32 load_unit_flags: 0 00005BC0 00 times 128 db _LUF_DEFAULT_DISKETTE 0 00005C40 00 times 128 db _LUF_DEFAULT_HARDDISK 35 36 align 16, db 0 0 00005CC0 00 load_partition_table: times 16 * 4 db 0 38 .end: 39 40 align 16, db 0 41 ; Data passed to us from loader (in case we booted) 42 loaddata_loadedfrom: 0 00005D00 00 times (-LOADDATA + bsBPB + ebpbNew + BPBN_size) db 0 44 0 00005D7A 00 align 16, db 0 46 load_data_lowest: 0 00005D80 00 times LOADDATA3_size db 0 48 ; data used to access storage 49 load_data: 0 00005D90 00 times (-LOADDATA2 + bsBPB + ebpbNew + BPBN_size) db 0 0 00005E1A 00 align 16, db 0 52 load_current_settings: 53 istruc LOADSETTINGS 0 00005E20 0000 at lsKernelName, load_kernelname_default: dw 0 0 00005E22 0000 at lsAddName, load_addname_default: dw 0 0 00005E24 0000 at lsMinPara, load_minpara: dw 0 0 00005E26 0000 at lsMaxPara, load_maxpara: dw 0 0 00005E28 0000 at lsOptions, load_options: dw 0 0 00005E2A 0000 at lsSegment, load_loadseg: dw 0 0 00005E2C 00000000 at lsEntry, load_entrypoint: dd 0 0 00005E30 00000000 at lsBPB, load_bpb: dd 0 0 00005E34 0000 at lsCheckOffset, load_check_offset: dw 0 0 00005E36 0000 at lsCheckValue, load_check_value: dw 0 64 at lsName 65 ; iend 66 %pop ; (pop off the istruc context) 67 68 %if _INPUT_FILE_BOOT || _EXTENSIONS 0 00005E38 00 align 16, db 0 70 load_yy_direntry: 0 00005E40 00 times DIRENTRY_size db 0 72 %endif 73 74 %if _INPUT_FILE_BOOT 75 align 16, db 0 76 load_input_file: 0 00005E60 00 times _INPUT_FILE_BOOT * LOAD_INPUT_FILE_SIZE db 0 78 .active: 0 000060E0 0000 dw 0 80 .goto_offset: 0 000060E2 0000 dw 0 82 %endif 83 84 align 4, db 0 0 000060E4 00000000 load_bpb_dest: dd 0 86 load_sectors: equ load_data - LOADDATA2 + bsBPB + bpbCHSSectors 87 load_heads: equ load_data - LOADDATA2 + bsBPB + bpbCHSHeads 88 load_sectorsize: equ load_data - LOADDATA2 + bsBPB + bpbBytesPerSector 89 load_sectorsizepara: equ load_data - LOADDATA2 + ldParaPerSector 90 load_sectorseg: equ load_data - LOADDATA2 + ldSectorSeg 0 000060E8 00000000 load_partition_sector: dd 0 92 load_ldp_sector: equ loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 0 000060EC 00000000 load_sdp_sector: dd 0 0 000060F0 0000 load_partition_cycle: dw 0 0 000060F2 0000 load_cmdline: dw 0 96 load_ldflags: equ load_data - LOADDATA2 + ldFlags 97 load_unit: equ load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 0 000060F4 00000000 load_partition_entry: dw 0, 0 ; far pointer 0 000060F8 00 load_partition: db 0 0 000060F9 00 load_current_partition: db 0 0 000060FA 00 load_found_partition: db 0 0 000060FB 00 load_check_dir_attr: db 0 0 000060FC 00 load_sector_alt: db 0 0 000060FD 00 load_sdp_unit: db 0 0 000060FE 00 load_cmdline_first: db 0 106 0 000060FF 00 align 4, db 0 0 00006100 00 load_kernel_name: times 11 + 1 db 0 109 align 2, db 0 110 ; load_kernelname_default:dw 0 111 ; ASCIZ filename for if load_kernelname_input terminates in '/' 0 0000610C 0000 load_kernelname_input: dw 0 113 ; input (ASCIZ '/'-terminated pathnames + optional filename) 0 0000610E 0000 load_kernelname_next: dw 0 115 ; next element in ASCIZ load_kernelname_input, 116 ; empty string if pathname terminated in '/' 117 ; load_addname_default: dw 0 0 00006110 0000 load_addname_input: dw 0 0 00006112 0000 load_addname_next: dw 0 120 %if _INPUT_FILE_BOOT || _EXTENSIONS 0 00006114 0000 load_yyname_input: dw 0 0 00006116 0000 load_yyname_next: dw 0 123 %endif 124 125 align 2, db 0 0 00006118 0000 load_adr_dirbuf_segment:dw 0 0 0000611A 0000 boot_new_memsizekib: dw 0 0 0000611C 0000 boot_old_memsizekib: dw 0 0 0000611E 00 boot_ebdaflag: db 0 ; EBDA flag: non-zero if present 130 0 0000611F 00 align 4, db 0 0 00006120 00000000 load_readwrite_sector: dd 0 0 00006124 0000 load_readwrite_buffer: dw 0 0 00006126 0000 load_readwrite_count: dw 0 0 00006128 0000 load_readwrite_function:dw 0 136 137 138 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 138 ------------------ note: usesection lDEBUG_CODE 139 %if _LINK_COMPAT 140 align 4, db 0 141 %endif 142 %if _LINK 143 behind_code_truncated: 144 %endif 145 146 init_bootcmd: section_of_function 0 0000C374 E8[0000] call guard_re 0 0000C377 BD[0002] mov bp, load_data - LOADDATA2 149 0 0000C37A F606[0000]80 testopt [internalflags3], dif3_partition_changed 0 0000C37F 7429 jz @F 152 0 0000C381 FF761E push word [bp + bsBPB + bpbHiddenSectors + 2] 0 0000C384 FF761C push word [bp + bsBPB + bpbHiddenSectors] 0 0000C387 8F06[2805] pop word [load_partition_sector] 0 0000C38B 8F06[2A05] pop word [load_partition_sector + 2] 0 0000C38F 8A0E[4002] mov cl, byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit] 0 0000C393 880E[3D05] mov byte [load_sdp_unit], cl 0 0000C397 FF761E push word [bp + bsBPB + bpbHiddenSectors + 2] 0 0000C39A FF761C push word [bp + bsBPB + bpbHiddenSectors] 0 0000C39D 8F06[2C05] pop word [load_sdp_sector] 0 0000C3A1 8F06[2E05] pop word [load_sdp_sector + 2] 0 0000C3A5 8026[0000]7F clropt [internalflags3], dif3_partition_changed 165 @@: 166 0 0000C3AA 31C9 xor cx, cx 0 0000C3AC 894E1C mov [bp + bsBPB + bpbHiddenSectors + 0], cx 0 0000C3AF 894E1E mov [bp + bsBPB + bpbHiddenSectors + 2], cx 0 0000C3B2 880E[3C05] mov byte [load_sector_alt], cl 171 %if _CONFIG 0 0000C3B6 890E[0000] mov word [yy_boot_attempt_open_pathname], cx 173 %endif 0 0000C3BA C3 retn 175 176 177 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 177 ------------------ note: usesection lDEBUG_DATA_ENTRY 178 0 0000612A 00 align 4, db 0 180 bootcmd_dispatch: 0 0000612C [0B05] dw bootcmd.list 0 0000612E [0000] dw msg.list 0 00006130 [6200] dw bootcmd.quit 0 00006132 [0000] dw msg.quit 0 00006134 [2809] dw boot_read 0 00006136 [0000] dw msg.read 0 00006138 [3009] dw boot_write 0 0000613A [0000] dw msg.write 0 0000613C [D911] dw boot_dir 0 0000613E [0000] dw msg.dir 0 00006140 [9800] dw bootcmd.protocol 0 00006142 [0000] dw msg.protocol 0 00006144 0000 dw 0 ; table end marker 194 195 196 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 196 ------------------ note: usesection lDEBUG_CODE 197 198 bootcmd: 199 %if _PM 200 call ispm 201 jnz .rm 202 mov dx, nopmsupp 203 mov ax, 0201h 204 call setrc 205 jmp putsz_error 206 .rm: 207 %endif 208 d4 call d4message 209 d4 asciz "In bootcmd",13,10 210 0 0000C3BB E8B6FF call init_bootcmd 212 0 0000C3BE E8[0000] call skipcomma 0 0000C3C1 4E dec si 0 0000C3C2 BB[6C05] mov bx, bootcmd_dispatch 216 @@: 0 0000C3C5 8B0F mov cx, [bx] 0 0000C3C7 8B5702 mov dx, [bx + 2] 0 0000C3CA 83C304 add bx, 4 0 0000C3CD E370 jcxz .notproto 0 0000C3CF E8[0000] call isstring? 0 0000C3D2 75F1 jne @B 0 0000C3D4 FFE1 jmp cx 224 225 226 .quit: 227 %if _DOSEMU 0 0000C3D6 F606[0300]01 testopt [internalflags], runningdosemu 0 0000C3DB 7407 jz .quit_not_dosemu 230 0 0000C3DD 31DB xor bx, bx 0 0000C3DF B8FFFF mov ax, -1 0 0000C3E2 CDE6 int 0E6h ; dosemu quit 234 235 .quit_not_dosemu: 236 %endif 237 238 ; from https://stackoverflow.com/a/5240330/738287 0 0000C3E4 B80153 mov ax, 5301h 0 0000C3E7 31DB xor bx, bx 0 0000C3E9 CD15 int 15h ; connect to APM API 242 0 0000C3EB B80E53 mov ax, 530Eh 0 0000C3EE 31DB xor bx, bx 0 0000C3F0 B90201 mov cx, 0102h 0 0000C3F3 CD15 int 15h ; set APM version to 1.02 247 0 0000C3F5 B80753 mov ax, 5307h 0 0000C3F8 BB0100 mov bx, 1 0 0000C3FB B90300 mov cx, 3 0 0000C3FE CD15 int 15h ; shut down system 252 0 0000C400 BA[0000] mov dx, msg.boot_quit_fail 0 0000C403 B80202 mov ax, 0202h 0 0000C406 E8[0000] call setrc 0 0000C409 E9[0000] jmp putsz_error 257 258 259 .protocol: 0 0000C40C E8[0000] call skipequals 0 0000C40F 4E dec si 0 0000C410 BA[0000] mov dx, msg.sector 0 0000C413 E8[0000] call isstring? 0 0000C416 7423 je .proto_sector 265 0 0000C418 BA[0000] mov dx, msg.sector_alt 0 0000C41B E8[0000] call isstring? 0 0000C41E 7416 je .proto_sector_alt 269 0 0000C420 BB[0000] mov bx, loadsettings 271 .proto_settings_next: 0 0000C423 8D5718 lea dx, [bx + lsName] 0 0000C426 E8[0000] call isstring? 0 0000C429 7421 je .proto_settings 0 0000C42B 83C320 add bx, LOADSETTINGS_size 0 0000C42E 833F00 cmp word [bx], 0 0 0000C431 75F0 jne .proto_settings_next 278 0 0000C433 E9[0000] jmp error 280 281 .proto_sector_alt: 0 0000C436 C606[3C05]01 mov byte [load_sector_alt], 1 283 .proto_sector: 0 0000C43B E8[0000] call skipcomma 0 0000C43E A8 db __TEST_IMM8 286 .notproto: 0 0000C43F AC lodsb 0 0000C440 E83406 call parseloadunit_default_sdp 0 0000C443 E93A03 jmp .load 290 291 292 .errordec: 0 0000C446 4E dec si 294 .error: 0 0000C447 A8 db __TEST_IMM8 ; skip pop 296 .errorpop: 0 0000C448 5E pop si 0 0000C449 E9[0000] jmp error 299 300 301 .proto_settings: 0 0000C44C 56 push si 0 0000C44D 89DE mov si, bx 0 0000C44F BF[6002] mov di, load_current_settings 0 0000C452 B90C00 mov cx, lsName >> 1 0 0000C455 F3A5 rep movsw 307 %if lsName & 1 308 movsb 309 %endif 0 0000C457 FF75E8 push word [load_kernelname_default - (load_current_settings + lsName) + di] 0 0000C45A 8F85D402 pop word [load_kernelname_input - (load_current_settings + lsName) + di] 0 0000C45E FF75EA push word [load_addname_default - (load_current_settings + lsName) + di] 0 0000C461 8F85D802 pop word [load_addname_input - (load_current_settings + lsName) + di] 314 0 0000C465 5E pop si 316 317 d4 call d4message 318 d4 asciz "In bootcmd.proto_settings",13,10 319 320 .proto_next: 0 0000C466 E8[0000] call skipcomma 0 0000C469 4E dec si 0 0000C46A BA[0000] mov dx, msg.segment 0 0000C46D E8[0000] call isstring? 0 0000C470 7478 je .proto_segment 0 0000C472 BA[0000] mov dx, msg.entry 0 0000C475 E8[0000] call isstring? 0 0000C478 7503E98C00 je .proto_entry 0 0000C47D BA[0000] mov dx, msg.bpb 0 0000C480 E8[0000] call isstring? 0 0000C483 7503E99500 je .proto_bpb 0 0000C488 BA[0000] mov dx, msg.minpara 0 0000C48B E8[0000] call isstring? 0 0000C48E 7503E99E00 je .proto_minpara 0 0000C493 BA[0000] mov dx, msg.maxpara 0 0000C496 E8[0000] call isstring? 0 0000C499 7503E9A100 je .proto_maxpara 0 0000C49E BA[0000] mov dx, msg.checkoffset 0 0000C4A1 E8[0000] call isstring? 0 0000C4A4 7503E9A400 je .proto_checkoffset 0 0000C4A9 BA[0000] mov dx, msg.checkvalue 0 0000C4AC E8[0000] call isstring? 0 0000C4AF 7503E9B200 je .proto_checkvalue 344 0 0000C4B4 BB[0000] mov bx, loadoptiontable 346 .proto_lot_next: 0 0000C4B7 8B0F mov cx, [bx] ; flag 0 0000C4B9 8B5702 mov dx, [bx + 2] ; -> ASCIZ message 0 0000C4BC 85C9 test cx, cx 0 0000C4BE 7503E9B100 jz .proto_done 0 0000C4C3 E8[0000] call isstring? 0 0000C4C6 7405 je .proto_lot 0 0000C4C8 83C304 add bx, 4 0 0000C4CB EBEA jmp .proto_lot_next 355 356 .proto_lot: 0 0000C4CD E8[0000] call skipequals 0 0000C4D0 89CA mov dx, cx 0 0000C4D2 F7D2 not dx 0 0000C4D4 2116[6802] and word [load_options], dx 0 0000C4D8 E8[0000] nearcall getexpression 0 0000C4DB E8[0000] nearcall toboolean 0 0000C4DE 85D2 test dx, dx 0 0000C4E0 7404 jz @F 0 0000C4E2 090E[6802] or word [load_options], cx 366 @@: 0 0000C4E6 4E dec si 0 0000C4E7 E97CFF jmp .proto_next 369 370 .proto_segment: 0 0000C4EA E8[0000] call skipequals 0 0000C4ED E8[0000] nearcall getword ; dx = word 0 0000C4F0 83FA50 cmp dx, 50h 0 0000C4F3 7208 jb @F 0 0000C4F5 8916[6A02] mov word [load_loadseg], dx 0 0000C4F9 4E dec si 0 0000C4FA E969FF jmp .proto_next 378 379 @@: 0 0000C4FD BA[0000] mov dx, msg.boot_segment_too_low 0 0000C500 B81002 mov ax, 0210h 0 0000C503 E8[0000] call setrc 0 0000C506 E95F03 jmp .fail 384 385 386 .proto_entry: 0 0000C509 E8[0000] call skipequals 0 0000C50C 31DB xor bx, bx 0 0000C50E E8[0000] nearcall getaddr ; bx:(e)dx = addr 390 _386_PM test edx, 0_FFFF_0000h 391 _386_PM jnz .error 0 0000C511 8916[6C02] mov word [load_entrypoint], dx 0 0000C515 891E[6E02] mov word [load_entrypoint + 2], bx 0 0000C519 4E dec si 0 0000C51A E949FF jmp .proto_next 396 397 .proto_bpb: 0 0000C51D E8[0000] call skipequals 0 0000C520 31DB xor bx, bx 0 0000C522 E8[0000] nearcall getaddr ; bx:(e)dx = addr 401 _386_PM test edx, 0_FFFF_0000h 402 _386_PM jnz .error 0 0000C525 8916[7002] mov word [load_bpb], dx 0 0000C529 891E[7202] mov word [load_bpb + 2], bx 0 0000C52D 4E dec si 0 0000C52E E935FF jmp .proto_next 407 408 .proto_minpara: 0 0000C531 E8[0000] call skipequals 0 0000C534 E8[0000] nearcall getword ; dx = word 0 0000C537 8916[6402] mov word [load_minpara], dx 0 0000C53B 4E dec si 0 0000C53C E927FF jmp .proto_next 414 415 .proto_maxpara: 0 0000C53F E8[0000] call skipequals 0 0000C542 E8[0000] nearcall getword ; dx = word 0 0000C545 8916[6602] mov word [load_maxpara], dx 0 0000C549 4E dec si 0 0000C54A E919FF jmp .proto_next 421 422 .proto_checkoffset: 0 0000C54D E8[0000] call skipequals 0 0000C550 E8[0000] nearcall getword ; dx = word 0 0000C553 89D0 mov ax, dx 0 0000C555 241F and al, 31 0 0000C557 3C1F cmp al, 31 0 0000C559 7503E9E9FE je .error 429 ; Previously we rejected all odd values here. Now, 430 ; we only reject a subset of odd values, namely 431 ; those that may actually cross a sector boundary. 432 ; Note that sectors may be as small as 32 bytes. 433 ; This insures the checked word never crosses a sector 434 ; boundary. Thus, loading a single sector suffices. 0 0000C55E 8916[7402] mov word [load_check_offset], dx 0 0000C562 4E dec si 0 0000C563 E900FF jmp .proto_next 438 439 .proto_checkvalue: 0 0000C566 E8[0000] call skipequals 0 0000C569 E8[0000] nearcall getword ; dx = word 0 0000C56C 8916[7602] mov word [load_check_value], dx 0 0000C570 4E dec si 0 0000C571 E9F2FE jmp .proto_next 445 446 .proto_done: 0 0000C574 BB[0000] mov bx, loadoptiontable.incompatible 448 @@: 0 0000C577 8B0F mov cx, [bx] 0 0000C579 0B4F02 or cx, [bx + 2] 0 0000C57C 746B jz .proto_compatible 0 0000C57E 8B16[6802] mov dx, word [load_options] 0 0000C582 21CA and dx, cx 0 0000C584 39CA cmp dx, cx 0 0000C586 7405 je .proto_incompatible 0 0000C588 83C304 add bx, 4 0 0000C58B EBEA jmp @B 458 459 .proto_incompatible: 0 0000C58D 16 push ss 0 0000C58E 07 pop es 0 0000C58F B80302 mov ax, 0203h 0 0000C592 E8[0000] call setrc 0 0000C595 BA[0000] mov dx, msg.bootfail 0 0000C598 E8[0000] call putsz_error 0 0000C59B BA[0000] mov dx, msg.boot_cannot_set_both 0 0000C59E E8[0000] call putsz_error 0 0000C5A1 8B07 mov ax, word [bx] 0 0000C5A3 E82200 call .proto_incompatible_get_label 0 0000C5A6 E8[0000] call putsz_error 0 0000C5A9 BA[0000] mov dx, msg.boot_and 0 0000C5AC E8[0000] call putsz_error 0 0000C5AF 8B4702 mov ax, word [bx + 2] 0 0000C5B2 E81300 call .proto_incompatible_get_label 0 0000C5B5 E8[0000] call putsz_error 0 0000C5B8 BA[0000] mov dx, msg.boot_dot_crlf 477 .putsz_errret: 0 0000C5BB B80402 mov ax, 0204h 0 0000C5BE E8[0000] call setrc 0 0000C5C1 E8[0000] call putsz_error 0 0000C5C4 FF26[0000] jmp near word [errret] 482 483 .proto_incompatible_get_label: 0 0000C5C8 53 push bx 0 0000C5C9 BB[0000] mov bx, loadoptiontable 486 @@: 0 0000C5CC 8B0F mov cx, [bx] 0 0000C5CE E30E jcxz .proto_internal_error 0 0000C5D0 39C8 cmp ax, cx 0 0000C5D2 8B5702 mov dx, word [bx + 2] 0 0000C5D5 7405 je @F 0 0000C5D7 83C304 add bx, 4 0 0000C5DA EBF0 jmp @B 494 495 @@: 0 0000C5DC 5B pop bx 0 0000C5DD C3 retn 498 499 .proto_internal_error: 0 0000C5DE BA[0000] mov dx, msg.boot_internal_error 0 0000C5E1 B80502 mov ax, 0205h 0 0000C5E4 E8[0000] call setrc 0 0000C5E7 EBD2 jmp .putsz_errret 504 505 506 .proto_compatible: 0 0000C5E9 AC lodsb 0 0000C5EA E88A04 call parseloadunit_default_sdp 0 0000C5ED 7503E98C00 jz .fn_done_eol ; no filename given, use defaults --> 510 ; al was = '/' or '\' or first pathname's first character 511 ; si-> next char 0 0000C5F2 BB[4C05] mov bx, load_kernelname_input 0 0000C5F5 E83900 call .pathname_parse_super 514 0 0000C5F8 56 push si 0 0000C5F9 50 push ax 0 0000C5FA E8[0000] call skipwh0 0 0000C5FD E8[0000] call iseol? 0 0000C600 58 pop ax 0 0000C601 5E pop si 0 0000C602 747C je .fn_done 522 0 0000C604 BB[5005] mov bx, load_addname_input 524 0 0000C607 E8[0000] call skipwh0 0 0000C60A 3C2F cmp al, '/' 0 0000C60C 7404 je @F 0 0000C60E 3C5C cmp al, '\' 0 0000C610 751A jne .proto_not_double_slash 530 @@: 0 0000C612 803C2F cmp byte [si], '/' 0 0000C615 7405 je @F 0 0000C617 803C5C cmp byte [si], '\' 0 0000C61A 7510 jne .proto_not_double_slash 535 @@: 0 0000C61C 4E dec si 0 0000C61D 8937 mov word [bx], si 0 0000C61F C7042F2F mov word [si], "//" 0 0000C623 46 inc si 0 0000C624 46 inc si 0 0000C625 AC lodsb 0 0000C626 C644FF00 mov byte [si - 1], 0 0 0000C62A EB54 jmp .fn_done 544 545 .proto_not_double_slash: 0 0000C62C E80200 call .pathname_parse_super 0 0000C62F EB4F jmp .fn_done 548 549 550 ; INP: bx -> word variable to hold filename 551 ; OUT: word [bx] -> list of /-separated pathnames, zero-terminated 552 ; CHG: ax, cx, si, di, [es:load_kernel_name] 553 .pathname_parse_super: 554 d4 call d4message 555 d4 asciz "In bootcmd.pathname_parse_super",13,10 556 0 0000C631 E8[0000] call skipwh0 0 0000C634 3C2F cmp al, '/' 0 0000C636 7404 je @F 0 0000C638 3C5C cmp al, '\' 0 0000C63A 7506 jne @FF 562 @@: 0 0000C63C 4E dec si 0 0000C63D 8937 mov word [bx], si 0 0000C63F 46 inc si 0 0000C640 EB13 jmp .pathname_check 567 568 @@: 0 0000C642 4E dec si 0 0000C643 8937 mov word [bx], si 571 572 .pathname_parse: 573 .pathname_next: 574 d4 call d4message 575 d4 asciz "In bootcmd.pathname_parse",13,10 0 0000C645 E86507 call boot_parse_fn 0 0000C648 7303 jnc @F 0 0000C64A 7401 je @F ; CY ZR (have slash, si already -> next) 0 0000C64C 46 inc si ; increment si -> past separator 580 @@: 581 ; al = separator char 582 ; si -> next char after that (if any) 0 0000C64D 3C2F cmp al, '/' ; path separator? 0 0000C64F 7404 je .pathname_check 0 0000C651 3C5C cmp al, '\' 0 0000C653 7517 jne .pathname_none ; no, this was the filename --> 587 .pathname_check: 588 d4 call d4message 589 d4 asciz "In bootcmd.pathname_parse_check",13,10 0 0000C655 C644FF2F mov byte [si - 1], '/' ; normalise path separator 0 0000C659 AC lodsb 0 0000C65A 3C20 cmp al, 32 ; space ? 0 0000C65C 740E je .pathname_gotfirst 0 0000C65E 3C09 cmp al, 9 0 0000C660 740A je .pathname_gotfirst ; yes, allow for second name --> 0 0000C662 4E dec si 0 0000C663 E8[0000] call iseol? ; EOL ? 0 0000C666 75DD jne .pathname_next ; no, next pathname element --> 0 0000C668 C60400 mov byte [si], 0 ; terminate after trailing path sep 0 0000C66B C3 retn 601 602 .pathname_gotfirst: 603 .pathname_none: 0 0000C66C B000 mov al, 0 0 0000C66E 4E dec si 0 0000C66F 8604 xchg al, byte [si] ; terminate after filename 0 0000C671 84C0 test al, al 0 0000C673 7407 jz @F 0 0000C675 8936[0000] mov word [terminator_in_line_in.offset], si 0 0000C679 A2[0000] mov byte [terminator_in_line_in.value], al 611 @@: 0 0000C67C 46 inc si 0 0000C67D C3 retn 614 615 616 ; DPR:word [load_kernelname_input] -> ASCIZ pathname. 617 ; if it ends in '/', append DPR:word [load_kernelname_default] 618 ; DPR:word [load_addname_input] -> ASCIZ pathname. 619 ; if it ends in '/', append DPR:word [load_addname_default] 620 ; if it's empty (and no trailing '/' in front of the zero) 621 ; then no additional name is given. 622 .fn_done_eol: 0 0000C67E B00D mov al, 13 624 .fn_done: 625 d4 call d4message 626 d4 asciz "In bootcmd.fn_done",13,10 627 0 0000C680 8326[3205]00 and word [load_cmdline], 0 629 0 0000C685 E8[0000] call skipwh0 0 0000C688 E8[0000] call iseol?.notsemicolon 0 0000C68B 7450 je @F 633 0 0000C68D F606[6902]10 testopt [load_options], LOAD_CMDLINE 0 0000C692 7509 jnz .cmdline 0 0000C694 3C3B cmp al, ';' 0 0000C696 7403E9[0000] jne error 0 0000C69B EB40 jmp @F 639 .cmdline: 640 0 0000C69D B400 mov ah, 0 0 0000C69F 8826[3E05] mov byte [load_cmdline_first], ah 0 0000C6A3 3C22 cmp al, '"' 0 0000C6A5 7404 je .cmdline_quote 0 0000C6A7 3C27 cmp al, "'" 0 0000C6A9 7504 jne .cmdline_no_quote 647 .cmdline_quote: 0 0000C6AB 88C4 mov ah, al 0 0000C6AD EB0B jmp .cmdline_loop_1 650 .cmdline_no_quote: 0 0000C6AF 4E dec si 0 0000C6B0 8936[3205] mov word [load_cmdline], si 0 0000C6B4 46 inc si 0 0000C6B5 A2[3E05] mov byte [load_cmdline_first], al 0 0000C6B8 EB05 jmp .cmdline_loop_2 656 657 .cmdline_loop_1: 0 0000C6BA 8936[3205] mov word [load_cmdline], si 659 .cmdline_loop: 0 0000C6BE AC lodsb 661 .cmdline_loop_2: 0 0000C6BF E8[0000] call iseol?.notsemicolon 0 0000C6C2 740E je .cmdline_eol 0 0000C6C4 38E0 cmp al, ah 0 0000C6C6 75F6 jne .cmdline_loop 666 .cmdline_quote_eol: 0 0000C6C8 C644FF00 mov byte [si - 1], 0 0 0000C6CC AC lodsb 0 0000C6CD E8[0000] call chkeol 0 0000C6D0 EB0B jmp @F 671 672 .cmdline_eol: 0 0000C6D2 84E4 test ah, ah 0 0000C6D4 7403E9[0000] jnz error 0 0000C6D9 C644FF00 mov byte [si - 1], 0 676 677 @@: 0 0000C6DD F606[0000]07 testopt [internalflags3], dif3_load_is_dp 0 0000C6E2 7527 jnz .load_kernel_from_ldp 680 0 0000C6E4 8A1E[3805] mov bl, [load_partition] 0 0000C6E8 803E[4002]80 cmp byte [load_unit], 80h 0 0000C6ED 7228 jb .p_f_is_diskette 0 0000C6EF 84DB test bl, bl ; partition specified ? 0 0000C6F1 7503E951FD jz .error ; no, error --> 686 0 0000C6F6 E8DF15 call query_geometry 688 0 0000C6F9 B9[3E0B] mov cx, load_freedos_from_partition 0 0000C6FC E83114 call scan_partitions 0 0000C6FF BA[0000] mov dx, msg.boot_partition_not_found 0 0000C702 B81102 mov ax, 0211h 0 0000C705 E8[0000] call setrc 0 0000C708 E95D01 jmp .fail 695 696 697 .load_kernel_from_ldp: 0 0000C70B E8CA15 call query_geometry 0 0000C70E A1[2805] mov ax, word [load_partition_sector] 0 0000C711 8B16[2A05] mov dx, word [load_partition_sector + 2] 0 0000C715 EB0E jmp @F 702 703 704 .p_f_is_diskette: 0 0000C717 84DB test bl, bl ; partition specified ? 0 0000C719 7403E929FD jnz .error ; yes, error --> 707 0 0000C71E E8B715 call query_geometry 709 0 0000C721 31C0 xor ax, ax 0 0000C723 31D2 xor dx, dx 712 @@: 0 0000C725 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000C729 52 push dx 0 0000C72A 50 push ax 0 0000C72B E87617 call read_ae_512_bytes 717 0 0000C72E 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000C735 7403E92C1C jne boot_sigmismatch 0 0000C73A 58 pop ax 0 0000C73B 5A pop dx 722 723 %if _LOADER 724 mov bx, 60h 725 cmp byte [currentposition], 0 726 ja .notbottom 727 mov bx, ds 728 add bx, word [liiAmountParagraphs] 729 .notbottom: 730 mov [loader_lowest_free], bx 731 %endif 732 0 0000C73C 06 push es 0 0000C73D F606[6902]40 testopt [load_options], LOAD_SET_DSSI_PARTINFO 0 0000C742 7438 jz @F 736 0 0000C744 50 push ax 738 %if _LOADER 739 mov es, bx 740 xor di, di 741 cmp bx, 60h 742 ja .loader 743 %endif 0 0000C745 31FF xor di, di 0 0000C747 8EC7 mov es, di 0 0000C749 BF0006 mov di, 600h 747 .loader: 0 0000C74C B8CD19 mov ax, 19CDh 0 0000C74F AB stosw ; fake boot sector loader 0 0000C750 B9FE00 mov cx, 508 / 2 0 0000C753 31C0 xor ax, ax 0 0000C755 F3AB rep stosw ; initialise pseudo MBR 0 0000C757 B855AA mov ax, 0AA55h 0 0000C75A AB stosw ; fake boot sector signature 0 0000C75B 58 pop ax 756 0 0000C75C 8D75BE lea si, [di - 2 - 64] ; -> first partition table entry 758 0 0000C75F 26894408 mov word [es:si + 8], ax 0 0000C763 2689540A mov word [es:si + 8 + 2], dx ; store in partition table entry 0 0000C767 26C60480 mov byte [es:si + piBoot], 80h ; fake primary active 0 0000C76B 26C64404FF mov byte [es:si + piType], 0FFh ; fake a type 0 0000C770 26FE440C inc byte [es:si + piLength] ; fake a size 764 0 0000C774 8C06[3605] mov word [load_partition_entry + 2], es 0 0000C778 8936[3405] mov word [load_partition_entry], si 767 @@: 0 0000C77C 07 pop es 769 0 0000C77D E9AB07 jmp load_freedos_common 771 772 773 .load: 0 0000C780 7403E9C2FC jnz bootcmd.error 775 0 0000C785 F606[0000]07 testopt [internalflags3], dif3_load_is_dp 0 0000C78A 751C jnz .load_sector_from_ldp 778 0 0000C78C 803E[3805]00 cmp byte [load_partition], 0 0 0000C791 7421 je .load_boot 781 0 0000C793 E84215 call query_geometry 783 784 %if _LOADER 785 cmp byte [currentposition], 0 786 je ..@loader_bottom_not_allowed 787 %endif 788 789 d4 call d4message 790 d4 asciz "In bootcmd.load (before call to scan_partitions)",13,10 791 0 0000C796 B9[CB0A] mov cx, load_from_partition 0 0000C799 E89413 call scan_partitions 0 0000C79C BA[0000] mov dx, msg.boot_partition_not_found 0 0000C79F B81202 mov ax, 0212h 0 0000C7A2 E8[0000] call setrc 0 0000C7A5 E9C000 jmp .fail 798 799 %if _LOADER 800 ..@loader_bottom_not_allowed: 801 mov dx, msg.loader_bottom_not_allowed 802 mov ax, 0288h 803 jmp @F 804 805 ..@loader_too_low_load: 806 mov dx, msg.loader_too_low_load 807 mov ax, 0289h 808 @@: 809 call setrc 810 call putsz_error 811 jmp cmd3 812 %endif 813 814 815 .load_sector_from_ldp: 0 0000C7A8 E82D15 call query_geometry 0 0000C7AB A1[2805] mov ax, word [load_partition_sector] 0 0000C7AE 8B16[2A05] mov dx, word [load_partition_sector + 2] 0 0000C7B2 EB07 jmp @F 820 821 .load_boot: 0 0000C7B4 E82115 call query_geometry 823 0 0000C7B7 31C0 xor ax, ax 0 0000C7B9 31D2 xor dx, dx 826 @@: 827 828 %if _LOADER 829 cmp byte [currentposition], 0 830 je ..@loader_bottom_not_allowed 831 %endif 832 0 0000C7BB BBC007 mov bx, 7C0h 834 d4 call d4dumpregs 835 d4 call d4message 836 d4 asciz 13,10,"In bootcmd.load_boot (before call to read_sector)",13,10 0 0000C7BE 52 push dx 0 0000C7BF 50 push ax 0 0000C7C0 E8E116 call read_ae_512_bytes 840 d4 call d4message 841 d4 asciz "In bootcmd.load_boot (after call to read_sector)",13,10 0 0000C7C3 31D2 xor dx, dx 0 0000C7C5 8EC2 mov es, dx 844 0 0000C7C7 A0[4002] mov al, byte [load_unit] ; al = boot unit 0 0000C7CA BB007C mov bx, 7C00h 847 0 0000C7CD 26813EFE7D55AA cmp word [es:7C00h + 510], 0AA55h 0 0000C7D4 7403E98D1B jne boot_sigmismatch 850 0 0000C7D9 26833F00 cmp word [es:bx], 0 0 0000C7DD 7503E9901B je boot_codemismatch 853 0 0000C7E2 50 push ax 0 0000C7E3 B9FF00 mov cx, 510 / 2 0 0000C7E6 BF0006 mov di, 600h ; MBR location 0 0000C7E9 31C0 xor ax, ax 0 0000C7EB F3AB rep stosw ; initialise (sector and all entries) 0 0000C7ED B855AA mov ax, 0AA55h 0 0000C7F0 AB stosw ; initialise boot sector signature 0 0000C7F1 26C7060006CD19 mov word [es:600h], 019CDh ; initialise boot sector code 0 0000C7F8 BFBE07 mov di, 600h + 510 - 4*16 ; -> first partition table entry 0 0000C7FB 58 pop ax 0 0000C7FC 268F4508 pop word [es:di + piStart] 0 0000C800 268F450A pop word [es:di + piStart + 2] ; = boot sector LBA 0 0000C804 26C60580 mov byte [es:di + 0], 80h ; "bootable" flag set 0 0000C808 26C64504FF mov byte [es:di + 4], 0FFh ; dummy value for FS type (nonzero) 0 0000C80D 26C6450C01 mov byte [es:di + 12], 1 ; dummy value for length (nonzero) 869 870 load_partition_common: equ $ 0 0000C812 8126[0000]FFF8 and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 0 0000C818 893E[0000] mov word [reg_esi], di 0 0000C81C 893E[0000] mov word [reg_ebp], di 0 0000C820 890E[0000] mov word [reg_ds], cx ; ds:si -> 0:600h + offset to first entry 0 0000C824 A2[0000] mov byte [reg_edx], al ; dl = boot unit 0 0000C827 891E[0000] mov word [reg_eip], bx 0 0000C82B 890E[0200] mov word [reg_eip + 2], cx 0 0000C82F 890E[0000] mov word [reg_cs], cx ; cs:eip = 0:7C00h 0 0000C833 803E[3C05]00 cmp byte [load_sector_alt], 0 0 0000C838 740A je @F 0 0000C83A 890E[0000] mov word [reg_eip], cx 0 0000C83E C706[0000]C007 mov word [reg_cs], 7C0h ; cs:eip = 07C0h:0 883 @@: 0 0000C844 891E[0000] mov word [reg_esp], bx 0 0000C848 890E[0200] mov word [reg_esp + 2], cx 0 0000C84C 890E[0000] mov word [reg_ss], cx ; ss:esp = 0:7C00h 0 0000C850 800E[0300]01 setopt [internalflags2], dif2_boot_loaded_kernel 0 0000C855 C3 retn 889 890 891 .fail_read: 0 0000C856 16 push ss 0 0000C857 07 pop es 0 0000C858 BF[0000] mov di, msg.bootfail_read_errorcode 0 0000C85B 88E0 mov al, ah 0 0000C85D B404 mov ah, 04h 0 0000C85F E8[0000] call setrc 0 0000C862 E8[0000] call hexbyte 0 0000C865 BA[0000] mov dx, msg.bootfail_read 900 901 .fail: 0 0000C868 16 push ss 0 0000C869 07 pop es 0 0000C86A 52 push dx 0 0000C86B BA[0000] mov dx, msg.bootfail 0 0000C86E E8[0000] call putsz_error 0 0000C871 5A pop dx 0 0000C872 E8[0000] call putsz_error 0 0000C875 B8FF02 mov ax, 02FFh 0 0000C878 E8[0000] call setrc 0 0000C87B FF26[0000] jmp near word [errret] 912 913 914 bootcmd.list: 0 0000C87F E8[0000] call skipcomma 916 0 0000C882 E8F201 call parseloadunit_default_sdp 0 0000C885 7403E9BDFB jnz bootcmd.error 919 0 0000C88A E84B14 call query_geometry 921 0 0000C88D F606[0000]07 testopt [internalflags3], dif3_load_is_dp 0 0000C892 752B jnz .list_ldp 924 0 0000C894 803E[3805]00 cmp byte [load_partition], 0 0 0000C899 741E je .listall 927 0 0000C89B C606[3A05]00 mov byte [load_found_partition], 0 0 0000C8A0 B9[8405] mov cx, list_single_partition 0 0000C8A3 E88A12 call scan_partitions 0 0000C8A6 803E[3A05]00 cmp byte [load_found_partition], 0 0 0000C8AB 750B jne @F 0 0000C8AD BA[0000] mov dx, msg.boot_partition_not_found 0 0000C8B0 B81302 mov ax, 0213h 0 0000C8B3 E8[0000] call setrc 0 0000C8B6 EBB0 jmp bootcmd.fail 937 @@: 0 0000C8B8 C3 retn 939 940 .listall: 0 0000C8B9 B9[9205] mov cx, list_any_partition 0 0000C8BC E97112 jmp scan_partitions 943 944 .list_ldp: 0 0000C8BF C606[3A05]00 mov byte [load_found_partition], 0 0 0000C8C4 B9[6905] mov cx, list_partition_if_ldp 0 0000C8C7 E86612 call scan_partitions 0 0000C8CA 803E[3A05]00 cmp byte [load_found_partition], 0 0 0000C8CF 750B jne @F 0 0000C8D1 BA[0000] mov dx, msg.boot_partition_not_found 0 0000C8D4 B81402 mov ax, 0214h 0 0000C8D7 E8[0000] call setrc 0 0000C8DA EB8C jmp bootcmd.fail 954 @@: 0 0000C8DC C3 retn 956 957 958 list_partition_if_ldp: 959 d4 call d4message 960 d4 asciz "In list_partition_if_ldp",13,10 961 0 0000C8DD 8B43F8 mov ax, word [bp + di - 8] 0 0000C8E0 8B53FA mov dx, word [bp + di - 6] ; root 0 0000C8E3 26034408 add ax, word [es:si + 8] 0 0000C8E7 2613540A adc dx, word [es:si + 8 + 2] ; add partition offset 0 0000C8EB 3906[2805] cmp word [load_partition_sector], ax 0 0000C8EF 7506 jne @F 0 0000C8F1 3916[2A05] cmp word [load_partition_sector + 2], dx 0 0000C8F5 740B je list_single_partition.gotit 970 @@: 0 0000C8F7 C3 retn 972 973 list_single_partition: 974 d4 call d4message 975 d4 asciz "In list_single_partition",13,10 976 0 0000C8F8 A0[3905] mov al, byte [load_current_partition] 0 0000C8FB 3A06[3805] cmp al, byte [load_partition] 0 0000C8FF 7401 je .gotit 0 0000C901 C3 retn 981 982 .gotit: 0 0000C902 FE06[3A05] inc byte [load_found_partition] 984 985 ; INP: es:si -> partition table entry, 986 ; si = load_partition_table .. load_partition_table+48, 987 ; es = ss 988 ; bp + di -> above part table metadata, 989 ; dwo [bp + di - 4] = root (outermost extended position) 990 ; dwo [bp + di - 8] = base (current table position) 991 ; CHG: ax, bx, (cx), dx 992 list_any_partition: 0 0000C906 06 push es 0 0000C907 51 push cx 0 0000C908 56 push si 0 0000C909 57 push di 997 0 0000C90A BF[0000] mov di, line_out ; reset di 0 0000C90D B075 mov al, "u" 0 0000C90F AA stosb 0 0000C910 A0[4002] mov al, byte [load_unit] 0 0000C913 E8[0000] call hexbyte 0 0000C916 84C0 test al, al 0 0000C918 B02E mov al, '.' 0 0000C91A AA stosb 0 0000C91B 7806 js @F 0 0000C91D B020 mov al, 32 0 0000C91F AA stosb 0 0000C920 AA stosb 0 0000C921 EB0D jmp @FF 1011 1012 @@: 0 0000C923 A0[3905] mov al, byte [load_current_partition] 0 0000C926 E8[0000] call decbyte 0 0000C929 3C0A cmp al, 10 0 0000C92B B020 mov al, 32 0 0000C92D 7301 jae @F 0 0000C92F AA stosb 1019 @@: 0 0000C930 AA stosb 1021 0 0000C931 A0[4002] mov al, byte [load_unit] 0 0000C934 50 push ax 0 0000C935 BB6664 mov bx, "fd" 0 0000C938 3C80 cmp al, 80h 0 0000C93A 7202 jb @F 0 0000C93C B368 mov bl, "h" 1028 @@: 0 0000C93E 247F and al, ~80h 0 0000C940 0461 add al, 'a' 0 0000C942 3C7A cmp al, 'z' 0 0000C944 760A jbe @F 0 0000C946 58 pop ax 0 0000C947 B020 mov al, 32 0 0000C949 B90500 mov cx, 3 + 2 0 0000C94C F3AA rep stosb 0 0000C94E EB1C jmp .beyondZ 1038 1039 @@: 0 0000C950 93 xchg ax, bx 0 0000C951 AB stosw 0 0000C952 93 xchg ax, bx 0 0000C953 AA stosb 0 0000C954 58 pop ax 0 0000C955 84C0 test al, al 0 0000C957 7806 js @F 0 0000C959 B020 mov al, 32 0 0000C95B AA stosb 0 0000C95C AA stosb 0 0000C95D EB0D jmp @FF 1051 1052 @@: 0 0000C95F A0[3905] mov al, byte [load_current_partition] 0 0000C962 E8[0000] call decbyte 0 0000C965 3C0A cmp al, 10 0 0000C967 B020 mov al, 32 0 0000C969 7301 jae @F 0 0000C96B AA stosb 1059 @@: 1060 .beyondZ: 0 0000C96C AA stosb 1062 0 0000C96D 8A4404 mov al, byte [si + 4] 0 0000C970 E8[0000] call hexbyte 1065 0 0000C973 B020 mov al, 32 0 0000C975 AA stosb 1068 0 0000C976 89F9 mov cx, di ; (preserve di in line_out) 0 0000C978 5F pop di ; get di of scan_partitions 0 0000C979 57 push di 0 0000C97A 8B43F8 mov ax, word [bp + di - 8] 0 0000C97D 8B53FA mov dx, word [bp + di - 6] ; root 0 0000C980 89CF mov di, cx ; (preserve di in line_out) 0 0000C982 034408 add ax, word [si + 8] 0 0000C985 13540A adc dx, word [si + 8 + 2] ; add partition offset 0 0000C988 92 xchg ax, dx 0 0000C989 E8[0000] call hexword 0 0000C98C 92 xchg ax, dx 0 0000C98D E8[0000] call hexword 1081 0 0000C990 50 push ax 0 0000C991 B82028 mov ax, " (" 0 0000C994 AB stosw 0 0000C995 58 pop ax 0 0000C996 51 push cx 0 0000C997 53 push bx 0 0000C998 8B0E[0B02] mov cx, [load_sectorsize] 0 0000C99C BB0800 mov bx, 4+4 0 0000C99F E8[0000] call disp_dxax_times_cx_width_bx_size.store 0 0000C9A2 50 push ax 0 0000C9A3 B82920 mov ax, ") " 0 0000C9A6 AB stosw 0 0000C9A7 58 pop ax 1095 0 0000C9A8 52 push dx 0 0000C9A9 50 push ax 1098 0 0000C9AA 8B440C mov ax, word [si + 12] 0 0000C9AD 8B540E mov dx, word [si + 12 + 2] 0 0000C9B0 92 xchg ax, dx 0 0000C9B1 E8[0000] call hexword 0 0000C9B4 92 xchg ax, dx 0 0000C9B5 E8[0000] call hexword 1105 0 0000C9B8 50 push ax 0 0000C9B9 B82028 mov ax, " (" 0 0000C9BC AB stosw 0 0000C9BD 58 pop ax 0 0000C9BE E8[0000] call disp_dxax_times_cx_width_bx_size.store 0 0000C9C1 B029 mov al, ")" 0 0000C9C3 AA stosb 1113 0 0000C9C4 58 pop ax 0 0000C9C5 5A pop dx 1116 0 0000C9C6 5B pop bx 0 0000C9C7 59 pop cx 1119 0 0000C9C8 807C0483 cmp byte [si + piType], ptLinux 0 0000C9CC 753D jne .notlinux 1122 0 0000C9CE 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000C9D2 E8BE14 call read_ae_1536_bytes 1125 0 0000C9D5 26813E380453EF cmp word [es:1024 + 56], 0xEF53 ; s_magic == EXT2_SUPER_MAGIC ? 0 0000C9DC 7510 jne .nolabel_j 1128 0 0000C9DE 26833E4E0400 cmp word [es:1024 + 76 + 2], 0 0 0000C9E4 7508 jne .nolabel_j 0 0000C9E6 26833E4C0401 cmp word [es:1024 + 76], 1 ; s_rev_level == EXT2_DYNAMIC_REV ? 0 0000C9EC 7402 je @F 1133 .nolabel_j: 0 0000C9EE EB7D jmp .nolabel 1135 @@: 1136 0 0000C9F0 06 push es 0 0000C9F1 1F pop ds 0 0000C9F2 BE7804 mov si, 1024 + 120 0 0000C9F5 B91000 mov cx, 16 0 0000C9F8 16 push ss 0 0000C9F9 07 pop es 1143 0 0000C9FA B020 mov al, 32 0 0000C9FC AA stosb 1146 @@: 0 0000C9FD AC lodsb 0 0000C9FE 84C0 test al, al 0 0000CA00 7403 jz @F 0 0000CA02 AA stosb 0 0000CA03 E2F8 loop @B 1152 @@: 1153 0 0000CA05 16 push ss 0 0000CA06 1F pop ds 1156 0 0000CA07 59 pop cx 0 0000CA08 5E pop si 0 0000CA09 56 push si ; get si of scan_partitions 0 0000CA0A 51 push cx 1161 1162 .notlinux: 0 0000CA0B 8A5C04 mov bl, byte [si + piType] 0 0000CA0E 80FB01 cmp bl, ptFAT12 0 0000CA11 7419 je .isfat 0 0000CA13 80FB04 cmp bl, ptFAT16_16BIT_CHS 0 0000CA16 7414 je .isfat 0 0000CA18 80FB06 cmp bl, ptFAT16_CHS 0 0000CA1B 740F je .isfat 0 0000CA1D 80FB0B cmp bl, ptFAT32_CHS 0 0000CA20 740A je .isfat 0 0000CA22 80FB0C cmp bl, ptFAT32 0 0000CA25 7405 je .isfat 0 0000CA27 80FB0E cmp bl, ptFAT16 0 0000CA2A 7541 jne .notfat 1176 .isfat: 1177 0 0000CA2C 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000CA30 E87114 call read_ae_512_bytes 1180 0 0000CA33 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000CA3A 7531 jne .nolabel 0 0000CA3C 26833E0B0000 cmp word [es:bsBPB + bpbBytesPerSector], 0 0 0000CA42 7429 je .nolabel 0 0000CA44 BE2B00 mov si, bsBPB + bpbNew + bpbnVolumeLabel 0 0000CA47 26833E160000 cmp word [es:bsBPB + bpbSectorsPerFAT], 0 0 0000CA4D 7503 jne @F 0 0000CA4F BE4700 mov si, bsBPB + ebpbNew + bpbnVolumeLabel 1189 @@: 0 0000CA52 26807CFB29 cmp byte [es:si - bpbnVolumeLabel + bpbnExtBPBSignature], 29h 0 0000CA57 7514 jne .nolabel 0 0000CA59 B90B00 mov cx, 11 1193 0 0000CA5C 06 push es 0 0000CA5D 1F pop ds 0 0000CA5E 16 push ss 0 0000CA5F 07 pop es 1198 0 0000CA60 B020 mov al, 32 0 0000CA62 AA stosb 1201 @@: 0 0000CA63 AC lodsb 0 0000CA64 84C0 test al, al 0 0000CA66 7403 jz @F 0 0000CA68 AA stosb 0 0000CA69 E2F8 loop @B 1207 @@: 1208 0 0000CA6B 16 push ss 0 0000CA6C 1F pop ds 1211 .notfat: 1212 .nolabel: 0 0000CA6D 16 push ss 0 0000CA6E 07 pop es 0 0000CA6F E8[0000] call putsline_crlf 1216 0 0000CA72 5F pop di 0 0000CA73 5E pop si 0 0000CA74 59 pop cx 0 0000CA75 07 pop es 0 0000CA76 C3 retn 1222 1223 1224 ; INP: al = first character 1225 ; si -> next 1226 ; OUT: NC 1227 ; byte [load_unit] set 1228 ; byte [load_partition] set 1229 ; (zero if none specified, -1 if ldp or sdp) 1230 ; opt [internalflags3] & dif3_load_is_ldp 1231 ; opt [internalflags3] & dif3_load_is_sdp 1232 ; dword [load_partition_sector] set if ldp or sdp 1233 ; ZR if no filename specified (at end of input) 1234 ; NZ if presumably a filename specified, 1235 ; al = first character (slash or whatever non-blank) 1236 ; si -> next 1237 ; CHG: bx, cx, dx, ax, si, di 1238 ; STT: ds = es = ss 1239 parseloadunit_default_sdp: 0 0000CA77 F8 clc 1241 .cf: 0 0000CA78 E82C00 call parseloadunit 0 0000CA7B 7329 jnc @F 1244 0 0000CA7D 8A16[3D05] mov dl, byte [load_sdp_unit] 0 0000CA81 8816[4002] mov byte [load_unit], dl 0 0000CA85 FF36[2E05] push word [load_sdp_sector + 2] 0 0000CA89 FF36[2C05] push word [load_sdp_sector] 0 0000CA8D 8F06[2805] pop word [load_partition_sector] 0 0000CA91 8F06[2A05] pop word [load_partition_sector + 2] 0 0000CA95 C606[3805]FF mov byte [load_partition], -1 0 0000CA9A 800E[0000]02 or byte [internalflags3], dif3_load_is_sdp 1253 0 0000CA9F E8[0000] call skipwh0 0 0000CAA2 E8[0000] call iseol? 0 0000CAA5 F8 clc 1257 @@: 0 0000CAA6 C3 retn 1259 1260 1261 ; INP: al = first character 1262 ; si -> next 1263 ; CY if not to set sdp 1264 ; OUT: CY if no load unit 1265 ; (not "HD[A-Z]", "FD[A-Z]", "LD[P]", "SD[P]", "U[0-9A-F]") 1266 ; note: this is barely used! 1267 ; NC else, 1268 ; byte [load_unit] set 1269 ; byte [load_partition] set 1270 ; (zero if none specified, -1 if ldp or sdp) 1271 ; opt [internalflags3] & dif3_load_is_ldp 1272 ; opt [internalflags3] & dif3_load_is_sdp 1273 ; dword [load_partition_sector] set if ldp or sdp 1274 ; ZR if no filename specified (at end of input) 1275 ; NZ if presumably a filename specified, 1276 ; al = first character (slash or whatever non-blank) 1277 ; si -> next 1278 ; CHG: bx, cx, dx, ax, si, di 1279 ; STT: ds = es = ss 1280 parseloadunit: 1281 lframe near 1282 lvar word, unit_low_partition_high 1283 lequ ?unit_low_partition_high, unit 1284 lequ ?unit_low_partition_high + 1, partition 0 0000CAA7 5589E550 lenter 1286 lvar word, bit0_no_set_sdp 0 0000CAAB 9C pushf 0 0000CAAC 31DB xor bx, bx 1289 lvar word, dif3_set 0 0000CAAE 53 push bx 1291 lvar dword, load_partition_sector 0 0000CAAF FF36[2E05] push word [load_sdp_sector + 2] 0 0000CAB3 FF36[2C05] push word [load_sdp_sector] 1294 0 0000CAB7 89F7 mov di, si 0 0000CAB9 8026[0000]F8 clropt [internalflags3], dif3_load_is_dp 0 0000CABE E8[0000] call capitalise 0 0000CAC1 3C48 cmp al, 'H' 0 0000CAC3 7503E9EF00 je .load_hd 0 0000CAC8 3C46 cmp al, 'F' 0 0000CACA 7503E9E500 je .load_fd 0 0000CACF B401 mov ah, dif3_load_is_ldp 0 0000CAD1 3C4C cmp al, 'L' 0 0000CAD3 7419 je .load_ld_sd 0 0000CAD5 B402 mov ah, dif3_load_is_sdp 0 0000CAD7 3C53 cmp al, 'S' 0 0000CAD9 7413 je .load_ld_sd 1308 %if _INPUT_FILE_BOOT 0 0000CADB B404 mov ah, dif3_load_is_ydp 0 0000CADD 3C59 cmp al, 'Y' 0 0000CADF 740D je .load_ld_sd 1312 %endif 0 0000CAE1 3C55 cmp al, 'U' 0 0000CAE3 747C je .load_u 1315 .retc: 0 0000CAE5 89FE mov si, di 0 0000CAE7 4E dec si 0 0000CAE8 AC lodsb 0 0000CAE9 F9 stc 1320 .ret: 0 0000CAEA 89EC5D lleave code 0 0000CAED C3 lret 1323 1324 .load_ld_sd: 0 0000CAEE AC lodsb 0 0000CAEF E8[0000] call capitalise 0 0000CAF2 3C44 cmp al, 'D' 0 0000CAF4 75EF jne .retc 1329 1330 d4 call d4message 1331 d4 asciz "In parseloadunit.load_ld_sd",13,10 1332 0 0000CAF6 8A16[3D05] mov dl, byte [load_sdp_unit] 0 0000CAFA 80FC02 cmp ah, dif3_load_is_sdp 0 0000CAFD 741D je @F 0 0000CAFF 8A16[A001] mov dl, byte [loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit] 1338 %if _INPUT_FILE_BOOT 0 0000CB03 80FC01 cmp ah, dif3_load_is_ldp 0 0000CB06 7414 je @F 0 0000CB08 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 0000CB0D 74D6 jz .retc 1343 0 0000CB0F 93 xchg ax, bx 0 0000CB10 B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 0000CB13 F726[2005] mul word [load_input_file.active] 1347 1348 ; test dx, dx 1349 ; jnz .error 1350 0 0000CB17 93 xchg ax, bx 0 0000CB18 8A97[2003] mov dl, byte [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 1354 %endif 1355 @@: 0 0000CB1C AC lodsb 0 0000CB1D E8[0000] call capitalise 0 0000CB20 3C50 cmp al, 'P' 0 0000CB22 7403E9AD00 jne .got_unit 1360 1361 d4 call d4message 1362 d4 asciz "In parseloadunit.load_ld_sd with ldp",13,10 1363 0 0000CB27 8856FE mov byte [bp + ?unit], dl 0 0000CB2A C646FFFF mov byte [bp + ?partition], -1 0 0000CB2E 0866FA or byte [bp + ?dif3_set], ah 1367 0 0000CB31 80FC02 cmp ah, dif3_load_is_sdp 0 0000CB34 741D je @F 1370 %if _INPUT_FILE_BOOT 0 0000CB36 80FC01 cmp ah, dif3_load_is_ldp 0 0000CB39 740A je .is_ldp 0 0000CB3B FFB7[FE02] push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors + 2] 0 0000CB3F FFB7[FC02] push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 0 0000CB43 EB08 jmp .is_ldp_ydp 1378 1379 %endif 1380 .is_ldp: 0 0000CB45 FF36[7E01] push word [load_ldp_sector + 2] 0 0000CB49 FF36[7C01] push word [load_ldp_sector] 1383 .is_ldp_ydp: 0 0000CB4D 8F46F6 pop word [bp + ?load_partition_sector] 0 0000CB50 8F46F8 pop word [bp + ?load_partition_sector + 2] 1386 @@: 1387 0 0000CB53 E8[0000] call skipwhite 0 0000CB56 E8[0000] call iseol? 0 0000CB59 7403E90301 jne .fn 0 0000CB5E E9FC00 jmp .ret_nc 1392 1393 .load_u: 0 0000CB61 AC lodsb 0 0000CB62 E8[0000] call capitalise 1396 0 0000CB65 3C28 cmp al, '(' 0 0000CB67 7419 je @F 0 0000CB69 3C30 cmp al, '0' 0 0000CB6B 7303E975FF jb .retc 0 0000CB70 3C39 cmp al, '9' 0 0000CB72 760E jbe @F 0 0000CB74 3C41 cmp al, 'A' 0 0000CB76 7303E96AFF jb .retc 0 0000CB7B 3C46 cmp al, 'F' 0 0000CB7D 7603E963FF ja .retc 1407 @@: 1408 0 0000CB82 3C28 cmp al, '(' 0 0000CB84 7511 jne .u_not_expr 0 0000CB86 AC lodsb 0 0000CB87 E8[0000] nearcall getexpression 0 0000CB8A E8[0000] call skipwh0 0 0000CB8D 3C29 cmp al, ')' 0 0000CB8F AC lodsb 0 0000CB90 7403E9B1F8 jne bootcmd.errordec 0 0000CB95 EB03 jmp .u_check_dot 1418 1419 .u_not_expr: 0 0000CB97 E8E910 call boot_get_hexadecimal_literal 1421 .u_check_dot: 0 0000CB9A 3C2E cmp al, '.' 0 0000CB9C 7403E9A6F8 jne bootcmd.error 0 0000CBA1 AC lodsb 0 0000CBA2 85DB test bx, bx 0 0000CBA4 7403E99EF8 jnz bootcmd.error 0 0000CBA9 81FA0001 cmp dx, 256 0 0000CBAD 7203E995F8 jae bootcmd.error 0 0000CBB2 EB20 jmp .got_unit 1430 1431 .load_fd: 0 0000CBB4 B200 mov dl, 0 1433 1434 d4 call d4message 1435 d4 asciz "In parseloadunit.load_fd",13,10 1436 0 0000CBB6 A9 db __TEST_IMM16 ; skip mov 1438 .load_hd: 0 0000CBB7 B280 mov dl, 80h 1440 d4 call d4message 1441 d4 asciz "In parseloadunit.load_fd or .load_hd",13,10 1442 0 0000CBB9 AC lodsb 0 0000CBBA E8[0000] call capitalise 0 0000CBBD 3C44 cmp al, 'D' 0 0000CBBF 7403E921FF jne .retc 0 0000CBC4 AC lodsb 0 0000CBC5 E8[0000] call capitalise 0 0000CBC8 2C41 sub al, 'A' 0 0000CBCA 3C19 cmp al, 'Z' - 'A' 0 0000CBCC 7603E914FF ja .retc 0 0000CBD1 08C2 or dl, al ; hdX: 80h + number, fdX: 0 + number 0 0000CBD3 AC lodsb 1454 1455 .got_unit: 0 0000CBD4 89D1 mov cx, dx 0 0000CBD6 884EFE mov byte [bp + ?unit], cl 0 0000CBD9 C646FF00 mov byte [bp + ?partition], 0 0 0000CBDD 3C2F cmp al, '/' ; slash ? 0 0000CBDF 7414 je .fn_j 0 0000CBE1 3C5C cmp al, '\' 0 0000CBE3 7410 je .fn_j ; got a filename --> 0 0000CBE5 3C20 cmp al, 32 ; or blank ? 0 0000CBE7 7404 je @F 0 0000CBE9 3C09 cmp al, 9 0 0000CBEB 750A jne .checkeol ; check for EOL -- but no filename 1467 ; (hdd1name is invalid -- must be hdd1/name or hdd1 name) 1468 @@: ; was blank 0 0000CBED E8[0000] call skipwh0 ; skip blanks 0 0000CBF0 E8[0000] call iseol? ; EOL ? 0 0000CBF3 7402 je .checkeol 1472 .fn_j: 0 0000CBF5 EB6A jmp .fn ; no, is filename --> 1474 ; will jump after this 1475 .checkeol: 0 0000CBF7 E8[0000] call iseol? ; EOL ? 0 0000CBFA 7461 je .ret_nc ; yes, no filename --> 1478 0 0000CBFC 3C28 cmp al, '(' 0 0000CBFE 740E je @F 0 0000CC00 3C30 cmp al, '0' 0 0000CC02 7303E9DEFE jb .retc 0 0000CC07 3C39 cmp al, '9' 0 0000CC09 7603E9D7FE ja .retc 1485 @@: 1486 1487 d4 call d4message 1488 d4 asciz "In parseloadunit (after no EOL found)",13,10 0 0000CC0E 51 push cx 0 0000CC0F 3C28 cmp al, '(' 0 0000CC11 7519 jne .not_expr 0 0000CC13 AC lodsb ; skip opening paren 1493 1494 d4 call d4message 1495 d4 asciz "In parseloadunit (before call to getexpression)",13,10 1496 0 0000CC14 E8[0000] nearcall getexpression 1498 1499 d4 call d4message 1500 d4 asciz "In parseloadunit (after call to getexpression)",13,10 0 0000CC17 E8[0000] call skipwh0 0 0000CC1A 3C29 cmp al, ')' 0 0000CC1C AC lodsb 0 0000CC1D 7509 jne .errordec 0 0000CC1F 89D1 mov cx, dx 0 0000CC21 09D9 or cx, bx 0 0000CC23 750A jnz .got_expr 0 0000CC25 5A pop dx 0 0000CC26 EBAC jmp .got_unit 1510 1511 .errordec: 0 0000CC28 4E dec si 1513 .error: 0 0000CC29 E91BF8 jmp bootcmd.error 1515 1516 .not_expr: 1517 d4 call d4message 1518 d4 asciz "In parseloadunit (before call to boot_get_decimal_literal)",13,10 0 0000CC2C E84C10 call boot_get_decimal_literal 1520 .got_expr: ; bx:dx = load partition number 1521 d4 call d4message 1522 d4 asciz "In parseloadunit.got_expr",13,10 0 0000CC2F 59 pop cx ; cl = load unit 0 0000CC30 80F980 cmp cl, 80h 0 0000CC33 7303E90FF8 jb bootcmd.error ; diskettes aren't partitioned 0 0000CC38 85DB test bx, bx 0 0000CC3A 7403E908F8 jnz bootcmd.error 0 0000CC3F 81FAFF00 cmp dx, 255 0 0000CC43 7603E9FFF7 ja bootcmd.error 0 0000CC48 85D2 test dx, dx 0 0000CC4A 7503E9F8F7 jz bootcmd.error 0 0000CC4F E8[0000] call skipwh0 0 0000CC52 8856FF mov byte [bp + ?partition], dl 0 0000CC55 884EFE mov byte [bp + ?unit], cl 0 0000CC58 E8[0000] call iseol? 0 0000CC5B 7504 jne .fn 1537 .ret_nc: 0 0000CC5D 31DB xor bx, bx ; NC, ZR 0 0000CC5F EB06 jmp @F 1540 1541 .fn: 0 0000CC61 E8[0000] call skipwh0 0 0000CC64 83CB01 or bx, 1 ; NC, NZ 1544 @@: 0 0000CC67 9C pushf 0 0000CC68 8B5EFE mov bx, word [bp + ?unit_low_partition_high] 0 0000CC6B 881E[4002] mov byte [load_unit], bl 0 0000CC6F 883E[3805] mov byte [load_partition], bh 0 0000CC73 8A5EFA mov bl, byte [bp + ?dif3_set] 0 0000CC76 081E[0000] or byte [internalflags3], bl 0 0000CC7A F646FC01 test byte [bp + ?bit0_no_set_sdp], 1 0 0000CC7E 750E jnz @F 0 0000CC80 FF76F8 push word [bp + ?load_partition_sector + 2] 0 0000CC83 FF76F6 push word [bp + ?load_partition_sector] 0 0000CC86 8F06[2C05] pop word [load_sdp_sector] 0 0000CC8A 8F06[2E05] pop word [load_sdp_sector + 2] 1557 @@: 0 0000CC8E 9D popf ; ZF, CF 0 0000CC8F 8F06[2805] pop word [load_partition_sector] 0 0000CC93 8F06[2A05] pop word [load_partition_sector + 2] 1561 ; pop from ?load_partition_sector 0 0000CC97 E950FE jmp .ret 1563 1564 lleave ctx 1565 1566 0 0000CC9A 00 align 4, db 0 1568 1569 boot_read: 0 0000CC9C C706[6805][421B] mov word [load_readwrite_function], read_sector 0 0000CCA2 EB06 jmp boot_readwrite 1572 1573 boot_write: 0 0000CCA4 C706[6805][411B] mov word [load_readwrite_function], write_sector 1575 1576 boot_readwrite: 1577 1578 d4 call d4message 1579 d4 asciz "In boot_readwrite",13,10 1580 0 0000CCAA E8[0000] call skipequals 0 0000CCAD E8C7FD call parseloadunit_default_sdp 0 0000CCB0 7503E9F500 jz .error 1584 1585 %if 0 1586 call skipwh0 1587 mov bx, word [reg_ds] ; default segment 1588 nearcall getaddr ; get buffer address into bx:(e)dx 1589 1590 _386_PM test edx, 0FFFF_0000h 1591 _386_PM jnz .error 1592 1593 ; (variable must be a dword!) 1594 mov word [load_readwrite_buffer], dx 1595 mov word [load_readwrite_buffer + 2], bx 1596 %else 0 0000CCB5 E8[0000] nearcall getword 1598 ; (variable is a word) 0 0000CCB8 8916[6405] mov word [load_readwrite_buffer], dx 1600 %endif 1601 0 0000CCBC 31DB xor bx, bx 0 0000CCBE 53 push bx ; hidden specified flag (0) 0 0000CCBF 53 push bx 0 0000CCC0 53 push bx ; hidden number 0 0000CCC1 E8[0000] call skipwh0 0 0000CCC4 E8[0000] call iseol? 0 0000CCC7 750F jne @F 1609 1610 d4 call d4message 1611 d4 asciz "In boot_readwrite no sector given no count given",13,10 1612 0 0000CCC9 8326[6005]00 and word [load_readwrite_sector], 0 0 0000CCCE 8326[6205]00 and word [load_readwrite_sector + 2], 0 0 0000CCD3 BA0100 mov dx, 1 0 0000CCD6 EB4A jmp @FF 1617 1618 @@: 0 0000CCD8 BA[0000] mov dx, msg.hidden 0 0000CCDB 4E dec si 0 0000CCDC E8[0000] call isstring? 0 0000CCDF 7514 jne .nothidden 1623 0 0000CCE1 83C406 add sp, 6 ; discard hidden number and specified flag 0 0000CCE4 BA0100 mov dx, 1 1626 1627 .hiddencommon: 0 0000CCE7 52 push dx ; hidden specified flag (1 or 2) 1629 0 0000CCE8 E8[0000] call skipequals 1631 0 0000CCEB E8[0000] nearcall getdword 0 0000CCEE 53 push bx 0 0000CCEF 52 push dx ; hidden number 0 0000CCF0 E8[0000] call skipwh0 1636 0 0000CCF3 EB11 jmp .hiddendone 1638 .nothidden: 0 0000CCF5 BA[0000] mov dx, msg.hiddenadd 0 0000CCF8 E8[0000] call isstring? 0 0000CCFB 7508 jne .nothiddenadd 1642 0 0000CCFD 83C406 add sp, 6 ; discard hidden number and specified flag 0 0000CD00 BA0200 mov dx, 2 0 0000CD03 EBE2 jmp .hiddencommon 1646 1647 .nothiddenadd: 0 0000CD05 AC lodsb 1649 .hiddendone: 0 0000CD06 E8[0000] nearcall getexpression ; bx:dx = value 1651 0 0000CD09 8916[6005] mov word [load_readwrite_sector], dx 0 0000CD0D 891E[6205] mov word [load_readwrite_sector + 2], bx 1654 0 0000CD11 E8[0000] call skipwh0 0 0000CD14 BA0100 mov dx, 1 0 0000CD17 E8[0000] call iseol? 0 0000CD1A 7406 je @F 0 0000CD1C E8[0000] nearcall getword 0 0000CD1F E8[0000] call chkeol 1661 @@: 0 0000CD22 8916[6605] mov word [load_readwrite_count], dx 1663 0 0000CD26 E8AF0F call query_geometry 1665 0 0000CD29 F606[0000]07 testopt [internalflags3], dif3_load_is_dp 0 0000CD2E 753C jnz .ldp 1668 0 0000CD30 803E[3805]00 cmp byte [load_partition], 0 0 0000CD35 7447 je .whole_unit 1671 0 0000CD37 C606[3A05]00 mov byte [load_found_partition], 0 0 0000CD3C B9[DA09] mov cx, .single_partition 0 0000CD3F E8EE0D call scan_partitions 1675 ; cmp byte [load_found_partition], 0 1676 ; jne @F 0 0000CD42 BA[0000] mov dx, msg.boot_partition_not_found 0 0000CD45 B81502 mov ax, 0215h 0 0000CD48 E8[0000] call setrc 0 0000CD4B E91AFB jmp bootcmd.fail 1681 ;@@: 1682 ; retn 1683 1684 1685 .single_partition: 1686 ; INP: es:si -> partition table entry, 1687 ; si = load_partition_table .. load_partition_table+48, 1688 ; es = ss 1689 ; bp + di -> above part table metadata, 1690 ; dwo [bp + di - 4] = root (outermost extended position) 1691 ; dwo [bp + di - 8] = base (current table position) 1692 ;; CHG: ax, bx, (cx), dx 1693 ; CHG: all 1694 1695 d4 call d4message 1696 d4 asciz "In boot_readwrite.single_partition",13,10 1697 0 0000CD4E A0[3905] mov al, byte [load_current_partition] 0 0000CD51 3A06[3805] cmp al, byte [load_partition] 0 0000CD55 7401 je .gotit 0 0000CD57 C3 retn 1702 1703 .gotit: 1704 d4 call d4message 1705 d4 asciz "In boot_readwrite.gotit",13,10 1706 1707 ; inc byte [load_found_partition] 1708 0 0000CD58 8B43F8 mov ax, [bp + di - 8] 0 0000CD5B 8B53FA mov dx, [bp + di - 6] ; base (current table position) 1711 0 0000CD5E 26034408 add ax, [es:si + 8] 0 0000CD62 2613540A adc dx, [es:si + 8 + 2] ; add offset to logical partition 1714 0 0000CD66 89EC mov sp, bp 0 0000CD68 5D pop bp ; restore bp (scan_partitions) 0 0000CD69 5B pop bx ; discard ret address (scan_partitions) 0 0000CD6A EB07 jmp .gotbase_dxax 1719 1720 1721 .ldp: 0 0000CD6C A1[2805] mov ax, word [load_partition_sector] 0 0000CD6F 8B16[2A05] mov dx, word [load_partition_sector + 2] 1724 1725 .gotbase_dxax: 0 0000CD73 89461C mov word [bp + bsBPB + bpbHiddenSectors + 0], ax 0 0000CD76 89561E mov word [bp + bsBPB + bpbHiddenSectors + 2], dx 0 0000CD79 800E[0000]80 setopt [internalflags3], dif3_partition_changed 1729 1730 .whole_unit: 0 0000CD7E 5A pop dx 0 0000CD7F 5B pop bx ; hidden number (or zero) 0 0000CD80 59 pop cx ; hidden specified flag 0 0000CD81 E30F jcxz @FF ; if not specified --> 0 0000CD83 49 dec cx ; hidden flag is 1 ? 0 0000CD84 7406 jz @F ; yes, replacce --> 0 0000CD86 03561C add dx, word [bp + bsBPB + bpbHiddenSectors + 0] 0 0000CD89 135E1E adc bx, word [bp + bsBPB + bpbHiddenSectors + 2] 1739 ; add to hidden (HIDDENADD=) 1740 1741 @@: 0 0000CD8C 89561C mov word [bp + bsBPB + bpbHiddenSectors + 0], dx 0 0000CD8F 895E1E mov word [bp + bsBPB + bpbHiddenSectors + 2], bx 1744 ; overwrite hidden number with this 1745 @@: 1746 0 0000CD92 A1[6005] mov ax, word [load_readwrite_sector] 0 0000CD95 8B16[6205] mov dx, word [load_readwrite_sector + 2] 0 0000CD99 8B0E[6605] mov cx, word [load_readwrite_count] 0 0000CD9D 8B1E[6405] mov bx, word [load_readwrite_buffer] 1751 0 0000CDA1 E306 jcxz @FF 1753 @@: 0 0000CDA3 FF16[6805] call near word [load_readwrite_function] 0 0000CDA7 E2FA loop @B 1756 @@: 0 0000CDA9 C3 retn 1758 1759 .error: 0 0000CDAA E9[0000] jmp error 1761 1762 1763 ; INP: ds:si-> first letter of name 1764 ; es:load_kernel_name-> 12-byte buffer (for fn + 0) 1765 ; CHG: ax, cx, di 1766 ; OUT: CY if dot EOL, dot blank, or dot/ 1767 ; al = first text byte after dot (EOL, blank, or slash) 1768 ; ZR if dot/, 1769 ; si -> next text byte after slash 1770 ; NZ if dot EOL or dot blank, 1771 ; si -> first text byte after dot (*NOT* next) 1772 ; (load_kernel_name rese to empty) 1773 ; NC if not a single dot component, 1774 ; al = first text byte after name (EOL, blank, or slash) 1775 ; si -> next text byte after name, if any 1776 ; load_kernel_name filled with FCB formatted name 1777 ; branches to bootcmd.fail on syntax errors 1778 boot_parse_fn: section_of_function 0 0000CDAD B020 mov al, 32 0 0000CDAF BF[4005] mov di, load_kernel_name 0 0000CDB2 B90B00 mov cx, 11 0 0000CDB5 F3AA rep stosb ; initialise to empty 1783 0 0000CDB7 BF[4005] mov di, load_kernel_name 0 0000CDBA B90900 mov cx, 9 0 0000CDBD AC lodsb 0 0000CDBE 3C2E cmp al, '.' 0 0000CDC0 7514 jne @F 0 0000CDC2 AC lodsb 0 0000CDC3 E86500 call .separator_or_slash 0 0000CDC6 751D jne .invalid 0 0000CDC8 3C2F cmp al, '/' 0 0000CDCA 7407 je .dotret ; --> ZR 0 0000CDCC 3C5C cmp al, '\' 0 0000CDCE 7403 je .dotret ; --> ZR 0 0000CDD0 8D74FF lea si, [si - 1] ; NZ, -> at separator (first text after dot) 1797 .dotret: 0 0000CDD3 F9 stc ; CY return 0 0000CDD4 C3 retn 1800 1801 1802 .loop_name: 0 0000CDD5 AC lodsb 1804 @@: 0 0000CDD6 E8[0000] call capitalise 0 0000CDD9 E84F00 call .separator_or_slash 0 0000CDDC 7435 je .loop_name_done 0 0000CDDE 3C2E cmp al, '.' 0 0000CDE0 740F je .loop_name_ext 0 0000CDE2 AA stosb 0 0000CDE3 E2F0 loop .loop_name 1812 .invalid: 0 0000CDE5 BA[0000] mov dx, msg.boot_invalid_filename 0 0000CDE8 B81602 mov ax, 0216h 0 0000CDEB E8[0000] call setrc 0 0000CDEE E977FA jmp bootcmd.fail 1817 1818 .loop_name_ext: 0 0000CDF1 83F909 cmp cx, 9 0 0000CDF4 74EF je .invalid 0 0000CDF6 B90400 mov cx, 4 0 0000CDF9 BF[4805] mov di, load_kernel_name + 8 1823 .loop_ext: 0 0000CDFC AC lodsb 0 0000CDFD E8[0000] call capitalise 0 0000CE00 E82800 call .separator_or_slash 0 0000CE03 7409 je .loop_ext_done 0 0000CE05 3C2E cmp al, '.' 0 0000CE07 74DC je .invalid 0 0000CE09 AA stosb 0 0000CE0A E2F0 loop .loop_ext 0 0000CE0C EBD7 jmp .invalid 1833 1834 .loop_ext_done: 0 0000CE0E 83F904 cmp cx, 4 0 0000CE11 74D2 je .invalid 1837 .loop_name_done: 0 0000CE13 83F909 cmp cx, 9 0 0000CE16 74CD je .invalid 0 0000CE18 C606[4B05]00 mov byte [load_kernel_name + 11], 0 0 0000CE1D 803E[4005]E5 cmp byte [load_kernel_name], 0E5h 0 0000CE22 7505 jne @F 0 0000CE24 C606[4005]05 mov byte [load_kernel_name], 05h 1844 @@: 0 0000CE29 F8 clc ; NC return 0 0000CE2A C3 retn 1847 1848 .separator_or_slash: 0 0000CE2B E8[0000] call iseol? 0 0000CE2E 740E je @F 0 0000CE30 3C20 cmp al, 32 0 0000CE32 740A je @F 0 0000CE34 3C09 cmp al, 9 0 0000CE36 7406 je @F 0 0000CE38 3C2F cmp al, '/' 0 0000CE3A 7402 je @F 0 0000CE3C 3C5C cmp al, '\' 1858 @@: 0 0000CE3E C3 retn 1860 1861 1862 ; INP: es:si -> partition table entry, 1863 ; si = load_partition_table .. load_partition_table+48, 1864 ; es = ss 1865 ; bp + di -> above part table metadata, 1866 ; dwo [bp + di - 4] = root (outermost extended position) 1867 ; dwo [bp + di - 8] = base (current table position) 1868 ; CHG: ax, bx, (cx), dx 1869 load_from_partition: 1870 d4 call d4message 1871 d4 asciz "In load_from_partition",13,10 1872 0 0000CE3F A0[3905] mov al, byte [load_current_partition] 0 0000CE42 3A06[3805] cmp al, byte [load_partition] 0 0000CE46 7401 je .gotit 0 0000CE48 C3 retn 1877 1878 .gotit: 1879 d4 call d4message 1880 d4 asciz "In load_from_partition.gotit",13,10 1881 0 0000CE49 8B43F8 mov ax, [bp + di - 8] 0 0000CE4C 8B53FA mov dx, [bp + di - 6] ; base (current table position) 1884 0 0000CE4F 52 push dx 0 0000CE50 50 push ax 0 0000CE51 06 push es 0 0000CE52 BB6000 mov bx, 60h 0 0000CE55 E84C10 call read_ae_512_bytes ; load partition table to 0:600h 0 0000CE58 07 pop es 0 0000CE59 58 pop ax 0 0000CE5A 5A pop dx 1893 0 0000CE5B 26034408 add ax, [es:si + 8] 0 0000CE5F 2613540A adc dx, [es:si + 8 + 2] ; add offset to logical partition 1896 0 0000CE63 26894408 mov word [es:si + 8], ax 0 0000CE67 2689540A mov word [es:si + 8 + 2], dx ; store in partition table entry 1899 0 0000CE6B 31C9 xor cx, cx 0 0000CE6D 8EC1 mov es, cx ; es = 0 1902 %if _LINK_COMPAT 0 0000CE6F 8DB4BE07 lea si, [si + 600h + (510 - 64)] 0 0000CE73 81EE[0001] sub si, load_partition_table 1905 %else 1906 lea si, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 1907 %endif 1908 ; si = 600h + 510-64 .. 600h + 510-16 0 0000CE77 26894408 mov word [es:si + 8], ax 0 0000CE7B 2689540A mov word [es:si + 8 + 2], dx ; store in partition table entry 1911 1912 ; dx:ax = absolute sector number 0 0000CE7F BBC007 mov bx, 7C0h ; bx:0 = 7C0h:0 -> boot sector area 0 0000CE82 E81F10 call read_ae_512_bytes ; load partition boot sector to 0:7C00h 1915 0 0000CE85 89EC mov sp, bp 0 0000CE87 5D pop bp ; restore bp (scan_partitions) 0 0000CE88 58 pop ax ; discard ret address (scan_partitions) 1919 0 0000CE89 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000CE90 7403E9D114 jne boot_sigmismatch 1922 0 0000CE95 31C9 xor cx, cx 0 0000CE97 26390E0000 cmp word [es:0], cx 0 0000CE9C 7503E9D114 je boot_codemismatch 1926 0 0000CEA1 8EC1 mov es, cx ; cx = 0, es = 0 0 0000CEA3 89F7 mov di, si ; di -> partition table entry (seg 0) 0 0000CEA5 26800D80 or byte [es:di + 0], 80h ; set bootable flag 0 0000CEA9 A0[4002] mov al, byte [load_unit] ; al = unit 0 0000CEAC BB007C mov bx, 7C00h ; bx = 7C00h 0 0000CEAF E960F9 jmp load_partition_common 1933 1934 1935 ; INP: es:si -> partition table entry, 1936 ; si = load_partition_table .. load_partition_table+48, 1937 ; es = ss 1938 ; bp + di -> above part table metadata, 1939 ; dwo [bp + di - 4] = root (outermost extended position) 1940 ; dwo [bp + di - 8] = base (current table position) 1941 ; CHG: ax, bx, (cx), dx 1942 load_freedos_from_partition: 1943 d4 call d4message 1944 d4 asciz "In load_freedos_from_partition",13,10 1945 0 0000CEB2 A0[3905] mov al, byte [load_current_partition] 0 0000CEB5 3A06[3805] cmp al, byte [load_partition] 0 0000CEB9 7401 je .gotit 0 0000CEBB C3 retn 1950 1951 .gotit: 1952 d4 call d4message 1953 d4 asciz "In load_freedos_from_partition.gotit",13,10 1954 0 0000CEBC 8B43F8 mov ax, [bp + di - 8] 0 0000CEBF 8B53FA mov dx, [bp + di - 6] ; base (current table position) 1957 0 0000CEC2 26034408 add ax, [es:si + 8] 0 0000CEC6 2613540A adc dx, [es:si + 8 + 2] ; add offset to logical partition 1960 0 0000CECA 26894408 mov word [es:si + 8], ax 0 0000CECE 2689540A mov word [es:si + 8 + 2], dx ; store in partition table entry 0 0000CED2 26800C80 or byte [es:si + 0], 80h ; set bootable flag 1964 1965 %if _LOADER 1966 mov bx, 60h 1967 cmp byte [currentposition], 0 1968 ja .notbottom 1969 mov bx, ds 1970 add bx, word [liiAmountParagraphs] 1971 .notbottom: 1972 mov [loader_lowest_free], bx 1973 %endif 1974 0 0000CED6 F606[6902]40 testopt [load_options], LOAD_SET_DSSI_PARTINFO 0 0000CEDB 7431 jz @F 1977 0 0000CEDD 52 push dx 0 0000CEDE 50 push ax 1980 0 0000CEDF 8B43F8 mov ax, [bp + di - 8] 0 0000CEE2 8B53FA mov dx, [bp + di - 6] ; base (current table position) 1983 0 0000CEE5 52 push dx 0 0000CEE6 50 push ax 0 0000CEE7 06 push es 1987 %if _LOADER 1988 mov bx, [loader_lowest_free] 1989 push bx 1990 %else 0 0000CEE8 BB6000 mov bx, 60h 1992 %endif 0 0000CEEB E8B60F call read_ae_512_bytes ; load partition table to 0:600h 1994 %if _LOADER 1995 pop cx 1996 mov [loader_lowest_free], bx 1997 %endif 0 0000CEEE 07 pop es 0 0000CEEF 58 pop ax 0 0000CEF0 5A pop dx 2001 2002 %if _LOADER 2003 mov es, cx 2004 %if _LINK_COMPAT 2005 lea di, [si + (510 - 64)] 2006 sub di, load_partition_table 2007 %else 2008 lea di, [si - (load_partition_table + DATASECTIONFIXUP) + (510 - 64)] 2009 %endif 2010 ; si = 510-64 .. 600h + 510-16 2011 cmp byte [currentposition], 0 2012 jbe .loader 2013 %endif 0 0000CEF1 31C9 xor cx, cx 0 0000CEF3 8EC1 mov es, cx ; es = 0 2016 %if _LINK_COMPAT 0 0000CEF5 8DBCBE07 lea di, [si + 600h + (510 - 64)] 0 0000CEF9 81EF[0001] sub di, load_partition_table 2019 %else 2020 lea di, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 2021 %endif 2022 ; si = 600h + 510-64 .. 600h + 510-16 2023 .loader: 0 0000CEFD B90800 mov cx, 16 / 2 0 0000CF00 06 push es 0 0000CF01 57 push di 0 0000CF02 F3A5 rep movsw 0 0000CF04 8F06[3405] pop word [load_partition_entry] 0 0000CF08 8F06[3605] pop word [load_partition_entry + 2] 2030 0 0000CF0C 58 pop ax 0 0000CF0D 5A pop dx 2033 @@: 2034 2035 0 0000CF0E 89EC mov sp, bp 0 0000CF10 5D pop bp ; restore bp (scan_partitions) 0 0000CF11 5B pop bx ; discard ret address (scan_partitions) 2039 2040 ; dx:ax = absolute sector number 0 0000CF12 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000CF16 50 push ax 0 0000CF17 52 push dx 0 0000CF18 E8890F call read_ae_512_bytes ; load partition boot sector 2045 0 0000CF1B 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000CF22 7403E93F14 jne boot_sigmismatch 2048 0 0000CF27 31C9 xor cx, cx 2050 ; cmp word [es:0], cx 2051 ; je boot_codemismatch 2052 0 0000CF29 5A pop dx 0 0000CF2A 58 pop ax 2055 2056 ; dx:ax = boot sector 2057 ; byte [load_unit] = unit 2058 ; es:0-> read sector 2059 load_freedos_common: 0 0000CF2B 26A31C00 mov word [es:bsBPB + bpbHiddenSectors], ax 0 0000CF2F 2689161E00 mov word [es:bsBPB + bpbHiddenSectors + 2], dx 2062 0 0000CF34 8B5E0B mov bx, [bp + bsBPB + bpbBytesPerSector] 0 0000CF37 263B1E0B00 cmp bx, [es:bsBPB + bpbBytesPerSector] 0 0000CF3C 7403E93914 jne boot_secsizemismatch 2066 2067 ; preserve some variables from our pseudo BPB 0 0000CF41 31C0 xor ax, ax 0 0000CF43 FF7618 push word [bp + bsBPB + bpbCHSSectors] 0 0000CF46 268F061800 pop word [es:bsBPB + bpbCHSSectors] 0 0000CF4B FF761A push word [bp + bsBPB + bpbCHSHeads] 0 0000CF4E 268F061A00 pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 2073 0 0000CF53 8B5EEA mov bx, word [bp + ldParaPerSector] 0 0000CF56 D1EB shr bx, 1 0 0000CF58 895ED4 mov word [bp + ldEntriesPerSector], bx 2077 0 0000CF5B 2639061600 cmp word [es:bsBPB + bpbSectorsPerFAT], ax 0 0000CF60 8A5E40 mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 0 0000CF63 7407 je .is_fat32 0 0000CF65 26881E2400 mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 0 0000CF6A EB05 jmp short .was_fat1612 2083 .is_fat32: 0 0000CF6C 26881E4000 mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 2085 .was_fat1612: 2086 0 0000CF71 06 push es 0 0000CF72 1E push ds 0 0000CF73 06 push es 0 0000CF74 1F pop ds 0 0000CF75 31F6 xor si, si ; -> BPB from boot partition 0 0000CF77 16 push ss 0 0000CF78 07 pop es 0 0000CF79 BF[0002] mov di, load_data - LOADDATA2 ; -> our copy of a BPB 0 0000CF7C B95A00 mov cx, (bsBPB + ebpbNew + BPBN_size) 0 0000CF7F F3A4 rep movsb ; get the BPB 2097 0 0000CF81 1F pop ds 0 0000CF82 800E[0000]80 setopt [internalflags3], dif3_partition_changed 2100 0 0000CF87 394616 cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 0 0000CF8A 740B je @F ; is FAT32 --> 0 0000CF8C BE[2402] mov si, load_data - LOADDATA2 + bsBPB + bpbNew 0 0000CF8F BF[4002] mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 0 0000CF92 B91A00 mov cx, BPBN_size 0 0000CF95 F3A4 rep movsb ; clone the FAT16 / FAT12 BPBN 2107 ; to where the FAT32 BPBN lives 2108 @@: 0 0000CF97 07 pop es 2110 0 0000CF98 E8[0000] call bootgetmemorysize 0 0000CF9B 8956E0 mov word [bp + ldMemoryTop], dx 0 0000CF9E 81EA0005 sub dx, (20 * 1024) >> 4 2114 ; leave 20 KiB free at the top, to 2115 ; allow loading with the lDOS protocol (needs BPB and FAT seg 2116 ; to live below its destination buffers for these) 0 0000CFA2 7303 jnc @F 2118 .outofmem: 0 0000CFA4 E9B20E jmp query_geometry.out_of_memory_error 2120 @@: 2121 2122 %if _LOADER 2123 cmp byte [currentposition], 1 2124 jne @F 2125 mov ax, ss 2126 cmp dx, ax 2127 jbe @F 2128 xchg dx, ax 2129 @@: 2130 %endif 2131 0 0000CFA7 81EA0002 sub dx, 8192 >> 4 0 0000CFAB 72F7 jc .outofmem 0 0000CFAD 8956F8 mov word [bp + lsvFATSeg], dx 0 0000CFB0 B8FFFF mov ax, -1 0 0000CFB3 8946F4 mov word [bp + lsvFATSector], ax 0 0000CFB6 8946F6 mov word [bp + lsvFATSector + 2], ax 2138 0 0000CFB9 A1[6A02] mov ax, word [load_loadseg] 0 0000CFBC 8946FA mov word [bp + lsvLoadSeg], ax 2141 %if _LOADER 2142 cmp ax, [loader_lowest_free] 2143 jb ..@loader_too_low_load 2144 %endif 0 0000CFBF 31DB xor bx, bx 0 0000CFC1 B98000 mov cx, ((256 + 15) & ~15) >> 1 0 0000CFC4 F606[6902]20 testopt [load_options], LOAD_NO_BPB 0 0000CFC9 7506 jnz @F 0 0000CFCB BB0002 mov bx, 512 0 0000CFCE B98001 mov cx, ((512 + 256 + 15) & ~15) >> 1 2151 @@: 0 0000CFD1 F606[6902]10 testopt [load_options], LOAD_CMDLINE 0 0000CFD6 7404 jz @F 0 0000CFD8 81C18000 add cx, (256) >> 1 2155 @@: 2156 0 0000CFDC 833E[7202]FF cmp word [load_bpb + 2], -1 0 0000CFE1 7475 je .auto_bpb 2159 0 0000CFE3 A1[7002] mov ax, [load_bpb] 0 0000CFE6 D1E8 shr ax, 1 0 0000CFE8 D1E8 shr ax, 1 0 0000CFEA D1E8 shr ax, 1 0 0000CFEC D1E8 shr ax, 1 ; round down: start of BPB 0 0000CFEE 0306[7202] add ax, [load_bpb + 2] ; start of BPB 0 0000CFF2 83E810 sub ax, (256) >> 4 ; start of stack area 0 0000CFF5 720A jc @F 0 0000CFF7 F606[6902]10 testopt [load_options], LOAD_CMDLINE 0 0000CFFC 7403 jz @F 0 0000CFFE 83E810 sub ax, (256) >> 4 2171 @@: 0 0000D001 50 push ax 0 0000D002 7235 jc .bpb_too_low 2174 0 0000D004 3B46FA cmp ax, word [bp + lsvLoadSeg] 0 0000D007 773B ja .loads_below_bpb 2177 2178 %if _LOADER 2179 cmp ax, [loader_lowest_free] 2180 %else 0 0000D009 83F860 cmp ax, 60h 2182 %endif 0 0000D00C 722B jb .bpb_too_low 2184 0 0000D00E A1[7002] mov ax, [load_bpb] 0 0000D011 01D8 add ax, bx 0 0000D013 83C00F add ax, 15 0 0000D016 D1E8 shr ax, 1 0 0000D018 D1E8 shr ax, 1 0 0000D01A D1E8 shr ax, 1 0 0000D01C D1E8 shr ax, 1 0 0000D01E 0306[7202] add ax, [load_bpb + 2] ; end of BPB / pseudo-boot-sector 2193 0 0000D022 3B46FA cmp ax, word [bp + lsvLoadSeg] 0 0000D025 761F jbe .loads_above_bpb 2196 0 0000D027 BA[0000] mov dx, msg.boot_bpb_load_overlap 0 0000D02A B81702 mov ax, 0217h 0 0000D02D E8[0000] call setrc 2200 .fail: 0 0000D030 B81802 mov ax, 0218h 0 0000D033 E8[0000] call setrc 0 0000D036 E92FF8 jmp bootcmd.fail 2204 2205 .bpb_too_low: 0 0000D039 BA[0000] mov dx, msg.boot_bpb_too_low 0 0000D03C B81902 mov ax, 0219h 0 0000D03F E8[0000] call setrc 0 0000D042 EBEC jmp .fail 2210 2211 2212 2213 .loads_below_bpb: 0 0000D044 89C2 mov dx, ax ; set load top to before BPB/lsv/stack 2215 2216 .loads_above_bpb: ; dx = word [bp + ldLoadTop] = word [bp + lsvFATSeg] 0 0000D046 FF36[7202] push word [load_bpb + 2] 0 0000D04A 8F06[2605] pop word [load_bpb_dest + 2] 0 0000D04E FF36[7002] push word [load_bpb] 0 0000D052 8F06[2405] pop word [load_bpb_dest] 0 0000D056 EB50 jmp .got_bpb_set_load_top 2222 2223 2224 ; auto-BPB: allocate BPB at top and load below that 2225 .auto_bpb: 0 0000D058 83EA10 sub dx, (256 + 15) >> 4 0 0000D05B 7303E944FF jc .outofmem 0 0000D060 F606[6902]10 testopt [load_options], LOAD_CMDLINE 0 0000D065 7408 jz @F 0 0000D067 83EA10 sub dx, (256) >> 4 0 0000D06A 7303E935FF jc .outofmem 2232 @@: 0 0000D06F 85DB test bx, bx 0 0000D071 7408 jz @F 0 0000D073 83EA20 sub dx, 512 >> 4 0 0000D076 7303E929FF jc .outofmem 2237 @@: 2238 0 0000D07B 52 push dx 0 0000D07C 89D0 mov ax, dx 2241 ; eg dx = 800h 2242 ; want (((800h<<4) + 4096 - LOADSTACKVARS) - 7C00h) >> 4 2243 ; which is 143h 2244 ; which :7C00h = 903h:0 2245 ; dx + ( 4096 - LOADSTACKVARS - 7C00h) / 16 2246 ; dx - (-4096 + LOADSTACKVARS + 7C00h) / 16 0 0000D07E BB00FF mov bx, (- 256) 0 0000D081 F606[6902]10 testopt [load_options], LOAD_CMDLINE 0 0000D086 7404 jz @F 0 0000D088 81EB0001 sub bx, (256) 2251 @@: 0 0000D08C 031E[7002] add bx, word [load_bpb] 0 0000D090 51 push cx 0 0000D091 B104 mov cl, 4 0 0000D093 D3EB shr bx, cl 0 0000D095 59 pop cx 0 0000D096 29D8 sub ax, bx 2258 ; sub ax, (-256 + 7C00h) / 16 0 0000D098 7303E907FF jc .outofmem 2260 ; mov word [load_bpb_dest], 7C00h 0 0000D09D FF36[7002] push word [load_bpb] 0 0000D0A1 8F06[2405] pop word [load_bpb_dest] 0 0000D0A5 A3[2605] mov word [load_bpb_dest + 2], ax 2264 .got_bpb_set_load_top: 0 0000D0A8 8956E2 mov word [bp + ldLoadTop], dx 2266 2267 .got_bpb: ; cx = how many words are used for stack/lsv/BPB 0 0000D0AB 58 pop ax ; -> stack area 0 0000D0AC 06 push es 0 0000D0AD 8EC0 mov es, ax 0 0000D0AF 31FF xor di, di 0 0000D0B1 31C0 xor ax, ax 0 0000D0B3 F3AB rep stosw 0 0000D0B5 07 pop es 2275 0 0000D0B6 E88618 call initialise_fs 2277 0 0000D0B9 C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000D0BE 8B36[4C05] mov si, word [load_kernelname_input] 0 0000D0C2 803C2F cmp byte [si], '/' 0 0000D0C5 7501 jne @F 0 0000D0C7 46 inc si 2283 @@: 2284 .dotcomponent: 0 0000D0C8 803C00 cmp byte [si], 0 0 0000D0CB 7504 jne @F 0 0000D0CD 8B36[6002] mov si, word [load_kernelname_default] 2288 @@: 0 0000D0D1 16 push ss 0 0000D0D2 07 pop es 0 0000D0D3 E8D7FC call boot_parse_fn ; get next pathname 0 0000D0D6 72F0 jc .dotcomponent 0 0000D0D8 3C2F cmp al, '/' 0 0000D0DA 7509 jne @F 0 0000D0DC C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000D0E1 8936[4E05] mov word [load_kernelname_next], si 2297 @@: 2298 0 0000D0E5 BFFFFF mov di, -1 0 0000D0E8 89FE mov si, di 0 0000D0EA 897EF4 mov [bp + lsvFATSector], di 0 0000D0ED 8976F6 mov [bp + lsvFATSector + 2], si 2303 0 0000D0F0 31C0 xor ax, ax 0 0000D0F2 31D2 xor dx, dx 2306 2307 scan_dir_kernelname_loop: 0 0000D0F4 8946EC mov word [bp + ldDirCluster], ax 0 0000D0F7 8956EE mov word [bp + ldDirCluster + 2], dx 2310 0 0000D0FA 31DB xor bx, bx 0 0000D0FC 8EC3 mov es, bx 0 0000D0FE BB0005 mov bx, 500h 0 0000D101 E8E507 call scan_dir_aux_for_file 2315 0 0000D104 803E[3B05]10 cmp byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000D109 753E jne got_kernelentry 2318 0 0000D10B 56 push si 0 0000D10C 57 push di 0 0000D10D C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000D112 8B36[4E05] mov si, word [load_kernelname_next] 2323 .dotcomponent_next: 0 0000D116 803C00 cmp byte [si], 0 0 0000D119 7504 jne @F 0 0000D11B 8B36[6002] mov si, word [load_kernelname_default] 2327 @@: 0 0000D11F 06 push es 0 0000D120 16 push ss 0 0000D121 07 pop es 0 0000D122 E888FC call boot_parse_fn ; get next pathname 0 0000D125 07 pop es 0 0000D126 72EE jc .dotcomponent_next 0 0000D128 3C2F cmp al, '/' 0 0000D12A 7509 jne @F 0 0000D12C C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000D131 8936[4E05] mov word [load_kernelname_next], si 2338 @@: 0 0000D135 5F pop di 0 0000D136 5E pop si 2341 0 0000D137 31D2 xor dx, dx 0 0000D139 268B471A mov ax, [es:bx + deClusterLow] 2344 ; = first cluster (not FAT32) 0 0000D13D 807EE620 cmp byte [bp + ldFATType], 32 0 0000D141 7504 jne @F 0 0000D143 268B5714 mov dx, [es:bx + deClusterHigh] 2348 ; dx:ax = first cluster (FAT32) 2349 @@: 2350 0 0000D147 EBAB jmp scan_dir_kernelname_loop 2352 2353 2354 got_kernelentry: 0 0000D149 56 push si 0 0000D14A 57 push di 2357 0 0000D14B C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000D150 8B36[5005] mov si, word [load_addname_input] 0 0000D154 803C2F cmp byte [si], '/' 0 0000D157 7511 jne @F 0 0000D159 46 inc si 0 0000D15A 803C2F cmp byte [si], '/' 0 0000D15D 7503E9A800 je got_no_addentry.no_dxax_on_stack 2365 0 0000D162 31C0 xor ax, ax 0 0000D164 8946EC mov word [bp + ldDirCluster], ax 0 0000D167 8946EE mov word [bp + ldDirCluster + 2], ax 2369 ; search from root directory 2370 @@: 2371 .dotcomponent_next: 0 0000D16A 803C00 cmp byte [si], 0 0 0000D16D 750C jne @F 0 0000D16F 8B36[6202] mov si, word [load_addname_default] 0 0000D173 803C00 cmp byte [si], 0 0 0000D176 7503E98F00 je got_no_addentry.no_dxax_on_stack 2377 @@: 0 0000D17B 16 push ss 0 0000D17C 07 pop es 0 0000D17D E82DFC call boot_parse_fn ; get next pathname 0 0000D180 72E8 jc .dotcomponent_next 0 0000D182 3C2F cmp al, '/' 0 0000D184 7509 jne @F 0 0000D186 C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000D18B 8936[5205] mov word [load_addname_next], si 2386 @@: 0 0000D18F 5F pop di 0 0000D190 5E pop si 0 0000D191 EB06 jmp @F 2390 2391 2392 scan_dir_addname_loop: 0 0000D193 8946EC mov word [bp + ldDirCluster], ax 0 0000D196 8956EE mov word [bp + ldDirCluster + 2], dx 2395 2396 @@: 0 0000D199 31DB xor bx, bx 0 0000D19B 8EC3 mov es, bx 0 0000D19D BB2005 mov bx, 520h ; 0:bx -> space for second directory entry 0 0000D1A0 E84607 call scan_dir_aux_for_file 2401 0 0000D1A3 803E[3B05]10 cmp byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000D1A8 756E jne got_addentry 2404 0 0000D1AA 56 push si 0 0000D1AB 57 push di 0 0000D1AC 52 push dx 0 0000D1AD 50 push ax 0 0000D1AE C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000D1B3 8B36[5205] mov si, word [load_addname_next] 2411 .dotcomponent_next: 0 0000D1B7 803C00 cmp byte [si], 0 0 0000D1BA 7509 jne @F 0 0000D1BC 8B36[6202] mov si, word [load_addname_default] 0 0000D1C0 803C00 cmp byte [si], 0 0 0000D1C3 7443 je got_no_addentry 2417 @@: 0 0000D1C5 06 push es 0 0000D1C6 16 push ss 0 0000D1C7 07 pop es 0 0000D1C8 E8E2FB call boot_parse_fn ; get next pathname 0 0000D1CB 07 pop es 0 0000D1CC 72E9 jc .dotcomponent_next 0 0000D1CE 3C2F cmp al, '/' 0 0000D1D0 7509 jne @F 0 0000D1D2 C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000D1D7 8936[5205] mov word [load_addname_next], si 2428 @@: 0 0000D1DB 58 pop ax 0 0000D1DC 5A pop dx 0 0000D1DD 5F pop di 0 0000D1DE 5E pop si 2433 0 0000D1DF 31D2 xor dx, dx 0 0000D1E1 268B471A mov ax, [es:bx + deClusterLow] 2436 ; = first cluster (not FAT32) 0 0000D1E5 807EE620 cmp byte [bp + ldFATType], 32 0 0000D1E9 7504 jne @F 0 0000D1EB 268B5714 mov dx, [es:bx + deClusterHigh] 2440 ; dx:ax = first cluster (FAT32) 2441 @@: 2442 0 0000D1EF EBA2 jmp scan_dir_addname_loop 2444 2445 2446 ; INP: dl:ax:bx = 40-bit size 2447 ; OUT: If input <= 0FFFF0h, 2448 ; dx = size in paragraphs, rounded down 2449 ; Else, 2450 ; dx = 0FFFFh 2451 ; cx = 0 2452 ; CHG: ax, bx 2453 helper_shift_down_and_clamp: 0 0000D1F1 B90400 mov cx, 4 2455 @@: 0 0000D1F4 D0EA shr dl, 1 0 0000D1F6 D1D8 rcr ax, 1 0 0000D1F8 D1DB rcr bx, 1 0 0000D1FA E2F8 loop @B ; cx = 0 2460 0 0000D1FC 08D0 or al, dl 0 0000D1FE 89DA mov dx, bx ; size in paragraphs 0 0000D200 85C0 test ax, ax ; > 0FFFFh ? 0 0000D202 7403 jz @F ; no, take actual size --> 0 0000D204 BAFFFF mov dx, 0FFFFh ; clamp to 0FFFFh 2466 @@: 0 0000D207 C3 retn 2468 2469 2470 got_no_addentry: 0 0000D208 58 pop ax 0 0000D209 5A pop dx 2473 .no_dxax_on_stack: 2474 ; push ax 0 0000D20A B91000 mov cx, 16 0 0000D20D 31C0 xor ax, ax 0 0000D20F 8EC0 mov es, ax 0 0000D211 BF2005 mov di, 520h ; es:di -> space for second directory entry 0 0000D214 F3AB rep stosw ; store zeros 2480 ; pop ax 2481 0 0000D216 5F pop di 0 0000D217 5E pop si 2484 2485 got_addentry: 0 0000D218 31C0 xor ax, ax 0 0000D21A 8EC0 mov es, ax 2488 2489 2490 ; (boot32.asm code starts here) 2491 0 0000D21C 8B46E2 mov ax, word [bp + ldLoadTop] 0 0000D21F 2B46EA sub ax, word [bp + ldParaPerSector] 0 0000D222 7303E97DFD jc load_freedos_common.outofmem 0 0000D227 8946D6 mov [bp + ldLastAvailableSector], ax 2496 0 0000D22A 268B1E1C05 mov bx, [es:500h + deSize] 0 0000D22F 26A11E05 mov ax, [es:500h + deSize + 2] ; ax:bx = file size 0 0000D233 268A160C05 mov dl, [es:500h + 12] ; dl = FAT+ size bits 0 0000D238 88D6 mov dh, dl 0 0000D23A 81E207E0 and dx, 0E007h ; obtain bits 7-5 and 2-0 0 0000D23E D0EE shr dh, 1 0 0000D240 D0EE shr dh, 1 0 0000D242 08F2 or dl, dh ; dl:ax:bx = file size 0 0000D244 52 push dx 0 0000D245 50 push ax 0 0000D246 53 push bx 2508 0 0000D247 E8A7FF call helper_shift_down_and_clamp 2510 ; round down to next paragraph boundary 0 0000D24A 3916[6402] cmp word [load_minpara], dx 2512 ; compare size (rounded down) to minpara 0 0000D24E 7603E9A200 ja error_filetoosmall ; too small --> 2514 0 0000D253 5B pop bx 0 0000D254 58 pop ax 0 0000D255 5A pop dx 0 0000D256 8B4E0B mov cx, [bp + bsBPB + bpbBytesPerSector] 0 0000D259 49 dec cx ; BpS - 1 0 0000D25A 01CB add bx, cx 0 0000D25C 83D000 adc ax, 0 0 0000D25F 80D200 adc dl, 0 ; round up to next sector 0 0000D262 F7D1 not cx ; ~ (BpS - 1) 0 0000D264 21CB and bx, cx ; mask to limit to rounded-up sector 0 0000D266 E888FF call helper_shift_down_and_clamp 2526 2527 ; dx = size in paragraphs, rounded up to sector 0 0000D269 A1[6602] mov ax, word [load_maxpara] 0 0000D26C 39C2 cmp dx, ax ; actual size below maximum ? 0 0000D26E 7602 jbe @F ; yes, use actual size --> 0 0000D270 89C2 mov dx, ax ; use maximum size (or 0) 2532 @@: 0 0000D272 8956D8 mov word [bp + ldParasLeft], dx 0 0000D275 894EDA mov word [bp + ldParasDone], cx 2535 ; = 0 2536 2537 ; get starting cluster of file 0 0000D278 31D2 xor dx, dx 0 0000D27A 26A11A05 mov ax, [es:500h + deClusterLow] 2540 ; = first cluster (not FAT32) 2541 0 0000D27E 807EE620 cmp byte [bp + ldFATType], 32 0 0000D282 7505 jne @F 0 0000D284 268B161405 mov dx, [es:500h + deClusterHigh] 2545 ; dx:ax = first cluster (FAT32) 2546 @@: 2547 0 0000D289 8946F0 mov word [bp + lsvFirstCluster], ax 0 0000D28C 8956F2 mov word [bp + lsvFirstCluster + 2], dx 2550 0 0000D28F E86C08 call check_clust 0 0000D292 7303E9E516 jc error_badchain 2553 2554 next_load_cluster: 0 0000D297 E83907 call clust_to_first_sector 2556 ; dx:ax = first sector of cluster 2557 ; cx:bx = cluster value 0 0000D29A 51 push cx 0 0000D29B 53 push bx ; preserve cluster number for later 2560 0 0000D29C 8B4EE8 mov cx, [bp + ldClusterSize] 2562 0 0000D29F 8B5EFA mov bx, [bp + lsvLoadSeg] 2564 ; xxx - this will always load an entire cluster (e.g. 64 sectors), 2565 ; even if the file is shorter than this 2566 @@: 0 0000D2A2 3B5ED6 cmp bx, [bp + ldLastAvailableSector] 0 0000D2A5 7613 jbe @F 0 0000D2A7 833E[6602]00 cmp word [load_maxpara], 0 0 0000D2AC 743D je @FF ; if to allow partial load --> 0 0000D2AE BA[0000] mov dx, msg.boot_file_too_big_error 0 0000D2B1 B81A02 mov ax, 021Ah 0 0000D2B4 E8[0000] call setrc 0 0000D2B7 E9AEF5 jmp bootcmd.fail 2575 2576 @@: 0 0000D2BA 06 push es ; (must preserve ADR_FATBUF reference) 0 0000D2BB E8F80B call read_sector 0 0000D2BE 07 pop es 0 0000D2BF 895EFA mov [bp + lsvLoadSeg], bx ; => after last read data 2581 0 0000D2C2 50 push ax 0 0000D2C3 8B46EA mov ax, [bp + ldParaPerSector] 0 0000D2C6 0146DA add word [bp + ldParasDone], ax 0 0000D2C9 833E[6602]00 cmp word [load_maxpara], 0 0 0000D2CE 7407 je .donotuseleft 0 0000D2D0 2946D8 sub word [bp + ldParasLeft], ax 0 0000D2D3 58 pop ax 0 0000D2D4 7615 jbe @F ; read enough --> 0 0000D2D6 A8 db __TEST_IMM8 ; (skip pop) 2591 .donotuseleft: 0 0000D2D7 58 pop ax 2593 0 0000D2D8 E2C8 loop @BB 0 0000D2DA 5B pop bx 0 0000D2DB 59 pop cx 2597 0 0000D2DC E81D07 call clust_next 0 0000D2DF 73B6 jnc next_load_cluster 0 0000D2E1 40 inc ax 0 0000D2E2 40 inc ax 0 0000D2E3 A808 test al, 8 ; set in 0FFF_FFF8h--0FFF_FFFFh, 2603 ; clear in 0, 1, and 0FFF_FFF7h 0 0000D2E5 7503E99216 jz error_badchain 0 0000D2EA A9 db __TEST_IMM16 2606 @@: 0 0000D2EB 5B pop bx 0 0000D2EC 59 pop cx 2609 0 0000D2ED A1[6402] mov ax, word [load_minpara] 0 0000D2F0 3B46DA cmp ax, word [bp + ldParasDone] 0 0000D2F3 760C jbe @F 2613 error_filetoosmall: 0 0000D2F5 BA[0000] mov dx, msg.boot_file_too_small_error 0 0000D2F8 B81B02 mov ax, 021Bh 0 0000D2FB E8[0000] call setrc 0 0000D2FE E967F5 jmp bootcmd.fail 2618 @@: 2619 2620 0 0000D301 8E06[6A02] mov es, word [load_loadseg] 0 0000D305 8B3E[7402] mov di, word [load_check_offset] 0 0000D309 A1[7602] mov ax, word [load_check_value] 0 0000D30C 85C0 test ax, ax 0 0000D30E 7406 jz @F 0 0000D310 AF scasw 0 0000D311 7403E90402 jne .error_check_mismatch 2628 @@: 2629 2630 ; turn off floppy motor 0 0000D316 BAF203 mov dx,3F2h 0 0000D319 B000 mov al,0 0 0000D31B EE out dx,al 2634 2635 ; Set-up registers for and jump to loaded file 2636 0 0000D31C 8A5640 mov dl, [bp + bsBPB + ebpbNew + bpbnBootUnit] 2638 ; testopt [load_options], LOAD_SET_DL_UNIT 2639 ; jz @F 2640 ; (always set dl) 0 0000D31F 8816[0000] mov byte [reg_edx], dl 2642 @@: 2643 2644 ; testopt [load_options], LOAD_SET_BL_UNIT 2645 ; jz @F 2646 ; (always set bl -- overwritten later if LOAD_SET_AXBX_DATASTART) 0 0000D323 8816[0000] mov byte [reg_ebx], dl 2648 @@: 2649 0 0000D327 8A6E15 mov ch, byte [bp + bsBPB + bpbMediaID] 0 0000D32A 882E[0100] mov byte [reg_ecx + 1], ch 2652 0 0000D32E F606[6802]40 testopt [load_options], LOAD_DATASTART_HIDDEN 0 0000D333 740C jz @F 0 0000D335 8B5E1C mov bx, [bp + bsBPB + bpbHiddenSectors] 0 0000D338 8B461E mov ax, [bp + bsBPB + bpbHiddenSectors + 2] 0 0000D33B 015EFC add word [bp + lsvDataStart], bx 0 0000D33E 1146FE adc word [bp + lsvDataStart + 2], ax 2659 @@: 2660 0 0000D341 F606[6802]80 testopt [load_options], LOAD_SET_AXBX_DATASTART 0 0000D346 740D jz @F 0 0000D348 8B5EFC mov bx, word [bp + lsvDataStart] 0 0000D34B 8B46FE mov ax, word [bp + lsvDataStart + 2] 0 0000D34E 891E[0000] mov word [reg_ebx], bx 0 0000D352 A3[0000] mov word [reg_eax], ax 2667 @@: 2668 0 0000D355 F606[6902]08 testopt [load_options], LOAD_SET_AXBX_ROOT_HIDDEN 0 0000D35A 7413 jz @F 0 0000D35C 8B5ED0 mov bx, word [bp + ldRootSector] 0 0000D35F 8B46D2 mov ax, word [bp + ldRootSector + 2] 0 0000D362 035E1C add bx, word [bp + bsBPB + bpbHiddenSectors] 0 0000D365 13461E adc ax, word [bp + bsBPB + bpbHiddenSectors + 2] 0 0000D368 891E[0000] mov word [reg_ebx], bx 0 0000D36C A3[0000] mov word [reg_eax], ax 2677 @@: 2678 0 0000D36F F606[6802]04 testopt [load_options], LOAD_SET_SIDI_CLUSTER 0 0000D374 740D jz @F 0 0000D376 8B56F2 mov dx, word [bp + lsvFirstCluster + 2] 0 0000D379 8B46F0 mov ax, word [bp + lsvFirstCluster] 0 0000D37C 8916[0000] mov word [reg_esi], dx 0 0000D380 A3[0000] mov word [reg_edi], ax 2685 @@: 2686 2687 ; (boot.asm code ends here) 2688 2689 0 0000D383 C43E[2405] les di, [load_bpb_dest] 0 0000D387 57 push di 0 0000D388 83EF10 sub di, -LOADSTACKVARS 0 0000D38B BE[F001] mov si, load_data - LOADDATA2 + LOADSTACKVARS 0 0000D38E B91000 mov cx, -LOADSTACKVARS 0 0000D391 F606[6902]20 testopt [load_options], LOAD_NO_BPB 0 0000D396 7568 jnz .no_bpb_movsb 0 0000D398 B93400 mov cx, -LOADSTACKVARS + bsBPB + bpbNew 0 0000D39B F3A4 rep movsb ; move common BPB part 2699 0 0000D39D 394E16 cmp word [bp + bsBPB + bpbSectorsPerFAT], cx 0 0000D3A0 B93600 mov cx, ebpbNew - bpbNew + BPBN_size ; move FAT32 EBPB part + BPBN 0 0000D3A3 7406 je @F 0 0000D3A5 83C61C add si, ebpbNew - bpbNew; -> BPBN 0 0000D3A8 B91A00 mov cx, BPBN_size ; move only BPBN 2705 @@: 0 0000D3AB F3A4 rep movsb 2707 0 0000D3AD 89F8 mov ax, di 0 0000D3AF 5F pop di 0 0000D3B0 29F8 sub ax, di 0 0000D3B2 48 dec ax 0 0000D3B3 48 dec ax 0 0000D3B4 86C4 xchg al, ah 0 0000D3B6 B0EB mov al, 0EBh 0 0000D3B8 268905 mov word [es:di], ax 0 0000D3BB 26C6450290 mov byte [es:di + 2], 90h 2717 0 0000D3C0 F606[6902]02 testopt [load_options], LOAD_LBA_SET_TYPE 0 0000D3C5 7416 jz @F 0 0000D3C7 F646E701 test byte [bp + ldFlags], ldfHasLBA 0 0000D3CB 7410 jz @F 2722 0 0000D3CD 26C645020E mov byte [es:di + 2], 0Eh ; (LBA-enabled) FAT16 FS partition type 0 0000D3D2 807EE620 cmp byte [bp + ldFATType], 32 0 0000D3D6 7205 jb @F 0 0000D3D8 26C645020C mov byte [es:di + 2], 0Ch ; (LBA-enabled) FAT32 FS partition type 2727 @@: 2728 0 0000D3DD 26C785FE0155AA mov word [es:di + 510], 0AA55h 0 0000D3E4 1E push ds 0 0000D3E5 31C9 xor cx, cx 0 0000D3E7 8ED9 mov ds, cx 0 0000D3E9 BE0005 mov si, 500h 0 0000D3EC 57 push di 0 0000D3ED 81C7D601 add di, 512 - 2 - 2 - 14 - 12 - 12 2736 ; 2: AA55 sig, 2: null word, 14: MS-DOS 7 protocol 2737 ; message table pointer lives here, 2738 ; 12: add name, 12: kernel name 0 0000D3F1 B10B mov cl, 11 0 0000D3F3 F3A4 rep movsb ; put kernel filename into the pseudo boot sector 0 0000D3F5 47 inc di 0 0000D3F6 BE2005 mov si, 520h 0 0000D3F9 B10B mov cl, 11 0 0000D3FB F3A4 rep movsb ; put additional filename (if any), cx = 0 0 0000D3FD 5F pop di 0 0000D3FE 1F pop ds 2747 2748 ; cx = 0 0 0000D3FF A8 db __TEST_IMM8 ; (skip pop) 2750 .no_bpb_movsb: 0 0000D400 58 pop ax ; discard word on stack 0 0000D401 F3A4 rep movsb 2753 0 0000D403 8126[0000]FFF8 and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 2755 0 0000D409 890E[0200] mov word [reg_eip + 2], cx 0 0000D40D FF36[6C02] push word [load_entrypoint] 0 0000D411 8F06[0000] pop word [reg_eip] 0 0000D415 A1[6E02] mov ax, word [load_entrypoint + 2] 0 0000D418 0306[6A02] add ax, word [load_loadseg] 0 0000D41C A3[0000] mov word [reg_cs], ax 2762 0 0000D41F A1[2605] mov ax, word [load_bpb_dest + 2] 0 0000D422 A3[0000] mov word [reg_ss], ax 2765 ; testopt [load_options], LOAD_SET_DSBP_BPB 2766 ; jz @F 2767 ; (always set ds -- overwritten later if LOAD_SET_DSSI_DPT) 0 0000D425 A3[0000] mov word [reg_ds], ax 2769 @@: 0 0000D428 8B1E[2405] mov bx, word [load_bpb_dest] 0 0000D42C 890E[0200] mov word [reg_ebp + 2], cx 0 0000D430 891E[0000] mov word [reg_ebp], bx 0 0000D434 89D8 mov ax, bx 0 0000D436 83EB10 sub bx, -LOADSTACKVARS ; (subtracts --10h) 0 0000D439 890E[0200] mov word [reg_esp + 2], cx 0 0000D43D 891E[0000] mov word [reg_esp], bx 2777 0 0000D441 F606[6902]20 testopt [load_options], LOAD_NO_BPB 0 0000D446 751B jnz @F 2780 0 0000D448 F606[6902]04 testopt [load_options], LOAD_MESSAGE_TABLE 0 0000D44D 7414 jz @F 0 0000D44F B96000 mov cx, (bsBPB + ebpbNew + BPBN_size + 2 + 15) & ~15 0 0000D452 01C8 add ax, cx 0 0000D454 268985EE01 mov word [es:di + 1EEh], ax 2786 ; this pointer points to the MS-DOS 7 message table. 2787 ; 2788 ; note that in actual MS-DOS 7 boot sectors, this value is 2789 ; eg 17Fh, which is incorrectly used with the boot sector's 2790 ; ss to load the table into the initial loader. 2791 ; 2792 ; refer to comments in msg.asm about msdos7_message_table. 0 0000D459 BE[0000] mov si, msdos7_message_table 0 0000D45C 01CF add di, cx 0 0000D45E B9[0000] mov cx, msdos7_message_table.size 0 0000D461 F3A4 rep movsb 2797 @@: 2798 0 0000D463 F606[6902]10 testopt [load_options], LOAD_CMDLINE 0 0000D468 7450 jz .no_cmdline 2801 0 0000D46A 8B36[3205] mov si, word [load_cmdline] 0 0000D46E 85F6 test si, si 0 0000D470 7508 jnz @F 0 0000D472 C606[3E05]00 mov byte [load_cmdline_first], 0 0 0000D477 BE[3205] mov si, load_cmdline 2807 @@: 2808 2809 ; due to the size of our line_in buffer, 2810 ; the command line is never too long for 2811 ; the lsv command line buffer (256 bytes). 0 0000D47A B98000 mov cx, lsvclBufferLength / 2 0 0000D47D 812E[0000]0401 sub word [reg_esp], - lsvCommandLine.start + LOADSTACKVARS 2814 ; hazard: if sp is too low, this underflows! 0 0000D483 7303E9B900 jc .error_stack_underflow 0 0000D488 8E06[0000] mov es, [reg_ss] 0 0000D48C 8B3E[0000] mov di, [reg_esp] ; es:di -> stack area for the pointers 0 0000D490 81FF0001 cmp di, 256 0 0000D494 7303E9A800 jb .error_stack_underflow 0 0000D499 57 push di 0 0000D49A A0[3E05] mov al, byte [load_cmdline_first] 0 0000D49D 84C0 test al, al ; have another first byte ? 0 0000D49F 7404 jz @F ; no --> 0 0000D4A1 AA stosb ; store it 0 0000D4A2 46 inc si ; skip source 0 0000D4A3 A4 movsb ; make it even (1st word done) 0 0000D4A4 49 dec cx ; one word less 2828 @@: 0 0000D4A5 F3A5 rep movsw 0 0000D4A7 26884DFF mov byte [es:di - 1], cl; truncate command line if too long 0 0000D4AB B8434C mov ax, lsvclSignature 0 0000D4AE AB stosw ; write lsvCommandLine.signature 0 0000D4AF 31C0 xor ax, ax 0 0000D4B1 AB stosw ; write lsvExtra 0 0000D4B2 5F pop di 0 0000D4B3 B90001 mov cx, lsvclBufferLength 0 0000D4B6 F2AE repne scasb ; search terminator 0 0000D4B8 F3AA rep stosb ; zero buffer behind terminator 2839 .no_cmdline: 2840 0 0000D4BA 31C0 xor ax, ax 0 0000D4BC 8EC0 mov es, ax 0 0000D4BE BF7800 mov di, 1Eh * 4 0 0000D4C1 268B5502 mov dx, word [es:di + 2] 0 0000D4C5 268B1D mov bx, word [es:di] 2846 0 0000D4C8 F606[6802]10 testopt [load_options], LOAD_SET_DSSI_DPT 0 0000D4CD 7408 jz @F 0 0000D4CF 8916[0000] mov word [reg_ds], dx 0 0000D4D3 891E[0000] mov word [reg_esi], bx 2851 @@: 0 0000D4D7 F606[6802]20 testopt [load_options], LOAD_PUSH_DPT 0 0000D4DC 7419 jz @F 2854 0 0000D4DE 06 push es 0 0000D4DF 57 push di 0 0000D4E0 832E[0000]08 sub word [reg_esp], 4 * 2 ; push four words 0 0000D4E5 8E06[0000] mov es, [reg_ss] 0 0000D4E9 8B3E[0000] mov di, [reg_esp] ; es:di -> stack area for the pointers 0 0000D4ED 58 pop ax ; di (1Eh * 4) 0 0000D4EE AB stosw 0 0000D4EF 58 pop ax ; es (0) 0 0000D4F0 AB stosw 0 0000D4F1 89D8 mov ax, bx 0 0000D4F3 AB stosw ; si (Int1E offset) 0 0000D4F4 89D0 mov ax, dx 0 0000D4F6 AB stosw ; ds (Int1E segment) 2868 @@: 2869 0 0000D4F7 F606[6902]40 testopt [load_options], LOAD_SET_DSSI_PARTINFO 0 0000D4FC 7416 jz @F 0 0000D4FE A1[3605] mov ax, word [load_partition_entry + 2] 0 0000D501 A3[0000] mov word [reg_ds], ax 0 0000D504 A1[3405] mov ax, word [load_partition_entry] 0 0000D507 A3[0000] mov word [reg_esi], ax 0 0000D50A F606[6902]20 testopt [load_options], LOAD_NO_BPB 0 0000D50F 7403 jz @F 0 0000D511 A3[0000] mov word [reg_ebp], ax 2879 @@: 0 0000D514 800E[0300]01 setopt [internalflags2], dif2_boot_loaded_kernel 0 0000D519 C3 retn 2882 2883 2884 .error_check_mismatch: 0 0000D51A 4F dec di 0 0000D51B 4F dec di ; = offset into file 0 0000D51C 26FF35 push word [es:di] ; = value we got in file 0 0000D51F 57 push di ; = offset 0 0000D520 16 push ss 0 0000D521 07 pop es ; set STT 0 0000D522 BF[0000] mov di, msg.bootfail_check_mismatch.check_value 0 0000D525 E8[0000] call hexword ; write expected value 0 0000D528 58 pop ax 0 0000D529 BF[0000] mov di, msg.bootfail_check_mismatch.check_offset 0 0000D52C E8[0000] call hexword ; write offset 0 0000D52F 58 pop ax 0 0000D530 BF[0000] mov di, msg.bootfail_check_mismatch.check_got 0 0000D533 E8[0000] call hexword ; write what we got in file 2899 0 0000D536 BA[0000] mov dx, msg.bootfail_check_mismatch 0 0000D539 B81C02 mov ax, 021Ch 0 0000D53C E8[0000] call setrc 0 0000D53F EB09 jmp @F ; fail with error message 2904 2905 .error_stack_underflow: 0 0000D541 BA[0000] mov dx, msg.bootfail_stack_underflow 0 0000D544 B81D02 mov ax, 021Dh 0 0000D547 E8[0000] call setrc 2909 @@: 0 0000D54A E91BF3 jmp bootcmd.fail 2911 2912 2913 boot_dir: 0 0000D54D 8026[0000]F7 clropt [internalflags3], dif3_load_dir_dir 0 0000D552 E8[0000] call skipwhite 0 0000D555 4E dec si 0 0000D556 BA[0000] mov dx, msg.dir 0 0000D559 E8[0000] call isstring? 0 0000D55C 7505 jne @F 0 0000D55E 800E[0000]08 setopt [internalflags3], dif3_load_dir_dir 2921 @@: 0 0000D563 C706[4C05][0000] mov word [load_kernelname_input], msg.emptydirname 0 0000D569 AC lodsb 0 0000D56A E8[0000] call yy_common_parse_name 0 0000D56D E8[0000] call chkeol 0 0000D570 89DE mov si, bx 0 0000D572 AC lodsb 0 0000D573 E801F5 call parseloadunit_default_sdp 0 0000D576 7406 jz .fn_done_eol ; no filename given, use defaults --> 2930 ; al was = '/' or '\' or first pathname's first character 2931 ; si-> next char 0 0000D578 BB[4C05] mov bx, load_kernelname_input 0 0000D57B E8B3F0 call bootcmd.pathname_parse_super 2934 2935 .fn_done_eol: 0 0000D57E F606[0000]07 testopt [internalflags3], dif3_load_is_dp 0 0000D583 7527 jnz .boot_dir_from_ldp 2938 0 0000D585 8A1E[3805] mov bl, [load_partition] 0 0000D589 803E[4002]80 cmp byte [load_unit], 80h 0 0000D58E 7228 jb .boot_dir_is_diskette 0 0000D590 84DB test bl, bl ; partition specified ? 0 0000D592 7503E9B0EE jz bootcmd.error ; no, error --> 2944 0 0000D597 E83E07 call query_geometry 2946 0 0000D59A B9[6B12] mov cx, boot_dir_from_partition 0 0000D59D E89005 call scan_partitions 0 0000D5A0 BA[0000] mov dx, msg.boot_partition_not_found 0 0000D5A3 B81102 mov ax, 0211h 0 0000D5A6 E8[0000] call setrc 0 0000D5A9 E9BCF2 jmp bootcmd.fail 2953 2954 2955 .boot_dir_from_ldp: 0 0000D5AC E82907 call query_geometry 0 0000D5AF A1[2805] mov ax, word [load_partition_sector] 0 0000D5B2 8B16[2A05] mov dx, word [load_partition_sector + 2] 0 0000D5B6 EB0E jmp @F 2960 2961 2962 .boot_dir_is_diskette: 0 0000D5B8 84DB test bl, bl ; partition specified ? 0 0000D5BA 7403E988EE jnz bootcmd.error ; yes, error --> 2965 0 0000D5BF E81607 call query_geometry 2967 0 0000D5C2 31C0 xor ax, ax 0 0000D5C4 31D2 xor dx, dx 2970 @@: 0 0000D5C6 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000D5CA 52 push dx 0 0000D5CB 50 push ax 0 0000D5CC E8D508 call read_ae_512_bytes 2975 0 0000D5CF 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000D5D6 7403E98B0D jne boot_sigmismatch 0 0000D5DB 58 pop ax 0 0000D5DC 5A pop dx 2980 0 0000D5DD EB41 jmp boot_dir_common 2982 2983 2984 ; INP: es:si -> partition table entry, 2985 ; si = load_partition_table .. load_partition_table+48, 2986 ; es = ss 2987 ; bp + di -> above part table metadata, 2988 ; dwo [bp + di - 4] = root (outermost extended position) 2989 ; dwo [bp + di - 8] = base (current table position) 2990 ; CHG: ax, bx, (cx), dx 2991 boot_dir_from_partition: 2992 d4 call d4message 2993 d4 asciz "In boot_dir_from_partition",13,10 2994 0 0000D5DF A0[3905] mov al, byte [load_current_partition] 0 0000D5E2 3A06[3805] cmp al, byte [load_partition] 0 0000D5E6 7401 je .gotit 0 0000D5E8 C3 retn 2999 3000 .gotit: 3001 d4 call d4message 3002 d4 asciz "In boot_dir_from_partition.gotit",13,10 3003 0 0000D5E9 8B43F8 mov ax, [bp + di - 8] 0 0000D5EC 8B53FA mov dx, [bp + di - 6] ; base (current table position) 3006 0 0000D5EF 26034408 add ax, [es:si + 8] 0 0000D5F3 2613540A adc dx, [es:si + 8 + 2] ; add offset to logical partition 3009 0 0000D5F7 26894408 mov word [es:si + 8], ax 0 0000D5FB 2689540A mov word [es:si + 8 + 2], dx ; store in partition table entry 0 0000D5FF 26800C80 or byte [es:si + 0], 80h ; set bootable flag 3013 0 0000D603 89EC mov sp, bp 0 0000D605 5D pop bp ; restore bp (scan_partitions) 0 0000D606 5B pop bx ; discard ret address (scan_partitions) 3017 3018 ; dx:ax = absolute sector number 0 0000D607 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000D60B 50 push ax 0 0000D60C 52 push dx 0 0000D60D E89408 call read_ae_512_bytes ; load partition boot sector 3023 0 0000D610 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000D617 7403E94A0D jne boot_sigmismatch 3026 0 0000D61C 31C9 xor cx, cx 3028 ; cmp word [es:0], cx 3029 ; je boot_codemismatch 3030 0 0000D61E 5A pop dx 0 0000D61F 58 pop ax 3033 3034 ; dx:ax = boot sector 3035 ; byte [load_unit] = unit 3036 ; es:0-> read sector 3037 boot_dir_common: 0 0000D620 26A31C00 mov word [es:bsBPB + bpbHiddenSectors], ax 0 0000D624 2689161E00 mov word [es:bsBPB + bpbHiddenSectors + 2], dx 3040 0 0000D629 8B5E0B mov bx, [bp + bsBPB + bpbBytesPerSector] 0 0000D62C 263B1E0B00 cmp bx, [es:bsBPB + bpbBytesPerSector] 0 0000D631 7403E9440D jne boot_secsizemismatch 3044 3045 ; preserve some variables from our pseudo BPB 0 0000D636 31C0 xor ax, ax 0 0000D638 FF7618 push word [bp + bsBPB + bpbCHSSectors] 0 0000D63B 268F061800 pop word [es:bsBPB + bpbCHSSectors] 0 0000D640 FF761A push word [bp + bsBPB + bpbCHSHeads] 0 0000D643 268F061A00 pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 3051 0 0000D648 8B5EEA mov bx, word [bp + ldParaPerSector] 0 0000D64B D1EB shr bx, 1 0 0000D64D 895ED4 mov word [bp + ldEntriesPerSector], bx 3055 0 0000D650 2639061600 cmp word [es:bsBPB + bpbSectorsPerFAT], ax 0 0000D655 8A5E40 mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 0 0000D658 7407 je .is_fat32 0 0000D65A 26881E2400 mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 0 0000D65F EB05 jmp short .was_fat1612 3061 .is_fat32: 0 0000D661 26881E4000 mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 3063 .was_fat1612: 3064 0 0000D666 06 push es 0 0000D667 1E push ds 0 0000D668 06 push es 0 0000D669 1F pop ds 0 0000D66A 31F6 xor si, si ; -> BPB from boot partition 0 0000D66C 16 push ss 0 0000D66D 07 pop es 0 0000D66E BF[0002] mov di, load_data - LOADDATA2 ; -> our copy of a BPB 0 0000D671 B95A00 mov cx, (bsBPB + ebpbNew + BPBN_size) 0 0000D674 F3A4 rep movsb ; get the BPB 3075 0 0000D676 1F pop ds 0 0000D677 800E[0000]80 setopt [internalflags3], dif3_partition_changed 3078 0 0000D67C 394616 cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 0 0000D67F 740B je @F ; is FAT32 --> 0 0000D681 BE[2402] mov si, load_data - LOADDATA2 + bsBPB + bpbNew 0 0000D684 BF[4002] mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 0 0000D687 B91A00 mov cx, BPBN_size 0 0000D68A F3A4 rep movsb ; clone the FAT16 / FAT12 BPBN 3085 ; to where the FAT32 BPBN lives 3086 @@: 0 0000D68C 07 pop es 3088 0 0000D68D FF36[0000] push word [auxbuff_segorsel] 0 0000D691 8F46F8 pop word [bp + lsvFATSeg] 0 0000D694 804EE702 or byte [bp + ldFlags], ldfFATInvalid 0 0000D698 B8FFFF mov ax, -1 0 0000D69B 8946F4 mov word [bp + lsvFATSector], ax 0 0000D69E 8946F6 mov word [bp + lsvFATSector + 2], ax 3095 0 0000D6A1 E89B12 call initialise_fs 3097 0 0000D6A4 C706[8605][4615] mov word [handle_scan_dir_entry], scan_dir_entry 3099 0 0000D6AA C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000D6AF 8B36[4C05] mov si, word [load_kernelname_input] 0 0000D6B3 803C2F cmp byte [si], '/' 0 0000D6B6 7501 jne @F 0 0000D6B8 46 inc si 3105 @@: 3106 .dotcomponent: 0 0000D6B9 803C00 cmp byte [si], 0 0 0000D6BC 7503E99F00 je .root 0 0000D6C1 16 push ss 0 0000D6C2 07 pop es 0 0000D6C3 E8E7F6 call boot_parse_fn ; get next pathname 0 0000D6C6 72F1 jc .dotcomponent 0 0000D6C8 3C2F cmp al, '/' 0 0000D6CA 7509 jne @F 0 0000D6CC C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000D6D1 8936[4E05] mov word [load_kernelname_next], si 3117 @@: 0 0000D6D5 84C0 test al, al 0 0000D6D7 7506 jnz @F 0 0000D6D9 C706[8605][4315] mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 3121 @@: 3122 0 0000D6DF BFFFFF mov di, -1 0 0000D6E2 89FE mov si, di 0 0000D6E4 897EF4 mov [bp + lsvFATSector], di 0 0000D6E7 8976F6 mov [bp + lsvFATSector + 2], si 3127 0 0000D6EA 31C0 xor ax, ax 0 0000D6EC 31D2 xor dx, dx 3130 0 0000D6EE 83EC20 sub sp, 32 3132 3133 .scan_dir_dirname_loop: 0 0000D6F1 8946EC mov word [bp + ldDirCluster], ax 0 0000D6F4 8956EE mov word [bp + ldDirCluster + 2], dx 3136 0 0000D6F7 16 push ss 0 0000D6F8 07 pop es 0 0000D6F9 89E3 mov bx, sp 0 0000D6FB E8F101 call scan_dir_aux_with_error 3141 0 0000D6FE 803E[3B05]10 cmp byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000D703 7544 jne .got_direntry 3144 0 0000D705 56 push si 0 0000D706 57 push di 0 0000D707 C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000D70C 8B36[4E05] mov si, word [load_kernelname_next] 3149 .dotcomponent2_next: 0 0000D710 803C00 cmp byte [si], 0 0 0000D713 7451 je .sub 3152 0 0000D715 06 push es 0 0000D716 16 push ss 0 0000D717 07 pop es 0 0000D718 E892F6 call boot_parse_fn ; get next pathname 0 0000D71B 07 pop es 0 0000D71C 72F2 jc .dotcomponent2_next 0 0000D71E 3C2F cmp al, '/' 0 0000D720 7509 jne @F 0 0000D722 C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000D727 8936[4E05] mov word [load_kernelname_next], si 3163 @@: 0 0000D72B 84C0 test al, al 0 0000D72D 7506 jnz @F 0 0000D72F C706[8605][4315] mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 3167 @@: 3168 0 0000D735 5F pop di 0 0000D736 5E pop si 3171 0 0000D737 31D2 xor dx, dx 0 0000D739 268B471A mov ax, [es:bx + deClusterLow] 3174 ; = first cluster (not FAT32) 0 0000D73D 807EE620 cmp byte [bp + ldFATType], 32 0 0000D741 7504 jne @F 0 0000D743 268B5714 mov dx, [es:bx + deClusterHigh] 3178 ; dx:ax = first cluster (FAT32) 3179 @@: 3180 0 0000D747 EBA8 jmp .scan_dir_dirname_loop 3182 3183 3184 .got_direntry: 0 0000D749 F606[0000]08 testopt [internalflags3], dif3_load_dir_dir 0 0000D74E 7507 jnz @F 0 0000D750 26F6470B10 test byte [es:bx + deAttrib], ATTR_DIRECTORY 0 0000D755 7511 jnz @FF 3189 @@: 0 0000D757 89DF mov di, bx 0 0000D759 E83400 call list_dir_entry 0 0000D75C 83C420 add sp, 32 0 0000D75F C3 retn 3194 3195 .root: 0 0000D760 31C0 xor ax, ax 0 0000D762 31D2 xor dx, dx 0 0000D764 EB15 jmp .scan 3199 3200 .sub: 0 0000D766 5F pop di 0 0000D767 5E pop si 3203 3204 @@: 0 0000D768 83C420 add sp, 32 3206 0 0000D76B 31D2 xor dx, dx 0 0000D76D 268B471A mov ax, [es:bx + deClusterLow] 3209 ; = first cluster (not FAT32) 0 0000D771 807EE620 cmp byte [bp + ldFATType], 32 0 0000D775 7504 jne @F 0 0000D777 268B5714 mov dx, [es:bx + deClusterHigh] 3213 ; dx:ax = first cluster (FAT32) 3214 @@: 3215 .scan: 0 0000D77B 8946EC mov word [bp + ldDirCluster], ax 0 0000D77E 8956EE mov word [bp + ldDirCluster + 2], dx 3218 0 0000D781 C706[8605][1C14] mov word [handle_scan_dir_entry], list_dir_entry 0 0000D787 C706[8805][0000] mov word [handle_scan_dir_not_found], dmycmd 3221 0 0000D78D E96501 jmp scan_dir_aux 3223 3224 3225 list_dir_entry: 0 0000D790 26803D00 cmp byte [es:di], 0 0 0000D794 7503E91D01 je .ret ; (NC, ZR) 0 0000D799 26803DE5 cmp byte [es:di], 0E5h 0 0000D79D 7504 jne @F 0 0000D79F 80CB01 or bl, 1 ; (NC, NZ) 0 0000D7A2 C3 retn 3232 3233 @@: 0 0000D7A3 268A5D0B mov bl, byte [es:di + deAttrib] 0 0000D7A7 F6C308 test bl, ATTR_VOLLABEL 0 0000D7AA 7403E90401 jnz .ret_NC_NZ ; skip volume labels (and LFNs) --> (NZ) 3237 0 0000D7AF 26803D2E cmp byte [es:di], '.' ; dot or dotdot entry ? 0 0000D7B3 7503E9FB00 je .ret_NC_NZ ; yes, skip --> 3240 0 0000D7B8 50 push ax 0 0000D7B9 53 push bx 0 0000D7BA 51 push cx 0 0000D7BB 52 push dx 0 0000D7BC 56 push si 0 0000D7BD 57 push di 0 0000D7BE 06 push es 0 0000D7BF 1E push ds 0 0000D7C0 06 push es 0 0000D7C1 1F pop ds 0 0000D7C2 89FE mov si, di 3252 0 0000D7C4 16 push ss 0 0000D7C5 07 pop es 0 0000D7C6 BF[0000] mov di, line_out 0 0000D7C9 B90800 mov cx, 8 0 0000D7CC F3A4 rep movsb 0 0000D7CE B82020 mov ax, 2020h 0 0000D7D1 AA stosb 0 0000D7D2 B103 mov cl, 3 0 0000D7D4 F3A4 rep movsb 0 0000D7D6 AB stosw 3263 0 0000D7D7 1F pop ds 0 0000D7D8 B02D mov al, '-' 0 0000D7DA F6C320 test bl, ATTR_ARCHIVE 0 0000D7DD 7402 jz @F 0 0000D7DF B041 mov al, 'A' 3269 @@: 0 0000D7E1 AA stosb 0 0000D7E2 B02D mov al, '-' 0 0000D7E4 F6C302 test bl, ATTR_HIDDEN 0 0000D7E7 7402 jz @F 0 0000D7E9 B048 mov al, 'H' 3275 @@: 0 0000D7EB AA stosb 0 0000D7EC B02D mov al, '-' 0 0000D7EE F6C301 test bl, ATTR_READONLY 0 0000D7F1 7402 jz @F 0 0000D7F3 B052 mov al, 'R' 3281 @@: 0 0000D7F5 AA stosb 0 0000D7F6 B02D mov al, '-' 0 0000D7F8 F6C304 test bl, ATTR_SYSTEM 0 0000D7FB 7402 jz @F 0 0000D7FD B053 mov al, 'S' 3287 @@: 0 0000D7FF AA stosb 0 0000D800 B82020 mov ax, 2020h 0 0000D803 AB stosw 3291 0 0000D804 F6C310 test bl, ATTR_DIRECTORY 0 0000D807 7408 jz @F 0 0000D809 BE[0000] mov si, msg.dirinsteadsize 0 0000D80C E8[0000] call copy_single_counted_string 0 0000D80F EB2D jmp @FF 3297 3298 @@: 0 0000D811 07 pop es 0 0000D812 5E pop si 0 0000D813 56 push si 0 0000D814 06 push es 0 0000D815 268A440C mov al, byte [es:si + dePlusSize] 0 0000D819 88C4 mov ah, al 0 0000D81B 2507E0 and ax, 0E007h 0 0000D81E 88E2 mov dl, ah 0 0000D820 B400 mov ah, 0 0 0000D822 B600 mov dh, 0 0 0000D824 D1EA shr dx, 1 0 0000D826 D1EA shr dx, 1 0 0000D828 09D0 or ax, dx 0 0000D82A 50 push ax 0 0000D82B 268B541E mov dx, word [es:si + deSize + 2] 0 0000D82F 268B441C mov ax, word [es:si + deSize] 0 0000D833 5E pop si 0 0000D834 16 push ss 0 0000D835 07 pop es 0 0000D836 31C9 xor cx, cx 0 0000D838 BB0800 mov bx, 4+4 0 0000D83B E8[0000] call disp_dxax_times_cx_width_bx_size.store 3321 3322 @@: 0 0000D83E B82020 mov ax, 2020h 0 0000D841 AB stosw 0 0000D842 07 pop es 0 0000D843 5E pop si 0 0000D844 56 push si 0 0000D845 06 push es 0 0000D846 268B5C18 mov bx, word [es:si + deDate] 0 0000D84A 268B7416 mov si, word [es:si + deTime] 0 0000D84E 16 push ss 0 0000D84F 07 pop es 0 0000D850 89D8 mov ax, bx 0 0000D852 B90900 mov cx, 9 0 0000D855 D3E8 shr ax, cl 0 0000D857 05BC07 add ax, 1980 0 0000D85A 31D2 xor dx, dx 0 0000D85C B104 mov cl, 4 0 0000D85E E8[0000] call dec_dword_minwidth 0 0000D861 B02D mov al, '-' 0 0000D863 AA stosb 0 0000D864 89D8 mov ax, bx 0 0000D866 B105 mov cl, 5 0 0000D868 D3E8 shr ax, cl 0 0000D86A 83E00F and ax, 15 0 0000D86D B102 mov cl, 2 0 0000D86F E8[0000] call dec_dword_minwidth 0 0000D872 B02D mov al, '-' 0 0000D874 AA stosb 0 0000D875 89D8 mov ax, bx 0 0000D877 83E01F and ax, 31 0 0000D87A E8[0000] call dec_dword_minwidth 0 0000D87D B020 mov al, 32 0 0000D87F AA stosb 0 0000D880 89F0 mov ax, si 0 0000D882 B10B mov cl, 11 0 0000D884 D3E8 shr ax, cl 0 0000D886 B102 mov cl, 2 0 0000D888 E8[0000] call dec_dword_minwidth 0 0000D88B B03A mov al, ':' 0 0000D88D AA stosb 0 0000D88E 89F0 mov ax, si 0 0000D890 B105 mov cl, 5 0 0000D892 D3E8 shr ax, cl 0 0000D894 83E03F and ax, 63 0 0000D897 B102 mov cl, 2 0 0000D899 E8[0000] call dec_dword_minwidth 0 0000D89C B03A mov al, ':' 0 0000D89E AA stosb 0 0000D89F 89F0 mov ax, si 0 0000D8A1 83E01F and ax, 31 0 0000D8A4 D1E0 shl ax, 1 0 0000D8A6 E8[0000] call dec_dword_minwidth 3374 0 0000D8A9 E8[0000] call putsline_crlf 3376 0 0000D8AC 07 pop es 0 0000D8AD 5F pop di 0 0000D8AE 5E pop si 0 0000D8AF 5A pop dx 0 0000D8B0 59 pop cx 0 0000D8B1 5B pop bx 0 0000D8B2 58 pop ax 3384 3385 .ret_NC_NZ: 0 0000D8B3 80CB01 or bl, 1 ; (NC, NZ) 3387 .ret: 0 0000D8B6 C3 retn 3389 3390 3391 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 3391 ------------------ note: usesection lDEBUG_DATA_ENTRY 3392 3393 align 2, db 0 3394 %if _LOADER 3395 loader_lowest_free: 3396 dw 0 3397 %endif 3398 handle_scan_dir_entry: 0 00006146 [0000] dw error 3400 handle_scan_dir_not_found: 0 00006148 [0000] dw error 3402 3403 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 3403 ------------------ note: usesection lDEBUG_CODE 3404 3405 scan_dir_entry_dir_or_file: 0 0000D8B7 B701 mov bh, 1 0 0000D8B9 A9 db __TEST_IMM16 ; (skip mov) 3408 3409 scan_dir_entry: 0 0000D8BA B700 mov bh, 0 0 0000D8BC 26803D00 cmp byte [es:di], 0 0 0000D8C0 F9 stc 0 0000D8C1 7425 je .ret 0 0000D8C3 268A5D0B mov bl, byte [es:di + deAttrib] 0 0000D8C7 F6C308 test bl, ATTR_VOLLABEL 0 0000D8CA 751B jnz @F ; skip volume labels (and LFNs) --> (NZ) 0 0000D8CC 84FF test bh, bh 0 0000D8CE 7509 jnz .no_check_dir 0 0000D8D0 80E310 and bl, ATTR_DIRECTORY ; isolate directory bit 0 0000D8D3 3A1E[3B05] cmp bl, byte [load_check_dir_attr] ; is it what we're searching? 0 0000D8D7 750E jne @F ; no --> 3422 .no_check_dir: 0 0000D8D9 56 push si 0 0000D8DA 57 push di 0 0000D8DB 51 push cx 0 0000D8DC BE[4005] mov si, load_kernel_name ; ds:si-> name to match 0 0000D8DF B90B00 mov cx, 11 ; length of padded 8.3 FAT filename 0 0000D8E2 F3A6 repe cmpsb ; check entry 0 0000D8E4 59 pop cx 0 0000D8E5 5F pop di 0 0000D8E6 5E pop si 3432 @@: 0 0000D8E7 F8 clc 3434 .ret: 0 0000D8E8 C3 retn 3436 3437 3438 ; INP: es:bx -> where to place directory entry 3439 ; si:di = loaded FAT sector (0 = first FAT sector) 3440 ; dword [bp + ldDirCluster] = directory cluster to scan, 3441 ; 0 for root dir 3442 ; byte [bp + ldFATType] = size of FAT entry in bits 3443 ; OUT: es:bx -> directory entry (es:bx unchanged) 3444 ; si:di = loaded FAT sector 3445 ; CHG: dx, ax, si, di, cx 3446 scan_dir_aux_for_file: 0 0000D8E9 C706[8605][4615] mov word [handle_scan_dir_entry], scan_dir_entry 3448 3449 scan_dir_aux_with_error: 0 0000D8EF C706[8805][D915] mov word [handle_scan_dir_not_found], error_filenotfound 3451 3452 scan_dir_aux: section_of_function 0 0000D8F5 FF36[0000] push word [auxbuff_segorsel] 0 0000D8F9 8F06[5805] pop word [load_adr_dirbuf_segment] 3455 3456 scan_dir: 0 0000D8FD 8B46EC mov ax, word [bp + ldDirCluster] 0 0000D900 8B56EE mov dx, word [bp + ldDirCluster + 2] 3459 0 0000D903 85C0 test ax, ax 0 0000D905 7572 jnz fat32_scan_root.dir_clust_dxax 0 0000D907 85D2 test dx, dx 0 0000D909 756E jnz fat32_scan_root.dir_clust_dxax 3464 3465 ; got to scan root directory. use FAT12/FAT16 walker if so, 3466 ; else use FAT32 walker 3467 0 0000D90B 807EE610 cmp byte [bp + ldFATType], 16 0 0000D90F 7762 ja fat32_scan_root 3470 0 0000D911 56 push si 0 0000D912 57 push di 0 0000D913 06 push es 0 0000D914 53 push bx 3475 0 0000D915 8B7611 mov si, word [bp + bsBPB + bpbNumRootDirEnts] 3477 3478 3479 ; (boot.asm code starts here) 3480 3481 fat16_scan_root: 0 0000D918 85F6 test si, si 0 0000D91A 7424 jz handle_filenotfound_fat16 3484 0 0000D91C 8B46D0 mov ax, [bp + ldRootSector] 0 0000D91F 8B56D2 mov dx, [bp + ldRootSector + 2] 3487 3488 ; Scan root directory for file. We don't bother to check for deleted 3489 ; entries (E5h) or entries that mark the end of the directory (00h). 3490 ; number of root entries in si here 3491 fat16_next_sect: 0 0000D922 8B1E[5805] mov bx, [load_adr_dirbuf_segment] 0 0000D926 E88D05 call read_sector 3494 0 0000D929 8B4ED4 mov cx, [bp + ldEntriesPerSector] ; entries per sector as loop counter 0 0000D92C 31FF xor di, di ; es:di-> first entry in this sector 3497 fat16_next_ent: 0 0000D92E FF16[8605] call near word [handle_scan_dir_entry] 3499 ..@boot_scan_dir_return_fat16_root_entry: 0 0000D932 720C jc handle_filenotfound_fat16 0 0000D934 8D7D20 lea di, [di + DIRENTRY_size] ; bytes/dirent 0 0000D937 7423 je fat16_found_it ; found entry --> 3503 0 0000D939 4E dec si ; count down entire root's entries 0 0000D93A E0F2 loopnz fat16_next_ent ; count down sector's entries (jumps iff si >0 && cx >0) 0 0000D93C 85F6 test si, si ; work around qemu bug 0 0000D93E 75E2 jnz fat16_next_sect ; (jumps iff si >0 && cx ==0) 3508 ; ends up here iff si ==0 3509 ; ie all root entries checked unsuccessfully 3510 %if 0 3511 3512 qemu prior to 2020-08 has a bug which affects the above 3513 conditionals. The bug is that if NZ is set (like when the 3514 branch to fat16_found_it is not taken) and then another 3515 instruction sets ZR (like the dec si at the end of the root 3516 directory) and then loopnz is used which sets cx to zero 3517 then after the loopnz FL will be NZ leading to the jnz branch 3518 to be taken. Eventually the entire load unit is traversed and 3519 qemu returns error 01h when trying to read past the end of 3520 the unit (at least for 1440 KiB diskettes). 3521 3522 The bug is now worked around by the comparison with zero at 3523 the fat16_next_ent label. The test si, si serves as another 3524 workaround to forcibly set the flag correctly after loopnz. 3525 It is only really needed when the entire root is filled with 3526 non-zero directory entries and an older qemu is used. 3527 3528 Reference: https://bugs.launchpad.net/qemu/+bug/1888165 3529 3530 %endif 3531 3532 handle_filenotfound_fat16: 0 0000D940 5B pop bx 0 0000D941 07 pop es 0 0000D942 5F pop di 0 0000D943 5E pop si 3537 0 0000D944 A9 db __TEST_IMM16 ; (skip pop and pop) 3539 handle_filenotfound_fat32: 0 0000D945 5B pop bx 0 0000D946 07 pop es 3542 3543 handle_filenotfound: 0 0000D947 FF16[8805] call near word [handle_scan_dir_not_found] 3545 ..@boot_scan_dir_return_filenotfound: 0 0000D94B F9 stc 0 0000D94C C3 retn 3548 3549 error_filenotfound: 3550 %if _INPUT_FILE_BOOT 0 0000D94D E87209 call yy_boot_file_not_found 3552 %endif 0 0000D950 BA[0000] mov dx, msg.boot_file_not_found 0 0000D953 B81E02 mov ax, 021Eh 0 0000D956 E8[0000] call setrc 0 0000D959 E90CEF jmp bootcmd.fail 3557 3558 fat16_found_it: 0 0000D95C 5B pop bx 0 0000D95D 58 pop ax 0 0000D95E B92000 mov cx, 32 0 0000D961 29CF sub di, cx 0 0000D963 1E push ds 0 0000D964 06 push es 0 0000D965 1F pop ds 0 0000D966 89FE mov si, di ; ds:si -> entry in directory buffer 0 0000D968 89DF mov di, bx 0 0000D96A 8EC0 mov es, ax ; es:di -> destination for entry 0 0000D96C F3A4 rep movsb 0 0000D96E 1F pop ds 0 0000D96F 5F pop di 0 0000D970 5E pop si 0 0000D971 F8 clc 0 0000D972 C3 retn 3575 3576 3577 ; (boot32.asm code starts here) 3578 3579 fat32_scan_root: 0 0000D973 8B462C mov ax, [bp + bsBPB + ebpbRootCluster] 0 0000D976 8B562E mov dx, [bp + bsBPB + ebpbRootCluster + 2] 3582 3583 .dir_clust_dxax: 0 0000D979 06 push es 0 0000D97A 53 push bx 3586 0 0000D97B E88001 call check_clust 0 0000D97E 72C5 jc handle_filenotfound_fat32 3589 3590 fat32_next_root_clust: 0 0000D980 E85000 call clust_to_first_sector 0 0000D983 51 push cx 0 0000D984 53 push bx 0 0000D985 8B4EE8 mov cx, [bp + ldClusterSize] 3595 fat32_next_root_sect: 0 0000D988 51 push cx 0 0000D989 8B4ED4 mov cx, [bp + ldEntriesPerSector] 3598 3599 ; Scan root directory for file. We don't bother to check for deleted 3600 ; entries (E5h) or entries that mark the end of the directory (00h). 0 0000D98C 8B1E[5805] mov bx, [load_adr_dirbuf_segment] 0 0000D990 E82305 call read_sector 3603 0 0000D993 57 push di 0 0000D994 31FF xor di, di ; es:di-> first entry in this sector 3606 fat32_next_ent: 0 0000D996 FF16[8605] call near word [handle_scan_dir_entry] 3608 ..@boot_scan_dir_return_subdir_or_fat32_entry: 0 0000D99A 7214 jc handle_filenotfound_fat32_pop 0 0000D99C 8D7D20 lea di, [di + DIRENTRY_size] ; bytes/dirent 0 0000D99F 7415 je fat32_found_it ; found entry --> 3612 0 0000D9A1 E2F3 loop fat32_next_ent ; count down sector's entries (jumps iff cx >0) 0 0000D9A3 5F pop di 0 0000D9A4 59 pop cx 0 0000D9A5 E2E1 loop fat32_next_root_sect 0 0000D9A7 5B pop bx 0 0000D9A8 59 pop cx 0 0000D9A9 E85000 call clust_next 0 0000D9AC 73D2 jnc fat32_next_root_clust 0 0000D9AE EB04 jmp @F 3622 3623 handle_filenotfound_fat32_pop: 0 0000D9B0 5F pop di 0 0000D9B1 59 pop cx 0 0000D9B2 5B pop bx 0 0000D9B3 59 pop cx 3628 @@: 0 0000D9B4 EB8F jmp handle_filenotfound_fat32 3630 3631 3632 fat32_found_it: 0 0000D9B6 5A pop dx ; value for di 0 0000D9B7 83C406 add sp, 6 ; discard sector-in-cluster counter and cluster 0 0000D9BA 5B pop bx 0 0000D9BB 58 pop ax 0 0000D9BC B92000 mov cx, 32 0 0000D9BF 29CF sub di, cx 0 0000D9C1 1E push ds 0 0000D9C2 06 push es 0 0000D9C3 1F pop ds 0 0000D9C4 56 push si 0 0000D9C5 89FE mov si, di ; ds:si -> entry in directory buffer 0 0000D9C7 89DF mov di, bx 0 0000D9C9 8EC0 mov es, ax ; es:di -> destination for entry 0 0000D9CB F3A4 rep movsb 0 0000D9CD 5E pop si 0 0000D9CE 1F pop ds 0 0000D9CF 89D7 mov di, dx ; restore si:di = loaded FAT sector 0 0000D9D1 F8 clc 0 0000D9D2 C3 retn 3652 3653 3654 ; (iniload.asm code continues here) 3655 3656 ; INP: dx:ax = cluster - 2 (0-based cluster) 3657 ; OUT: cx:bx = input dx:ax 3658 ; dx:ax = first sector of that cluster 3659 ; CHG: - 3660 clust_to_first_sector: 0 0000D9D3 52 push dx 0 0000D9D4 50 push ax 0 0000D9D5 52 push dx 0 0000D9D6 F726[E801] mul word [load_data - LOADDATA2 + ldClusterSize] 0 0000D9DA 93 xchg bx, ax 0 0000D9DB 87CA xchg cx, dx 0 0000D9DD 58 pop ax 0 0000D9DE F726[E801] mul word [load_data - LOADDATA2 + ldClusterSize] 0 0000D9E2 85D2 test dx, dx 0 0000D9E4 7513 jnz .error_badchain 0 0000D9E6 92 xchg dx, ax 0 0000D9E7 01CA add dx, cx 0 0000D9E9 720E jc .error_badchain 0 0000D9EB 93 xchg ax, bx 3675 0 0000D9EC 0306[FC01] add ax, [load_data - LOADDATA2 + lsvDataStart] 0 0000D9F0 1316[FE01] adc dx, [load_data - LOADDATA2 + lsvDataStart + 2] 0 0000D9F4 7203 jc .error_badchain 3679 ; dx:ax = first sector in cluster 0 0000D9F6 5B pop bx 0 0000D9F7 59 pop cx ; cx:bx = cluster 0 0000D9F8 C3 retn 3683 3684 .error_badchain: 0 0000D9F9 E9800F jmp error_badchain 3686 3687 3688 ; INP: cx:bx = cluster (0-based) 3689 ; si:di = loaded FAT sector, -1 if none 3690 ; OUT: CY if no next cluster 3691 ; NC if next cluster found, 3692 ; dx:ax = next cluster value (0-based) 3693 ; si:di = loaded FAT sector 3694 ; CHG: cx, bx 3695 clust_next: 0 0000D9FC 89D8 mov ax, bx 0 0000D9FE 89CA mov dx, cx 3698 .dxax: 0 0000DA00 83C002 add ax, 2 0 0000DA03 83D200 adc dx, 0 3701 0 0000DA06 06 push es 0 0000DA07 803E[E601]10 cmp byte [load_data - LOADDATA2 + ldFATType], 16 0 0000DA0C 7503 jne @F 0 0000DA0E E98800 jmp strict near .fat16 3706 @@: 0 0000DA11 7603 jna @F 0 0000DA13 E97F00 jmp strict near .fat32 3709 @@: 3710 3711 .fat12: 3712 ; FAT12 entries are 12 bits, bytes are 8 bits. Ratio is 3 / 2, 3713 ; so multiply cluster number by 3 first, then divide by 2. 3714 ; ax = cluster number (up to 12 bits set) 0 0000DA16 89C2 mov dx, ax 0 0000DA18 D1E0 shl ax, 1 ; = 2n (up to 13 bits set) 0 0000DA1A 01D0 add ax, dx ; = 2n+n = 3n (up to 14 bits set) 0 0000DA1C D1E8 shr ax, 1 ; ax = byte offset into FAT (0..6129) 3719 ; CF = whether to use high 12 bits 0 0000DA1E 19C9 sbb cx, cx ; = -1 iff CY, else 0 3721 3722 ; Use the calculated byte offset as an offset into the FAT 3723 ; buffer, which holds all of the FAT's relevant data. 0 0000DA20 8E06[F801] mov es, [load_data - LOADDATA2 + lsvFATSeg] 0 0000DA24 89C3 mov bx, ax ; -> 16-bit word in FAT to load 3726 0 0000DA26 F606[E701]02 test byte [load_ldflags], ldfFATInvalid 0 0000DA2B 7459 jz .fat12_have_fat ; already have it --> 0 0000DA2D 51 push cx 0 0000DA2E 31D2 xor dx, dx 0 0000DA30 F736[0B02] div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 3732 ; dx = remainder, byte offset 3733 ; ax = sector to read 0 0000DA34 52 push dx 0 0000DA35 31D2 xor dx, dx 0 0000DA37 8B1E[F801] mov bx, [load_data - LOADDATA2 + lsvFATSeg] 3737 0 0000DA3B F606[E701]04 testopt [load_ldflags], ldfFATBuffered 0 0000DA40 742A jz .12_notbuffered 0 0000DA42 8B36[F601] mov si, word [load_data - LOADDATA2 + lsvFATSector + 2] 0 0000DA46 8B3E[F401] mov di, word [load_data - LOADDATA2 + lsvFATSector + 0] 3742 ; jmp .12_compare 3743 .12_compare: 0 0000DA4A 39F2 cmp dx, si 0 0000DA4C 7513 jne @F ; read sector 0 0000DA4E 39F8 cmp ax, di 0 0000DA50 750F jne @F ; read sector 3748 ; sector is already buffered 0 0000DA52 8EC3 mov es, bx ; => FAT buffer 0 0000DA54 F9 stc 0 0000DA55 1306[0E02] adc ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 0 0000DA59 11D2 adc dx, dx ; prepare for reading straddling entry sector 0 0000DA5B 031E[EA01] add bx, word [load_sectorsizepara] 3754 ; prepare for straddling sector 0 0000DA5F EB14 jmp @FF 3756 @@: 0 0000DA61 89D6 mov si, dx 0 0000DA63 89C7 mov di, ax 0 0000DA65 8916[F601] mov word [load_data - LOADDATA2 + lsvFATSector + 2], dx 0 0000DA69 A3[F401] mov word [load_data - LOADDATA2 + lsvFATSector + 0], ax 3761 3762 .12_notbuffered: 0 0000DA6C 0306[0E02] add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 0 0000DA70 11D2 adc dx, dx 0 0000DA72 E84104 call read_sector 3766 @@: 0 0000DA75 59 pop cx 0 0000DA76 41 inc cx 0 0000DA77 3B0E[0B02] cmp cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000DA7B 7505 jne .fat12_have_fat_cx_dec 0 0000DA7D 06 push es 0 0000DA7E E83504 call read_sector ; read second sector for straddling entry 0 0000DA81 07 pop es 3774 3775 .fat12_have_fat_cx_dec: 0 0000DA82 49 dec cx 0 0000DA83 89CB mov bx, cx 0 0000DA85 59 pop cx 3779 3780 .fat12_have_fat: 3781 3782 ; get 16 bits from FAT 0 0000DA86 268B07 mov ax, [es:bx] 3784 0 0000DA89 80E104 and cl, 4 ; = 4 iff CY after shift, else 0 0 0000DA8C D3E8 shr ax, cl ; shift down iff odd entry, else unchanged 0 0000DA8E 25FF0F and ax, 0FFFh ; insure it's only 12 bits 0 0000DA91 31D2 xor dx, dx 0 0000DA93 EB68 jmp short .gotvalue 3790 3791 .fat32: 3792 ; * 4 = byte offset into FAT (0--4000_0000h) 0 0000DA95 01C0 add ax, ax 0 0000DA97 11D2 adc dx, dx 3795 .fat16: 3796 ; * 2 = byte offset into FAT (0--2_0000h) 0 0000DA99 01C0 add ax, ax 0 0000DA9B 11D2 adc dx, dx 3799 0 0000DA9D 50 push ax 0 0000DA9E 92 xchg ax, dx 0 0000DA9F 31D2 xor dx, dx ; dx:ax = high word 0 0000DAA1 F736[0B02] div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000DAA5 89C3 mov bx, ax 0 0000DAA7 58 pop ax ; dx = remainder, ax = low word 0 0000DAA8 F736[0B02] div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000DAAC 87D3 xchg dx, bx ; dx:ax = result, bx = remainder 3808 ; dx:ax = sector offset into FAT (0--200_0000h) 3809 ; bx = byte offset into FAT sector (0--8190) 0 0000DAAE F606[E701]04 testopt [load_ldflags], ldfFATBuffered 0 0000DAB3 740A jz .1632_notbuffered 0 0000DAB5 8B36[F601] mov si, word [load_data - LOADDATA2 + lsvFATSector + 2] 0 0000DAB9 8B3E[F401] mov di, word [load_data - LOADDATA2 + lsvFATSector + 0] 0 0000DABD EB07 jmp .1632_compare 3815 3816 .1632_notbuffered: 0 0000DABF F606[E701]02 test byte [load_ldflags], ldfFATInvalid 0 0000DAC4 7513 jnz .read_no_store ; always read --> 3819 3820 .1632_compare: 0 0000DAC6 39F2 cmp dx, si 0 0000DAC8 7504 jne @F ; read sector 0 0000DACA 39F8 cmp ax, di 0 0000DACC 741B je @FF ; sector is already buffered 3825 @@: 0 0000DACE 89D6 mov si, dx 0 0000DAD0 89C7 mov di, ax 0 0000DAD2 8916[F601] mov word [load_data - LOADDATA2 + lsvFATSector + 2], dx 0 0000DAD6 A3[F401] mov word [load_data - LOADDATA2 + lsvFATSector + 0], ax 3830 3831 .read_no_store: 0 0000DAD9 53 push bx 0 0000DADA 0306[0E02] add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 0 0000DADE 83D200 adc dx, 0 0 0000DAE1 8B1E[F801] mov bx, [load_data - LOADDATA2 + lsvFATSeg] 0 0000DAE5 E8CE03 call read_sector 0 0000DAE8 5B pop bx 3838 @@: 0 0000DAE9 8E06[F801] mov es, [load_data - LOADDATA2 + lsvFATSeg] 0 0000DAED 31D2 xor dx, dx 0 0000DAEF 268B07 mov ax, [es:bx] 3842 0 0000DAF2 803E[E601]10 cmp byte [load_data - LOADDATA2 + ldFATType], 16 0 0000DAF7 7404 je @F 0 0000DAF9 268B5702 mov dx, [es:bx + 2] 3846 @@: 3847 .gotvalue: 0 0000DAFD 07 pop es 3849 3850 ; INP: dx:ax = cluster value, 2-based 3851 ; OUT: dx:ax -= 2 (makes it 0-based) 3852 ; CY iff invalid cluster 3853 check_clust: 0 0000DAFE 80E60F and dh, 0Fh 0 0000DB01 83E802 sub ax, 2 0 0000DB04 83DA00 sbb dx, 0 3857 0 0000DB07 803E[E601]10 cmp byte [load_data - LOADDATA2 + ldFATType], 16 0 0000DB0C 7707 ja .fat32 0 0000DB0E 740B je .fat16 3861 3862 .fat12: 0 0000DB10 3DF50F cmp ax, 0FF7h - 2 0 0000DB13 EB09 jmp short .common 3865 3866 .fat32: 0 0000DB15 81FAFF0F cmp dx, 0FFFh 0 0000DB19 7203 jb @F ; CY here means valid ...- 3869 3870 .fat16: 0 0000DB1B 83F8F5 cmp ax, 0FFF7h - 2 3872 @@: ; -... or if NC first, CY here also 3873 .common: 0 0000DB1E F5 cmc ; NC if valid 0 0000DB1F 720E jc .ret 0 0000DB21 3B16[C201] cmp dx, word [load_data - LOADDATA2 + ldMaxCluster + 2] 0 0000DB25 7504 jne @F 0 0000DB27 3B06[C001] cmp ax, word [load_data - LOADDATA2 + ldMaxCluster] 3879 @@: 0 0000DB2B 7701 ja .ret_CY 0 0000DB2D A8 db __TEST_IMM8 ; (skip stc, NC) 3882 .ret_CY: 0 0000DB2E F9 stc 3884 .ret: 0 0000DB2F C3 retn 3886 3887 3888 partition_table equ load_partition_table 3889 partition_table.end equ load_partition_table.end 3890 %define _SCANPTAB_PREFIX 3891 %define _SCANPTAB_DEBUG4_PREFIX 3892 %assign _PARTITION_TABLE_IN_CS 0 3893 %define _BASE bp 3894 %include "scanptab.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> scanptab - Scan partition table 5 <1> 2019, 2025 by E. C. Masloch 6 <1> 7 <1> Usage of the works is permitted provided that this 8 <1> instrument is retained with the works, so that any entity 9 <1> that uses the works is notified of this instrument. 10 <1> 11 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 12 <1> 13 <1> %endif 14 <1> 15 <1> ; _SCANPTAB_PREFIX = prefix for our variables and functions 16 <1> ; _SCANPTAB_DEBUG4_PREFIX = prefix for d4 function calls 17 <1> numdef PARTITION_TABLE_IN_CS, 1 18 <1> numdef BOOTCMD_FAIL_ERROR, 1 19 <1> numdef SPT_ELD, 0 20 <1> numdef SPT_MULTIPASS, 0 21 <1> %if _SPT_ELD 22 <1> %define sptrel reloc 23 <1> %define sptinternal internaldatarelocation 24 <1> %define sptexternal linkdatarelocation 25 <1> numdef MODE, 1 26 <1> %else 27 <1> %define sptrel 28 <1> %define sptinternal comment 29 <1> %define sptexternal comment 30 <1> numdef MODE, 0 31 <1> %endif 32 <1> gendef BASE, ss:bx 33 <1> %ifidn _BASE, ss:bx 34 <1> %elifidn _BASE, bp 35 <1> %else 36 <1> %error Invalid base 37 <1> %endif 38 <1> 39 <1> %if _MODE 40 <1> %include "scanptab.mac" 41 <1> %endif 42 <1> 43 <1> 44 <1> ; INP: byte [%load_unit] = unit to scan 45 <1> ; cx = function to call for each partition 46 <1> ; OUT: function called for each partition 47 <1> ; CHG: di, si, ax, bx, (cx), dx, es 48 <1> ; STT: ds => data segment (used for %load_* variables, unless bp-based) 49 <1> ; 50 <1> ; Note: Calls %read_partition_table (in this module), 51 <1> ; which calls %read_ae_512_bytes, which calls 52 <1> ; read_sector. The read_sector base must be 53 <1> ; zero and the geometry must be initialised. 54 <1> 55 <1> ; Function in cx is called with: 56 <1> ; INP: es:si -> partition table entry, 57 <1> ; si = %partition_table .. %partition_table+48, 58 <1> ; es = ss (if not _PARTITION_TABLE_IN_CS) 59 <1> ; es = cs (if _PARTITION_TABLE_IN_CS) 60 <1> ; byte [%load_current_partition] = partition number, 61 <1> ; 0 for diskette (unpartitioned), 62 <1> ; 1 to 4 for primary partitions, 63 <1> ; 5+ for logical partitions 64 <1> ; _BASE + di -> above part table metadata, 65 <1> ; dword [_BASE + di - 4] = root (outermost extended position) 66 <1> ; dword [_BASE + di - 8] = base (current table position) 67 <1> ; dword [es:si + piStart] = local partition start 68 <1> ; base + local start = absolute partition start 69 <1> ; _BASE -> bp value (dummy if _BASE is not bp), 70 <1> ; near return address of scan_partitions 71 <1> ; CHG: ax, (cx), dx, bx (unless part of _BASE) 72 <1> ; STT: ds => data segment (used for load_* variables, unless bp-based) 73 <1> ; Note: preserves (cx), si, di, ds, es, (bp), _BASE 74 <1> ; 75 <1> ; Note: If the function returns to scan_partitions, 76 <1> ; cx must be left as the function to call for 77 <1> ; subsequent partitions afterwards. 78 <1> ; Note: May load sp from _BASE then pop bp then return 79 <1> ; near if the scan should stop after the call. 80 <1> %if _SPT_MULTIPASS 81 <1> %[_SCANPTAB_PREFIX]scan_priority_primary: 82 <1> %else 83 <1> %[_SCANPTAB_PREFIX]scan_partitions: 84 <1> %endif 0 0000DB30 8326[3005]00 sptrel and word [ %[_SCANPTAB_PREFIX]load_partition_cycle], 0 86 <1> sptinternal -3 87 <1> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 88 <1> d4 asciz "In scan_partitions",13,10 89 <1> 0 0000DB35 55 push bp 91 <1> %ifidn _BASE, ss:bx 92 <1> mov bx, sp 93 <1> %elifidn _BASE, bp 0 0000DB36 89E5 mov bp, sp 95 <1> %endif 0 0000DB38 31FF xor di, di 0 0000DB3A 57 push di ; [_BASE+di-2] 0 0000DB3B 57 push di ; [_BASE+di-4] 0 0000DB3C 57 push di ; [_BASE+di-6] 0 0000DB3D 57 push di ; [_BASE+di-8] 101 <1> %if _MODE 102 <1> sptrel mov word [ %[_SCANPTAB_PREFIX]load_scan_flags ], di 103 <1> sptinternal 104 <1> %endif 105 <1> 0 0000DB3E 803E[4002]80 sptrel cmp byte [ %[_SCANPTAB_PREFIX]load_unit], 80h 107 <1> sptinternal -3 0 0000DB43 7325 jae @F 109 <1> 0 0000DB45 57 push di 0 0000DB46 51 push cx 112 <1> %if _PARTITION_TABLE_IN_CS 113 <1> push cs 114 <1> %else 0 0000DB47 16 push ss 116 <1> %endif 0 0000DB48 07 pop es 0 0000DB49 BF[0001] sptrel mov di, %[_SCANPTAB_PREFIX]partition_table 119 <1> sptinternal 0 0000DB4C 31C0 xor ax, ax 0 0000DB4E B92000 mov cx, (4 * 16) >> 1 0 0000DB51 F3AB rep stosw ; initialise fake partition table 0 0000DB53 59 pop cx 0 0000DB54 5F pop di 0 0000DB55 BE[0001] sptrel mov si, %[_SCANPTAB_PREFIX]partition_table 126 <1> sptinternal 127 <1> ; -> fake PARTINFO 0 0000DB58 26C60480 mov byte [es:si + piBoot], 80h ; fake primary active 0 0000DB5C 26C64404FF mov byte [es:si + piType], 0FFh ; fake a type 0 0000DB61 C606[3905]00 sptrel mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], 0 ; special: 0 = diskette 131 <1> sptinternal -3 ; piLength is 0, too 0 0000DB66 FFD1 call cx 133 <1> 0 0000DB68 EB66 jmp %[_SCANPTAB_PREFIX]scan_logical.end 135 <1> 136 <1> 137 <1> @@: 138 <1> %if _SPT_MULTIPASS 139 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_mode ], mode_active_priority 140 <1> sptinternal -3 ; active primary first ? 141 <1> jz .end 142 <1> %endif 143 <1> 0 0000DB6A 31C0 xor ax, ax 0 0000DB6C 31D2 xor dx, dx 146 <1> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 147 <1> d4 asciz "In scan_partitions (before first call to read_partition_table)",13,10 0 0000DB6E E8DA00 call %[_SCANPTAB_PREFIX]read_partition_table.first 149 <1> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 150 <1> d4 asciz "In scan_partitions (after first call to read_partition_table)",13,10 0 0000DB71 BE[0001] sptrel mov si, %[_SCANPTAB_PREFIX]partition_table 152 <1> sptinternal 0 0000DB74 8816[3905] sptrel mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], dl ; = 0 154 <1> sptinternal 155 <1> %if _SPT_ELD 156 <1> sptrel mov word [ %[_SCANPTAB_PREFIX]load_current_extended_and_is], dx ; = 0 157 <1> sptinternal 158 <1> %endif 159 <1> 160 <1> %if _MODE 161 <1> %ifn _SPT_MULTIPASS 162 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_mode ], mode_active_priority 163 <1> sptinternal -3 ; active primary first ? 164 <1> jz .active_ignored 165 <1> %endif 166 <1> 167 <1> .loop_active_primary: 168 <1> 169 <1> sptrel inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 170 <1> sptinternal 171 <1> mov al, byte [es:si + piType] 172 <1> cmp al, 0 173 <1> je .loop_active_primary_skip 174 <1> cmp byte [es:si + piBoot], 0 175 <1> je .loop_active_primary_skip 176 <1> 177 <1> ; INP: al = partition type 178 <1> ; OUT: CY if an LBA or FAT32 type that's disabled 179 <1> ; NC, ZR if known type we can access 180 <1> ; NC, NZ if unknown type 181 <1> call %[_SCANPTAB_PREFIX]load_is_known 182 <1> jc .loop_active_primary_skip 183 <1> jnz .loop_active_primary_skip 184 <1> 185 <1> call cx ; es:si -> partition table entry 186 <1> ; byte [load_current_partition] = which 187 <1> jmp .active_done 188 <1> 189 <1> .loop_active_primary_skip: 190 <1> add si, 16 191 <1> sptrel cmp si, strict word %[_SCANPTAB_PREFIX]partition_table.end 192 <1> sptinternal 193 <1> jb .loop_active_primary 194 <1> 195 <1> .active_done: 196 <1> %if _SPT_MULTIPASS 197 <1> .end: 198 <1> %ifidn _BASE, bp 199 <1> mov sp, bp ; restore sp 200 <1> pop bp 201 <1> %else 202 <1> mov sp, bx ; restore sp 203 <1> pop ax ; (discard dummy bp value) 204 <1> %endif 205 <1> retn ; and bye 206 <1> 207 <1> 208 <1> %[_SCANPTAB_PREFIX]scan_early_primary: 209 <1> sptrel and word [ %[_SCANPTAB_PREFIX]load_partition_cycle], 0 210 <1> sptinternal -3 211 <1> 212 <1> push bp 213 <1> %ifidn _BASE, ss:bx 214 <1> mov bx, sp 215 <1> %elifidn _BASE, bp 216 <1> mov bp, sp 217 <1> %endif 218 <1> xor di, di 219 <1> push di ; [_BASE+di-2] 220 <1> push di ; [_BASE+di-4] 221 <1> push di ; [_BASE+di-6] 222 <1> push di ; [_BASE+di-8] 223 <1> xor ax, ax 224 <1> xor dx, dx 225 <1> 226 <1> %if _MODE 227 <1> sptrel mov word [ %[_SCANPTAB_PREFIX]load_scan_flags ], ax 228 <1> sptinternal 229 <1> %endif 230 <1> 231 <1> call %[_SCANPTAB_PREFIX]read_partition_table.first 232 <1> sptrel mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], dl ; = 0 233 <1> sptinternal 234 <1> %if _SPT_ELD 235 <1> sptrel mov word [ %[_SCANPTAB_PREFIX]load_current_extended_and_is], dx ; = 0 236 <1> sptinternal 237 <1> %endif 238 <1> %else 239 <1> sptrel mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], 0 240 <1> sptinternal -3 241 <1> %endif 242 <1> sptrel mov si, %[_SCANPTAB_PREFIX]partition_table 243 <1> sptinternal 244 <1> 245 <1> 246 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_mode ], mode_active_priority 247 <1> sptinternal -3 ; active primary first ? 248 <1> jz .active_ignored 249 <1> 250 <1> .loop_active_skip: 251 <1> 252 <1> sptrel inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 253 <1> sptinternal 254 <1> mov al, byte [es:si + piType] 255 <1> cmp al, 0 256 <1> je .loop_active_skip_skip 257 <1> cmp byte [es:si + piBoot], 0 258 <1> je .loop_active_skip_skip 259 <1> 260 <1> ; INP: al = partition type 261 <1> ; OUT: CY if an LBA or FAT32 type that's disabled 262 <1> ; NC, ZR if known type we can access 263 <1> ; NC, NZ if unknown type 264 <1> call %[_SCANPTAB_PREFIX]load_is_known 265 <1> jc .loop_active_skip_skip 266 <1> jnz .loop_active_skip_skip 267 <1> sptrel mov al, byte [ %[_SCANPTAB_PREFIX]load_current_partition] 268 <1> sptinternal 269 <1> sptrel mov byte [ %[_SCANPTAB_PREFIX]load_scan_flags + 1], al 270 <1> sptinternal 271 <1> sptrel setopt [ %[_SCANPTAB_PREFIX]load_scan_flags ], 32 272 <1> sptinternal -3 ; mark as had a primary partition yet 273 <1> jmp .active_skip_done 274 <1> 275 <1> .loop_active_skip_skip: 276 <1> add si, 16 277 <1> sptrel cmp si, strict word %[_SCANPTAB_PREFIX]partition_table.end 278 <1> sptinternal 279 <1> jb .loop_active_skip 280 <1> 281 <1> .active_skip_done: 282 <1> sptrel mov si, %[_SCANPTAB_PREFIX]partition_table 283 <1> sptinternal 284 <1> sptrel mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], 0 285 <1> sptinternal -3 286 <1> 287 <1> %endif 288 <1> 289 <1> .active_ignored: 290 <1> .loop_primary_parts: 0 0000DB78 FE06[3905] sptrel inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 292 <1> sptinternal 0 0000DB7C 26807C0400 cmp byte [es:si + piType], 0 0 0000DB81 7402 je .loop_primary_skip 295 <1> 296 <1> %if _MODE 297 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_mode ], mode_active_priority 298 <1> sptinternal -3 ; active primary first ? 299 <1> jz @F ; no --> 300 <1> sptrel mov al, byte [ %[_SCANPTAB_PREFIX]load_current_partition] 301 <1> sptinternal 302 <1> sptrel cmp byte [ %[_SCANPTAB_PREFIX]load_scan_flags + 1], al 303 <1> sptinternal 304 <1> je .ignoreprimary 305 <1> @@: 306 <1> 307 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_scan_flags ], 32 308 <1> sptinternal -3 ; had a primary partition yet ? 309 <1> jz .callprimary ; no, accept it --> 310 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_mode ], mode_ignore_subsequent_primary 311 <1> sptinternal -3 ; ignore subsequent primary ? 312 <1> jnz .ignoreprimary ; yes, ignore it --> 313 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_mode ], mode_subsequent_primary_after 314 <1> sptinternal -3 ; subsequent after ? 315 <1> jnz .ignoreprimary 316 <1> .callprimary: 317 <1> %endif 0 0000DB83 FFD1 call cx ; es:si -> partition table entry 319 <1> ; byte [load_current_partition] = which 320 <1> .ignoreprimary: 321 <1> .loop_primary_skip: 0 0000DB85 83C610 add si, 16 0 0000DB88 81FE[4001] sptrel cmp si, strict word %[_SCANPTAB_PREFIX]partition_table.end 324 <1> sptinternal 0 0000DB8C 72EA jb .loop_primary_parts 326 <1> 327 <1> %if _SPT_MULTIPASS 328 <1> .end: 329 <1> %ifidn _BASE, bp 330 <1> mov sp, bp ; restore sp 331 <1> pop bp 332 <1> %else 333 <1> mov sp, bx ; restore sp 334 <1> pop ax ; (discard dummy bp value) 335 <1> %endif 336 <1> retn ; and bye 337 <1> 338 <1> 339 <1> %[_SCANPTAB_PREFIX]scan_logical: 340 <1> push bp 341 <1> %ifidn _BASE, ss:bx 342 <1> mov bx, sp 343 <1> %elifidn _BASE, bp 344 <1> mov bp, sp 345 <1> %endif 346 <1> xor di, di 347 <1> push di ; [_BASE+di-2] 348 <1> push di ; [_BASE+di-4] 349 <1> push di ; [_BASE+di-6] 350 <1> push di ; [_BASE+di-8] 351 <1> 352 <1> xor ax, ax 353 <1> xor dx, dx 354 <1> %if _MODE 355 <1> sptrel mov word [ %[_SCANPTAB_PREFIX]load_scan_flags ], ax 356 <1> sptinternal 357 <1> %endif 358 <1> sptrel mov word [ %[_SCANPTAB_PREFIX]load_partition_cycle], ax 359 <1> sptinternal 360 <1> call %[_SCANPTAB_PREFIX]read_partition_table.first 361 <1> sptrel mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], 4 362 <1> sptinternal -3 363 <1> %if _SPT_ELD 364 <1> sptrel mov word [ %[_SCANPTAB_PREFIX]load_current_extended_and_is], dx ; = 0 365 <1> sptinternal 366 <1> %endif 367 <1> %else 368 <1> 369 <1> %[_SCANPTAB_PREFIX]scan_logical: 370 <1> %endif 371 <1> .: 372 <1> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 373 <1> d4 asciz "In scan_logical.",13,10 374 <1> 375 <1> %if _MODE 376 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_mode ], mode_traditional_order_logical 377 <1> sptinternal -3 378 <1> jz .nottraditional 379 <1> 380 <1> sptrel mov si, %[_SCANPTAB_PREFIX]partition_table 381 <1> sptinternal 382 <1> .loop_traditional: 383 <1> sptrel inc word [ %[_SCANPTAB_PREFIX]load_partition_cycle] 384 <1> sptinternal 385 <1> jz .got_partition_cycle 386 <1> 387 <1> mov al, [es:si + piType] 388 <1> 389 <1> %ifidn _BASE, bp 390 <1> xor bx, bx 391 <1> %endif 392 <1> test al, al 393 <1> jz .next_traditional 394 <1> cmp al, 0Fh ; extended partition (LBA aware) ? 395 <1> je .next_traditional ; yes --> 396 <1> and al, ~80h ; extended partition Linux (85h) ? 397 <1> cmp al, 05h ; or extended partition DOS (05h) ? 398 <1> je .next_traditional ; yes --> 399 <1> 400 <1> %ifidn _BASE, bp 401 <1> cmp word [_BASE+di-2], bx 402 <1> jne .logical_traditional 403 <1> cmp word [_BASE+di-4], bx 404 <1> %else 405 <1> cmp word [_BASE+di-2], 0 406 <1> jne .logical_traditional 407 <1> cmp word [_BASE+di-4], 0 408 <1> %endif 409 <1> je .next_traditional 410 <1> .logical_traditional: 411 <1> 412 <1> %if _MODE 413 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_scan_flags ], 32 414 <1> sptinternal -3 ; had a logical partition yet ? 415 <1> jz .calllogicaltrad ; no, accept it --> 416 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_mode ], mode_ignore_subsequent_logical 417 <1> sptinternal -3 ; ignore subsequent logical ? 418 <1> jnz .ignorelogicaltrad ; yes, ignore it --> 419 <1> .calllogicaltrad: 420 <1> %endif 421 <1> 422 <1> sptrel inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 423 <1> sptinternal 424 <1> jz .error_too_many_partitions 425 <1> call cx ; (sets load_scan_flags & 32 if recognised) 426 <1> ; CHG: ax, (cx), dx, bx if _BASE = bp 427 <1> ; preserve: (cx), si, di, ds, es, bx if _BASE = ss:bx 428 <1> .ignorelogicaltrad: 429 <1> .next_traditional: 430 <1> add si, 16 ; -> next partition table entry 431 <1> sptrel cmp si, strict word %[_SCANPTAB_PREFIX]partition_table.end 432 <1> sptinternal ; was last? 433 <1> jb .loop_traditional ; no, loop --> 434 <1> 435 <1> sptrel setopt [ %[_SCANPTAB_PREFIX]load_scan_flags ], 32 436 <1> sptinternal -3 ; mark as had logical 437 <1> 438 <1> .nottraditional: 439 <1> %endif 440 <1> 0 0000DB8E BE[0001] sptrel mov si, %[_SCANPTAB_PREFIX]partition_table 442 <1> sptinternal 443 <1> .loop: 0 0000DB91 FF06[3005] sptrel inc word [ %[_SCANPTAB_PREFIX]load_partition_cycle] 445 <1> sptinternal 0 0000DB95 7503E9A500 jz .got_partition_cycle 447 <1> 0 0000DB9A 268A4404 mov al, [es:si + piType] 449 <1> 450 <1> %ifidn _BASE, bp 0 0000DB9E 31DB xor bx, bx 452 <1> %endif 0 0000DBA0 84C0 test al, al 0 0000DBA2 741F jz .next 455 <1> %if _MODE 456 <1> %ifidn _BASE, bp 457 <1> cmp word [_BASE+di-2], bx 458 <1> jne .allextended 459 <1> cmp word [_BASE+di-4], bx 460 <1> %else 461 <1> cmp word [_BASE+di-2], 0 462 <1> jne .allextended 463 <1> cmp word [_BASE+di-4], 0 464 <1> %endif 465 <1> jne .allextended 466 <1> 467 <1> sptrel mov ah, [ %[_SCANPTAB_PREFIX]load_mode ] 468 <1> sptinternal 469 <1> cmp al, 5 470 <1> je .check 471 <1> shr ah, 1 472 <1> shr ah, 1 473 <1> cmp al, 15 474 <1> je .check 475 <1> shr ah, 1 476 <1> shr ah, 1 477 <1> cmp al, 85h 478 <1> jne .notextended 479 <1> .check: 480 <1> sptrel clropt [ %[_SCANPTAB_PREFIX]load_scan_flags ], 16 481 <1> sptinternal -3 ; new outermost extended 482 <1> 483 <1> test ah, 11b 484 <1> jz .push ; if it is 00b = all, always accept --> 485 <1> test ah, 10b ; if prior is NZ but this is zero 486 <1> jz .ignoreextended ; then we have 01b, always ignore --> 487 <1> test ah, 01b ; if prior is NZ and this is NZ, 488 <1> ; jnz .firsttype ; then we have 11b, accept first of type 489 <1> mov ah, 1 ; flag 1 for 10b 490 <1> jz @F ; if ZR, we have 10b, accept first of all types with 10b 491 <1> .firsttype: 492 <1> mov ah, 2 ; flag 2 for 11b type 5 493 <1> cmp al, 15 494 <1> jb @F 495 <1> mov ah, 4 ; flag 4 for 11b type 15 496 <1> je @F 497 <1> mov ah, 8 ; flag 8 for 11b type 85h 498 <1> @@: 499 <1> sptrel test byte [ %[_SCANPTAB_PREFIX]load_scan_flags ], ah 500 <1> sptinternal ; seen one of those before ? 501 <1> jnz .ignoreextended ; yes, ignore --> 502 <1> sptrel or byte [ %[_SCANPTAB_PREFIX]load_scan_flags ], ah 503 <1> sptinternal ; no, note seen it now 504 <1> jmp .push ; and process extended partition --> 505 <1> %endif 506 <1> 507 <1> .allextended: 508 <1> %if _MODE 509 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_mode ], mode_ignore_subsequent_nested 510 <1> sptinternal -3 511 <1> jz @F 512 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_scan_flags ], 16 513 <1> sptinternal -3 514 <1> jnz .ignoreextended 515 <1> @@: 516 <1> %endif 0 0000DBA4 3C0F cmp al, 0Fh ; extended partition (LBA aware) ? 0 0000DBA6 742C je .push ; yes --> 0 0000DBA8 247F and al, ~80h ; extended partition Linux (85h) ? 0 0000DBAA 3C05 cmp al, 05h ; or extended partition DOS (05h) ? 0 0000DBAC 7426 je .push ; yes --> 522 <1> .notextended: 523 <1> 524 <1> %ifidn _BASE, bp 0 0000DBAE 395BFE cmp word [_BASE+di-2], bx 0 0000DBB1 7505 jne .logical 0 0000DBB3 395BFC cmp word [_BASE+di-4], bx 528 <1> %else 529 <1> cmp word [_BASE+di-2], 0 530 <1> jne .logical 531 <1> cmp word [_BASE+di-4], 0 532 <1> %endif 0 0000DBB6 740B je .next 534 <1> .logical: 535 <1> 536 <1> %if _MODE 537 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_scan_flags ], 32 538 <1> sptinternal -3 ; had a logical partition yet ? 539 <1> jz .calllogical ; no, accept it --> 540 <1> sptrel test word [ %[_SCANPTAB_PREFIX]load_mode ], strict word mode_ignore_subsequent_logical | mode_traditional_order_logical 542 <1> sptinternal -4 ; ignore subsequent logical or post-trad run ? 543 <1> jnz .ignorelogical ; yes, ignore it --> 544 <1> .calllogical: 545 <1> %endif 546 <1> 0 0000DBB8 FE06[3905] sptrel inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 548 <1> sptinternal 0 0000DBBC 7503E98400 jz .error_too_many_partitions 0 0000DBC1 FFD1 call cx ; (sets load_scan_flags & 32 if recognised) 551 <1> ; CHG: ax, (cx), dx, bx if _BASE = bp 552 <1> ; preserve: (cx), si, di, ds, es, bx if _BASE = ss:bx 553 <1> .ignorelogical: 554 <1> .ignoreextended: 555 <1> .next: 0 0000DBC3 83C610 add si, 16 ; -> next partition table entry 0 0000DBC6 81FE[4001] sptrel cmp si, strict word %[_SCANPTAB_PREFIX]partition_table.end 558 <1> sptinternal ; was last? 0 0000DBCA 72C5 jb .loop ; no, loop --> 0 0000DBCC 85FF test di, di ; still some on stack? 0 0000DBCE 7546 jnz .pop ; yes, pop 562 <1> .end: 563 <1> %ifidn _BASE, bp 0 0000DBD0 89EC mov sp, bp ; restore sp 0 0000DBD2 5D pop bp 566 <1> %else 567 <1> mov sp, bx ; restore sp 568 <1> pop ax ; (discard dummy bp value) 569 <1> %endif 570 <1> %if _MODE && ! _SPT_MULTIPASS 571 <1> jmp scan_subsequent_primary 572 <1> %else 0 0000DBD3 C3 retn ; and bye 574 <1> %endif 575 <1> 576 <1> 577 <1> .push: 578 <1> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 579 <1> d4 asciz "In scan_logical.push",13,10 580 <1> 581 <1> %if _SPT_ELD 582 <1> sptrel rol byte [ %[_SCANPTAB_PREFIX]extended], 1 583 <1> sptinternal 584 <1> jnc @F 585 <1> sptrel not byte [ %[_SCANPTAB_PREFIX]load_is_extended] 586 <1> sptinternal 587 <1> 588 <1> push si 589 <1> sub di, 10 ; address temporary root and base 590 <1> push word [_BASE+di+10-2] 591 <1> push word [_BASE+di+10-4] ; copy root as root 592 <1> push word [_BASE+di+10-2] 593 <1> push word [_BASE+di+10-4] ; copy root as base 594 <1> ; Extended partitions always have LBA start values 595 <1> ; relative to the outermost extended partition. 596 <1> ; Therefore the "root" must be used as base for 597 <1> ; this call to always get the expected address 598 <1> ; from dword [bp - di - 8] + dword [es:si + 8]. 599 <1> 600 <1> call cx 601 <1> 602 <1> add sp, 8 ; discard temporary root and base 603 <1> add di, 10 ; point back to prior root and base 604 <1> pop si ; undo last part of the stack frame 605 <1> 606 <1> sptrel not byte [ %[_SCANPTAB_PREFIX]load_is_extended] 607 <1> sptinternal 608 <1> sptrel inc byte [ %[_SCANPTAB_PREFIX]load_current_extended] 609 <1> sptinternal 610 <1> %ifidn _BASE, bp 611 <1> xor bx, bx 612 <1> %endif 613 <1> @@: 614 <1> %endif 615 <1> 0 0000DBD4 56 push si 617 <1> .push_check_empty_next: 0 0000DBD5 83C610 add si, 16 ; -> next 0 0000DBD8 81FE[4001] sptrel cmp si, strict word %[_SCANPTAB_PREFIX]partition_table.end 620 <1> sptinternal ; at end? 0 0000DBDC 734A jae .replace ; yes, no other partitions found, replace --> 0 0000DBDE 26807C0400 cmp byte [es:si + piType], 0 ; is this a partition? 0 0000DBE3 74F0 je .push_check_empty_next ; no, check next --> 624 <1> ; found a partition after this, do push 625 <1> ; (possibly logical or another extended) 626 <1> .push_check_is_not_empty: 627 <1> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 628 <1> d4 asciz "In scan_logical.push_check_is_not_empty",13,10 629 <1> 630 <1> %if _MODE 631 <1> xor ax, ax ; sentinel 0 = accept more logicals 632 <1> 633 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_mode ], mode_traditional_order_logical 634 <1> sptinternal -3 635 <1> jnz .traditionalsentinel 636 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_scan_flags ], 32 637 <1> sptinternal -3 ; had a logical partition in this table ? 638 <1> jz @F ; no, no need to reset --> 639 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_mode ], mode_ignore_subsequent_logical 640 <1> sptinternal -3 ; ignore subsequent logical ? 641 <1> jz @F ; no --> 642 <1> .traditionalsentinel: 643 <1> mov al, 64 ; sentinel 64 = no more logicals 644 <1> @@: 645 <1> sptrel clropt [ %[_SCANPTAB_PREFIX]load_scan_flags ], 32 646 <1> sptinternal -3 ; accept a logical partition in next table 647 <1> %endif 648 <1> 0 0000DBE5 5E pop si ; restore -> partition table entry 650 <1> %if _MODE 651 <1> push word [es:si + piStart] 652 <1> mov dx, word [es:si + piStart + 2] ; get extended partition offset 653 <1> add si, ax ; now -> behind partition_table if sentinel set 654 <1> pop ax 655 <1> %endif 0 0000DBE6 56 push si ; stored at word [_BASE+di-10] 0 0000DBE7 83EF0A sub di, 10 0 0000DBEA FF7308 push word [_BASE+di+10-2] 0 0000DBED FF7306 push word [_BASE+di+10-4] ; copy root 660 <1> %ifn _MODE 0 0000DBF0 268B4408 mov ax, word [es:si + piStart] 0 0000DBF4 268B540A mov dx, word [es:si + piStart + 2] ; get extended partition offset 663 <1> %endif 0 0000DBF8 0343FC add ax, word [_BASE+di-4] 0 0000DBFB 1353FE adc dx, word [_BASE+di-2] ; add in root to get absolute sector number 666 <1> 0 0000DBFE 52 push dx 0 0000DBFF 50 push ax ; new base 669 <1> 670 <1> .replace_common: 671 <1> %ifidn _BASE, bp 0 0000DC00 395BFE cmp word [_BASE+di-2], bx ; have a (nonzero) root? 0 0000DC03 750B jne .have_root 0 0000DC05 395BFC cmp word [_BASE+di-4], bx 675 <1> %else 676 <1> cmp word [_BASE+di-2], 0 ; have a (nonzero) root? 677 <1> jne .have_root 678 <1> cmp word [_BASE+di-4], 0 679 <1> %endif 0 0000DC08 7506 jne .have_root ; yes --> 681 <1> 0 0000DC0A 8953FE mov word [_BASE+di-2], dx 0 0000DC0D 8943FC mov word [_BASE+di-4], ax ; set root 684 <1> .have_root: 685 <1> 0 0000DC10 E83800 call %[_SCANPTAB_PREFIX]read_partition_table.first 0 0000DC13 E978FF jmp . 688 <1> 689 <1> .pop: 690 <1> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 691 <1> d4 asciz "In scan_logical.pop",13,10 692 <1> 693 <1> %if _MODE 694 <1> sptrel setopt [ %[_SCANPTAB_PREFIX]load_scan_flags ], 16 695 <1> sptinternal -3 ; remember we found a nested extended partition 696 <1> ; so we can ignore others in the same outermost 697 <1> %endif 698 <1> 0 0000DC16 83C70A add di, 10 0 0000DC19 83C408 add sp, 8 0 0000DC1C 5E pop si 702 <1> 703 <1> %if _MODE 704 <1> sptrel clropt [ %[_SCANPTAB_PREFIX]load_scan_flags ], 32 705 <1> sptinternal -3 ; accept a logical partition in this table 706 <1> sptrel cmp si, 64 + %[_SCANPTAB_PREFIX]partition_table 707 <1> sptinternal ; sentinel set ? 708 <1> jb @F ; no --> 709 <1> sptrel setopt [ %[_SCANPTAB_PREFIX]load_scan_flags ], 32 710 <1> sptinternal -3 ; do not accept a logical partition in this table 711 <1> sub si, 64 ; undo sentinel addition 712 <1> @@: 713 <1> %endif 0 0000DC1D 8B43F8 mov ax, word [_BASE+di-8] 0 0000DC20 8B53FA mov dx, word [_BASE+di-6] 0 0000DC23 E82500 call %[_SCANPTAB_PREFIX]read_partition_table.reload 0 0000DC26 EB9B jmp .next 718 <1> 719 <1> .replace: 720 <1> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 721 <1> d4 asciz "In scan_logical.replace",13,10 722 <1> %if _MODE 723 <1> sptrel clropt [ %[_SCANPTAB_PREFIX]load_scan_flags ], 32 724 <1> sptinternal -3 ; accept a logical partition in next table 725 <1> %endif 726 <1> 0 0000DC28 5E pop si ; (discard) 728 <1> .replace_no_pop: 0 0000DC29 268B4408 mov ax, word [es:si + piStart] 0 0000DC2D 268B540A mov dx, word [es:si + piStart + 2] ; get extended partition offset 0 0000DC31 0343FC add ax, word [_BASE+di - 4] 0 0000DC34 1353FE adc dx, word [_BASE+di - 2] ; add in root 0 0000DC37 8943F8 mov word [_BASE+di - 8], ax 0 0000DC3A 8953FA mov word [_BASE+di - 6], dx ; set base 735 <1> 0 0000DC3D EBC1 jmp .replace_common 737 <1> 738 <1> 739 <1> %if _BOOTCMD_FAIL_ERROR 740 <1> .got_partition_cycle: 0 0000DC3F BA[0000] sptrel mov dx, msg.boot_partition_cycle_error 742 <1> sptinternal 0 0000DC42 E923EC jmp bootcmd.fail 744 <1> 745 <1> .error_too_many_partitions: 0 0000DC45 BA[0000] sptrel mov dx, msg.boot_too_many_partitions_error 747 <1> sptinternal 0 0000DC48 E91DEC jmp bootcmd.fail 749 <1> %endif 750 <1> 751 <1> 752 <1> %if _MODE 753 <1> @@: 754 <1> retn 755 <1> 756 <1> scan_subsequent_primary: 757 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_mode ], mode_ignore_subsequent_primary 758 <1> sptinternal -3 ; ignore subsequent primary ? 759 <1> jnz @B ; yes --> 760 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_mode ], mode_subsequent_primary_after 761 <1> sptinternal -3 ; subsequent after ? 762 <1> jz @B ; no --> 763 <1> 764 <1> push bp 765 <1> %ifidn _BASE, ss:bx 766 <1> mov bx, sp 767 <1> %elifidn _BASE, bp 768 <1> mov bp, sp 769 <1> %endif 770 <1> xor di, di 771 <1> push di ; [_BASE+di-2] 772 <1> push di ; [_BASE+di-4] 773 <1> push di ; [_BASE+di-6] 774 <1> push di ; [_BASE+di-8] 775 <1> 776 <1> %if ! _SPT_MULTIPASS 777 <1> sptrel mov word [ %[_SCANPTAB_PREFIX]load_scan_flags ], di 778 <1> sptinternal 779 <1> %endif 780 <1> 781 <1> xor ax, ax 782 <1> xor dx, dx 783 <1> 784 <1> %if _SPT_MULTIPASS 785 <1> sptrel mov word [ %[_SCANPTAB_PREFIX]load_scan_flags ], ax 786 <1> sptinternal 787 <1> %endif 788 <1> 789 <1> call %[_SCANPTAB_PREFIX]read_partition_table.reload 790 <1> ; (re)read MBR 791 <1> sptrel mov si, %[_SCANPTAB_PREFIX]partition_table 792 <1> sptinternal 793 <1> sptrel mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], dl ; = 0 794 <1> sptinternal 795 <1> %if _SPT_ELD 796 <1> sptrel mov word [ %[_SCANPTAB_PREFIX]load_current_extended_and_is], dx ; = 0 797 <1> sptinternal 798 <1> %endif 799 <1> 800 <1> sptrel testopt [ %[_SCANPTAB_PREFIX]load_mode ], mode_active_priority 801 <1> sptinternal -3 ; active primary first ? 802 <1> jz .detect_lowest 803 <1> 804 <1> .loop_active_skip: 805 <1> 806 <1> sptrel inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 807 <1> sptinternal 808 <1> mov al, byte [es:si + piType] 809 <1> cmp al, 0 810 <1> je .loop_active_skip_skip 811 <1> cmp byte [es:si + piBoot], 0 812 <1> je .loop_active_skip_skip 813 <1> 814 <1> ; INP: al = partition type 815 <1> ; OUT: CY if an LBA or FAT32 type that's disabled 816 <1> ; NC, ZR if known type we can access 817 <1> ; NC, NZ if unknown type 818 <1> call %[_SCANPTAB_PREFIX]load_is_known 819 <1> jc .loop_active_skip_skip 820 <1> jnz .loop_active_skip_skip 821 <1> sptrel mov al, byte [ %[_SCANPTAB_PREFIX]load_current_partition] 822 <1> sptinternal 823 <1> sptrel mov byte [ %[_SCANPTAB_PREFIX]load_scan_flags + 1], al 824 <1> sptinternal 825 <1> jmp .active_skip_done 826 <1> 827 <1> .loop_active_skip_skip: 828 <1> add si, 16 829 <1> sptrel cmp si, strict word %[_SCANPTAB_PREFIX]partition_table.end 830 <1> sptinternal 831 <1> jb .loop_active_skip 832 <1> 833 <1> .detect_lowest: 834 <1> sptrel mov si, %[_SCANPTAB_PREFIX]partition_table 835 <1> sptinternal 836 <1> sptrel mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], 0 837 <1> sptinternal -3 838 <1> 839 <1> .loop_lowest: 840 <1> sptrel inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 841 <1> sptinternal 842 <1> mov al, byte [es:si + piType] 843 <1> cmp al, 0 844 <1> je .loop_lowest_skip_skip 845 <1> 846 <1> ; INP: al = partition type 847 <1> ; OUT: CY if an LBA or FAT32 type that's disabled 848 <1> ; NC, ZR if known type we can access 849 <1> ; NC, NZ if unknown type 850 <1> call %[_SCANPTAB_PREFIX]load_is_known 851 <1> jc .loop_lowest_skip_skip 852 <1> jnz .loop_lowest_skip_skip 853 <1> sptrel mov al, byte [ %[_SCANPTAB_PREFIX]load_current_partition] 854 <1> sptinternal 855 <1> sptrel mov byte [ %[_SCANPTAB_PREFIX]load_scan_flags + 1], al 856 <1> sptinternal 857 <1> jmp .lowest_skip_done 858 <1> 859 <1> .loop_lowest_skip_skip: 860 <1> add si, 16 861 <1> sptrel cmp si, strict word %[_SCANPTAB_PREFIX]partition_table.end 862 <1> sptinternal 863 <1> jb .loop_lowest 864 <1> jmp .end ; none found 865 <1> 866 <1> .lowest_skip_done: 867 <1> .active_skip_done: 868 <1> sptrel mov si, %[_SCANPTAB_PREFIX]partition_table 869 <1> sptinternal 870 <1> sptrel mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], 0 871 <1> sptinternal -3 872 <1> 873 <1> .loop_primary_parts: 874 <1> sptrel inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 875 <1> sptinternal 876 <1> cmp byte [es:si + piType], 0 877 <1> je .loop_primary_skip 878 <1> 879 <1> %if _MODE 880 <1> sptrel mov al, byte [ %[_SCANPTAB_PREFIX]load_current_partition] 881 <1> sptinternal 882 <1> sptrel cmp byte [ %[_SCANPTAB_PREFIX]load_scan_flags + 1], al 883 <1> sptinternal 884 <1> je .ignoreprimary 885 <1> %endif 886 <1> call cx ; es:si -> partition table entry 887 <1> ; byte [load_current_partition] = which 888 <1> .ignoreprimary: 889 <1> .loop_primary_skip: 890 <1> add si, 16 891 <1> sptrel cmp si, strict word %[_SCANPTAB_PREFIX]partition_table.end 892 <1> sptinternal 893 <1> jb .loop_primary_parts 894 <1> 895 <1> .end: 896 <1> %ifidn _BASE, bp 897 <1> mov sp, bp ; restore sp 898 <1> pop bp 899 <1> %else 900 <1> mov sp, bx ; restore sp 901 <1> pop ax ; (discard dummy bp value) 902 <1> %endif 903 <1> retn 904 <1> %endif 905 <1> 906 <1> 907 <1> ; if _PARTITION_TABLE_IN_CS: 908 <1> ; INP: dx:ax = partition table sector to read 909 <1> ; CHG: ax, dx 910 <1> ; OUT: es = cs 911 <1> ; 64 bytes [es:partition_table] = partition table 912 <1> ; does not return if error 913 <1> 914 <1> ; else: 915 <1> ; INP: dx:ax = partition table sector to read 916 <1> ; CHG: ax, dx 917 <1> ; OUT: es = ss 918 <1> ; 64 bytes [es:partition_table] = partition table 919 <1> ; does not return if error 920 <1> %[_SCANPTAB_PREFIX]read_partition_table: 921 <1> %if _SPT_ELD 922 <1> .first: 923 <1> db __TEST_IMM8 ; NC, skip stc 924 <1> .reload: 925 <1> stc 926 <1> %else 927 <1> .first: 928 <1> .reload: 929 <1> %endif 930 <1> 0 0000DC4B 53 push bx 932 <1> %if _SPT_ELD 933 <1> sptrel mov bx, word [buffersegment] 934 <1> sptinternal 935 <1> %elifidn _BASE, bp 0 0000DC4C 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 937 <1> %else 938 <1> mov bx, word [bp + ldSectorSeg] 939 <1> %endif 0 0000DC50 E85102 call %[_SCANPTAB_PREFIX]read_ae_512_bytes 0 0000DC53 5B pop bx 0 0000DC54 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000DC5B 7518 jne .signature_fail 0 0000DC5D 1E push ds 0 0000DC5E 57 push di 0 0000DC5F 56 push si 0 0000DC60 51 push cx 0 0000DC61 06 push es 0 0000DC62 1F pop ds 0 0000DC63 BEBE01 mov si, 510 - 4*16 ; ds:si -> partition table in sectorseg 951 <1> %if _PARTITION_TABLE_IN_CS 952 <1> push cs 953 <1> %else 0 0000DC66 16 push ss 955 <1> %endif 0 0000DC67 07 pop es 0 0000DC68 BF[0001] sptrel mov di, %[_SCANPTAB_PREFIX]partition_table 958 <1> sptinternal ; es:di -> cs:%[_SCANPTAB_PREFIX]partition_table 0 0000DC6B B92000 mov cx, 4*16 / 2 0 0000DC6E F3A5 rep movsw 0 0000DC70 59 pop cx 0 0000DC71 5E pop si 0 0000DC72 5F pop di 0 0000DC73 1F pop ds 0 0000DC74 C3 retn 966 <1> 967 <1> 968 <1> %if _BOOTCMD_FAIL_ERROR 969 <1> .signature_fail: 0 0000DC75 BA[0000] sptrel mov dx, msg.bootfail_sig_parttable 971 <1> sptinternal 0 0000DC78 E9EDEB jmp bootcmd.fail 973 <1> %endif 3895 3896 3897 ; INP: al = first character 3898 ; si -> next 3899 ; OUT: doesn't return if error 3900 ; bx:dx = number read 3901 ; al = character after the number 3902 ; si -> next 3903 ; CHG: cx, ax, di 3904 boot_get_decimal_literal: 0 0000DC7B BA0A00 mov dx, 10 ; set base: decimal 3906 %if 1 0 0000DC7E B93940 mov cx, '9' | (('A'-10-1 + 10) << 8) 3908 %else 3909 mov cl, dl 3910 add cl, '0'-1 3911 cmp cl, '9' 3912 jbe .lit_basebelow11 3913 mov cl, '9' 3914 .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 3915 mov ch, dl 3916 add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 3917 %endif 0 0000DC81 EB06 jmp @F 3919 3920 3921 boot_get_hexadecimal_literal: 0 0000DC83 BA1000 mov dx, 16 ; set base: hexadecimal 3923 %if 1 0 0000DC86 B93946 mov cx, '9' | (('A'-10-1 + 16) << 8) 3925 %else 3926 mov cl, dl 3927 add cl, '0'-1 3928 cmp cl, '9' 3929 jbe .lit_basebelow11 3930 mov cl, '9' 3931 .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 3932 mov ch, dl 3933 add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 3934 %endif 3935 3936 @@: 0 0000DC89 B400 mov ah, 0 0 0000DC8B 31DB xor bx, bx 0 0000DC8D 89D7 mov di, dx ; di = base 3940 0 0000DC8F E8[0000] nearcall getexpression.lit_isdigit? ; first character must be a digit 0 0000DC92 7241 jc .err2 0 0000DC94 31D2 xor dx, dx ; initialize value 3944 .lit_loopdigit: 0 0000DC96 3C5F cmp al, '_' 0 0000DC98 7432 je .lit_skip 0 0000DC9A E8[0000] nearcall getexpression.lit_isdigit? ; was last character ? 0 0000DC9D 7230 jc .lit_end ; yes --> 0 0000DC9F E8[0000] call capitalise 0 0000DCA2 2C30 sub al, '0' 0 0000DCA4 3C09 cmp al, 9 ; was decimal digit ? 0 0000DCA6 7602 jbe .lit_decimaldigit ; yes --> 0 0000DCA8 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 3954 .lit_decimaldigit: 0 0000DCAA 50 push ax 0 0000DCAB 89D0 mov ax, dx 0 0000DCAD 53 push bx 0 0000DCAE F7E7 mul di ; multiply low word with base 0 0000DCB0 89D3 mov bx, dx 0 0000DCB2 89C2 mov dx, ax 0 0000DCB4 58 pop ax 0 0000DCB5 52 push dx 0 0000DCB6 F7E7 mul di ; multiply high word with base 0 0000DCB8 85D2 test dx, dx 0 0000DCBA 5A pop dx 0 0000DCBB 7518 jnz .err2 ; overflow --> 0 0000DCBD 01C3 add bx, ax ; add them 0 0000DCBF 58 pop ax 0 0000DCC0 7213 jc .err2 ; overflow --> 0 0000DCC2 00C2 add dl, al ; add in the new digit 0 0000DCC4 80D600 adc dh, 0 0 0000DCC7 83D300 adc bx, byte 0 0 0000DCCA 7209 jc .err2 ; overflow --> 3974 3975 .lit_skip: 0 0000DCCC AC lodsb 0 0000DCCD EBC7 jmp short .lit_loopdigit 3978 3979 .lit_end: 0 0000DCCF E8[0000] nearcall isseparator? ; after the number, there must be a separator 0 0000DCD2 7501 jne .err2 ; none here --> 0 0000DCD4 C3 retn 3983 3984 .err2: 0 0000DCD5 E9[0000] jmp error 3986 3987 3988 query_geometry: 0 0000DCD8 E8[0000] call guard_auxbuff 0 0000DCDB 8A16[4002] mov dl, [load_unit] 3991 ; test dl, dl ; floppy? 3992 ; jns @F ; don't attempt query, might fail --> 3993 ; Note that while the original PC BIOS doesn't support this function 3994 ; (for its diskettes), it does properly return the error code 01h. 3995 ; https://sites.google.com/site/pcdosretro/ibmpcbios (IBM PC version 1) 0 0000DCDF B408 mov ah, 08h 0 0000DCE1 31C9 xor cx, cx ; initialise cl to 0 0 0000DCE3 890E[1A02] mov [load_heads], cx 0 0000DCE7 890E[1802] mov [load_sectors], cx 0 0000DCEB 31DB xor bx, bx 0 0000DCED 88D3 mov bl, dl 0 0000DCEF F687[0000]04 testopt [load_unit_flags + bx], lufForceGeometry 0 0000DCF4 7512 jnz .try_bootsector 4004 ; Note: The int 13h function 08h call may change or 4005 ; set ax, bx, cx, dx, es, di. es is left as 4006 ; indeterminate afterwards, until the code at 4007 ; .try_bootsector runs, or bootcmd.fail, or 4008 ; the "mov es" in .got_sectors_heads. 0 0000DCF6 F9 stc ; initialise to CY 0 0000DCF7 E84901 call .int13_retry ; query drive geometry 0 0000DCFA 720C jc .try_bootsector ; apparently failed --> 0 0000DCFC 88F2 mov dl, dh 0 0000DCFE B600 mov dh, 0 ; dx = maximum head number 0 0000DD00 42 inc dx ; dx = number of heads (H is 0-based) 0 0000DD01 89C8 mov ax, cx ; ax & 3Fh = maximum sector number 0 0000DD03 83E03F and ax, 3Fh ; get sectors (number of sectors, S is 1-based) 0 0000DD06 7523 jnz .got_sectors_heads ; valid (S is 1-based), use these --> 4018 ; zero = invalid 4019 .try_bootsector: 0 0000DD08 8E06[0000] mov es, word [auxbuff_segorsel] ; es => auxbuff 0 0000DD0C 31DB xor bx, bx ; es:bx -> auxbuff 0 0000DD0E B80102 mov ax, 0201h ; read sector, 1 sector 0 0000DD11 B90100 mov cx, 1 ; sector 1 (1-based!), cylinder 0 (0-based) 0 0000DD14 B600 mov dh, 0 ; head 0 (0-based) 0 0000DD16 8A16[4002] mov dl, [load_unit] 0 0000DD1A F9 stc 0 0000DD1B E82501 call .int13_retry 0 0000DD1E 7303E93D01 jc .access_error 4029 4030 ; note: the smallest supported sector size, 32 bytes, 4031 ; does contain these entries (offset 18h and 1Ah in sector) 4032 ; within the first BPB sector. 0 0000DD23 268B4718 mov ax, word [es:bx + bsBPB + bpbCHSSectors] 0 0000DD27 268B571A mov dx, word [es:bx + bsBPB + bpbCHSHeads] 4035 4036 .got_sectors_heads: 0 0000DD2B A3[1802] mov word [load_sectors], ax 0 0000DD2E 8916[1A02] mov word [load_heads], dx 4039 0 0000DD32 85C0 test ax, ax 0 0000DD34 7503E94601 jz .invalid_sectors 0 0000DD39 83F83F cmp ax, 63 0 0000DD3C 7603E93E01 ja .invalid_sectors 0 0000DD41 85D2 test dx, dx 0 0000DD43 7503E93E01 jz .invalid_heads 0 0000DD48 81FA0001 cmp dx, 100h 0 0000DD4C 7603E93501 ja .invalid_heads 4048 0 0000DD51 8E06[0000] mov es, word [auxbuff_segorsel] ; es => auxbuff 0 0000DD55 31DB xor bx, bx ; es:bx -> auxbuff 0 0000DD57 31C0 xor ax, ax 4052 4053 %if _AUXBUFFSIZE < 8192+2 4054 %error Expecting to use auxbuff as sector size detection buffer 4055 %endif 4056 4057 d5 call d5dumpregs 4058 d5 call d5message 4059 d5 asciz 13,10,"In query_geometry 0",13,10 4060 0 0000DD59 89DF mov di, bx 0 0000DD5B B90110 mov cx, (8192 + 2) >> 1 4063 ; es:bx -> auxbuff, es:di = same 0 0000DD5E F3AB rep stosw ; fill buffer, di -> behind (auxbuff+8192+2) 0 0000DD60 B80102 mov ax, 0201h ; read sector, 1 sector 0 0000DD63 41 inc cx ; sector 1 (1-based!), cylinder 0 (0-based) 0 0000DD64 B600 mov dh, 0 ; head 0 (0-based) 0 0000DD66 8A16[4002] mov dl, [load_unit] 0 0000DD6A F9 stc 0 0000DD6B E8D500 call .int13_retry 0 0000DD6E 7303E9ED00 jc .access_error 4072 0 0000DD73 FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 0 0000DD74 AF scasw ; -> auxbuff+8192 (at last word to sca) 4075 d5 call d5dumpregs 4076 d5 call d5message 4077 d5 asciz 13,10,"In query_geometry 1",13,10 0 0000DD75 B90110 mov cx, (8192 + 2) >> 1 0 0000DD78 31C0 xor ax, ax 0 0000DD7A F3AF repe scasw 0 0000DD7C 83C704 add di, 4 ; di -> first differing byte (from top) 0 0000DD7F FC cld 0 0000DD80 57 push di 4084 0 0000DD81 89DF mov di, bx 0 0000DD83 B90110 mov cx, (8192 + 2) >> 1 0 0000DD86 48 dec ax ; = FFFFh 0 0000DD87 F3AB rep stosw 4089 0 0000DD89 B80102 mov ax, 0201h 0 0000DD8C 41 inc cx 0 0000DD8D B600 mov dh, 0 0 0000DD8F 8A16[4002] mov dl, [load_unit] 0 0000DD93 F9 stc 0 0000DD94 E8AC00 call .int13_retry 0 0000DD97 7303E9C400 jc .access_error 4097 0 0000DD9C FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 0 0000DD9D AF scasw ; di -> auxbuff+8192 (last word to sca) 4100 d5 call d5dumpregs 4101 d5 call d5message 4102 d5 asciz 13,10,"In query_geometry 2",13,10 0 0000DD9E 5A pop dx 0 0000DD9F B8FFFF mov ax, -1 0 0000DDA2 B90110 mov cx, (8192 + 2) >> 1 0 0000DDA5 F3AF repe scasw 4107 %if 0 4108 AAAB 4109 ^ 4110 sca B, match 4111 ^ 4112 sca B, mismatch 4113 ^ 4114 stop 4115 %endif 0 0000DDA7 83C704 add di, 4 ; di -> first differing byte (from top) 0 0000DDAA FC cld 4118 4119 %if 0 4120 0000000000000 4121 AAAAAAAA00000 4122 ^ 4123 FFFFFFFFFFFFF 4124 AAAAAAAA00FFF 4125 ^ 4126 %endif 0 0000DDAB 39FA cmp dx, di ; choose the higher one 0 0000DDAD 7302 jae @F 0 0000DDAF 89FA mov dx, di 4130 @@: 0 0000DDB1 29DA sub dx, bx ; dx = sector size 4132 4133 d5 call d5dumpregs 4134 d5 call d5message 4135 d5 asciz 13,10,"In query_geometry 3",13,10 4136 0 0000DDB3 81FA0220 cmp dx, 8192 + 2 0 0000DDB7 7203E9AE00 jae .sector_too_large 0 0000DDBC B82000 mov ax, 32 0 0000DDBF 39C2 cmp dx, ax 0 0000DDC1 7303E9AB00 jb .sector_too_small 4142 @@: 0 0000DDC6 39C2 cmp dx, ax 0 0000DDC8 740C je .got_match 0 0000DDCA 3D0020 cmp ax, 8192 0 0000DDCD 7203E9A600 jae .sector_not_power 0 0000DDD2 D1E0 shl ax, 1 0 0000DDD4 EBF0 jmp @B 4149 4150 .got_match: 0 0000DDD6 A3[0B02] mov word [load_sectorsize], ax 0 0000DDD9 B104 mov cl, 4 0 0000DDDB D3E8 shr ax, cl 0 0000DDDD A3[EA01] mov word [load_sectorsizepara], ax 4155 0 0000DDE0 C606[E701]00 mov byte [load_ldflags], 0 0 0000DDE5 8A16[4002] mov dl, [load_unit] 0 0000DDE9 31DB xor bx, bx 0 0000DDEB 88D3 mov bl, dl 0 0000DDED F687[0000]01 testopt [load_unit_flags + bx], lufForceCHS 0 0000DDF2 752B jnz .no_lba 0 0000DDF4 F687[0000]02 testopt [load_unit_flags + bx], lufForceLBA 0 0000DDF9 7520 jnz .yes_lba 4164 0 0000DDFB 1E push ds 0 0000DDFC BB4000 mov bx, 40h ; bx = 40h 0 0000DDFF 8EDB mov ds, bx ; ds = 40h 4168 ; Setting ds = 40h is a Book8088 bugfix, refer to 4169 ; http://www.bttr-software.de/forum/forum_entry.php?id=21061 4170 0 0000DE01 B80041 mov ax, 4100h 0 0000DE04 BBAA55 mov bx, 55AAh 0 0000DE07 31C9 xor cx, cx 0 0000DE09 30F6 xor dh, dh 0 0000DE0B F9 stc 0 0000DE0C CD13 int 13h ; 13.41.bx=55AA extensions installation check 0 0000DE0E 1F pop ds 0 0000DE0F 720E jc .no_lba 0 0000DE11 81FB55AA cmp bx, 0AA55h 0 0000DE15 7508 jne .no_lba 0 0000DE17 D0E9 shr cl, 1 ; support bitmap bit 0 0 0000DE19 7304 jnc .no_lba 4183 4184 .yes_lba: 4185 %if ldfHasLBA != 1 4186 %error Assuming ldfHasLBA is 1 4187 %endif 0 0000DE1B FE06[E701] inc byte [load_ldflags] 4189 .no_lba: 4190 0 0000DE1F A1[0000] mov ax, word [auxbuff_segorsel] ; ax => auxbuff 0 0000DE22 89C2 mov dx, ax 0 0000DE24 81C2FF01 add dx, (8192 - 16) >> 4 0 0000DE28 89C3 mov bx, ax 0 0000DE2A 89D1 mov cx, dx 0 0000DE2C 81E300F0 and bx, 0F000h 0 0000DE30 81E100F0 and cx, 0F000h 0 0000DE34 39D9 cmp cx, bx 0 0000DE36 7504 jne @F 0 0000DE38 A3[E401] mov word [load_sectorseg], ax 0 0000DE3B C3 retn 4202 4203 @@: 0 0000DE3C BA[0000] mov dx, msg.boot_auxbuff_crossing 0 0000DE3F B020 mov al, 20h 0 0000DE41 EB48 jmp .error_common_j 4207 4208 4209 .int13_retry: 0 0000DE43 9C pushf 0 0000DE44 50 push ax 0 0000DE45 CD13 int 13h ; first try 0 0000DE47 730B jnc @F ; NC, success on first attempt --> 4214 4215 ; reset drive 0 0000DE49 31C0 xor ax, ax 0 0000DE4B CD13 int 13h 0 0000DE4D 7205 jc @F ; CY, reset failed, error in ah --> 4219 4220 ; try read again 0 0000DE4F 58 pop ax ; restore function number 0 0000DE50 9D popf ; CF 0 0000DE51 CD13 int 13h ; retry, CF error status, ah error number 0 0000DE53 C3 retn 4225 4226 @@: ; NC or CY, stack has function number 0 0000DE54 44 inc sp 0 0000DE55 44 inc sp 0 0000DE56 44 inc sp 0 0000DE57 44 inc sp ; discard two words on stack, preserve CF 0 0000DE58 C3 retn 4232 4233 4234 .out_of_memory_error: 0 0000DE59 BA[0000] mov dx, msg.boot_out_of_memory_error 0 0000DE5C B021 mov al, 21h 0 0000DE5E EB2B jmp .error_common_j 4238 .access_error: 4239 %if _INPUT_FILE_BOOT 0 0000DE60 E87A04 call yy_boot_file_not_found.if 4241 ; harden not to do scriptspath attempt 4242 ; if some later access errors out 4243 %endif 0 0000DE63 BA[0000] mov dx, msg.boot_access_error 0 0000DE66 B022 mov al, 22h 0 0000DE68 EB21 jmp .error_common_j 4247 .sector_too_large: 0 0000DE6A BA[0000] mov dx, msg.boot_sector_too_large 0 0000DE6D B023 mov al, 23h 0 0000DE6F EB1A jmp .error_common_j 4251 .sector_too_small: 0 0000DE71 BA[0000] mov dx, msg.boot_sector_too_small 0 0000DE74 B024 mov al, 24h 0 0000DE76 EB13 jmp .error_common_j 4255 .sector_not_power: 0 0000DE78 BA[0000] mov dx, msg.boot_sector_not_power 0 0000DE7B B025 mov al, 25h 0 0000DE7D EB0C jmp .error_common_j 4259 .invalid_sectors: 0 0000DE7F BA[0000] mov dx, msg.boot_invalid_sectors 0 0000DE82 B026 mov al, 26h 0 0000DE84 EB05 jmp .error_common_j 4263 .invalid_heads: 0 0000DE86 BA[0000] mov dx, msg.boot_invalid_heads 0 0000DE89 B027 mov al, 27h 4266 .error_common_j: 0 0000DE8B B402 mov ah, 02h 0 0000DE8D E8[0000] call setrc 0 0000DE90 E9D5E9 jmp bootcmd.fail 4270 4271 4272 ; INP: dx:ax = first sector 4273 ; bx:0 -> buffer 4274 ; OUT: dx:ax = sector number after last read 4275 ; es = input bx 4276 ; bx:0 -> buffer after last written 4277 ; CHG: - 4278 ; STT: ds = ss 4279 read_ae_1536_bytes: 0 0000DE93 51 push cx 0 0000DE94 53 push bx 0 0000DE95 B90006 mov cx, 1536 4283 .loop: 0 0000DE98 E81B00 call read_sector 0 0000DE9B 2B0E[0B02] sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000DE9F 77F7 ja .loop 0 0000DEA1 07 pop es 0 0000DEA2 59 pop cx 0 0000DEA3 C3 retn 4290 4291 ; INP: dx:ax = first sector 4292 ; bx:0 -> buffer 4293 ; OUT: dx:ax = sector number after last read 4294 ; es = input bx 4295 ; bx:0 -> buffer after last written 4296 ; CHG: - 4297 ; STT: ds = ss 4298 read_ae_512_bytes: 0 0000DEA4 51 push cx 0 0000DEA5 53 push bx 0 0000DEA6 B90002 mov cx, 512 4302 .loop: 0 0000DEA9 E80A00 call read_sector 0 0000DEAC 2B0E[0B02] sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000DEB0 77F7 ja .loop 0 0000DEB2 07 pop es 0 0000DEB3 59 pop cx 0 0000DEB4 C3 retn 4309 4310 4311 ; Write a sector using Int13.03 or Int13.4300 4312 ; 4313 ; Protocol as for read_sector 4314 write_sector: 0 0000DEB5 A8 db __TEST_IMM8 ; (skip stc, NC) 4316 4317 ; Read a sector using Int13.02 or Int13.42 4318 ; 4319 ; INP: dx:ax = sector number (within partition) 4320 ; bx:0-> buffer 4321 ; (_LBA) ds = ss 4322 ; dword[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors] 4323 ; = base sector number (dx:ax is added to this to get 4324 ; the absolute sector number in the selected unit.) 4325 ; OUT: If unable to read, 4326 ; ! jumps to error instead of returning 4327 ; If sector has been read, 4328 ; dx:ax = next sector number (has been incremented) 4329 ; bx:0-> next buffer (bx = es+word[load_sectorsizepara]) 4330 ; es = input bx 4331 ; CHG: - 4332 ; 4333 ; Note: If error 09h (data boundary error) is returned, 4334 ; the read is done into the load_sectorseg buffer, 4335 ; then copied into the user buffer. 4336 read_sector: section_of_function 0 0000DEB6 F9 stc 4338 4339 read_sector_CY_or_write_sector_NC: 4340 lframe near 0 0000DEB7 5589E5 lenter 4342 lvar word, is_read_bit0 0 0000DEBA 9C pushf 4344 4345 .err: equ bootcmd.fail_read 4346 d5 call d5dumpregs 4347 d5 call d5message 4348 d5 asciz 13,10,"In read_sector",13,10 4349 0 0000DEBB 52 push dx 0 0000DEBC 51 push cx 0 0000DEBD 50 push ax 0 0000DEBE 56 push si 4354 0 0000DEBF 8EC3 mov es, bx 4356 4357 ; DX:AX==LBA sector number 4358 ; add partition start (= number of hidden sectors) 0 0000DEC1 0306[1C02] add ax,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 0] 0 0000DEC5 1316[1E02] adc dx,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2] 4361 0 0000DEC9 19F6 sbb si, si ; -1 if was CY, 0 else 0 0000DECB F7DE neg si ; 1 if was CY, 0 else 0 0000DECD 31C9 xor cx, cx 0 0000DECF 51 push cx 0 0000DED0 56 push si ; bit 32 = 1 if operating in 33-bit space 0 0000DED1 52 push dx 0 0000DED2 50 push ax ; qword sector number (lpSector) 0 0000DED3 53 push bx 0 0000DED4 51 push cx ; bx:0 -> buffer (lpBuffer) 0 0000DED5 41 inc cx 0 0000DED6 51 push cx ; word number of sectors to read (lpCount) 0 0000DED7 B110 mov cl, 10h 0 0000DED9 51 push cx ; word size of disk address packet (lpSize) 0 0000DEDA 89E6 mov si, sp ; ds:si -> disk address packet (on stack) 4376 0 0000DEDC F606[E701]01 test byte [load_data - LOADDATA2 + ldFlags], ldfHasLBA 0 0000DEE1 7503E9BA00 jz .no_lba 4379 4380 d5 call d5message 4381 d5 asciz "In read_sector.lba",13,10 4382 0 0000DEE6 8A16[4002] mov dl, byte [load_unit] 0 0000DEEA E89001 call .set_ah_function_42_or_43 0 0000DEED CD13 int 13h ; 13.42 extensions read 0 0000DEEF 7203E9A600 jnc .lba_done 4387 0 0000DEF4 31C0 xor ax, ax 0 0000DEF6 CD13 int 13h 0 0000DEF8 7303E959E9 jc .lba_error 4391 4392 ; have to reset the LBAPACKET's lpCount, as the handler may 4393 ; set it to "the number of blocks successfully transferred". 4394 ; (in any case, the high byte is still zero.) 0 0000DEFD C6440201 mov byte [si + lpCount], 1 4396 0 0000DF01 E87901 call .set_ah_function_42_or_43 0 0000DF04 CD13 int 13h 0 0000DF06 7203E98F00 jnc .lba_done 4400 0 0000DF0B 80FC09 cmp ah, 9 ; data boundary error? 0 0000DF0E 7403E943E9 jne .lba_error 4403 4404 .lba_sectorseg: 4405 d4 call d4dumpregs 4406 d4 call d4message 4407 d4 asciz 13,10,"In read_sector.lba_sectorseg",13,10 4408 0 0000DF13 F646FE01 test byte [bp + ?is_read_bit0], 1 0 0000DF17 7544 jnz .lba_sectorseg_read 4411 4412 .lba_sectorseg_write: 0 0000DF19 06 push es 4414 0 0000DF1A 1E push ds 0 0000DF1B 56 push si 0 0000DF1C 57 push di 0 0000DF1D 8B0E[0B02] mov cx, word [load_sectorsize] 0 0000DF21 8E06[E401] mov es, word [load_sectorseg] ; => sectorseg 4420 ; lds si, [si + lpBuffer + 0] 0 0000DF25 8E5C06 mov ds, word [si + lpBuffer + 2]; => user buffer 0 0000DF28 31F6 xor si, si 0 0000DF2A 31FF xor di, di 0 0000DF2C F3A4 rep movsb ; copy data into sectorseg 0 0000DF2E 5F pop di 0 0000DF2F 5E pop si 0 0000DF30 1F pop ds 4428 0 0000DF31 8E06[E401] mov es, word [load_sectorseg] 0 0000DF35 8C4406 mov word [si + lpBuffer + 2], es 4431 ; => sectorseg 4432 ; and word [si + lpBuffer + 0], byte 0 4433 0 0000DF38 C6440201 mov byte [si + lpCount], 1 0 0000DF3C B80043 mov ax, 4300h 0 0000DF3F CD13 int 13h 0 0000DF41 7317 jnc @F 4438 0 0000DF43 31C0 xor ax, ax 0 0000DF45 CD13 int 13h 0 0000DF47 7303E90AE9 jc .lba_error 4442 0 0000DF4C C6440201 mov byte [si + lpCount], 1 0 0000DF50 B80043 mov ax, 4300h 0 0000DF53 CD13 int 13h 0 0000DF55 7303E9FCE8 jc .lba_error 4447 @@: 4448 0 0000DF5A 07 pop es 0 0000DF5B EB3D jmp .lba_done 4451 4452 4453 .lba_sectorseg_read: 4454 ; the offset part of the pointer is already zero! 4455 ; push word [si + lpBuffer + 0] 0 0000DF5D 06 push es ; => user buffer 0 0000DF5E 8E06[E401] mov es, word [load_sectorseg] 0 0000DF62 8C4406 mov word [si + lpBuffer + 2], es 4459 ; and word [si + lpBuffer + 0], byte 0 4460 0 0000DF65 C6440201 mov byte [si + lpCount], 1 0 0000DF69 E81101 call .set_ah_function_42_or_43 0 0000DF6C CD13 int 13h 0 0000DF6E 7317 jnc .lba_sectorseg_done 4465 0 0000DF70 31C0 xor ax, ax 0 0000DF72 CD13 int 13h 0 0000DF74 7303E9DDE8 jc .lba_error 4469 0 0000DF79 C6440201 mov byte [si + lpCount], 1 0 0000DF7D E8FD00 call .set_ah_function_42_or_43 0 0000DF80 CD13 int 13h 0 0000DF82 7303E9CFE8 jc .lba_error 4474 .lba_sectorseg_done: 4475 0 0000DF87 31F6 xor si, si 0 0000DF89 07 pop es 4478 ; pop cx 0 0000DF8A 57 push di 4480 ; mov di, cx 0 0000DF8B 31FF xor di, di 0 0000DF8D 8B0E[0B02] mov cx, word [load_sectorsize] 0 0000DF91 8E1E[E401] mov ds, word [load_sectorseg] 0 0000DF95 F3A4 rep movsb 0 0000DF97 5F pop di 4486 0 0000DF98 16 push ss 0 0000DF99 1F pop ds 4489 .lba_done: 0 0000DF9A 83C410 add sp, 10h 0 0000DF9D E9CB00 jmp .done 4492 4493 .lba_error: equ .err 4494 4495 .no_lba: 0 0000DFA0 83C408 add sp, 8 0 0000DFA3 58 pop ax 0 0000DFA4 5A pop dx 0 0000DFA5 5E pop si 0 0000DFA6 59 pop cx 0 0000DFA7 85F6 test si, si 0 0000DFA9 7532 jnz .err_4_NZ 4503 4504 ; DX:AX=LBA sector number 4505 ; divide by number of sectors per track to get sector number 4506 ; Use 32:16 DIV instead of 64:32 DIV for 8088 compatability 4507 ; Use two-step 32:16 divide to avoid overflow 0 0000DFAB 89C1 mov cx,ax 0 0000DFAD 89D0 mov ax,dx 0 0000DFAF 31D2 xor dx,dx 0 0000DFB1 F736[1802] div word [load_sectors] 0 0000DFB5 91 xchg cx,ax 0 0000DFB6 F736[1802] div word [load_sectors] 0 0000DFBA 87CA xchg cx,dx 4515 4516 ; DX:AX=quotient, CX=remainder=sector (S) - 1 4517 ; divide quotient by number of heads 0 0000DFBC 89C3 mov bx, ax 0 0000DFBE 92 xchg ax, dx 0 0000DFBF 31D2 xor dx, dx 0 0000DFC1 F736[1A02] div word [load_heads] 0 0000DFC5 93 xchg bx, ax 0 0000DFC6 F736[1A02] div word [load_heads] 4524 4525 ; bx:ax=quotient=cylinder (C), dx=remainder=head (H) 4526 ; move variables into registers for INT 13h AH=02h 0 0000DFCA 88D6 mov dh, dl ; dh = head 0 0000DFCC 41 inc cx ; cl5:0 = sector 0 0000DFCD 86E8 xchg ch, al ; ch = cylinder 7:0, al = 0 0 0000DFCF D1E8 shr ax, 1 0 0000DFD1 D1E8 shr ax, 1 ; al7:6 = cylinder 9:8 4532 ; bx has bits set iff it's > 0, indicating a cylinder >= 65536. 0 0000DFD3 08FB or bl, bh ; collect set bits from bh 0 0000DFD5 08C1 or cl, al ; cl7:6 = cylinder 9:8 4535 ; ah has bits set iff it was >= 4, indicating a cylinder >= 1024. 0 0000DFD7 08E3 or bl, ah ; collect set bits from ah 0 0000DFD9 8A16[4002] mov dl, [load_unit] 4538 ; dl = drive 4539 .err_4_NZ: 0 0000DFDD B404 mov ah, 04h ; error number: sector not found 0 0000DFDF 7403E972E8 jnz .err ; error if cylinder >= 1024 --> 4542 ; ! bx = 0 (for 13.02 call) 4543 4544 ; we call INT 13h AH=02h once for each sector. Multi-sector reads 4545 ; may fail if we cross a track or 64K boundary 0 0000DFE4 BE1100 mov si, 16 + 1 4547 .loop_chs_retry_repeat: 0 0000DFE7 E89F00 call .set_ax_function_0201_or_0301 0 0000DFEA CD13 int 13h ; read one sector 0 0000DFEC 7349 jnc .done_j 0 0000DFEE 50 push ax 0 0000DFEF 31C0 xor ax, ax 0 0000DFF1 CD13 int 13h ; reset disk 0 0000DFF3 58 pop ax 0 0000DFF4 4E dec si ; another attempt ? 0 0000DFF5 75F0 jnz .loop_chs_retry_repeat ; yes --> 4557 0 0000DFF7 80FC09 cmp ah, 9 ; data boundary error? 0 0000DFFA 7403E957E8 jne .err 4560 4561 .chs_sectorseg: 4562 d4 call d4dumpregs 4563 d4 call d4message 4564 d4 asciz 13,10,"In read_sector.chs_sectorseg",13,10 4565 0 0000DFFF F646FE01 test byte [bp + ?is_read_bit0], 1 0 0000E003 7534 jnz .chs_sectorseg_read 4568 4569 .chs_sectorseg_write: 0 0000E005 06 push es 4571 0 0000E006 1E push ds 0 0000E007 57 push di 0 0000E008 51 push cx 0 0000E009 8B0E[0B02] mov cx, word [load_sectorsize] 0 0000E00D 06 push es 0 0000E00E 8E06[E401] mov es, word [load_sectorseg] ; => sectorseg 0 0000E012 1F pop ds ; => user buffer 0 0000E013 31F6 xor si, si 0 0000E015 31FF xor di, di 0 0000E017 F3A4 rep movsb ; copy data into sectorseg 0 0000E019 59 pop cx 0 0000E01A 5F pop di 0 0000E01B 1F pop ds 4585 0 0000E01C B80103 mov ax, 0301h 0 0000E01F CD13 int 13h 0 0000E021 7313 jnc @F 4589 0 0000E023 31C0 xor ax, ax 0 0000E025 CD13 int 13h 0 0000E027 7303E92AE8 jc .err 4593 0 0000E02C B80103 mov ax, 0301h 0 0000E02F CD13 int 13h 0 0000E031 7303E920E8 jc .err 4597 @@: 0 0000E036 07 pop es 4599 .done_j: 0 0000E037 EB32 jmp .done 4601 4602 4603 .chs_sectorseg_read: 4604 0 0000E039 06 push es ; user buffer 0 0000E03A 8E06[E401] mov es, word [load_sectorseg] 4607 0 0000E03E E84800 call .set_ax_function_0201_or_0301 0 0000E041 CD13 int 13h 0 0000E043 7313 jnc .chs_sectorseg_done 4611 0 0000E045 31C0 xor ax, ax 0 0000E047 CD13 int 13h 0 0000E049 7303E908E8 jc .err 4615 0 0000E04E E83800 call .set_ax_function_0201_or_0301 0 0000E051 CD13 int 13h 0 0000E053 7303E9FEE7 jc .err 4619 .chs_sectorseg_done: 4620 0 0000E058 31F6 xor si, si 0 0000E05A 07 pop es 0 0000E05B 57 push di 0 0000E05C 31FF xor di, di 0 0000E05E 8B0E[0B02] mov cx, word [load_sectorsize] 0 0000E062 8E1E[E401] mov ds, word [load_sectorseg] 0 0000E066 F3A4 rep movsb 0 0000E068 5F pop di 4629 0 0000E069 16 push ss 0 0000E06A 1F pop ds 4632 .done: 4633 ; increment segment 0 0000E06B 8CC3 mov bx, es 0 0000E06D 031E[EA01] add bx, word [load_sectorsizepara] 4636 0 0000E071 5E pop si 0 0000E072 58 pop ax 0 0000E073 59 pop cx 0 0000E074 5A pop dx 4641 ; increment LBA sector number 0 0000E075 40 inc ax 0 0000E076 7501 jne @F 0 0000E078 42 inc dx 4645 @@: 0 0000E079 89EC5D lleave code 0 0000E07C C3 retn 4648 4649 .set_ah_function_42_or_43: 0 0000E07D B442 mov ah, 42h 0 0000E07F F646FE01 test byte [bp + ?is_read_bit0], 1 0 0000E083 7503 jnz @F 0 0000E085 B80043 mov ax, 4300h 4654 @@: 0 0000E088 C3 retn 4656 4657 .set_ax_function_0201_or_0301: 0 0000E089 B001 mov al, 1 4659 .set_ah_function_02_or_03: 0 0000E08B B402 mov ah, 02h 0 0000E08D F646FE01 test byte [bp + ?is_read_bit0], 1 0 0000E091 7502 jnz @F 0 0000E093 B403 mov ah, 03h 4664 @@: 0 0000E095 C3 retn 4666 4667 lleave ctx 4668 4669 4670 %if _INPUT_FILE_BOOT || _EXTENSIONS 4671 yy_boot_error: 0 0000E096 52 push dx 0 0000E097 BA[0000] mov dx, msg.bootfail 0 0000E09A E8[0000] call putsz_error 0 0000E09D 5A pop dx 0 0000E09E EB03 jmp @F 4677 4678 yy_boot_disp_error_1: 0 0000E0A0 B80002 mov ax, 0200h 4680 @@: 0 0000E0A3 E8[0000] call setrc 0 0000E0A6 E8[0000] call display_y_or_ext 0 0000E0A9 E8[0000] call putsz_error 0 0000E0AC FF26[0000] jmp near word [errret] 4685 4686 yy_boot_parse_name: section_of_function 0 0000E0B0 8D5CFF lea bx, [si - 1] ; -> start of name 4688 yy_boot_parse_name_bx_buffer: section_of_function 0 0000E0B3 E8BEE2 call init_bootcmd 0 0000E0B6 E9[0000] jmp yy_common_parse_name_bx_buffer 4691 4692 yy_boot: 4693 %if _EXTENSIONS 4694 %if _INPUT_FILE_BOOT 0 0000E0B9 D006[0000] rol byte [yy_is_script], 1 0 0000E0BD 7203E9DF00 jnc ext_boot 4697 %endif 4698 %endif 4699 4700 %if _INPUT_FILE_BOOT 4701 yy_script_boot: 0 0000E0C2 E8EBFF call yy_boot_parse_name 4703 0 0000E0C5 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 0000E0CA 740C jz @F 0 0000E0CC 833E[2005]03 cmp word [load_input_file.active], _INPUT_FILE_BOOT - 1 0 0000E0D1 7205 jb @F 4708 0 0000E0D3 BA[0000] mov dx, msg.yy_too_many_handles 0 0000E0D6 EBC8 jmp yy_boot_disp_error_1 4711 @@: 4712 0 0000E0D8 803F3A cmp byte [bx], ':' 0 0000E0DB 752D jne .not_yy_goto_subfunction 4715 0 0000E0DD F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 0000E0E2 7421 jz @F 4718 0 0000E0E4 8B3E[0000] mov di, word [terminator_in_line_in.offset] 0 0000E0E8 A0[0000] mov al, byte [terminator_in_line_in.value] 0 0000E0EB 8805 mov byte [di], al 4722 0 0000E0ED 43 inc bx 0 0000E0EE 89DE mov si, bx 0 0000E0F0 E8[0000] call skipwhite 0 0000E0F3 4E dec si 0 0000E0F4 8936[2205] mov word [load_input_file.goto_offset], si 4728 0 0000E0F8 E87303 call yy_calculate_structure 0 0000E0FB E85003 call yy_boot_get.bx 0 0000E0FE 800E[0000]80 setopt [internalflags3], dif3_partition_changed 0 0000E103 EB44 jmp .finish 4733 4734 @@: 0 0000E105 BA[0000] mov dx, msg.yy_no_file 0 0000E108 EB96 jmp yy_boot_disp_error_1 4737 4738 .not_yy_goto_subfunction: 0 0000E10A 8326[2205]00 and word [load_input_file.goto_offset], 0 0 0000E10F E8[0000] call skipcomm0 0 0000E112 8936[0000] mov word [if_exists_then_address], si 0 0000E116 E8[0000] call iseol?_or_then 0 0000E119 742B je .not_yy_goto 4744 0 0000E11B 3C3A cmp al, ':' 0 0000E11D 7403E9[0000] jne error 4747 0 0000E122 E8[0000] call skipwhite 0 0000E125 4E dec si 0 0000E126 8936[2205] mov word [load_input_file.goto_offset], si 4751 4752 @@: 0 0000E12A AC lodsb 0 0000E12B 3C20 cmp al, 32 0 0000E12D 740D je @F 0 0000E12F 3C09 cmp al, 9 0 0000E131 7409 je @F 0 0000E133 3C2C cmp al, ',' 0 0000E135 7405 je @F 0 0000E137 E8[0000] call iseol? 0 0000E13A 75EE jne @B 4762 @@: 0 0000E13C E8[0000] call skipcomm0 0 0000E13F 8936[0000] mov word [if_exists_then_address], si 0 0000E143 E8[0000] call chkeol_or_then 4766 4767 .not_yy_goto: 0 0000E146 E87700 call yy_boot_open_file 4769 4770 .finish: 0 0000E149 31ED xor bp, bp 0 0000E14B 31DB xor bx, bx 0 0000E14D BE[C001] mov si, load_data_lowest 0 0000E150 B95000 mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 4775 0 0000E153 BF[A002] mov di, load_input_file 0 0000E156 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 0000E15B 7415 jz @F 0 0000E15D 8B1E[2005] mov bx, word [load_input_file.active] 0 0000E161 43 inc bx 0 0000E162 B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 0000E165 F7E3 mul bx 4783 ; test dx, dx 4784 ; jnz error 0 0000E167 01C7 add di, ax 0 0000E169 8B5586 mov dx, word [di - LOAD_INPUT_FILE_SIZE - LOADDATA3 + ldFATType] 0 0000E16C 81E200F0 and dx, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 0 0000E170 09D5 or bp, dx 4790 4791 @@: 4792 0 0000E172 092E[E601] or word [load_data - LOADDATA2 + ldFATType], bp 0 0000E176 16 push ss 0 0000E177 07 pop es 0 0000E178 F3A5 rep movsw 4797 4798 ; hazard: this uses load_input_file and 4799 ; load_data_lowest if we are already in 4800 ; a yy_boot script. 0 0000E17A 8026[0300]EF clropt [internalflags3], dif3_auxbuff_guarded_1 0 0000E17F E8[0000] call yy_reset_buf 4803 0 0000E182 891E[2005] mov word [load_input_file.active], bx 0 0000E186 800E[0300]02 setopt [internalflags2], dif2_input_file_boot 4806 0 0000E18B 8B36[2205] mov si, word [load_input_file.goto_offset] 0 0000E18F 85F6 test si, si 0 0000E191 7403E9[0000] jnz cmd_goto.yy_entry 4810 0 0000E196 F606[0300]08 testopt [internalflags3], dif3_in_if 0 0000E19B 7403E9[0000] jnz if_exists_found_open 0 0000E1A0 C3 retn 4814 %endif 4815 4816 4817 %if _EXTENSIONS 4818 ext_boot: 0 0000E1A1 E80CFF call yy_boot_parse_name 0 0000E1A4 8D54FF lea dx, [si - 1] 0 0000E1A7 8916[0000] mov word [ext_cmdline], dx 0 0000E1AB E8[0000] call skipcomm0 0 0000E1AE 8936[0000] mov word [if_exists_then_address], si 0 0000E1B2 E80B00 call yy_boot_open_file 0 0000E1B5 BB[C001] mov bx, load_data_lowest ; make yy_boot_get and yy_boot_update no-ops 0 0000E1B8 8026[0300]EF clropt [internalflags3], dif3_auxbuff_guarded_1 0 0000E1BD E9[0000] jmp ext_finish.boot 4828 %endif 4829 4830 4831 yy_boot_open_file: section_of_function 4832 %if _CONFIG 0 0000E1C0 8926[0000] mov word [yy_boot_attempt_open_stack], sp 0 0000E1C4 891E[0000] mov word [yy_boot_attempt_open_pathname], bx 4835 %endif 0 0000E1C8 E81D01 call yy_boot_init_dir 0 0000E1CB C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000E1D0 8B36[5405] mov si, word [load_yyname_input] 0 0000E1D4 803C2F cmp byte [si], '/' 0 0000E1D7 7501 jne @F 0 0000E1D9 46 inc si 4842 @@: 4843 .dotcomponent: 0 0000E1DA 803C00 cmp byte [si], 0 0 0000E1DD 7509 jne @F 4846 ..@yy_filename_empty: section_of_function 0 0000E1DF BA[0000] mov dx, msg.yy_filename_empty 0 0000E1E2 B80A02 mov ax, 020Ah 0 0000E1E5 E9AEFE jmp yy_boot_error 4850 @@: 0 0000E1E8 16 push ss 0 0000E1E9 07 pop es 0 0000E1EA E8C0EB call boot_parse_fn ; get next pathname 0 0000E1ED 72EB jc .dotcomponent 0 0000E1EF 3C2F cmp al, '/' 0 0000E1F1 7509 jne @F 0 0000E1F3 C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000E1F8 8936[5605] mov word [load_yyname_next], si 4859 @@: 4860 0 0000E1FC BFFFFF mov di, -1 0 0000E1FF 89FE mov si, di 0 0000E201 897EF4 mov [bp + lsvFATSector], di 0 0000E204 8976F6 mov [bp + lsvFATSector + 2], si 4865 0 0000E207 31C0 xor ax, ax 0 0000E209 31D2 xor dx, dx 4868 4869 scan_dir_yyname_loop: 0 0000E20B 8946EC mov word [bp + ldDirCluster], ax 0 0000E20E 8956EE mov word [bp + ldDirCluster + 2], dx 4872 0 0000E211 16 push ss 0 0000E212 07 pop es 0 0000E213 BB[8002] mov bx, load_yy_direntry 4876 0 0000E216 E8D0F6 call scan_dir_aux_for_file 4878 0 0000E219 803E[3B05]10 cmp byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000E21E 753C jne got_yyentry 4881 0 0000E220 56 push si 0 0000E221 57 push di 0 0000E222 C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000E227 8B36[5605] mov si, word [load_yyname_next] 4886 .dotcomponent_next: 0 0000E22B 803C00 cmp byte [si], 0 0 0000E22E 7502 jne @F 0 0000E230 EBAD jmp ..@yy_filename_empty 4890 @@: 0 0000E232 06 push es 0 0000E233 16 push ss 0 0000E234 07 pop es 0 0000E235 E875EB call boot_parse_fn ; get next pathname 0 0000E238 07 pop es 0 0000E239 72F0 jc .dotcomponent_next 0 0000E23B 3C2F cmp al, '/' 0 0000E23D 7509 jne @F 0 0000E23F C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000E244 8936[5605] mov word [load_yyname_next], si 4901 @@: 0 0000E248 5F pop di 0 0000E249 5E pop si 4904 0 0000E24A 31D2 xor dx, dx 0 0000E24C 268B471A mov ax, [es:bx + deClusterLow] 4907 ; = first cluster (not FAT32) 0 0000E250 807EE620 cmp byte [bp + ldFATType], 32 0 0000E254 7504 jne @F 0 0000E256 268B5714 mov dx, [es:bx + deClusterHigh] 4911 ; dx:ax = first cluster (FAT32) 4912 @@: 4913 0 0000E25A EBAF jmp scan_dir_yyname_loop 4915 4916 4917 got_yyentry: section_of_function 4918 4919 4920 ; (boot32.asm code starts here) 4921 0 0000E25C 8B1E[9C02] mov bx, [load_yy_direntry + deSize] 0 0000E260 A1[9E02] mov ax, [load_yy_direntry + deSize + 2] 4924 ; ax:bx = file size 0 0000E263 8A16[8C02] mov dl, [load_yy_direntry + 12] 4926 ; dl = FAT+ size bits 0 0000E267 88D6 mov dh, dl 0 0000E269 81E207E0 and dx, 0E007h ; obtain bits 7-5 and 2-0 0 0000E26D 7409 jz @F 0 0000E26F BA[0000] mov dx, msg.yy_too_large 0 0000E272 B80B02 mov ax, 020Bh 0 0000E275 E91EFE jmp yy_boot_error 4933 @@: 0 0000E278 895EC4 mov word [bp + ldFileSize], bx 0 0000E27B 8946C6 mov word [bp + ldFileSize + 2], ax 4936 0 0000E27E 09D8 or ax, bx 0 0000E280 750C jnz @F 4939 0 0000E282 E83D00 call yy_boot_file_not_found 0 0000E285 BA[0000] mov dx, msg.yy_empty 0 0000E288 B80C02 mov ax, 020Ch 0 0000E28B E908FE jmp yy_boot_error 4944 @@: 4945 4946 ; get starting cluster of file 0 0000E28E 31D2 xor dx, dx 0 0000E290 A1[9A02] mov ax, [load_yy_direntry + deClusterLow] 4949 ; = first cluster (not FAT32) 4950 0 0000E293 807EE620 cmp byte [bp + ldFATType], 32 0 0000E297 7504 jne @F 0 0000E299 8B16[9402] mov dx, [load_yy_direntry + deClusterHigh] 4954 ; dx:ax = first cluster (FAT32) 4955 @@: 4956 0 0000E29D 80E60F and dh, 0Fh 0 0000E2A0 8946F0 mov word [bp + lsvFirstCluster], ax 0 0000E2A3 8956F2 mov word [bp + lsvFirstCluster + 2], dx 4960 0 0000E2A6 8946C8 mov word [bp + ldCurrentCluster], ax 0 0000E2A9 8956CA mov word [bp + ldCurrentCluster + 2], dx 0 0000E2AC 31DB xor bx, bx 0 0000E2AE 895ECC mov word [bp + ldCurrentSeek], bx 0 0000E2B1 895ECE mov word [bp + ldCurrentSeek + 2], bx 0 0000E2B4 E847F8 call check_clust 0 0000E2B7 7303E9C006 jc error_badchain 4968 0 0000E2BC 800E[0000]80 setopt [internalflags3], dif3_partition_changed 4970 0 0000E2C1 C3 retn 4972 4973 4974 yy_boot_file_not_found: 4975 %if _CONFIG 0 0000E2C2 8B3E[0000] mov di, word [yy_boot_attempt_open_pathname] 0 0000E2C6 85FF test di, di 0 0000E2C8 7413 jz @F 0 0000E2CA 16 push ss 0 0000E2CB 07 pop es 0 0000E2CC E8[0000] call retry_open_scriptspath 0 0000E2CF 750C jnz @F 0 0000E2D1 8B26[0000] mov sp, word [yy_boot_attempt_open_stack] 0 0000E2D5 8026[0300]EF clropt [internalflags3], dif3_auxbuff_guarded_1 0 0000E2DA E9E3FE jmp yy_boot_open_file 4986 %endif 4987 @@: 4988 .if: 0 0000E2DD F606[0300]08 testopt [internalflags3], dif3_in_if 0 0000E2E2 7403E9[0000] jnz if_exists_not_found 0 0000E2E7 C3 retn 4992 4993 4994 yy_boot_init_dir: section_of_function 0 0000E2E8 31C0 xor ax, ax 0 0000E2EA 89461C mov [bp + bsBPB + bpbHiddenSectors + 0], ax 0 0000E2ED 89461E mov [bp + bsBPB + bpbHiddenSectors + 2], ax 0 0000E2F0 F9 stc 0 0000E2F1 89DE mov si, bx 0 0000E2F3 AC lodsb 0 0000E2F4 E881E7 call parseloadunit_default_sdp.cf 0 0000E2F7 7506 jnz .have_filename 5003 0 0000E2F9 BA[0000] mov dx, msg.yy_requires_filename 0 0000E2FC E9A1FD jmp yy_boot_disp_error_1 5006 5007 .have_filename: 0 0000E2FF BB[5405] mov bx, load_yyname_input 0 0000E302 E82CE3 call bootcmd.pathname_parse_super 5010 0 0000E305 F606[0000]07 testopt [internalflags3], dif3_load_is_dp 0 0000E30A 754E jnz .load_yy_from_ldp 5013 0 0000E30C 8A1E[3805] mov bl, [load_partition] 0 0000E310 803E[4002]80 cmp byte [load_unit], 80h 0 0000E315 721F jb .p_f_is_diskette 0 0000E317 84DB test bl, bl ; partition specified ? 0 0000E319 7503E9[0000] jz error ; no, error --> 5019 0 0000E31E E8B7F9 call query_geometry 5021 0 0000E321 B9[0E20] mov cx, load_yy_from_partition 0 0000E324 E809F8 call scan_partitions 0 0000E327 E898FF call yy_boot_file_not_found 0 0000E32A BA[0000] mov dx, msg.boot_partition_not_found 0 0000E32D B80602 mov ax, 0206h 0 0000E330 E8[0000] call setrc 0 0000E333 E932E5 jmp bootcmd.fail 5029 5030 5031 .p_f_is_diskette: 0 0000E336 84DB test bl, bl ; partition specified ? 0 0000E338 7403E9[0000] jnz error ; yes, error --> 5034 0 0000E33D E898F9 call query_geometry 5036 0 0000E340 31C0 xor ax, ax 0 0000E342 31D2 xor dx, dx 5039 @@: 0 0000E344 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000E348 52 push dx 0 0000E349 50 push ax 0 0000E34A E857FB call read_ae_512_bytes 5044 0 0000E34D 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000E354 7510 jne boot_sigmismatch 0 0000E356 58 pop ax 0 0000E357 5A pop dx 5049 0 0000E358 EB62 jmp load_yy_common 5051 5052 5053 .load_yy_from_ldp: 0 0000E35A E87BF9 call query_geometry 0 0000E35D A1[2805] mov ax, word [load_partition_sector] 0 0000E360 8B16[2A05] mov dx, word [load_partition_sector + 2] 0 0000E364 EBDE jmp @B 5058 %endif 5059 5060 5061 boot_sigmismatch: 0 0000E366 BA[0000] mov dx, msg.bootfail_sig 0 0000E369 B80702 mov ax, 0207h 5064 @@: 0 0000E36C E8[0000] call setrc 0 0000E36F E9F6E4 jmp bootcmd.fail 5067 5068 boot_codemismatch: 0 0000E372 BA[0000] mov dx, msg.bootfail_code 0 0000E375 B80802 mov ax, 0208h 0 0000E378 EBF2 jmp @B 5072 5073 boot_secsizemismatch: 0 0000E37A BA[0000] mov dx, msg.bootfail_secsizediffer 0 0000E37D B80902 mov ax, 0209h 0 0000E380 EBEA jmp @B 5077 5078 5079 %if _INPUT_FILE_BOOT || _EXTENSIONS 5080 ; INP: es:si -> partition table entry, 5081 ; si = load_partition_table .. load_partition_table+48, 5082 ; es = ss 5083 ; bp + di -> above part table metadata, 5084 ; dwo [bp + di - 4] = root (outermost extended position) 5085 ; dwo [bp + di - 8] = base (current table position) 5086 ; CHG: ax, bx, (cx), dx 5087 load_yy_from_partition: 5088 d4 call d4message 5089 d4 asciz "In load_yy_from_partition",13,10 5090 0 0000E382 A0[3905] mov al, byte [load_current_partition] 0 0000E385 3A06[3805] cmp al, byte [load_partition] 0 0000E389 7401 je .gotit 0 0000E38B C3 retn 5095 5096 .gotit: 5097 d4 call d4message 5098 d4 asciz "In load_yy_from_partition.gotit",13,10 5099 0 0000E38C 8B43F8 mov ax, [bp + di - 8] 0 0000E38F 8B53FA mov dx, [bp + di - 6] ; base (current table position) 5102 0 0000E392 26034408 add ax, [es:si + 8] 0 0000E396 2613540A adc dx, [es:si + 8 + 2] ; add offset to logical partition 5105 0 0000E39A 26894408 mov word [es:si + 8], ax 0 0000E39E 2689540A mov word [es:si + 8 + 2], dx ; store in partition table entry 5108 0 0000E3A2 89EC mov sp, bp 0 0000E3A4 5D pop bp ; restore bp (scan_partitions) 0 0000E3A5 5B pop bx ; discard ret address (scan_partitions) 5112 5113 ; dx:ax = absolute sector number 0 0000E3A6 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000E3AA 50 push ax 0 0000E3AB 52 push dx 0 0000E3AC E8F5FA call read_ae_512_bytes ; load partition boot sector 5118 0 0000E3AF 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000E3B6 75AE jne boot_sigmismatch 5121 0 0000E3B8 31C9 xor cx, cx 5123 ; cmp word [es:0], cx 5124 ; je boot_codemismatch 5125 0 0000E3BA 5A pop dx 0 0000E3BB 58 pop ax 5128 5129 ; dx:ax = boot sector 5130 ; byte [load_unit] = unit 5131 ; es:0-> read sector 5132 load_yy_common: 0 0000E3BC 26A31C00 mov word [es:bsBPB + bpbHiddenSectors], ax 0 0000E3C0 2689161E00 mov word [es:bsBPB + bpbHiddenSectors + 2], dx 5135 0 0000E3C5 8B5E0B mov bx, [bp + bsBPB + bpbBytesPerSector] 0 0000E3C8 263B1E0B00 cmp bx, [es:bsBPB + bpbBytesPerSector] 0 0000E3CD 75AB jne boot_secsizemismatch 5139 5140 ; preserve some variables from our pseudo BPB 0 0000E3CF 31C0 xor ax, ax 0 0000E3D1 FF7618 push word [bp + bsBPB + bpbCHSSectors] 0 0000E3D4 268F061800 pop word [es:bsBPB + bpbCHSSectors] 0 0000E3D9 FF761A push word [bp + bsBPB + bpbCHSHeads] 0 0000E3DC 268F061A00 pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 5146 0 0000E3E1 8B5EEA mov bx, word [bp + ldParaPerSector] 0 0000E3E4 D1EB shr bx, 1 0 0000E3E6 895ED4 mov word [bp + ldEntriesPerSector], bx 5150 0 0000E3E9 2639061600 cmp word [es:bsBPB + bpbSectorsPerFAT], ax 0 0000E3EE 8A5E40 mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 0 0000E3F1 7407 je .is_fat32 0 0000E3F3 26881E2400 mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 0 0000E3F8 EB05 jmp short .was_fat1612 5156 .is_fat32: 0 0000E3FA 26881E4000 mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 5158 .was_fat1612: 5159 0 0000E3FF 06 push es 0 0000E400 1E push ds 0 0000E401 06 push es 0 0000E402 1F pop ds 0 0000E403 31F6 xor si, si ; -> BPB from boot partition 0 0000E405 16 push ss 0 0000E406 07 pop es 0 0000E407 BF[0002] mov di, load_data - LOADDATA2 ; -> our copy of a BPB 0 0000E40A B95A00 mov cx, (bsBPB + ebpbNew + BPBN_size) 0 0000E40D F3A4 rep movsb ; get the BPB 5170 0 0000E40F 1F pop ds 5172 0 0000E410 394616 cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 0 0000E413 740B je @F ; is FAT32 --> 0 0000E415 BE[2402] mov si, load_data - LOADDATA2 + bsBPB + bpbNew 0 0000E418 BF[4002] mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 0 0000E41B B91A00 mov cx, BPBN_size 0 0000E41E F3A4 rep movsb ; clone the FAT16 / FAT12 BPBN 5179 ; to where the FAT32 BPBN lives 5180 @@: 0 0000E420 07 pop es 5182 5183 .outofmem: equ query_geometry.out_of_memory_error 5184 0 0000E421 FF36[0000] push word [auxbuff_segorsel] 0 0000E425 8F46F8 pop word [bp + lsvFATSeg] 0 0000E428 804EE702 or byte [bp + ldFlags], ldfFATInvalid 0 0000E42C B8FFFF mov ax, -1 0 0000E42F 8946F4 mov word [bp + lsvFATSector], ax 0 0000E432 8946F6 mov word [bp + lsvFATSector + 2], ax 5191 0 0000E435 E80705 call initialise_fs 0 0000E438 C3 retn 5194 5195 5196 %if _INPUT_FILE_BOOT 5197 ; INP: [load_input_file], dif2_input_file_boot 5198 ; OUT: most recent file closed, flag cleared if no longer file 5199 ; CHG: di, bx, ax 5200 yy_boot_close_file: 0 0000E439 A1[2005] mov ax, word [load_input_file.active] 0 0000E43C 48 dec ax 0 0000E43D 790B jns .next 0 0000E43F 8026[0300]FD clropt [internalflags2], dif2_input_file_boot 0 0000E444 800E[0300]04 setopt [internalflags2], dif2_closed_input_file_boot 0 0000E449 C3 retn 5207 .next: 0 0000E44A A3[2005] mov word [load_input_file.active], ax 0 0000E44D C3 retn 5210 %endif 5211 5212 5213 ; INP: bx -> load data to get 5214 ; OUT: [load_data_lowest] = LOADDATA[123], lsv, BPB 5215 ; CHG: es, ax, di, si 5216 yy_boot_get.bx: 0 0000E44E 16 push ss 0 0000E44F 07 pop es 5219 5220 %if _INPUT_FILE_BOOT 0 0000E450 51 push cx 0 0000E451 BF[C001] mov di, load_data_lowest 0 0000E454 B95000 mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 0 0000E457 89DE mov si, bx 0 0000E459 F3A5 rep movsw 0 0000E45B 59 pop cx 5227 %endif 0 0000E45C C3 retn 5229 5230 5231 ; INP: [load_data_lowest] = LOADDATA3 5232 ; bx -> load data to set 5233 ; CHG: es, ax, di, si 5234 ; Note: Preserves flags (ZF, CF) 5235 yy_boot_update.bx: 0 0000E45D 9C pushf 5237 0 0000E45E 16 push ss 0 0000E45F 07 pop es 5240 5241 %if _INPUT_FILE_BOOT 0 0000E460 51 push cx 0 0000E461 BE[C001] mov si, load_data_lowest 0 0000E464 B90800 mov cx, LOADDATA3_size >> 1 0 0000E467 89DF mov di, bx 0 0000E469 F3A5 rep movsw 0 0000E46B 59 pop cx 5248 %endif 0 0000E46C 9D popf ; ZF, CF 0 0000E46D C3 retn 5251 5252 5253 %if _INPUT_FILE_BOOT 5254 ; INP: word [load_input_file.active] 5255 ; OUT: bx -> load input data structure 5256 ; CHG: ax 5257 yy_calculate_structure: 0 0000E46E 52 push dx 0 0000E46F B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 0000E472 F726[2005] mul word [load_input_file.active] 5261 5262 ; test dx, dx 5263 ; jnz .error 0 0000E476 5A pop dx 5265 0 0000E477 93 xchg bx, ax 0 0000E478 81C3[A002] add bx, load_input_file 0 0000E47C C3 retn 5269 %endif 5270 5271 5272 guard_auxbuff_return: 0 0000E47D F606[0300]70 testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 | dif3_auxbuff_guarded_3 0 0000E482 7506 jnz @F 0 0000E484 800E[0300]10 setopt [internalflags3], dif3_auxbuff_guarded_1 5278 ; (NC) 0 0000E489 C3 retn 5280 5281 @@: 0 0000E48A BA[0000] mov dx, msg.guard_auxbuff_error 0 0000E48D E8[0000] call putsz 0 0000E490 F9 stc ; (CY) 0 0000E491 C3 retn 5286 5287 5288 ; INP: [load_input_file] = active file 5289 ; cx = how many bytes to read 5290 ; es:dx -> buffer 5291 ; OUT: CY if error reading 5292 ; NC if success 5293 ; ax = how many bytes read 5294 ; CHG: bx 5295 ; STT: ds = ss 5296 %if _INPUT_FILE_BOOT 5297 yy_boot_read: 0 0000E492 E8D9FF call yy_calculate_structure 5299 5300 .bx: section_of_function yy_boot_read 5301 %else 5302 yy_boot_read.bx: section_of_function 5303 %endif 5304 lframe near 5305 lvar word, length 5306 lvar word, length_this_cluster 5307 lvar dword, bytes_per_cluster 5308 lvar dword, how_far_in_cluster 0 0000E495 5589E58D66F4 lenter 5310 lvar dword, pointer 0 0000E49B 06 push es 0 0000E49C 52 push dx 5313 lvar word, load_input_file_structure 0 0000E49D 53 push bx 0 0000E49E 31C0 xor ax, ax 5316 lvar word, did_guard_auxbuff 0 0000E4A0 50 push ax 5318 lvar word, read_how_many 0 0000E4A1 50 push ax 0 0000E4A2 52 push dx 0 0000E4A3 56 push si 0 0000E4A4 57 push di 0 0000E4A5 51 push cx 5324 0 0000E4A6 FF36[0000] push word [errret] 0 0000E4AA FF36[0000] push word [throwret] 0 0000E4AE FF36[0000] push word [throwsp] 5328 0 0000E4B2 55 push bp 5330 0 0000E4B3 C706[0000][3423] mov word [errret], .err_ret 0 0000E4B9 C706[0000][3423] mov word [throwret], .err_ret 0 0000E4BF 8926[0000] mov word [throwsp], sp 5334 5335 ; bx -> load_input_file structure 0 0000E4C3 E888FF call yy_boot_get.bx 5337 0 0000E4C6 E8B4FF call guard_auxbuff_return 0 0000E4C9 7303E9A801 jc .error 0 0000E4CE FF46EC inc word [bp + ?did_guard_auxbuff] 5341 0 0000E4D1 B8FFFF mov ax, -1 0 0000E4D4 A3[F601] mov word [load_data - LOADDATA2 + lsvFATSector + 2], ax 0 0000E4D7 A3[F401] mov word [load_data - LOADDATA2 + lsvFATSector + 0], ax 0 0000E4DA 800E[E701]04 setopt [load_ldflags], ldfFATBuffered 5346 0 0000E4DF 8B16[C601] mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 0 0000E4E3 A1[C401] mov ax, word [load_data - LOADDATA2 + ldFileSize] 5349 0 0000E4E6 2B06[CC01] sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 0 0000E4EA 1B16[CE01] sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 5352 ; dx:ax = read at most this many bytes 0 0000E4EE 7304 jnc @F 5354 ; file size below current seek 0 0000E4F0 31C0 xor ax, ax 0 0000E4F2 31D2 xor dx, dx ; = read at most zero bytes 5357 @@: 0 0000E4F4 85D2 test dx, dx 0 0000E4F6 7506 jnz .use_count 0 0000E4F8 39C8 cmp ax, cx ; dx:ax >= cx ? 0 0000E4FA 7302 jae .use_count ; yes, use cx as count to read 0 0000E4FC 89C1 mov cx, ax ; no, use (dx:)ax as count to read 5363 .use_count: 0 0000E4FE 85C9 test cx, cx ; any more to read ? 0 0000E500 7503E97001 jz .success ; no, reached the end --> 0 0000E505 894EFE mov word [bp + ?length], cx 5367 5368 .next_cluster: 0 0000E508 8B36[CE01] mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 0 0000E50C 8B3E[CC01] mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 0 0000E510 A1[0B02] mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000E513 F726[E801] mul word [load_data - LOADDATA2 + ldClusterSize] 5373 0 0000E517 8946F8 mov word [bp + ?bytes_per_cluster], ax 0 0000E51A 8956FA mov word [bp + ?bytes_per_cluster + 2], dx 0 0000E51D 83E801 sub ax, 1 0 0000E520 83DA00 sbb dx, 0 0 0000E523 21D6 and si, dx 0 0000E525 21C7 and di, ax ; how far are we into cluster 5380 0 0000E527 897EF4 mov word [bp + ?how_far_in_cluster], di 0 0000E52A 8976F6 mov word [bp + ?how_far_in_cluster + 2], si 5383 0 0000E52D F7DE neg si 0 0000E52F F7DF neg di 0 0000E531 83DE00 sbb si, byte 0 ; neg si:di 5387 0 0000E534 037EF8 add di, word [bp + ?bytes_per_cluster] 0 0000E537 1376FA adc si, word [bp + ?bytes_per_cluster + 2] 5390 ; cluster size - how far we are 5391 ; = how much to read from this cluster 0 0000E53A 85F6 test si, si 0 0000E53C 7506 jnz .use_count_2 0 0000E53E 39CF cmp di, cx 0 0000E540 7302 jae .use_count_2 0 0000E542 89F9 mov cx, di 5397 .use_count_2: 0 0000E544 894EFC mov word [bp + ?length_this_cluster], cx 5399 5400 .next_sector: 0 0000E547 A1[C801] mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 0 0000E54A 8B16[CA01] mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 0 0000E54E E8ADF5 call check_clust 0 0000E551 7303E92001 jc .error 0 0000E556 E87AF4 call clust_to_first_sector 0 0000E559 8B1E[0B02] mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000E55D 8B7EF4 mov di, word [bp + ?how_far_in_cluster] 0 0000E560 8B76F6 mov si, word [bp + ?how_far_in_cluster + 2] 0 0000E563 87D6 xchg dx, si 0 0000E565 97 xchg ax, di 0 0000E566 F7F3 div bx 5412 ; dx = byte offset into sector 5413 ; ax = sector offset into cluster's data 0 0000E568 01C7 add di, ax 0 0000E56A 83D600 adc si, 0 0 0000E56D 87D6 xchg dx, si 0 0000E56F 97 xchg ax, di 5418 ; dx:ax = sector in fs 5419 ; si = byte offset 5420 0 0000E570 89F1 mov cx, si ; = byte offset 0 0000E572 F7D9 neg cx ; - byte offset 0 0000E574 01D9 add cx, bx ; sector size - byte offset 5424 ; = length this sector 0 0000E576 3B4EFC cmp cx, word [bp + ?length_this_cluster] 0 0000E579 7603 jbe @F ; sector has less than requested --> 0 0000E57B 8B4EFC mov cx, word [bp + ?length_this_cluster] 5428 ; fill entire remaining request 5429 @@: 0 0000E57E 8B1E[0000] mov bx, word [auxbuff_segorsel] 0 0000E582 813E[0B02]0010 cmp word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector], 4096 0 0000E588 7706 ja .invalidatefat 0 0000E58A 81C30001 add bx, paras(4096) ; => use upper buffer for file data 5434 ; Note that the FAT12 straddling entry's second sector 5435 ; is reloaded even if the entry's first sector is still 5436 ; buffered. That means we do not have to invalidate the 5437 ; second sector here, so even with a 4 KiB sector size 5438 ; the upper buffer is free for file data use here. 0 0000E58E EB0A jmp @F 5440 .invalidatefat: 5441 ; need to invalidate FAT buffer 0 0000E590 830E[F601]FF or word [load_data - LOADDATA2 + lsvFATSector + 2], -1 0 0000E595 830E[F401]FF or word [load_data - LOADDATA2 + lsvFATSector + 0], -1 5444 @@: 5445 0 0000E59A 813E[0B02]0002 cmp word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector], 512 0 0000E5A0 7745 ja .nodatabuffer ; data buffer is only 512 bytes. too small --> 0 0000E5A2 F606[E701]08 testopt [load_ldflags], ldfDataBuffered 0 0000E5A7 743E jz .nodatabuffer ; data buffer not used --> 0 0000E5A9 3916[DA01] cmp word [load_data - LOADDATA2 + ldDataSector + 2], dx 0 0000E5AD 7512 jne .filldatabuffer 0 0000E5AF 3906[D801] cmp word [load_data - LOADDATA2 + ldDataSector], ax 0 0000E5B3 750C jne .filldatabuffer 5454 .havedatabuffer: 0 0000E5B5 8EC3 mov es, bx ; es => sector buffer to read into 0 0000E5B7 06 push es 0 0000E5B8 1E push ds 0 0000E5B9 56 push si 0 0000E5BA 51 push cx ; must match stack frame for .copydatabuffer 0 0000E5BB 8E1E[D601] mov ds, word [load_data - LOADDATA2 + ldDataSegment] 5461 ; ds => data buffer 0 0000E5BF EB15 jmp .copydatabuffer 5463 5464 .filldatabuffer: 0 0000E5C1 8916[DA01] mov word [load_data - LOADDATA2 + ldDataSector + 2], dx 0 0000E5C5 A3[D801] mov word [load_data - LOADDATA2 + ldDataSector], ax 5467 ; update buffered data sector 0 0000E5C8 E8EBF8 call read_sector ; actually read data from disk 0 0000E5CB 06 push es 0 0000E5CC 1E push ds 0 0000E5CD 56 push si 0 0000E5CE 51 push cx 0 0000E5CF 06 push es 0 0000E5D0 1F pop ds ; ds => sector buffer to read from 0 0000E5D1 368E06[D601] mov es, word [ss:load_data - LOADDATA2 + ldDataSegment] 5476 ; es => data buffer 5477 .copydatabuffer: 0 0000E5D6 31FF xor di, di ; es:di -> sector buffer to read into 0 0000E5D8 31F6 xor si, si ; ds:si -> data buffer 0 0000E5DA 368B0E[0B02] mov cx, word [ss:load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5481 ; cx = sector size 0 0000E5DF F3A4 rep movsb ; get/set buffered data 0 0000E5E1 59 pop cx 0 0000E5E2 5E pop si 0 0000E5E3 1F pop ds 0 0000E5E4 07 pop es 0 0000E5E5 EB03 jmp .databufferdone 5488 5489 .nodatabuffer: 0 0000E5E7 E8CCF8 call read_sector 5491 .databufferdone: 0 0000E5EA 1E push ds 5493 0 0000E5EB 06 push es 5495 ; es:si -> data in sector buffer 0 0000E5EC C47EF0 les di, [bp + ?pointer] 5497 ; es:di -> buffer 0 0000E5EF 014EEA add word [bp + ?read_how_many], cx 0 0000E5F2 294EFC sub word [bp + ?length_this_cluster], cx 0 0000E5F5 294EFE sub word [bp + ?length], cx 0 0000E5F8 010E[CC01] add word [load_data - LOADDATA2 + ldCurrentSeek], cx 0 0000E5FC 8316[CE01]00 adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 0 0000E601 014EF4 add word [bp + ?how_far_in_cluster], cx 0 0000E604 8356F600 adc word [bp + ?how_far_in_cluster + 2], 0 0 0000E608 1F pop ds ; ds:si -> data in sector buffer 0 0000E609 F3A4 rep movsb ; copy 0 0000E60B 897EF0 mov word [bp + ?pointer], di 5508 ; update pointer 0 0000E60E 1F pop ds 5510 0 0000E60F 837EFC00 cmp word [bp + ?length_this_cluster], 0 0 0000E613 7403E92FFF jne .next_sector 5513 0 0000E618 8B7EF8 mov di, word [bp + ?bytes_per_cluster] 0 0000E61B 8B76FA mov si, word [bp + ?bytes_per_cluster + 2] 0 0000E61E 397EF4 cmp word [bp + ?how_far_in_cluster], di 0 0000E621 7505 jne @F 0 0000E623 3976F6 cmp word [bp + ?how_far_in_cluster + 2], si 0 0000E626 7408 je @FF 5520 @@: 0 0000E628 837EFE00 cmp word [bp + ?length], 0 0 0000E62C 7548 jne .error 0 0000E62E EB45 jmp .success 5524 5525 @@: 0 0000E630 A1[C801] mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 0 0000E633 8B16[CA01] mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 0 0000E637 E8C4F4 call check_clust 0 0000E63A 723A jc .error 0 0000E63C E8C1F3 call clust_next.dxax 0 0000E63F 731B jnc @F ; (NC) --> 0 0000E641 B8F6FF mov ax, 0FFF8h - 2 0 0000E644 BAFF0F mov dx, 0FFFh 0 0000E647 8B3E[CC01] mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 0 0000E64B 8B36[CE01] mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 0 0000E64F 3B36[C601] cmp si, word [load_data - LOADDATA2 + ldFileSize + 2] 0 0000E653 7506 jne .set_error 0 0000E655 3B3E[C401] cmp di, word [load_data - LOADDATA2 + ldFileSize] 0 0000E659 7401 je .do_not_set_error ; if same then NC --> 5540 .set_error: 0 0000E65B F9 stc 5542 .do_not_set_error: 5543 @@: 0 0000E65C 9C pushf 0 0000E65D 83C002 add ax, 2 0 0000E660 83D200 adc dx, 0 0 0000E663 A3[C801] mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 0 0000E666 8916[CA01] mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 0 0000E66A 9D popf ; CF 0 0000E66B 7209 jc .error 0 0000E66D 8B4EFE mov cx, word [bp + ?length] 0 0000E670 E303 jcxz .success 0 0000E672 E993FE jmp .next_cluster 5554 5555 .success: 0 0000E675 A8 db __TEST_IMM8 ; (skip stc, NC) 5557 .error: 0 0000E676 F9 stc 5559 0 0000E677 5D pop bp 5561 0 0000E678 8F06[0000] pop word [throwsp] 0 0000E67C 8F06[0000] pop word [throwret] ; restore throw destination 0 0000E680 8F06[0000] pop word [errret] 5565 0 0000E684 9C pushf 0 0000E685 F646EC01 testopt [bp + ?did_guard_auxbuff], 1 0 0000E689 7405 jz @F 0 0000E68B 8026[0300]EF clropt [internalflags3], dif3_auxbuff_guarded_1 5570 @@: 0 0000E690 8026[E701]FB clropt [load_ldflags], ldfFATBuffered 0 0000E695 9D popf ; CF 5573 0 0000E696 8B5EEE mov bx, word [bp + ?load_input_file_structure] 5575 ; bx -> load_input_file structure 0 0000E699 E8C1FD call yy_boot_update.bx 5577 0 0000E69C 59 pop cx 0 0000E69D 5F pop di 0 0000E69E 5E pop si 0 0000E69F 5A pop dx 0 0000E6A0 58 pop ax ; pop from ?read_how_many 0 0000E6A1 8E46F2 mov es, word [bp + ?pointer + 2] 0 0000E6A4 89EC5D lleave 0 0000E6A7 C3 retn 5586 5587 .err_ret: 0 0000E6A8 8B26[0000] mov sp, word [throwsp] ; restore stack 5589 ; (needed here if returned to errret) 0 0000E6AC EBC8 jmp .error 5591 5592 5593 ; INP: [load_input_file] = active file 5594 ; cx:dx = signed seek distance from current 5595 ; OUT: - 5596 ; CHG: ax, bx, cx, dx 5597 ; STT: ds = es = ss 5598 ; REM: negative seek must not seek to before SOF 5599 %if _INPUT_FILE_BOOT 5600 yy_boot_seek_current: 0 0000E6AE E8BDFD call yy_calculate_structure 5602 5603 .bx: section_of_function yy_boot_seek_current 5604 %else 5605 yy_boot_seek_current.bx: section_of_function 5606 %endif 5607 lframe near 5608 lvar dword, length 5609 lvar dword, length_this_cluster 5610 lvar dword, bytes_per_cluster 5611 lvar dword, how_far_in_cluster 0 0000E6B1 5589E58D66F0 lenter 5613 lvar dword, seek_distance 0 0000E6B7 51 push cx 0 0000E6B8 52 push dx 5616 lvar word, load_input_file_structure 0 0000E6B9 53 push bx 0 0000E6BA 31C0 xor ax, ax 5619 lvar word, did_guard_auxbuff 0 0000E6BC 50 push ax 0 0000E6BD 56 push si 0 0000E6BE 57 push di 5623 0 0000E6BF FF36[0000] push word [errret] 0 0000E6C3 FF36[0000] push word [throwret] 0 0000E6C7 FF36[0000] push word [throwsp] 5627 0 0000E6CB 55 push bp 5629 0 0000E6CC C706[0000][9D25] mov word [errret], .err_ret 0 0000E6D2 C706[0000][9D25] mov word [throwret], .err_ret 0 0000E6D8 8926[0000] mov word [throwsp], sp 5633 5634 ; bx -> load_input_file structure 0 0000E6DC E86FFD call yy_boot_get.bx 5636 0 0000E6DF E89BFD call guard_auxbuff_return 0 0000E6E2 7303E9FF01 jc .error 0 0000E6E7 FF46E8 inc word [bp + ?did_guard_auxbuff] 5640 0 0000E6EA B8FFFF mov ax, -1 0 0000E6ED A3[F601] mov word [load_data - LOADDATA2 + lsvFATSector + 2], ax 0 0000E6F0 A3[F401] mov word [load_data - LOADDATA2 + lsvFATSector + 0], ax 0 0000E6F3 800E[E701]04 setopt [load_ldflags], ldfFATBuffered 5645 0 0000E6F8 85C9 test cx, cx 0 0000E6FA 7975 jns .plus 5648 0 0000E6FC 8B36[CE01] mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 0 0000E700 8B3E[CC01] mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 0 0000E704 A1[0B02] mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000E707 F726[E801] mul word [load_data - LOADDATA2 + ldClusterSize] 5653 0 0000E70B 8946F4 mov word [bp + ?bytes_per_cluster], ax 0 0000E70E 8956F6 mov word [bp + ?bytes_per_cluster + 2], dx 0 0000E711 83E801 sub ax, 1 0 0000E714 83DA00 sbb dx, 0 0 0000E717 F7D0 not ax 0 0000E719 F7D2 not dx 5660 0 0000E71B 56 push si 0 0000E71C 57 push di 5663 0 0000E71D 21D6 and si, dx 0 0000E71F 21C7 and di, ax ; start seek of current cluster 5666 0 0000E721 58 pop ax 0 0000E722 5A pop dx ; current seek 5669 0 0000E723 0346EC add ax, word [bp + ?seek_distance] 0 0000E726 1356EE adc dx, word [bp + ?seek_distance + 2] 0 0000E729 7203E9B801 jnc .error ; target seek 5673 5674 ; if the cluster is invalid, need to reset 0 0000E72E 813E[CA01]FF0F cmp word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 0 0000E734 7207 jb @F 0 0000E736 833E[C801]F8 cmp word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 0 0000E73B 7308 jae .minus_reset 5679 @@: 5680 0 0000E73D 39F2 cmp dx, si ; is target seek 5682 ; >= start seek of current cluster? 0 0000E73F 7502 jne @F 0 0000E741 39F8 cmp ax, di 5685 @@: 0 0000E743 7322 jae .minus_simple ; yes, simple --> 5687 5688 .minus_reset: 5689 ; reset current cluster to first, seek to 0 0 0000E745 FF36[F201] push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 0 0000E749 FF36[F001] push word [load_data - LOADDATA2 + lsvFirstCluster] 0 0000E74D 8F06[C801] pop word [load_data - LOADDATA2 + ldCurrentCluster] 0 0000E751 8F06[CA01] pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 0 0000E755 8326[CC01]00 and word [load_data - LOADDATA2 + ldCurrentSeek], 0 0 0000E75A 8326[CE01]00 and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 5696 5697 ; set distance 0 0000E75F 8946EC mov word [bp + ?seek_distance], ax 0 0000E762 8956EE mov word [bp + ?seek_distance + 2], dx 5700 ; use positive seek code 0 0000E765 EB0A jmp .plus 5702 5703 .minus_simple: 5704 ; just set seek, current cluster still valid 0 0000E767 A3[CC01] mov word [load_data - LOADDATA2 + ldCurrentSeek], ax 0 0000E76A 8916[CE01] mov word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 0 0000E76E E97501 jmp .return 5708 5709 .plus: 0 0000E771 8B16[C601] mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 0 0000E775 A1[C401] mov ax, word [load_data - LOADDATA2 + ldFileSize] 5712 0 0000E778 2B06[CC01] sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 0 0000E77C 1B16[CE01] sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 5715 0 0000E780 720A jc .eof 5717 ; dx:ax = how far we can seek within file 0 0000E782 3B56EE cmp dx, word [bp + ?seek_distance + 2] 0 0000E785 7503 jne @F 0 0000E787 3B46EC cmp ax, word [bp + ?seek_distance] 5721 @@: 0 0000E78A 771D ja .not_eof 5723 .eof: 0 0000E78C 8B46EC mov ax, word [bp + ?seek_distance] 0 0000E78F 8B56EE mov dx, word [bp + ?seek_distance + 2] 0 0000E792 0106[CC01] add word [load_data - LOADDATA2 + ldCurrentSeek], ax 0 0000E796 1116[CE01] adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 0 0000E79A C706[C801]F8FF mov word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 0 0000E7A0 C706[CA01]FF0F mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 0 0000E7A6 E93D01 jmp .return 5731 5732 .not_eof: 0 0000E7A9 8B4EEC mov cx, word [bp + ?seek_distance] 0 0000E7AC 8B5EEE mov bx, word [bp + ?seek_distance + 2] 0 0000E7AF 85DB test bx, bx 0 0000E7B1 7507 jnz @F 0 0000E7B3 85C9 test cx, cx 0 0000E7B5 7503E92C01 jz .return 5739 @@: 0 0000E7BA 894EFC mov word [bp + ?length], cx 0 0000E7BD 895EFE mov word [bp + ?length + 2], bx 5742 5743 ; bx:cx = length 5744 .next_cluster: 0 0000E7C0 8B36[CE01] mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 0 0000E7C4 8B3E[CC01] mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 0 0000E7C8 A1[0B02] mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000E7CB F726[E801] mul word [load_data - LOADDATA2 + ldClusterSize] 5749 0 0000E7CF 8946F4 mov word [bp + ?bytes_per_cluster], ax 0 0000E7D2 8956F6 mov word [bp + ?bytes_per_cluster + 2], dx 0 0000E7D5 83E801 sub ax, 1 0 0000E7D8 83DA00 sbb dx, 0 0 0000E7DB 21D6 and si, dx 0 0000E7DD 21C7 and di, ax ; how far are we into cluster 5756 0 0000E7DF 897EF0 mov word [bp + ?how_far_in_cluster], di 0 0000E7E2 8976F2 mov word [bp + ?how_far_in_cluster + 2], si 5759 0 0000E7E5 F7DE neg si 0 0000E7E7 F7DF neg di 0 0000E7E9 83DE00 sbb si, byte 0 ; neg si:di 5763 0 0000E7EC 037EF4 add di, word [bp + ?bytes_per_cluster] 0 0000E7EF 1376F6 adc si, word [bp + ?bytes_per_cluster + 2] 5766 ; cluster size - how far we are 5767 ; = how much to read from this cluster 0 0000E7F2 39DE cmp si, bx 0 0000E7F4 7502 jne @F 0 0000E7F6 39CF cmp di, cx 5771 @@: 0 0000E7F8 7304 jae .use_count_2 0 0000E7FA 89F9 mov cx, di 0 0000E7FC 89F3 mov bx, si 5775 .use_count_2: 5776 ; bx:cx = how far to seek in this cluster 0 0000E7FE 894EF8 mov word [bp + ?length_this_cluster], cx 0 0000E801 895EFA mov word [bp + ?length_this_cluster + 2], bx 5779 5780 .next_sector: 0 0000E804 A1[C801] mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 0 0000E807 8B16[CA01] mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 0 0000E80B E8F0F2 call check_clust 0 0000E80E 7303E9D300 jc .error 0 0000E813 8B1E[0B02] mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000E817 8B7EF0 mov di, word [bp + ?how_far_in_cluster] 0 0000E81A 8B76F2 mov si, word [bp + ?how_far_in_cluster + 2] 5788 0 0000E81D 87D6 xchg dx, si 0 0000E81F 97 xchg ax, di 0 0000E820 F7F3 div bx 5792 ; dx = byte offset into sector 5793 ; ax = sector offset into cluster's data 0 0000E822 87D6 xchg dx, si 0 0000E824 97 xchg ax, di 5796 ; si = byte offset 5797 0 0000E825 89F1 mov cx, si ; = byte offset 0 0000E827 F7D9 neg cx ; - byte offset 0 0000E829 01D9 add cx, bx ; sector size - byte offset 5801 ; = length this sector 0 0000E82B 837EFA00 cmp word [bp + ?length_this_cluster + 2], 0 0 0000E82F 7508 jne @F ; fill remaining sector size 0 0000E831 3B4EF8 cmp cx, word [bp + ?length_this_cluster] 0 0000E834 7603 jbe @F ; sector has less than requested --> 0 0000E836 8B4EF8 mov cx, word [bp + ?length_this_cluster] 5807 ; fill entire remaining request 5808 @@: 0 0000E839 294EF8 sub word [bp + ?length_this_cluster], cx 0 0000E83C 835EFA00 sbb word [bp + ?length_this_cluster + 2], 0 0 0000E840 294EFC sub word [bp + ?length], cx 0 0000E843 835EFE00 sbb word [bp + ?length + 2], 0 0 0000E847 010E[CC01] add word [load_data - LOADDATA2 + ldCurrentSeek], cx 0 0000E84B 8316[CE01]00 adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 0 0000E850 014EF0 add word [bp + ?how_far_in_cluster], cx 0 0000E853 8356F200 adc word [bp + ?how_far_in_cluster + 2], 0 5817 0 0000E857 837EFA00 cmp word [bp + ?length_this_cluster + 2], 0 0 0000E85B 75A7 jne .next_sector 0 0000E85D 837EF800 cmp word [bp + ?length_this_cluster], 0 0 0000E861 75A1 jne .next_sector 5822 0 0000E863 8B7EF4 mov di, word [bp + ?bytes_per_cluster] 0 0000E866 8B76F6 mov si, word [bp + ?bytes_per_cluster + 2] 0 0000E869 397EF0 cmp word [bp + ?how_far_in_cluster], di 0 0000E86C 7505 jne @F 0 0000E86E 3976F2 cmp word [bp + ?how_far_in_cluster + 2], si 0 0000E871 740E je @FF 5829 @@: 0 0000E873 837EFE00 cmp word [bp + ?length + 2], 0 0 0000E877 756D jne .error 0 0000E879 837EFC00 cmp word [bp + ?length], 0 0 0000E87D 7567 jne .error 0 0000E87F EB65 jmp .return 5835 5836 @@: 0 0000E881 A1[C801] mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 0 0000E884 8B16[CA01] mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 0 0000E888 E873F2 call check_clust 0 0000E88B 7259 jc .error 0 0000E88D E870F1 call clust_next.dxax 0 0000E890 732F jnc @F ; (NC) --> 0 0000E892 B8F6FF mov ax, 0FFF8h - 2 0 0000E895 BAFF0F mov dx, 0FFFh 0 0000E898 8B3E[CC01] mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 0 0000E89C 8B36[CE01] mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 0 0000E8A0 3B36[C601] cmp si, word [load_data - LOADDATA2 + ldFileSize + 2] 0 0000E8A4 7506 jne .set_error 0 0000E8A6 3B3E[C401] cmp di, word [load_data - LOADDATA2 + ldFileSize] 0 0000E8AA 7401 je .do_not_set_error ; if same then NC --> 5851 .set_error: 0 0000E8AC F9 stc 5853 .do_not_set_error: 0 0000E8AD 9C pushf 0 0000E8AE 31C9 xor cx, cx 0 0000E8B0 31DB xor bx, bx 0 0000E8B2 874EFC xchg cx, word [bp + ?length] 0 0000E8B5 875EFE xchg bx, word [bp + ?length + 2] 0 0000E8B8 010E[CC01] add word [load_data - LOADDATA2 + ldCurrentSeek], cx 0 0000E8BC 111E[CE01] adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], bx 0 0000E8C0 A8 db __TEST_IMM8 ; (skip pushf) 5862 @@: 0 0000E8C1 9C pushf 0 0000E8C2 83C002 add ax, 2 0 0000E8C5 83D200 adc dx, 0 0 0000E8C8 A3[C801] mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 0 0000E8CB 8916[CA01] mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 0 0000E8CF 9D popf ; CF 0 0000E8D0 7214 jc .error 0 0000E8D2 8B4EFC mov cx, word [bp + ?length] 0 0000E8D5 8B5EFE mov bx, word [bp + ?length + 2] 0 0000E8D8 85DB test bx, bx 0 0000E8DA 7403E9E1FE jnz .next_cluster 0 0000E8DF 85C9 test cx, cx 0 0000E8E1 7403E9DAFE jnz .next_cluster 5876 .return: 5877 .error: 5878 0 0000E8E6 5D pop bp 5880 0 0000E8E7 8F06[0000] pop word [throwsp] 0 0000E8EB 8F06[0000] pop word [throwret] ; restore throw destination 0 0000E8EF 8F06[0000] pop word [errret] 5884 0 0000E8F3 9C pushf 0 0000E8F4 F646E801 testopt [bp + ?did_guard_auxbuff], 1 0 0000E8F8 7405 jz @F 0 0000E8FA 8026[0300]EF clropt [internalflags3], dif3_auxbuff_guarded_1 5889 @@: 0 0000E8FF 8026[E701]FB clropt [load_ldflags], ldfFATBuffered 0 0000E904 9D popf ; CF 5892 0 0000E905 8B5EEA mov bx, word [bp + ?load_input_file_structure] 5894 ; bx -> load_input_file structure 0 0000E908 E852FB call yy_boot_update.bx 5896 0 0000E90B 5F pop di 0 0000E90C 5E pop si 0 0000E90D 89EC5D lleave 0 0000E910 C3 retn 5901 5902 .err_ret: 0 0000E911 8B26[0000] mov sp, word [throwsp] ; restore stack 5904 ; (needed here if returned to errret) 0 0000E915 EBCF jmp .error 5906 5907 5908 ; INP: [load_input_file] = active file 5909 ; cx:dx = 0 5910 ; OUT: - 5911 ; CHG: ax, bx, cx, dx 5912 ; STT: ds = es = ss 5913 %if _INPUT_FILE_BOOT 5914 yy_boot_seek_start: 0 0000E917 E854FB call yy_calculate_structure 5916 5917 ; INP: bx -> data 5918 ; CHG: ax 5919 .bx: section_of_function yy_boot_seek_start 5920 %else 5921 yy_boot_seek_start.bx: section_of_function 5922 %endif 0 0000E91A 56 push si 0 0000E91B 57 push di 5925 5926 ; bx -> load_input_file structure 0 0000E91C E82FFB call yy_boot_get.bx 5928 5929 .reset: 5930 ; reset current cluster to first, seek to 0 0 0000E91F FF36[F201] push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 0 0000E923 FF36[F001] push word [load_data - LOADDATA2 + lsvFirstCluster] 0 0000E927 8F06[C801] pop word [load_data - LOADDATA2 + ldCurrentCluster] 0 0000E92B 8F06[CA01] pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 0 0000E92F 8326[CC01]00 and word [load_data - LOADDATA2 + ldCurrentSeek], 0 0 0000E934 8326[CE01]00 and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 5937 5938 ; bx -> load_input_file structure 0 0000E939 E821FB call yy_boot_update.bx 5940 0 0000E93C 5F pop di 0 0000E93D 5E pop si 0 0000E93E C3 retn 5944 %endif 5945 5946 5947 ; INP: bp = load_data - LOADDATA2 5948 initialise_fs: 5949 ; (boot.asm code starts here) 5950 0 0000E93F 31C0 xor ax, ax 5952 ; calculate some values that we need: 5953 ; adjusted sectors per cluster (store in a word, 5954 ; and decode EDR-DOS's special value 0 meaning 256) 0 0000E941 8A460D mov al, [bp + bsBPB + bpbSectorsPerCluster] 0 0000E944 FEC8 dec al 0 0000E946 40 inc ax 0 0000E947 8946E8 mov [bp + ldClusterSize], ax 5959 0 0000E94A 8B46D4 mov ax, [bp + ldEntriesPerSector] 5961 5962 ; number of sectors used for root directory (store in CX) 0 0000E94D 31D2 xor dx, dx 0 0000E94F 89C3 mov bx, ax 0 0000E951 48 dec ax ; rounding up 0 0000E952 034611 add ax, [bp + bsBPB + bpbNumRootDirEnts] ; (0 iff FAT32) 0 0000E955 11D2 adc dx, dx ; account for overflow (dx was zero) 0 0000E957 F7F3 div bx ; get number of root sectors 0 0000E959 91 xchg ax, cx ; cx = number of root secs 5970 5971 5972 ; (iniload.asm code starts here) 5973 0 0000E95A 51 push cx ; number of root secs 0 0000E95B 31C0 xor ax, ax 5976 ; first sector of root directory 0 0000E95D 8A4610 mov al, [bp + bsBPB + bpbNumFATs] ; ! ah = 0, hence ax = number of FATs 0 0000E960 8B4E16 mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 0 0000E963 31FF xor di, di ; di:cx = sectors per FAT 5980 ; iff FAT12, FAT16 0 0000E965 85C9 test cx, cx ; is FAT32 ? 0 0000E967 7506 jnz @F ; no --> 0 0000E969 8B4E24 mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 0 0000E96C 8B7E26 mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 5985 @@: 0 0000E96F 50 push ax 0 0000E970 F7E1 mul cx 5988 ; ax = low word SpF*nF 5989 ; dx = high word 0 0000E972 93 xchg bx, ax 0 0000E973 87CA xchg cx, dx 5992 ; cx:bx = first mul 0 0000E975 58 pop ax 0 0000E976 F7E7 mul di 5995 ; ax = high word adjust 5996 ; dx = third word 0 0000E978 85D2 test dx, dx 0 0000E97A 740C jz @F 5999 .error_badchain: 6000 error_badchain: equ $ 0 0000E97C BA[0000] mov dx, msg.boot_badchain 0 0000E97F B80D02 mov ax, 020Dh 0 0000E982 E8[0000] call setrc 0 0000E985 E9E0DE jmp bootcmd.fail 6005 6006 @@: 0 0000E988 92 xchg dx, ax 6008 ; dx = high word adjust 0 0000E989 01CA add dx, cx 6010 ; dx:bx = result 0 0000E98B 93 xchg ax, bx 6012 ; dx:ax = result 0 0000E98C 72EE jc .error_badchain 6014 0 0000E98E 03460E add ax, [bp + bsBPB + bpbReservedSectors] 0 0000E991 83D200 adc dx, byte 0 0 0000E994 72E6 jc .error_badchain 6018 0 0000E996 59 pop cx ; number of root sectors 0 0000E997 31FF xor di, di 6021 6022 ; first sector of disk data area: 0 0000E999 01C1 add cx, ax 0 0000E99B 11D7 adc di, dx 0 0000E99D 72DD jc .error_badchain 0 0000E99F 894EFC mov [bp + lsvDataStart], cx 0 0000E9A2 897EFE mov [bp + lsvDataStart + 2], di 6028 0 0000E9A5 8946D0 mov [bp + ldRootSector], ax 0 0000E9A8 8956D2 mov [bp + ldRootSector + 2], dx 6031 6032 ; total sectors 0 0000E9AB 31D2 xor dx, dx 0 0000E9AD 8B4613 mov ax, [bp + bsBPB + bpbTotalSectors] 0 0000E9B0 85C0 test ax, ax 0 0000E9B2 7506 jnz @F 0 0000E9B4 8B5622 mov dx, [bp + bsBPB + bpbTotalSectorsLarge + 2] 0 0000E9B7 8B4620 mov ax, [bp + bsBPB + bpbTotalSectorsLarge] 6039 6040 ; fall through and let it overwrite the field with the 6041 ; already current contents. saves a jump. 6042 @@: 0 0000E9BA 895622 mov [bp + bsBPB + bpbTotalSectorsLarge + 2], dx 0 0000E9BD 894620 mov [bp + bsBPB + bpbTotalSectorsLarge], ax 6045 6046 ; dx:ax = total sectors 6047 0 0000E9C0 8B5E16 mov bx, [bp + bsBPB + bpbSectorsPerFAT] 0 0000E9C3 C646E620 mov byte [bp + ldFATType], 32 0 0000E9C7 85DB test bx, bx 0 0000E9C9 740B jz @F 6052 0 0000E9CB 31C9 xor cx, cx 6054 0 0000E9CD 895E24 mov word [bp + bsBPB + ebpbSectorsPerFATLarge], bx 0 0000E9D0 894E26 mov word [bp + bsBPB + ebpbSectorsPerFATLarge + 2], cx 0 0000E9D3 894E28 mov word [bp + bsBPB + ebpbFSFlags], cx 6058 ; FSVersion, RootCluster, FSINFOSector, BackupSector, Reserved: 6059 ; uninitialised here (initialised by loaded_all later) 6060 6061 @@: 6062 ; dx:ax = total amount of sectors 0 0000E9D6 2B46FC sub ax, word [bp + lsvDataStart] 0 0000E9D9 1B56FE sbb dx, word [bp + lsvDataStart + 2] 6065 6066 ; dx:ax = total amount of data sectors 0 0000E9DC 89C3 mov bx, ax 0 0000E9DE 92 xchg ax, dx 0 0000E9DF 31D2 xor dx, dx 0 0000E9E1 F776E8 div word [bp + ldClusterSize] 0 0000E9E4 93 xchg bx, ax 0 0000E9E5 F776E8 div word [bp + ldClusterSize] 6073 ; bx:ax = quotient, dx = remainder 6074 ; bx:ax = number of clusters 0 0000E9E8 85DB test bx, bx 0 0000E9EA 741F jz @FF 6077 ; >= 1_0000h clusters, should be FAT32 0 0000E9EC 81FBFF0F cmp bx, 0FFFh 0 0000E9F0 770D ja .badclusters 0 0000E9F2 7505 jne @F 0 0000E9F4 83F8F5 cmp ax, 0FFF7h - 2 0 0000E9F7 7706 ja .badclusters 6083 @@: 6084 ; check it is really FAT32 0 0000E9F9 837E1600 cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 0 0000E9FD 7447 je .gotfattype 6087 6088 .badclusters: 0 0000E9FF BA[0000] mov dx, msg.boot_badclusters 0 0000EA02 B80E02 mov ax, 020Eh 0 0000EA05 E8[0000] call setrc 0 0000EA08 E95DDE jmp bootcmd.fail 6093 6094 @@: 6095 ; <= FFFFh clusters, may be FAT12 or FAT16 (or small FAT32) 6096 ; check if it is small FAT32 0 0000EA0B 837E1600 cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 0 0000EA0F 7435 je .gotfattype 6099 0 0000EA11 83F8F5 cmp ax, 0FFF7h - 2 ; too much for FAT16 ? 0 0000EA14 77E9 ja .badclusters 0 0000EA16 C646E610 mov byte [bp + ldFATType], 16 0 0000EA1A 3DF50F cmp ax, 0FF7h - 2 ; is it FAT12 ? 0 0000EA1D 7727 ja .gotfattype ; no, is FAT16 --> 6105 0 0000EA1F C646E60C mov byte [bp + ldFATType], 12 6107 0 0000EA23 F606[E701]02 testopt [load_ldflags], ldfFATInvalid 0 0000EA28 751C jnz .gotfattype 6110 0 0000EA2A 53 push bx 0 0000EA2B 50 push ax 6113 ; (boot.asm code continues here) 6114 6115 ; Load the entire FAT into memory. This is easily feasible for FAT12, 6116 ; as the FAT can only contain at most 4096 entries. 6117 ; (The exact condition should be "at most 4087 entries", or with a 6118 ; specific FF7h semantic, "at most 4088 entries"; the more reliable 6119 ; and portable alternative would be "at most 4080 entries".) 6120 ; Thus, no more than 6 KiB need to be read, even though the FAT size 6121 ; as indicated by word[sectors_per_fat] could be much higher. The 6122 ; first loop condition below is to correctly handle the latter case. 6123 ; (Sector size is assumed to be a power of two between 32 and 8192 6124 ; bytes, inclusive. An 8 KiB buffer is necessary if the sector size 6125 ; is 4 or 8 KiB, because reading the FAT can or will write to 8 KiB 6126 ; of memory instead of only the relevant 6 KiB. This is always true 6127 ; if the sector size is 8 KiB, and with 4 KiB sector size it is true 6128 ; iff word[sectors_per_fat] is higher than one.) 0 0000EA2C BF0018 mov di, 6 << 10 ; maximum size of FAT12 to load 0 0000EA2F 8B4E16 mov cx, [bp + bsBPB + bpbSectorsPerFAT] 6131 ; maximum size of this FS's FAT 0 0000EA32 31D2 xor dx, dx 0 0000EA34 8B460E mov ax, [bp + bsBPB + bpbReservedSectors]; = first FAT sector 0 0000EA37 8B5EF8 mov bx, [bp + lsvFATSeg] 6135 @@: 0 0000EA3A E879F4 call read_sector ; read next FAT sector 0 0000EA3D 2B7E0B sub di, [bp + bsBPB + bpbBytesPerSector] 6138 ; di = bytes still left to read 0 0000EA40 7602 jbe @F ; if none --> 6140 ; (jbe means jump if CF || ZF) 0 0000EA42 E2F6 loop @B ; if any FAT sector still remains --> 6142 @@: ; one of the limits reached; FAT read 0 0000EA44 58 pop ax 0 0000EA45 5B pop bx 6145 6146 .gotfattype: 6147 6148 ; if bx:ax = 1, then entries 0, 1, 2 are valid 0 0000EA46 83C001 add ax, 1 0 0000EA49 83D300 adc bx, 0 6151 ; max entry is x+1 (2 if x=1) 6152 0 0000EA4C 8946C0 mov word [bp + ldMaxCluster], ax 0 0000EA4F 895EC2 mov word [bp + ldMaxCluster + 2], bx 6155 6156 ; if bx:ax was = 1, then entries below 3 have to exist 0 0000EA52 83C001 add ax, 1 0 0000EA55 83D300 adc bx, 0 6159 ; if bx:ax was 1, bx:ax now = 3 6160 0 0000EA58 89DA mov dx, bx 6162 0 0000EA5A 807EE610 cmp byte [bp + ldFATType], 16 0 0000EA5E 720C jb .check_fat_limit_12 0 0000EA60 7404 je .check_fat_limit_16 6166 .check_fat_limit_32: 0 0000EA62 01C0 add ax, ax 0 0000EA64 11D2 adc dx, dx 6169 .check_fat_limit_16: 0 0000EA66 01C0 add ax, ax 0 0000EA68 11D2 adc dx, dx 0 0000EA6A EB0D jmp @F 6173 6174 .check_fat_limit_12: 0 0000EA6C 89C2 mov dx, ax 0 0000EA6E 01C0 add ax, ax 0 0000EA70 01D0 add ax, dx ; * 3 0 0000EA72 D1E8 shr ax, 1 ; * 3 / 2 = * 1.5 0 0000EA74 83D000 adc ax, 0 ; if the last nybble is needed 0 0000EA77 31D2 xor dx, dx 6181 6182 @@: 0 0000EA79 8B5E0B mov bx, word [bp + bsBPB + bpbBytesPerSector] 0 0000EA7C 4B dec bx 0 0000EA7D 01D8 add ax, bx 0 0000EA7F 83D200 adc dx, 0 0 0000EA82 43 inc bx 6188 0 0000EA83 91 xchg cx, ax 0 0000EA84 89D0 mov ax, dx 0 0000EA86 31D2 xor dx, dx 0 0000EA88 F7F3 div bx 0 0000EA8A 91 xchg cx, ax 0 0000EA8B F7F3 div bx 0 0000EA8D 87CA xchg cx, dx 6196 ; cx = remainder, dx:ax = number of sectors needed 6197 0 0000EA8F 8B4E16 mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 0 0000EA92 31FF xor di, di ; di:cx = sectors per FAT 6200 ; iff FAT12, FAT16 0 0000EA94 85C9 test cx, cx ; is FAT32 ? 0 0000EA96 7506 jnz @F ; no --> 0 0000EA98 8B4E24 mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 0 0000EA9B 8B7E26 mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 6205 @@: 6206 0 0000EA9E 39D7 cmp di, dx 0 0000EAA0 7502 jne @F 0 0000EAA2 39C1 cmp cx, ax 6210 @@: 0 0000EAA4 730C jae @F 6212 .badfat: 0 0000EAA6 BA[0000] mov dx, msg.boot_badfat 0 0000EAA9 B80F02 mov ax, 020Fh 0 0000EAAC E8[0000] call setrc 0 0000EAAF E9B6DD jmp bootcmd.fail 6217 6218 @@: 0 0000EAB2 C3 retn 6220 6221 6222 %if _INPUT_FILE_BOOT 6223 yy_boot_clear_remember_seek: 0 0000EAB3 50 push ax 0 0000EAB4 A1[2005] mov ax, word [load_input_file.active] 0 0000EAB7 3906[0000] cmp word [boot_remember_seek_handle], ax 0 0000EABB 750F jne .ret_pop_ax 6228 .clear: 0 0000EABD 830E[0000]FF or word [boot_remember_seek_handle], -1 0 0000EAC2 8326[0200]00 and word [boot_remember_seek_offset + 2], 0 0 0000EAC7 8326[0000]00 and word [boot_remember_seek_offset], 0 6232 .ret_pop_ax: 0 0000EACC 58 pop ax 0 0000EACD C3 retn 6235 6236 6237 yy_boot_remember_seek: 0 0000EACE 50 push ax 0 0000EACF A1[2005] mov ax, word [load_input_file.active] 0 0000EAD2 3906[0000] cmp word [boot_remember_seek_handle], ax 0 0000EAD6 75F4 jne yy_boot_clear_remember_seek.ret_pop_ax 6242 0 0000EAD8 53 push bx 0 0000EAD9 51 push cx 0 0000EADA 52 push dx 0 0000EADB 8B0E[0200] mov cx, word [boot_remember_seek_offset + 2] 0 0000EADF 8B16[0000] mov dx, word [boot_remember_seek_offset] 0 0000EAE3 E8C8FB call yy_boot_seek_current 0 0000EAE6 5A pop dx 0 0000EAE7 59 pop cx 0 0000EAE8 5B pop bx 0 0000EAE9 EBD2 jmp yy_boot_clear_remember_seek.clear 6253 %endif 6254 %endif === Trace listing source: ../lst/debug.obj/cc.lst 1 2 %if 0 3 4 lDebug C command (compare) 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 "cc.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00001712 ???????? eldhSignature: resb 4 ; "ELD1" 0 00001716 ?????? resb 3 ; reserved 0 00001719 ?? resb 1 ; 26 (Ctrl-Z) 0 0000171A ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000171E ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00001720 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00001722 ???????? eldhDataOffset: resd 1 0 00001726 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00001728 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000172A ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000172C ???????? eldhReserved: resb 4 ; reserved 0 00001730 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00001732 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00001736 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000173A ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000173E ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00001712 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000171A ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000171E ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00001720 ???? 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 0 00001712 ???? 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 0 00001714 ???? eldltAmount: resw 1 0 00001716 ???????? 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 0 00001712 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00001714 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00001716 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00001718 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000171A ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00001722 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00001712 ???? eldlSignature: resw 1 ; 0E1D1h 0 00001714 ???????? eldlReserved: resw 2 0 00001718 ???? eldlUseLinkHash: resw 1 0 0000171A ???? eldlDataAmount: resw 1 0 0000171C ???? eldlDataPrefixes: resw 1 0 0000171E ???? eldlDataEntries: resw 1 0 00001720 ???? eldlDataAddresses: resw 1 0 00001722 ???? eldlCodeAmount: resw 1 0 00001724 ???? eldlCodePrefixes: resw 1 0 00001726 ???? eldlCodeEntries: resw 1 0 00001728 ???? 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 0 00001712 ???? ifKeyword: resw 1 0 00001714 ???? ifDescription: resw 1 0 00001716 ???? ifOptions: resw 1 0 00001718 ???? ifValue: resw 1 0 0000171A ???? ifTrying: resw 1 0 0000171C ???? 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 0 00001712 ???????? saOffset: resd 1 0 00001716 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00001712 ???? so16aOffset: resw 1 0 00001714 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00001712 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00001712 ?????? bsJump: resb 3 0 00001715 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00001712 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00001714 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00001715 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00001717 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00001718 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000171A ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000171C ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000171D ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 0000171F ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00001721 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00001723 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00001727 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 0000172B ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 0000172F ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00001731 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00001733 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00001737 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 00001739 ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00001712 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00001713 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00001714 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00001715 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00001724 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00001712 ???????????????? deName: resb 8 0 0000171A ?????? deExt: resb 3 0 0000171D ?? deAttrib: resb 1 0 0000171E ?? dePlusSize: resb 1 0 0000171F ?????????????? resb 7 0 00001726 ???? deClusterHigh: resw 1 0 00001728 ???? deTime: resw 1 0 0000172A ???? deDate: resw 1 0 0000172C ???? deClusterLow: resw 1 0 0000172E ???????? 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 0 100001702 ???????? lsvFirstCluster: resd 1 0 100001706 ???????? lsvFATSector: resd 1 0 10000170A ???? lsvFATSeg: resw 1 0 10000170C ???? lsvLoadSeg: resw 1 0 10000170E ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 1000016F2 ???? ldMemoryTop: resw 1 0 1000016F4 ???? ldLoadTop: resw 1 0 1000016F6 ???? ldSectorSeg: resw 1 0 1000016F8 ?? ldFATType: resb 1 92 <2> ldFlags: 0 1000016F9 ?? ldHasLBA: resb 1 0 1000016FA ???? ldClusterSize: resw 1 0 1000016FC ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 1000016FE ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100001700 ?? .partition: resb 1 ; byte 0 100001701 ?? .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 <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 0 1000016E2 ???????? ldRootSector: resd 1 0 1000016E6 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 1000016E8 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 1000016EA ???? ldParasLeft: resw 1 0 1000016EC ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000016D2 ???????? ldMaxCluster: resd 1 0 1000016D6 ???????? ldFileSize: resd 1 0 1000016DA ???????? ldCurrentCluster: resd 1 0 1000016DE ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00001712 ???????? liiSignature: resb 4 ; "NLDR" 0 00001716 ???? liiVersion: resb 2 ; "00" 0 00001718 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000171A ???? liiAmountParagraphs: resw 1 0 0000171C ???????????? liiReserved: resw 3 0 00001722 ???? 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 0 00001724 ???? 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 0 00001726 ???? 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 0 00001728 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00001712 ???? lpSize: resw 1 0 00001714 ???? lpCount: resw 1 0 00001716 ???????? lpBuffer: resd 1 0 0000171A ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00001712 ?? piBoot: resb 1 0 00001713 ?????? piStartCHS: resb 3 0 00001716 ?? piType: resb 1 0 00001717 ?????? piEndCHS: resb 3 0 0000171A ???????? piStart: resd 1 0 0000171E ???????? 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 0 00001712 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00001714 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00001716 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00001718 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000171A ???? lsOptions: resw 1 ; option flags 0 0000171C ???? lsSegment: resw 1 ; => where to load file 0 0000171E ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00001722 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00001726 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00001728 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 0000172A ???????????????? 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 0 00001712 ???? exact_struc_at 00h, exeSignature: resw 1 0 00001714 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00001716 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00001718 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000171A ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 0000171C ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 0000171E ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00001720 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00001722 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00001724 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00001726 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00001728 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 0000172A ???? 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. 0 0000172C ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00001712 ???? ifhHandle: resw 1 0 00001714 ???? ifhFlags: resw 1 0 00001716 ???????? 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 <1> areastrucEntry: resb 24 0 0000172A ???????? areastrucNext: resd 1 0 0000172E ???????? areastrucPrev: resd 1 0 00001732 ???? areastrucSubAmount: resw 1 0 00001734 ???? areastrucSubOffset: resw 1 0 00001736 ???? areastrucFunAmount: resw 1 0 00001738 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00001712 ???????? areastrucsubLinear: resd 1 0 00001716 ???????? areastrucsubLinearEnd: resd 1 0 0000171A ???? areastrucsubListOffset: resw 1 0 0000171C ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00001712 ???????? areastrucfunLinear: resd 1 0 00001716 ???????? areastrucfunLinearEnd: resd 1 0 0000171A ???? areastrucfunListOffset: resw 1 0 0000171C ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00001712 ???? areastart: resw 1 0 00001714 ???? areaend: resw 1 0 00001716 ???? areamessage: resw 1 0 00001718 ???? 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 0 00001712 ???? 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.) 0 00001714 ???? ivFlags: resw 1 0 00001716 ???? 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. 0 00001718 ???? 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 0 0000171A ?? 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. 0 0000171B ?? 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 0 00001712 ???????? mrLinear: resd 1 0 00001716 ???????? mrOffset: resd 1 0 0000171A ???? mrSegmentSelector: resw 1 0 0000171C ???? mrFlags: resw 1 0 0000171E ???????? 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 0 00001712 ???????? .size_: resd 1 0 00001716 ???? .srchdl: resw 1 0 00001718 ???????? .srcadr: resd 1 0 0000171C ???? .dsthdl: resw 1 0 0000171E ???????? .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 %endif 21 22 23 %if !_LINK || !_LOADER 24 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 24 ------------------ note: usesection lDEBUG_CODE 25 26 %if _COUNT 27 count_cmd: 0 00002D87 E8[0000] call skipcomma 29 0 00002D8A 4E dec si 0 00002D8B BA[0000] mov dx, msg.range 0 00002D8E E8[0000] call isstring? 0 00002D91 AC lodsb 0 00002D92 7512 jne .notrange 35 0 00002D94 8B1E[0000] mov bx, word [reg_ds] ; get range 0 00002D98 31C9 xor cx, cx 0 00002D9A E8[0000] nearcall getrangeX ; try to get range 0 00002D9D E8[0000] call chkeol ; and insure end-of-line 40 ; successful if it returned 41 _386_PM_o32 ; mov esi, edx 0 00002DA0 89D6 mov si, dx ; bx:esi-> source string 43 _386_PM_o32 ; sub ecx, edx 0 00002DA2 29D1 sub cx, dx ; ecx = count - 1 0 00002DA4 EB0C jmp short .setesedi 46 47 .notrange: 0 00002DA6 E8[0000] nearcall getstr ; get string of bytes 0 00002DA9 81EF[0000] sub di, line_out ; di = number of bytes to look for 0 00002DAD 7405 jz .0 0 00002DAF 89F9 mov cx, di 0 00002DB1 49 dec cx 53 _386_PM movzx ecx, cx ; ecx = count - 1 54 .setesedi: 0 00002DB2 85E4 test sp, sp ; (NZ) 56 .0: 0 00002DB4 E80800 call count_store.maybe_0 0 00002DB7 BF[0000] mov di, line_out 0 00002DBA E9[0000] jmp hh.single 60 %endif 61 62 63 %if _COUNT || _SCOUNT 64 count_store: section_of_function 0 00002DBD 85E4 test sp, sp ; (NZ) 66 .maybe_0: section_of_function count_store 0 00002DBF BB0000 mov bx, 0 0 00002DC2 89DA mov dx, bx 0 00002DC4 7408 jz .0 70 _386_PM_o32 0 00002DC6 51 push cx 0 00002DC7 5A pop dx 73 _386_PM pop bx 0 00002DC8 83C201 add dx, 1 0 00002DCB 83D300 adc bx, 0 76 .0: 0 00002DCE 8916[0000] mov word [count_var], dx 0 00002DD2 891E[0200] mov word [count_var + 2], bx 0 00002DD6 C3 retn 80 %endif 81 82 %if _CLEAR 83 clear_cmd: 0 00002DD7 AC lodsb 0 00002DD8 E8[0000] call chkeol 0 00002DDB BA[0000] mov dx, msg.clear_sequence 0 00002DDE E9[0000] jmp putsz 88 %endif 89 90 ; C command - compare bytes. 91 cc: 92 %if _COUNT || _CLEAR 0 00002DE1 4E dec si 0 00002DE2 4E dec si 95 %if _COUNT 0 00002DE3 BA[0000] mov dx, msg.count 0 00002DE6 E8[0000] call isstring? 0 00002DE9 749C je count_cmd 99 %endif 100 %if _CLEAR 0 00002DEB BA[0000] mov dx, msg.clear 0 00002DEE E8[0000] call isstring? 0 00002DF1 74E4 je clear_cmd 104 %endif 0 00002DF3 46 inc si 0 00002DF4 AC lodsb 107 %endif 108 %if _PM 109 mov di, getaddrX ; second parameter needn't be writable 110 %endif 0 00002DF5 E8[0000] call parsecm ; parse arguments 112 113 ; To make the 16-bit 64 KiB compare hack below work, the 114 ; full ecx mustn't be increased here for 16-bit segments. 115 ; The passed ecx isn't higher than FFFFh for 16-bit segments, 116 ; and a value of 0001_0000h needs to be passed as zero to 117 ; the hack anyway. 118 %if _PM 119 cmp byte [ss:bAddr32], 0 120 je .16 121 [cpu 386] 122 inc ecx 123 jnz cc1 124 jmp error 125 __CPU__ 126 .16: 127 %endif 0 00002DF8 41 inc cx 129 cc1: 0 00002DF9 1E push ds 0 00002DFA 06 push es 0 00002DFB 16 push ss 0 00002DFC 1F pop ds ; ds := cs 0 00002DFD E8[0000] call dohack ; do the interrupt pointer hack 0 00002E00 07 pop es 0 00002E01 1F pop ds 137 %if _PM 138 cmp byte [ss:bAddr32], 0 139 jz .cmp16 140 a32 repe cmpsb 141 mov dl, byte [esi-1] 142 mov dh, byte [es:edi-1] 143 jmp short .cmpdone 144 .cmp16: 145 %endif 146 ; The following 3 instructions make a hack to support 64 KiB 147 ; compare. The only time we get here with cx = 0 is the first 148 ; iteration for a 64 KiB compare. In that case, dec cx results 149 ; in FFFFh making repe cmpsb work. The single cmpsb will either 150 ; jump the repe cmpsb (if it found a mismatch) or not jump it. 151 ; The repe cmpsb might be executed with cx = 0, but will then 152 ; not change anything including the flags so it works. 0 00002E02 49 dec cx 0 00002E03 A6 cmpsb 0 00002E04 7502 jne .skip 0 00002E06 F3A6 repe cmpsb ; start comparing 157 .skip: 0 00002E08 8A54FF mov dl, byte [si-1] ; save the possibly errant characters 0 00002E0B 268A75FF mov dh, byte [es:di-1] 160 .cmpdone: 0 00002E0F 9F lahf 0 00002E10 1E push ds 0 00002E11 06 push es 0 00002E12 16 push ss 0 00002E13 1F pop ds 0 00002E14 E8[0000] call unhack ; undo the interrupt pointer hack 0 00002E17 07 pop es 0 00002E18 1F pop ds 0 00002E19 9E sahf 0 00002E1A 744A je cc2 ; if we're done 0 00002E1C 06 push es 0 00002E1D 16 push ss 0 00002E1E 07 pop es 174 _386_PM_o32 ; mov ebx, edi 0 00002E1F 89FB mov bx, di 0 00002E21 BF[0000] mov di, line_out 0 00002E24 8CD8 mov ax, ds 0 00002E26 E8[0000] call hexword 0 00002E29 B03A mov al, ':' 0 00002E2B AA stosb 181 _386_PM_o32 ; mov eax, esi 0 00002E2C 89F0 mov ax, si 183 _386_PM_o32 ; dec eax 0 00002E2E 48 dec ax 185 %if _PM 186 cmp byte [ss:bAddr32], 0 187 jz .16si 188 call hexword_high 189 .16si: 190 %endif 0 00002E2F E8[0000] call hexword 0 00002E32 B82020 mov ax, 32<<8|32 0 00002E35 AB stosw 0 00002E36 88D0 mov al, dl 0 00002E38 E8[0000] call hexbyte 0 00002E3B B82020 mov ax, 32<<8|32 0 00002E3E AB stosw 0 00002E3F 88F0 mov al, dh 0 00002E41 E8[0000] call hexbyte 0 00002E44 B82020 mov ax, 32<<8|32 0 00002E47 AB stosw 0 00002E48 58 pop ax 0 00002E49 50 push ax 0 00002E4A E8[0000] call hexword 0 00002E4D B03A mov al, ':' 0 00002E4F AA stosb 207 _386_PM_o32 ; mov eax, ebx 0 00002E50 89D8 mov ax, bx 209 _386_PM_o32 ; dec eax 0 00002E52 48 dec ax 211 %if _PM 212 cmp byte [ss:bAddr32], 0 213 jz .16bx 214 call hexword_high 215 .16bx: 216 %endif 0 00002E53 E8[0000] call hexword 0 00002E56 1E push ds 0 00002E57 16 push ss 0 00002E58 1F pop ds 0 00002E59 53 push bx 0 00002E5A 51 push cx 0 00002E5B E8[0000] call putsline_crlf 0 00002E5E 59 pop cx 0 00002E5F 5F pop di 0 00002E60 1F pop ds 0 00002E61 07 pop es 228 %if _PM 229 cmp byte [ss:bAddr32],0 230 jz cc1_6 231 [cpu 386] 232 jecxz cc2 233 __CPU__ 234 cc1_j1: 235 jmp cc1 236 cc1_6: 237 %else 238 cc1_j1 equ cc1 239 %endif 240 %if 0 241 _386_PM_o32 ; inc ecx 242 inc cx 243 _386_PM_a32 ; loopd cc1 244 loop cc1 ; if not done yet 245 %else 246 _386_PM_a32 ; jecxz cc2 0 00002E62 E302 jcxz cc2 0 00002E64 EB93 jmp cc1 ; if not done yet 249 %endif 250 cc2: 0 00002E66 16 push ss ; restore segment registers 0 00002E67 1F pop ds 0 00002E68 16 push ss 0 00002E69 07 pop es 0 00002E6A C3 retn 256 %endif === Trace listing source: ../lst/debug.obj/dd.lst 1 2 %if 0 3 4 lDebug D commands - Dump data 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 "dd.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00001714 ???????? eldhSignature: resb 4 ; "ELD1" 0 00001718 ?????? resb 3 ; reserved 0 0000171B ?? resb 1 ; 26 (Ctrl-Z) 0 0000171C ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00001720 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00001722 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00001724 ???????? eldhDataOffset: resd 1 0 00001728 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000172A ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000172C ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000172E ???????? eldhReserved: resb 4 ; reserved 0 00001732 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00001734 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00001738 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000173C ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00001740 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00001714 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000171C ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00001720 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00001722 ???? 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 0 00001714 ???? 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 0 00001716 ???? eldltAmount: resw 1 0 00001718 ???????? 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 0 00001714 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00001716 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00001718 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000171A ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000171C ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00001724 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00001714 ???? eldlSignature: resw 1 ; 0E1D1h 0 00001716 ???????? eldlReserved: resw 2 0 0000171A ???? eldlUseLinkHash: resw 1 0 0000171C ???? eldlDataAmount: resw 1 0 0000171E ???? eldlDataPrefixes: resw 1 0 00001720 ???? eldlDataEntries: resw 1 0 00001722 ???? eldlDataAddresses: resw 1 0 00001724 ???? eldlCodeAmount: resw 1 0 00001726 ???? eldlCodePrefixes: resw 1 0 00001728 ???? eldlCodeEntries: resw 1 0 0000172A ???? 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 0 00001714 ???? ifKeyword: resw 1 0 00001716 ???? ifDescription: resw 1 0 00001718 ???? ifOptions: resw 1 0 0000171A ???? ifValue: resw 1 0 0000171C ???? ifTrying: resw 1 0 0000171E ???? 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 0 00001714 ???????? saOffset: resd 1 0 00001718 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00001714 ???? so16aOffset: resw 1 0 00001716 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00001714 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00001714 ?????? bsJump: resb 3 0 00001717 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00001714 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00001716 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00001717 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00001719 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 0000171A ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000171C ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000171E ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000171F ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00001721 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00001723 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00001725 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00001729 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 0000172D ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00001731 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00001733 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00001735 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00001739 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 0000173B ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00001714 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00001715 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00001716 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00001717 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00001726 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00001714 ???????????????? deName: resb 8 0 0000171C ?????? deExt: resb 3 0 0000171F ?? deAttrib: resb 1 0 00001720 ?? dePlusSize: resb 1 0 00001721 ?????????????? resb 7 0 00001728 ???? deClusterHigh: resw 1 0 0000172A ???? deTime: resw 1 0 0000172C ???? deDate: resw 1 0 0000172E ???? deClusterLow: resw 1 0 00001730 ???????? 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 0 100001704 ???????? lsvFirstCluster: resd 1 0 100001708 ???????? lsvFATSector: resd 1 0 10000170C ???? lsvFATSeg: resw 1 0 10000170E ???? lsvLoadSeg: resw 1 0 100001710 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 1000016F4 ???? ldMemoryTop: resw 1 0 1000016F6 ???? ldLoadTop: resw 1 0 1000016F8 ???? ldSectorSeg: resw 1 0 1000016FA ?? ldFATType: resb 1 92 <2> ldFlags: 0 1000016FB ?? ldHasLBA: resb 1 0 1000016FC ???? ldClusterSize: resw 1 0 1000016FE ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100001700 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100001702 ?? .partition: resb 1 ; byte 0 100001703 ?? .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 <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 0 1000016E4 ???????? ldRootSector: resd 1 0 1000016E8 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 1000016EA ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 1000016EC ???? ldParasLeft: resw 1 0 1000016EE ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000016D4 ???????? ldMaxCluster: resd 1 0 1000016D8 ???????? ldFileSize: resd 1 0 1000016DC ???????? ldCurrentCluster: resd 1 0 1000016E0 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00001714 ???????? liiSignature: resb 4 ; "NLDR" 0 00001718 ???? liiVersion: resb 2 ; "00" 0 0000171A ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000171C ???? liiAmountParagraphs: resw 1 0 0000171E ???????????? liiReserved: resw 3 0 00001724 ???? 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 0 00001726 ???? 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 0 00001728 ???? 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 0 0000172A ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00001714 ???? lpSize: resw 1 0 00001716 ???? lpCount: resw 1 0 00001718 ???????? lpBuffer: resd 1 0 0000171C ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00001714 ?? piBoot: resb 1 0 00001715 ?????? piStartCHS: resb 3 0 00001718 ?? piType: resb 1 0 00001719 ?????? piEndCHS: resb 3 0 0000171C ???????? piStart: resd 1 0 00001720 ???????? 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 0 00001714 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00001716 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00001718 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 0000171A ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000171C ???? lsOptions: resw 1 ; option flags 0 0000171E ???? lsSegment: resw 1 ; => where to load file 0 00001720 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00001724 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00001728 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 0000172A ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 0000172C ???????????????? 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 0 00001714 ???? exact_struc_at 00h, exeSignature: resw 1 0 00001716 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00001718 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 0000171A ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000171C ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 0000171E ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00001720 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00001722 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00001724 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00001726 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00001728 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 0000172A ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 0000172C ???? 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. 0 0000172E ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00001714 ???? ifhHandle: resw 1 0 00001716 ???? ifhFlags: resw 1 0 00001718 ???????? 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 <1> areastrucEntry: resb 24 0 0000172C ???????? areastrucNext: resd 1 0 00001730 ???????? areastrucPrev: resd 1 0 00001734 ???? areastrucSubAmount: resw 1 0 00001736 ???? areastrucSubOffset: resw 1 0 00001738 ???? areastrucFunAmount: resw 1 0 0000173A ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00001714 ???????? areastrucsubLinear: resd 1 0 00001718 ???????? areastrucsubLinearEnd: resd 1 0 0000171C ???? areastrucsubListOffset: resw 1 0 0000171E ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00001714 ???????? areastrucfunLinear: resd 1 0 00001718 ???????? areastrucfunLinearEnd: resd 1 0 0000171C ???? areastrucfunListOffset: resw 1 0 0000171E ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00001714 ???? areastart: resw 1 0 00001716 ???? areaend: resw 1 0 00001718 ???? areamessage: resw 1 0 0000171A ???? 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 0 00001714 ???? 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.) 0 00001716 ???? ivFlags: resw 1 0 00001718 ???? 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. 0 0000171A ???? 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 0 0000171C ?? 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. 0 0000171D ?? 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 0 00001714 ???????? mrLinear: resd 1 0 00001718 ???????? mrOffset: resd 1 0 0000171C ???? mrSegmentSelector: resw 1 0 0000171E ???? mrFlags: resw 1 0 00001720 ???????? 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 0 00001714 ???????? .size_: resd 1 0 00001718 ???? .srchdl: resw 1 0 0000171A ???????? .srcadr: resd 1 0 0000171E ???? .dsthdl: resw 1 0 00001720 ???????? .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 %endif 21 22 %if _LINK_COMPAT 23 usesection lDEBUG_DATA_ENTRY 23 ------------------ note: usesection lDEBUG_DATA_ENTRY 24 align 4, db 0 25 %endif 26 27 %if _DHIGHLIGHT 28 usesection lDEBUG_DATA_ENTRY 29 30 align 2, db 0 31 dd_h_number: dw 0 32 dd_h_text: dw 0 33 %endif 34 35 %if _DNUM 36 usesection lDEBUG_DATA_ENTRY 36 ------------------ note: usesection lDEBUG_DATA_ENTRY 37 align 4, db 0 0 00001714 0000 ddoffset: dw 0 ; offset word for dd 39 ; (number of skipped bytes at start of line) 40 %if _PM 41 dw 0 ; high word initialised to and fixed at zero 42 %endif 0 00001716 0000 ddskipped: dw 0 44 %if _PM 45 dw 0 ; high word initialised to and fixed at zero 46 %endif 0 00001718 0100 ddsize: dw 1 ; size of dd item 0 0000171A 00 ddoffset2: db 0 49 %endif 50 51 usesection lDEBUG_DATA_ENTRY 51 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 0000171B FF dd_text_and: db 0FFh 53 54 55 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 55 ------------------ note: usesection lDEBUG_CODE 56 57 ..@dd_access_start: 58 59 ; D command - hex/ASCII dump. 60 ddd: 61 %if _DTOP 0 00002E6B 8026[0200]7F clropt [internalflags6], dif6_cpdepchars 63 %endif 64 %if _INT || _PM || _MCB || _DSTRINGS || 1 0 00002E70 E8[0000] call capitalise 66 %endif 0 00002E73 86C4 xchg al, ah 0 00002E75 8A44FE mov al, byte [si - 2] 0 00002E78 E8[0000] call capitalise 0 00002E7B 3C44 cmp al, 'D' 0 00002E7D 86C4 xchg al, ah 0 00002E7F 7403E99A00 jne .not_d_suffix 73 %if _DSTRINGS 0 00002E84 3C5A cmp al, 'Z' ; DZ command ? 0 00002E86 7503E9D503 je dz ; yes --> 0 00002E8B 3C24 cmp al, '$' ; D$ command ? 0 00002E8D 7503E9A703 je dcpm ; yes --> 0 00002E92 3C23 cmp al, '#' ; D# command ? 0 00002E94 7503E9BA03 je dcounted ; yes --> 0 00002E99 3C57 cmp al, 'W' 0 00002E9B 750B jne .notstring 0 00002E9D 50 push ax 0 00002E9E AC lodsb 0 00002E9F 3C23 cmp al, '#' ; DW# command ? 0 00002EA1 58 pop ax 0 00002EA2 7503E99F03 je dwcounted ; yes --> 0 00002EA7 4E dec si 88 .notstring: 89 %endif 90 %if _INT 0 00002EA8 3C49 cmp al, 'I' ; DI command ? 0 00002EAA 750D jne .notdi 93 %if 1 0 00002EAC 50 push ax 0 00002EAD AC lodsb 0 00002EAE 4E dec si 0 00002EAF 24DF and al, TOUPPER 0 00002EB1 3C50 cmp al, 'P' ; distinguish 'di ...' and 'd ip' 0 00002EB3 58 pop ax 0 00002EB4 7403 je .notdi 101 %endif 0 00002EB6 E95204 jmp gateout ; yes --> 103 .notdi: 104 %endif 105 %if _PM 106 cmp al, 'L' ; DL command ? 107 jne .notdl 108 jmp descout ; yes --> 109 .notdl: 110 %endif 111 %if _DX 112 cmp al, 'X' ; DX command ? 113 _386 je extmem ; yes --> 114 .notdx: 115 %endif 116 %if _PM 117 cmp al, '.' 118 je descsubcommand 119 %endif 120 %if _MCB 0 00002EB9 3C4D cmp al, 'M' ; DM command ? 0 00002EBB 7503 jne .notdm 0 00002EBD E91F0A jmp mcbout ; yes --> 124 .notdm: 125 %endif 126 %if _DT 0 00002EC0 3C54 cmp al, 'T' 0 00002EC2 7508 jne @F 129 %if _DTOP 0 00002EC4 E83F00 call .handletop0 0 00002EC7 7458 je .d_top 132 %endif 0 00002EC9 E92A0C jmp dumptable 134 @@: 135 %endif 136 %if _DNUM 137 %if _DQ 138 mov cx, 8 139 cmp al, 'Q' 140 je .d_suffix_size 141 mov cl, 1 142 %else 0 00002ECC B90100 mov cx, 1 144 %endif 0 00002ECF 3C42 cmp al, 'B' 0 00002ED1 7424 je .d_suffix_size 0 00002ED3 41 inc cx ; = 2 0 00002ED4 3C57 cmp al, 'W' 0 00002ED6 741F je .d_suffix_size 0 00002ED8 41 inc cx 0 00002ED9 41 inc cx ; = 4 0 00002EDA 3C44 cmp al, 'D' 0 00002EDC 7540 jne .not_d_suffix 154 %if 1 0 00002EDE 50 push ax 0 00002EDF 56 push si 0 00002EE0 AC lodsb 0 00002EE1 24DF and al, TOUPPER 0 00002EE3 3C49 cmp al, 'I' ; possibly "D DI" ? 0 00002EE5 7408 je .check_dd_separator 0 00002EE7 3C58 cmp al, 'X' ; possibly "D DX" ? 0 00002EE9 7404 je .check_dd_separator 0 00002EEB 3C53 cmp al, 'S' ; possibly "D DS" ? 0 00002EED 7504 jne .check_dd_no_if_ZR ; no, --> NZ 165 .check_dd_separator: 0 00002EEF AC lodsb ; load next text 0 00002EF0 E8[0000] nearcall isseparator? ; if a separator then cannot be valid "DD" 168 .check_dd_no_if_ZR: 0 00002EF3 5E pop si 0 00002EF4 58 pop ax 0 00002EF5 7427 je .not_d_suffix 172 %endif 173 .d_suffix_size: 0 00002EF7 880E[0400] mov byte [ddsize], cl 175 %if _DTOP 0 00002EFB E80700 call .handletop 177 %else 178 call skipwhite 179 %endif 0 00002EFE E8[0000] call iseol? 0 00002F01 755C jne dd1 ; jump to getting range --> (with new size) 0 00002F03 EB21 jmp lastddd ; default range (ADS:ADO length 128), 183 ; but with new size --> 184 %endif 185 186 %if _DTOP 187 .handletop: 0 00002F05 AC lodsb 189 .handletop0: 0 00002F06 E8[0000] call skipcomm0 0 00002F09 4E dec si 0 00002F0A BA[0000] mov dx, msg.top 0 00002F0D E8[0000] call isstring? 0 00002F10 AC lodsb 0 00002F11 750A jne @F ; --> NZ 0 00002F13 E8[0000] call skipcomm0 0 00002F16 800E[0200]80 setopt [internalflags6], dif6_cpdepchars 198 %if _DT 0 00002F1B 38C0 cmp al, al ; ZR 200 %endif 201 @@: 0 00002F1D C3 retn 203 %endif 204 205 .not_d_suffix: 206 %if _DTOP 0 00002F1E E8E5FF call .handletop0 208 %else 209 call skipwh0 210 %endif 211 .d_top: 0 00002F21 E8[0000] call iseol? 213 %if _DNUM 0 00002F24 7534 jne dd1_bytes ; if an address was given --> (set byte size) 215 %else 216 jne dd1 217 %endif 218 219 lastddd: 220 _386_PM xor eax, eax 0 00002F26 A1[0000] mov ax, word [dd_default_lines] 222 ; default length in lines, if nonzero 0 00002F29 85C0 test ax, ax 0 00002F2B 7409 jz @F 0 00002F2D 7828 js short .error 0 00002F2F A3[0000] mov word [getrange_lines], ax 0 00002F32 31C0 xor ax, ax 0 00002F34 EB0E jmp @FF 229 230 @@: 0 00002F36 C706[0000]0080 mov word [getrange_lines], 8000h 0 00002F3C A1[0000] mov ax, word [dd_default_length] 0 00002F3F 85C0 test ax, ax 0 00002F41 7414 jz short .error 0 00002F43 48 dec ax 236 @@: 237 ; byte [ddsize] = size already set 238 _386_PM_o32 ; mov edx, dword [d_addr] 0 00002F44 8B16[0000] mov dx, word [d_addr] ; compute range of 80h or until end of segment 240 _386_PM_o32 ; mov esi, edx 0 00002F48 89D6 mov si, dx 0 00002F4A 8B1E[0400] mov bx, [d_addr + saSegSel] 243 _386_PM call test_high_limit 244 _386_PM jnz .32 0 00002F4E 01C2 add dx, ax 0 00002F50 732D jnc dd2_0 0 00002F52 83CAFF or dx, byte -1 0 00002F55 EB28 jmp short dd2_0 249 250 .error: 0 00002F57 E9[0000] jmp error 252 253 %if _PM 254 [cpu 386] 255 .32: 256 add edx, eax 257 jnc dd2_0 ; if no overflow 258 or edx, byte -1 259 jmp short dd2_0 260 __CPU__ 261 %endif 262 263 %if _DNUM 264 dd1_bytes: 0 00002F5A C606[0400]01 mov byte [ddsize], 1 266 %endif 267 dd1: 0 00002F5F 8B0E[0000] mov cx, word [dd_default_length] 269 ; default length (128 bytes) 0 00002F63 8B3E[0000] mov di, word [dd_default_lines] 271 ; default length in lines, if nonzero 0 00002F67 8B1E[0000] mov bx, word [reg_ds] 0 00002F6B C706[0000]0080 mov word [getrange_lines], 8000h 0 00002F71 E8[0000] nearcall getrangeX.lines ; get address range into bx:(e)dx 275 0 00002F74 E8[0000] call chkeol ; expect end of line here 277 0 00002F77 891E[0400] mov word [d_addr + saSegSel], bx 279 ; save segment (offset is saved later) 280 %if _PM 281 call ispm 282 jnz .86m 283 .pm: 284 mov word [d_addr + saSelector], bx 285 jmp @F 286 .86m: 287 mov word [d_addr + saSegment], bx 288 @@: 289 %endif 290 _386_PM_o32 ; mov esi, edx 0 00002F7B 89D6 mov si, dx ; bx:(e)si = start 292 _386_PM_o32 ; mov edx, ecx 0 00002F7D 89CA mov dx, cx ; bx:(e)dx = last 294 %if _PM && 0 295 jmp short dd2_1 296 %endif 297 298 ; Parsing is done. Print first line. 299 dd2_0: 300 %if _PM 301 call ispm 302 jnz dd2_1 303 [cpu 286] 304 verr bx ; readable ? 305 __CPU__ 306 jz dd2_1 307 %if 1 308 mov dx, .errmsg 309 jmp putsz_error 310 usesection lDEBUG_DATA_ENTRY 311 .errmsg:asciz "Segment is not readable.",13,10 312 usesection lDEBUG_CODE 313 %else 314 mov bx, word [reg_ds] 315 mov word [d_addr + saSegSel], bx 316 %if _PM 317 call ispm 318 jnz .86m 319 .pm: 320 mov word [d_addr + saSelector], bx 321 jmp @F 322 .86m: 323 mov word [d_addr + saSegment], bx 324 @@: 325 %endif 326 %endif 327 dd2_1: 328 %endif 0 00002F7F F606[0100]80 testopt [getrange_lines], 8000h 0 00002F84 7503 jnz .notlines 0 00002F86 E8D600 call dd_get_one_line_range 332 333 .notlines: 334 335 %if _DNUM 0 00002F89 A1[0400] mov ax, word [ddsize] 0 00002F8C 48 dec ax ; 0 = byte, 1 = word, 3 = dword 0 00002F8D 21F0 and ax, si ; how many bytes to skip at the beginning 0 00002F8F A2[0600] mov byte [ddoffset2], al 340 %endif 341 0 00002F92 B80100 mov ax, opt2_db_header 343 %if _DNUM 0 00002F95 803E[0400]02 cmp byte [ddsize], 2 0 00002F9A 7207 jb @F 0 00002F9C B010 mov al, opt2_dw_header 0 00002F9E 7403 je @F 0 00002FA0 B80001 mov ax, opt2_dd_header 349 ; fixme dq 350 @@: 351 %endif 0 00002FA3 E82800 call dd_header_or_trailer 353 354 355 dd_loop_line: 356 %if _SYMBOLIC 357 dd_with_sym: 358 lframe near 359 lvar dword, startlinear 360 lvar dword, endlinear 361 lvar word, sym_index 362 lvar word, sym_count 363 lenter 364 xor ax, ax 365 lvar dword, offset 366 push ax ; (zero-initialise high word) 367 push ax 368 lvar dword, adjust 369 push ax ; (zero-initialise high word) 370 push ax ; (zero-initialise offset (low) word) 371 372 _386_PM_o32 373 mov word [bp + ?offset], si 374 375 push bx 376 _386_PM_o32 377 push si 378 _386_PM_o32 379 push dx 380 381 testopt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 382 jnz .justdisplay 383 384 _386_PM_o32 385 xchg dx, si ; bx:(e)dx = start address, bx:(e)si = end 386 call getlinear_32bit ; dx:ax = start linear 387 jc .justdisplay 388 389 mov word [bp + ?startlinear + 2], dx 390 mov word [bp + ?startlinear], ax 391 push dx 392 push ax 393 394 _386_PM_o32 395 xchg dx, si ; bx:(e)dx = end address 396 call getlinear_32bit ; dx:ax = end linear 397 398 mov word [bp + ?endlinear + 2], dx 399 mov word [bp + ?endlinear], ax 400 pop bx 401 pop cx ; cx:bx = start linear 402 jc .justdisplay 403 404 xchg ax, bx 405 xchg dx, cx ; cx:bx = end linear, dx:ax = start linear 406 407 nearcall binsearchmain ; es:di -> first entry, cx = number, bx = index 408 mov word [bp + ?sym_index], bx 409 test cx, cx 410 jz .justdisplay 411 412 _386_PM_o32 413 pop dx 414 _386_PM_o32 415 pop si 416 pop bx 417 418 .loop: 419 mov word [bp + ?sym_count], cx 420 421 .loop_no_cx: 422 push word [bp + ?sym_index] 423 push ax ; (reserve space, uninitialised) 424 dualcall getfarpointer.main 425 pop di 426 pop es 427 428 mov bx, word [bp + ?adjust + 2] 429 mov cx, word [bp + ?adjust] 430 ; bx:cx = adjust 431 432 add cx, word [bp + ?startlinear] 433 adc bx, word [bp + ?startlinear + 2] 434 ; bx:cx = adjust + start linear (adjust linear) 435 436 neg bx 437 neg cx 438 sbb bx, byte 0 ; neg bx:cx 439 440 add cx, word [es:di + smLinear] 441 adc bx, word [es:di + smLinear + 2] 442 ; bx:cx = next linear - adjust linear 443 ; bx:cx = how far from adjust linear to next 444 445 test bx, bx ; is there a chunk of ddsize at least ? 446 jnz .chunk 447 %if _DNUM 448 cmp cx, [ddsize] 449 %else 450 cmp cx, 1 451 %endif 452 jae .chunk ; yes, display a chunk --> 453 454 _386_PM and ecx, 0FFFFh 455 _386_PM_o32 456 push si 457 _386_PM_o32 458 add si, cx 459 push ss 460 pop es 461 mov di, line_out 462 call dd_display_offset 463 464 testopt [options], dd_no_blanks_sym 465 jnz @FF 466 467 pop ax ; ax = original si value 468 push ax 469 470 push si 471 mov si, ax 472 %if _DNUM 473 mov cx, word [ddsize] 474 %else 475 mov cx, 1 476 %endif 477 mov ax, cx 478 dec cx 479 and cx, si ; how many bytes to skip at the beginning 480 sub si, cx ; = offset after skipped to first displayed 481 add cx, cx ; how many digits to skip at the beginning 482 and si, 0Fh ; = offset in single line 483 add ax, ax ; = 8 for dword, 4 for word, 2 for byte 484 inc ax ; = 9 for dword, 5 for word, 3 for byte 485 db __TEST_IMM16 ; (skip add in first iteration) 486 @@: 487 add cx, ax ; (in subsequent iterations:) add blanks 488 %if _DNUM 489 sub si, word [ddsize] ; still a whole unit to add ? (subtract it) 490 %else 491 sub si, 1 492 %endif 493 jae @B ; yes --> 494 ; cx = number of blanks to skip 495 mov al, 32 496 rep stosb ; store blanks for each byte 497 pop si 498 @@: 499 500 push dx 501 call putsline ; puts offset + blanks 502 503 push word [bp + ?sym_index] 504 dualcall displaystring ; puts symbol label 505 506 push word [bp + ?sym_index] 507 push ax 508 dualcall getfarpointer.main 509 pop di 510 pop es 511 xor dx, dx 512 _386_PM call test_high_limit ; 32-bit segment ? 513 _386_PM jz .16 ; no --> (don't display zero high word) 514 _386_PM push esi 515 _386_PM pop si 516 _386_PM pop dx 517 .16: 518 cmp dx, word [es:di + smOffset + 2] 519 mov dx, msg.dd_after_symbol.non_wrt 520 jne .wrt 521 cmp si, word [es:di + smOffset] 522 je .non_wrt 523 .wrt: 524 mov dx, msg.dd_after_symbol.1_wrt 525 call disp_message 526 527 mov ax, word [d_addr + 4] 528 push ss 529 pop es 530 mov di, line_out 531 call hexword 532 push bx 533 push cx 534 call putsline 535 pop cx 536 pop bx 537 538 mov dx, msg.dd_after_symbol.2_wrt 539 .non_wrt: 540 call disp_message ; puts after 541 pop dx 542 543 _386_PM_o32 544 pop si 545 546 inc word [bp + ?sym_index] 547 ; point to next symbol's SYMMAIN (if any) 548 mov cx, word [bp + ?sym_count] 549 loop .j_loop ; loop if any more to go 550 jmp .justdisplay_no_pop ; if none, just display remainder --> 551 552 553 .j_loop: 554 jmp .loop 555 556 557 ; Display a chunk. 558 ; 559 ; INP: (e)si = start offset to display 560 ; (e)dx = end offset to display 561 ; bx:cx = how far from adjust linear to next 562 ; (there is always a next symbol if we are here) 563 .chunk: 564 %if _DNUM 565 mov ax, word [ddsize] 566 dec ax 567 not ax 568 and cx, ax 569 %endif 570 571 add word [bp + ?adjust], cx 572 adc word [bp + ?adjust + 2], bx 573 574 _386_PM push word [bp + ?adjust + 2] 575 _386_PM push ax 576 _386_PM pop eax 577 mov ax, word [bp + ?adjust] 578 ; (e)ax = adjust 579 _386_PM_o32 580 dec ax ; (e)ax = adjust - 1 581 582 ; have: (e)si = prior start offset, (e)dx = end offset 583 ; want: (e)si = unchanged, (e)dx = intermediate end offset, 584 ; preserve intermediate start offset, stack = end offset 585 _386_PM_o32 586 push dx ; stack := end offset 587 _386_PM_o32 588 mov dx, word [bp + ?offset] 589 ; (e)dx := start offset 590 _386_PM_o32 591 add dx, ax ; (e)dx := intermediate end offset 592 593 call dd_display ; display, (e)dx := intermediate start offset 594 595 ; have: (e)si scrambled, (e)dx = intermediate start offset, 596 ; stack = end offset 597 ; want: (e)si = intermediate start offset, (e)dx = end offset 598 _386_PM_o32 599 mov si, dx ; (e)si := intermediate start offset 600 _386_PM_o32 601 pop dx ; (e)dx := end offset 602 jmp .loop_no_cx 603 604 .justdisplay: 605 _386_PM_o32 606 pop dx 607 _386_PM_o32 608 pop si 609 pop bx 610 611 .justdisplay_no_pop: 612 lleave 613 %endif 614 0 00002FA6 E8D300 call dd_display 616 0 00002FA9 F606[0100]80 testopt [getrange_lines], 8000h 0 00002FAE 750D jnz .notlines 0 00002FB0 FF0E[0000] dec word [getrange_lines] 0 00002FB4 7407 jz .linesdone 621 _386_PM_o32 0 00002FB6 89D6 mov si, dx ; = new start offset 0 00002FB8 E8A400 call dd_get_one_line_range 624 ; get a new end offset 0 00002FBB EBE9 jmp dd_loop_line 626 627 .linesdone: 628 .notlines: 0 00002FBD B80200 mov ax, opt2_db_trailer 630 %if _DNUM 0 00002FC0 803E[0400]02 cmp byte [ddsize], 2 0 00002FC5 7207 jb @F 0 00002FC7 B020 mov al, opt2_dw_trailer 0 00002FC9 7403 je @F 0 00002FCB B80002 mov ax, opt2_dd_trailer 636 ; fixme dq 637 %endif 638 @@: 639 ; fall through 640 641 642 ; INP: ax = flag value to check 643 ; (determines whether "header" or "trailer" is written, 644 ; and which flag must be set in word [options2]) 645 ; byte [ddoffset2] = how many bytes to skip at the start 646 ; bx = segment/selector 647 ; CHG: ax, cx, di 648 ; STT: ds = es = ss 649 dd_header_or_trailer: 0 00002FCE 8506[0000] test word [options2], ax 0 00002FD2 7503E98700 jz .ret 0 00002FD7 53 push bx 0 00002FD8 56 push si 0 00002FD9 52 push dx 655 0 00002FDA BF[0000] mov di, line_out 657 %if _40COLUMNS 0 00002FDD F606[0100]10 testopt [options6], opt6_40_columns 0 00002FE2 740D jz @F 0 00002FE4 89D8 mov ax, bx 0 00002FE6 E8[0000] call hexword 0 00002FE9 B03A mov al, ':' 0 00002FEB AA stosb 664 %if _PM 665 mov cx, -5 666 mov ax, 4 + 2 667 call test_high_limit ; 32-bit segment ? 668 jz .add ; no --> 669 mov al, 8 + 2 670 jmp .add 671 %else 0 00002FEC B90100 mov cx, 1 0 00002FEF EB19 jmp .blank 674 %endif 675 @@: 676 %endif 677 678 %if _LINK 0 00002FF1 B9[0000] mov cx, msg.header.length 680 wlcalc word_subr_0, equ $ - 2 681 %else 682 mov cx, - msg.header.length 683 %endif 0 00002FF4 BA[0000] mov dx, msg.header 0 00002FF7 A91101 test ax, opt2_db_header | opt2_dw_header | opt2_dd_header ; fixme dq 0 00002FFA 7506 jnz @F 687 %if _LINK 0 00002FFC B9[0000] mov cx, msg.trailer.length 689 wlcalc word_subr_0, equ $ - 2 690 %else 691 mov cx, - msg.trailer.length 692 %endif 0 00002FFF BA[0000] mov dx, msg.trailer 694 @@: 0 00003002 E8[0000] call putsz ; put initial word 696 ; cx = minus length of initial word 0 00003005 B80B00 mov ax, 4 + 1 + 4 + 2 ; length of address with 16-bit offset 698 %if _PM 699 ; mov bx, word [d_addr + saSegSel] 700 call test_high_limit ; 32-bit segment ? 701 jz .16 ; no --> 702 mov al, 4 + 1 + 8 + 2 ; length of address with 32-bit offset 703 .16: 704 %endif 705 .add: 0 00003008 01C1 add cx, ax ; length of address minus length of word 707 ; = length to pad 708 .blank: 0 0000300A B020 mov al, 32 0 0000300C F3AA rep stosb ; pad 711 ; ch = 0 712 0 0000300E B83020 mov ax, '0 ' ; al = '0', ah = blank 714 %if _DNUM 0 00003011 8A0E[0600] mov cl, byte [ddoffset2]; cx = ddoffset2 0 00003015 E304 jcxz @FF ; if none to skip --> 717 @@: 0 00003017 AB stosw 0 00003018 40 inc ax ; increment the number (up to '7') 0 00003019 E2FC loop @B ; loop for skipping --> 721 @@: 722 %endif 0 0000301B 2C30 sub al, '0' ; = back to numerical (0 .. 7) 0 0000301D 89C2 mov dx, ax ; dl = numerical offset 725 0 0000301F 52 push dx 727 %if _DNUM 0 00003020 8B1E[0400] mov bx, [ddsize] ; ddsize 729 %else 730 mov bx, 1 731 %endif 0 00003024 BE1000 mov si, 16 ; loop counter 733 %if _40COLUMNS 0 00003027 F606[0100]10 testopt [options6], opt6_40_columns 0 0000302C 7402 jz @F 0 0000302E D1EE shr si, 1 737 %endif 738 @@: 0 00003030 88D0 mov al, dl ; next numerical offset 0 00003032 E8[0000] call hexnyb ; display it 741 %if _DNUM 0 00003035 89D9 mov cx, bx 0 00003037 01C9 add cx, cx ; cx = 2 * ddsize 0 00003039 B020 mov al, 32 0 0000303B F3AA rep stosb ; pad to next position 746 %else 747 mov al, 32 748 stosb 749 stosb 750 %endif 0 0000303D 01DA add dx, bx ; increment dl by how many positions we use 0 0000303F 29DE sub si, bx ; decrement loop counter 0 00003041 77ED ja @B ; don't jump if si was below-or-equal-to bx 0 00003043 5A pop dx 755 0 00003044 B91000 mov cx, 16 ; loop counter 757 %if _40COLUMNS 0 00003047 F606[0100]10 testopt [options6], opt6_40_columns 0 0000304C 7402 jz @F 0 0000304E D1E9 shr cx, 1 761 %endif 762 @@: 0 00003050 88D0 mov al, dl 0 00003052 E8[0000] call hexnyb ; display an offset 765 ; Note that this will wrap around for the last 1 to 7 766 ; characters if byte [ddoffset2] is non-zero. 0 00003055 42 inc dx ; increment offset 0 00003056 E2F8 loop @B ; loop 769 0 00003058 E8[0000] call putsline_crlf 771 0 0000305B 5A pop dx 0 0000305C 5E pop si 0 0000305D 5B pop bx 775 .ret: 0 0000305E C3 retn 777 778 779 ; INP: (e)si = start 780 ; word [ddsize] = size of element, 1 or 2 or 4 781 ; OUT: (e)dx = end 782 dd_get_one_line_range: 783 _386_PM_o32 0 0000305F 89F2 mov dx, si 785 %if _DNUM 786 _386_PM xor eax, eax 0 00003061 A1[0400] mov ax, word [ddsize] 0 00003064 48 dec ax 0 00003065 21F0 and ax, si 790 %else 791 _386_PM_o32 792 xor ax, ax 793 %endif 794 %if _40COLUMNS 0 00003067 80CA07 or dl, 7 0 0000306A F606[0100]10 testopt [options6], opt6_40_columns 0 0000306F 7503 jnz @F 798 %endif 0 00003071 80CA0F or dl, 15 800 @@: 801 802 %if _PM 803 push bx 804 mov bx, word [d_addr + saSegSel] 805 call test_high_limit ; 32-bit segment ? 806 pop bx 807 jz .16 ; no --> 808 .32: 809 _386_PM_o32 810 add dx, ax 811 jnc @F 812 _386_PM_o32 813 or dx, strict byte -1 814 @@: 815 retn 816 .16: 817 %endif 0 00003074 01C2 add dx, ax 0 00003076 7303 jnc @F 0 00003078 83CAFF or dx, strict byte -1 821 @@: 0 0000307B C3 retn 823 824 825 ; INP: word [d_addr + saSegSel] = segment/selector to dump 826 ; (e)si = start offset 827 ; (e)dx = end offset 828 ; if _DNUM: 829 ; byte [ddsize] = 1, 2, 4, or 8 830 ; (for byte, word, dword, or qword) 831 ; OUT: (d)word [d_addr] updated 832 ; (e)dx = (d)word [d_addr] 833 ; displayed 834 dd_display: 0 0000307C 16 push ss 0 0000307D 07 pop es 837 dd2_loop: 0 0000307E E8[0000] call handle_serial_flags_ctrl_c 839 0 00003081 C706[0000][BB00] mov word [lastcmd], lastddd 841 0 00003087 BF[0000] mov di, line_out ; reset di for next line 843 %if _40COLUMNS 0 0000308A BBF0FF mov bx, ~0Fh 0 0000308D F606[0100]10 testopt [options6], opt6_40_columns 0 00003092 7402 jz @F 0 00003094 B3F8 mov bl, ~7 848 @@: 849 %endif 0 00003096 E86D01 call dd_display_offset.masklownybble 851 ; ax = offset & ~ 0Fh 852 %if _40COLUMNS 0 00003099 89C3 mov bx, ax 854 %endif 855 856 %if _DNUM 0 0000309B 8B0E[0400] mov cx, word [ddsize] 0 0000309F 51 push cx 0 000030A0 49 dec cx ; 0 = byte, 1 = word, 3 = dword 0 000030A1 21F1 and cx, si ; how many bytes to skip at the beginning 861 ; eg: si = 101h, cx = 1, skip 1 byte, ax = 101h 862 ; si = 102h, cx = 3, skip 2 bytes, ax = 102h 863 ; si = 103h, cx = 3, skip 3 bytes, ax = 103h 864 ; si = 103h, cx = 1, skip 1 byte, ax = 101h 865 ; si = 10Fh, cx = 1, skip 1 byte, ax = 101h 866 ; si = 10Fh, cx = 3, skip 3 bytes, ax = 103h 0 000030A3 01C8 add ax, cx ; = where to start 0 000030A5 890E[0000] mov word [ddoffset], cx 869 %endif 0 000030A9 50 push ax 0 000030AA B82020 mov ax, 32 << 8 | 32 872 %if _DNUM 0 000030AD F3AB rep stosw 874 %endif 875 %if _40COLUMNS 876 %if (opt6_40_columns | opt6_40_indent_odd) & 0FFFF_00FFh 877 %error Expected option flags in same byte 878 %endif 0 000030AF F606[0100]30 testopt [options6], opt6_40_columns | opt6_40_indent_odd 0 000030B4 7408 jz @F ; neither set --> 0 000030B6 7B06 jpo @F ; only one set --> 0 000030B8 F6C308 test bl, 8 0 000030BB 7401 jz @F 0 000030BD AA stosb 885 @@: 886 %endif 0 000030BE 58 pop ax 888 %if _DNUM 0 000030BF 59 pop cx 890 %else 891 mov cx, 1 892 %endif 893 0 000030C0 BB3000 mov bx, (2+1)*16 ; 16 bytes (2 digits each) 895 %if _DNUM 0 000030C3 80F902 cmp cl, 2 0 000030C6 7206 jb @F ; if it is 1 --> 0 000030C8 B328 mov bl, (4+1)*8 ; 8 words (4 digits each) 0 000030CA 7402 je @F ; if it is 2 --> 900 ; it is 4 0 000030CC B324 mov bl, (8+1)*4 ; 4 dwords (8 digits each) 902 %if _DQ 903 cmp cl, 4 904 je @F 905 mov bl, (16+1)*2 ; 2 qwords (16 digits each) 906 %endif 907 @@: 908 %endif 909 %if _40COLUMNS 0 000030CE F606[0100]10 testopt [options6], opt6_40_columns 0 000030D3 7402 jz @F 0 000030D5 D1EB shr bx, 1 ; half as many items 913 @@: 914 %endif 0 000030D7 01FB add bx, di 0 000030D9 E8[0000] call prephack ; set up for faking int vectors 23 and 24 917 0 000030DC 50 push ax 919 ; blank the start of the line if offset isn't paragraph aligned 920 dd3: 0 000030DD 39F0 cmp ax, si ; skip to position in line 0 000030DF 7429 je dd4 ; if we're there yet 0 000030E1 7718 ja .error 924 %if _DNUM 0 000030E3 50 push ax 0 000030E4 B82020 mov ax, 32 << 8| 32 0 000030E7 51 push cx 0 000030E8 F3AB rep stosw ; store two blanks (2 * 1) if byte, 929 ; four blanks (2 * 2) if word, 930 ; eight blanks (2 * 4) if dword 0 000030EA 59 pop cx 0 000030EB AA stosb ; store additional blank as separator 0 000030EC 51 push cx 934 @@: 0 000030ED 268807 mov byte [es:bx], al 0 000030F0 43 inc bx 0 000030F1 E2FA loop @B ; store as many blanks in text dump as bytes 0 000030F3 59 pop cx 0 000030F4 58 pop ax 0 000030F5 0306[0400] add ax, word [ddsize] ; -> behind the byte/word/dword just written 941 %else 942 push ax 943 mov ax, 32 << 8| 32 944 stosw ; store two blanks 945 stosb ; store additional blank as separator 946 mov byte [es:bx], al ; store a blank in text dump 947 inc bx 948 pop ax 949 inc ax ; -> behind the byte just written 950 %endif 0 000030F9 EBE2 jmp short dd3 952 953 954 .error: 0 000030FB BA[0800] mov dx, .msg_internal_error 0 000030FE E8[0000] call putsz_error 0 00003101 B80106 mov ax, 0601h 0 00003104 E8[0000] call setrc 0 00003107 E9[0000] jmp cmd3 960 961 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 961 ------------------ note: usesection lDEBUG_DATA_ENTRY 962 .msg_internal_error: 0 0000171C 496E7465726E616C20 asciz "Internal error in dd3.",13,10 0 00001725 6572726F7220696E20 0 0000172E 6464332E0D0A00 964 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 964 ------------------ note: usesection lDEBUG_CODE 965 966 967 ; Begin main loop over lines of output. 968 dd4: 0 0000310A 58 pop ax 970 %if _40COLUMNS 971 _386_PM_o32 ; xor ecx, ecx 0 0000310B 31C9 xor cx, cx 0 0000310D B10F mov cl, 0Fh 0 0000310F F606[0100]10 testopt [options6], opt6_40_columns 0 00003114 7402 jz @F 0 00003116 B107 mov cl, 7 977 @@: 978 %if _PM 979 push bx 980 mov bx, word [d_addr + saSegSel] 981 call test_high_limit ; 32-bit segment ? 982 pop bx 983 jz .16 ; no --> 984 _386_PM_o32 ; add ecx, eax 985 %endif 986 .16: 0 00003118 01C1 add cx, ax 988 %else 989 _386_PM_o32 ; mov ecx, eax 990 mov cx, ax 991 %if _PM 992 push bx 993 mov bx, word [d_addr + saSegSel] 994 call test_high_limit ; 32-bit segment ? 995 pop bx 996 jz .16 ; no --> 997 _386_PM_o32 ; add ecx, strict byte 0Fh 998 %endif 999 .16: 1000 add cx, strict byte 0Fh 1001 %endif 0 0000311A 7204 jc @F 1003 _386_PM_o32 ; cmp ecx, edx 0 0000311C 39D1 cmp cx, dx ; compare with end address 0 0000311E 7202 jb dd5 ; if we write to the end of the line --> 1006 @@: 1007 ;_386_PM_o32 ; mov ecx, edx 0 00003120 89D1 mov cx, dx ; only write until (e)dx, inclusive 1009 dd5: 1010 ;_386_PM_o32 ; sub ecx, esi 0 00003122 29F1 sub cx, si 1012 ;_386_PM_o32 ; inc ecx 0 00003124 41 inc cx ; cx = number of bytes to print this line 1014 ; up to 16. no 32-bit register required 1015 %if _DNUM 0 00003125 8326[0200]00 and word [ddskipped], 0 1017 %endif 1018 0 0000312A E8[0000] call dohack ; substitute interrupt vectors 1020 %if _DHIGHLIGHT 1021 mov word [dd_h_number], di 1022 mov word [dd_h_text], bx 1023 %endif 0 0000312D 8E1E[0400] mov ds, word [d_addr + saSegSel] 1025 1026 dd6: 1027 %if _DNUM 0 00003131 36A1[0400] mov ax, word [ss:ddsize] 0 00003135 39C8 cmp ax, cx ; ddsize <= left bytes ? 0 00003137 7617 jbe dd6_simple ; yes, display ddsize bytes --> 1031 0 00003139 50 push ax 0 0000313A 51 push cx 0 0000313B 57 push di 0 0000313C F7D9 neg cx ; - left bytes 0 0000313E 01C1 add cx, ax ; ddsize - left bytes = how many skipped 0 00003140 36890E[0200] mov word [ss:ddskipped], cx 1038 0 00003145 89C1 mov cx, ax ; 1 = bytes, 2 = words, 4 = dwords 0 00003147 49 dec cx ; 0 = bytes, 1 = words, 3 = dwords 0 00003148 B85858 mov ax, 'XX' 0 0000314B F3AB rep stosw ; fill filler digits not to be written 0 0000314D 5F pop di 0 0000314E 59 pop cx 0 0000314F 58 pop ax 1046 %endif 1047 1048 dd6_simple: 1049 %if _DNUM 0 00003150 01C0 add ax, ax ; 2 = bytes, 4 = words, 8 = dwords 0 00003152 50 push ax 1052 @@: 0 00003153 48 dec ax 0 00003154 48 dec ax 1055 ; first iteration: 0 = bytes, 2 = words, 6 = dwords 1056 ; second iteration: 0 = words, 4 = dwords 1057 ; third iteration: (0 = 3byte,) 2 = dwords 1058 ; fourth iteration: 0 = dwords 0 00003155 57 push di 0 00003156 01C7 add di, ax ; -> where to write next 2 hex digits 0 00003158 50 push ax 1062 %endif 1063 _386_PM_a32 0 00003159 AC lodsb ; al = data 0 0000315A E8B300 call dd_store ; stores number at es:di->, char at es:bx-> 1066 %if _DNUM 0 0000315D 58 pop ax 0 0000315E 5F pop di ; -> start of hex digits space 0 0000315F 85C0 test ax, ax ; did we write the left-most digits? 0 00003161 E0F0 loopnz @B ; not yet --> (or no more bytes to display) 0 00003163 58 pop ax ; = how many digits we wrote 0 00003164 01C7 add di, ax ; -> after right-most digit 0 00003166 B020 mov al, 32 0 00003168 AA stosb ; store a blank 0 00003169 85C9 test cx, cx 0 0000316B 75C4 jnz dd6 ; (16-bit. cx <= 16) 1077 0 0000316D 16 push ss ; restore ds 0 0000316E 1F pop ds 1080 _386_PM_o32 0 0000316F 2B36[0000] sub si, word [ddoffset] 1082 _386_PM_o32 0 00003173 0336[0200] add si, word [ddskipped] 1084 %else 1085 mov al, 32 1086 stosb ; store a blank 1087 loop dd6 1088 push ss ; restore ds 1089 pop ds 1090 %endif 1091 1092 dd9: 1093 %if _40COLUMNS 0 00003177 B80F00 mov ax, 0Fh 0 0000317A F606[0100]10 testopt [options6], opt6_40_columns 0 0000317F 7402 jz @F 0 00003181 B007 mov al, 7 1098 @@: 0 00003183 85C6 test si, ax 1100 %else 1101 test si, 0Fh ; space out till end of line 1102 %endif 0 00003185 7417 jz dd10 1104 %if _DNUM 1105 %if _40COLUMNS 0 00003187 50 push ax 1107 %endif 0 00003188 B82020 mov ax, 32 << 8 | 32 0 0000318B 8B0E[0400] mov cx, word [ddsize] 0 0000318F 51 push cx 0 00003190 F3AB rep stosw ; store blanks for the number 0 00003192 AA stosb ; store additional blank as separator 0 00003193 59 pop cx 1114 %if _40COLUMNS 0 00003194 58 pop ax 1116 %endif 1117 @@: 1118 _386_PM_o32 0 00003195 46 inc si ; skip as many bytes 1120 %if _40COLUMNS 0 00003196 85C6 test si, ax 1122 %else 1123 test si, 0Fh 1124 %endif 0 00003198 7404 jz dd10 0 0000319A E2F9 loop @B 1127 %else 1128 %if _40COLUMNS 1129 push ax 1130 %endif 1131 mov ax, 32 << 8 | 32 1132 stosw ; store blanks for the number 1133 stosb ; store additional blank as separator 1134 _386_PM_o32 1135 inc si ; skip as many bytes 1136 %if _40COLUMNS 1137 pop ax 1138 %endif 1139 %endif 0 0000319C EBD9 jmp short dd9 1141 1142 dd10: 1143 %if _DNUM 1144 _386_PM_o32 0 0000319E 0336[0000] add si, word [ddoffset] 1146 _386_PM_o32 0 000031A2 2B36[0200] sub si, word [ddskipped] 1148 %endif 1149 0 000031A6 B91900 mov cx, (1 + 8 * (2 + 1)) ; go back 8 bytes (2 digits each) 1151 %if _DNUM 0 000031A9 803E[0400]02 cmp byte [ddsize], 2 0 000031AE 7206 jb @F ; if it is 1 --> 0 000031B0 B115 mov cl, (1 + 4 * (4 + 1)) ; go back 4 words (4 digits each) 0 000031B2 7402 je @F ; if it is 2 --> 1156 ; it is 4 0 000031B4 B113 mov cl, (1 + 2 * (8 + 1)) ; go back 2 dwords (8 digits each) 1158 %if _DQ 1159 cmp byte [ddsize], 4 1160 je @F 1161 mov cl, (1 + 1 * (16 + 1)) ; go back 1 qwords (16 digits each) 1162 %endif 1163 %endif 1164 @@: 1165 %if _40COLUMNS 0 000031B6 F606[0100]10 testopt [options6], opt6_40_columns 0 000031BB 740B jz @F 0 000031BD F606[0100]40 testopt [options6], opt6_40_dash 0 000031C2 7409 jz .nodash ; do not write a dash 1170 %if 1 1171 ; calculate dash position 0 000031C4 49 dec cx 0 000031C5 D1E9 shr cx, 1 0 000031C7 41 inc cx 1175 %else 1176 ; dispatch for dash position 1177 mov cx, (1 + 4 * (2 + 1)) ; go back 4 bytes (2 digits each) 1178 cmp byte [ddsize], 2 1179 jb @F ; if it is 1 --> 1180 mov cl, (1 + 2 * (4 + 1)) ; go back 2 words (4 digits each) 1181 je @F ; if it is 2 --> 1182 ; it is 4 1183 mov cl, (1 + 1 * (8 + 1)) ; go back 1 dwords (8 digits each) 1184 %endif 1185 %if _DQ 1186 cmp byte [ddsize], 4 1187 ja .nodash 1188 %endif 1189 @@: 1190 %endif 0 000031C8 29CF sub di, cx 0 000031CA C6052D mov byte [di], '-' 1193 .nodash: 0 000031CD E8[0000] call unhack 0 000031D0 89DF mov di, bx 0 000031D2 52 push dx 1197 %if _DHIGHLIGHT 1198 testopt [options3], opt3_d_highlight 1199 jz .justputs 1200 mov ax, 13 | 10 << 8 1201 stosw 1202 push si 1203 %if 0 1204 mov si, line_out 1205 mov dx, si 1206 @@: 1207 lodsb 1208 cmp al, 32 1209 jne @B 1210 @@: 1211 lodsb 1212 cmp al, 32 1213 je @B 1214 dec si 1215 mov cx, si 1216 sub cx, dx 1217 call puts 1218 %else 1219 mov dx, line_out 1220 mov si, word [dd_h_number] 1221 mov cx, si 1222 sub cx, dx 1223 call puts 1224 mov dx, si 1225 .hl: 1226 call emit_highlight 1227 @@: 1228 lodsb 1229 cmp si, word [dd_h_text] 1230 jae .text_dx 1231 cmp al, 'X' 1232 je @B 1233 nearcall getnyb 1234 jnc @B 1235 mov cx, si 1236 sub cx, dx 1237 call puts 1238 mov dx, si 1239 cmp si, word [dd_h_text] 1240 jae .text 1241 @@: 1242 lodsb 1243 cmp si, word [dd_h_text] 1244 jae .text_dx 1245 cmp al, 32 1246 je @B 1247 cmp al, '-' 1248 je @B 1249 call emit_unhighlight 1250 @@: 1251 lodsb 1252 cmp si, word [dd_h_text] 1253 jae .text_dx 1254 cmp al, 'X' 1255 je @B 1256 nearcall getnyb 1257 jnc @B 1258 mov cx, si 1259 sub cx, dx 1260 call puts 1261 mov dx, si 1262 cmp si, word [dd_h_text] 1263 jae .text 1264 @@: 1265 lodsb 1266 cmp si, word [dd_h_text] 1267 jae .text_dx 1268 cmp al, 32 1269 je @B 1270 cmp al, '-' 1271 je @B 1272 jmp .hl 1273 1274 .text_dx: 1275 mov cx, si 1276 sub cx, dx 1277 call puts 1278 mov dx, si 1279 .text: 1280 call emit_highlight 1281 lodsb 1282 cmp al, 13 1283 je .done_unhl 1284 mov cx, 1 1285 call puts 1286 mov dx, si 1287 call emit_unhighlight 1288 lodsb 1289 cmp al, 13 1290 je .done 1291 mov cx, 1 1292 call puts 1293 mov dx, si 1294 jmp .text 1295 1296 .done_unhl: 1297 call emit_unhighlight 1298 .done: 1299 mov dx, si 1300 dec dx 1301 mov cx, 2 1302 call puts 1303 %endif 1304 pop si 1305 jmp @F 1306 %endif 1307 .justputs: 0 000031D3 E8[0000] call putsline_crlf 1309 @@: 0 000031D6 5A pop dx 1311 _386_PM_o32 ; dec esi 0 000031D7 4E dec si 1313 _386_PM_o32 ; cmp esi, edx 0 000031D8 39D6 cmp si, dx 1315 _386_PM_o32 ; inc esi 0 000031DA 46 inc si 0 000031DB 7303E99EFE jb dd2_loop ; display next line --> 1318 dd11: 1319 ; This check is necessary to wrap around at FFFFh (64 KiB) 1320 ; for 16-bit segments instead of at FFFFFFFFh (4 GiB). 0 000031E0 8B1E[0400] mov bx, word [d_addr + saSegSel] 1322 ; reset bx (also set segment for trailer) 1323 _386_PM call test_high_limit ; 32-bit segment ? 1324 _386_PM jz .16 ; no --> 1325 _386_PM_o32 ; inc edx 1326 .16: 0 000031E4 42 inc dx ; set up the address for the next 'D' command. 1328 _386_PM_o32 ; mov dword [d_addr], edx 0 000031E5 8916[0000] mov word [d_addr], dx 0 000031E9 C3 retn 1331 1332 1333 ; INP: (e)si = offset (to display) 1334 ; (e)dx = end offset (for range check of 16-bit segment) 1335 ; word [d_addr + saSegSel] = segment/selector 1336 ; es:di -> where to write to 1337 ; OUT: bx = segment/selector 1338 dd_display_offset: 1339 .: 0 000031EA A1[0400] mov ax, word [d_addr + saSegSel] 0 000031ED 89C3 mov bx, ax 1342 %if _40COLUMNS 0 000031EF F606[0100]10 testopt [options6], opt6_40_columns 0 000031F4 7506 jnz @F 1345 %endif 0 000031F6 E8[0000] call hexword 0 000031F9 B03A mov al, ':' 0 000031FB AA stosb 1349 @@: 1350 _386_PM_o32 ; mov eax, esi 0 000031FC 89F0 mov ax, si 1352 _386_PM call test_high_limit ; 32-bit segment ? 1353 _386_PM jz .386_16 ; no --> (don't display zero high word) 1354 _386_PM call hexword_high ; yes, display high word of address 1355 .common: 0 000031FE E8[0000] call hexword 0 00003201 B82020 mov ax, 32<<8|32 0 00003204 AB stosw 0 00003205 C3 retn 1360 1361 ; Insure that the high word is zero. 1362 %if _PM 1363 .386_16: 1364 ;_386 test esi, ~0FFFFh 1365 ;_386 jnz .error 1366 _386 test edx, ~0FFFFh 1367 _386 jz .common 1368 ;.error: 1369 _386 mov ax, 013Ch 1370 _386 call setrc 1371 _386 mov dx, msg.ofs32 1372 _386 call putsz_error 1373 _386 jmp cmd3 1374 %endif 1375 1376 ; INP: (e)si = offset (to display) 1377 ; (e)dx = end offset (for range check of 16-bit segment) 1378 ; word [d_addr + saSegSel] = segment/selector 1379 ; es:di -> where to write to 1380 ; if _40COLUMNS: 1381 ; bx = mask to apply to si 1382 ; OUT: bx = segment/selector 1383 ; (e)ax = offset & ~0Fh (or offset & bx) 1384 .masklownybble: 0 00003206 56 push si 1386 %if _40COLUMNS 0 00003207 21DE and si, bx 1388 %else 1389 and si, ~0Fh 1390 %endif 1391 _386_PM_o32 0 00003209 56 push si 0 0000320A E8DDFF call . 1394 _386_PM_o32 0 0000320D 58 pop ax 0 0000320E 5E pop si 0 0000320F C3 retn 1398 1399 1400 ; Store a character into the buffer. Characters that can't 1401 ; be displayed are replaced by a dot. 1402 ; 1403 ; INP: al = character 1404 ; es:bx-> buffer for displayed characters 1405 ; es:di-> buffer for hexadecimal number 1406 ; OUT: es:bx-> behind displayed character 1407 ; es:di-> behind hexadecimal number and space 1408 ; CHG: ax 1409 ; STT: ds unknown 1410 dd_store: section_of_function 0 00003210 E8[0000] call hexbyte ; dump hexadecimal number 0 00003213 362206[0700] and al, byte [ss:dd_text_and] 1413 ; for MSDebug compatibility 0 00003218 3C20 cmp al, 32 ; below blank ? 0 0000321A 7216 jb .ctrl ; control char --> 0 0000321C 3C7F cmp al, 127 ; DEL ? 0 0000321E 7412 je .ctrl ; yes, control char --> 0 00003220 7212 jb .noctrl ; below, not a control char --> 0 00003222 36F606[0000]04 testopt [ss:options], cpdepchars 1420 ; allow CP-dependent characters ? 0 00003228 750A jnz .noctrl ; yes --> 1422 %if _DTOP 0 0000322A 36F606[0200]80 testopt [ss:internalflags6], dif6_cpdepchars 1424 ; allow CP-dependent characters ? 0 00003230 7502 jnz .noctrl ; yes --> 1426 %endif 1427 .ctrl: 0 00003232 B02E mov al, '.' ; replace by dot 1429 .noctrl: 0 00003234 268807 mov byte [es:bx], al ; store dot or printable text byte 0 00003237 43 inc bx 0 00003238 C3 retn 1433 1434 1435 %if _PM 1436 usesection lDEBUG_DATA_ENTRY 1437 align 2, db 0 1438 daresult: dw -1 1439 1440 usesection lDEBUG_CODE 1441 1442 descalloc: 1443 call skipwhite 1444 call chkeol 1445 xor ax, ax 1446 mov cx, 1 1447 int 31h 1448 jc .error 1449 mov di, msg.d.a_success_sel 1450 call hexword 1451 mov dx, msg.d.a_success 1452 .display: 1453 call putsz 1454 mov word [daresult], ax 1455 retn 1456 1457 .error: 1458 mov di, msg.d.a_error_code 1459 call hexword 1460 mov dx, msg.d.a_error 1461 cmp ax, 8000h 1462 jae @F 1463 mov ax, 0801h 1464 @@: 1465 call setrc 1466 mov ax, -1 1467 jmp .display 1468 1469 1470 descdealloc: 1471 call skipwhite 1472 nearcall getword 1473 call chkeol 1474 mov ax, 1 1475 mov bx, dx 1476 int 31h 1477 jc .error 1478 mov dx, msg.d.d_success 1479 .display: 1480 jmp putsz 1481 1482 .error: 1483 mov di, msg.d.d_error_code 1484 call hexword 1485 mov dx, msg.d.d_error 1486 cmp ax, 8000h 1487 jae @F 1488 mov ax, 0802h 1489 @@: 1490 call setrc 1491 jmp .display 1492 1493 1494 descbase: 1495 call skipwhite 1496 nearcall getword 1497 mov cx, dx 1498 nearcall getdword 1499 call chkeol 1500 xchg cx, bx ; cx:dx = base, bx = desc 1501 mov ax, 7 1502 int 31h 1503 jc .error 1504 mov dx, msg.d.b_success 1505 .display: 1506 jmp putsz 1507 1508 .error: 1509 mov di, msg.d.b_error_code 1510 call hexword 1511 mov dx, msg.d.b_error 1512 cmp ax, 8000h 1513 jae @F 1514 mov ax, 0803h 1515 @@: 1516 call setrc 1517 jmp .display 1518 1519 1520 desclimit: 1521 call skipwhite 1522 nearcall getword 1523 mov cx, dx 1524 nearcall getdword 1525 call chkeol 1526 xchg cx, bx ; cx:dx = limit, bx = desc 1527 mov ax, 8 1528 int 31h 1529 jc .error 1530 mov dx, msg.d.l_success 1531 .display: 1532 jmp putsz 1533 1534 .error: 1535 mov di, msg.d.l_error_code 1536 call hexword 1537 mov dx, msg.d.l_error 1538 cmp ax, 8000h 1539 jae @F 1540 mov ax, 0804h 1541 @@: 1542 call setrc 1543 jmp .display 1544 1545 1546 desctype: 1547 call skipwhite 1548 nearcall getword 1549 mov bx, dx 1550 nearcall getword 1551 call chkeol 1552 mov cx, dx ; cx = type, bx = desc 1553 mov ax, 9 1554 int 31h 1555 jc .error 1556 mov dx, msg.d.t_success 1557 .display: 1558 jmp putsz 1559 1560 .error: 1561 mov di, msg.d.t_error_code 1562 call hexword 1563 mov dx, msg.d.t_error 1564 cmp ax, 8000h 1565 jae @F 1566 mov ax, 0805h 1567 @@: 1568 call setrc 1569 jmp .display 1570 1571 1572 descsubcommand: 1573 lodsb 1574 cmp al, '?' 1575 je deschelp 1576 call ispm 1577 jne display_nodesc 1578 call capitalise 1579 cmp al, 'A' 1580 je descalloc 1581 cmp al, 'D' 1582 je descdealloc 1583 cmp al, 'B' 1584 je descbase 1585 cmp al, 'L' 1586 je desclimit 1587 cmp al, 'T' 1588 je desctype 1589 jmp error 1590 1591 deschelp: 1592 lodsb 1593 call chkeol 1594 mov dx, msg.deschelp 1595 jmp putsz_exthelp ; print string and return 1596 1597 1598 ; DL command 1599 descout: 1600 call skipwhite 1601 nearcall getword; get word into DX 1602 mov bx, dx 1603 call skipcomm0 1604 mov dx, 1 1605 call iseol? 1606 je .onlyone 1607 call capitalise 1608 cmp al, 'L' 1609 jne .notlength 1610 call skipcomma 1611 .notlength: 1612 nearcall getword 1613 call chkeol 1614 .onlyone: 1615 inc dx ; (note js at nextdesc changed to jz) 1616 mov si, dx ; save count 1617 call ispm 1618 je nextdesc 1619 display_nodesc: 1620 mov dx, nodesc 1621 mov ax, 0800h 1622 call setrc 1623 jmp putsz 1624 desc_done: 1625 retn 1626 subcpu 286 1627 nextdesc: 1628 dec si 1629 jz desc_done 1630 mov di, descriptor 1631 mov ax, bx 1632 call hexword 1633 mov di, descriptor.base 1634 push di 1635 mov ax, "??" 1636 stosw 1637 stosw 1638 stosw 1639 stosw 1640 %ifn _LINK 1641 add di, byte (descriptor.limit - (descriptor.base + 8)) 1642 %else 1643 add di, strict byte -8 1644 wlcalc byte_ext_descriptor.limit, equ $ - 1 1645 wlcalc byte_minusext_descriptor.base, equ $ - 1 1646 %endif 1647 stosw 1648 stosw 1649 stosw 1650 stosw 1651 %ifn _LINK 1652 add di, byte (descriptor.attrib - (descriptor.limit + 8)) 1653 %else 1654 add di, strict byte -8 1655 wlcalc byte_ext_descriptor.attrib, equ $ - 1 1656 wlcalc byte_minusext_descriptor.limit, equ $ - 1 1657 %endif 1658 stosw 1659 stosw 1660 pop di 1661 ; lar ax, bx 1662 ; jnz skipdesc ; tell that this descriptor is invalid 1663 mov ax, 6 1664 int 31h 1665 jc desc_o1 1666 mov ax, cx 1667 call hexword 1668 mov ax, dx 1669 call hexword 1670 desc_o1: 1671 mov di, descriptor.limit 1672 _no386_jmps use16desc 1673 subcpu 386 1674 lsl eax, ebx 1675 jnz desc_out 1676 push ax 1677 shr eax, 16 1678 call hexword 1679 pop ax 1680 call hexword 1681 lar eax, ebx 1682 shr eax, 8 1683 desc_o2: 1684 mov di, descriptor.attrib 1685 call hexword 1686 desc_out: 1687 mov dx, descriptor 1688 call putsz 1689 add bx, byte 8 1690 jmp short nextdesc 1691 subcpureset ; subcpu 386 1692 use16desc: 1693 lsl ax, bx 1694 jnz desc_out 1695 call hexword 1696 mov ax, 32<<8|32 1697 stosw 1698 stosw 1699 lar ax, bx 1700 shr ax, 8 1701 jmp short desc_o2 1702 subcpureset ; subcpu 286 1703 %endif 1704 1705 %if _DSTRINGS 1706 ; D$ command 1707 dcpm: 0 00003239 C606[0000]24 mov byte [dstringtype], 36 0 0000323E C706[0000][0000] mov word [dstringaddr], dcpm_addr 0 00003244 EB25 jmp short dstring 1711 1712 ; DW# command 1713 dwcounted: 0 00003246 C606[0000]FE mov byte [dstringtype], 0FEh 0 0000324B C706[0000][0000] mov word [dstringaddr], dwcount_addr 0 00003251 EB18 jmp short dstring 1717 1718 ; D# command 1719 dcounted: 0 00003253 C606[0000]FF mov byte [dstringtype], 0FFh 0 00003258 C706[0000][0000] mov word [dstringaddr], dcount_addr 0 0000325E EB0B jmp short dstring 1723 1724 ; DZ command 1725 dz: 0 00003260 C606[0000]00 mov byte [dstringtype], 0 0 00003265 C706[0000][0000] mov word [dstringaddr], dz_addr 1728 1729 ; common code for all string commands 1730 dstring: 0 0000326B E8[0000] call skipwhite 0 0000326E E8[0000] call iseol? 0 00003271 7508 jne .getaddr ; if an address was given 1734 .last: 0 00003273 8B1E[0000] mov bx, word [dstringaddr] 1736 _386_PM_o32 ; mov edx, dword [bx] 0 00003277 8B17 mov dx, word [bx] 0 00003279 EB12 jmp short .haveaddr ; edx = offset, [bx + saSegSel] = segment 1739 .getaddr: 0 0000327B 8B1E[0000] mov bx, word [reg_ds] 0 0000327F E8[0000] nearcall getaddrX ; get address into bx:(e)dx 0 00003282 E8[0000] call chkeol ; expect end of line here 1743 %if _PM 1744 push bx 1745 %endif 0 00003285 53 push bx 0 00003286 8B1E[0000] mov bx, word [dstringaddr] 0 0000328A 8F4704 pop word [bx + saSegSel]; save segment (offset behind string is saved later) 1749 %if _PM 1750 call ispm 1751 jnz .86m 1752 .pm: 1753 pop word [bx + saSelector] 1754 jmp @F 1755 .86m: 1756 pop word [bx + saSegment] 1757 @@: 1758 %endif 1759 .haveaddr: 0 0000328D C706[0000][0804] mov word [lastcmd], dstring.last 0 00003293 E8[0000] call prephack 1762 _386_PM_o32 ; mov esi, edx 0 00003296 89D6 mov si, dx 0 00003298 800E[0200]01 setopt [internalflags], usecharcounter 0 0000329D C606[0000]01 mov byte [ charcounter ], 1 1766 ; initialize 0 000032A2 E8[0000] call dohack 0 000032A5 BF[0000] mov di, line_out ; es:di -> line_out 0 000032A8 8E5F04 mov ds, word [bx + saSegSel] 1770 ; ds:(e)si-> string 0 000032AB 36803E[0000]FE cmp byte [ss:dstringtype], 0FEh 0 000032B1 723B jb .terminated ; terminated string --> 0 000032B3 9F lahf 1774 _386_PM_a32 0 000032B4 AC lodsb ; load first byte 0 000032B5 31C9 xor cx, cx 0 000032B7 88C1 mov cl, al ; low byte of count 0 000032B9 9E sahf 0 000032BA 7503 jne .counted ; only byte count --> 1780 _386_PM_a32 0 000032BC AC lodsb ; load second byte 0 000032BD 88C5 mov ch, al ; high byte of count 1783 .counted: 0 000032BF E33A jcxz .done ; length zero --> 1785 .loop: 1786 _386_PM_a32 0 000032C1 AC lodsb ; get character 0 000032C2 E80400 call .char ; display 0 000032C5 E2FA loop .loop ; until done --> 0 000032C7 EB32 jmp short .done 1791 1792 ; INP: al = text to display 1793 ; di -> after last buffered text in line_out 1794 ; OUT: di -> after text stored in buffer 1795 ; (in range line_out + 1 .. line_out_end) 1796 ; buffer content so far dumped if buffer was full 1797 ; STT: es = ss 1798 ; ds unknown 1799 ; in hacked state (dohack called) 1800 ; CHG: dx 1801 .char: 0 000032C9 81FF[0000] cmp di, line_out_end ; end of buffer ? 0 000032CD 720B jb @F ; not yet, only store to buffer --> 1804 0 000032CF 1E push ds 0 000032D0 E80900 call .dump 1807 ; go back to special state 0 000032D3 E8[0000] call dohack 0 000032D6 1F pop ds 0 000032D7 BF[0000] mov di, line_out ; reset buffer to start 1811 1812 @@: 0 000032DA AA stosb ; store the text byte to buffer 0 000032DB C3 retn 1815 1816 ; INP: di -> after last stored text in line_out 1817 ; OUT: ds set to ss 1818 ; unhack called 1819 ; putsline called 1820 ; CHG: ds, dx 1821 ; STT: es = ss 1822 .dump: 0 000032DC 50 push ax 0 000032DD 51 push cx 0 000032DE 53 push bx 0 000032DF 16 push ss 0 000032E0 1F pop ds 0 000032E1 E8[0000] call unhack ; restore state 0 000032E4 E8[0000] call putsline ; write buffered content 0 000032E7 E8[0000] call handle_serial_flags_ctrl_c 1831 ; handle Control-C 0 000032EA 5B pop bx 0 000032EB 59 pop cx 0 000032EC 58 pop ax 0 000032ED C3 retn 1836 1837 .terminated: 1838 _386_PM_a32 0 000032EE AC lodsb ; load character 0 000032EF 363A06[0000] cmp al, byte [ss:dstringtype] 0 000032F4 7405 je .done ; it's the terminator --> 0 000032F6 E8D0FF call .char ; display 0 000032F9 EBF3 jmp short .terminated ; and get next --> 1844 1845 .done: 1846 ; Finally dump the last chunk (may be empty). 0 000032FB E8DEFF call .dump ; this resets ds and calls unhack 1848 _386_PM_o32 ; mov dword [bx], esi 0 000032FE 8937 mov word [bx], si 0 00003300 B00D mov al, 13 0 00003302 E8[0000] call putc 0 00003305 B00A mov al, 10 0 00003307 E8[0000] call putc 0 0000330A C3 retn 1855 %endif 1856 1857 %define extcall nearcall 1858 %define extcallcall nearcall 1859 %imacro internalcoderelocation 0-*.nolist 1860 %endmacro 1861 %imacro internaldatarelocation 0-*.nolist 1862 %endmacro 1863 %imacro linkdatarelocation 0-*.nolist 1864 %endmacro 1865 %define relocated(address) address 1866 %assign ELD 0 1867 1868 %if _INT 1869 %include "dishared.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug DI commands - Dump data 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2025 E. C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> ; DI command 19 <1> gateout: 0 0000330B 31C9 xor cx, cx 0 0000330D AC lodsb 22 <1> %if !_LOADER 0 0000330E E8[0000] extcallcall capitalise 0 00003311 3C52 cmp al, 'R' 0 00003313 7502 jne @F 0 00003315 41 inc cx ; always 86 Mode 0 00003316 AC lodsb 28 <1> @@: 0 00003317 E8[0000] extcallcall capitalise 0 0000331A 3C4D cmp al, 'M' 0 0000331C 7503 jne @F 0 0000331E FEC5 inc ch ; show MCB names 0 00003320 AC lodsb 34 <1> @@: 0 00003321 E8[0000] extcallcall capitalise 0 00003324 3C4C cmp al, 'L' 0 00003326 7504 jne @F 0 00003328 80CD02 or ch, 2 ; follow AMIS interrupt lists 0 0000332B AC lodsb 40 <1> @@: 41 <1> %endif 0 0000332C E8[0000] extcallcall skipcomm0 43 <1> 0 0000332F 4E dec si 0 00003330 BA[0000] mov dx, relocated(msg.in) 46 <1> linkdatarelocation msg.in 0 00003333 E8[0000] extcallcall isstring? 0 00003336 7560 jne .not_in 49 <1> 0 00003338 E8[0000] extcallcall skipcomma 0 0000333B 4E dec si 0 0000333C 56 push si 0 0000333D 51 push cx 54 <1> .in.loop: 0 0000333E E8[0000] extcallcall skipwhite 0 00003341 4E dec si 57 <1> 0 00003342 E8[0000] extcallcall get_value_range; OUT: cx:di = from, bx:dx = to 0 00003345 730D jnc @F 0 00003347 7508 jnz .error 0 00003349 81FFFF00 cmp di, 255 0 0000334D 7702 ja .error 0 0000334F E317 jcxz .in.next 64 <1> .error: 0 00003351 E9[0000] jmp error 66 <1> 67 <1> @@: 0 00003354 81FFFF00 cmp di, 255 0 00003358 77F7 ja .error 0 0000335A E302 jcxz @F 0 0000335C EBF3 jmp .error 72 <1> 73 <1> @@: 0 0000335E 85DB test bx, bx 0 00003360 75EF jnz .error 0 00003362 81FAFF00 cmp dx, 255 0 00003366 77E9 ja .error 78 <1> 79 <1> .in.next: 80 <1> @@: 0 00003368 E8[0000] extcallcall skipwh0 0 0000336B 3C2C cmp al, ',' 0 0000336D 74CF je .in.loop 0 0000336F E8[0000] extcallcall chkeol 0 00003372 59 pop cx 0 00003373 E89500 call .prepare 0 00003376 5E pop si 88 <1> 89 <1> .indo.loop: 0 00003377 E8[0000] extcallcall skipwhite 0 0000337A 4E dec si 92 <1> 0 0000337B 51 push cx 0 0000337C E8[0000] extcallcall get_value_range; OUT: cx:di = from, bx:dx = to 0 0000337F 59 pop cx 0 00003380 720D jc .indo.next 97 <1> 0 00003382 89FB mov bx, di 0 00003384 A8 db __TEST_IMM8 ; (skip inc) 100 <1> @@: 0 00003385 43 inc bx 0 00003386 52 push dx 0 00003387 E89600 call .do 0 0000338A 5A pop dx 0 0000338B 39D3 cmp bx, dx 0 0000338D 72F6 jb @B 107 <1> 108 <1> .indo.next: 0 0000338F 4E dec si 0 00003390 E8[0000] extcallcall skipwhite 0 00003393 3C2C cmp al, ',' 0 00003395 74E0 je .indo.loop 0 00003397 C3 retn 114 <1> 115 <1> 116 <1> 117 <1> .not_in: 0 00003398 AC lodsb 0 00003399 E8[0000] extcallcall getbyte; get byte into DL 0 0000339C 30F6 xor dh, dh 0 0000339E 89D3 mov bx, dx 0 000033A0 E8[0000] extcallcall skipcomm0 0 000033A3 BA0100 mov dx, 1 0 000033A6 E8[0000] extcallcall iseol? 0 000033A9 7453 je .onlyone 0 000033AB E8[0000] extcallcall capitalise 0 000033AE 3C4C cmp al, 'L' 0 000033B0 753F jne .notlength 0 000033B2 E8[0000] extcallcall skipcomma 0 000033B5 E8[0000] extcallcall getword; get byte into DL 0 000033B8 85D2 test dx, dx 0 000033BA 741A jz .err 0 000033BC 81FA0001 cmp dx, 100h 0 000033C0 740A je .checkrange 0 000033C2 50 push ax 0 000033C3 80E41F and ah, 1Fh 0 000033C6 80FC08 cmp ah, 8 0 000033C9 58 pop ax 0 000033CA 770A ja .err 140 <1> .checkrange: 0 000033CC 52 push dx 0 000033CD 01DA add dx, bx 0 000033CF 81FA0001 cmp dx, 100h 0 000033D3 5A pop dx 0 000033D4 7625 jna .rangeok 146 <1> .err: 0 000033D6 E9[0000] jmp error 148 <1> 149 <1> .last: 0 000033D9 31DB xor bx, bx 0 000033DB 8A1E[0000] mov bl, byte [lastint] 152 <1> internaldatarelocation 0 000033DF 8B0E[0000] mov cx, word [lastint_is_86m_and_mcb] 154 <1> internaldatarelocation 0 000033E3 BA0100 mov dx, 1 0 000033E6 FEC3 inc bl 0 000033E8 7514 jnz .onlyone 0 000033EA C706[0000][0000] mov word [relocated(lastcmd)], relocated(dmycmd) 159 <1> linkdatarelocation lastcmd, -4 160 <1> linkdatarelocation dmycmd 0 000033F0 C3 retn 162 <1> 163 <1> .notlength: 0 000033F1 E8[0000] extcallcall getbyte 0 000033F4 30F6 xor dh, dh 0 000033F6 28DA sub dl, bl 0 000033F8 72DC jc .err 0 000033FA 42 inc dx 169 <1> .rangeok: 0 000033FB E8[0000] extcallcall chkeol 171 <1> .onlyone: 0 000033FE E80A00 call .prepare 0 00003401 89D6 mov si, dx ; save count 174 <1> .next: 0 00003403 E81A00 call .do 0 00003406 43 inc bx 0 00003407 4E dec si 0 00003408 75F9 jnz .next 0 0000340A C3 retn 180 <1> 181 <1> 182 <1> .prepare: 0 0000340B F6C502 test ch, 2 0 0000340E 7403 jz @F 0 00003410 E8[0000] extcallcall guard_auxbuff 186 <1> @@: 187 <1> %if ELD 188 <1> mov word [relocateddata], .last 189 <1> linkdatarelocation lastcmd_transfer_ext_address, -4 190 <1> internalcoderelocation 191 <1> mov word [relocateddata], relocateddata 192 <1> linkdatarelocation lastcmd, -4 193 <1> linkdatarelocation lastcmd_transfer_ext_entry 194 <1> %else 0 00003413 C706[0000][6E05] mov word [lastcmd], .last 196 <1> %endif 0 00003419 890E[0000] mov word [lastint_is_86m_and_mcb], cx 198 <1> internaldatarelocation 199 <1> %if ELD 200 <1> extcallcall prephack 201 <1> retn 202 <1> %else 0 0000341D E9[0000] jmp prephack 204 <1> %endif 205 <1> 206 <1> 207 <1> ; INP: bx = interrupt number 208 <1> ; cx = options 209 <1> ; CHG: di, eax. edx, bp 210 <1> ; STT: ds = es = ss 211 <1> ; prephack called 212 <1> .do: 0 00003420 881E[0000] mov byte [lastint], bl 214 <1> internaldatarelocation 0 00003424 E8[0000] extcallcall handle_serial_flags_ctrl_c 0 00003427 E8[0000] extcallcall dohack 0 0000342A BF[0000] mov di, relocated(line_out) 218 <1> linkdatarelocation line_out 0 0000342D B8696E mov ax, "in" 0 00003430 AB stosw 0 00003431 B87420 mov ax, "t " 0 00003434 AB stosw 0 00003435 88D8 mov al, bl 0 00003437 E8[0000] extcallcall hexbyte 0 0000343A B020 mov al, 32 0 0000343C AA stosb 227 <1> %if _PM 228 <1> test cl, cl 229 <1> jnz .rm 230 <1> extcallcall ispm 231 <1> jnz .rm 232 <1> 233 <1> mov ax, 0204h 234 <1> cmp bl, 20h 235 <1> adc bh, 1 ; if below, bh = 2 236 <1> .loopexception: 237 <1> push cx 238 <1> int 31h 239 <1> mov ax, cx 240 <1> pop cx 241 <1> jc .failed 242 <1> extcallcall hexword 243 <1> mov al, ':' 244 <1> stosb 245 <1> %if ELD && 1 246 <1> testopt [relocateddata], 8000h 247 <1> linkdatarelocation internalflags, -3 248 <1> jz @F 249 <1> o32 250 <1> @@: 251 <1> %else 252 <1> _386_PM_o32 ; mov eax, edx 253 <1> %endif 254 <1> mov ax, dx 255 <1> cmp byte [relocated(dpmi32)], 0 256 <1> linkdatarelocation dpmi32, -3 257 <1> jz .gate16 258 <1> extcallcall hexword_high 259 <1> .gate16: 260 <1> extcallcall hexword 261 <1> mov al, 32 262 <1> stosb 263 <1> mov ax, 0202h 264 <1> dec bh 265 <1> jnz .loopexception 266 <1> dec di 267 <1> extcallcall unhack 268 <1> push bx 269 <1> push cx 270 <1> extcallcall putsline_crlf 271 <1> pop cx 272 <1> pop bx 273 <1> retn 274 <1> 275 <1> .rm: 276 <1> %endif 0 0000343D 53 push bx 0 0000343E 51 push cx 0 0000343F 56 push si 280 <1> 0 00003440 53 push bx 0 00003441 31ED xor bp, bp 0 00003443 D1E3 shl bx, 1 0 00003445 D1E3 shl bx, 1 0 00003447 31D2 xor dx, dx 286 <1> %if _PM 287 <1> extcallcall setes2dx 288 <1> %else 0 00003449 8EC2 mov es, dx ; es => IVT 290 <1> %endif 0 0000344B 268B4702 mov ax, word [es:bx + 2] ; ax = segment 0 0000344F 268B17 mov dx, word [es:bx] 0 00003452 5B pop bx 294 <1> 295 <1> %if !_LOADER 0 00003453 F6C502 test ch, 2 0 00003456 7571 jnz int_list 298 <1> %endif 299 <1> 300 <1> .loop_chain: 0 00003458 50 push ax ; segment 0 00003459 52 push dx 303 <1> 0 0000345A 16 push ss 0 0000345B 07 pop es ; ! es = ss 0 0000345C E8[0000] extcallcall hexword 0 0000345F B03A mov al, ':' 0 00003461 AA stosb 0 00003462 89D0 mov ax, dx 0 00003464 E8[0000] extcallcall hexword 311 <1> 0 00003467 5B pop bx 0 00003468 5A pop dx ; segment 314 <1> 0 00003469 8916[0200] mov word [intaddress + 2], dx 316 <1> internaldatarelocation 0 0000346D 891E[0000] mov word [intaddress], bx 318 <1> internaldatarelocation 319 <1> 0 00003471 45 inc bp 0 00003472 81FD0001 cmp bp, 256 0 00003476 774C ja .toomany ; --> (! es = ss) 323 <1> 0 00003478 E81503 call check_int_chain 0 0000347B 722C jc .end_chain 326 <1> 0 0000347D 52 push dx ; segment 0 0000347E 50 push ax 0 0000347F 16 push ss 0 00003480 07 pop es 0 00003481 E8[0000] extcallcall unhack 0 00003484 51 push cx 0 00003485 E8[0000] extcallcall copy_single_counted_string 0 00003488 59 pop cx 0 00003489 E8B203 call .mcbname 0 0000348C 51 push cx 0 0000348D E8[0000] extcallcall putsline_crlf 0 00003490 59 pop cx 0 00003491 E8[0000] extcallcall handle_serial_flags_ctrl_c 0 00003494 E8[0000] extcallcall dohack 0 00003497 BF[0000] mov di, relocated(line_out) 342 <1> linkdatarelocation line_out 0 0000349A B8202D mov ax, " -" 0 0000349D AB stosw 0 0000349E B82D3E mov ax, "->" 0 000034A1 AB stosw 0 000034A2 B020 mov al, 32 0 000034A4 AA stosb 349 <1> 0 000034A5 5A pop dx 0 000034A6 58 pop ax ; (ax = segment) 0 000034A7 EBAF jmp .loop_chain 353 <1> 354 <1> .end_chain: 0 000034A9 16 push ss 0 000034AA 07 pop es 0 000034AB 750A jnz @F 358 <1> .end_chain_string: 0 000034AD E8[0000] extcallcall unhack 0 000034B0 51 push cx 0 000034B1 E8[0000] extcallcall copy_single_counted_string 0 000034B4 59 pop cx 0 000034B5 EB03 jmp @FF 364 <1> @@: 0 000034B7 E8[0000] extcallcall unhack 366 <1> @@: 0 000034BA E88103 call .mcbname 0 000034BD E8[0000] extcallcall putsline_crlf 369 <1> .86next: 0 000034C0 5E pop si 0 000034C1 59 pop cx 0 000034C2 5B pop bx 0 000034C3 C3 retn 374 <1> 375 <1> .toomany: 0 000034C4 BE[0000] mov si, msg.di_toomany 377 <1> internaldatarelocation 0 000034C7 EBE4 jmp .end_chain_string 379 <1> 380 <1> %if _PM 381 <1> .failed: 382 <1> extcallcall unhack 383 <1> pop dx ; discard a near return address 384 <1> mov dx, gatewrong 385 <1> internaldatarelocation 386 <1> mov ax, 0134h 387 <1> extcallcall setrc 388 <1> %if ELD 389 <1> extcallcall putsz 390 <1> retn 391 <1> %else 392 <1> jmp putsz 393 <1> %endif 394 <1> %endif 395 <1> 396 <1> 397 <1> %if 0 398 <1> 399 <1> For the DIL command we fill the auxiliary buffer with entries 400 <1> for each interrupt entrypoint. They are found by starting from 401 <1> the IVT as well as the AMIS interrupt lists. Of course, any 402 <1> entrypoint may be found from more than one point. 403 <1> 404 <1> The format is as follows: 405 <1> 406 <1> dword - vector 407 <1> word - flags and AMIS multiplex number (low byte) 408 <1> flag 200h = unclaimed, AMIS multiplex number not initialised 409 <1> flag 100h = immediately from IVT (and is the very first entry in auxbuff) 410 <1> if this word is -1 then it is not an entry, it is a terminator 411 <1> word - which entry in an AMIS interrupt list 412 <1> 413 <1> A terminator is an entry with all ones (-1). 414 <1> Two consecutive terminators indicate the last chain ended. 415 <1> After a single terminator another chain follows. 416 <1> Any chain after the very first is a hidden chain, 417 <1> that is, its handlers are not reachable from the IVT 418 <1> by walking the downlinks. 419 <1> 420 <1> A hidden chain may be found which eventually feeds into 421 <1> another hidden chain found previously. In this case, the 422 <1> new unique handlers (at least 1) are prepended to the 423 <1> pre-existing hidden chain, and the downlinks past this 424 <1> point are not walked further (as they're already known). 425 <1> 426 <1> If an AMIS interface points to a handler that we already 427 <1> know (in the first IVT-based chain or any hidden chain) 428 <1> then its downlink will not be walked again. However, the 429 <1> multiplex number and list index will be entered into the 430 <1> entry for this interrupt handler. 431 <1> 432 <1> Finally, after the IVT and all interrupt lists of all AMIS 433 <1> multiplexers have been processed, the auxbuff list is used 434 <1> to display the found chains (one IVT, any amount hidden). 435 <1> 436 <1> %endif 437 <1> 438 <1> %if !_LOADER 439 <1> int_list: 0 000034C9 57 push di 0 000034CA 51 push cx 0 000034CB 53 push bx 0 000034CC 92 xchg ax, dx ; dx = segment 444 <1> 0 000034CD 368E06[0000] mov es, word [ss:relocated(auxbuff_segorsel)] 446 <1> linkdatarelocation auxbuff_segorsel 0 000034D2 31FF xor di, di ; -> auxbuff 0 000034D4 AB stosw ; store offset 0 000034D5 92 xchg ax, dx ; dx = offset 0 000034D6 AB stosw ; store segment 0 000034D7 92 xchg ax, dx ; dx = segment 0 000034D8 93 xchg bx, ax ; bx = offset 0 000034D9 B80003 mov ax, 300h ; flag for IVT | unused 0 000034DC AB stosw ; which multiplex number 0 000034DD 31C0 xor ax, ax 0 000034DF AB stosw ; which int list entry = none = 0 457 <1> 458 <1> .loop_ivt_chain: 0 000034E0 E8AD02 call check_int_chain 0 000034E3 721A jc .end_ivt_chain 461 <1> 462 <1> %if ! ELD && _AUXBUFFSIZE == _AUXBUFFMAXSIZE 463 <1> cmp di, _AUXBUFFSIZE - 8 * 3 ; enough for 1 entry + 2 terminators ? 464 <1> %else 0 000034E5 363B3E[0000] cmp di, word [ss:relocated(auxbuff_current_size_minus_24)] 466 <1> linkdatarelocation auxbuff_current_size_minus_24 467 <1> %endif 0 000034EA 7739 ja .error 0 000034EC 368E06[0000] mov es, word [ss:relocated(auxbuff_segorsel)] 470 <1> linkdatarelocation auxbuff_segorsel 0 000034F1 AB stosw ; store offset 0 000034F2 92 xchg ax, dx 0 000034F3 AB stosw ; store segment 0 000034F4 92 xchg ax, dx 0 000034F5 93 xchg bx, ax 0 000034F6 B80002 mov ax, 200h ; flag for unused 0 000034F9 AB stosw ; found in chain = 200h 0 000034FA 31C0 xor ax, ax 0 000034FC AB stosw 0 000034FD EBE1 jmp .loop_ivt_chain 481 <1> 482 <1> .end_ivt_chain: 0 000034FF B8FFFF mov ax, -1 0 00003502 368E06[0000] mov es, word [ss:relocated(auxbuff_segorsel)] 485 <1> linkdatarelocation auxbuff_segorsel 0 00003507 B90800 mov cx, 8 0 0000350A F3AB rep stosw ; terminator is all-ones 488 <1> ; (two terminators actually) 489 <1> 0 0000350C B02D mov al, 2Dh 0 0000350E E8[0000] extcallcall intchk ; ZR if offset = -1 or segment = 0 492 <1> ; CHG: ax, dx, bx 0 00003511 7411 jz .done 494 <1> 0 00003513 31C0 xor ax, ax 496 <1> .loopplex: 0 00003515 B000 mov al, 00h ; AMIS installation check 498 <1> ; function 0 changes dx, di, cx, al 499 <1> %if _PM 500 <1> extcallcall call_int2D 501 <1> %else 0 00003517 CD2D int 2Dh ; enquire whether there's anyone 503 <1> ; but we don't care who it might be 504 <1> %endif 0 00003519 FEC0 inc al ; = FFh ? 0 0000351B 7503E91101 jz .search ; yes, it is in use --> 507 <1> .nextplex: 0 00003520 FEC4 inc ah 0 00003522 75F1 jnz .loopplex ; try next multiplexer --> 510 <1> 511 <1> .done: 0 00003524 A8 db __TEST_IMM8 ; (NC) 513 <1> .error: 0 00003525 F9 stc 515 <1> 0 00003526 5B pop bx 0 00003527 59 pop cx 0 00003528 5F pop di 0 00003529 16 push ss 0 0000352A 1F pop ds 0 0000352B 16 push ss 0 0000352C 07 pop es 523 <1> 0 0000352D BE[0000] mov si, msg.di_error 525 <1> internaldatarelocation 0 00003530 7303E9B900 jc .error_string 527 <1> 0 00003535 31F6 xor si, si 529 <1> 530 <1> .loop_chain: 0 00003537 8E1E[0000] mov ds, word [relocated(auxbuff_segorsel)] 532 <1> linkdatarelocation auxbuff_segorsel 0 0000353B AD lodsw 0 0000353C 92 xchg ax, dx 0 0000353D AD lodsw 0 0000353E 833CFF cmp word [si], -1 0 00003541 8D7404 lea si, [si + 4] 0 00003544 747A je .next_seq 539 <1> 540 <1> .next_chain: 0 00003546 16 push ss 0 00003547 1F pop ds 543 <1> 0 00003548 50 push ax ; segment 0 00003549 52 push dx 546 <1> 0 0000354A 16 push ss 0 0000354B 07 pop es 0 0000354C E8[0000] extcallcall hexword 0 0000354F B03A mov al, ':' 0 00003551 AA stosb 0 00003552 89D0 mov ax, dx 0 00003554 E8[0000] extcallcall hexword 554 <1> 0 00003557 5B pop bx 0 00003558 5A pop dx ; segment 557 <1> 0 00003559 8916[0200] mov word [intaddress + 2], dx 559 <1> internaldatarelocation 0 0000355D 891E[0000] mov word [intaddress], bx 561 <1> internaldatarelocation 562 <1> 0 00003561 56 push si 0 00003562 E82B02 call check_int_chain 0 00003565 722E jc .end_chain 566 <1> 0 00003567 16 push ss 0 00003568 07 pop es 0 00003569 E8[0000] extcallcall unhack 0 0000356C 51 push cx 0 0000356D E8[0000] extcallcall copy_single_counted_string 0 00003570 59 pop cx 0 00003571 5E pop si 0 00003572 E88B00 call .mpx 0 00003575 56 push si 0 00003576 E8C502 call gateout.mcbname 0 00003579 51 push cx 0 0000357A E8[0000] extcallcall putsline_crlf 0 0000357D 59 pop cx 0 0000357E E8[0000] extcallcall handle_serial_flags_ctrl_c 0 00003581 E8[0000] extcallcall dohack 0 00003584 BF[0000] mov di, relocated(line_out) 583 <1> linkdatarelocation line_out 0 00003587 B8202D mov ax, " -" 0 0000358A AB stosw 0 0000358B B82D3E mov ax, "->" 0 0000358E AB stosw 0 0000358F B020 mov al, 32 0 00003591 AA stosb 590 <1> 0 00003592 5E pop si 0 00003593 EBA2 jmp .loop_chain 593 <1> 594 <1> .end_chain: 0 00003595 16 push ss 0 00003596 07 pop es 0 00003597 750A jnz @F 0 00003599 E8[0000] extcallcall unhack 0 0000359C 51 push cx 0 0000359D E8[0000] extcallcall copy_single_counted_string 0 000035A0 59 pop cx 0 000035A1 EB03 jmp @FF 603 <1> @@: 0 000035A3 E8[0000] extcallcall unhack 605 <1> @@: 0 000035A6 5E pop si 0 000035A7 E85600 call .mpx 0 000035AA 56 push si 0 000035AB E89002 call gateout.mcbname 0 000035AE 51 push cx 0 000035AF E8[0000] extcallcall putsline_crlf 0 000035B2 59 pop cx 0 000035B3 BF[0000] mov di, relocated(line_out) 614 <1> linkdatarelocation line_out 0 000035B6 E8[0000] extcallcall handle_serial_flags_ctrl_c 0 000035B9 E8[0000] extcallcall dohack 0 000035BC 5E pop si 0 000035BD E977FF jmp .loop_chain 619 <1> 620 <1> .next_seq: 0 000035C0 AD lodsw 0 000035C1 92 xchg ax, dx 0 000035C2 AD lodsw 0 000035C3 833CFF cmp word [si], -1 0 000035C6 8D7404 lea si, [si + 4] 0 000035C9 741A je @F 627 <1> 0 000035CB 16 push ss 0 000035CC 1F pop ds 0 000035CD 16 push ss 0 000035CE 07 pop es 0 000035CF E8[0000] extcallcall unhack 0 000035D2 51 push cx 0 000035D3 56 push si 0 000035D4 BE[0000] mov si, msg.di_hidden 636 <1> internaldatarelocation 0 000035D7 E8[0000] extcallcall copy_single_counted_string 0 000035DA 5E pop si 0 000035DB 59 pop cx 0 000035DC E8[0000] extcallcall handle_serial_flags_ctrl_c 0 000035DF E8[0000] extcallcall dohack 642 <1> 0 000035E2 E961FF jmp .next_chain 644 <1> 645 <1> @@: 0 000035E5 16 push ss 0 000035E6 1F pop ds 0 000035E7 16 push ss 0 000035E8 07 pop es 0 000035E9 E8[0000] extcallcall unhack 0 000035EC EB0F jmp @F 652 <1> 653 <1> 654 <1> .error_string: 0 000035EE E8[0000] extcallcall copy_single_counted_string 656 <1> 0 000035F1 E8[0000] extcallcall unhack 0 000035F4 E8[0000] extcallcall putsline_crlf 0 000035F7 B83301 mov ax, 0133h 0 000035FA E8[0000] extcallcall setrc 661 <1> @@: 662 <1> %if 0 ; _DEBUG 663 <1> mov es, word [auxbuff_segorsel] 664 <1> int3 665 <1> push ss 666 <1> pop es 667 <1> %endif 0 000035FD E9C0FE jmp gateout.86next 669 <1> 670 <1> 671 <1> .mpx: 0 00003600 8E06[0000] mov es, word [relocated(auxbuff_segorsel)] 673 <1> linkdatarelocation auxbuff_segorsel 0 00003604 268B44FC mov ax, word [es:si - 4] 0 00003608 268B54FE mov dx, word [es:si - 2] 0 0000360C 16 push ss 0 0000360D 07 pop es 0 0000360E F6C402 test ah, 2 0 00003611 751D jnz @F 0 00003613 56 push si 0 00003614 51 push cx 0 00003615 BE[0000] mov si, msg.di_multiplex.1 683 <1> internaldatarelocation 0 00003618 E8[0000] extcallcall copy_single_counted_string 0 0000361B E8[0000] extcallcall hexbyte 0 0000361E BE[0000] mov si, msg.di_multiplex.2 687 <1> internaldatarelocation 0 00003621 E8[0000] extcallcall copy_single_counted_string 0 00003624 92 xchg ax, dx 0 00003625 E8[0000] extcallcall hexword 0 00003628 BE[0000] mov si, msg.di_multiplex.3 692 <1> internaldatarelocation 0 0000362B E8[0000] extcallcall copy_single_counted_string 0 0000362E 59 pop cx 0 0000362F 5E pop si 696 <1> @@: 0 00003630 C3 retn 698 <1> 699 <1> 700 <1> ; INP: ah = multiplex number of AMIS TSR to search through 701 <1> ; ss:sp-> interrupt number (byte), must be preserved 702 <1> ; CHG: es, di, dx, bx 703 <1> .search: 0 00003631 B004 mov al, 04h 0 00003633 5B pop bx 0 00003634 53 push bx ; low byte is the interrupt number 707 <1> ; function 4 changes dx, bx, al 708 <1> %if _PM 709 <1> extcallcall call_int2D 710 <1> %else 0 00003635 CD2D int 2Dh 712 <1> %endif 0 00003637 3C03 cmp al, 03h ; returned its interrupt entry ? 714 <1> ; RBIL doesn't explicitly state that this interrupt entry has to 715 <1> ; be IISP compatible. But I'm too lazy to look up the older AMIS, 716 <1> ; and SearchIISPChain checks the interrupt entry anyway. 0 00003639 743C je .search_dxbx 0 0000363B 3C04 cmp al, 04h ; returned list of hooked interrupts ? 0 0000363D 7403E9DEFE jne .nextplex ; no, try next multiplexer --> 0 00003642 89DF mov di, bx 0 00003644 5B pop bx 0 00003645 53 push bx ; bl = interrupt number 0 00003646 31C9 xor cx, cx ; = index into list 0 00003648 88D8 mov al, bl 725 <1> .search_intlist_seg: 726 <1> %if _PM 727 <1> extcallcall setes2dx 728 <1> %else 0 0000364A 8EC2 mov es, dx ; es:di-> list 730 <1> %endif 731 <1> .search_intlist: ; Search the returned list for the required interrupt number. 0 0000364C AE scasb ; our interrupt number ? 0 0000364D 740E je .search_found_intlist 0 0000364F 26807DFF2D cmp byte [es:di-1], 2Dh ; was last in list ? 0 00003654 7503E9C7FE je .nextplex 0 00003659 AF scasw ; skip pointer 0 0000365A 41 inc cx 0 0000365B EBEF jmp short .search_intlist ; try next entry --> 739 <1> 740 <1> .search_found_intlist: 0 0000365D 268B1D mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 0 00003660 AF scasw ; skip pointer 0 00003661 52 push dx ; preserve dx for .search_intlist_seg 0 00003662 57 push di 0 00003663 E82100 call .add 0 00003666 5F pop di 0 00003667 5A pop dx 0 00003668 7303E9B8FE jc .error 749 <1> ; je .search_found ; found entry --> 750 <1> ; This specific jump supports TSRs that hook the same 751 <1> ; interrupt more than once; jumping to .nextplex instead 752 <1> ; (as previously) aborts the search after the first match 753 <1> ; in the interrupt list. This support might become useful. 0 0000366D 3C2D cmp al, 2Dh ; was last in list ? 0 0000366F 7503E9ACFE je .nextplex 0 00003674 41 inc cx 0 00003675 EBD3 jmp short .search_intlist_seg 758 <1> 759 <1> .search_dxbx: 760 <1> %if _PM 761 <1> extcallcall setes2dx 762 <1> %else 0 00003677 8EC2 mov es, dx ; es:bx-> (IISP) interrupt entry 764 <1> %endif 765 <1> ; The entry we found now is possibly behind the non-IISP entry that 766 <1> ; terminated our first SearchIISPChain call (at .hard). We then 767 <1> ; possibly might find our entry in this hidden part of the chain. 0 00003679 B9FFFF mov cx, -1 ; indicator for return = 3 (no list) 0 0000367C E80800 call .add 0 0000367F 7303E9A1FE jc .error 771 <1> ; jne .nextplex ; didn't find our entry in the chain --> 0 00003684 E999FE jmp .nextplex 773 <1> 774 <1> 775 <1> int_list.add: 0 00003687 31FF xor di, di ; start at beginning of buffer 0 00003689 368E1E[0000] mov ds, word [ss:relocated(auxbuff_segorsel)] 778 <1> linkdatarelocation auxbuff_segorsel 779 <1> ; ds => auxbuff 0 0000368E BEFFFF mov si, -1 ; check all 0 00003691 E8D900 call .check ; check for match 0 00003694 7516 jne @F ; not matched, di -> second terminator 0 00003696 F6450502 testopt [di + 4], 200h ; not yet claimed by a multiplexer ? 0 0000369A 7503E9CC00 jz .error ; no, error --> 0 0000369F 886504 mov byte [di + 4], ah ; store the multiplex number 0 000036A2 806505FD clropt [di + 4], 200h ; indicate it is claimed 0 000036A6 894D06 mov word [di + 6], cx ; = how many list entries before ours, 788 <1> ; or = -1 if not from a list 0 000036A9 E9BE00 jmp .done 790 <1> 791 <1> @@: 792 <1> ; ds:di -> second terminator (will be overwritten) 793 <1> %if ! ELD && _AUXBUFFSIZE == _AUXBUFFMAXSIZE 794 <1> cmp di, _AUXBUFFSIZE - 8 * 3 ; enough for 1 entry + 2 terminators ? 795 <1> %else 0 000036AC 363B3E[0000] cmp di, word [ss:relocated(auxbuff_current_size_minus_24)] 797 <1> linkdatarelocation auxbuff_current_size_minus_24 798 <1> %endif 0 000036B1 7603E9B500 ja .error 0 000036B6 8D75F8 lea si, [di - 8] ; check up to this point later 801 <1> ; si -> first of two terminators 802 <1> 0 000036B9 93 xchg ax, bx 0 000036BA 368E06[0000] mov es, word [ss:relocated(auxbuff_segorsel)] 805 <1> linkdatarelocation auxbuff_segorsel 806 <1> ; => auxbuff 0 000036BF AB stosw ; store offset 0 000036C0 92 xchg ax, dx ; dx = offset 0 000036C1 AB stosw ; store segment 0 000036C2 92 xchg ax, dx ; dx = segment 0 000036C3 93 xchg ax, bx ; dx:bx = vector -> handler 0 000036C4 50 push ax 0 000036C5 B000 mov al, 0 ; flags = 0 (claimed, not IVT) 0 000036C7 86C4 xchg al, ah 0 000036C9 AB stosw ; which multiplex number 0 000036CA 89C8 mov ax, cx 0 000036CC AB stosw ; which int list entry 0 000036CD 58 pop ax ; preserve multiplex number 819 <1> 820 <1> .loop_chain: 0 000036CE 50 push ax 0 000036CF 56 push si 0 000036D0 E8BD00 call check_int_chain ; does it go on ? 0 000036D3 5E pop si 0 000036D4 5B pop bx 0 000036D5 7303 jnc @F ; for _LINK compat 0 000036D7 E97F00 jmp strict near .end_chain ; no --> 828 <1> @@: 829 <1> 830 <1> %if ! ELD && _AUXBUFFSIZE == _AUXBUFFMAXSIZE 831 <1> cmp di, _AUXBUFFSIZE - 8 * 3 ; enough for 1 entry + 2 terminators ? 832 <1> %else 0 000036DA 363B3E[0000] cmp di, word [ss:relocated(auxbuff_current_size_minus_24)] 834 <1> linkdatarelocation auxbuff_current_size_minus_24 835 <1> %endif 0 000036DF 7603E98700 ja .error 0 000036E4 368E06[0000] mov es, word [ss:relocated(auxbuff_segorsel)] 838 <1> linkdatarelocation auxbuff_segorsel 0 000036E9 AB stosw ; store offset 0 000036EA 92 xchg ax, dx 0 000036EB AB stosw ; store segment 0 000036EC 92 xchg ax, dx 0 000036ED 93 xchg bx, ax ; ah = multiplex number, bx = offset 0 000036EE 50 push ax 0 000036EF B80002 mov ax, 200h 0 000036F2 AB stosw ; found in chain = 200h (unclaimed) 0 000036F3 31C0 xor ax, ax 0 000036F5 AB stosw 0 000036F6 58 pop ax 0 000036F7 57 push di 0 000036F8 31FF xor di, di ; start at beginning 0 000036FA E87000 call .check ; already listed in another chain ? 0 000036FD 7403 je @F 0 000036FF 5F pop di 0 00003700 EBCC jmp .loop_chain ; no, try to walk downlink --> 856 <1> 857 <1> @@: 0 00003702 5B pop bx 859 <1> 860 <1> ; The idea is that if the AMIS interrupt list 861 <1> ; pointed to an entry not yet matched then 862 <1> ; it is the start of a hidden chain. If a 863 <1> ; subsequent handler in this hidden chain 864 <1> ; points to another handler that does match 865 <1> ; this can only be a valid case if this other 866 <1> ; handler also was the start of a hidden chain. 867 <1> ; If this is the case, prepend the unique new 868 <1> ; handlers to that hidden chain in the buffer. 0 00003703 F6450501 testopt [di + 4], 100h ; is it from the IVT ? (very first entry) 0 00003707 7562 jnz .error ; yes, error --> 0 00003709 837DFCFF cmp word [di - 8 + 4], -1 ; is it the start of a hidden chain ? 0 0000370D 755C jne .error ; no, error --> 873 <1> ; di -> match (insert to move here) 874 <1> ; bx -> after repeat 875 <1> ; bx - 8 -> repeat 876 <1> ; bx - 16 -> last entry to move (at least 1 to move) 877 <1> ; si -> single terminator 878 <1> ; si + 8 -> first entry to move (at least 1 to move) 879 <1> 0 0000370F 83EB10 sub bx, 16 ; -> last entry to move 881 <1> 882 <1> .insert: 883 <1> ; di -> match (insert to move here) 884 <1> ; bx + 8 -> repeat 885 <1> ; bx -> last entry to move 886 <1> ; si -> single terminator 887 <1> ; si + 8 -> first entry to move 888 <1> 0 00003712 FF7706 push word [bx + 6] 0 00003715 FF7704 push word [bx + 4] 0 00003718 FF7702 push word [bx + 2] 0 0000371B FF37 push word [bx] ; get the last entry 0 0000371D 57 push di 0 0000371E 56 push si 0 0000371F 51 push cx ; preserve interrupt list index 0 00003720 368E06[0000] mov es, word [ss:relocated(auxbuff_segorsel)] 897 <1> linkdatarelocation auxbuff_segorsel 0 00003725 89F9 mov cx, di ; = where to insert 899 <1> ; -> first to displace 0 00003727 F7D9 neg cx 0 00003729 89DE mov si, bx ; -> after end of source 0 0000372B 8D7F08 lea di, [bx + 8] ; -> after end of dest 0 0000372E 01F1 add cx, si ; after end of source - first to displace 904 <1> ; = how many bytes to displace 0 00003730 D1E9 shr cx, 1 0 00003732 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 0 00003733 A7 cmpsw ; si -= 2, di -= 2 908 <1> 909 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 910 <1> ; Refer to comment in init.asm init_movp. 911 <1> 912 <1> %if _AMD_ERRATUM_109_WORKAROUND 0 00003734 E308 jcxz @FF 0 00003736 83F914 cmp cx, 20 0 00003739 7703 ja @FF 916 <1> @@: 0 0000373B A5 movsw 0 0000373C E2FD loop @B 919 <1> @@: 920 <1> %endif 0 0000373E F3A5 rep movsw ; relocate up the following entries 922 <1> ; by 8 bytes (size of 1 entry) 0 00003740 FC cld 0 00003741 59 pop cx 0 00003742 5E pop si 0 00003743 5F pop di 0 00003744 8F05 pop word [di] 0 00003746 8F4502 pop word [di + 2] 0 00003749 8F4504 pop word [di + 4] 0 0000374C 8F4506 pop word [di + 6] ; insert moved entry 0 0000374F 83C608 add si, 8 ; -> at moved single terminator 932 <1> 933 <1> ; di -> match (inserted here, insert next here) 934 <1> ; bx + 8 -> repeat 935 <1> ; bx -> last entry to move (if any) 936 <1> ; si -> single terminator 937 <1> ; si + 8 -> first entry to move 0 00003752 39DE cmp si, bx ; if last to move != terminator 0 00003754 75BC jne .insert ; then move another -> 0 00003756 89F7 mov di, si ; -> where to put double terminator 941 <1> 0 00003758 93 xchg ax, bx 943 <1> .end_chain: 0 00003759 53 push bx 0 0000375A 51 push cx ; preserve interrupt list index 0 0000375B B8FFFF mov ax, -1 0 0000375E 368E06[0000] mov es, word [ss:relocated(auxbuff_segorsel)] 948 <1> linkdatarelocation auxbuff_segorsel 0 00003763 B90800 mov cx, 8 0 00003766 F3AB rep stosw ; terminator is all-ones 951 <1> ; (two terminators actually) 0 00003768 59 pop cx 0 00003769 58 pop ax ; preserve multiplex number 954 <1> 955 <1> .done: 0 0000376A A8 db __TEST_IMM8 ; (NC) 957 <1> .error: 0 0000376B F9 stc 959 <1> 0 0000376C C3 retn 961 <1> 962 <1> 963 <1> ; INP: dx:bx = 86 Mode far pointer to handler 964 <1> ; di -> to check 965 <1> ; si = end of area to check (-1 = check all) 966 <1> ; OUT: ZR if match found, ds:di -> matching entry 967 <1> ; NZ if no match found, 968 <1> ; di -> at second consecutive terminator 969 <1> ; or di >= si 970 <1> ; CHG: - 971 <1> ; STT: ds => auxbuff 972 <1> ; REM: continues loop if di < si and the flags word 973 <1> ; is not -1 in two consecutive entries. 974 <1> ; an entry with a flags word -1 is skipped. 975 <1> .check: 0 0000376D 391D cmp word [di + 0], bx 0 0000376F 7506 jne .mismatch 0 00003771 395502 cmp word [di + 2], dx 0 00003774 7501 jne .mismatch 980 <1> .match: 0 00003776 C3 retn ; (ZR) 982 <1> 983 <1> .mismatch: 0 00003777 83C708 add di, 8 985 <1> 0 0000377A 39F7 cmp di, si 0 0000377C 730F jae .checkret 988 <1> 0 0000377E 837D04FF cmp word [di + 4], -1 0 00003782 75E9 jne .check 991 <1> 0 00003784 83C708 add di, 8 0 00003787 837D04FF cmp word [di + 4], -1 0 0000378B 75E0 jne .check 995 <1> .checkret: 0 0000378D 85FF test di, di ; (NZ) 0 0000378F C3 retn 998 <1> %endif ; !_LOADER 999 <1> 1000 <1> 1001 <1> ; INP: dx:bx = 86 Mode far pointer to int handler 1002 <1> ; OUT: NC if chain found, 1003 <1> ; dx:ax = 86 Mode far pointer to next 1004 <1> ; ss:si -> type message (counted) 1005 <1> ; CY if chain not found, 1006 <1> ; NZ if no chain 1007 <1> ; ZR if chain but next is FFFFh:FFFFh, 1008 <1> ; ss:si -> type message 1009 <1> ; STT: es != ss, ds != ss 1010 <1> check_int_chain: 1011 <1> %if _PM 1012 <1> extcallcall setes2dx 1013 <1> %else 0 00003790 8EC2 mov es, dx ; es:bx -> entrypoint 1015 <1> %endif 0 00003792 E8[0000] extcallcall IsIISPEntry? 0 00003795 7531 jnz .not_iisp 1018 <1> 0 00003797 26FF7704 push word [es:bx + ieNext + 2] 0 0000379B 26FF7702 push word [es:bx + ieNext] 1021 <1> 0 0000379F BE[0000] mov si, msg.di_uninst_iisp 1023 <1> internaldatarelocation 0 000037A2 26813F90EA cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 0 000037A7 7414 je @F 0 000037A9 BE[0000] mov si, msg.di_iisp 1027 <1> internaldatarelocation 0 000037AC 26807F09EB cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ? 0 000037B1 7507 jne .nonstd 0 000037B3 26813FEB10 cmp word [ es:bx + ieEntry ], 010EBh ; jmp short $+18 ? 0 000037B8 7403 je @F 1032 <1> .nonstd: 0 000037BA BE[0000] mov si, msg.di_nonstd_iisp 1034 <1> internaldatarelocation 1035 <1> @@: 0 000037BD 58 pop ax 0 000037BE 5A pop dx ; segment 1038 <1> 0 000037BF 50 push ax 0 000037C0 21D0 and ax, dx 0 000037C2 40 inc ax 0 000037C3 58 pop ax 0 000037C4 7476 jz .CY 1044 <1> 0 000037C6 F8 clc 0 000037C7 C3 retn 1047 <1> 1048 <1> 1049 <1> .not_iisp: 0 000037C8 83FBF8 cmp bx, -8 0 000037CB 771A ja .not_fd 0 000037CD 26803FE8 cmp byte [es:bx], 0E8h 0 000037D1 7514 jne .not_fd 0 000037D3 26807F03EA cmp byte [es:bx + 3], 0EAh 0 000037D8 750D jne .not_fd 0 000037DA 26FF7706 push word [es:bx + 4 + 2] 0 000037DE 26FF7704 push word [es:bx + 4] 0 000037E2 BE[0000] mov si, msg.di_freedos_reloc 1059 <1> internaldatarelocation 0 000037E5 EBD6 jmp @B 1061 <1> 1062 <1> .not_fd: 0 000037E7 83FBFB cmp bx, -5 0 000037EA 7713 ja .not_jmpfar 0 000037EC BE[0000] mov si, msg.di_jmpfar 1066 <1> internaldatarelocation 0 000037EF 26803FEA cmp byte [es:bx], 0EAh 0 000037F3 750A jne .not_jmpfar 0 000037F5 26FF7703 push word [es:bx + 1 + 2] 0 000037F9 26FF7701 push word [es:bx + 1] 0 000037FD EBBE jmp @B 1072 <1> 1073 <1> .not_jmpfar: 0 000037FF BE[0000] mov si, msg.di_jmpfarindirect 1075 <1> internaldatarelocation 0 00003802 26803FEB cmp byte [es:bx], 0EBh 0 00003806 750D jne .not_testhook_try_jmpfarindirect 0 00003808 BE[0000] mov si, msg.di_testhook 1079 <1> internaldatarelocation 0 0000380B 268A4701 mov al, byte [es:bx + 1] 0 0000380F 98 cbw 0 00003810 83C002 add ax, 2 0 00003813 01C3 add bx, ax 1084 <1> .not_testhook_try_jmpfarindirect: 0 00003815 83FBFA cmp bx, -6 0 00003818 7720 ja .not_testhook_or_jmpfarindirect 0 0000381A 26813F2EFF cmp word [es:bx], 0FF2Eh 0 0000381F 7519 jne .not_testhook_or_jmpfarindirect 0 00003821 26807F022E cmp byte [es:bx + 2], 2Eh 0 00003826 7512 jne .not_testhook_or_jmpfarindirect 0 00003828 268B5F03 mov bx, word [es:bx + 3] 0 0000382C 83FBFC cmp bx, -4 0 0000382F 7709 ja .not_testhook_or_jmpfarindirect 0 00003831 26FF7702 push word [es:bx + 2] 0 00003835 26FF37 push word [es:bx] 0 00003838 EB83 jmp @B 1097 <1> 1098 <1> .not_testhook_or_jmpfarindirect: 0 0000383A 85E4 test sp, sp ; NZ 1100 <1> .CY: 0 0000383C F9 stc 0 0000383D C3 retn 1103 <1> 1104 <1> 1105 <1> gateout.mcbname: 1106 <1> %if !_LOADER 0 0000383E F6C501 test ch, 1 0 00003841 7503E99800 jz .ret 0 00003846 8B16[0000] mov dx, word [relocated(firstmcb)] 1110 <1> linkdatarelocation firstmcb 0 0000384A 83FAFF cmp dx, -1 0 0000384D 7503E98C00 je .ret 0 00003852 51 push cx 0 00003853 A1[0000] mov ax, word [intaddress] 1115 <1> internaldatarelocation 0 00003856 B104 mov cl, 4 0 00003858 D3E8 shr ax, cl 0 0000385A 0306[0200] add ax, word [intaddress + 2] ; => segment of handler 1119 <1> internaldatarelocation 0 0000385E 724F jc .hma 1121 <1> .loop: 1122 <1> %if _PM 1123 <1> extcallcall setes2dx 1124 <1> %else 0 00003860 8EC2 mov es, dx 1126 <1> %endif 0 00003862 89D1 mov cx, dx 0 00003864 26030E0300 add cx, word [es:3] 0 00003869 41 inc cx 0 0000386A 39D0 cmp ax, dx 0 0000386C 7246 jb .next 0 0000386E 39C8 cmp ax, cx 0 00003870 7342 jae .next 0 00003872 268B160100 mov dx, word [es:1] 0 00003877 BE[0000] mov si, msg.di_system_mcb 1136 <1> internaldatarelocation 0 0000387A 83FA50 cmp dx, 50h 0 0000387D 7259 jb .copy 0 0000387F 4A dec dx 1140 <1> %if _PM 1141 <1> extcallcall setes2dx 1142 <1> %else 0 00003880 8EC2 mov es, dx 1144 <1> %endif 0 00003882 06 push es 0 00003883 1F pop ds 0 00003884 16 push ss 0 00003885 07 pop es 0 00003886 B020 mov al, 32 0 00003888 AA stosb 0 00003889 89F8 mov ax, di 0 0000388B BE0800 mov si, 8 0 0000388E 89F1 mov cx, si 0 00003890 57 push di 0 00003891 F3A4 rep movsb 0 00003893 B000 mov al, 0 0 00003895 AA stosb ; append zero-value byte 0 00003896 5F pop di ; -> name in buffer 0 00003897 16 push ss 0 00003898 1F pop ds 1161 <1> @@: 0 00003899 AE scasb ; is it zero ? 0 0000389A 75FD jne @B ; no, continue --> 1164 <1> ; first dec makes it -> at the zero 1165 <1> @@: 0 0000389C 4F dec di 0 0000389D 39F8 cmp ax, di 0 0000389F 7408 je .empty 0 000038A1 807DFF20 cmp byte [di - 1], 32 0 000038A5 74F5 je @B 0 000038A7 EB34 jmp .ret_cx 1172 <1> 1173 <1> .empty: 0 000038A9 4F dec di 0 000038AA BE[0000] mov si, msg.di_empty 1176 <1> internaldatarelocation 0 000038AD EB29 jmp .copy 1178 <1> 1179 <1> .hma: 0 000038AF BE[0000] mov si, msg.di_hma 1181 <1> internaldatarelocation 0 000038B2 EB24 jmp .copy 1183 <1> 1184 <1> .next: 0 000038B4 89CA mov dx, cx 0 000038B6 3B16[0000] cmp dx, word [relocated(firstumcb)] 1187 <1> linkdatarelocation firstumcb 1188 <1> ; is next one the first UMCB ? 0 000038BA 74A4 je .loop ; yes, ignore the "Z" (if any) --> 0 000038BC 26803E00004D cmp byte [es:0], "M" ; check current signature 0 000038C2 749C je .loop ; if "M" then loop to next --> 1192 <1> 0 000038C4 8B36[0000] mov si, word [relocated(firstumcb)] 1194 <1> linkdatarelocation firstumcb 0 000038C8 46 inc si 0 000038C9 7503 jnz @F 0 000038CB BE00A0 mov si, 0A000h 1198 <1> @@: 0 000038CE 39F0 cmp ax, si 0 000038D0 BE[0000] mov si, msg.di_system_upper 1201 <1> internaldatarelocation 0 000038D3 7303 jae @F 0 000038D5 BE[0000] mov si, msg.di_system_low 1204 <1> internaldatarelocation 1205 <1> @@: 1206 <1> .copy: 0 000038D8 16 push ss 0 000038D9 07 pop es 0 000038DA E8[0000] extcallcall copy_single_counted_string 1210 <1> .ret_cx: 0 000038DD 59 pop cx 1212 <1> .ret: 1213 <1> %endif ; !_LOADER 0 000038DE C3 retn 1870 %endif 1871 1872 %if _MCB 1873 %include "dmshared.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug DM command - Dump MCB chain 5 <1> 6 <1> Copyright (C) 2008-2025 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> ; DM command 17 <1> mcbout: 18 <1> %if _MCBPOSITION 19 <1> xor bx, bx 20 <1> extcallcall skipcomma 21 <1> dec si 22 <1> mov dx, msg.keyword_position 23 <1> internaldatarelocation 24 <1> extcallcall isstring? 25 <1> jne .no_position 26 <1> not bx 27 <1> .no_position: 28 <1> extcallcall skipcomma 29 <1> dec si 30 <1> mov byte [mcbposition], bl 31 <1> internaldatarelocation 32 <1> %endif 33 <1> 34 <1> %if _MCBLIMIT 35 <1> mov bx, -1 36 <1> extcallcall skipcomma 37 <1> dec si 38 <1> mov dx, msg.keyword_limit 39 <1> internaldatarelocation 40 <1> extcallcall isstring? 41 <1> jne .no_limit 42 <1> extcallcall skipequals 43 <1> extcallcall skipcomm0 44 <1> extcallcall getword 45 <1> dec si 46 <1> mov bx, dx 47 <1> .no_limit: 48 <1> extcallcall skipcomma 49 <1> dec si 50 <1> mov word [mcblimit], bx 51 <1> internaldatarelocation 52 <1> %endif 53 <1> 54 <1> %if _SDSUB 55 <1> xor bx, bx 56 <1> extcallcall skipcomma 57 <1> dec si 58 <1> mov dx, msg.keyword_skipsd 59 <1> internaldatarelocation 60 <1> extcallcall isstring? 61 <1> jne .sd 62 <1> not bx 63 <1> .sd: 64 <1> extcallcall skipcomma 65 <1> dec si 66 <1> mov byte [skipsd], bl 67 <1> internaldatarelocation 68 <1> %endif 69 <1> 70 <1> %if ELD 71 <1> xor bx, bx 72 <1> extcallcall skipcomma 73 <1> dec si 74 <1> mov dx, msg.keyword_header 75 <1> internaldatarelocation 76 <1> extcallcall isstring? 77 <1> je .header 78 <1> mov dx, msg.keyword_table 79 <1> internaldatarelocation 80 <1> extcallcall isstring? 81 <1> jne .nottable 82 <1> .table: 83 <1> mov bl, -1 84 <1> db __TEST_IMM16 ; skip mov 85 <1> .header: 86 <1> mov bh, -1 87 <1> .nottable: 88 <1> extcallcall skipcomma 89 <1> mov word [header_high_table_low], bx 90 <1> internaldatarelocation 91 <1> %else 0 000038DF E8[0000] extcallcall skipwhite 93 <1> %endif 0 000038E2 8B16[0000] mov dx, word [relocated(firstmcb)] 95 <1> linkdatarelocation firstmcb 0 000038E6 E8[0000] extcallcall iseol? 0 000038E9 7406 je .lolmcb 0 000038EB E8[0000] extcallcall getword 99 <1> %if _MCBLIMIT 100 <1> extcallcall skipcomm0 101 <1> dec si 102 <1> push dx 103 <1> mov dx, msg.keyword_limit 104 <1> internaldatarelocation 105 <1> extcallcall isstring? 106 <1> jne .no_limit_2 107 <1> extcallcall skipequals 108 <1> extcallcall skipcomm0 109 <1> extcallcall getword 110 <1> mov word [mcblimit], dx 111 <1> internaldatarelocation 112 <1> dec si 113 <1> .no_limit_2: 114 <1> pop dx 115 <1> extcallcall skipcomma 116 <1> %endif 0 000038EE E8[0000] extcallcall chkeol 118 <1> .lolmcb: 0 000038F1 89D6 mov si, dx 0 000038F3 BF[0000] mov di, relocated(line_out) 121 <1> linkdatarelocation line_out 0 000038F6 B85053 mov ax, "PS" 0 000038F9 AB stosw 0 000038FA B8503A mov ax, "P:" 0 000038FD AB stosw 0 000038FE B020 mov al, 32 0 00003900 AA stosb 0 00003901 A1[0000] mov ax, word [relocated(pspdbe)] 129 <1> linkdatarelocation pspdbe 0 00003904 E8[0000] extcallcall hexword 0 00003907 E8[0000] extcallcall putsline_crlf ; destroys cx,dx,bx 132 <1> %if ELD 133 <1> mov dx, msg.headertable 134 <1> internaldatarelocation 135 <1> %if _MCBPOSITION 136 <1> rol byte [mcbposition], 1 137 <1> internaldatarelocation 138 <1> jnc .notableposition 139 <1> mov dx, msg.headertableposition 140 <1> internaldatarelocation 141 <1> .notableposition: 142 <1> %endif 143 <1> rol byte [header_high_table_low], 1 144 <1> internaldatarelocation 145 <1> jc @F 146 <1> mov dx, msg.headerheader 147 <1> internaldatarelocation 148 <1> %if _MCBPOSITION 149 <1> rol byte [mcbposition], 1 150 <1> internaldatarelocation 151 <1> jnc .noheaderposition 152 <1> mov dx, msg.headerheaderposition 153 <1> internaldatarelocation 154 <1> .noheaderposition: 155 <1> %endif 156 <1> rol byte [header_high_table_low + 1], 1 157 <1> internaldatarelocation 158 <1> jnc @FF 159 <1> @@: 160 <1> extcallcall putsz 161 <1> @@: 162 <1> %endif 0 0000390A B14D mov cl, 'M' 164 <1> .next: 0 0000390C 83FEFF cmp si, byte -1 0 0000390F 7405 je .invmcb 0 00003911 83FE50 cmp si, byte 50h 0 00003914 7306 jae .valmcb 169 <1> .invmcb: 0 00003916 BA[0000] mov dx, msg.invmcbadr 171 <1> internaldatarelocation 0 00003919 E9[0000] jmp putsz 173 <1> .valmcb: 174 <1> %if _MCBLIMIT 175 <1> cmp word [mcblimit], si 176 <1> internaldatarelocation 177 <1> jae @F 178 <1> retn 179 <1> @@: 180 <1> %endif 0 0000391C BF[0000] mov di, relocated(line_out) 182 <1> linkdatarelocation line_out 0 0000391F 1E push ds 184 <1> %if _PM 185 <1> extcallcall setds2si 186 <1> %else 0 00003920 8EDE mov ds, si 188 <1> %endif 0 00003922 8A2E0000 mov ch, byte [0000] 0 00003926 8B1E0100 mov bx, word [0001] 0 0000392A 8B160300 mov dx, word [0003] 192 <1> 0 0000392E 89F0 mov ax, si 0 00003930 E8[0000] extcallcall hexword ; segment address of MCB 195 <1> %if ELD 196 <1> mov ah, 4 197 <1> %endif 198 <1> %if _MCBPOSITION 199 <1> rol byte [ss:mcbposition], 1 200 <1> internaldatarelocation 201 <1> jnc .noposition 202 <1> %if ELD 203 <1> mov ah, 3 204 <1> call stosb_repeated 205 <1> %else 206 <1> mov al, 32 207 <1> stosb 208 <1> %endif 209 <1> mov ax, si 210 <1> push bx 211 <1> push dx 212 <1> push cx 213 <1> xor dx, dx ; dx:ax = position as segment 214 <1> mov cx, 16 ; cx = 16, multiplier (get position in bytes) 215 <1> mov bx, 5+4 ; bx = 5+4, width 216 <1> extcallcall disp_dxax_times_cx_width_bx_size.store 217 <1> pop cx 218 <1> pop dx 219 <1> pop bx 220 <1> %if ELD 221 <1> mov ah, 1 222 <1> %endif 223 <1> 224 <1> .noposition: 225 <1> %endif 226 <1> 227 <1> %if ELD 228 <1> call stosb_repeated 229 <1> %else 0 00003933 B020 mov al, 32 0 00003935 AA stosb 232 <1> %endif 0 00003936 88E8 mov al, ch 0 00003938 E8[0000] extcallcall hexbyte ; 'M' or 'Z' 235 <1> %if ELD 236 <1> mov ah, 3 237 <1> call stosb_repeated 238 <1> %else 0 0000393B B020 mov al, 32 0 0000393D AA stosb 241 <1> %endif 0 0000393E 89D8 mov ax, bx 0 00003940 E8[0000] extcallcall hexword ; MCB owner 244 <1> %if ELD 245 <1> mov ah, 1 246 <1> call stosb_repeated 247 <1> %else 0 00003943 B020 mov al, 32 0 00003945 AA stosb 250 <1> %endif 0 00003946 89D0 mov ax, dx 0 00003948 E8[0000] extcallcall hexword ; MCB size in paragraphs 253 <1> 0 0000394B B020 mov al, 32 0 0000394D AA stosb 0 0000394E 89D0 mov ax, dx ; ax = size in paragraphs 0 00003950 53 push bx 0 00003951 50 push ax 0 00003952 52 push dx 0 00003953 51 push cx 0 00003954 31D2 xor dx, dx ; dx:ax = size in paragraphs 0 00003956 B91000 mov cx, 16 ; cx = 16, multiplier (get size in bytes) 0 00003959 BB0900 mov bx, 5+4 ; bx = 5+4, width 264 <1> 0 0000395C E89E00 extcallcall disp_dxax_times_cx_width_bx_size.store 0 0000395F 59 pop cx 0 00003960 5A pop dx 0 00003961 58 pop ax 0 00003962 5B pop bx 270 <1> 0 00003963 85DB test bx, bx 0 00003965 7471 jz .freemcb ; free MCBs have no name --> 273 <1> %if ELD 274 <1> mov ah, 1 275 <1> call stosb_repeated 276 <1> %else 0 00003967 B020 mov al, 32 0 00003969 AA stosb 279 <1> %endif 0 0000396A 56 push si 0 0000396B 51 push cx 0 0000396C 52 push dx 283 <1> 0 0000396D 1E push ds 0 0000396E BE0800 mov si, 8 0 00003971 B90200 mov cx, 2 0 00003974 39F3 cmp bx, si ; is it a "system" MCB? (owner 0008h or 0007h) 0 00003976 7707 ja @F 0 00003978 803C53 cmp byte [si], "S" ; "S", "SD", "SC" ? 0 0000397B 7407 je .nextmcbchar ; yes, limit name to two characters --> 0 0000397D EB03 jmp .nextmcbchar_cx_si ; no, assume full name given 292 <1> @@: 0 0000397F 4B dec bx ; => owner block's MCB 294 <1> %if _PM 295 <1> extcallcall setds2bx 296 <1> %else 0 00003980 8EDB mov ds, bx 298 <1> %endif 299 <1> .nextmcbchar_cx_si: 0 00003982 89F1 mov cx, si ; = 8 301 <1> .nextmcbchar: ; copy name of owner MCB 0 00003984 AC lodsb 0 00003985 AA stosb 0 00003986 84C0 test al, al 0 00003988 E0FA loopnz .nextmcbchar ; was not NUL and more bytes left ? 0 0000398A 84C0 test al, al 0 0000398C 7501 jnz @F 0 0000398E 4F dec di 309 <1> @@: 0 0000398F 1F pop ds 311 <1> 0 00003990 833E010008 cmp word [1], 8 0 00003995 753E jne .not_s_mcb 0 00003997 833E080053 cmp word [8], "S" ; S MCB ? 0 0000399C 7537 jne .not_s_mcb_check_sd 316 <1> 0 0000399E B82074 mov ax, " t" 0 000039A1 AB stosw 0 000039A2 B87970 mov ax, "yp" 0 000039A5 AB stosw 0 000039A6 B86520 mov ax, "e " 0 000039A9 AB stosw 323 <1> 0 000039AA 31C0 xor ax, ax 0 000039AC A00A00 mov al, [10] 0 000039AF E8[0000] extcallcall hexbyte 327 <1> 0 000039B2 16 push ss 0 000039B3 1F pop ds 0 000039B4 BE[0000] mov si, smcbtypes 331 <1> internaldatarelocation 332 <1> .s_mcb_loop: 0 000039B7 833CFF cmp word [si], -1 0 000039BA 740E je .s_mcb_unknown 0 000039BC 3904 cmp word [si], ax 0 000039BE 7405 je .s_mcb_known 0 000039C0 83C604 add si, 4 0 000039C3 EBF2 jmp .s_mcb_loop 339 <1> 340 <1> .s_mcb_known: 0 000039C5 8B7402 mov si, word [si + 2] 0 000039C8 EB03 jmp .s_mcb_common 343 <1> 344 <1> .s_mcb_unknown: 0 000039CA BE[0000] mov si, smcbmsg_unknown 346 <1> internaldatarelocation 347 <1> .s_mcb_common: 0 000039CD B020 mov al, 32 349 <1> @@: 0 000039CF AA stosb 0 000039D0 AC lodsb 0 000039D1 84C0 test al, al 0 000039D3 75FA jnz @B 354 <1> %if _SDSUB 355 <1> @@: 356 <1> jmp .not_s_mcb 357 <1> %endif 358 <1> 359 <1> .not_s_mcb_check_sd: 360 <1> 361 <1> %if _SDSUB 362 <1> rol byte [ss:skipsd], 1 363 <1> internaldatarelocation 364 <1> jc @B 365 <1> 366 <1> cmp word [8], "SD" 367 <1> jne @B 368 <1> 369 <1> pop dx 370 <1> pop cx 371 <1> pop si 372 <1> 373 <1> push si 374 <1> push cx 375 <1> push dx 376 <1> 377 <1> mov bp, si 378 <1> add bp, dx 379 <1> jc @F 380 <1> inc bp 381 <1> jnz @FF 382 <1> @@: 383 <1> mov bp, -1 384 <1> @@: 385 <1> xor dx, dx 386 <1> .loop_sd: 387 <1> add si, dx 388 <1> jc .done_sd 389 <1> 390 <1> inc si 391 <1> jz .done_sd 392 <1> 393 <1> cmp si, bp 394 <1> jae .done_sd 395 <1> 396 <1> push ss 397 <1> pop ds 398 <1> extcallcall putsline_crlf ; destroys cx,dx,bx 399 <1> 400 <1> mov di, relocated(line_out) 401 <1> linkdatarelocation line_out 402 <1> %if _PM 403 <1> extcallcall setds2si 404 <1> %else 405 <1> mov ds, si 406 <1> %endif 407 <1> mov ch, byte [0000] 408 <1> mov bx, word [0001] 409 <1> mov dx, word [0003] 410 <1> 411 <1> mov al, 32 412 <1> stosb ; indent SD sub-MCBs 413 <1> 414 <1> mov ax, si 415 <1> extcallcall hexword ; segment address of MCB 416 <1> %if ELD 417 <1> mov ah, 4 418 <1> %endif 419 <1> %if _MCBPOSITION 420 <1> rol byte [ss:mcbposition], 1 421 <1> internaldatarelocation 422 <1> jnc .sdnoposition 423 <1> %if ELD 424 <1> mov ah, 3 425 <1> call stosb_repeated 426 <1> %else 427 <1> mov al, 32 428 <1> stosb 429 <1> %endif 430 <1> mov ax, si 431 <1> push bx 432 <1> push dx 433 <1> push cx 434 <1> xor dx, dx ; dx:ax = position as segment 435 <1> mov cx, 16 ; cx = 16, multiplier (get position in bytes) 436 <1> mov bx, 5+4 ; bx = 5+4, width 437 <1> extcallcall disp_dxax_times_cx_width_bx_size.store 438 <1> pop cx 439 <1> pop dx 440 <1> pop bx 441 <1> %if ELD 442 <1> mov ah, 1 443 <1> %endif 444 <1> 445 <1> .sdnoposition: 446 <1> %endif 447 <1> 448 <1> %if ELD 449 <1> call stosb_repeated 450 <1> %else 451 <1> mov al, 32 452 <1> stosb 453 <1> %endif 454 <1> mov al, ch 455 <1> extcallcall hexbyte ; 'M' or 'Z' 456 <1> %if ELD 457 <1> mov ah, 3 458 <1> call stosb_repeated 459 <1> %else 460 <1> mov al, 32 461 <1> stosb 462 <1> %endif 463 <1> mov ax, bx 464 <1> extcallcall hexword ; MCB owner 465 <1> %if ELD 466 <1> mov ah, 1 467 <1> call stosb_repeated 468 <1> %else 469 <1> mov al, 32 470 <1> stosb 471 <1> %endif 472 <1> mov ax, dx 473 <1> extcallcall hexword ; MCB size in paragraphs 474 <1> 475 <1> mov al, 32 476 <1> stosb 477 <1> mov ax, dx ; ax = size in paragraphs 478 <1> push bx 479 <1> push ax 480 <1> push dx 481 <1> push cx 482 <1> xor dx, dx ; dx:ax = size in paragraphs 483 <1> mov cx, 16 ; cx = 16, multiplier (get size in bytes) 484 <1> mov bx, 5+4 ; bx = 5+4, width 485 <1> 486 <1> extcallcall disp_dxax_times_cx_width_bx_size.store 487 <1> pop cx 488 <1> pop dx 489 <1> pop ax 490 <1> pop bx 491 <1> 492 <1> %if ELD 493 <1> mov ah, 1 494 <1> call stosb_repeated 495 <1> %else 496 <1> mov al, 32 497 <1> stosb 498 <1> %endif 499 <1> push si 500 <1> push cx 501 <1> push dx 502 <1> 503 <1> mov al, "'" 504 <1> stosb 505 <1> mov al, ch 506 <1> cmp al, 32 507 <1> jbe @F 508 <1> cmp al, 127 509 <1> jb @FF 510 <1> @@: 511 <1> mov al, '.' 512 <1> @@: 513 <1> stosb 514 <1> mov ax, "' " 515 <1> stosw 516 <1> 517 <1> mov al, ch 518 <1> mov ah, 0 519 <1> push ds 520 <1> push ss 521 <1> pop ds 522 <1> mov si, sdsubmcbtypes 523 <1> internaldatarelocation 524 <1> .sd_mcb_loop: 525 <1> cmp word [si], -1 526 <1> je .sd_mcb_unknown 527 <1> cmp word [si], ax 528 <1> je .sd_mcb_known 529 <1> add si, 4 530 <1> jmp .sd_mcb_loop 531 <1> 532 <1> .sd_mcb_known: 533 <1> mov si, word [si + 2] 534 <1> jmp .sd_mcb_common 535 <1> 536 <1> .sd_mcb_unknown: 537 <1> mov si, smcbmsg_unknown 538 <1> internaldatarelocation 539 <1> .sd_mcb_common: 540 <1> db __TEST_IMM8 ; (skip stosb in first iteration) 541 <1> @@: 542 <1> stosb 543 <1> lodsb 544 <1> test al, al 545 <1> jnz @B 546 <1> pop ds 547 <1> 548 <1> pop dx 549 <1> pop cx 550 <1> push cx 551 <1> push dx 552 <1> 553 <1> cmp ch, 'D' 554 <1> jne .sd_no_name 555 <1> 556 <1> mov si, 8 557 <1> mov cx, si 558 <1> .nextsdmcbchar: ; copy name of SD sub-MCB 559 <1> lodsb 560 <1> stosb 561 <1> test al, al 562 <1> loopnz .nextsdmcbchar ; was not NUL and more bytes left ? 563 <1> test al, al 564 <1> jnz @F 565 <1> dec di 566 <1> @@: 567 <1> 568 <1> .sd_no_name: 569 <1> pop dx 570 <1> pop cx 571 <1> pop si 572 <1> 573 <1> test ch, ch 574 <1> jz .done_sd 575 <1> 576 <1> test dx, dx 577 <1> jz .done_sd 578 <1> 579 <1> jmp .loop_sd 580 <1> 581 <1> .done_sd: 582 <1> %endif 583 <1> 584 <1> .not_s_mcb: 0 000039D5 5A pop dx 0 000039D6 59 pop cx 0 000039D7 5E pop si 588 <1> .freemcb: 589 <1> 0 000039D8 1F pop ds 0 000039D9 80FD4D cmp ch, 'M' 0 000039DC 7406 je .disp 0 000039DE 80FD5A cmp ch, 'Z' 0 000039E1 7401 je .disp 595 <1> .ret: 0 000039E3 C3 retn 597 <1> 598 <1> .disp: 0 000039E4 88E9 mov cl, ch 0 000039E6 52 push dx 0 000039E7 51 push cx 0 000039E8 E8[0000] extcallcall putsline_crlf ; destroys cx,dx,bx 0 000039EB 59 pop cx 0 000039EC 5A pop dx 0 000039ED 01D6 add si, dx 0 000039EF 72F2 jc .ret ; over FFFFh, must be end of chain --> (hmm) 0 000039F1 46 inc si 0 000039F2 74EF jz .ret 0 000039F4 E915FF jmp .next 610 <1> 611 <1> %if ELD 612 <1> stosb_repeated: 613 <1> mov al, 32 614 <1> stosb 615 <1> rol byte [ss:header_high_table_low], 1 616 <1> internaldatarelocation 617 <1> jnc .ret 618 <1> push cx 619 <1> xor cx, cx 620 <1> mov cl, ah 621 <1> rep stosb 622 <1> pop cx 623 <1> .ret: 624 <1> retn 625 <1> %endif 1874 %endif ; _MCB 1875 1876 %if _DX 1877 %include "dxshared.asm" 1878 %endif 1879 1880 %undef extcall 1881 %undef extcallcall 1882 %unimacro internalcoderelocation 0-*.nolist 1883 %unimacro internaldatarelocation 0-*.nolist 1884 %unimacro linkdatarelocation 0-*.nolist 1885 %undef relocated 1886 1887 %if _PM 1888 setds2si: section_of_function 1889 mov bx, si 1890 setds2bx: section_of_function 1891 call ispm 1892 jnz sd2s_ex 1893 mov dx, bx 1894 call setrmsegm 1895 sd2s_ex: 1896 mov ds, bx 1897 retn 1898 %elif _EXTENSIONS 1899 setds2si: section_of_function 0 000039F7 89F3 mov bx, si 1901 setds2bx: section_of_function 0 000039F9 8EDB mov ds, bx 0 000039FB C3 retn 1904 %endif 1905 1906 1907 ; INP: dx:ax = numerator 1908 ; cx = multiplier (0 to take si:dx:ax as numerator) 1909 ; bx = field width 1910 ; es:di -> buffer where to store 1911 ; STT: UP, ds = ss 1912 ; OUT: written to buffer, es:di -> behind written string 1913 disp_dxax_times_cx_width_bx_size: section_of_function 0 000039FC A8 db __TEST_IMM8 ; (skip stc, NC) 1915 .store: section_of_function disp_dxax_times_cx_width_bx_size 0 000039FD F9 stc 1917 1918 lframe near 1919 lequ 4 + 4 + 2, buffer_size 1920 ; 4: "2048" or "26.5" (maximum number) 1921 ; 4: " ?iB" (IEC prefixed unit) 1922 ; 2: ??? 1923 lvar ?buffer_size, buffer 1924 lvar 6, dividend 0 000039FE 5589E58D66F0 lenter 1926 lvar word, bit_0_is_store 0 00003A04 9C pushf 1928 lvar word, width 0 00003A05 53 push bx 0 00003A06 56 push si 0 00003A07 1E push ds 0 00003A08 51 push cx 0 00003A09 50 push ax 0 00003A0A 52 push dx 0 00003A0B 06 push es 0 00003A0C 57 push di 1937 0 00003A0D 16 push ss ; push cs 0 00003A0E 1F pop ds 0 00003A0F 16 push ss 0 00003A10 07 pop es 1942 0 00003A11 E310 jcxz .use_si 1944 0 00003A13 52 push dx 0 00003A14 F7E1 mul cx 0 00003A16 97 xchg ax, di 0 00003A17 87D6 xchg dx, si ; si:di = first mul 1949 0 00003A19 58 pop ax 0 00003A1A F7E1 mul cx 0 00003A1C 01F0 add ax, si 0 00003A1E 83D200 adc dx, 0 ; dx:ax = second mul + adj, dx:ax:di = mul 1954 0 00003A21 EB05 jmp @F 1956 1957 .use_si: 0 00003A23 89C7 mov di, ax 0 00003A25 92 xchg ax, dx 0 00003A26 89F2 mov dx, si 1961 1962 @@: 0 00003A28 897EF0 mov word [bp + ?dividend], di 0 00003A2B 8946F2 mov word [bp + ?dividend + 2], ax 0 00003A2E 8956F4 mov word [bp + ?dividend + 4], dx 1966 1967 ; set up divisor for the unit prefixes 0 00003A31 B90004 mov cx, 1024 ; 1000 here if SI units 0 00003A34 F606[0100]10 testopt [options], use_si_units ; SI units ? 0 00003A39 7403 jz @F ; no --> 0 00003A3B B9E803 mov cx, 1000 ; yes, use 1000 1972 @@: 1973 0 00003A3E BE[0000] mov si, msg.prefixes ; -> first prefix (blank) 0 00003A41 31D2 xor dx, dx ; init remainder (not really needed) 1976 .loop: 0 00003A43 837EF400 cmp word [bp + ?dividend + 4], 0 0 00003A47 750D jnz .divide 0 00003A49 837EF200 cmp word [bp + ?dividend + 2], 0 0 00003A4D 7507 jnz .divide 0 00003A4F 817EF00008 cmp word [bp + ?dividend], 2048 1982 ; is dividend <= 2048 ? 0 00003A54 7614 jbe .end ; yes, end unit division loop --> 1984 .divide: 0 00003A56 46 inc si ; -> next prefix 1986 0 00003A57 31D2 xor dx, dx 0 00003A59 BF0600 mov di, 6 1989 .loop_divide: 0 00003A5C 8B43EE mov ax, [bp + ?dividend - 2 + di] 0 00003A5F F7F1 div cx 0 00003A61 8943EE mov word [bp + ?dividend - 2 + di], ax 0 00003A64 4F dec di 0 00003A65 4F dec di 0 00003A66 75F4 jnz .loop_divide 1996 ; dx = last remainder 0 00003A68 EBD9 jmp .loop 1998 1999 .end: 2000 ; dx = last remainder 0 00003A6A B80A00 mov ax, 10 ; ax = 10 0 00003A6D F7E2 mul dx ; dx:ax = last remainder * 10 0 00003A6F F7F1 div cx ; divide by unit multiplier, 2004 ; ax = 0..9 tenth digit 0 00003A71 92 xchg dx, ax ; dl = 0..9 tenth digit 2006 0 00003A72 8D7EFF lea di, [bp + ?buffer + ?buffer_size - 1] 0 00003A75 FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 0 00003A76 B042 mov al, "B" 0 00003A78 AA stosb 0 00003A79 AC lodsb ; al = prefix (blank or kMGT) 0 00003A7A 3C20 cmp al, 32 ; unit is Bytes ? 0 00003A7C 7416 je @FF ; yes, skip past unit handling --> 2014 0 00003A7E F606[0100]10 testopt [options], use_si_units 2016 ; SI units ? 0 00003A83 750E jnz @F ; yes --> 0 00003A85 24DF and al, ~20h ; uppercase, don't do this if SI units 0 00003A87 F606[0100]20 testopt [options], use_jedec_units 2020 ; JEDEC units ? 0 00003A8C 7505 jnz @F ; yes --> 0 00003A8E 50 push ax 0 00003A8F B069 mov al, "i" 0 00003A91 AA stosb ; don't store this if SI or JEDEC units 0 00003A92 58 pop ax ; preserve unit prefix 2026 @@: 0 00003A93 AA stosb ; store prefix letter 2028 @@: 0 00003A94 3C20 cmp al, 32 ; unit is Bytes ? 0 00003A96 B020 mov al, 32 0 00003A98 AA stosb ; (store a blank) 0 00003A99 8B46F0 mov ax, word [bp + ?dividend] 2033 ; (ax = dividend, <= 2048) 0 00003A9C 740D je @F ; yes, no tenth digit to display --> 0 00003A9E 83F864 cmp ax, 100 ; displaying above-or-equal 100 ? 0 00003AA1 7308 jae @F ; yes, display no tenth digit --> 0 00003AA3 92 xchg ax, dx ; al = tenth digit 0 00003AA4 0430 add al, '0' ; make it text 0 00003AA6 AA stosb ; store fractional digit 0 00003AA7 B02E mov al, '.' 0 00003AA9 AA stosb ; store decimal point 0 00003AAA 92 xchg ax, dx ; get back ax = dividend 2043 @@: 0 00003AAB B90A00 mov cx, 10 2045 .loop_write: 0 00003AAE 31D2 xor dx, dx 0 00003AB0 F7F1 div cx 0 00003AB2 92 xchg ax, dx 2049 ; ax = remainder (next digit) 2050 ; dx = result of div 0 00003AB3 0430 add al, '0' 0 00003AB5 AA stosb 0 00003AB6 92 xchg ax, dx ; ax = result of div 0 00003AB7 85C0 test ax, ax ; any more ? 0 00003AB9 75F3 jnz .loop_write ; loop --> 2056 0 00003ABB FC cld 2058 0 00003ABC 47 inc di ; -> first digit 0 00003ABD 8D5E00 lea bx, [bp + ?buffer + ?buffer_size] 2061 ; -> behind 'B' 0 00003AC0 29FB sub bx, di ; = length of string 0 00003AC2 89FE mov si, di 2064 0 00003AC4 5F pop di 0 00003AC5 07 pop es ; restore es:di 2067 ; -> where to store (if storing) 2068 0 00003AC6 8B4EEC mov cx, [bp + ?width] 0 00003AC9 29D9 sub cx, bx 0 00003ACB 760F jbe .none_blank 0 00003ACD B020 mov al, 32 0 00003ACF F646EE01 test byte [bp + ?bit_0_is_store], 1 0 00003AD3 7505 jnz @F 2075 .loop_blank_disp: 0 00003AD5 E8[0000] nearcall disp_al 0 00003AD8 E2FB loop .loop_blank_disp 2078 ; now cx = 0 so the rep stosb is a nop 2079 @@: 0 00003ADA F3AA rep stosb 2081 .none_blank: 2082 2083 0 00003ADC 89D9 mov cx, bx 0 00003ADE F646EE01 test byte [bp + ?bit_0_is_store], 1 0 00003AE2 7506 jnz @F 2087 2088 ; ! note ss = ds 0 00003AE4 89F2 mov dx, si ; ds:dx -> string 0 00003AE6 E8[0000] call disp_message_length_cx 0 00003AE9 A9 db __TEST_IMM16 ; (skip rep movsb) 2092 @@: 2093 ; ! note ss = ds 2094 ; ds:si -> string, cx = length 0 00003AEA F3A4 rep movsb 2096 0 00003AEC 5A pop dx 0 00003AED 58 pop ax 0 00003AEE 59 pop cx 0 00003AEF 1F pop ds 0 00003AF0 5E pop si 0 00003AF1 5B pop bx 0 00003AF2 89EC5D lleave 0 00003AF5 C3 lret 2105 2106 %if _DT 2107 ; DT command 2108 dumptable: 0 00003AF6 E8[0000] call skipcomma 0 00003AF9 31DB xor bx, bx 0 00003AFB E8[0000] call capitalise 0 00003AFE 3C54 cmp al, 'T' 0 00003B00 7504 jne @F 0 00003B02 E8[0000] call skipcomma 0 00003B05 43 inc bx 2116 @@: 0 00003B06 53 push bx 0 00003B07 E8[0000] call iseol? 0 00003B0A 7427 je .table 0 00003B0C E8[0000] nearcall getdword 0 00003B0F E8[0000] call chkeol 0 00003B12 5E pop si 2123 .loopsingle: 0 00003B13 53 push bx 0 00003B14 52 push dx 0 00003B15 92 xchg ax, dx 0 00003B16 B4FF mov ah, -1 0 00003B18 E84700 call .item 0 00003B1B 5A pop dx 0 00003B1C 5B pop bx 0 00003B1D E89D00 call .blank 0 00003B20 88F2 mov dl, dh 0 00003B22 88DE mov dh, bl 0 00003B24 88FB mov bl, bh 0 00003B26 B700 mov bh, 0 0 00003B28 84DB test bl, bl 0 00003B2A 75E7 jnz .loopsingle 0 00003B2C 85D2 test dx, dx 0 00003B2E 75E3 jnz .loopsingle 0 00003B30 E9[0000] jmp trimputs 2141 2142 2143 .table: 0 00003B33 BE[0000] mov si, msg.tableheader 0 00003B36 85DB test bx, bx 0 00003B38 7403 jz @F 0 00003B3A BE[0000] mov si, msg.tableheadertop 2148 @@: 0 00003B3D E8[0000] call copy_single_counted_string 0 00003B40 5E pop si 0 00003B41 B000 mov al, 0 ; low nybble is base, high nybble column 2152 2153 .line: 0 00003B43 85F6 test si, si 0 00003B45 7402 jz @F 0 00003B47 0C80 or al, 128 2157 @@: 0 00003B49 B408 mov ah, 8 ; reset items per row 2159 .column: 0 00003B4B E81400 call .item 2161 0 00003B4E 0410 add al, 16 ; next column is 16 codepoints higher 0 00003B50 FECC dec ah ; more columns to go ? 0 00003B52 75F7 jnz .column ; yes --> 2165 0 00003B54 50 push ax 0 00003B55 E8[0000] call trimputs ; display 0 00003B58 BF[0000] mov di, line_out 0 00003B5B 58 pop ax 2170 0 00003B5C 40 inc ax ; increment base (low nybble) 0 00003B5D 240F and al, 15 ; test low nybble 0 00003B5F 75E2 jnz .line ; loop if not yet overflowed --> 2174 0 00003B61 C3 retn 2176 2177 2178 .item: 0 00003B62 B90300 mov cx, 3 ; width = 3 columns 0 00003B65 31D2 xor dx, dx 0 00003B67 50 push ax 0 00003B68 B400 mov ah, 0 ; dx:ax = number 0 00003B6A E8[0000] call dec_dword_minwidth ; decimal 0 00003B6D 57 push di 0 00003B6E 29CF sub di, cx ; -> start of decimal number written 0 00003B70 49 dec cx 0 00003B71 B030 mov al, '0' ; ASCII zero 2188 @@: 0 00003B73 AE scasb ; a leading zero ? 0 00003B74 7506 jne @F ; no --> 0 00003B76 C645FF20 mov byte [di - 1], 32 ; replace by blank 0 00003B7A E2F7 loop @B ; check for another leading zero --> 2193 @@: 0 00003B7C 5F pop di ; restore -> after decimal number written 0 00003B7D 58 pop ax 0 00003B7E E83C00 call .blank 0 00003B81 E8[0000] call hexbyte ; hexadecimal 0 00003B84 E83600 call .blank 0 00003B87 88C3 mov bl, al ; = index 0 00003B89 3C20 cmp al, 32 0 00003B8B 720E jb .named 2202 0 00003B8D B320 mov bl, (asciitablenames.del - asciitablenames.) / 3 2204 ; point to DEL entry 0 00003B8F 3C7F cmp al, 127 0 00003B91 7408 je .named 0 00003B93 B321 mov bl, (asciitablenames.top - asciitablenames.) / 3 2208 ; point to top entry 0 00003B95 7218 jb .printable 0 00003B97 85F6 test si, si 0 00003B99 7514 jnz .printable 2212 .named: 0 00003B9B B700 mov bh, 0 ; bx = index 0 00003B9D 89DA mov dx, bx 0 00003B9F 01DB add bx, bx 0 00003BA1 01D3 add bx, dx ; times 3 0 00003BA3 81C3[2100] add bx, asciitablenames ; -> padded 3-byte text 0 00003BA7 87F3 xchg si, bx 0 00003BA9 A5 movsw 0 00003BAA A4 movsb 0 00003BAB 87DE xchg bx, si 0 00003BAD EB07 jmp @F 2223 .printable: 0 00003BAF E81000 call .quote 0 00003BB2 AA stosb 0 00003BB3 E80C00 call .quote 2227 @@: 0 00003BB6 E80400 call .blank 0 00003BB9 3C50 cmp al, 80 0 00003BBB 7214 jb @F 2231 2232 .blank: 0 00003BBD 50 push ax 0 00003BBE B020 mov al, 32 0 00003BC0 EB0D jmp .retstosb 2236 2237 .quote: 0 00003BC2 85C0 test ax, ax 0 00003BC4 790B jns @F 0 00003BC6 50 push ax 0 00003BC7 3C27 cmp al, "'" 0 00003BC9 B027 mov al, "'" 0 00003BCB 7502 jne .retstosb 0 00003BCD B022 mov al, '"' 2245 .retstosb: 0 00003BCF AA stosb 0 00003BD0 58 pop ax 2248 @@: 0 00003BD1 C3 retn 2250 2251 2252 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 2252 ------------------ note: usesection lDEBUG_DATA_ENTRY 2253 2254 %imacro asciitableentry 1.nolist 2255 %defstr %%string %1 2256 fill 3, 32, db %%string 2257 %endmacro 2258 2259 asciitablenames: 0 00001735 4E554C .: asciitableentry NUL 0 00001738 534F48 asciitableentry SOH 0 0000173B 535458 asciitableentry STX 0 0000173E 455458 asciitableentry ETX 0 00001741 454F54 asciitableentry EOT 0 00001744 454E51 asciitableentry ENQ 0 00001747 41434B asciitableentry ACK 0 0000174A 42454C asciitableentry BEL 0 0000174D 425320 asciitableentry BS 0 00001750 544142 asciitableentry TAB 0 00001753 4C4620 asciitableentry LF 0 00001756 565420 asciitableentry VT 0 00001759 464620 asciitableentry FF 0 0000175C 435220 asciitableentry CR 0 0000175F 534F20 asciitableentry SO 0 00001762 534920 asciitableentry SI 0 00001765 444C45 asciitableentry DLE 0 00001768 444331 asciitableentry DC1 0 0000176B 444332 asciitableentry DC2 0 0000176E 444333 asciitableentry DC3 0 00001771 444334 asciitableentry DC4 0 00001774 4E414B asciitableentry NAK 0 00001777 53594E asciitableentry SYN 0 0000177A 455442 asciitableentry ETB 0 0000177D 43414E asciitableentry CAN 0 00001780 454D20 asciitableentry EM 0 00001783 535542 asciitableentry SUB 0 00001786 455343 asciitableentry ESC 0 00001789 465320 asciitableentry FS 0 0000178C 475320 asciitableentry GS 0 0000178F 525320 asciitableentry RS 0 00001792 555320 asciitableentry US 0 00001795 44454C .del: asciitableentry DEL 2293 %if (.del - .) / 3 != 32 2294 %error Wrong table size 2295 %endif 0 00001798 746F70 .top: asciitableentry top 2297 2298 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 2298 ------------------ note: usesection lDEBUG_CODE 2299 2300 %endif 2301 2302 ..@dd_access_end: === Trace listing source: ../lst/debug.obj/debug.lst 1 2 %if 0 3 4 lDebug - libre 86-DOS debugger 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 "debug.asm" 18 [list -] 14 <3> [list -] 14 <2> [list -] 86 <1> [list -] 86 ------------------ <1> note: Disable usesection detection === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00000000 ???????? eldhSignature: resb 4 ; "ELD1" 0 00000004 ?????? resb 3 ; reserved 0 00000007 ?? resb 1 ; 26 (Ctrl-Z) 0 00000008 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000000C ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 0000000E ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00000010 ???????? eldhDataOffset: resd 1 0 00000014 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00000016 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00000018 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000001A ???????? eldhReserved: resb 4 ; reserved 0 0000001E ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00000020 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00000024 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00000028 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000002C ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00000000 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00000008 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000000C ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 0000000E ???? 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 0 00000000 ???? 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 0 00000002 ???? eldltAmount: resw 1 0 00000004 ???????? 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 0 00000000 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00000002 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00000004 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00000006 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00000008 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00000010 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00000000 ???? eldlSignature: resw 1 ; 0E1D1h 0 00000002 ???????? eldlReserved: resw 2 0 00000006 ???? eldlUseLinkHash: resw 1 0 00000008 ???? eldlDataAmount: resw 1 0 0000000A ???? eldlDataPrefixes: resw 1 0 0000000C ???? eldlDataEntries: resw 1 0 0000000E ???? eldlDataAddresses: resw 1 0 00000010 ???? eldlCodeAmount: resw 1 0 00000012 ???? eldlCodePrefixes: resw 1 0 00000014 ???? eldlCodeEntries: resw 1 0 00000016 ???? 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 0 00000000 ???? ifKeyword: resw 1 0 00000002 ???? ifDescription: resw 1 0 00000004 ???? ifOptions: resw 1 0 00000006 ???? ifValue: resw 1 0 00000008 ???? ifTrying: resw 1 0 0000000A ???? 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 0 00000000 ???????? saOffset: resd 1 0 00000004 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00000000 ???? so16aOffset: resw 1 0 00000002 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00000000 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00000000 ?????? bsJump: resb 3 0 00000003 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00000000 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00000002 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00000003 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00000005 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00000006 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 00000008 ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000000A ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000000B ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 0000000D ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 0000000F ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00000011 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00000015 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 00000019 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 0000001D ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 0000001F ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00000021 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00000025 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 00000027 ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00000000 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00000001 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00000002 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00000003 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00000012 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00000000 ???????????????? deName: resb 8 0 00000008 ?????? deExt: resb 3 0 0000000B ?? deAttrib: resb 1 0 0000000C ?? dePlusSize: resb 1 0 0000000D ?????????????? resb 7 0 00000014 ???? deClusterHigh: resw 1 0 00000016 ???? deTime: resw 1 0 00000018 ???? deDate: resw 1 0 0000001A ???? deClusterLow: resw 1 0 0000001C ???????? 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 0 FFFFFFF0 ???????? lsvFirstCluster: resd 1 0 FFFFFFF4 ???????? lsvFATSector: resd 1 0 FFFFFFF8 ???? lsvFATSeg: resw 1 0 FFFFFFFA ???? lsvLoadSeg: resw 1 0 FFFFFFFC ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 FFFFFFE0 ???? ldMemoryTop: resw 1 0 FFFFFFE2 ???? ldLoadTop: resw 1 0 FFFFFFE4 ???? ldSectorSeg: resw 1 0 FFFFFFE6 ?? ldFATType: resb 1 92 <2> ldFlags: 0 FFFFFFE7 ?? ldHasLBA: resb 1 0 FFFFFFE8 ???? ldClusterSize: resw 1 0 FFFFFFEA ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 FFFFFFEC ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 FFFFFFEE ?? .partition: resb 1 ; byte 0 FFFFFFEF ?? .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 <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 0 FFFFFFD0 ???????? ldRootSector: resd 1 0 FFFFFFD4 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 FFFFFFD6 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 FFFFFFD8 ???? ldParasLeft: resw 1 0 FFFFFFDA ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 FFFFFFC0 ???????? ldMaxCluster: resd 1 0 FFFFFFC4 ???????? ldFileSize: resd 1 0 FFFFFFC8 ???????? ldCurrentCluster: resd 1 0 FFFFFFCC ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00000000 ???????? liiSignature: resb 4 ; "NLDR" 0 00000004 ???? liiVersion: resb 2 ; "00" 0 00000006 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 00000008 ???? liiAmountParagraphs: resw 1 0 0000000A ???????????? liiReserved: resw 3 0 00000010 ???? 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 0 00000012 ???? 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 0 00000014 ???? 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 0 00000016 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00000000 ???? lpSize: resw 1 0 00000002 ???? lpCount: resw 1 0 00000004 ???????? lpBuffer: resd 1 0 00000008 ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00000000 ?? piBoot: resb 1 0 00000001 ?????? piStartCHS: resb 3 0 00000004 ?? piType: resb 1 0 00000005 ?????? piEndCHS: resb 3 0 00000008 ???????? piStart: resd 1 0 0000000C ???????? 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 0 00000000 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00000002 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00000004 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00000006 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 00000008 ???? lsOptions: resw 1 ; option flags 0 0000000A ???? lsSegment: resw 1 ; => where to load file 0 0000000C ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00000010 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00000014 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00000016 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 00000018 ???????????????? 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 0 00000000 ???? exact_struc_at 00h, exeSignature: resw 1 0 00000002 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00000004 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00000006 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 00000008 ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 0000000A ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 0000000C ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 0000000E ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00000010 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00000012 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00000014 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00000016 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 00000018 ???? 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. 0 0000001A ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00000000 ???? ifhHandle: resw 1 0 00000002 ???? ifhFlags: resw 1 0 00000004 ???????? 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 <1> areastrucEntry: resb 24 0 00000018 ???????? areastrucNext: resd 1 0 0000001C ???????? areastrucPrev: resd 1 0 00000020 ???? areastrucSubAmount: resw 1 0 00000022 ???? areastrucSubOffset: resw 1 0 00000024 ???? areastrucFunAmount: resw 1 0 00000026 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00000000 ???????? areastrucsubLinear: resd 1 0 00000004 ???????? areastrucsubLinearEnd: resd 1 0 00000008 ???? areastrucsubListOffset: resw 1 0 0000000A ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00000000 ???????? areastrucfunLinear: resd 1 0 00000004 ???????? areastrucfunLinearEnd: resd 1 0 00000008 ???? areastrucfunListOffset: resw 1 0 0000000A ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00000000 ???? areastart: resw 1 0 00000002 ???? areaend: resw 1 0 00000004 ???? areamessage: resw 1 0 00000006 ???? 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 0 00000000 ???? 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.) 0 00000002 ???? ivFlags: resw 1 0 00000004 ???? 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. 0 00000006 ???? 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 0 00000008 ?? 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. 0 00000009 ?? 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 0 00000000 ???????? mrLinear: resd 1 0 00000004 ???????? mrOffset: resd 1 0 00000008 ???? mrSegmentSelector: resw 1 0 0000000A ???? mrFlags: resw 1 0 0000000C ???????? 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 0 00000000 ???????? .size_: resd 1 0 00000004 ???? .srchdl: resw 1 0 00000006 ???????? .srcadr: resd 1 0 0000000A ???? .dsthdl: resw 1 0 0000000C ???????? .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 32 [list +] 33 34 %ifn _LINK 35 %ifndef _MAP 36 %elifempty _MAP 37 %else ; defined non-empty, str or non-str 38 [map all _MAP] 39 %endif 40 41 %if _ONLY386 42 cpu 386 43 %else 44 cpu 8086 45 %endif 46 47 %include "sections.mac" 48 49 50 ; This is used to refer to the program image parts 51 ; that are always to be placed at a fixed position 52 ; directly behind the PSP. (These never need to be 53 ; relocated in application mode, except if the /T 54 ; switch is used.) 55 %define DATAENTRYTABLESIZE (ldebug_data_entry_size + asmtable1_size + asmtable2_size) 58 59 ; The following are offsets from the PSP segment, 60 ; in application mode. They refer to the sources 61 ; of these section images in the program image. 62 ; Device driver and bootloaded mode early on will 63 ; set up ds so that ds:100h -> program image, 64 ; mimicking the application mode with a pseudo-PSP 65 ; segment address. 66 ; Device driver mode will relocate everything to end 67 ; up with device shim, pseudo MCB (16 bytes), PSP 68 ; (256 bytes), data/entry, asmtables, data/stack, 69 ; message. After that the auxbuff, history buffer, 70 ; code1, code2, environment, and ext segment can be 71 ; placed. Finally a single paragraph is reserved 72 ; for an SD container MCB. 73 ; For application mode, data/entry and asmtables 74 ; are not usually relocated. The original PSP is 75 ; used as is too. Behind the asmtables, the setup 76 ; is similar to device mode. The exception is that 77 ; the entire resident debugger, process and all, 78 ; can be relocated late in init, by using the /T 79 ; switch to init. 80 ; Boot loaded mode will relocate everything to end 81 ; up at the top of the LMA, including the "NDEB" 82 ; image identification paragraph (always on a KiB 83 ; boundary), the pseudo PSP, and then all the 84 ; resident sections. (To fill to a KiB-aligned 85 ; size, some padding may follow at the end.) 86 %define MESSAGESECTIONOFFSET (100h + DATAENTRYTABLESIZE) 87 %define CODESECTIONOFFSET (MESSAGESECTIONOFFSET + messagesegment_size) 88 %define INITSECTIONOFFSET (CODESECTIONOFFSET+ldebug_code_size+ldebug_code2_size) 89 90 ; These targets indicate where to place the code 91 ; code sections and auxbuff when boot loaded. 92 ; This uses full segments (not truncated). 93 %define BOOTCODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_size + datastack_size) 94 %define BOOTCODETARGET2 (BOOTCODETARGET1+auxbuff_size) 95 %define BOOTAUXTARGET1 (BOOTCODETARGET1+ldebug_code_size+ldebug_code2_size) 96 %define BOOTAUXTARGET2 BOOTCODETARGET1 97 %define BOOTAUXTARGET3 (BOOTAUXTARGET1+auxbuff_size) 98 99 %if _BOOTLDR_DISCARD || _BOOTLDR_DISCARD_HELP 100 ; If the message and/or code section is truncated 101 ; then non-boot-loaded modes have to calculate 102 ; their layouts with the truncated sizes. The 103 ; CODETARGET1 is based on MESSAGESECTIONOFFSET 104 ; because CODESECTIONOFFSET already implies the 105 ; use of the untruncated message segment. 106 %define CODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_truncated_size + datastack_size) 107 %define CODETARGET2 (CODETARGET1+auxbuff_size) 108 %define AUXTARGET1 (CODETARGET1+ldebug_code_bootldr_truncated_size+ldebug_code2_size) 109 %define AUXTARGET2 CODETARGET1 110 %define AUXTARGET3 (AUXTARGET1+auxbuff_size) 111 %else 112 ; If no section is truncated we can just directly 113 ; re-use the layouts, same as things were before 114 ; the sections were made to be truncated. 115 %xdefine CODETARGET1 BOOTCODETARGET1 116 %xdefine CODETARGET2 BOOTCODETARGET2 117 %xdefine AUXTARGET1 BOOTAUXTARGET1 118 %xdefine AUXTARGET2 BOOTAUXTARGET2 119 %xdefine AUXTARGET3 BOOTAUXTARGET3 120 %endif 121 122 ; This calculation allows for all the sections 123 ; that are stored in the program image (the 124 ; first term) plus the data/stack section, 125 ; auxbuff twice (twice for if layout 3 needed), 126 ; and the separate history segment. After init 127 ; is relocated this high, all destinations for 128 ; the to-be resident sections can be written to. 129 ; (Now also includes the environment block and 130 ; the ext code segment.) 131 ; This is based on the application PSP segment. 132 ; Update: This may be not large enough for the 133 ; aux and ext buffers if _INIT_MAX=0. In this 134 ; case, init may have to relocate itself a 135 ; second time later to make space for the full 136 ; buffers. 137 %define APPINITTARGET (INITSECTIONOFFSET + datastack_size + ext_data_nonboot_add_size + auxbuff_size + auxbuff_init_size + historysegment_size + app_env_size + extsegment_size) 144 ; The early stack goes behind the init target. 145 %define APPINITSTACK_START (APPINITTARGET+init_size) 146 APPINITSTACK_SIZE equ 512 ; must be even 147 ; This is the size of the application mode 148 ; process memory block required while still 149 ; using the init stack behind init target. 150 %define APPINITSTACK_END (APPINITSTACK_START+APPINITSTACK_SIZE) 151 152 BOOTINITSTACK_SIZE equ 512 ; must be divisible by 16 153 ; Similar to APPINITTARGET this calculates 154 ; the size needed for the maximum size resident 155 ; image once installed. The auxbuff size twice, 156 ; history segment, data/stack section, and the 157 ; INITSECTIONOFFSET are the same here. The final 158 ; +16 is for the NDEB image identification 159 ; paragraph. The KiB macros are to round up the 160 ; size to the next kibi byte boundary as we will 161 ; install by modifying the int 12h return value, 162 ; which has kibi byte granularity. 163 ; (Now also includes the environment block and 164 ; the ext code segment.) 165 %define BOOTDELTA (fromkib(kib(auxbuff_size * 2 + historysegment_boot_size + boot_env_size + extsegment_boot_size + datastack_size + INITSECTIONOFFSET + 16))) 171 172 %if _DEVICE 173 ; This is the size of the shim, the pseudo MCB, 174 ; as well as the process we will create. 175 %define DEVICEADJUST (deviceshim_size + 110h) 176 ; Like APPINITTARGET, except we need to add 177 ; in the device adjust for the additional things 178 ; to place before the resident image. 179 ; The final 10h is for the SD container MCB space 180 ; reserved at the end of our resident allocation. 181 ; Question: Is the PSP size included in the define 182 ; INITSECTIONOFFSET redundant with DEVICEADJUST? 183 ; Even if this is true it has very little negative 184 ; effects, we would simply need 256 more bytes 185 ; than would be required. 186 ; Answer: No, it isn't redundant. The first PSP size 187 ; is to translate from the entrypoint ds (where 188 ; ds:100h -> program image) to the device header. 189 ; The second PSP size is for the actual PSP that is 190 ; allocated eventually. 191 %define DEVICEINITTARGET (INITSECTIONOFFSET + DEVICEADJUST + datastack_size + ext_data_nonboot_add_size + auxbuff_size + auxbuff_init_size + historysegment_size + dev_env_size + extsegment_size + 10h) 200 ; The minus 100h is because the target calculates 201 ; from the pseudo PSP location on entry (cs - 10h). 202 ; To check the size we can subtract this term so as 203 ; to not use more than needed. 204 ; This adds the shim size as the shim exists in its 205 ; own section behind the init section. It will be 206 ; discarded at this spot after it was copied to the 207 ; resident position of the device header. 208 ; No temporary stack in or behind the init section is 209 ; used because the device installer provides a 210 ; perfectly valid stack for us to use. 211 %define DEVICEINITSIZE (DEVICEINITTARGET - 100h + init_size + deviceshim_size) 214 %endif ; _DEVICE 215 %endif ; _LINK 216 217 218 %if _LINK 219 global behind_progbits_dataentry, behind_messagesegment 220 global behind_deviceshim 221 usesection lDEBUG_DATA_ENTRY 221 ------------------ note: usesection lDEBUG_DATA_ENTRY 222 223 usesection lDEBUG_DATA_ENTRY 223 ------------------ note: usesection lDEBUG_DATA_ENTRY 224 225 usesection lDEBUG_DATA_ENTRY 225 ------------------ note: usesection lDEBUG_DATA_ENTRY 226 align 16, nop 227 usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 227 ------------------ note: usesection ASMTABLE1 228 align 16, nop 229 usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 229 ------------------ note: usesection ASMTABLE2 230 align 16, nop 231 usesection DATASTACKBASE === Switch to base=000000h -> "DATASTACKBASE" 231 ------------------ note: usesection DATASTACKBASE 232 align 16, nop 233 behind_progbits_dataentry: 234 usesection MESSAGESEGMENT === Switch to base=008120h -> "MESSAGESEGMENT" 234 ------------------ note: usesection MESSAGESEGMENT 235 align 16, nop 236 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 236 ------------------ note: usesection lDEBUG_CODE 237 align 16, nop 238 behind_messagesegment: 239 usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "LDEBUG_CODE2" 239 ------------------ note: usesection lDEBUG_CODE2 240 align 16, nop 241 behind_code: 242 usesection INIT === Switch to base=01D8E0h -> "INIT" 242 ------------------ note: usesection INIT 243 align 16, nop 244 behind_code2: 245 usesection WLEMITALIGNINITEND === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 245 ------------------ note: usesection WLEMITALIGNINITEND 246 behind_init: 247 usesection DEVICESHIM === Switch to base=020DF0h -> "DEVICESHIM" 247 ------------------ note: usesection DEVICESHIM 248 align 16, nop 249 usesection WLEMITALIGNRELOCZERO === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 249 ------------------ note: usesection WLEMITALIGNRELOCZERO 250 behind_deviceshim: 251 relocatedzero: 252 253 %include "patch.mac" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug patch area segment equates 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> %if _RUN2_ENTRY_SECTION 17 <1> patcharea_run.segment equ pspdbg 18 <1> %else 19 <1> patcharea_run.segment equ code_seg 20 <1> %endif 21 <1> patcharea_intrtn.segment equ pspdbg 22 <1> patcharea_pm_exc.segment equ pspdbg 254 255 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 255 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 00000000 00 times 256 db 0 257 ..start: 258 %endif 259 260 261 %if _DEVICE 262 ; The final resident copy of this device header 263 ; is relocated from the shim to in front of our 264 ; PSP. Therefore, this space after the PSP can 265 ; be re-used for the newly expanded N buffer. 266 ; (Refer to N_BUFFER_END.) 267 268 ; The device header is of a fixed format. 269 ; For our purposes, the 4-byte code for 270 ; each the strategy entry and the 271 ; interrupt entry is part of this format. 272 ; (DOS may read the attributes or entrypoint 273 ; offsets before calling either, so the 274 ; inicomp stage needs to recreate in its 275 ; entrypoints part exactly what we have here.) 276 %macro writedeviceheader 3 277 hiddenusesection %1 278 %2: 279 .next: 280 %ifidni %1, DEVICESHIM 281 dd -1 282 %else 283 fill 2, -1, jmp strict short j_zero_entrypoint 284 dw -1 285 %endif 286 .attributes: 287 dw 8800h ; character device, open/close supported 288 ; Setting bit 800h means that opening the device 289 ; will already cause a critical error. This 290 ; discourages opening the character device. 291 ; As we never use it we want to avoid opens. 292 .strategy: 293 dw .strategy_entry %3 ; -> strategy entry 294 .interrupt: 295 dw .interrupt_entry %3 ; -> interrupt entry 296 .name: 297 fill 8, 32, db "LDEBUG$$" ; character device name 298 .strategy_entry: 299 fill 4, 90h, jmp %2 %+ .device_entrypoint 300 .interrupt_entry: 301 fill 4, 90h, retf 302 %endmacro 303 304 writedeviceheader lDEBUG_DATA_ENTRY, device_header, - 100h 277 <1> hiddenusesection %1 277 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY 278 <1> %2: 279 <1> .next: 280 <1> %ifidni %1, DEVICESHIM 281 <1> dd -1 282 <1> %else 0 00000100 EB3E fill 2, -1, jmp strict short j_zero_entrypoint 0 00000102 FFFF dw -1 285 <1> %endif 286 <1> .attributes: 0 00000104 0088 dw 8800h 288 <1> 289 <1> 290 <1> 291 <1> 292 <1> .strategy: 0 00000106 [1200] dw .strategy_entry %3 294 <1> .interrupt: 0 00000108 [1600] dw .interrupt_entry %3 296 <1> .name: 0 0000010A 4C44454255472424 fill 8, 32, db "LDEBUG$$" 298 <1> .strategy_entry: 0 00000112 EB3690 fill 4, 90h, jmp %2 %+ .device_entrypoint 300 <1> .interrupt_entry: 0 00000116 CB90 fill 4, 90h, retf 305 .pass_lcfg: 0 0000011A 00000000 dd 0 ; (not used yet) 307 %else 308 jmp initcode_j 309 %endif 310 311 ; Startup codes can be discarded after one of 312 ; them is used to enter the initialisation part. 313 ; Therefore the N buffer is now extended past 314 ; these codes, refer to N_BUFFER_END. 315 %if _BOOTLDR 0 0000011E 00 align 32, db 0 317 %if !_LINK && ($ - $$) != 32 318 %error Wrong kernel iniload entrypoint 319 %endif 320 %if _LINK && ($ - $$) != 256 + 32 321 %error Wrong kernel iniload entrypoint 322 %endif 0 00000120 BB[0000] mov bx, boot_initcode 324 %endif 325 326 %if _BOOTLDR || _DEVICE 327 ; INP: cs:0 => program image 328 ; INIT:bx -> init entrypoint 329 device_boot_common_entrypoint: 0 00000123 8CC8 mov ax, cs 0 00000125 83E810 sub ax, 10h 0 00000128 8ED8 mov ds, ax ; => would-be PSP before program image 0 0000012A EB18 jmp @F 334 %endif 0 0000012C 00 align 64, db 0 336 %if !_LINK && ($ - $$) != 64 337 %error Wrong application entrypoint 338 %endif 339 %if _LINK && ($ - $$) != 256 + 64 340 %error Wrong application entrypoint 341 %endif 342 343 ; INP: cs = ds => PSP 344 j_zero_entrypoint: 345 initcode_j: 0 00000140 8CC8 mov ax, cs 0 00000142 31DB xor bx, bx 348 349 ; INP: ds:100h = ax:100h -> program image 350 ; INIT:bx -> init entrypoint 351 @@: 352 %if _LINK 0 00000144 05[0000] add ax, strict word relocatedzero + 0 354 wlcalc word_segrel_INIT, equ $ - 2 355 %else 356 add ax, paras(INITSECTIONOFFSET) 357 ; => original INIT section in program image 358 %endif 0 00000147 50 push ax 0 00000148 53 push bx 0 00000149 CB retf ; dispatch to INIT code 362 363 364 %if _DEVICE 365 ; INP: es:bx -> device request header 366 ; ss:sp -> a DOS stack, far return address to DOS 367 ; cs:0 -> our start image 368 ; OUT: bx = offset of init function in INIT segment 369 ; ss:sp -> bx, fl, ds, ax, far return address 370 device_header.device_entrypoint: 0 0000014A 26807F0200 cmp byte [es:bx + 2], 0 ; command code 0 (init) ? 0 0000014F 7414 je @F 373 0 00000151 26C747030001 mov word [es:bx + 3], 0100h ; no error, done 0 00000157 26807F020E cmp byte [es:bx + 2], 0Eh ; command code 0Eh (close) ? 0 0000015C 7406 je .retf ; yes, accept it --> 0 0000015E 26C747030381 mov word [es:bx + 3], 8103h ; error, done, code: unknown command 0 00000164 CB .retf: retf 379 380 @@: 0 00000165 50 push ax 0 00000166 1E push ds 0 00000167 9C pushf 0 00000168 53 push bx 0 00000169 BB[0000] mov bx, device_initcode 0 0000016C EBB5 jmp device_boot_common_entrypoint 387 388 389 writedeviceheader DEVICESHIM, shim_device_header, - 0 277 <1> hiddenusesection %1 === Switch to base=020DF0h -> "DEVICESHIM" 277 ------------------ <1> note: usesection DEVICESHIM 278 <1> %2: 279 <1> .next: 280 <1> %ifidni %1, DEVICESHIM 0 00000000 FFFFFFFF dd -1 282 <1> %else 283 <1> fill 2, -1, jmp strict short j_zero_entrypoint 284 <1> dw -1 285 <1> %endif 286 <1> .attributes: 0 00000004 0088 dw 8800h 288 <1> 289 <1> 290 <1> 291 <1> 292 <1> .strategy: 0 00000006 [1200] dw .strategy_entry %3 294 <1> .interrupt: 0 00000008 [1600] dw .interrupt_entry %3 296 <1> .name: 0 0000000A 4C44454255472424 fill 8, 32, db "LDEBUG$$" 298 <1> .strategy_entry: 0 00000012 EB0690 fill 4, 90h, jmp %2 %+ .device_entrypoint 300 <1> .interrupt_entry: 0 00000016 CB90 fill 4, 90h, retf 390 shim_device_header.device_entrypoint: 0 0000001A 26C747030001 mov word [es:bx + 3], 0100h ; no error, done 0 00000020 26807F020E cmp byte [es:bx + 2], 0Eh ; command code 0Eh (close) ? 0 00000025 7406 je .retf ; yes, accept it --> 0 00000027 26C747030381 mov word [es:bx + 3], 8103h ; error, done, code: unknown command 0 0000002D CB .retf: retf 396 0 0000002E 90 align 16 398 deviceshim_size equ $ - $$ 399 endarea deviceshim, 1 400 401 402 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 402 ------------------ note: usesection lDEBUG_DATA_ENTRY 403 %else 404 deviceshim_size equ 0 405 %endif 406 407 408 align 2, db 0 409 N_BUFFER_END equ $ ; end of N buffer (starts in PSP at 80h) 410 0 0000016E [0000][0000][0000] cmdlist: repeatdw aa,bb,cc,ddd,ee,ff,gg,hh,ii,error,kk,ll,mm,nn,oo 0 00000174 [0000][0000][0000] 0 0000017A [0000][0000][0000] 0 00000180 [7411][8808][0000] 0 00000186 [0000][6908][0000] 0 0000018C [0000][B50A][0000] repeatdw pp,qq,rr,sss,tt,uu,vv,ww,xx,yy 0 00000192 [0000][0000][0000] 0 00000198 [0000][0000][7411] 0 0000019E [0000] 413 %if _SYMBOLIC 414 dw zz 415 %endif 416 417 %if _LOADER 418 aa equ error 419 cc equ error 420 kk equ error 421 ll equ error 422 nn equ error 423 pp equ error 424 tt equ error 425 ww equ error 426 %endif 427 428 429 %ifn _LINK 430 %include "options.mac" 431 %endif 432 433 align 4, db 0 434 ; options, startoptions and internalflags 435 ; have to be consecutive 0 000001A0 00000000 options: dd DEFAULTOPTIONS ; run-time options 0 000001A4 10410080 options2: dd DEFAULTOPTIONS2 0 000001A8 0F000060 options3: dd DEFAULTOPTIONS3 0 000001AC 02000000 options4: dd DEFAULTOPTIONS4 0 000001B0 00000000 options5: dd 0 0 000001B4 00000100 options6: dd DEFAULTOPTIONS6 0 000001B8 00200000 options7: dd DEFAULTOPTIONS7 443 ; options, options2, options3, options4, options5, options6, options7 444 ; are each assumed to be dwords 445 ; and all consecutive in expr.asm isvariable? 446 0 000001BC 00000000 startoptions: dd DEFAULTOPTIONS ; options as determined during startup; read-only for user 0 000001C0 10410080 startoptions2: dd DEFAULTOPTIONS2 0 000001C4 0F000060 startoptions3: dd DEFAULTOPTIONS3 0 000001C8 02000000 startoptions4: dd DEFAULTOPTIONS4 0 000001CC 00000000 startoptions5: dd 0 0 000001D0 00000100 startoptions6: dd DEFAULTOPTIONS6 0 000001D4 00200000 startoptions7: dd DEFAULTOPTIONS7 454 ; startoptions, startoptions2, startoptions3, startoptions4, 455 ; startoptions5, startoptions6 456 ; are each assumed 457 ; to be dwords and all consecutive in expr.asm isvariable? 458 0 000001D8 F8308000 internalflags: dd attachedterm|pagedcommand|notstdinput|inputfile|notstdoutput|outputfile|debuggeeA20|debuggerA20 460 ; flags only modified by DEBUG itself 461 internalflags2: 462 %if _SYMBOLIC 463 dd dif2_sym_req_xms | dif2_sym_req_86mm 464 %else 0 000001DC 00000000 dd 0 466 %endif 0 000001E0 80040000 internalflags3: dd dif3_partition_changed | dif3_at_line_end 0 000001E4 00000000 internalflags4: dd 0 0 000001E8 00000000 internalflags5: dd 0 470 internalflags6: 471 %if _MCP 472 %assign DIF6MCP dif6_mcp 473 %else 474 %assign DIF6MCP 0 475 %endif 476 %if (_DEBUG && ! _DEBUG_COND) || _LOADER 477 dd DIF6MCP | dif6_debug_mode ; always indicate debuggable 478 %else 0 000001EC 00000000 dd DIF6MCP 480 %endif 0 000001F0 00000000 internalflags7: dd 0 482 ; internalflags, internalflags2, internalflags3, internalflags4, 483 ; internalflags5, internalflags6, internalflags7 484 ; are each assumed 485 ; to be dwords and all consecutive in expr.asm isvariable? 486 487 %if !_LOADER 0 000001F4 07F00000 asm_options: dd DEFAULTASMOPTIONS 489 asm_startoptions: 0 000001F8 07F00000 dd DEFAULTASMOPTIONS 491 0 000001FC 00000000 gg_first_cseip_linear: dd 0 0 00000200 00000000 gg_next_cseip_linear: dd 0 0 00000204 00000000 tpg_possible_breakpoint:dd 0 0 00000208 [0000] gg_deferred_message: dw msg.empty_message 496 bb_deferred_message_in_lineout_behind: 0 0000020A 0000 dw 0 498 align 4, db 0 0 0000020C 00 tpg_proceed_bp: times BPSIZE db 0 500 %if _DEBUG1 501 align 2, db 0 502 test_records_Readmem: times 6 * 16 db 0 503 test_records_Writemem: times 6 * 16 db 0 504 test_records_getLinear: times 6 * 16 db 0 505 test_records_getSegmented: times 6 * 16 db 0 506 507 test_readmem_value: db 0 508 %endif 0 00000212 00 pp_instruction: db 0 510 %if _RH 0 00000213 00 skip_rh: db 0 512 %endif 513 %if _RH || _SWHILEBUFFER || _RECMDWHILEBUFFER || _EXTENSIONS 0 00000214 00 in_re: db 0 515 %endif 0 00000215 00 align 4, db 0 0 00000218 00000000 pp_operand: dd 0 518 %if _PM && _DEBUG_PM_ENTRY 519 debug_pm_entry_total: dd 0 520 debug_pm_entry_esph: dd 0 521 debug_pm_entry_b: dd 0 522 %endif 523 %endif 524 %if _LOADER 525 currentposition: db 2 ; 0 = bottom, 1 = top, 2 = hidden 526 db 0 527 %endif 528 align 2, db 0 0 0000021C 0000 code_seg: dw 0 ; LOADER-relocate 530 %if _PM 531 code_sel: dw 0 532 %endif 533 %if _DUALCODE 534 code2_seg: dw 0 535 %if _PM 536 code2_sel: dw 0 537 %endif 538 %endif 539 %if _IMMASM 0 0000021E 0000 immseg: dw 0 541 %endif 542 %if _MESSAGESEGMENT 543 %if _ELDLINKINFO 0 00000220 [0000] linkinfoaddress:dw linkinfo 545 %endif 0 00000222 0000 messageseg: dw 0 ; LOADER-relocate 547 %if _PM 548 messagesel: dw 0 549 %endif 550 %endif 551 %if _EXTENSIONS 0 00000224 0000 extseg: dw 0 ; LOADER-relocate 553 %if _PM 554 extcssel: dw 0 555 %if extseg + 2 != extcssel 556 %error code_ret_to_ext expects extcssel after extseg 557 %endif 558 extdssel: dw 0 559 %else 560 extcssel equ extseg 561 extdssel equ extseg 562 %endif 563 %endif 564 %if _APP_ENV_SIZE || _DEV_ENV_SIZE || _BOOT_ENV_SIZE 0 00000226 0000 envseg: dw 0 ; (includes pseudo-MCB) ; LOADER-relocate 0 00000228 0000 env_size: dw 0 567 %endif 568 569 %if _LINK 0 0000022A [1050] entryseg_size: dw end_of_datastack 0 0000022C [0000] code_size: dw behind_code wrt lDEBUG_CODE ; may truncate 572 %if _DUALCODE 573 code2_size: dw behind_code2 wrt lDEBUG_CODE2 574 %endif 575 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 0000022E 0020 historyseg_size: dw historysegment_boot_size 577 %endif 578 %if _MESSAGESEGMENT 0 00000230 [0000] messageseg_size: dw behind_messagesegment_nobits wrt MESSAGESEGMENT 580 ; may truncate 581 %endif 582 %if _HELP_COMPRESSED && _BOOTLDR_DISCARD_HELP 583 indirect_hshrink_message_buffer: 584 dw nontruncated_hshrink_message_buffer 585 %endif 586 %else 587 entryseg_size: dw 100h + DATAENTRYTABLESIZE + datastack_size 588 code_size: dw ldebug_code_size ; may truncate 589 %if _DUALCODE 590 code2_size: dw ldebug_code2_size 591 %endif 592 %if _HISTORY_SEPARATE_FIXED && _HISTORY 593 historyseg_size: dw historysegment_boot_size 594 %endif 595 %if _MESSAGESEGMENT 596 messageseg_size: dw messagesegment_nobits_size ; may truncate 597 %endif 598 %if _HELP_COMPRESSED && _BOOTLDR_DISCARD_HELP 599 indirect_hshrink_message_buffer: 600 dw nontruncated_hshrink_message_buffer 601 %endif 602 %endif 603 604 %if _EXTENSIONS 0 00000232 0020 extseg_size: dw extsegment_size 0 00000234 0000 extseg_used: dw 0 0 00000236 [1010] extdata: dw ext_data_area 0 00000238 0040 extdata_size: dw ext_data_area.size 0 0000023A 0000 extdata_used: dw 0 0 0000023C 0000 ext_command_handler: dw 0 0 0000023E 0000 ext_preprocess_handler: dw 0 0 00000240 0000 ext_inject_handler: dw 0 613 %if !_LOADER 0 00000242 0000 ext_aa_before_getline_handler: dw 0 0 00000244 0000 ext_aa_inject_handler: dw 0 0 00000246 0000 ext_aa_after_getline_handler: dw 0 617 %endif 0 00000248 0000 ext_puts_handler: dw 0 0 0000024A 0000 ext_puts_copyoutput_handler: dw 0 620 %if _EXT_PUTS_GETLINE 0 0000024C 0000 ext_puts_getline_handler: dw 0 622 %endif 623 %if _CATCHINT2D 0 0000024E 0000 ext_amis_handler: dw 0 625 %endif 626 %if _EXT_PUTS_GETLINE 0 00000250 00 in_getinput: db 0 0 00000251 00 db 0 ; reserved, zeroed in cmd3 629 %endif 0 00000252 0000 pm_2_86m_0: dw 0 ; for fast, fl preserving dispatch 631 632 extcall_table: 633 .ret: 0 00000254 [E413] dw entry_ret_to_ext 635 %if _PM 636 dw 0 637 %endif 0 00000256 [6107] dw code_ret_to_ext 639 %if _PM 640 dw 0 641 %endif 642 %if _DUALCODE 643 dw code2_ret_to_ext 644 %if _PM 645 dw 0 646 %endif 647 %endif 648 649 .segsel: 0 00000258 [4E0C] dw pspdbg 651 %if _PM 652 dw cssel 653 %endif 0 0000025A [1C02] dw code_seg 655 %if _PM 656 dw code_sel 657 %endif 658 %if _DUALCODE 659 dw code2_seg 660 %if _PM 661 dw code2_sel 662 %endif 663 %endif 664 %endif 0 0000025C 0000 alloc_size: dw 0 0 0000025E 0000 alloc_seg: dw 0 ; LOADER-relocate 667 %if !_LOADER 0 00000260 0000 next_reserved_segment: dw 0 0 00000262 0000 alloc_size_not_reserved:dw 0 0 00000264 0000 reserved_address: dw 0 671 %endif 672 0 00000266 0D db 13 0 00000267 0D align 16, db 13 ; insure the cmdline_buffer is prefixed by CR 675 cmdline_buffer: 676 .size: equ _RC_BUFFER_SIZE 0 00000270 00 times .size db 0 678 .end: 0 00000370 [7002] .position: dw cmdline_buffer 680 681 %if !_LOADER 0 00000372 0D db 13 0 00000373 0D align 2, db 13 ; insure the re_buffer is prefixed by CR 684 re_buffer: 685 .size: equ _RE_BUFFER_SIZE 0 00000374 405200 fill .size,0,db "@R" 687 .end: 0 00000B74 [7403] .position: dw re_buffer 689 0 00000B76 00 align 4, db 0 0 00000B78 00000000 re_count: dd 0 0 00000B7C 00010000 re_limit: dd 256 693 %endif 694 align 4, db 0 0 00000B80 00000000 rc_count: dd 0 0 00000B84 00100000 rc_limit: dd 4096 697 698 align 2, db 0 0 00000B88 0000 cmd3_set_options: dw 0 700 %if _PM 701 auxbuff_switchbuffer_size: dw 0 702 %endif 0 00000B8A 00 auxbuff_segorsel:segonlyaddress ; LOADER-relocate 704 %if !_LOADER 705 auxbuff_behind_last_silent: 0 00000B8C 0000 dw 0 ; -> behind last silent buffer entry 707 %if _RH 708 auxbuff_start_silent: 0 00000B8E 0000 dw 0 710 auxbuff_amount_silent: 0 00000B90 0000 dw 0 712 %endif 713 %endif 714 auxbuff_current_size: 0 00000B92 1020 dw auxbuff_size 716 %if _ELDLINKINFO || _AUXBUFFSIZE != _AUXBUFFMAXSIZE 717 auxbuff_current_size_minus_24: 0 00000B94 F81F dw auxbuff_size - 24 719 %endif 720 721 %if !_LOADER 722 tt_silent_mode_number: 0 00000B96 0000 dw 0 ; if non-zero: maximum amount of dumps 724 ; displayed after T/TP/P while silent 725 %endif 726 %if _SYMBOLIC 727 created_psp: dw 0 728 created_size: dw 0 729 %endif 730 %if _CONFIG 0 00000B98 0000 yy_boot_attempt_open_stack: dw 0 0 00000B9A 0000 yy_boot_attempt_open_pathname: dw 0 733 %endif 734 735 %if _INPUT_FILE_HANDLES 0 00000B9C 90 align INPUTFILEHANDLE_size 737 input_file_handles: 0 00000BA0 FF times _INPUT_FILE_HANDLES * INPUTFILEHANDLE_size db -1 0 00000C20 0000 .active: dw 0 0 00000C22 0000 .to_close: dw 0 741 %endif 742 align 2, db 0 0 00000C24 0142 indos_remember_seek_function: dw 4201h 0 00000C26 FFFF indos_remember_seek_handle: dw -1 745 align 4, db 0 0 00000C28 00000000 indos_remember_seek_offset: dd 0 747 %if _INPUT_FILE_BOOT 748 align 4, db 0 0 00000C2C 00000000 boot_remember_seek_offset: dd 0 750 align 2, db 0 0 00000C30 FFFF boot_remember_seek_handle: dw -1 752 %endif 753 %if _EXTENSIONS 754 alignb 2 0 00000C32 FFFF ext_handle: dw -1 756 %endif 757 0 00000C34 00 charcounter: db 0 ; used by raw output to handle tab 0 00000C35 00 linecounter: db 0 ; used by paging in puts 0 00000C36 00 align 4, db 0 0 00000C38 [1010] savesp: dw stack_end ; saved stack pointer 0 00000C3A 0000 dw 0 ; 0 to set high word of esp 763 %if !_LOADER 0 00000C3C 0000 re_sp: dw 0 765 %endif 0 00000C3E [0000] errret: dw cmd3 ; return here if error 0 00000C40 [A211] throwret: dw errhandler ; return here if error - priority, no display 0 00000C42 [1010] throwsp: dw stack_end ; stack pointer set before jumping to throwret 0 00000C44 0000 run_sp: dw 0 ; stack pointer when running 0 00000C46 0000 dw 0 ; (zero for esph) 0 00000C48 0000 run_sp_reserve: dw 0 ; additional space to reserve between the 772 ; near return address of run and the run_sp 0 00000C4A 4000 spadjust: dw 40h ; adjust sp by this amount for save 774 %if _SYMBOLIC 775 stack_low_address: 776 dw str_buffer ; low end of stack, default = str_buffer 777 %endif 778 779 %if !_LOADER 0 00000C4C 0000 pspdbe: dw 0 ; debuggee's PSP (86M segment) 781 ; unless DIF&attachedterm or bootloaded 782 %endif 783 %ifn _MESSAGESEGMENT 784 %if _ELDLINKINFO 785 linkinfoaddress:dw linkinfo 786 %endif 787 %endif 0 00000C4E 0000 pspdbg: dw 0 ; debugger's PSP (86M segment) ; LOADER-relocate 789 790 %if _LINK 791 %ifn _PM 792 dssel equ pspdbg 793 %endif 794 %endif 795 796 %if !_LOADER 797 align 4, db 0 0 00000C50 0000000000000000 run2324: dd 0,0 ; debuggee's interrupt vectors 23h and 24h (both modes) 799 %if _PM 800 dd 0 801 dbg2324: dw i23pm, i24pm 802 %endif 803 %if _VDD 0 00000C58 FFFF hVdd: dw -1 ; NTVDM VDD handle 805 %endif 0 00000C5A 00 align 4, db 0 0 00000C5C 0000000000000000 sav2324: dd 0,0 ; debugger's interrupt vectors 23h and 24h (real-mode only) 0 00000C64 00 hakstat: db 0 ; whether we have hacked the vectors or not 809 %if _MS_0RANGE_COMPAT 0 00000C65 00 getrange_is_uu: db 0 811 %endif 0 00000C66 00 align 4, db 0 0 00000C68 00000000 psp22: dd 0 ; original terminate address from our PSP 0 00000C6C 0000 parent: dw 0 ; original parent process from our PSP (must follow psp22) 815 %if _MCB || _INT || _EXTENSIONS 0 00000C6E FFFF firstmcb: dw -1 ; start of MCB chain (always segment) 0 00000C70 FFFF firstumcb: dw -1 818 %endif 0 00000C72 00 pInDOS: segofs16address ; far16 address of InDOS flag (bimodal) 820 %if _USESDA 0 00000C76 FFFFFFFF pSDA: segofs16address minusone 822 ; far16 address of SDA (bimodal) 823 %endif 824 %endif 0 00000C7A 00 machine: db 0 ; type of processor for assembler and disassembler (1..6) 0 00000C7B 00 has_87: db 0 ; if there is a math coprocessor present 0 00000C7C 00 mach_87: db 0 ; type of coprocessor present 0 00000C7D 00 encodedmach87: db 0 ; C0 = no coproceasor, C = coprocessor present, 829 ; C2 = 287 present on a 386 830 %if _MMXSUPP 0 00000C7E 00 has_mmx: db 0 832 %endif 833 %if _VXCHG 834 %ifn _VXCHGBIOS 0 00000C7F 00 align 4, db 0 0 00000C80 00000000 xmsdrv: dd 0 ; XMM driver address, obtained thru int 2F, ax=4310h 837 xmsmove:istruc XMSM ; XMS block move struct, used to save/restore screens 0 00000C84 00 iend 839 %endif 840 align 2, db 0 0 00000C94 0000 csrpos: dw 0 ; cursor position of currently inactive screen 0 00000C96 00 vrows: db 0 ; current rows; to see if debuggee changed video mode 843 %endif 844 %if _ALTVID ; exchange some video BIOS data fields for option /2. 0 00000C97 0000 oldcsrpos: dw 0 ; cursor position 0 00000C99 0000 oldcrtp: dw 0 ; CRTC port 0 00000C9B 5000 oldcols: dw 80 ; columns 848 oldmr: ; label word 0 00000C9D 00 oldmode: db 0 ; video mode 0 00000C9E 18 oldrows: db 24 ; rows - 1 851 %endif 0 00000C9F 01 bInDbg: db 1 ; 1=debugger is running 0 00000CA0 0A notatty: db 10 ; if standard input is from a file 854 ; this is also used for a linebreak processing hack 0 00000CA1 00 vpage: db 0 ; video page the debugger is to use for BIOS output 856 %if _MCLOPT 857 master_pic_base:db _MCLOPT_DEFAULT 858 %endif 0 00000CA2 00 switchar: db 0 ; switch character 0 00000CA3 20 swch1: db ' ' ; switch character if it's a slash 861 align 2, db 0 862 dd_default_length: 0 00000CA4 8000 dw 80h 864 dd_default_lines: 0 00000CA6 0000 dw 0 866 %if !_LOADER 867 uu_default_length: 0 00000CA8 2000 dw 20h 869 uu_default_lines: 0 00000CAA 0000 dw 0 871 %endif 0 00000CAC 0000 promptlen: dw 0 ; length of prompt 0 00000CAE [1200] bufnext: dw line_in+2 ; address of next available character 0 00000CB0 [1200] bufend: dw line_in+2 ; address + 1 of last valid character 875 %if _EXTENSIONS 876 indirect_array_errfix: 0 00000CB2 0000 dw 0 ; -> errfix.eld's array, 0 if none installed 878 %endif 0 00000CB4 0000 rc: dw 0 0 00000CB6 0000 priorrc: dw 0 0 00000CB8 0000 erc: dw 0 882 %if _HISTORY 883 history: 884 %if _HISTORY_SEPARATE_FIXED 0 00000CBA 00 .segorsel: segonlyaddress ; LOADER-relocate 0 00000CBC FE1F .first: dw historysegment_boot_size - 2 0 00000CBE FE1F .last: dw historysegment_boot_size - 2 888 %else 889 .first: dw historybuffer.end - 2 890 .last: dw historybuffer.end - 2 891 %endif 892 %endif 893 894 var_addr_entries: 895 %if !_LOADER 0 00000CC0 00 a_addr: segmentedaddress; address for next A command 897 %endif 0 00000CC6 00 d_addr: segmentedaddress; address for next D command; must follow a_addr 899 %if !_LOADER 0 00000CCC 00 behind_r_u_addr:segmentedaddress; address behind R's disassembly 0 00000CD2 00 u_addr: segmentedaddress; address for next U command; must follow d_addr 902 %endif 0 00000CD8 00 e_addr: segmentedaddress; address for current/next E command 904 %if _DSTRINGS 0 00000CDE 00 dz_addr: segmentedaddress; address for next ASCIZ string 0 00000CE4 00 dcpm_addr: segmentedaddress; address for next $-terminated string 0 00000CEA 00 dcount_addr: segmentedaddress; address for next byte-counted string 0 00000CF0 00 dwcount_addr: segmentedaddress; address for next word-counted string 909 %endif 910 var_addr_entries.amount equ ($ - var_addr_entries) / SEGADR_size 911 %if _DX 912 x_addr: dd 0 ; (phys) address for next DX command 913 %endif 914 %if _DSTRINGS 0 00000CF6 00 dstringtype: db 0 ; FFh byte-counted, FEh word-counted, else terminator byte 0 00000CF7 00 align 2, db 0 0 00000CF8 [DE0C] dstringaddr: dw dz_addr ; -> address of last string 918 %endif 919 %if _INT 0 00000CFA 00 align 4, db 0 0 00000CFC 00000000 intaddress: dd 0 922 lastint_is_86m_and_mcb: 0 00000D00 0000 dw 0 0 00000D02 00 lastint: db 0 925 %endif 926 %if !_LOADER 0 00000D03 00 align 4, db 0 928 search_results: 929 %if _PM 930 times 6 * search_results_amount db 0 931 %else 0 00000D04 00 times 4 * search_results_amount db 0 933 %endif 934 align 4, db 0 0 00000D44 00000000 sscounter: dd 0 0 00000D48 00 eqflag: db 0 ; flag indicating presence of `=' operand 0 00000D49 00 align 2, db 0 0 00000D4A 000000000000 eqladdr: dw 0,0,0 ; address of `=' operand in G, P and T command 939 align 2, db 0 0 00000D50 0000 run_int: dw 0 ; interrupt type that stopped the running 941 %endif 0 00000D52 [4B05] lastcmd: dw dmycmd 943 %if _EXTENSIONS 944 lastcmd_transfer_ext_address: 0 00000D54 0000 dw 0 946 near_transfer_ext_address: 0 00000D56 0000 dw 0 948 %endif 949 %if !_LOADER 0 00000D58 00 fileext: db 0 ; file extension (0 if no file name) 951 %endif 952 0 00000D59 00 align 4, db 0 0 00000D5C 00000000 mmxbuff: dd 0 ; buffer with a (read-only) part of MMX register 955 ; for access from within expressions 956 %if _CATCHINT08 0 00000D60 0000 intr8_counter: dw 0 0 00000D62 5A00 intr8_limit: dw 18 * 5 ; ca 5 seconds 959 %endif 960 %if !_LOADER 0 00000D64 00 maxmachinetype: db 0 962 %endif 963 serial_rows: 0 00000D65 18 db 24 965 serial_columns: 0 00000D66 50 db 80 967 serial_keep_timeout: 0 00000D67 0F db 15 969 %if _USE_TX_FIFO 970 serial_fifo_size: 0 00000D68 10 db _BI_TX_FIFO_SIZE 972 ; size of built-in TX fifo (1 is as if no FIFO) 973 %endif 0 00000D69 00 serial_flags: db 0 ; flags in options.mac 975 0 00000D6A 0B serial_var_intnum: db _INTNUM 0 00000D6B 03 serial_var_params: db _UART_PARAMS 0 00000D6C 00 serial_var_fifo: db _UART_FIFO 0 00000D6D 00 align 2, db 0 0 00000D6E F802 serial_var_baseport: dw _UART_BASE 0 00000D70 0C00 serial_var_dl: dw _UART_RATE 0 00000D72 0800 serial_var_irqmask: dw _OFFMASK 983 0 00000D74 01 io_rows: db 1 0 00000D75 01 io_columns: db 1 986 align 2, db 0 987 %if _40COLUMNS 0 00000D76 0000 io_columns_getline: dw 0 ; byte variable zero-extended 989 %endif 0 00000D78 0000 io_start_buffer: dw 0 0 00000D7A 0000 io_end_buffer: dw 0 0 00000D7C FF00 io_levels: dw 255 0 00000D7E 0300 io_flags: dw DEFAULTIOFLAGS 994 iof_extra_iol_for_tpg_re: equ 1 995 iof_extra_iol_for_rc: equ 2 996 DEFAULTIOFLAGS equ iof_extra_iol_for_tpg_re | iof_extra_iol_for_rc 997 998 align 2, db 0 0 00000D80 0000 getline_timer_count: dw 0 0 00000D82 0000 getline_timer_last: dw 0 0 00000D84 [4B05] getline_timer_func: dw dmycmd 1002 1003 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1004 align 2, db 0 0 00000D86 0000 if_exists_then_address: dw 0 0 00000D88 0000 if_exists_si: dw 0 0 00000D8A 0000 if_exists_sp: dw 0 0 00000D8C 0000 if_exists_length: dw 0 1009 %endif 1010 1011 align 2, db 0 1012 terminator_in_line_in: 0 00000D8E 0000 .offset: dw 0 0 00000D90 00 .value: db 0 1015 1016 %if !_LOADER 0 00000D91 00 qqtermcode: db 0 1018 align 2, db 0 0 00000D92 0000 device_mcb_paragraphs: dw 0 0 00000D94 00000000 device_header_address: dd 0 1021 %endif 1022 1023 align 2, db 0 1024 inttab_optional: 1025 .: 1026 serial_installed_intnum: equ $ 0 00000D98 0001 dw 100h 0 00000D9A [0000] dw serial_interrupt_handler 0 00000D9C 0100 dw dif4_int_serial_hooked 1030 %if _LOADER 1031 dw 118h 1032 dw intr_loader_18 1033 dw dif4_int_18_hooked 1034 dw 119h 1035 dw intr_loader_19 1036 dw dif4_int_19_hooked 1037 %endif 1038 %if _PM 1039 dw 12Fh 1040 dw debug2F 1041 dw dif4_int_2F_hooked 1042 %endif 1043 %if _CATCHINT08 0 00000D9E 0801 dw 108h 0 00000DA0 [0000] dw intr8 0 00000DA2 0400 dw dif4_int_08_hooked 1047 %endif 1048 %if _CATCHINTFAULTCOND && _CATCHINT0D 0 00000DA4 0D01 dw 10Dh 0 00000DA6 [0000] dw intr0D 0 00000DA8 1000 dw dif4_int_0D_hooked 1052 %endif 1053 %if _CATCHINTFAULTCOND && _CATCHINT0C 0 00000DAA 0C01 dw 10Ch 0 00000DAC [0000] dw intr0C 0 00000DAE 2000 dw dif4_int_0C_hooked 1057 %endif 1058 .amount: equ ($ - .) / 6 0 00000DB0 0000 dw 0 1060 1061 1062 amisintr_offset: 0 00000DB2 [C00D] dw inttab 1064 1065 inttab_pre: 0 00000DB4 00 times 3 * inttab_optional.amount db 0 1067 1068 inttab: 1069 %if _CATCHINT00 0 00000DC0 00 db 0 0 00000DC1 [0000] dw intr0 ; table of interrupt initialization stuff 1072 %endif 1073 %if _CATCHINT01 0 00000DC3 01 db 1 0 00000DC4 [0000] dw intr1 1076 %endif 1077 %if _CATCHINT03 0 00000DC6 03 db 3 0 00000DC7 [0000] dw intr3 1080 %endif 1081 %if _CATCHINT07 1082 db 7 1083 dw intr7 1084 %endif 1085 %if ! _CATCHINTFAULTCOND && _CATCHINT0C 1086 db 0Ch 1087 dw intr0C 1088 %endif 1089 %if ! _CATCHINTFAULTCOND && _CATCHINT0D 1090 db 0Dh 1091 dw intr0D 1092 %endif 1093 %if _CATCHINT18 0 00000DC9 18 db 18h 0 00000DCA [0000] dw intr18 1096 %endif 1097 %if _CATCHINT19 0 00000DCC 19 db 19h 0 00000DCD [0000] dw intr19 1100 %endif 1101 %if _CATCHSYSREQ 1102 db _SYSREQINT 1103 dw intr_sysreq 1104 %endif 1105 %if _CATCHINT06 0 00000DCF 06 .i06: db 6 0 00000DD0 [0000] dw intr6 1108 %endif 1109 endarea inttab 1110 inttab_number equ inttab_size / 3 1111 %if _CATCHINT2D 0 00000DD2 2D .i2D: db 2Dh 0 00000DD3 [0000] dw int2D 1114 %endif 1115 1116 1117 intforcetab: 1118 %if _CATCHINT00 0 00000DD5 01 db opt4_int_00_force >> 24 1120 %endif 1121 %if _CATCHINT01 0 00000DD6 02 db opt4_int_01_force >> 24 1123 %endif 1124 %if _CATCHINT03 0 00000DD7 04 db opt4_int_03_force >> 24 1126 %endif 1127 %if _CATCHINT07 1128 db opt4_int_07_force >> 24 1129 %endif 1130 %if _CATCHINT0C 0 00000DD8 00 db opt4_int_0C_force >> 24 1132 %endif 1133 %if _CATCHINT0D 0 00000DD9 00 db opt4_int_0D_force >> 24 1135 %endif 1136 %if _CATCHINT18 0 00000DDA 10 db opt4_int_18_force >> 24 1138 %endif 1139 %if _CATCHINT19 0 00000DDB 20 db opt4_int_19_force >> 24 1141 %endif 1142 %if _CATCHSYSREQ 1143 %if _SYSREQINT == 09h 1144 db opt4_int_09_force >> 24 1145 %elif _SYSREQINT == 15h 1146 db opt4_int_15_force >> 24 1147 %else 1148 %error Unknown SysReq interrupt 1149 %endif 1150 %endif 1151 %if _CATCHINT06 0 00000DDC 08 db opt4_int_06_force >> 24 1153 %endif 1154 1155 %if _CATCHINT06 && _DETECT95LX 0 00000DDD 00 align 2, db 0 1157 inttab_number_variable: 0 00000DDE 0600 dw inttab_number 1159 %endif 1160 1161 1162 %if !_LOADER 1163 align 2, db 0 1164 ; Parameter block for EXEC call 1165 execblk: 0 00000DE0 0000 dw 0 ;(00) zero: copy the parent's environment 0 00000DE2 00000000 .cmdline: dw 0,0 ;(02) address of command tail to copy 0 00000DE6 5C000000 .fcb1: dw 5Ch,0 ;(06) address of first FCB to copy 0 00000DEA 6C000000 .fcb2: dw 6Ch,0 ;(10) address of second FCB to copy 0 00000DEE 00000000 .sssp: dw 0,0 ;(14) initial SS:SP 0 00000DF2 00000000 .csip: dw 0,0 ;(18) initial CS:IP 1172 %endif 1173 1174 1175 ; Register save area (32 words). 1176 ; must be DWORD aligned, used as stack 0 00000DF6 00 align 4, db 0 1178 regs: 0 00000DF8 00000000 reg_eax: dd 0 ;+00 eax 0 00000DFC 00000000 reg_ebx: dd 0 ;+04 ebx 0 00000E00 00000000 reg_ecx: dd 0 ;+08 ecx 0 00000E04 00000000 reg_edx: dd 0 ;+12 edx 0 00000E08 00000000 reg_esp: dd 0 ;+16 esp 0 00000E0C 00000000 reg_ebp: dd 0 ;+20 ebp 0 00000E10 00000000 reg_esi: dd 0 ;+24 esi 0 00000E14 00000000 reg_edi: dd 0 ;+28 edi 0 00000E18 00000000 reg_ds: dd 0 ;+32 ds (high word unused) 0 00000E1C 00000000 reg_es: dd 0 ;+36 es (high word unused) 0 00000E20 00000000 reg_ss: dd 0 ;+40 ss (high word unused) 0 00000E24 00000000 reg_cs: dd 0 ;+44 cs (high word unused) 0 00000E28 00000000 reg_fs: dd 0 ;+48 fs (high word unused) 0 00000E2C 00000000 reg_gs: dd 0 ;+52 gs (high word unused) 0 00000E30 00000000 reg_eip: dd 0 ;+56 eip 0 00000E34 00000000 reg_efl: dd 0 ;+60 efl(ags) 1195 regs.end: 1196 regs.size: equ regs.end - regs 1197 regs.size_w equ regs.size / 2 1198 1199 %if _REGSHIGHLIGHT 1200 regs_prior: 1201 .: 0 00000E38 00000000 times 16 dd 0 1203 .end: 1204 .size: equ .end - . 1205 .size_w equ .size / 2 1206 1207 %if .size != regs.size 1208 %error regs prior save area size mismatch 1209 %endif 1210 %endif 1211 1212 %if _DEVICE 1213 device_quittable_regs: 1214 .: 0 00000E78 00000000 times 16 dd 0 1216 .end: 1217 .size: equ .end - . 1218 .size_w equ .size / 2 1219 1220 %if .size != regs.size 1221 %error regs prior save area size mismatch 1222 %endif 1223 %endif 1224 1225 %if _VARIABLES 1226 vregs: 1227 .amount: equ 256 0 00000EB8 00000000 times .amount dd 0 ; internal v0..vff 1229 %if _LINK && VREGSAMOUNT != .amount 1230 %error Wrong amount of vregs 1231 %endif 1232 %endif 1233 1234 %if _BOOTLDR 1235 align 2, db 0 1236 boot_init_foundname: 0 000012B8 00 times 8+1+3+1 db 0 1238 %endif 1239 %if _EXECUTABLE 0 000012C5 00 align 2, db 0 1241 init_executable_pathname: 0 000012C6 00 times 128 db 0 0 00001346 [C612] .end: dw init_executable_pathname 1244 %endif 1245 1246 ; possible byte encoding of lDebug variables for dynamic computations: 1247 ; xxxxyyyy 1248 ; 10: register 1249 ; xx: size (0 = 1, 1 = 2, 2 = 4) 1250 ; yyyy: 0..15: register as stored in the register save area 1251 ; as SIL, DIL, BPL, SPL aren't supported these map to xH 1252 ; xSL, IPL and FLL are invalid, ExS are invalid 1253 ; 1011: variable 1254 ; yyyy: which variable. variables are always dword-sized 1255 ; 11000000: 32-bit compound, next byte stores: xxxxyyyy first, second 16-bit reg 1256 ; 11000001..11111111: available for encoding other compound regs, vars, indirection, 1257 ; symbols, types etc 1258 ; 0xxxxxxx: operators 1259 1260 1261 %if !_LOADER 1262 ; Instruction set information needed for the 'p' command. 1263 ; ppbytes and ppinfo needs to be consecutive. 0 00001348 6667262E363E6465F2 ppbytes:db 66h,67h,26h,2Eh,36h,3Eh,64h,65h,0F2h,0F3h,0F0h ; prefixes 0 00001351 F3F0 1265 PPLEN_ONLY_PREFIXES equ $-ppbytes 1266 .string: 0 00001353 ACADAAABA4A5 db 0ACh,0ADh,0AAh,0ABh,0A4h,0A5h ; lods,stos,movs 0 00001359 6C6D6E6F db 6Ch,6Dh,6Eh,6Fh ; ins,outs 0 0000135D A6A7AEAF db 0A6h,0A7h,0AEh,0AFh ; cmps,scas 1270 PPLEN_ONLY_STRING equ $-ppbytes 1271 .string_amount: equ $ - .string 0 00001361 CCCD db 0CCh,0CDh ; int instructions 0 00001363 E0E1E2 db 0E0h,0E1h,0E2h ; loop instructions 0 00001366 E8 db 0E8h ; call rel16/32 0 00001367 9A db 09Ah ; call far seg16:16/32 1276 ; (This last one is done explicitly by the code.) 1277 ; db 0FFh ; FF/2 or FF/3: indirect call 1278 1279 PPLEN equ $-ppbytes ; size of the above table 1280 1281 ; Info for the above, respectively. This MUST follow 1282 ; immediately after ppbytes, as we add + PPLEN - 1 to 1283 ; di after repne scasb to index into this (ppinfo). 1284 ; 80h = prefix; 82h = operand size prefix; 81h = address size prefix. 1285 ; If the high bit is not set, the next highest bit (40h) indicates 1286 ; that the instruction size depends on whether there is an operand 1287 ; size prefix; if set, under o32 two bytes are added to the size. 1288 ; (This is only used for direct near and far call.) 1289 ; If both the two highest bits are clear, then PP_STRDEST, 1290 ; PP_STRSRC, or PP_STRSRC2 may be set. This only happens for 1291 ; string instructions, which always are neither prefixes nor 1292 ; use additional bytes. 1293 ; The remaining bits tell the number of additional bytes in the 1294 ; instruction. This is at most 4. It must be below-or-equal to 1295 ; 7, or if PP_VARSIZ is used, 5 (so the sum stays below 8). 1296 1297 %if 0 ; moved to debug.mac 1298 PP_ADRSIZ equ 01h 1299 PP_OPSIZ equ 02h 1300 PP_PREFIX equ 80h 1301 PP_VARSIZ equ 40h 1302 PP_STRDEST equ 20h 1303 PP_STRSRC equ 10h 1304 PP_STRSRC2 equ 08h 1305 PP_SIZ_MASK equ 07h 1306 %endif 1307 0 00001368 8281 ppinfo: db PP_PREFIX | PP_OPSIZ, PP_PREFIX | PP_ADRSIZ 0 0000136A 80 times 9 db PP_PREFIX ; prefixes 0 00001373 1010 db PP_STRSRC, PP_STRSRC ; lods 0 00001375 2020 db PP_STRDEST, PP_STRDEST ; stos 0 00001377 3030 db PP_STRDEST | PP_STRSRC, PP_STRDEST | PP_STRSRC 1313 ; movs 0 00001379 2020 db PP_STRDEST, PP_STRDEST ; ins 0 0000137B 1010 db PP_STRSRC, PP_STRSRC ; outs 0 0000137D 1818 db PP_STRSRC2 | PP_STRSRC, PP_STRSRC2 | PP_STRSRC 1317 ; cmps 0 0000137F 0808 db PP_STRSRC2, PP_STRSRC2 ; scas 0 00001381 0001 db 0,1 ; int 0 00001383 010101 db 1,1,1 ; loop 0 00001386 42 db PP_VARSIZ | 2 ; call rel16/32 with displacement 0 00001387 44 db PP_VARSIZ | 4 ; call far 16:16 or 16:32 immediate 1323 1324 %if PPLEN != $-ppinfo 1325 %error "ppinfo table has wrong size" 1326 %endif 1327 1328 1329 %include "asmops.mac" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug assembler/disassembler table operands 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2026 E. C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> ; Equates for instruction operands. 19 <1> ; First the sizes. 20 <1> 21 <1> OP_ALL equ 40h ; byte/word/dword operand (could be 30h but ...) 22 <1> OP_1632 equ 50h ; word or dword operand 23 <1> OP_8 equ 60h ; byte operand 24 <1> OP_16 equ 70h ; word operand 25 <1> OP_32 equ 80h ; dword operand 26 <1> OP_64 equ 90h ; qword operand 27 <1> OP_1632_DEFAULT equ 0A0h ; word or dword or default opsize 28 <1> OP_1632_DEFAULT_ASM equ 0B0h; asm: word or dword or default opsize, 29 <1> ; disasm: word or dword 30 <1> 31 <1> OP_SIZE equ OP_ALL ; the lowest of these 32 <1> 33 <1> ; These operand types need to be combined with a size. 34 <1> ; Bits 0 to 3 give one of these types (maximum 15), 35 <1> ; and bits 4 to 7 specify the size. Table entries 36 <1> ; for these are identified by detecting that they 37 <1> ; are above-or-equal OP_SIZE. 38 <1> ; The first parameter to the opsizeditem macro is the 39 <1> ; name of the item. It has to match the names used in 40 <1> ; the instr.key and debugtbl.inc files. 41 <1> ; The second parameter is the entry for bittab that 42 <1> ; is used by aa.asm (the assembler). 43 <1> ; The third parameter is the suffix used to create the 44 <1> ; entry for asmjmp (prefix aop_) and disjmp2 (dop_). 45 <1> 46 <1> %macro opsizeditem 3.nolist 47 <1> %1 equ nextindex 48 <1> %xdefine BITTAB_OPSIZEDITEMS BITTAB_OPSIZEDITEMS,%2 49 <1> %xdefine ASMJMP_OPSIZEDITEMS ASMJMP_OPSIZEDITEMS,aop_%3 50 <1> %xdefine DISJMP2_OPSIZEDITEMS DISJMP2_OPSIZEDITEMS,dop_%3 51 <1> %assign nextindex nextindex + 1 52 <1> %endmacro 53 <1> %assign nextindex 0 54 <1> %define BITTAB_OPSIZEDITEMS "" 55 <1> %define ASMJMP_OPSIZEDITEMS "" 56 <1> %define DISJMP2_OPSIZEDITEMS "" 57 <1> opsizeditem OP_IMM, ARG_IMMED, imm ; immediate 58 <1> opsizeditem OP_IMM_NOT_EXTEND, ARG_IMMED, imm_not_extend ; immediate 59 <1> ; This one is for showing the WORD/DWORD size keyword if the 60 <1> ; value could fit into an imms8. 61 <1> opsizeditem OP_RM,ARG_DEREF+ARG_JUSTREG,rm ; reg/mem 62 <1> opsizeditem OP_M, ARG_DEREF, m ; mem (but not reg) 63 <1> opsizeditem OP_R_MOD, ARG_JUSTREG, r_mod ; register, determined from MOD R/M part 64 <1> opsizeditem OP_MOFFS, ARG_DEREF, moffs ; memory offset; e.g., [1234] 65 <1> opsizeditem OP_R, ARG_JUSTREG, r ; reg part of reg/mem byte 66 <1> opsizeditem OP_R_ADD, ARG_JUSTREG, r_add ; register, determined from instruction byte 67 <1> opsizeditem OP_AX, ARG_JUSTREG, ax ; al or ax or eax 68 <1> %if nextindex > 16 69 <1> %error Too many op sized items 70 <1> %endif 71 <1> 72 <1> ; These don't need a size. 73 <1> ; Because the size needs to be clear to indicate 74 <1> ; that one of these is to be used, the maximum 75 <1> ; value for these is 63 (as 64 is OP_SIZE). 76 <1> ; The minimum value for these is 1 because a 0 77 <1> ; without size means the end of an op list (OP_END). 78 <1> ; The first parameter to the opitem macro is the name 79 <1> ; of the item. It has to match the names used in the 80 <1> ; instr.key and debugtbl.inc files. 81 <1> ; The second parameter is the entry for bittab that 82 <1> ; is used by aa.asm (the assembler). The third 83 <1> ; parameter is the entry for asmjmp. 84 <1> ; The fourth parameter is the entry for optab as used 85 <1> ; by uu.asm (the disassembler). 86 <1> ; 87 <1> ; asm_siznum contains entries for OP_M64 to OP_MXX. 88 <1> ; (The order has to match their opitem order.) 89 <1> ; asm_regnum contains entries for OP_DX to OP_GS. 90 <1> ; (The order has to match their opitem order.) 91 <1> 92 <1> %macro opitem 4.nolist 93 <1> %1 equ nextindex 94 <1> %xdefine BITTAB_OPITEMS BITTAB_OPITEMS,%2 95 <1> %xdefine ASMJMP_OPITEMS ASMJMP_OPITEMS,%3 96 <1> %xdefine OPTAB_OPITEMS OPTAB_OPITEMS,%4 97 <1> %assign nextindex nextindex + 1 98 <1> %endmacro 99 <1> OP_END equ 0 100 <1> %assign nextindex 1 101 <1> %define BITTAB_OPITEMS "" 102 <1> %define ASMJMP_OPITEMS "" 103 <1> %define OPTAB_OPITEMS "" 104 <1> ; order of the following (ao17 entries) must match asm_siznum in aa.asm 105 <1> OP_FIRST_ASM_SIZNUM equ nextindex ; corresponding to asm_siznum start 106 <1> opitem OP_M64, ARG_DEREF, ao17,dop_m64 ; qword memory (obsolete?) 107 <1> opitem OP_MFLOAT, ARG_DEREF, ao17,dop_mfloat ; float memory 108 <1> opitem OP_MDOUBLE, ARG_DEREF, ao17,dop_mdouble; double-precision floating memory 109 <1> opitem OP_M80, ARG_DEREF, ao17,dop_m80 ; tbyte memory 110 <1> opitem OP_MXX, ARG_DEREF, ao17,dop_mxx ; memory (size unknown) 111 <1> opitem OP_FARIMM, ARG_FARADDR, ao21,dop_farimm ; far16/far32 immediate 112 <1> opitem OP_FAR_OFFSET, ARG_IMMED, aop_faroffset,da_internal_error ; far offset-only 113 <1> opitem OP_REL8, ARG_IMMED, ao23,dop_rel8 ; byte address relative to IP 114 <1> opitem OP_REL1632, ARG_IMMED, ao25,dop_rel1632; word or dword address relative to IP 115 <1> opitem OP_1CHK, ARG_WEIRDREG, ao29,dop49 ; check for ST(1) 116 <1> opitem OP_STI, ARG_WEIRDREG, aop_sti,dop_sti ; ST(I) 117 <1> opitem OP_CR, ARG_WEIRDREG, aop_cr,dop_cr ; CRx 118 <1> opitem OP_DR, ARG_WEIRDREG, ao34,dop_dr ; DRx 119 <1> opitem OP_TR, ARG_WEIRDREG, ao35,dop_tr ; TRx 120 <1> opitem OP_SEGREG, ARG_WEIRDREG, ao39,dop_segreg ; segment register 121 <1> opitem OP_IMMS8, ARG_IMMED, ao41,dop_imms8 ; sign extended immediate byte 122 <1> opitem OP_IMMS8_EXTEND, ARG_IMMED, ao41_extend,dop_imms8 ; add etc word/dword r/m, imms8 123 <1> opitem OP_IMM8, ARG_IMMED, ao42,dop_imm8 ; immediate byte (other args may be (d)word) 124 <1> opitem OP_IMM8_OPTIONAL,ARG_IMMED, ao42,dop_imm8_optional 125 <1> opitem OP_IMM8_INT, ARG_IMMED, ao42,dop_imm8_int ; immediate byte for int 126 <1> opitem OP_IMM8_SHIFTROT,ARG_IMMED, ao42,dop_imm8_shiftrot ; immediate byte for shift/rotate 127 <1> opitem OP_MMX, ARG_WEIRDREG, aop_mmx,dop_mmx ; MMx 128 <1> opitem OP_MMX_MOD, ARG_WEIRDREG, aop_mmx_mod,dop_mmx_mod ; MMx, but in ModR/M part 129 <1> opitem OP_X, 0FFh, ao_x, dop_x ; OPX byte follows 130 <1> opitem OP_SHOSIZ, 0FFh, ao44, dop_shosiz ; set flag to always show the size 131 <1> opitem OP_ASM_MOVX, 0FFh, ao_movx,dop60a ; enforce next operand size to be specified 132 <1> opitem OP_SHORT, 0FFh, ao_short,dop_short ; allow short keyword 133 <1> opitem OP_NEAR, 0FFh, ao_near,dop_near ; allow near keyword 134 <1> opitem OP_FAR, 0FFh, ao_far, dop_far ; allow far keyword 135 <1> opitem OP_FAR_REQUIRED, 0FFh, ao_far_required,dop_far_required ; require far keyword 136 <1> opitem OP_FAR_M, 0FFh, ao_modifier_continue,dop_far_m ; les, lds, lss, lfs, lgs, or jmp/call far mem 137 <1> opitem OP_DOUBLE_M, 0FFh, ao_modifier_continue,dop_double_m ; bound 138 <1> opitem OP_M_SRC, 0FFh, ao_modifier_continue,dop_m_src 139 <1> opitem OP_M_DST, 0FFh, ao_modifier_continue,dop_m_dst 140 <1> opitem OP_M_SRC_DST, 0FFh, ao_modifier_continue,dop_m_src_dst 141 <1> opitem OP_STACK_PUSH, 0FFh, ac09_internal_error,dop_stack_push 142 <1> opitem OP_STACK_POP, 0FFh, ac09_internal_error,dop_stack_pop 143 <1> opitem OP_STACK_SPECIAL,0FFh, ac09_internal_error,dop_stack_special 144 <1> opitem OP_M_ALWAYS_16, 0FFh, ao_m_always_16,dop_m_always_16 145 <1> opitem OP_E_CX, ARG_JUSTREG, aop_e_cx, da_e_cx ; (E)CX 146 <1> OP_FIRST_STRING equ nextindex 147 <1> opitem OP_1, ARG_IMMED, ao46, "1" ; 1 (simple "string" ops from here on) 148 <1> opitem OP_3, ARG_IMMED, ao47, "3" ; 3 149 <1> ; order of the following (ao48 entries) must match asm_regnum in aa.asm 150 <1> OP_FIRST_ASM_REGNUM equ nextindex ; corresponding to asm_regnum start 151 <1> opitem OP_DX, ARG_JUSTREG, ao48, "DX" ; DX 152 <1> opitem OP_CL, ARG_JUSTREG, ao48, "CL" ; CL 153 <1> opitem OP_ST, ARG_WEIRDREG, ao48, "ST" ; ST (top of coprocessor stack) 154 <1> opitem OP_CS, ARG_WEIRDREG, ao48, "CS" ; CS 155 <1> opitem OP_DS, ARG_WEIRDREG, ao48, "DS" ; DS 156 <1> opitem OP_ES, ARG_WEIRDREG, ao48, "ES" ; ES 157 <1> opitem OP_FS, ARG_WEIRDREG, ao48, "FS" ; FS 158 <1> opitem OP_GS, ARG_WEIRDREG, ao48, "GS" ; GS 159 <1> opitem OP_SS, ARG_WEIRDREG, ao48, "SS" ; SS 160 <1> OP_AFTER_LAST equ nextindex 161 <1> %if nextindex > OP_SIZE 162 <1> %error Too many op items 163 <1> %endif 164 <1> OP_AMOUNT_TABLE equ nextindex + 16 - 1 165 <1> ; nextindex: amount sizeless types 166 <1> ; 16: OP_SIZE combined types 167 <1> ; -1: OP_END does not occur in tables 168 <1> 169 <1> ; The following are extensions to sizeless OP_ items. 170 <1> ; After an OP_X operand, a byte giving an index into 171 <1> ; the OPX tables follows in the list. This is never 172 <1> ; used with a size so we can make use of the full 173 <1> ; eight bits. First macro parameter is the name which 174 <1> ; matches the use in instr.key. Second parameter is 175 <1> ; the routine in the assembler to dispatch to. Third 176 <1> ; parameter is the routine in the disassembler. 177 <1> ; Only used for some disassembler extensions for now. 178 <1> 179 <1> %macro opxitem 3.nolist 180 <1> %1 equ nextindex 181 <1> %xdefine ASMJMP_OPXITEMS ASMJMP_OPXITEMS,%2 182 <1> %xdefine DISJMP_OPXITEMS DISJMP_OPXITEMS,%3 183 <1> %assign nextindex nextindex + 1 184 <1> %endmacro 185 <1> %assign nextindex 0 186 <1> %define ASMJMP_OPXITEMS "" 187 <1> %define DISJMP_OPXITEMS "" 188 <1> opxitem OPX_NOTHING, ao_modifier_continue, dop60a 189 <1> opxitem OPX_MOD_IF_REG, ao_modifier_continue, dop_mod_if_reg 190 <1> opxitem OPX_MOD_IF_MEMOFFS_AND_OTHER_REG_AL_AX_EAX, ao_modifier_continue, dop_mod_if_memoffs_and_other_acc 192 <1> opxitem OPX_MOD_IF_OTHER_REG_AX_EAX, ao_modifier_continue, dop_mod_if_other_acc_1632 194 <1> opxitem OPX_MOD_IF_REG_1632, ao_modifier_continue, dop_mod_if_reg_1632 196 <1> opxitem OPX_MOD_IF_REG_AL_AX_EAX, ao_modifier_continue, dop_mod_if_reg_acc 198 <1> opxitem OPX_MOD_IF_REG_AX_EAX, ao_modifier_continue, dop_mod_if_reg_acc_1632 200 <1> opxitem OPX_MODALWAYS_IF_REG, ao_modifier_continue, dop_modalways_if_reg 202 <1> opxitem OPX_LOOP_OPTION, ac09_internal_error, dop_loop_option 203 <1> opxitem OPX_MOD_FORCE_3, ao_modifier_continue, dop_mod_force_3 204 <1> %if nextindex > 256 205 <1> %error Too many opx items 206 <1> %endif 1330 1331 1332 ; Instructions that have an implicit operand subject to a segment prefix. 1333 ; This means a prefixed segment is allowed by the strict assembler, and 1334 ; the disassembler treats a segment prefix as part of the instruction and 1335 ; displays it in front of the instruction's mnemonic. 1336 ; (outs, movs, cmps, lods, xlat). 1337 segprfxtab: 0 00001388 6E6FA4A5A6A7ACAD db 06Eh,06Fh,0A4h,0A5h,0A6h,0A7h,0ACh,0ADh 1339 a32prfxtab: 0 00001390 D7 db 0D7h ; xlat, last in segprfxtab, first in a32prfxtab 1341 SEGP_LEN equ $-segprfxtab 1342 1343 ; Instructions that can be used with REPE/REPNE. 1344 ; (ins, outs, movs, stos, lods; cmps, scas) 0 00001391 6C6EA4AAAC replist:db 06Ch,06Eh,0A4h,0AAh,0ACh ; REP (no difference) 1346 REP_SAME_LEN equ $-replist ; number of indifferent replist entries 0 00001396 A6AE db 0A6h,0AEh ; REPE/REPNE 1348 REP_LEN equ $-replist 1349 REP_DIFF_LEN equ REP_LEN-REP_SAME_LEN ; number of replist entries with difference 1350 1351 A32P_LEN equ $-a32prfxtab 1352 1353 ; prfxtab P_LEN REP_LEN REPE_REPNE_LEN 1354 1355 ; All the instructions in replist also have an implicit operand 1356 ; subject to ASIZE (similar to segprfxtab). Additionally, the 1357 ; xlat instruction (0D7h) has such an implicit operand too. 1358 ; maskmovq too. 1359 1360 align 2, db 0 1361 o32prfxtab: 0 00001398 0E001E0006001600 dw 0Eh, 1Eh, 06h, 16h, SPARSE_BASE + 0A0h, SPARSE_BASE + 0A8h 0 000013A0 [A000][A800] 1363 ; push cs, push ds, push es, push ss, push fs, push gs 0 000013A4 1F0007001700[A100] dw 1Fh, 07h, 17h, SPARSE_BASE + 0A1h, SPARSE_BASE + 0A9h 0 000013AC [A900] 1365 ; pop ds, pop es, pop ss, pop fs, pop gs 1366 O32P_AMOUNT equ ($ - o32prfxtab) / 2 1367 1368 %ifn _LINK 1369 %include "asmtabs.asm" 1370 %endif 1371 %endif 1372 1373 1374 %ifn _LINK || _LINK_COMPAT 1375 usesection lDEBUG_DATA_ENTRY 1376 1377 msg_start: 1378 %include "msg.asm" 1379 1380 msg_end: 1381 1382 numdef SHOWMSGSIZE, _DEFAULTSHOWSIZE 1383 %if _SHOWMSGSIZE 1384 %assign MSGSIZE msg_end - msg_start 1385 %warning msg holds MSGSIZE bytes 1386 %endif 1387 %endif 1388 1389 1390 usesection lDEBUG_DATA_ENTRY 1390 ------------------ note: usesection lDEBUG_DATA_ENTRY 1391 1392 ..@symhint_trace_caller_entry_to_code_segsel: 1393 entry_to_code_segsel: 1394 %if _PM 1395 push di 1396 mov di, word [cs:pm_2_86m_0] 1397 jmp near word [cs:.table + di] 1398 1399 ; REM: Dispatch table in section lDEBUG_DATA_ENTRY 1400 align 2 1401 .table: 1402 dw .86m 1403 dw .pm 1404 1405 .pm: 1406 pop di 1407 ..@symhint_trace_caller_entry_to_code_sel: 1408 entry_to_code_sel: equ $ 1409 push ax 1410 mov ax, word [cs:code_sel] 1411 jmp entry_to_code_common 1412 1413 .86m: 1414 pop di 1415 %endif 1416 1417 ; INP: word [cs:ip] = near address to jump to in other segment 1418 ..@symhint_trace_caller_entry_to_code_seg: 1419 entry_to_code_seg: 0 000013AE 50 push ax ; word space for ?jumpaddress_ip, is ax 0 000013AF 2EA1[1C02] mov ax, word [cs:code_seg] 1422 1423 entry_to_code_common: 1424 lframe 0 1425 lpar word, jumpaddress_cs_and_orig_ip 1426 lpar word, jumpaddress_ip 0 000013B3 5589E5 lenter 1428 0 000013B6 56 push si 0 000013B7 9C pushf 0 000013B8 FC cld 1432 0 000013B9 874604 xchg word [bp + ?jumpaddress_cs_and_orig_ip], ax ; fill function segment 0 000013BC 89C6 mov si, ax 0 000013BE 2EAD cs lodsw 1436 %if _DEBUG && !(_LINK || _LINK_COMPAT) 1437 cmp al, 0CCh ; debugger breakpoint ? 1438 jne @F ; no --> 1439 int3 ; break to make it remove the breakpoint 1440 dec si 1441 dec si 1442 cs lodsw ; reload the word 1443 cmp al, 0CCh 1444 jne @F 1445 1446 .l: 1447 int3 1448 jmp .l 1449 1450 @@: 1451 %endif 0 000013C0 874602 xchg word [bp + ?jumpaddress_ip], ax ; fill function offset 1453 ; (and restore ax) 1454 0 000013C3 9D popf 0 000013C4 5E pop si 1457 0 000013C5 5D lleave 0 000013C6 CB retf ; jump to dword [bp + ?jumpaddress] 1460 1461 1462 %if !_LOADER 1463 ; debug22 - Interrupt 22h handler 1464 ; 1465 ; This is for DEBUG itself: it's a catch-all for the various Int23 1466 ; and Int24 calls that may occur unpredictably at any time. What we 1467 ; do is pretend to be a command interpreter (which we are, in a sense, 1468 ; just with different sort of commands) by setting our parent PSP 1469 ; value equal to our own PSP so that DOS does not free our memory when 1470 ; we quit. Therefore control ends up here when DOS detects Control-C 1471 ; or an Abort in the critical error prompt is selected. 1472 debug22: 0 000013C7 FA cli 1474 .cleartraceflag: 0 000013C8 FC cld ; reestablish things 0 000013C9 8CC8 mov ax, cs 0 000013CB 8ED8 mov ds, ax 0 000013CD 8ED0 mov ss, ax 0 000013CF 8B26[380C] mov sp, word [ savesp ] ; restore stack 1480 %if _PM 1481 mov byte [pm_2_86m_0], 0 1482 clropt [internalflags], protectedmode ; reset PM flag 1483 %endif 1484 times 1 - (($ - $$) & 1) nop ; align in-code parameter 0 000013D3 E8D8FF call entry_to_code_seg 0 000013D6 [D004] dw cmd2_reset_re_maybe_pm 1487 %endif 1488 1489 1490 %if _DUALCODE 1491 usesection lDEBUG_CODE2 1492 %if $ - $$ 1493 %error cmd3_mirror is not at offset 0 in lDEBUG_CODE2 1494 %endif 1495 cmd3_mirror: 1496 db 0B9h ; mov cx, imm16 (cx = nonzero) 1497 xor cx, cx ; cx = 0 1498 dualcall cmd3.have_cx_convenience 1499 %endif 1500 1501 1502 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 1502 ------------------ note: usesection lDEBUG_CODE 1503 %if $ - $$ 1504 %error cmd3 is not at offset 0 in lDEBUG_CODE 1505 %endif 1506 1507 code_insure_low_byte_not_0CCh 1508 ; Begin main command loop. 1509 cmd3: section_of_function 1510 ; A convenience entrypoint: Entering 1511 ; cmd3 at offset 1 instead of 0 will 1512 ; make the debugger additionally 1513 ; display a linebreak early on. 0 00000000 B9 db 0B9h ; mov cx, imm16 (cx = nonzero) 0 00000001 31C9 xor cx, cx ; cx = 0 1516 .have_cx_convenience: 1517 0 00000003 16 push ss 0 00000004 1F pop ds 0 00000005 66 _386_o32 ; mov esp 0 00000006 8B26[380C] mov sp, word [ savesp ] ; restore stack 0 0000000A 83E4FC _386 and sp, ~3 ; align stack 0 0000000D 66 _386_o32 0 0000000E 31C0 xor ax, ax 0 00000010 66 _386_o32 0 00000011 50 push ax 0 00000012 66 _386_o32 0 00000013 9D popf 0 00000014 8B26[380C] _386 mov sp, word [ savesp ] ; restore stack 0 00000018 FC cld 0 00000019 FB sti 0 0000001A C706[3E0C][0000] mov word [ errret ], cmd3 0 00000020 C706[400C][A211] mov word [ throwret ], errhandler 0 00000026 8926[420C] mov word [ throwsp ], sp 1535 %if _SYMBOLIC 1536 mov word [ stack_low_address ], str_buffer 1537 %endif 0 0000002A 31C0 xor ax, ax 1539 %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 0000002C A3[5002] mov word [in_getinput], ax ; set this byte and reserved next byte 1541 %endif 0 0000002F 8706[880B] xchg ax, word [cmd3_set_options] 0 00000033 0906[A001] or word [options], ax 1544 0 00000037 1E push ds 0 00000038 07 pop es 0 00000039 E302 jcxz @F 0 0000003B EB06 jmp @FF 1549 @@: 0 0000003D BA[0000] mov dx, crlf 0 00000040 E8[0000] call putsz 1552 @@: 1553 1554 %if _SYMBOLIC 1555 clropt [internalflags2], dif2_xms_detection_done 1556 nearcall zz_save_strat 1557 %endif 1558 0 00000043 31FF xor di, di 0 00000045 873E[8E0D] xchg di, word [terminator_in_line_in.offset] 0 00000049 85FF test di, di 0 0000004B 7409 jz @F 0 0000004D 803D00 cmp byte [di], 0 0 00000050 7504 jne @F 0 00000052 A0[900D] mov al, byte [terminator_in_line_in.value] 0 00000055 AA stosb 1567 @@: 1568 0 00000056 8326[480C]00 and word [run_sp_reserve], 0 1570 %if !_LOADER 1571 %if _RH || _SWHILEBUFFER || _RECMDWHILEBUFFER || _EXTENSIONS 0 0000005B D006[1402] rol byte [in_re], 1 0 0000005F 7205 jc @F 0 00000061 8026[DB01]FB clropt [internalflags], tt_while 1575 @@: 1576 %endif 1577 %endif 1578 %if _RH 0 00000066 8026[EE01]EF clropt [internalflags6], dif6_rh_mode 0 0000006B C606[1302]00 mov byte [skip_rh], 0 1581 %endif 1582 %if _IMMASM 0 00000070 8026[EF01]FC clropt [internalflags6], dif6_immasm_no_output | dif6_immasm 1584 %endif 0 00000075 8026[E101]DF clropt [internalflags3], dif3_unquiet_error 1586 %if _REGSHIGHLIGHT 0 0000007A 8026[E201]FD clropt [internalflags3], dif3_do_not_highlight 1588 %endif 1589 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 0000007F 8026[E301]E7 clropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_in_if 1591 %else 1592 clropt [internalflags3], dif3_auxbuff_guarded_1 1593 %endif 0 00000084 8026[E001]CF clropt [internalflags3], dif3_input_serial_override | dif3_input_terminal_override 0 00000089 8026[DF01]EF clropt [internalflags2], dif2_in_silence_dump 1597 %if _PM 1598 %if _DEBUG 1599 clropt [internalflags6], dif6_in_hook2F | dif6_in_amis_hook2F 1600 %else 1601 clropt [internalflags6], dif6_in_amis_hook2F 1602 %endif 1603 call resetmode 1604 %endif 1605 1606 %ifn _VXCHG 1607 mov ah, 0Fh 1608 int 10h 1609 mov byte [vpage], bh ; update page 1610 %endif 1611 1612 %if _TEST_HELP_FILE 1613 cmd3_close_handle: 1614 call InDOS 1615 jnz @F 1616 mov ah, 3Eh 1617 mov bx, -1 1618 xchg bx, [handle] 1619 cmp bx, -1 1620 je @F 1621 doscall 1622 @@: 1623 %endif 1624 1625 %if _EXTENSIONS 1626 cmd3_close_ext: 0 0000008E E8[0000] call close_ext 1628 %endif 1629 1630 %if _RH 1631 cmd3_rh_init: 0 00000091 F606[B601]10 testopt [options6], opt6_rh_mode 0 00000096 7419 jz .check_disable 1634 .check_enable: 0 00000098 F606[EE01]08 testopt [internalflags6], dif6_rh_mode_was 0 0000009D 7529 jnz .done 1637 .enable: 1638 ; guarded_1 is always reset by cmd3 1639 ; guarded_2 is only set by RE indicating silent mode 1640 ; so we never want to not enable RH mode 0 0000009F 800E[E301]40 setopt [internalflags3], dif3_auxbuff_guarded_3 0 000000A4 800E[EE01]08 setopt [internalflags6], dif6_rh_mode_was 1643 0 000000A9 E8[0000] call tpg_initialise_empty_auxbuff.reset 1645 0 000000AC BA[0000] mov dx, msg.rh_enabled 0 000000AF EB14 jmp .done_putsz 1648 1649 .check_disable: 0 000000B1 F606[EE01]08 testopt [internalflags6], dif6_rh_mode_was 0 000000B6 7410 jz .done 1652 .disable: 0 000000B8 8026[E301]BF clropt [internalflags3], dif3_auxbuff_guarded_3 0 000000BD 8026[EE01]F7 clropt [internalflags6], dif6_rh_mode_was 0 000000C2 BA[0000] mov dx, msg.rh_disabled 1656 1657 .done_putsz: 0 000000C5 E8[0000] call putsz 1659 .done: 1660 %endif 1661 1662 %if _DEBUG && _DEBUG_COND 1663 cmd3_debug_mode_init: 1664 testopt [options6], opt6_debug_mode 1665 jz .check_disable 1666 .check_enable: 1667 testopt [internalflags6], dif6_debug_mode 1668 jnz .done 1669 call reset_interrupts 1670 setopt [internalflags6], dif6_debug_mode 1671 jmp .done 1672 1673 .check_disable: 1674 testopt [internalflags6], dif6_debug_mode 1675 jz .done 1676 call set_interrupts 1677 clropt [internalflags6], dif6_debug_mode 1678 .done: 1679 %endif 1680 1681 1682 %if _PM 1683 cmd3_int2F_init: 1684 mov al, 2Fh ; interrupt number 1685 mov si, debug2F ; -> IISP entry header 1686 1687 testopt [options4], opt4_int_2F_hook 1688 jnz .done 1689 .check_disable: 1690 mov dx, opt4_int_2F_force >> 16 1691 %if (opt4_int_2F_force >> 16) == dif4_int_2F_hooked 1692 call cmd3_int_disable.set_bx_to_dx 1693 %else 1694 mov bx, dif4_int_2F_hooked 1695 call cmd3_int_disable 1696 %endif 1697 jc .done 1698 clropt [internalflags], hooked2F 1699 1700 .done: 1701 %endif 1702 1703 1704 %if _CATCHINTFAULTCOND && _CATCHINT0D 1705 cmd3_int0D_init: 0 000000C8 B00D mov al, 0Dh ; interrupt number 0 000000CA BE[0000] mov si, intr0D ; -> IISP entry header 0 000000CD BA1000 mov dx, opt4_int_0D_force >> 16 1709 %if (opt4_int_0D_force >> 16) == dif4_int_0D_hooked 0 000000D0 89D3 mov bx, dx 1711 %else 1712 mov bx, dif4_int_0D_hooked 1713 %endif 1714 0 000000D2 F606[AC01]10 testopt [options4], opt4_int_fault_hook 0 000000D7 7405 jz .check_disable 1717 .check_enable: 0 000000D9 E8B905 call cmd3_int_enable 0 000000DC EB03 jmp .done 1720 1721 .check_disable: 0 000000DE E8C905 call cmd3_int_disable 1723 1724 .done: 1725 %endif 1726 1727 1728 %if _CATCHINTFAULTCOND && _CATCHINT0C 1729 cmd3_int0C_init: 0 000000E1 B00C mov al, 0Ch ; interrupt number 0 000000E3 BE[0000] mov si, intr0C ; -> IISP entry header 0 000000E6 BA2000 mov dx, opt4_int_0C_force >> 16 1733 %if (opt4_int_0C_force >> 16) == dif4_int_0C_hooked 0 000000E9 89D3 mov bx, dx 1735 %else 1736 mov bx, dif4_int_0C_hooked 1737 %endif 1738 0 000000EB F606[AC01]10 testopt [options4], opt4_int_fault_hook 0 000000F0 7405 jz .check_disable 1741 .check_enable: 0 000000F2 E8A005 call cmd3_int_enable 0 000000F5 EB03 jmp .done 1744 1745 .check_disable: 0 000000F7 E8B005 call cmd3_int_disable 1747 1748 .done: 1749 %endif 1750 1751 1752 %if _CATCHINT08 1753 cmd3_int08_init: 0 000000FA B008 mov al, 08h ; interrupt number 0 000000FC BE[0000] mov si, intr8 ; -> IISP entry header 0 000000FF BA0400 mov dx, opt4_int_08_force >> 16 1757 %if (opt4_int_08_force >> 16) == dif4_int_08_hooked 0 00000102 89D3 mov bx, dx 1759 %else 1760 mov bx, dif4_int_08_hooked 1761 %endif 1762 0 00000104 F606[AC01]04 testopt [options4], opt4_int_08_hook 0 00000109 7405 jz .check_disable 1765 .check_enable: 0 0000010B E88705 call cmd3_int_enable 0 0000010E EB03 jmp .done 1768 1769 .check_disable: 0 00000110 E89705 call cmd3_int_disable 1771 1772 .done: 1773 %endif 1774 1775 1776 %if _CATCHINT2D 1777 cmd3_int2D_init: 0 00000113 B02D mov al, 2Dh ; interrupt number 0 00000115 BE[0000] mov si, int2D ; -> IISP entry header 0 00000118 BB0800 mov bx, dif4_int_2D_hooked 0 0000011B BA0800 mov dx, opt4_int_2D_force >> 16 1782 0 0000011E F606[AC01]08 testopt [options4], opt4_int_2D_hook 0 00000123 7445 jz .check_disable 1785 .check_enable: 0 00000125 851E[E401] test word [internalflags4], bx 0 00000129 7542 jnz .done 1788 0 0000012B E8[0000] call intchk ; ZR if offset = -1 or segment = 0 1790 ; CHG: ax, dx, bx 0 0000012E 742D jz .fail 1792 0 00000130 8A26[0000] mov ah, byte [try_amis_multiplex_number] 0 00000134 B000 mov al, 00h 1795 ; function 0 changes dx, di, cx, al 1796 %if _PM 1797 call call_int2D 1798 %else 0 00000136 CD2D int 2Dh ; enquire whether there's anyone 1800 %endif 0 00000138 84C0 test al, al 0 0000013A 7413 jz .got 1803 0 0000013C 31C0 xor ax, ax ; start with multiplex number 0 1805 .loopplex: 0 0000013E B000 mov al, 00h ; AMIS installation check 1807 ; function 0 changes dx, di, cx, al 1808 %if _PM 1809 call call_int2D 1810 %else 0 00000140 CD2D int 2Dh ; enquire whether there's anyone 1812 %endif 0 00000142 84C0 test al, al ; free ? 0 00000144 7409 jz .got ; yes, put it to use --> 0 00000146 FEC4 inc ah 0 00000148 75F4 jnz .loopplex ; try next multiplexer --> 1817 0 0000014A BA[0000] mov dx, msg.cannot_hook_2D.nofree 0 0000014D EB11 jmp .fail_putsz 1820 1821 .got: 0 0000014F 8826[0000] mov byte [amis_multiplex_number], ah 1823 0 00000153 B02D mov al, 2Dh ; interrupt number 0 00000155 BB0800 mov bx, dif4_int_2D_hooked 0 00000158 E84005 call cmd3_int_enable.need 0 0000015B EB10 jmp .done 1828 1829 .fail: 0 0000015D BA[0000] mov dx, msg.cannot_hook_2D.invalid 1831 .fail_putsz: 0 00000160 E8[0000] call putsz 0 00000163 8026[AC01]F7 clropt [options4], opt4_int_2D_hook 0 00000168 EB03 jmp .done 1835 1836 .check_disable: 0 0000016A E83D05 call cmd3_int_disable 1838 1839 .done: 1840 %endif 1841 1842 0 0000016D F606[E301]01 testopt [internalflags3], dif3_input_re 0 00000172 7403E9B701 jnz cmd3_continue_1_re 0 00000177 8026[A501]7F clropt [options2], opt2_re_cancel_tpg 1846 %if !_LOADER 0 0000017C E8[0000] call silence_dump 1848 %endif 1849 1850 1851 cmd3_serial_init: 0 0000017F F606[A101]40 testopt [options], enable_serial 0 00000184 7503E94D01 jz .check_disable_serial 1854 .check_enable_serial: 0 00000189 F606[690D]01 testopt [serial_flags], sf_init_done 0 0000018E 7408 jz .enable_serial 1857 ; If we disabled the actual use flag prior somehow 1858 ; (sf_use_serial clear) but we get here with 1859 ; sf_init_done set then re-enable use of serial I/O. 0 00000190 800E[690D]10 setopt [serial_flags], sf_use_serial 0 00000195 E98501 jmp .done_serial 1862 1863 .enable_serial: 1864 0 00000198 A0[6A0D] mov al, byte [serial_var_intnum] 0 0000019B A2[E80B] mov byte [serial_use_intnum], al 0 0000019E A0[6B0D] mov al, byte [serial_var_params] 0 000001A1 A2[E90B] mov byte [serial_use_params], al 0 000001A4 A0[6C0D] mov al, byte [serial_var_fifo] 0 000001A7 A2[EA0B] mov byte [serial_use_fifo], al 0 000001AA A1[6E0D] mov ax, word [serial_var_baseport] 0 000001AD A3[EE0B] mov word [serial_use_baseport], ax 0 000001B0 A1[700D] mov ax, word [serial_var_dl] 0 000001B3 A3[F00B] mov word [serial_use_dl], ax 0 000001B6 A1[720D] mov ax, word [serial_var_irqmask] 0 000001B9 A3[F20B] mov word [serial_use_irqmask], ax 0 000001BC E8[0000] call serial_clear_fifos 0 000001BF E8[0000] call serial_install_interrupt_handler 0 000001C2 7317 jnc @F 0 000001C4 BF[0000] mov di, msg.serial_cannot_hook.old_int 0 000001C7 A0[980D] mov al, byte [serial_installed_intnum] 0 000001CA E8[0000] call hexbyte 0 000001CD BF[0000] mov di, msg.serial_cannot_hook.new_int 0 000001D0 A0[E80B] mov al, byte [serial_use_intnum] 0 000001D3 E8[0000] call hexbyte 0 000001D6 BA[0000] mov dx, msg.serial_cannot_hook 0 000001D9 EB52 jmp .no_keep 1888 1889 @@: 0 000001DB C606[0800]80 mov byte [serial_interrupt_handler + ieEOI], 80h 0 000001E0 E8[0000] call serial_init_UART 1892 0 000001E3 800E[690D]11 setopt [serial_flags], sf_init_done | sf_use_serial 1894 0 000001E8 BA[0000] mov dx, msg.serial_request_keep 0 000001EB E8[0000] call putsz 1897 0 000001EE BF[CE0A] mov di, line_out 1899 %if _DEBUG 1900 %if _DEBUG_COND 1901 testopt [internalflags6], dif6_debug_mode 1902 jz @F 1903 %endif 1904 mov al, '~' ; indicate instance is to be debugged 1905 stosb 1906 @@: 1907 %endif 0 000001F1 B83D20 mov ax, "= " 0 000001F4 AB stosw 1910 0 000001F5 31C0 xor ax, ax 0 000001F7 A3[800D] mov word [getline_timer_count], ax 0 000001FA 06 push es 0 000001FB B84000 mov ax, 40h 0 000001FE 8EC0 mov es, ax 0 00000200 26A16C00 mov ax, word [es:6Ch] 0 00000204 A3[820D] mov word [getline_timer_last], ax 0 00000207 07 pop es 0 00000208 C706[840D][3D02] mov word [getline_timer_func], .timer 1920 1921 ; if we're executing from the command line 1922 ; buffer or a Y file then we want to 1923 ; override input to be from serial for the 1924 ; KEEP confirmation prompt. 1925 ; output is always to serial if we're here. 0 0000020E 800E[E001]20 setopt [internalflags3], dif3_input_serial_override 0 00000213 E8[0000] call getline00 0 00000216 8026[E001]DF clropt [internalflags3], dif3_input_serial_override 1929 0 0000021B E8[0000] call skipcomm0 0 0000021E 4E dec si 0 0000021F BA[0000] mov dx, msg.keep 0 00000222 E8[0000] call isstring? 0 00000225 7503E9F300 je .done_serial 1935 0 0000022A BA[0000] mov dx, msg.serial_no_keep_enter 1937 .no_keep: 1938 ; Immediately disable use of serial I/O. 0 0000022D 8026[690D]EF clropt [serial_flags], sf_use_serial 1940 ; Set the flag for next cmd3 loop to properly disable 1941 ; and de-initialise the serial port. 0 00000232 8026[A101]BF clropt [options], enable_serial 0 00000237 E8[0000] call putsz 0 0000023A E9C3FD jmp cmd3 1945 1946 1947 .timer: 0 0000023D 50 push ax 0 0000023E 52 push dx 0 0000023F 51 push cx 0 00000240 53 push bx 0 00000241 06 push es 1953 0 00000242 BA4000 mov dx, 40h 0 00000245 8EC2 mov es, dx 1956 0 00000247 B00B mov al, 0Bh ; request In-Service Register (ISR) 0 00000249 E6A0 out 0A0h, al ; from secondary PIC 0 0000024B E4A0 in al, 0A0h ; read the ISR 0 0000024D 8406[F30B] test al, byte [serial_use_irqmask + 1] 0 00000251 756B jnz .timer_ours 0 00000253 B00B mov al, 0Bh ; request In-Service Register (ISR) 0 00000255 E620 out 20h, al ; from primary PIC 0 00000257 E420 in al, 20h ; read the ISR 0 00000259 24FB and al, ~100b 0 0000025B 8406[F20B] test al, byte [serial_use_irqmask] 0 0000025F 755D jnz .timer_ours 1968 .timer_ours_done: 1969 0 00000261 8B0E[DE0B] mov cx, word [serial_save_irq_mask] 0 00000265 31DB xor bx, bx ; all bits clear (= IRQ ON) 0 00000267 E8[0000] call set_irq ; enable IRQs and get prior status 0 0000026A 85DB test bx, bx ; IRQs were still enabled ? 0 0000026C 7405 jz @F ; yes, fine --> 0 0000026E 8026[B601]FE clropt [options6], opt6_share_serial_irq 1976 ; no, make sure not to chain any longer 1977 @@: 0 00000273 8B0E[800D] mov cx, word [getline_timer_count] 0 00000277 8B16[820D] mov dx, word [getline_timer_last] 1980 1981 %if _SLEEP_NEW 0 0000027B 26A16C00 mov ax, word [es:6Ch] 0 0000027F 39C2 cmp dx, ax 0 00000281 7445 je .timer_next 0 00000283 F7DA neg dx ; minus prior tick 0 00000285 01C2 add dx, ax ; new tick - prior tick 1987 0 00000287 3B16[0000] cmp dx, word [sleep_delta_limit] 0 0000028B 7609 jbe @F 0 0000028D 8B16[0000] mov dx, word [sleep_delta_limit] 0 00000291 85D2 test dx, dx 0 00000293 7501 jnz @F 0 00000295 42 inc dx ; limit 0 would lead to stagnant sleep 1994 @@: 0 00000296 3B16[0000] cmp dx, word [sleep_highest_delta] 0 0000029A 7604 jbe @F 0 0000029C 8916[0000] mov word [sleep_highest_delta], dx 1998 @@: 0 000002A0 01D1 add cx, dx 0 000002A2 7303 jnc @F 0 000002A4 B9FFFF mov cx, -1 2002 @@: 0 000002A7 89C2 mov dx, ax 2004 %else 2005 cmp dx, word [es:6Ch] 2006 je .timer_next 2007 mov dx, word [es:6Ch] 2008 inc cx 2009 %endif 0 000002A9 B012 mov al, 18 0 000002AB F626[670D] mul byte [serial_keep_timeout] 0 000002AF 85C0 test ax, ax 0 000002B1 7415 jz .timer_next 0 000002B3 39C1 cmp cx, ax 0 000002B5 7211 jb .timer_next 2016 0 000002B7 07 pop es 0 000002B8 BA[0000] mov dx, msg.serial_no_keep_timer 0 000002BB E96FFF jmp .no_keep 2020 2021 .timer_ours: 0 000002BE 800E[B601]02 setopt [options6], opt6_serial_EOI_call 0 000002C3 E8[0000] call serial_eoi 0 000002C6 EB99 jmp .timer_ours_done 2025 2026 .timer_next: 0 000002C8 890E[800D] mov word [getline_timer_count], cx 0 000002CC 8916[820D] mov word [getline_timer_last], dx 0 000002D0 07 pop es 0 000002D1 5B pop bx 0 000002D2 59 pop cx 0 000002D3 5A pop dx 0 000002D4 58 pop ax 0 000002D5 C3 retn 2035 2036 2037 .check_disable_serial: 2038 ; If serial is initialised, uninstall it. 0 000002D6 F606[690D]01 testopt [serial_flags], sf_init_done 0 000002DB 751D jnz .disable_serial 2041 ; Not initialised. Is the interrupt still hooked? 0 000002DD F606[E401]01 testopt [internalflags4], dif4_int_serial_hooked 0 000002E2 7439 jz .done_serial 2044 ; Try unhooking the interrupt handler. 0 000002E4 E8[0000] call serial_uninstall_interrupt_handler 0 000002E7 7234 jc .done_serial ; if it failed again --> 0 000002E9 BF[0000] mov di, msg.serial_late_unhook.int 0 000002EC A0[980D] mov al, byte [serial_installed_intnum] 0 000002EF E8[0000] call hexbyte 0 000002F2 BA[0000] mov dx, msg.serial_late_unhook 0 000002F5 E8[0000] call putsz 0 000002F8 EB23 jmp .done_serial 2053 2054 .disable_serial: 2055 0 000002FA E8[0000] call serial_clean_up 0 000002FD 7319 jnc @F 2058 ; Immediately disable use of serial I/O, 2059 ; so that our error message goes to the 2060 ; local terminal rather than to serial I/O. 0 000002FF 8026[690D]EF clropt [serial_flags], sf_use_serial 0 00000304 BF[0000] mov di, msg.serial_cannot_unhook.int 0 00000307 A0[980D] mov al, byte [serial_installed_intnum] 0 0000030A E8[0000] call hexbyte 0 0000030D BA[0000] mov dx, msg.serial_cannot_unhook 0 00000310 E8[0000] call putsz 0 00000313 C606[0800]00 mov byte [serial_interrupt_handler + ieEOI], 0 2068 ; we do not issue EOI any longer 2069 @@: 0 00000318 8026[690D]EE clropt [serial_flags], sf_init_done | sf_use_serial 2071 .done_serial: 2072 2073 2074 %if _VXCHG 2075 cmd3_vv_set: 0 0000031D E8[0000] call vv_set 2077 %endif 2078 2079 2080 %if _PM 2081 cmd3_ss_init: 2082 call ispm 2083 jnz .done 2084 2085 subcpu 286 2086 mov bx, ss 2087 lar cx, bx 2088 jnz .done 2089 shr cx, 8 2090 2091 testopt [options3], opt3_ss_b_bit_set 2092 jz .check_clear 2093 .check_set: 2094 testopt [internalflags3], dif3_ss_b_bit_set 2095 jnz .done 2096 2097 mov ch, 40h 2098 jmp @F 2099 2100 .check_clear: 2101 testopt [internalflags3], dif3_ss_b_bit_set 2102 jz .done 2103 2104 @@: 2105 mov ax, 0009h 2106 int 31h 2107 jc .done 2108 2109 xoropt [internalflags3], dif3_ss_b_bit_set 2110 subcpureset 2111 2112 .done: 2113 %endif 2114 2115 2116 %if _IMMASM 0 00000320 FF16[0000] call near [ ia_restore ] 2118 %endif 2119 0 00000324 F606[B901]10 testopt [options7], opt7_no_ensure 0 00000329 7503 jnz .skip 2122 2123 %if _PM 2124 call ispm 2125 jz @F 2126 %endif 2127 %if !_LOADER 0 0000032B E8DE10 call ensuredebuggeeloaded ; if no task is active, create a dummy one 2129 %endif 2130 %if _PM && 0 2131 jmp @FF 2132 @@: 2133 testopt [internalflags], attachedterm 2134 jz @F 2135 mov dx, .message 2136 call putsz 2137 2138 usesection lDEBUG_DATA_ENTRY 2139 .message: ascizline "Attached term is set in PM!" 2140 usesection lDEBUG_CODE 2141 %endif 2142 @@: 2143 .skip: 2144 2145 2146 cmd3_continue_1_re: 0 0000032E BF[CE0A] mov di, line_out ; build prompt 2148 %if _DEBUG 2149 %if _DEBUG_COND 2150 testopt [internalflags6], dif6_debug_mode 2151 jz @F 2152 %endif 2153 mov al, '~' ; indicate instance is to be debugged 2154 stosb 2155 @@: 2156 %endif 2157 %if !_LOADER 2158 %if _INDOS_PROMPT 0 00000331 E8A60F call InDOS 0 00000334 740F jz @F 2161 %if _BOOTLDR 0 00000336 F606[D901]40 testopt [internalflags], nodosloaded 2163 ; boot mode ? 2164 %if _INDOS_PROMPT_NOBOOT 0 0000033B 7508 jnz @F ; yes, do not show special prompt --> 2166 %elif _INDOS_PROMPT_NOFLAG 2167 jnz .indos_prompt ; yes, show special prompt --> 2168 ; (do not call .real_indos check) 2169 %endif 2170 %endif 2171 %if _INDOS_PROMPT_NOFLAG 2172 %if _APPLICATION || _DEVICE 2173 ; Never branches to here if bootloaded, 2174 ; so no need to handle only bootloaded. 0 0000033D E8A80F call InDOS.real_indos ; real InDOS set ? 0 00000340 7403 jz @F ; no, do not show special prompt --> 2177 %endif 2178 %endif 2179 .indos_prompt: 0 00000342 B021 mov al, '!' 0 00000344 AA stosb 2182 @@: 2183 %endif 2184 %endif 2185 %if !_LOADER 0 00000345 B02D mov al, '-' ; main prompt 2187 %else 2188 mov al, '*' 2189 %endif 2190 %if _PM 2191 call ispm 2192 jnz .realmode 2193 mov al, '#' ; PM main prompt 2194 .realmode: 2195 %endif 0 00000347 F606[E101]01 testopt [internalflags3], dif3_input_cmdline 0 0000034C 7402 jz @F 0 0000034E B026 mov al, '&' 2199 @@: 0 00000350 F606[E301]01 testopt [internalflags3], dif3_input_re 0 00000355 7402 jz @F 0 00000357 B025 mov al, '%' 2203 @@: 0 00000359 AA stosb 2205 0 0000035A C606[0000]00 mov byte [hhflag], 0 0 0000035F 8326[0000]00 and word [hh_depth], 0 0 00000364 8326[0000]00 and word [hh_depth_of_single_term], 0 0 00000369 C706[840D][4B05] mov word [getline_timer_func], dmycmd 0 0000036F 8026[DA01]FE clropt [internalflags], usecharcounter ; reset this automatically 2211 0 00000374 F606[E301]01 testopt [internalflags3], dif3_input_re 0 00000379 7515 jnz cmd3_continue_2_re 2214 0 0000037B 800E[D801]08 setopt [internalflags], pagedcommand ; 2009-02-21: default to page all commands 0 00000380 8026[DB01]CF clropt [internalflags], tt_silence | tt_silent_mode 2217 ; reset, in case it's still set 0 00000385 8126[DC01]3FF7 clropt [internalflags2], dif2_tpg_proceed_bp_set | dif2_bp_failure | dif2_tpg_keep_proceed_bp, 1 2220 %if _INPUT_FILE_HANDLES 0 0000038B 8026[DE01]DF clropt [internalflags2], dif2_closed_input_file 2222 %endif 2223 2224 cmd3_continue_2_re: 0 00000390 E83103 call determine_quiet_output 2226 0 00000393 31C9 xor cx, cx 0 00000395 870E[B40C] xchg cx, word [rc] ; reset rc 0 00000399 890E[B60C] mov word [priorrc], cx ; make prior value available 0 0000039D E304 jcxz @F 0 0000039F 890E[B80C] mov word [erc], cx ; update to last non-zero value 2232 @@: 2233 2234 %if !_LOADER 2235 cmd3_check_relimit: 0 000003A3 F606[E301]01 testopt [internalflags3], dif3_input_re 0 000003A8 7425 jz cmd3_continue_not_re 2238 0 000003AA 8306[780B]01 add word [re_count], 1 0 000003AF 8316[7A0B]00 adc word [re_count + 2], 0 0 000003B4 8B16[7E0B] mov dx, word [re_limit + 2] 0 000003B8 A1[7C0B] mov ax, word [re_limit] 0 000003BB 3916[7A0B] cmp word [re_count + 2], dx 0 000003BF 7504 jne @F 0 000003C1 3906[780B] cmp word [re_count], ax 2246 @@: 2247 ; This branch bypasses cmd3_check_rclimit 2248 ; because RE buffer commands should not 2249 ; count towards the RC limit. 0 000003C5 765C jbe cmd3_continue_relimit_not_reached 2251 0 000003C7 BA[0000] mov dx, msg.re_limit_reached 0 000003CA B84301 mov ax, 0143h 0 000003CD EB3D jmp cmd3_check_common 2255 2256 cmd3_continue_not_re: 2257 %endif 2258 2259 cmd3_check_rclimit: 2260 2261 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 2262 ; If executing from a script file then 2263 ; command doesn't count for RC limit. 2264 %if _INPUT_FILE_BOOT 0 000003CF F606[DF01]02 testopt [internalflags2], dif2_input_file_boot 0 000003D4 754D jnz .file 2267 %endif 2268 %if _INPUT_FILE_HANDLES 0 000003D6 E8010F call InDOS 0 000003D9 7507 jnz .file_not 0 000003DB F606[DE01]10 testopt [internalflags2], dif2_input_file 0 000003E0 7541 jnz .file 2273 %endif 2274 .file_not: 2275 2276 .file: equ cmd3_continue_rclimit_not_reached 2277 %endif 2278 0 000003E2 F606[E101]01 testopt [internalflags3], dif3_input_cmdline 0 000003E7 743A jz cmd3_continue_not_rc 2281 0 000003E9 8306[800B]01 add word [rc_count], 1 0 000003EE 8316[820B]00 adc word [rc_count + 2], 0 0 000003F3 8B16[860B] mov dx, word [rc_limit + 2] 0 000003F7 A1[840B] mov ax, word [rc_limit] 0 000003FA 3916[820B] cmp word [rc_count + 2], dx 0 000003FE 7504 jne @F 0 00000400 3906[800B] cmp word [rc_count], ax 2289 @@: 0 00000404 761D jbe cmd3_continue_rclimit_not_reached 2291 0 00000406 BA[0000] mov dx, msg.rc_limit_reached 0 00000409 B84401 mov ax, 0144h 2294 cmd3_check_common: 0 0000040C E8[0000] call putsz_error 0 0000040F E8B80D call setrc 0 00000412 800E[E101]04 setopt [internalflags3], dif3_at_line_end 0 00000417 A1[B40C] mov ax, word [rc] 0 0000041A A3[B60C] mov word [priorrc], ax 0 0000041D E8[0000] call getline_close_file 0 00000420 E9DDFB jmp cmd3 2302 2303 cmd3_continue_not_rc: 2304 cmd3_continue_rclimit_not_reached: 2305 cmd3_continue_relimit_not_reached: 2306 2307 cmd3_check_line_out_overflow: 0 00000423 813E[D60B]4226 cmp word [line_out_overflow], 2642h 0 00000429 740C je @F 0 0000042B C706[D60B]4226 mov word [line_out_overflow], 2642h 0 00000431 BA[0000] mov dx, msg.line_out_overflow 0 00000434 E8[0000] call putsz_error 2313 @@: 2314 2315 cmd3_getline: 2316 %if _EXTENSIONS 0 00000437 31C9 xor cx, cx 0 00000439 870E[4002] xchg cx, word [ext_inject_handler] 0 0000043D E303 jcxz cmd3_not_inject 0 0000043F E9[0000] jmp transfer_ext_cx 2321 2322 cmd3_not_inject: section_of_function 0 00000442 8B26[380C] mov sp, word [ savesp ] ; restore stack 0 00000446 E8[0000] call getline00 ; prompted input, also resets linecounter 2325 cmd3_injected: section_of_function 0 00000449 8B26[380C] mov sp, word [ savesp ] ; restore stack 2327 2328 0 0000044D 8B0E[3E02] mov cx, word [ext_preprocess_handler] 0 00000451 E303 jcxz cmd3_preprocessed 0 00000453 E9[0000] jmp transfer_ext_cx 2332 2333 cmd3_preprocessed: section_of_function 0 00000456 16 push ss 0 00000457 1F pop ds 0 00000458 16 push ss 0 00000459 07 pop es 0 0000045A 8B26[380C] mov sp, word [ savesp ] ; restore stack 2339 2340 0 0000045E 8B0E[3C02] mov cx, word [ext_command_handler] 0 00000462 E303 jcxz cmd3_not_ext 0 00000464 E9[0000] jmp transfer_ext_cx 2344 2345 cmd3_not_ext: section_of_function 0 00000467 16 push ss 0 00000468 1F pop ds 0 00000469 16 push ss 0 0000046A 07 pop es 0 0000046B 8B26[380C] mov sp, word [ savesp ] ; restore stack 0 0000046F 4E dec si 0 00000470 AC lodsb 2353 %else 2354 call getline00 ; prompted input, also resets linecounter 2355 cmd3_injected: section_of_function 2356 %endif 2357 0 00000471 E8[0000] call iseol?.notsemicolon 0 00000474 7518 jne cmd3_notblank 0 00000476 F606[AB01]10 testopt [options3], opt3_disable_autorepeat 0 0000047B 7508 jnz @F 0 0000047D 8B16[520D] mov dx, word [lastcmd] 0 00000481 8804 mov byte [si], al 0 00000483 EB43 jmp short cmd4 2365 2366 @@: 0 00000485 C706[520D][4B05] mov word [lastcmd], dmycmd 0 0000048B E972FB jmp cmd3 2369 2370 cmd3_notblank: 2371 %if _SYMBOLIC 2372 clropt [internalflags3], dif3_nosymbols_1 2373 %endif 0 0000048E C706[520D][4B05] mov word [lastcmd], dmycmd 0 00000494 3C3B cmp al, ';' 0 00000496 7435 je cmd3_j1 ; if comment --> 0 00000498 3C3A cmp al, ':' 0 0000049A 7431 je cmd3_j1 ; if jump label --> 0 0000049C 3C3F cmp al, '?' 0 0000049E 7503E9C100 je help ; if request for help --> 0 000004A3 3C2E cmp al, '.' 0 000004A5 7503E9[0000] je immasm ; if assembling/immediate execution --> 0 000004AA 3C2D cmp al, '-' 0 000004AC 7503 jne @F ; if not no symbol prefix --> 2385 %if _SYMBOLIC 2386 setopt [internalflags3], dif3_nosymbols_1 2387 %endif 0 000004AE E8[0000] call skipwhite ; skip to next command letter 2389 ; Empty line (autorepeat) not valid. 2390 ; Comment not valid. Goto label not valid. 2391 ; Help request not valid. 2392 @@: 0 000004B1 E8[0000] call capitalise 0 000004B4 2C41 sub al, 'A' 2395 %if _SYMBOLIC 2396 cmp al, 'Z' - 'A' 2397 ja error ; if not recognised --> 2398 je @F ; if Z, do not commit --> 2399 nearcall zz_commit_insert ; if not Z, commit now 2400 @@: 2401 %else 0 000004B6 3C18 cmp al, 'Y' - 'A' 0 000004B8 7603E9B70C ja error ; if not recognised --> 2404 %endif 0 000004BD 98 cbw 0 000004BE 93 xchg bx, ax 0 000004BF E8[0000] call skipcomma 0 000004C2 D1E3 shl bx, 1 0 000004C4 8B97[6E01] mov dx, word [ cmdlist+bx ] 2410 cmd4: 0 000004C8 BF[CE0A] mov di, line_out 2412 %if _DEBUG || _LOADER 2413 db __TEST_IMM8 ; (skip int3) 2414 .int3: 2415 int3 ; used by BU command 2416 %endif 0 000004CB FFD2 call dx 2418 cmd3_j1: 0 000004CD E930FB jmp cmd3 ; back to the top 2420 2421 2422 %if !_LOADER 2423 code_insure_low_byte_not_0CCh 2424 cmd2_reset_re_maybe_pm: 2425 0 000004D0 66 _386_o32 ; mov esp 0 000004D1 8B26[380C] mov sp, word [ savesp ] ; restore stack 0 000004D5 83E4FC _386 and sp, ~3 ; align stack 0 000004D8 66 _386_o32 0 000004D9 31C0 xor ax, ax 0 000004DB 66 _386_o32 0 000004DC 50 push ax 0 000004DD 66 _386_o32 0 000004DE 9D popf 0 000004DF 8B26[380C] _386 mov sp, word [ savesp ] ; restore stack 0 000004E3 FC cld 0 000004E4 FB sti 2438 2439 %if _PM 2440 call handle_mode_changed 2441 %endif 2442 %endif 2443 2444 code_insure_low_byte_not_0CCh 2445 cmd2_reset_re: 0 000004E5 8B1E[7C0D] mov bx, word [io_levels] 2447 .entry_bx_levels: 0 000004E9 31C9 xor cx, cx 2449 .entry_bx_levels_cx_cmdline: 0 000004EB 31D2 xor dx, dx 2451 %if _INPUT_FILE_HANDLES 0 000004ED F606[DE01]10 testopt [internalflags2], dif2_input_file 0 000004F2 7405 jz @F 0 000004F4 030E[200C] add cx, word [input_file_handles.active] 0 000004F8 41 inc cx 2456 @@: 2457 %endif 2458 %if _INPUT_FILE_BOOT 0 000004F9 F606[DF01]02 testopt [internalflags2], dif2_input_file_boot 0 000004FE 7405 jz @F 0 00000500 030E[0000] add cx, word [load_input_file.active] 0 00000504 41 inc cx 2463 @@: 2464 %endif 2465 %if !_LOADER 0 00000505 F606[E301]01 testopt [internalflags3], dif3_input_re 0 0000050A 740D jz @F 0 0000050C 41 inc cx 0 0000050D 42 inc dx 2470 ; Flag: If we abort anything (effective IOL >= 1) 2471 ; then we need to cancel RE buffer execution. 2472 ; This is so because RE execution is always the 2473 ; topmost command source, taking precedence over 2474 ; yy as well as RC buffer execution. 0 0000050E F606[7E0D]01 testopt [io_flags], iof_extra_iol_for_tpg_re 0 00000513 7404 jz @F 0 00000515 43 inc bx 0 00000516 7501 jnz @F 0 00000518 4B dec bx 2480 @@: 2481 %endif 0 00000519 F606[E101]01 testopt [internalflags3], dif3_input_cmdline 0 0000051E 740C jz @F 0 00000520 41 inc cx 0 00000521 F606[7E0D]02 testopt [io_flags], iof_extra_iol_for_rc 0 00000526 7404 jz @F 0 00000528 43 inc bx 0 00000529 7501 jnz @F 0 0000052B 4B dec bx 2490 @@: 0 0000052C 39D9 cmp cx, bx 0 0000052E 7602 jbe @F 0 00000530 89D9 mov cx, bx 2494 @@: 0 00000532 E399 jcxz cmd3_j1 ; IOL zero or nothing active --> 0 00000534 1E push ds 0 00000535 07 pop es 2498 @@: 0 00000536 51 push cx 0 00000537 52 push dx 0 00000538 E8[0000] call getline_close_file.resetstuff 0 0000053B 5A pop dx 0 0000053C 59 pop cx 0 0000053D E2F7 loop @B 2505 %if !_LOADER 0 0000053F 85D2 test dx, dx ; first cancelled was RE ? 0 00000541 748A jz cmd3_j1 ; no, just proceed now --> 0 00000543 800E[A501]80 setopt [options2], opt2_re_cancel_tpg 2509 ; set to cancel command 0 00000548 E9[0000] jmp dumpregs_extended.exit ; clean up RE state 2511 %else 2512 jmp cmd3_j1 2513 %endif 2514 2515 dmycmd: 0 0000054B C3 retn 2517 2518 %if _EXTENSIONS 2519 lastcmd_transfer_ext_entry: 2520 %if _LINK 0 0000054C B9[0000] mov cx, eld_linkcall.call_cmd3 2522 wlcalc word_minusext_eld_linkcall, equ $ - 2 2523 %else 2524 mov cx, eld_linkcall.call_cmd3 - eld_linkcall 2525 %endif 0 0000054F 51 push cx 0 00000550 8B0E[540D] mov cx, word [lastcmd_transfer_ext_address] 0 00000554 E9[0000] jmp transfer_ext_cx 2529 2530 near_transfer_ext_entry: 0 00000557 51 push cx 0 00000558 8B0E[560D] mov cx, word [near_transfer_ext_address] 0 0000055C E9[0000] jmp transfer_ext_cx 2534 ; INP: cx = entrypoint ip 2535 ; ss:sp -> original cx value, near return address 2536 2537 ; INP: ss:sp -> three words to discard, cx, near return 2538 near_transfer_ext_return: section_of_function 0 0000055F 59 pop cx ; discard near return address 0 00000560 59 pop cx 0 00000561 59 pop cx ; discard far return address 0 00000562 59 pop cx ; restore cx 0 00000563 C3 retn ; return 2544 %endif 2545 2546 help: 0 00000564 E8[0000] call skipcomma 0 00000567 E8[0000] call capitalise 2549 %if _EXTHELP 2550 %if _COND 0 0000056A BA[0000] mov dx, msg.condhelp 0 0000056D 3C43 cmp al, 'C' 0 0000056F 7503E98400 je .spec 2554 %endif 2555 %if _OPTIONS 0 00000574 3C4F cmp al, 'O' 0 00000576 7503E99E00 je .options ; option help --> 2558 %endif 2559 %if _EXPRESSIONS 0 0000057B BA[0000] mov dx, msg.expressionhelp 0 0000057E 3C45 cmp al, 'E' 0 00000580 7476 je .spec 2563 %endif 2564 %endif 2565 %if _EMS 2566 mov dx, msg.xhelp 2567 cmp al, 'X' 2568 je .spec 2569 %endif 0 00000582 4E dec si 2571 %if _BOOTLDR && _EXTHELPBOOT 0 00000583 BA[0000] mov dx, msg.boot 0 00000586 E8[0000] call isstring? 0 00000589 BA[0000] mov dx, msg.boothelp 2575 %if _LINK 2576 global patch_boothelp_uncompressed 2577 patch_boothelp_uncompressed: equ $ - 2 2578 %endif 0 0000058C 746A je .spec 2580 %endif 2581 %if _PM 2582 mov dx, msg.desc 2583 call isstring? 2584 mov dx, msg.deschelp 2585 je .spec 2586 %endif 2587 %if _EXTHELP 0 0000058E BA[0000] mov dx, msg.source 0 00000591 E8[0000] call isstring? 0 00000594 BA[0000] mov dx, msg.help_source 0 00000597 745F je .spec 2592 %endif 2593 %if !_LOADER 0 00000599 BA[0000] mov dx, msg.re 0 0000059C E8[0000] call isstring? 0 0000059F BA[0000] mov dx, msg.help_re 0 000005A2 7454 je .spec 0 000005A4 BA[0000] mov dx, msg.run 0 000005A7 E8[0000] call isstring? 0 000005AA BA[0000] mov dx, msg.help_run 0 000005AD 7449 je .spec 2602 %endif 0 000005AF BA[0000] mov dx, msg.string_version 0 000005B2 E8[0000] call isstring? 0 000005B5 BB[0000] mov bx, msg.build_array 0 000005B8 B9[0000] mov cx, msg.build_version_amount 0 000005BB 744D je .spec_multi 0 000005BD BA[0000] mov dx, msg.string_build 0 000005C0 E8[0000] call isstring? 2610 %if _LINK_COMPAT 0 000005C3 B9[0000] mov cx, msg.build_short_amount 2612 %else 2613 mov cl, msg.build_short_amount 2614 %endif 0 000005C6 7442 je .spec_multi 0 000005C8 AC lodsb 0 000005C9 E8[0000] call capitalise 2618 %if _LINK_COMPAT 0 000005CC B9[0000] mov cx, msg.build_long_amount 2620 %else 2621 mov cl, msg.build_long_amount 2622 %endif 0 000005CF 3C42 cmp al, 'B' 0 000005D1 7437 je .spec_multi ; build info --> 2625 %if _EXTHELP 0 000005D3 BA[0000] mov dx, msg.license 0 000005D6 3C4C cmp al, 'L' 0 000005D8 741E je .spec ; licence --> 0 000005DA BA[0000] mov dx, msg.flaghelp 0 000005DD 3C46 cmp al, 'F' 0 000005DF 7417 je .spec ; flag help --> 0 000005E1 BA[0000] mov dx, msg.reghelp 0 000005E4 3C52 cmp al, 'R' 0 000005E6 7410 je .spec ; register help --> 2635 %if _VARIABLES || _OPTIONS || _PSPVARIABLES 0 000005E8 BA[0000] mov dx, msg.varhelp 0 000005EB 3C56 cmp al, 'V' 0 000005ED 7409 je .spec ; variable help --> 2639 %endif 2640 %endif 0 000005EF BB[0000] mov bx, msg.help_array ; default help 2642 %if _LINK_COMPAT 0 000005F2 B9[0000] mov cx, msg.help_array_amount 2644 %else 2645 mov cl, msg.help_array_amount 2646 %endif 0 000005F5 4E dec si 0 000005F6 EB12 jmp .spec_multi 2649 2650 .spec: 0 000005F8 AC lodsb 0 000005F9 E8[0000] call chkeol 2653 %if _MESSAGESEGMENT || _HELP_COMPRESSED 0 000005FC E8[0000] call putsz_exthelp 0 000005FF EB03 jmp cmd3_j1a 2656 %endif 2657 2658 prnquit: 0 00000601 E8[0000] call putsz ; print string 2660 cmd3_j1a: 0 00000604 E9C6FE jmp cmd3_j1 ; done 2662 0 00000607 E96A0B errorj1:jmp error 2664 2665 help.spec_multi: 0 0000060A AC lodsb 0 0000060B E8[0000] call chkeol 2668 .loop: 0 0000060E 8B17 mov dx, word [bx] 0 00000610 E8[0000] call putsz_exthelp 0 00000613 43 inc bx 0 00000614 43 inc bx 0 00000615 E2F7 loop .loop 0 00000617 EBEB jmp short cmd3_j1a 2675 2676 %if _EXTHELP && _OPTIONS 2677 help.options: 0 00000619 89F3 mov bx, si 0 0000061B E8[0000] call skipwhite 0 0000061E E8[0000] call iseol? 0 00000621 7445 je .all 0 00000623 E8[0000] call capitalise 0 00000626 3C41 cmp al, 'A' 0 00000628 BA[0000] mov dx, msg.asmoptions_1 0 0000062B 7429 je .single 0 0000062D 3C49 cmp al, 'I' 0 0000062F BA[0000] mov dx, msg.flags_1 0 00000632 7422 je .single 0 00000634 BF[0000] mov di, msg.options_scan 0 00000637 B9[0000] mov cx, msg.options_scan_amount 0 0000063A F2AE repne scasb 0 0000063C 751A jne .pages 0 0000063E 81EF[0100] sub di, msg.options_scan + 1 0 00000642 D1E7 shl di, 1 0 00000644 8BBD[0000] mov di, word [msg.options_array + di] 0 00000648 89FA mov dx, di 2697 %if _MESSAGESEGMENT 0 0000064A 1E push ds 2699 %if _PM 2700 call get_messagesegsel 2701 %else 0 0000064B 368E1E[2202] mov ds, word [ss:messageseg] 2703 %endif 2704 %if _HELP_COMPRESSED 2705 cmp word [di], 2 + !!_LZEXEDAT * 3 2706 %else 0 00000650 803D00 cmp byte [di], 0 2708 %endif 0 00000653 1F pop ds 2710 %else 2711 %if _HELP_COMPRESSED 2712 cmp word [di], 2 + !!_LZEXEDAT * 3 2713 %else 2714 cmp byte [di], 0 2715 %endif 2716 %endif 0 00000654 74B1 je errorj1 2718 .single: 0 00000656 EBA0 jmp help.spec 2720 2721 .pages: 0 00000658 8D77FF lea si, [bx - 1] 0 0000065B BA[0000] mov dx, msg.string_options 0 0000065E E8[0000] call isstring? 0 00000661 75A4 jne errorj1 0 00000663 BA[0000] mov dx, msg.options_pages 0 00000666 EBEE jmp .single 2728 2729 .all: 0 00000668 BB[0000] mov bx, msg.options_array 0 0000066B B9[0000] mov cx, msg.options_array_amount 2732 .loop: 0 0000066E 8B3F mov di, word [bx] 0 00000670 8B17 mov dx, word [bx] 0 00000672 E8[0000] call putsz_exthelp 0 00000675 43 inc bx 0 00000676 43 inc bx 2738 %if _MESSAGESEGMENT 0 00000677 1E push ds 2740 %if _PM 2741 call get_messagesegsel 2742 %else 0 00000678 368E1E[2202] mov ds, word [ss:messageseg] 2744 %endif 2745 %if _HELP_COMPRESSED 2746 cmp word [di], 2 + !!_LZEXEDAT * 3 2747 %else 0 0000067D 803D00 cmp byte [di], 0 2749 %endif 0 00000680 1F pop ds 2751 %else 2752 %if _HELP_COMPRESSED 2753 cmp word [di], 2 + !!_LZEXEDAT * 3 2754 %else 2755 cmp byte [di], 0 2756 %endif 2757 %endif 0 00000681 740B je @F 0 00000683 83F901 cmp cx, 1 0 00000686 7406 je @F 0 00000688 BA[0000] mov dx, crlf 0 0000068B E8[0000] call putsz 2763 @@: 0 0000068E E2DE loop .loop 0 00000690 E96DF9 jmp cmd3 2766 %endif 2767 2768 2769 %if (_CATCHINTFAULTCOND && _CATCHINT0D) || (_CATCHINTFAULTCOND && _CATCHINT0C) || _CATCHINT2D || _CATCHINT08 || _LOADER 2772 ; INP: ds:si -> IISP entry header 2773 ; al = interrupt number 2774 ; bx = interrupt hooked status flag (dif4 low word) 2775 ; OUT: - 2776 ; CHG: ax, bx, cx, dx, di, si 2777 cmd3_int_enable.set_bx_to_dx: 0 00000693 89D3 mov bx, dx 2779 2780 cmd3_int_enable: 0 00000695 851E[E401] test word [internalflags4], bx 0 00000699 750C jnz .ret 2783 2784 .need: 0 0000069B 53 push bx 0 0000069C E8[0000] call install_86m_interrupt_handler 0 0000069F 5B pop bx 0 000006A0 091E[E401] or word [internalflags4], bx 0 000006A4 E8[0000] call update_inttab_optional 2790 .ret: 0 000006A7 C3 retn 2792 %endif 2793 2794 2795 %if (_CATCHINTFAULTCOND && _CATCHINT0D) || (_CATCHINTFAULTCOND && _CATCHINT0C) || _CATCHINT2D || _CATCHINT08 || _PM || _LOADER 2798 ; INP: ds:si -> IISP entry header 2799 ; al = interrupt number 2800 ; dx = interrupt unhook force flag (dif4 high word) 2801 ; bx = interrupt hooked status flag (dif4 low word) 2802 ; OUT: NC if successfully unhooked 2803 ; dif4 low word cleared 2804 ; CY if already unhooked or failed to unhook, 2805 ; ZR if already unhooked 2806 ; (dif4 low word is clear) 2807 ; NZ if failed to unhook 2808 ; (dif4 low word is still set) 2809 ; CHG: ax, bx, di, si 2810 cmd3_int_disable.set_bx_to_dx: 0 000006A8 89D3 mov bx, dx 2812 2813 cmd3_int_disable: 0 000006AA 851E[E401] test word [internalflags4], bx 0 000006AE 7412 jz .ret_CY ; --> (ZR) 2816 0 000006B0 E8[0000] call UnhookInterruptForce 0 000006B3 720B jc .ret_CY_NZ 2819 0 000006B5 F7D3 not bx 0 000006B7 211E[E401] and word [internalflags4], bx 0 000006BB E8[0000] call update_inttab_optional 0 000006BE F8 clc ; (NC) 0 000006BF C3 retn 2825 2826 .ret_CY_NZ: 0 000006C0 85E4 test sp, sp ; (NZ) 2828 .ret_CY: 0 000006C2 F9 stc ; (CY) 0 000006C3 C3 retn 2831 %endif 2832 2833 2834 determine_quiet_output: 0 000006C4 8026[E101]EF clropt [internalflags3], dif3_quiet_output 2836 0 000006C9 57 push di 0 000006CA 50 push ax 0 000006CB F606[E301]01 testopt [internalflags3], dif3_input_re 0 000006D0 7549 jnz .notquiet 2841 2842 %if _INPUT_FILE_BOOT 0 000006D2 F606[DF01]02 testopt [internalflags2], dif2_input_file_boot 0 000006D7 7412 jz @F 0 000006D9 B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 000006DC 52 push dx 0 000006DD F726[0000] mul word [load_input_file.active] 0 000006E1 5A pop dx 0 000006E2 89C7 mov di, ax 0 000006E4 F685[2700]80 testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietOutput 0 000006E9 EB29 jmp .quiet_if_nz 2852 2853 @@: 2854 %endif 2855 %if _INPUT_FILE_HANDLES 0 000006EB E8EC0B call InDOS 0 000006EE 7518 jnz @F 2858 0 000006F0 F606[DE01]10 testopt [internalflags2], dif2_input_file 0 000006F5 7411 jz @F 0 000006F7 8B3E[200C] mov di, word [input_file_handles.active] 0 000006FB D1E7 shl di, 1 0 000006FD D1E7 shl di, 1 0 000006FF D1E7 shl di, 1 ; to qword array index 2865 %if INPUTFILEHANDLE_size != 8 2866 %error Unexpected structure size 2867 %endif 0 00000701 F685[A30B]80 testopt [input_file_handles + di + ifhFlags], ifhfQuietOutput 0 00000706 EB0C jmp .quiet_if_nz 2870 2871 @@: 2872 %endif 0 00000708 F606[E101]01 testopt [internalflags3], dif3_input_cmdline 0 0000070D 740C jz @F 0 0000070F F606[A301]80 testopt [options], opt_cmdline_quiet_output 2876 ; jmp .quiet_if_nz 2877 2878 .quiet_if_nz: 0 00000714 7405 jz @F 2880 .quiet: 0 00000716 800E[E101]10 setopt [internalflags3], dif3_quiet_output 2882 .notquiet: 2883 @@: 0 0000071B 58 pop ax 0 0000071C 5F pop di 0 0000071D C3 retn 2887 2888 2889 guard_auxbuff.1_or_2: 0 0000071E F606[E301]30 testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 0 00000723 EB05 jmp @F 2893 2894 guard_auxbuff: section_of_function 0 00000725 F606[E301]70 testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 | dif3_auxbuff_guarded_3 2898 @@: 0 0000072A 7506 jnz @F 0 0000072C 800E[E301]10 setopt [internalflags3], dif3_auxbuff_guarded_1 0 00000731 C3 retn 2902 2903 @@: 0 00000732 B80101 mov ax, 0101h 0 00000735 E8920A call setrc 0 00000738 BA[0000] mov dx, msg.guard_auxbuff_error 2907 .putsz_error: 0 0000073B E8[0000] call putsz 0 0000073E E9BFF8 jmp cmd3 2910 2911 2912 ; This is used to disallow commands 2913 ; while reading from the RE buffer. 2914 guard_re: section_of_function 2915 %if !_LOADER 0 00000741 F606[E301]01 testopt [internalflags3], dif3_input_re 0 00000746 7501 jnz @F 0 00000748 C3 retn 2919 2920 @@: 0 00000749 BA[0000] mov dx, msg.guard_re_error 0 0000074C EB0B jmp guard_rc.specificerror102 2923 %else 2924 retn 2925 %endif 2926 2927 ; This is used to disallow commands 2928 ; while reading from the RC buffer. 2929 guard_rc: 0 0000074E F606[E101]01 testopt [internalflags3], dif3_input_cmdline 0 00000753 7501 jnz @F 0 00000755 C3 retn 2933 2934 @@: 0 00000756 BA[0000] mov dx, msg.guard_rc_error 2936 .specificerror102: 0 00000759 B80201 mov ax, 0102h 0 0000075C E86B0A call setrc 0 0000075F EBDA jmp guard_auxbuff.putsz_error 2940 2941 2942 %if _EXTENSIONS 2943 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 2943 ------------------ note: usesection lDEBUG_DATA_ENTRY 2944 align 2, db 0 2945 linkcall_table: 0 000013D8 0000 .init: dw 0 0 000013DA 0400 dw (.end - .) / 2 2948 .: 0 000013DC 0000 dw 0 0 000013DE 0000 .code1: dw 0 2951 %if _DUALCODE 2952 dw 1 2953 .code2: dw 0 2954 %endif 0 000013E0 0200 dw 2 0 000013E2 0000 .entry: dw 0 2957 .end: 2958 2959 ; INP: _PM=0: ss:sp -> dword far return address 2960 ; _PM=1: ss:sp -> word near return address 2961 ; followed by an uninitialised placeholder word 2962 ; CHG: - (not even flags) 2963 entry_ret_to_ext: 2964 %if _PM 2965 call entry_to_code_segsel 2966 dw code_ret_to_ext 2967 %else 0 000013E4 CB retf ; simple 2969 %endif 2970 2971 2972 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 2972 ------------------ note: usesection lDEBUG_CODE 2973 %if _DUALCODE && _PM 2974 ; INP: ss:sp -> dword dual call return address (to discard) 2975 ; ss:sp + 4 -> word near return address 2976 ; followed by an uninitialised placeholder word 2977 ; CHG: - (not even flags) 2978 dualfunction 2979 code2_to_code_ret_to_ext: section_of_function 2980 lframe 0 2981 lpar word, dualseg 2982 lpar word, dualofs 2983 lenter 2984 push word [bp + ?frame_bp] 2985 pop word [bp + ?dualseg] 2986 lleave ctx 2987 pop bp ; (discard) 2988 pop bp ; (discard) 2989 pop bp ; restore bp 2990 ; fall through to code_ret_to_ext 2991 %endif 2992 2993 ; INP: _PM=0: ss:sp -> dword far return address 2994 ; _PM=1: ss:sp -> word near return address 2995 ; followed by an uninitialised placeholder word 2996 ; CHG: - (not even flags) 2997 code_ret_to_ext: 2998 %if _PM 2999 ; ss:sp -> word near return address, placeholder word 3000 lframe 0 3001 lpar word, retseg 3002 lpar word, retofs 3003 lenter 3004 push di 3005 mov di, word [ss:pm_2_86m_0] 3006 %if extseg + 2 != extcssel 3007 %error code_ret_to_ext expects extcssel after extseg 3008 %endif 3009 push word [ss:extseg + di] 3010 pop word [bp + ?retseg] 3011 pop di 3012 lleave , optimiserestoresp 3013 %endif 0 00000761 CB retf ; now return to ext 3015 3016 %if _DUALCODE 3017 usesection lDEBUG_CODE2 3018 code2_ret_to_ext: 3019 %if _PM 3020 dualcall code2_to_code_ret_to_ext 3021 %else 3022 retf ; simple case if _PM=0 3023 %endif 3024 %endif 3025 %endif 3026 3027 %ifn _LINK_COMPAT 3028 %ifn _LINK 3029 %include "amis.asm" 3030 %endif 3031 3032 usesection lDEBUG_CODE 3033 3034 %if _DEBUG4 || _DEBUG5 3035 %define _DEB_ASM_PREFIX 3036 %include "deb.asm" 3037 %endif 3038 3039 3040 %ifn _LINK 3041 %if !_LOADER 3042 %include "aa.asm" 3043 %endif 3044 %include "dd.asm" 3045 %if _RN 3046 %imacro internaldatarelocation 0-*.nolist 3047 %endmacro 3048 %include "fptostr.asm" 3049 %unimacro internaldatarelocation 0-*.nolist 3050 %endif 3051 %include "run.asm" 3052 %include "install.asm" 3053 %include "uu.asm" 3054 %if _IMMASM 3055 %include "immasm.asm" 3056 %else 3057 immasm: 3058 lodsb 3059 call chkeol 3060 jmp cmd3 3061 %endif 3062 %if _HELP_COMPRESSED 3063 overridedef STANDALONE, 0 3064 %include "helpdepk.asm" 3065 resetdef STANDALONE 3066 %endif 3067 %endif 3068 %else ; _LINK_COMPAT 3069 %if _DEBUG4 || _DEBUG5 3070 %define _DEB_ASM_PREFIX 3071 %include "deb.asm" 3072 %endif 3073 %endif ; _LINK_COMPAT 3074 3075 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 3075 ------------------ note: usesection lDEBUG_DATA_ENTRY 3076 3077 %if _PM || _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 0 000013E5 00 align 4, db 0 0 000013E8 00000000 exception_csip: dd 0 ; 16:16 far 16-bit address of debugger exception 3080 %if _AREAS 0 000013EC 0000 exception_stack:times 4 dw 0 3082 ; stack of debugger exception 3083 %endif 3084 %endif 3085 3086 %if _PM 3087 %ifn _LINK || _LINK_COMPAT 3088 %include "pmdata.asm" 3089 %include "pminit.asm" 3090 %include "pmentry.asm" 3091 %endif 3092 3093 3094 usesection lDEBUG_CODE 3095 3096 subcpu 286 3097 resetmode_and_test_d_b_bit: section_of_function 3098 %if _PM 3099 call resetmode 3100 %endif 3101 3102 ; Test if bx is a 32-bit selector 3103 ; (as opposed to a 16-bit selector or a segment) 3104 ; 3105 ; INP: bx = selector (PM) or segment (86M) 3106 ; OUT: NZ = 32-bit 3107 ; ZR = 16-bit (always if 86M) 3108 ; NC 3109 ; REM: This checks whether a code segment's D bit or 3110 ; a stack segment's B bit is set. This operation 3111 ; is not meaningful otherwise. 3112 test_d_b_bit: section_of_function 3113 _386 call ispm 3114 _386 jz .pm ; 386 and PM, check selector --> 3115 ; not PM or no 386 3116 .ZR: 3117 cmp al, al ; ZR, NC 3118 retn 3119 .pm: 3120 [cpu 386] 3121 push eax 3122 xor eax, eax ; use rights = 0 if inaccessible 3123 lar eax, ebx ; access rights 3124 ; eax is unchanged if the access rights are inaccessible 3125 ; (and NZ is set in that case) 3126 test eax, 400000h ; test bit (NC) 3127 pop eax 3128 retn 3129 __CPU__ 3130 3131 3132 ; Test if selector in bx has a limit beyond 64 KiB - 1 B 3133 ; 3134 ; INP: bx = selector (PM) or segment (86M) 3135 ; OUT: NZ = limit above 64 KiB - 1 B 3136 ; ZR = limit below 64 KiB (always if 86M) 3137 ; NC 3138 test_high_limit: section_of_function 3139 _386 call ispm 3140 _386 jz .pm ; 386 and PM, check selector --> 3141 ; not PM or no 386 3142 jmp test_d_b_bit.ZR 3143 3144 .pm: 3145 [cpu 386] 3146 push eax 3147 xor eax, eax ; use limit = 0 if inaccessible 3148 lsl eax, ebx ; segment limit 3149 ; eax is unchanged if the segment limit is inaccessible 3150 ; (and NZ is set in that case) 3151 test eax, 0FFFF_0000h ; (NC) ZR if low limit, else NZ 3152 pop eax 3153 retn 3154 __CPU__ 3155 3156 subcpureset ; subcpu used in pminit.asm (!_LINK) 3157 %endif ; _PM 3158 3159 %if _NOEXTENDER 3160 ; When we support non-extended DPMI, some calls to Int21 3161 ; are (extended) Int21 calls and some are (not extended) 3162 ; calls down to the real mode Int21. doscall is a macro 3163 ; that will always call the non-extended Int21. 3164 3165 ; Execute a non-extended DOS call 3166 _doscall: section_of_function 3167 push di 3168 mov di, word [ss:pm_2_86m_0] 3169 jmp near word [ss:.table + di] 3170 3171 usesection lDEBUG_DATA_ENTRY 3172 ; REM: Dispatch table in section lDEBUG_CODE 3173 align 2, db 0 3174 .table: 3175 dw .86m_pop 3176 dw .pm_pop 3177 3178 usesection lDEBUG_CODE 3179 .pm_pop: 3180 pop di 3181 subcpu 286 3182 ; Execute a non-extended DOS call from PM 3183 .pm: 3184 push word [ss:pspdbg] 3185 push 21h 3186 call intcall 3187 retn 3188 subcpureset 3189 .86m_pop: 3190 pop di 3191 jmp _int21 3192 %endif 3193 3194 3195 %if _DUALCODE 3196 %push 3197 %assign %$counter 0 3198 3199 %rep 2 3200 3201 %if %$counter == 0 3202 %define %$currentindex 0 3203 %define %$currentname lDEBUG_CODE 3204 %define %$othername lDEBUG_CODE2 3205 %define %$othersegvar code2_seg 3206 %define %$otherselvar code2_sel 3207 %else 3208 %define %$currentindex 1 3209 %define %$currentname lDEBUG_CODE2 3210 %define %$othername lDEBUG_CODE 3211 %define %$othersegvar code_seg 3212 %define %$otherselvar code_sel 3213 %endif 3214 3215 hiddenusesection %$currentname 3216 %if _PM 3217 %$currentname %+ _to_ %+ %$currentname %+ _dualcall_helper: 3218 push ax ; placeholder 3219 push ax ; chain 3220 lframe 0 3221 lpar word, offset_segment 3222 lpar word, placeholder 3223 lpar word, chain 3224 lenter 3225 push bx 3226 mov bx, word [bp + ?offset_segment] 3227 %if _DEBUG 3228 mov word [bp + ?placeholder], bx 3229 push word [cs:bx + 2] 3230 %else 3231 push word [cs:bx] 3232 lea bx, [bx + 2] 3233 mov word [bp + ?placeholder], bx 3234 %endif 3235 pop word [bp + ?chain] 3236 mov word [bp + ?offset_segment], %$$currentindex 3237 pop bx 3238 lleave 3239 retn 3240 3241 %$currentname %+ _to_ %+ %$othername %+ _dualcall_helper: 3242 push ax ; placeholder 3243 push ax ; chain 3244 push ax ; chain 3245 lframe 0 3246 lpar word, offset_segment 3247 lpar word, placeholder 3248 lpar dword, chain 3249 lenter 3250 push bx 3251 mov bx, word [bp + ?offset_segment] 3252 %if _DEBUG 3253 mov word [bp + ?placeholder], bx 3254 push word [cs:bx + 2] 3255 %else 3256 push word [cs:bx] 3257 lea bx, [bx + 2] 3258 mov word [bp + ?placeholder], bx 3259 %endif 3260 pop word [bp + ?chain] 3261 mov bx, word [ss:pm_2_86m_0] 3262 %if %$$othersegvar + 2 != %$$otherselvar 3263 %error Expected sel variable after seg variable 3264 %endif 3265 mov bx, word [ss:%$$othersegvar + bx] 3266 mov word [bp + ?chain + 2], bx 3267 mov word [bp + ?offset_segment], %$$currentindex 3268 pop bx 3269 lleave 3270 retf 3271 3272 3273 %$currentname %+ _dualret_helper: 3274 lframe near 3275 lpar word, index_segment 3276 lpar word, offset 3277 lpar_return 3278 lenter 3279 push bx 3280 push di 3281 3282 %if code_seg + 2 != code_sel 3283 %error Unexpected layout 3284 %endif 3285 %if code2_seg + 2 != code2_sel 3286 %error Unexpected layout 3287 %endif 3288 mov bx, word [bp + ?index_segment] 3289 mov bl, byte [ss:.table + bx] ; multiply without fl change 3290 mov di, word [ss:pm_2_86m_0] 3291 mov bx, word [ss:code_seg + bx + di] 3292 mov word [bp + ?index_segment], bx 3293 pop di 3294 pop bx 3295 lleave 3296 lret 3297 3298 usesection lDEBUG_DATA_ENTRY 3299 .table: 3300 db 0 3301 db code2_seg - code_seg 3302 3303 hiddenusesection %$currentname 3304 %endif 3305 3306 3307 %ifn _DUALCODE && ! _PM && _DUALCODENEARDUAL 3308 %$currentname %+ _to_ %+ %$othername %+ _nearcall_helper: 3309 push ax ; return_offset 3310 push ax ; placeholder 3311 push ax ; chain 3312 push ax ; chain 3313 lframe 0 3314 lpar word, offset_segment 3315 lpar word, return_offset ; far return 3316 lpar word, placeholder ; near return 3317 lpar dword, chain ; far target address 3318 lenter 3319 push bx 3320 mov bx, word [bp + ?offset_segment] 3321 %if _DEBUG 3322 mov word [bp + ?return_offset], bx 3323 push word [cs:bx + 2] 3324 %else 3325 push word [cs:bx] 3326 lea bx, [bx + 2] 3327 mov word [bp + ?return_offset], bx 3328 %endif 3329 pop word [bp + ?chain] 3330 3331 %if _PM 3332 mov bx, word [ss:pm_2_86m_0] 3333 %if %$$othersegvar + 2 != %$$otherselvar 3334 %error Expected sel variable after seg variable 3335 %endif 3336 mov bx, word [ss:%$$othersegvar + bx] 3337 %else 3338 mov bx, word [ss:%$$othersegvar] 3339 %endif 3340 mov word [bp + ?chain + 2], bx 3341 %if _PM 3342 mov word [bp + ?offset_segment], %$$currentindex 3343 %else 3344 mov word [bp + ?offset_segment], cs 3345 %endif 3346 mov word [bp + ?placeholder], %$$othername %+ _retf_from_dual 3347 pop bx 3348 lleave 3349 retf 3350 3351 %$currentname %+ _retf_from_dual: 3352 dualreturn 3353 retf 3354 %endif 3355 3356 3357 %assign %$counter %$counter + 1 3358 %endrep 3359 %pop 3360 %endif 3361 3362 3363 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 3363 ------------------ note: usesection lDEBUG_CODE 3364 3365 %if _SYMBOLIC 3366 %ifn _LINK || _LINK_COMPAT 3367 %include "symbols.asm" 3368 %endif 3369 %else 3370 3371 %if _PM 3372 3373 3374 hiddenusesection SECTION_OF_ %+ selector_to_segment 3375 3376 ; For branches other than symbolic, here's selector_to_segment 3377 ; (as used by the puts in lineio.asm). Picked from symsnip 3378 ; binsrch.asm at revision 9c232415d568. 3379 ; INP: word [ss:sp] = selector to access 3380 ; OUT: word [ss:sp] = segment value to use for access 3381 ; CHG: - 3382 dualfunction 3383 selector_to_segment: section_of_function 3384 lframe dualdistance 3385 lpar word, in_selector_out_segment 3386 lpar_return 3387 lenter 3388 3389 call _CURRENT_SECTION %+ _ispm 3390 ; is it PM ? 3391 jnz .ret ; no, 86M --> (selector == segment) 3392 3393 subcpu 286 3394 push ax 3395 push bx 3396 push cx 3397 push dx 3398 3399 mov bx, word [bp + ?in_selector_out_segment] 3400 mov ax, 6 3401 int 31h ; get segment base to cx:dx 3402 shr dx, 4 3403 shl cx, 12 3404 or dx, cx 3405 mov word [bp + ?in_selector_out_segment], dx 3406 3407 pop dx 3408 pop cx 3409 pop bx 3410 pop ax 3411 subcpureset 3412 3413 .ret: 3414 lleave 3415 dualreturn 3416 lret 3417 %endif 3418 3419 %endif 3420 3421 3422 ; support functions for symbols.asm 3423 usesection lDEBUG_CODE 3423 ------------------ note: usesection lDEBUG_CODE 3424 %if _PM 3425 dualfunction 3426 push_cxdx_or_edx: section_of_function 3427 lframe dualdistance 3428 lpar dword, return 3429 lpar_return 3430 lenter 3431 _no386 push cx 3432 _386_o32 3433 push dx 3434 pop word [bp + ?return] 3435 pop word [bp + ?return + 2] 3436 lleave 3437 dualreturn 3438 lret 3439 %endif 3440 3441 ; INP: ds:dx -> message 3442 ; cx = length 3443 ; CHG: - 3444 ; STT: ds, es don't care 3445 disp_message_length_cx: section_of_function 0 00000762 50 push ax 0 00000763 53 push bx 0 00000764 51 push cx 0 00000765 52 push dx 0 00000766 06 push es 0 00000767 1E push ds 0 00000768 1E push ds 0 00000769 07 pop es ; es:dx -> message, cx = length 0 0000076A 16 push ss 0 0000076B 1F pop ds ; ds = ss (required for puts) 0 0000076C E8[0000] call puts 0 0000076F 1F pop ds 0 00000770 07 pop es 0 00000771 5A pop dx 0 00000772 59 pop cx 0 00000773 5B pop bx 0 00000774 58 pop ax 0 00000775 C3 retn 3464 3465 ; INP: ds:dx -> message, ASCIZ 3466 ; CHG: - 3467 ; STT: ds, es don't care 3468 disp_message: section_of_function 0 00000776 06 push es 0 00000777 1E push ds 0 00000778 07 pop es ; es:dx -> message 0 00000779 E8[0000] call putsz ; (sets up ds = ss internally) 0 0000077C 07 pop es 0 0000077D C3 retn 3475 3476 ; INP: al = character to display 3477 ; CHG: - 3478 ; STT: ds, es don't care 3479 %ifn _LINK 3480 disp_al: equ putc 3481 %endif 3482 3483 3484 ; Display number in ax hexadecimal, always 4 digits 3485 ; 3486 ; INP: ax = number 3487 ; OUT: displayed using disp_al 3488 ; CHG: none 3489 disp_ax_hex: section_of_function 0 0000077E 86C4 xchg al, ah 0 00000780 E80200 nearcall disp_al_hex 0 00000783 86C4 xchg al, ah 3493 disp_al_hex: section_of_function 0 00000785 51 push cx 0 00000786 B104 mov cl, 4 0 00000788 D2C0 rol al, cl 0 0000078A E80300 nearcall disp_al_nybble_hex 0 0000078D D2C0 rol al, cl 0 0000078F 59 pop cx 3500 disp_al_nybble_hex: section_of_function 0 00000790 50 push ax 0 00000791 240F and al, 0Fh 0 00000793 0430 add al, '0' 0 00000795 3C39 cmp al, '9' 0 00000797 7602 jbe @F 0 00000799 0407 add al, -'9' -1 +'A' 3507 @@: 0 0000079B E8[0000] nearcall disp_al 0 0000079E 58 pop ax 0 0000079F C3 retn 3511 3512 3513 ; Display number in ax decimal 3514 ; 3515 ; INP: ax = number 3516 ; OUT: displayed using disp_al 3517 ; CHG: none 3518 disp_ax_dec: section_of_function ; ax (no leading zeros) 0 000007A0 53 push bx 0 000007A1 31DB xor bx, bx 3521 .pushax: 0 000007A3 52 push dx 0 000007A4 50 push ax 0 000007A5 08DB or bl, bl 0 000007A7 7405 jz .nobl 0 000007A9 80EB05 sub bl, 5 0 000007AC F6DB neg bl 3528 .nobl: 0 000007AE 51 push cx 0 000007AF B91027 mov cx, 10000 0 000007B2 E81B00 call .divide_out 0 000007B5 B9E803 mov cx, 1000 0 000007B8 E81500 call .divide_out 0 000007BB B96400 mov cx, 100 0 000007BE E80F00 call .divide_out 0 000007C1 B10A mov cl, 10 0 000007C3 E80A00 call .divide_out 3538 ; (Divisor 1 is useless) 0 000007C6 0430 add al, '0' 0 000007C8 E8[0000] nearcall disp_al 0 000007CB 59 pop cx 0 000007CC 58 pop ax 0 000007CD 5A pop dx 0 000007CE 5B pop bx ; Caller's register 0 000007CF C3 retn 3546 3547 3548 ; INP: ax = number 3549 ; cx = divisor 3550 ; OUT: ax = remainder of operation 3551 ; result displayed 3552 .divide_out: 0 000007D0 52 push dx 0 000007D1 31D2 xor dx, dx 0 000007D3 F7F1 div cx ; 0:ax / cx 0 000007D5 52 push dx ; remainder 0 000007D6 FECB dec bl 0 000007D8 7503 jnz .nobl2 0 000007DA 80CF01 or bh, 1 3560 .nobl2: 0 000007DD 08C7 or bh, al 0 000007DF 7405 jz .leadingzero 0 000007E1 0430 add al, '0' 0 000007E3 E8[0000] nearcall disp_al ; display result 3565 .leadingzero: 0 000007E6 58 pop ax ; remainder 0 000007E7 5A pop dx 0 000007E8 C3 retn 3569 3570 3571 %ifn _LINK || _LINK_COMPAT 3572 %if !_LOADER 3573 %include "cc.asm" 3574 %endif 3575 3576 3577 %include "bb.asm" 3578 3579 3580 %include "ee.asm" 3581 3582 3583 %include "ff.asm" 3584 3585 3586 %include "hh.asm" 3587 3588 3589 %include "iioo.asm" 3590 %endif 3591 3592 3593 usesection lDEBUG_CODE 3593 ------------------ note: usesection lDEBUG_CODE 3594 3595 %if _PM == 0 && _ELDLINKINFO 3596 ispm: section_of_function 0 000007E9 85E4 test sp, sp ; NZ, NC 0 000007EB C3 retn 3599 3600 test_d_b_bit: section_of_function 3601 test_high_limit: section_of_function 0 000007EC 38C0 cmp al, al ; ZR, NC 0 000007EE C3 retn 3604 3605 setes2dx: section_of_function 0 000007EF 8EC2 mov es, dx 0 000007F1 C3 retn 3608 3609 call_int2D: section_of_function 0 000007F2 CD2D int 2Dh 0 000007F4 C3 retn 3612 3613 _doscall: section_of_function 3614 doscall_extseg: section_of_function 0 000007F5 CD21 int 21h 0 000007F7 C3 retn 3617 3618 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 3618 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 000013F4 00 dpmi32: db 0 3620 3621 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 3621 ------------------ note: usesection lDEBUG_CODE 3622 %endif 3623 3624 %if _PM 3625 3626 %if _DUALCODE 3627 %assign REPEAT 2 3628 %else 3629 %assign REPEAT 1 3630 %endif 3631 3632 usesection lDEBUG_CODE 3633 %rep REPEAT 3634 ; OUT: NC 3635 ; ZR if in protected mode 3636 ; NZ otherwise 3637 ; STT: - 3638 ; ([internalflags] & nodosloaded, [internalflags] & protectedmode set up) 3639 _CURRENT_SECTION %+ _ispm: 3640 push ax 3641 %if protectedmode & ~0FF00h 3642 %error Internal flags re-ordered, adjust code here 3643 %endif 3644 mov al, byte [ss:internalflags+1] ; get flag byte 3645 and al, protectedmode>>8 ; separate PM flag 3646 xor al, protectedmode>>8 ; ZR if in PM (NC) 3647 pop ax 3648 retn 3649 3650 usesection lDEBUG_CODE2 3651 %endrep 3652 usesection lDEBUG_CODE 3653 ispm equ _CURRENT_SECTION %+ _ispm 3654 check_section_of ispm 3655 3656 %endif 3657 3658 3659 setpspdbg: 3660 %if _PM 3661 mov bx, word [pspdbg] 3662 %else 0 000007F8 8CD3 mov bx, ss ; = word [pspdbg] (if _PM=0 or in 86M) 3664 %endif 3665 3666 setpsp: 3667 %if _APPLICATION || _DEVICE 3668 %if _BOOTLDR 0 000007FA F606[D901]40 testopt [internalflags], nodosloaded 0 000007FF 7561 jnz .ret ; no PSPs --> 3671 %endif 3672 3673 %if _USESDA 0 00000801 833E[760C]FF cmp word [pSDA+0], byte -1 0 00000806 7411 je .int21 3676 3677 .86m: 0 00000808 1E push ds 0 00000809 56 push si 0 0000080A BE[780C] mov si, pSDA + so16aSegSel 0 0000080D E8E90A call update_dosdata_segment 0 00000810 C574FE lds si, [si - so16aSegSel] 0 00000813 895C10 mov word [si+10h], bx ; set PSP segment 0 00000816 5E pop si 0 00000817 1F pop ds 0 00000818 C3 retn 3687 3688 .int21: 3689 %endif 0 00000819 B450 mov ah, 50h 3691 %if _PM 3692 call ispm 3693 jnz .int21_86m 3694 %if _NOEXTENDER 3695 jmp _doscall.pm ; insure non-extended (set to bx = PSP segment) 3696 %else 3697 mov ax, 0002h 3698 int 31h ; segment to selector 3699 xchg bx, ax ; bx = selector 3700 mov ah, 50h ; reset to function number 3701 %endif 3702 .int21_86m: 3703 %endif 0 0000081B EB39 jmp _int21 3705 %else 3706 retn 3707 %endif 3708 3709 3710 getpsp: 3711 %if _APPLICATION || _DEVICE 3712 %if _BOOTLDR 0 0000081D 31DB xor bx, bx ; = placeholder value if no PSPs 0 0000081F F606[D901]40 testopt [internalflags], nodosloaded 0 00000824 753C jnz .ret ; no PSPs --> 3716 %endif 3717 %if _USESDA 0 00000826 833E[760C]FF cmp word [pSDA+0], byte -1 0 0000082B 7411 je .int21 0 0000082D 1E push ds 0 0000082E 56 push si 0 0000082F BE[780C] mov si, pSDA + so16aSegSel 0 00000832 E8C40A call update_dosdata_segment 0 00000835 C574FE lds si, [si - so16aSegSel] 0 00000838 8B5C10 mov bx, word [si + 10h] ; bx = PSP segment 0 0000083B 5E pop si 0 0000083C 1F pop ds 0 0000083D C3 retn 3729 3730 .int21: 3731 %endif 0 0000083E B451 mov ah, 51h 3733 %if _PM 3734 call ispm 3735 jnz .int21_86m 3736 %if _NOEXTENDER 3737 jmp _doscall.pm ; insure non-extended (bx = PSP segment) 3738 %else 3739 call _int21 ; get PSP as a selector 3740 push bx 3741 dualcall selector_to_segment 3742 pop bx ; bx = PSP segment 3743 retn 3744 %endif 3745 .int21_86m: 3746 %endif 0 00000840 EB14 jmp _int21 ; in 86 Mode call DOS the normal way 3748 %else 3749 xor bx, bx ; = placeholder value if no PSPs 3750 retn 3751 %endif 3752 3753 3754 dual2function 3755 _doscall_return_es: section_of_function 3756 _doscall_return_es_parameter_es_ds: section_of_function 3757 lframe dual2distance 3758 lpar word, es_ds_value 3759 lpar_return 3760 %if _PM 3761 lvar word, int_number 3762 lenter 3763 mov word [bp + ?int_number], 21h 3764 push di 3765 mov di, word [ss:pm_2_86m_0] 3766 jmp near word [ss:.table + di] 3767 3768 usesection lDEBUG_DATA_ENTRY 3769 ; REM: Dispatch table in section lDEBUG_CODE 3770 align 2, db 0 3771 .table: 3772 dw .86m 3773 dw .pm 3774 3775 usesection lDEBUG_CODE 3776 .pm: 3777 pop di 3778 push word [bp + ?es_ds_value] 3779 push word [bp + ?es_ds_value] 3780 push word [bp + ?int_number] 3781 push word [bp + ?frame_bp] 3782 call intcall_return_parameter_es_parameter_ds 3783 pop word [bp + ?es_ds_value] ; discard returned ds 3784 pop word [bp + ?es_ds_value] ; get es 3785 jmp .ret 3786 .86m: 3787 pop di 3788 %else 0 00000842 5589E5 lenter 3790 %endif 0 00000845 06 push es 0 00000846 1E push ds 0 00000847 8E5E04 mov ds, word [bp + ?es_ds_value] 0 0000084A 8E4604 mov es, word [bp + ?es_ds_value] 0 0000084D CD21 int 21h 0 0000084F 8C4604 mov word [bp + ?es_ds_value], es 0 00000852 1F pop ds 0 00000853 07 pop es 3799 .ret: 0 00000854 5D lleave 3801 dual2return 0 00000855 C3 lret 3803 3804 3805 ; Execute real Int21 instruction. If this is in PM it might get extended. 3806 _int21: 3807 %if _APPLICATION || _DEVICE 3808 %if _BOOTLDR 0 00000856 9C pushf 0 00000857 36F606[D901]40 testopt [ss:internalflags], nodosloaded 0 0000085D 7504 jnz .reterr ; no Int21 --> (throw?) 0 0000085F 9D popf 3813 %endif 0 00000860 CD21 int 21h 3815 setpsp.ret: equ $ 3816 getpsp.ret: equ $ 0 00000862 C3 retn 3818 %if _BOOTLDR 3819 .reterr: 0 00000863 9D popf 0 00000864 B80100 mov ax, 1 0 00000867 F9 stc 0 00000868 C3 retn 3824 %endif 3825 %else 3826 mov ax, 1 3827 stc 3828 retn 3829 %endif 3830 3831 3832 %if _PM 3833 intcall_return_parameter_es_parameter_ds: 3834 lframe near 3835 lpar word, es_value 3836 lpar word, ds_value 3837 lpar_return 3838 lpar word, int_number 3839 lpar word, bp_value 3840 lvar 32h, 86m_call_struc 3841 lenter 3842 push es 3843 mov word [bp + ?86m_call_struc +00h], di ; edi 3844 mov word [bp + ?86m_call_struc +04h], si ; esi 3845 mov word [bp + ?86m_call_struc +10h], bx ; ebx 3846 mov word [bp + ?86m_call_struc +14h], dx ; edx 3847 mov word [bp + ?86m_call_struc +18h], cx ; ecx 3848 mov word [bp + ?86m_call_struc +1Ch], ax ; eax 3849 mov ax, word [bp + ?bp_value] 3850 mov word [bp + ?86m_call_struc +08h], ax ; bp 3851 mov al, 0 ; (preserve flags!) 3852 lahf 3853 xchg al, ah 3854 mov word [bp + ?86m_call_struc +20h], ax ; flags 3855 xor ax, ax 3856 mov word [bp + ?86m_call_struc +0Ch + 2], ax 3857 mov word [bp + ?86m_call_struc +0Ch], ax 3858 mov word [bp + ?86m_call_struc +2Eh], ax ; sp 3859 mov word [bp + ?86m_call_struc +30h], ax ; ss 3860 mov ax, word [bp + ?es_value] ; usually [pspdbg] 3861 mov word [bp + ?86m_call_struc +22h], ax ; es 3862 mov ax, word [bp + ?ds_value] ; usually [pspdbg] 3863 mov word [bp + ?86m_call_struc +24h], ax ; ds 3864 push ss 3865 pop es ; => stack 3866 lea di, [bp + ?86m_call_struc] ; -> 86-Mode call structure 3867 _386 movzx edi, di ; (previously checked b[dpmi32] here) 3868 mov bx, word [bp + ?int_number] ; int# 3869 xor cx, cx 3870 mov ax, 0300h 3871 int 31h 3872 mov ah, byte [bp + ?86m_call_struc +20h] ; flags 3873 sahf 3874 mov di, word [bp + ?86m_call_struc +00h] ; edi 3875 mov si, word [bp + ?86m_call_struc +04h] ; esi 3876 mov bx, word [bp + ?86m_call_struc +10h] ; ebx 3877 mov dx, word [bp + ?86m_call_struc +14h] ; edx 3878 mov cx, word [bp + ?86m_call_struc +18h] ; ecx 3879 mov ax, word [bp + ?86m_call_struc +1Ch] ; eax 3880 push word [bp + ?86m_call_struc +22h] ; return es value 3881 pop word [bp + ?es_value] ; in the parameter 3882 push word [bp + ?86m_call_struc +24h] ; return ds value 3883 pop word [bp + ?ds_value] ; in the parameter 3884 pop es 3885 lleave 3886 lret 3887 3888 intcall: 3889 lframe near 3890 lpar word, es_ds_value 3891 lpar word, int_number 3892 lenter 3893 push word [bp + ?es_ds_value] ; es 3894 push word [bp + ?es_ds_value] ; ds 3895 push word [bp + ?int_number] ; int number 3896 push word [bp + ?frame_bp] ; bp 3897 call intcall_return_parameter_es_parameter_ds 3898 ; (discard returned parameters ?es_value, ?ds_value, done by lleave) 3899 lleave , forcerestoresp 3900 lret 3901 3902 3903 %if _EXTENSIONS 3904 intcall_ext_return_es: section_of_function 3905 lframe 6 3906 lpar word, es_ds_value 3907 lpar word, int_number 3908 lpar_return 3909 lenter 3910 push word [bp + ?es_ds_value] ; es 3911 push word [bp + ?es_ds_value] ; ds 3912 push word [bp + ?int_number] ; int number 3913 push word [bp + ?frame_bp] ; bp 3914 call intcall_return_parameter_es_parameter_ds 3915 pop word [bp + ?es_ds_value] ; discard ds 3916 pop word [bp + ?es_ds_value] ; return es 3917 lleave , optimiserestoresp 3918 retn 3919 3920 3921 doscall_extseg: section_of_function 3922 pushf 3923 call ispm 3924 jnz .rm 3925 subcpu 286 3926 popf 3927 .pm: 3928 push word [ss:extseg] 3929 push 21h 3930 call intcall 3931 retn 3932 subcpureset 3933 .rm: 3934 popf 3935 jmp _int21 3936 %endif 3937 3938 call_int2D: section_of_function 3939 call ispm 3940 jnz short .rm 3941 subcpu 286 3942 push word [ss:pspdbg] ; es ds value. generally unused 3943 push 2Dh ; interrupt 2Dh 3944 call intcall ; call it 3945 retn 3946 subcpureset 3947 .rm: 3948 int 2Dh ; directly call int 2Dh 3949 retn 3950 3951 3952 ; Called in PM only, ds unknown. 3953 ; 3954 ; INP: - 3955 ; OUT: CY if no DOS extender available ("MS-DOS" on Int2F.168A) 3956 ; NC if DOS extender available 3957 ; CHG: - 3958 isextenderavailable: 3959 subcpu 286 3960 push ds 3961 push es 3962 pusha 3963 push ss 3964 pop ds 3965 mov si, msg.msdos 3966 _386 movzx esi, si 3967 mov ax, 168Ah 3968 int 2Fh 3969 cmp al, 1 ; CY if al is zero 3970 cmc ; NC if al is zero, CY else 3971 popa 3972 pop es 3973 pop ds 3974 retn 3975 subcpureset 3976 3977 nodosextinst: 3978 push ss 3979 pop ds 3980 mov ax, 013Dh 3981 call setrc 3982 mov dx, nodosext 3983 jmp putsz 3984 %endif 3985 3986 3987 %ifn _LINK || _LINK_COMPAT 3988 %if !_LOADER 3989 %include "ll.asm" 3990 %endif 3991 3992 3993 %include "mm.asm" 3994 %endif 3995 3996 3997 usesection lDEBUG_CODE 3997 ------------------ note: usesection lDEBUG_CODE 3998 3999 %if !_LOADER 4000 ; K command - enter Kommand line in new style 4001 ; N command - change the Name of the program being debugged 4002 ; 4003 ; N command is subject to weird Microsoft compatibility if 4004 ; an options2 flag is set. In this mode, the entire line_in 4005 ; contents after the N command are used for the command line 4006 ; tail rather than only the tail after the program name. 4007 ; (Yes, really.) Also, the debuggee ds is assumed to point 4008 ; to a PSP and the FCBs and command line tail are written 4009 ; to this segment. 4010 %if _MS_N_COMPAT 4011 nn: 0 00000869 800E[DF01]80 setopt [internalflags2], dif2_nn_capitalise 4013 ; prepare old style (MS Debug compatibility) 0 0000086E F606[A601]02 testopt [options2], opt2_nn_capitalise 0 00000873 7505 jnz @F ; leave it set --> 0 00000875 8026[DF01]7F clropt [internalflags2], dif2_nn_capitalise 4017 ; disable old style, use new style 4018 @@: 4019 0 0000087A 800E[DF01]40 setopt [internalflags2], dif2_nn_compat 4021 ; prepare old style (MS Debug compatibility) 0 0000087F F606[A601]01 testopt [options2], opt2_nn_compat 0 00000884 750C jnz @FF ; leave it set --> 0 00000886 EB05 jmp @F 4025 kk: 0 00000888 8026[DF01]7F clropt [internalflags2], dif2_nn_capitalise 4027 ; also disable capitalisation 4028 @@: 0 0000088D 8026[DF01]BF clropt [internalflags2], dif2_nn_compat 4030 ; disable old style, use new style 4031 @@: 4032 %else 4033 kk: 4034 nn: 4035 %endif 0 00000892 16 push ss 0 00000893 07 pop es 4038 4039 %if _MS_N_COMPAT 0 00000894 4E dec si ; -> first non-blank 4041 @@: 0 00000895 4E dec si ; -> before prior start of command 0 00000896 803C20 cmp byte [si], 32 ; blank ? 0 00000899 74FA je @B 0 0000089B 803C09 cmp byte [si], 9 0 0000089E 74F5 je @B ; yes, decrement --> 0 000008A0 803C2C cmp byte [si], ',' 0 000008A3 74F0 je @B 0 000008A5 46 inc si ; restore -> start of command (first blank, if any) 0 000008A6 AC lodsb ; make al = first text byte, si -> after 4051 %endif 4052 4053 %if _BOOTLDR 4054 %if _APPLICATION || _DEVICE 0 000008A7 36F606[D901]40 testopt [ss:internalflags], nodosloaded 0 000008AD 740C jz @F 4057 %endif 0 000008AF BA[0000] mov dx, msg.nobootsupp 0 000008B2 B81901 mov ax, 0119h 0 000008B5 E81209 call setrc 0 000008B8 E9[0000] jmp putsz 4062 @@: 4063 %endif 4064 %if _APPLICATION || _DEVICE 4065 %if _MS_N_COMPAT 0 000008BB F606[DF01]40 testopt [internalflags2], dif2_nn_compat 0 000008C0 7405 jz @F 0 000008C2 E89800 call nn_copy_to_line_out 0 000008C5 4E dec si 0 000008C6 AC lodsb ; restore al 4071 @@: 4072 %endif 0 000008C7 BF8000 mov di, DTA ; destination address 4074 %if _MS_N_COMPAT ; (not needed if not including the blank scan) 0 000008CA E8[0000] call skipcomm0 ; skip blanks before program load filename 4076 %endif 4077 4078 ; Copy and canonicalize file name. 4079 nn1: 0 000008CD 81FF[6E01] cmp di, N_BUFFER_END 0 000008D1 7313 jae .toolong 0 000008D3 E88B01 call ifsep ; check for separators CR, blank, tab, comma, ;, = 0 000008D6 742E je nn3 ; if end of file name 0 000008D8 363A06[A30C] cmp al, byte [ss:swch1] 4085 ; The use of ss here appears to be intended to 4086 ; allow loading from ds different from the 4087 ; data entry and PSP segment, However, the 4088 ; subsequent copy of the command tail around 4089 ; nn4 does not participate in this scheme. 4090 ; So if this is used make sure to adjust that. 0 000008DD 7427 je nn3 ; if '/' (and '/' is the switch character) 0 000008DF E8[0000] call capitalise 0 000008E2 AA stosb 0 000008E3 AC lodsb 0 000008E4 EBE7 jmp short nn1 ; back for more 4096 4097 .toolong: 4098 nn4.toolong: 0 000008E6 16 push ss 0 000008E7 1F pop ds 0 000008E8 BA[0000] mov dx, msg.n_toolongname 0 000008EB E8[0000] call putsz 0 000008EE B82601 mov ax, 0126h 0 000008F1 E8D608 call setrc 0 000008F4 BF[6B01] mov di, N_BUFFER_END - 3 0 000008F7 B000 mov al, 0 ; truncate the name 0 000008F9 AA stosb 0 000008FA A2[580D] mov byte [fileext], al ; invalid / none 0 000008FD 893E[E20D] mov word [execblk.cmdline], di 0 00000901 B8000D mov ax, 13 << 8 ; 0 in low byte (tail length), CR in high byte 0 00000904 AB stosw 0 00000905 C3 retn 4113 4114 4115 nn3: 0 00000906 16 push ss 0 00000907 1F pop ds 0 00000908 B000 mov al, 0 ; null terminate the file name string 0 0000090A AA stosb 0 0000090B 893E[E20D] mov word [execblk.cmdline], di 4121 ; save start of command tail 4122 4123 %if _DEBUG4 4124 push dx 4125 mov dx, DTA 4126 call d4disp_msg 4127 mov dx, crlf 4128 call d4disp_msg 4129 pop dx 4130 %endif 4131 ; Determine file extension 0 0000090F 81FF8100 cmp di, DTA+1 0 00000913 7438 je nn3d ; if no file name at all 0 00000915 81FF8500 cmp di, DTA+5 0 00000919 7230 jb nn3c ; if no extension (name too short) 0 0000091B B008 mov al, EXT_HEX 0 0000091D 817DFB2E48 cmp word [di-5], ".H" 0 00000922 7507 jne nn3a ; if not .HEX 0 00000924 817DFD4558 cmp word [di-3], "EX" 0 00000929 7422 je nn3d ; if .HEX 4141 nn3a: 0 0000092B B004 mov al, EXT_EXE 0 0000092D 817DFB2E45 cmp word [di-5], ".E" 0 00000932 7507 jne nn3b ; if not .EXE 0 00000934 817DFD5845 cmp word [di-3], "XE" 0 00000939 7412 je nn3d ; if .EXE 4147 nn3b: 0 0000093B B002 mov al, EXT_COM 0 0000093D 817DFB2E43 cmp word [di-5], ".C" 0 00000942 7507 jne nn3c ; if not .COM 0 00000944 817DFD4F4D cmp word [di-3], "OM" 0 00000949 7402 je nn3d ; if .COM 4153 nn3c: 0 0000094B B001 mov al, EXT_OTHER 4155 nn3d: 0 0000094D A2[580D] mov byte [fileext], al 4157 4158 ; Finish the N command 0 00000950 57 push di 4160 %if _MS_N_COMPAT 0 00000951 F606[DF01]40 testopt [internalflags2], dif2_nn_compat 0 00000956 751D jnz @F 0 00000958 E80200 call nn_copy_to_line_out 0 0000095B EB18 jmp @F 4165 4166 ; INP: si - 1 -> command line tail 4167 ; OUT: line_out has tail, terminated by 0 or 13 (CR) 4168 ; CHG: di, al 4169 nn_copy_to_line_out: 0 0000095D 56 push si 4171 %endif 0 0000095E BF[CE0A] mov di, line_out 0 00000961 4E dec si 4174 nn4: 0 00000962 AC lodsb ; copy the remainder to line_out 0 00000963 F606[DF01]80 testopt [internalflags2], dif2_nn_capitalise 0 00000968 7403 jz .nocaps 0 0000096A E8[0000] call capitalise 4179 .nocaps: 0 0000096D AA stosb 0 0000096E E8[0000] call iseol?.notsemicolon 0 00000971 75EF jne nn4 4183 %if _MS_N_COMPAT 0 00000973 5E pop si 0 00000974 C3 retn 4186 4187 @@: 4188 %endif 0 00000975 E86209 call InDOS 0 00000978 740E jz .fcb_setup 4191 %if _DEVICE 0 0000097A F606[EE01]40 testopt [internalflags6], dif6_device_mode 0 0000097F 7505 jnz @F 4194 %endif 0 00000981 8326[F80D]00 and word [reg_eax], 0 4196 @@: 0 00000986 EB23 jmp .fcb_none 4198 4199 .fcb_setup: 4200 ; Set up FCBs. 0 00000988 BE[CE0A] mov si, line_out 0 0000098B BF5C00 mov di, 5Ch 0 0000098E E87A00 call nn6 ; do first FCB 4204 %if _DEVICE 0 00000991 F606[EE01]40 testopt [internalflags6], dif6_device_mode 0 00000996 7503 jnz @F 4207 %endif 0 00000998 A2[F80D] mov byte [reg_eax], al 4209 @@: 0 0000099B BF6C00 mov di, 6Ch 0 0000099E E86A00 call nn6 ; second FCB 4212 %if _DEVICE 0 000009A1 F606[EE01]40 testopt [internalflags6], dif6_device_mode 0 000009A6 7503 jnz @F 4215 %endif 0 000009A8 A2[F90D] mov byte [reg_eax+1], al 4217 @@: 4218 .fcb_none: 4219 4220 ; Copy command tail. 0 000009AB BE[CE0A] mov si, line_out 0 000009AE 5F pop di 0 000009AF 81FF[6C01] cmp di, N_BUFFER_END - 2 0 000009B3 7203E92EFF jae .toolong 0 000009B8 57 push di ; -> counter byte 0 000009B9 47 inc di ; -> first byte of buffer 0 000009BA 8D5D7F lea bx, [di + 127] ; -> behind last byte of PSP target buffer 4228 ; (within 128 bytes the CR must be written) 0 000009BD B8[6E01] mov ax, N_BUFFER_END ; -> behind last byte in our N buffer 0 000009C0 39C3 cmp bx, ax ; use whichever limit is smaller 0 000009C2 7202 jb @F 0 000009C4 89C3 mov bx, ax ; N buffer is smaller, use it as limit 4233 @@: 4234 nn5: 0 000009C6 39DF cmp di, bx ; can store one more (possibly CR) ? 0 000009C8 7331 jae .toolong ; no --> 0 000009CA AC lodsb 0 000009CB AA stosb ; store byte 0 000009CC E8[0000] call iseol?.notsemicolon; end of string ? 0 000009CF 75F5 jne nn5 ; if not end of string --> 4241 .toolong_terminate: ; jump destination from .toolong 0 000009D1 C645FF0D mov byte [di - 1], 13 ; (just overwrite this unconditionally) 0 000009D5 57 push di 0 000009D6 89F9 mov cx, di 0 000009D8 81E9[6E01] sub cx, N_BUFFER_END 0 000009DC F7D9 neg cx 0 000009DE 31C0 xor ax, ax 0 000009E0 F3AA rep stosb 0 000009E2 5F pop di 0 000009E3 58 pop ax ; recover old DI 0 000009E4 97 xchg ax, di 0 000009E5 29F8 sub ax, di ; compute length of tail 4253 %if _MS_N_COMPAT 0 000009E7 89C1 mov cx, ax 4255 %endif 0 000009E9 48 dec ax 0 000009EA 48 dec ax 0 000009EB AA stosb 4259 %if _MS_N_COMPAT 0 000009EC F606[DF01]40 testopt [internalflags2], dif2_nn_compat 0 000009F1 7407 jz @F 0 000009F3 8E06[180E] mov es, word [reg_ds] ; modify current ds, assuming a PSP 0 000009F7 E8[0000] call ll_copy_cmdline_and_fcbs.have_cx 4264 @@: 4265 %endif 4266 %if _DEBUG4 4267 mov dx, DTA 4268 call d4disp_msg 4269 mov dx, crlf 4270 call d4disp_msg 4271 %endif 0 000009FA C3 retn ; done 4273 4274 .toolong: 0 000009FB BA[0000] mov dx, msg.n_toolongtail 0 000009FE E8[0000] call putsz 0 00000A01 B82701 mov ax, 0127h 0 00000A04 E8C307 call setrc 0 00000A07 89DF mov di, bx 0 00000A09 EBC6 jmp .toolong_terminate 4281 4282 4283 ; Subroutine to process an FCB. 4284 ; 4285 ; INP: di -> FCB 4286 ; si -> input 4287 nn6: 0 00000A0B AC lodsb 0 00000A0C E8[0000] call iseol?.notsemicolon 0 00000A0F 740B je nn7 ; if end 0 00000A11 E84D00 call ifsep 0 00000A14 74F5 je nn6 ; if separator (other than CR) 0 00000A16 3A06[A20C] cmp al, byte [switchar] 0 00000A1A 741B je nn10 ; if switch character 4295 nn7: 0 00000A1C 4E dec si 0 00000A1D B80129 mov ax, 2901h ; parse filename 4298 doscall 0 00000A20 CD21 int 21h 0 00000A22 50 push ax ; save AL 4300 nn8: 0 00000A23 AC lodsb ; skip till separator 0 00000A24 E83A00 call ifsep 0 00000A27 7406 je nn9 ; if separator character (including CR) 0 00000A29 3A06[A30C] cmp al, byte [swch1] 0 00000A2D 75F4 jne nn8 ; if not switchar (sort of) 4306 nn9: 0 00000A2F 4E dec si 0 00000A30 58 pop ax ; recover AL 0 00000A31 3C01 cmp al, 1 0 00000A33 7501 jne nn9a ; if not 1 0 00000A35 48 dec ax 4312 nn9a: 0 00000A36 C3 retn 4314 4315 ; Handle a switch (differently). 0 00000A37 AC nn10: lodsb 0 00000A38 E8[0000] call iseol?.notsemicolon 0 00000A3B 74DF je nn7 ; if end of string 0 00000A3D E82100 call ifsep 0 00000A40 74F5 je nn10 ; if another separator (other than CR) 0 00000A42 B000 mov al, 0 0 00000A44 AA stosb 0 00000A45 4E dec si 0 00000A46 AC lodsb 0 00000A47 3C61 cmp al, 'a' 0 00000A49 7206 jb nn11 ; if not a lower case letter 0 00000A4B 3C7A cmp al, 'z' 0 00000A4D 7702 ja nn11 0 00000A4F 24DF and al, TOUPPER ; convert to upper case 0 00000A51 AA nn11: stosb 0 00000A52 B82020 mov ax, 32<<8|32 0 00000A55 AB stosw 0 00000A56 AB stosw 0 00000A57 AB stosw 0 00000A58 AB stosw 0 00000A59 AB stosw 0 00000A5A 31C0 xor ax, ax 0 00000A5C AB stosw 0 00000A5D AB stosw 0 00000A5E AB stosw 0 00000A5F AB stosw 0 00000A60 C3 retn ; return with al = 0 4343 4344 4345 ; Compare character with separators 4346 ; 4347 ; INP: al = character 4348 ; OUT: ZR if al is CR, NUL, blank, tab, comma, semicolon, or equal sign 4349 ; NZ else 4350 ; REM: This is only used for parsing FCBs. 4351 ifsep: section_of_function 0 00000A61 E8[0000] call iseol? ; semicolon or CR or NUL 0 00000A64 740E je .return 0 00000A66 3C20 cmp al, 32 0 00000A68 740A je .return 0 00000A6A 3C09 cmp al, 9 0 00000A6C 7406 je .return 0 00000A6E 3C2C cmp al, ',' 0 00000A70 7402 je .return 0 00000A72 3C3D cmp al, '=' 4361 .return: 0 00000A74 C3 retn 4363 %endif 4364 %endif 4365 4366 4367 %if _ELDLINKINFO && !_PM 4368 verifysegm_or_error: section_of_function 4369 verifysegm: section_of_function 0 00000A75 F8 clc 0 00000A76 C3 retn 4372 %endif 4373 4374 ; Ensure segment in bx is writeable 4375 ; 4376 ; INP: bx = selector/segment 4377 ; OUT: NC if in 86M, bx unchanged 4378 ; NC if in PM and bx not a code segment, bx unchanged 4379 ; NC if in PM and was a code segment, 4380 ; bx = word [scratchsel], set up to mirror INP:bx selector 4381 ; CY if in PM and a failure occurred, segment not writeable 4382 ; CHG: bx 4383 ; STT: ss = debugger data selector 4384 %if _PM 4385 verifysegm_or_error: section_of_function 4386 push bx 4387 call verifysegm 4388 jc .ro 4389 add sp, 2 ; (discard bx on stack) 4390 retn 4391 4392 .ro: 4393 push ss 4394 pop es 4395 call ee0a 4396 mov di, msg.readonly_verifysegm.selector 4397 pop ax ; get original selector 4398 call hexword 4399 mov dx, msg.readonly_verifysegm 4400 call putsz_error 4401 mov ax, 0109h 4402 call setrc 4403 jmp cmd3 4404 4405 4406 verifysegm: section_of_function 4407 call ispm 4408 jnz .rm ; (NC) 4409 push ax 4410 push es 4411 _386_o32 ; push edi 4412 push di 4413 push bp 4414 mov bp, sp 4415 sub sp, 8 4416 push ss 4417 pop es 4418 mov di, sp 4419 _386 movzx edi, di 4420 mov ax, 000Bh ; get descriptor 4421 int 31h 4422 jc @F 4423 test byte [di+5], 8 ; code segment ? 4424 jz @F ; (NC) no --> 4425 and byte [di+5], 0F3h ; reset CODE+conforming attr 4426 or byte [di+5], 2 ; set writable 4427 mov bx, word [scratchsel] 4428 mov ax, 000Ch 4429 int 31h 4430 @@: 4431 mov sp, bp 4432 pop bp 4433 _386_o32 ; pop edi 4434 pop di 4435 pop es 4436 pop ax 4437 .rm: 4438 .retn: 4439 retn 4440 4441 subcpu 286 4442 ; INP: dx = 86 Mode segment to access 4443 ; OUT: bx = scratch selector, addressing that segment, 4444 ; limit set to 64 KiB (allow all 16-bit accesses) 4445 ; CHG: - 4446 ; STT: ss = lDEBUG_DATA_ENTRY selector, in PM 4447 setrmsegm: section_of_function 4448 mov bx, word [ss:scratchsel] 4449 call setrmaddr 4450 4451 ; INP: bx = selector 4452 ; OUT: limit set to 0FFFFh 4453 ; STT: in PM 4454 setrmlimit: section_of_function 4455 push ax 4456 push cx 4457 push dx 4458 xor cx, cx 4459 ; _386 dec cx ; limit 0FFFF_FFFFh on 386+ 4460 ; We don't want that here. All users expect a 64 KiB segment. 4461 mov dx, -1 ; limit 0FFFFh on 286 4462 mov ax, 8 4463 int 31h ; set limit 4464 pop dx ; restore base segment 4465 pop cx 4466 pop ax 4467 retn 4468 4469 setrmaddr: ;<--- set selector in BX to segment address in DX 4470 .: 4471 push ax 4472 push cx 4473 push dx 4474 mov cx, dx 4475 shl dx, 4 4476 shr cx, 12 ; cx:dx = base address 4477 mov ax, 7 4478 int 31h ; set base 4479 pop dx 4480 pop cx 4481 pop ax 4482 retn 4483 4484 subcpureset 4485 %endif 4486 4487 ; Read a byte relative to cs:eip 4488 ; 4489 ; INP: reg_cs, reg_eip 4490 ; cx = (signed) eip adjustment 4491 ; OUT: al = byte at that address 4492 ; (e)bx = new offset (eip+adjustment) 4493 ; CHG: - 4494 getcseipbyte: 0 00000A77 06 push es 4496 %if _PM 4497 mov bx, word [reg_cs] 4498 mov es, bx 4499 call test_d_b_bit 4500 jz .16 4501 [cpu 386] 4502 mov ebx, dword [reg_eip] 4503 push edx 4504 movsx edx, cx 4505 add ebx, edx 4506 ..@getcseipbyte_fault_skip_6_near_call: 4507 mov al, byte [es:ebx] 4508 pop edx 4509 pop es 4510 retn 4511 __CPU__ 4512 .16: 4513 %else 0 00000A78 8E06[240E] mov es, word [reg_cs] 4515 %endif 0 00000A7C 8B1E[300E] mov bx, word [reg_eip] 0 00000A80 01CB add bx, cx 4518 ..@getcseipbyte_fault_skip_2_near_call: 0 00000A82 268A07 mov al, byte [es:bx] 0 00000A85 07 pop es 0 00000A86 C3 retn 4522 4523 ; Write to a byte relative to cs:eip 4524 ; 4525 ; INP: reg_cs, reg_eip 4526 ; cx = (signed) eip adjustment 4527 ; al = source byte to write 4528 ; OUT: NC if apparently written 4529 ; CY if failed to get a writeable selector 4530 ; CHG: (e)bx 4531 setcseipbyte: 0 00000A87 06 push es 4533 %if _PM 4534 mov bx, word [reg_cs] 4535 call verifysegm 4536 jc .ret 4537 mov es, bx 4538 call test_d_b_bit 4539 jz .16 4540 [cpu 386] 4541 mov ebx, dword [reg_eip] 4542 push edx 4543 movsx edx, cx 4544 ..@setcseipbyte_fault_skip_6_near_call: 4545 mov byte [es:ebx+edx],al 4546 pop edx 4547 pop es 4548 clc 4549 retn 4550 __CPU__ 4551 .16: 4552 %else 0 00000A88 8E06[240E] mov es, word [reg_cs] 4554 %endif 0 00000A8C 8B1E[300E] mov bx, word [reg_eip] 0 00000A90 01CB add bx, cx 4557 ..@setcseipbyte_fault_skip_2_near_call: 0 00000A92 268807 mov byte [es:bx], al 0 00000A95 F8 clc 4560 .ret: 0 00000A96 07 pop es 0 00000A97 C3 retn 4563 4564 ; Exchange byte with memory 4565 ; 4566 ; INP: bx:(e)dx-> destination byte 4567 ; al = source byte 4568 ; REM: Determines whether to use edx by the 4569 ; segment limit of the selector. 4570 ; (Uses in run.asm always pass a segmented 4571 ; address obtained from getsegmented. This 4572 ; will have edxh = 0 always so it doesn't 4573 ; matter whether we use edx or dx.) 4574 ; OUT: CY if failed due to segment not writable 4575 ; NC if successful, 4576 ; al = previous value of destination byte 4577 ; CHG: ah 4578 writemem: 4579 %if _DEBUG1 4580 push dx 4581 push ax 4582 4583 call getlinear_high_limit.do_not_use_test ; NB do NOT resetmode 4584 jc @F ; already an error ? then return --> (CY) 4585 push bx 4586 push cx 4587 mov bx, test_records_Writemem 4588 call handle_test_case_multiple_16 4589 ; check whether this should testcase the error 4590 ; CY to indicate error from this call 4591 pop cx 4592 pop bx 4593 @@: 4594 pop ax 4595 pop dx 4596 jnc .do_not_use_test 4597 retn ; return CY here 4598 4599 %endif 4600 .do_not_use_test: 4601 0 00000A98 88C4 mov ah, al 4603 %if _PM 4604 call ispm 4605 jnz .16 ; (NC from ispm) --> 4606 call verifysegm ; make bx a writeable segment 4607 jc .ret 4608 _386_PM call test_high_limit ; 32-bit segment ? 4609 jz .16 ; (NC from test_d_b_bit) --> 4610 [cpu 386] 4611 push ds 4612 mov ds, bx 4613 ..@writemem_fault_skip_2_near_call_a: 4614 xchg al, byte [edx] 4615 ..@writemem_fault_skip_2_near_call_b: 4616 cmp ah, byte [edx] 4617 pop ds 4618 __CPU__ 4619 jmp short .cmp 4620 .16: 4621 %endif 0 00000A9A 1E push ds 0 00000A9B 8EDB mov ds, bx 0 00000A9D 53 push bx 0 00000A9E 89D3 mov bx, dx 4626 ..@writemem_fault_skip_4_near_call_a: 0 00000AA0 8607 xchg al, byte [bx] 4628 ..@writemem_fault_skip_4_near_call_b: 0 00000AA2 3A27 cmp ah, byte [bx] 0 00000AA4 5B pop bx 0 00000AA5 1F pop ds 4632 .cmp: 0 00000AA6 7401 je .ret ; (NC) 0 00000AA8 F9 stc ; Failed to compare (i.e. memory wasn't our byte after writing). 4635 ; This check catches ROM that will silently fail to write. 4636 .ret: 0 00000AA9 C3 retn 4638 4639 4640 ; Read byte from memory 4641 ; 4642 ; INP: bx:(e)dx-> destination byte 4643 ; REM: Determines whether to use edx by the 4644 ; segment limit of the selector. 4645 ; (Uses in run.asm always pass a segmented 4646 ; address obtained from getsegmented. This 4647 ; will have edxh = 0 always so it doesn't 4648 ; matter whether we use edx or dx.) 4649 ; OUT: al = value of byte read 4650 readmem: section_of_function 4651 %if _DEBUG1 4652 push dx 4653 push ax 4654 4655 call getlinear_high_limit.do_not_use_test ; NB do NOT resetmode 4656 jc @F ; already an error ? then return --> (CY) 4657 push bx 4658 push cx 4659 mov bx, test_records_Readmem 4660 call handle_test_case_multiple_16 4661 ; check whether this should testcase the error 4662 ; CY to indicate error from this call 4663 pop cx 4664 pop bx 4665 @@: 4666 pop ax 4667 pop dx 4668 jnc .do_not_use_test 4669 mov al, byte [test_readmem_value] 4670 ; return a most likely wrong value 4671 retn 4672 4673 %endif 4674 .do_not_use_test: 4675 4676 %if _PM 4677 _386_PM call test_high_limit ; 32-bit segment ? 4678 jz .16 4679 [cpu 386] 4680 push ds 4681 mov ds, bx 4682 ..@readmem_fault_skip_2_near_call: 4683 mov al, byte [edx] 4684 pop ds 4685 retn 4686 __CPU__ 4687 .16: 4688 %endif 0 00000AAA 1E push ds 0 00000AAB 53 push bx 0 00000AAC 8EDB mov ds, bx 0 00000AAE 89D3 mov bx, dx 4693 ..@readmem_fault_skip_4_near_call: 0 00000AB0 8A07 mov al, byte [bx] 0 00000AB2 5B pop bx 0 00000AB3 1F pop ds 0 00000AB4 C3 retn 4698 4699 4700 %if !_LOADER 4701 ; Q command - quit. 4702 qq: 0 00000AB5 E889FC call guard_re 0 00000AB8 31C9 xor cx, cx ; no qq mode selected 0 00000ABA 4E dec si 4706 .loop: 0 00000ABB AC lodsb 0 00000ABC E8[0000] call capitalise 0 00000ABF 3C41 cmp al, 'A' 0 00000AC1 741C je qq_a 0 00000AC3 B501 mov ch, qqmode_b; QB mode (breakpoint before terminate) 0 00000AC5 3C42 cmp al, 'B' 0 00000AC7 7412 je .otherletter 0 00000AC9 B502 mov ch, qqmode_c; QC mode (terminate device in a container MCB) 0 00000ACB 3C43 cmp al, 'C' 0 00000ACD 740C je .otherletter 0 00000ACF B504 mov ch, qqmode_d; QD mode (terminate device in initialisation) 0 00000AD1 3C44 cmp al, 'D' 0 00000AD3 7406 je .otherletter 0 00000AD5 880E[F513] mov byte [qq_mode], cl 0 00000AD9 EB1B jmp qq_default 4722 4723 .otherletter: 0 00000ADB 08E9 or cl, ch 0 00000ADD EBDC jmp .loop 4726 4727 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 4727 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 000013F5 00 qq_mode: db 0 4729 qqmode_b: equ 1 4730 qqmode_c: equ 2 4731 qqmode_d: equ 4 4732 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 4732 ------------------ note: usesection lDEBUG_CODE 4733 4734 qq_a: 0 00000ADF AC lodsb 0 00000AE0 E8[0000] call chkeol 0 00000AE3 E8EF06 call terminate_attached_process 0 00000AE6 BB[0000] mov bx, msg.qq_a_unterminated 0 00000AE9 7403 jz .attached_unterminated 0 00000AEB BB[0000] mov bx, msg.qq_a_terminated 4741 .attached_unterminated: 0 00000AEE E8[0000] call putrunint 0 00000AF1 89DA mov dx, bx 0 00000AF3 E9[0000] jmp putsz 4745 4746 4747 qq_default: 0 00000AF6 E8[0000] call chkeol 4749 4750 %if _RH 0 00000AF9 8026[B601]EF clropt [options6], opt6_rh_mode 0 00000AFE 8026[E301]BF clropt [internalflags3], dif3_auxbuff_guarded_3 0 00000B03 8026[EE01]C7 clropt [internalflags6], dif6_rh_mode_was | dif6_rh_mode | dif6_rh_mode_2 4754 %endif 0 00000B08 E81AFC call guard_auxbuff 4756 4757 %if _DEVICE 4758 %if _APPLICATION || _BOOTLDR 0 00000B0B F606[EE01]40 testopt [internalflags6], dif6_device_mode 0 00000B10 7411 jz .nondevice 4761 %endif 0 00000B12 F6C106 test cl, qqmode_c | qqmode_d 0 00000B15 750C jnz .deviceselected 0 00000B17 BA[0000] mov dx, msg.qq_device_none_selected 0 00000B1A B83701 mov ax, 0137h 0 00000B1D E8AA06 call setrc 0 00000B20 E9[0000] jmp putsz 4768 4769 .deviceselected: 4770 .nondevice: 4771 %endif 4772 %if _BOOTLDR 4773 ; Test whether we are in non-DOS mode, and were 4774 ; currently entered in protected mode. Since 4775 ; this will make the entire operation fail, 4776 ; it has to be checked for before modifying 4777 ; or releasing any of the resources. 4778 ; (Does this ever occur? No?) 0 00000B23 F606[D901]40 testopt [internalflags], nodosloaded 0 00000B28 741A jz .notpmnodos 4781 %if _PM 4782 call ispm 4783 %if _TSR ; same message, reuse code 4784 jz .cannotpmquit 4785 %else 4786 jnz .notpmnodos_nodos 4787 mov dx, msg.cannotpmquit 4788 mov ax, 0115h 4789 call setrc 4790 jmp putsz_error 4791 %endif 4792 %endif 4793 .notpmnodos_nodos: 0 00000B2A E8A908 call bootgetmemorysize ; dx => behind usable memory 0 00000B2D A1[0000] mov ax, word [ boot_new_memsizekib ] 0 00000B30 B106 mov cl, 6 0 00000B32 D3E0 shl ax, cl 0 00000B34 39D0 cmp ax, dx ; same? 0 00000B36 740C je @F 0 00000B38 BA[0000] mov dx, msg.cannotbootquit_memsizes 0 00000B3B B81B01 mov ax, 011Bh 0 00000B3E E88906 call setrc 0 00000B41 E9[0000] jmp .putsz 4804 %if !_TSR || !_PM 4805 .putsz equ putsz 4806 %endif 4807 4808 @@: 4809 .notpmnodos: 4810 %endif 4811 %if _PM 4812 %if _TSR 4813 ; Test whether we are in TSR mode, and were 4814 ; currently entered in protected mode. Since 4815 ; this will make the entire operation fail, 4816 ; it has to be checked for before modifying 4817 ; or releasing any of the resources. 4818 testopt [internalflags], tsrmode 4819 jz .notpmtsr 4820 call ispm 4821 jnz .notpmtsr 4822 4823 ; This isn't yet implemented. Broken down: 4824 ; * Uses terminate_attached_process which returns in real mode. 4825 ; * Exception vectors are implicitly restored/discarded by that. 4826 ; * (RM) Interrupt vectors are currently restored in real mode. Unnecessary. 4827 ; * The VDD is un-registered in real mode. Necessary? 4828 ; * Normal 21.4C is used to return to the real parent. 4829 ; * We have to discard our DOS process resources. Any DPMI TSR resources? 4830 ; * We must again gain control in debuggee's mode after discarding them. 4831 ; * We must return to the debuggee and seemlessly discard our memory. The 4832 ; stack trick possibly/probably does not work in protected mode. 4833 4834 .cannotpmquit: 4835 mov dx, msg.cannotpmquit 4836 mov ax, 0115h 4837 call setrc 4838 .putsz: 4839 jmp putsz 4840 4841 .notpmtsr: 4842 %endif 4843 4844 %if (opt4_int_2F_hook)&~0FFh 4845 %fatal DCO4 re-ordered, adjust code here 4846 %endif 4847 mov ax, [options4] 4848 mov ah, __TEST_IMM8 4849 xchg ah, [dpmidisable] ; disable DPMI hook 4850 ; (SMC in section lDEBUG_DATA_ENTRY) 4851 push ax 4852 clropt [options4], opt4_int_2F_hook ; avoid a new hook while terminating 4853 %endif 4854 %else ; !_LOADER 4855 qq: 4856 call chkeol 4857 %endif 4858 4859 qq_restore_interrupts_simulated: 0 00000B44 31ED xor bp, bp 4861 4862 %if _CATCHINT2D 4863 .2D: 0 00000B46 B02D mov al, 2Dh ; interrupt number 0 00000B48 BE[0000] mov si, int2D ; -> IISP entry header 0 00000B4B B93244 mov cx, "2D" 0 00000B4E BA0800 mov dx, opt4_int_2D_force >> 16 4868 %if (opt4_int_2D_force >> 16) == dif4_int_2D_hooked 0 00000B51 E8E205 call qq_int_unhook_sim.set_bx_to_dx 4870 %else 4871 mov bx, dif4_int_2D_hooked 4872 call qq_int_unhook_sim 4873 %endif 4874 %endif 4875 4876 4877 %if _CATCHINTFAULTCOND && _CATCHINT0D 4878 .0D: 0 00000B54 B00D mov al, 0Dh ; interrupt number 0 00000B56 BE[0000] mov si, intr0D ; -> IISP entry header 0 00000B59 B93044 mov cx, "0D" 0 00000B5C BA1000 mov dx, opt4_int_0D_force >> 16 4883 %if (opt4_int_0D_force >> 16) == dif4_int_0D_hooked 0 00000B5F E8D405 call qq_int_unhook_sim.set_bx_to_dx 4885 %else 4886 mov bx, dif4_int_0D_hooked 4887 call qq_int_unhook_sim 4888 %endif 4889 %endif 4890 4891 4892 %if _CATCHINTFAULTCOND && _CATCHINT0C 4893 .0C: 0 00000B62 B00C mov al, 0Ch ; interrupt number 0 00000B64 BE[0000] mov si, intr0C ; -> IISP entry header 0 00000B67 B93043 mov cx, "0C" 0 00000B6A BA2000 mov dx, opt4_int_0C_force >> 16 4898 %if (opt4_int_0C_force >> 16) == dif4_int_0C_hooked 0 00000B6D E8C605 call qq_int_unhook_sim.set_bx_to_dx 4900 %else 4901 mov bx, dif4_int_0C_hooked 4902 call qq_int_unhook_sim 4903 %endif 4904 %endif 4905 4906 4907 %if _CATCHINT08 4908 .08: 0 00000B70 B008 mov al, 08h ; interrupt number 0 00000B72 BE[0000] mov si, intr8 ; -> IISP entry header 0 00000B75 B93038 mov cx, "08" 0 00000B78 BA0400 mov dx, opt4_int_08_force >> 16 4913 %if (opt4_int_08_force >> 16) == dif4_int_08_hooked 0 00000B7B E8B805 call qq_int_unhook_sim.set_bx_to_dx 4915 %else 4916 mov bx, dif4_int_08_hooked 4917 call qq_int_unhook_sim 4918 %endif 4919 %endif 4920 4921 4922 .serial: 0 00000B7E A0[980D] mov al, byte [serial_installed_intnum] 0 00000B81 BE[0000] mov si, serial_interrupt_handler 0 00000B84 51 push cx ; (make space) 0 00000B85 89E7 mov di, sp ; es:di -> word on stack 0 00000B87 E8[0000] call hexbyte ; write byte value as text 0 00000B8A 59 pop cx ; cx = what to write into error message 0 00000B8B BA0100 mov dx, opt4_int_serial_force >> 16 4930 %if (opt4_int_serial_force >> 16) == dif4_int_serial_hooked 0 00000B8E E8A505 call qq_int_unhook_sim.set_bx_to_dx 4932 %else 4933 mov bx, dif4_int_serial_hooked 4934 call qq_int_unhook_sim 4935 %endif 4936 4937 %if _PM 4938 .2F: 4939 mov al, 2Fh ; interrupt number 4940 mov si, debug2F ; -> IISP entry header 4941 mov cx, "2F" 4942 mov dx, opt4_int_2F_force >> 16 4943 testopt [internalflags], hooked2F 4944 jz .noint2F 4945 call qq_int_unhook_sim.need 4946 4947 .noint2F: 4948 %endif 4949 4950 4951 %if CATCHINTAMOUNT && ! (_DEBUG && ! _DEBUG_COND) 4952 %if _DEBUG 4953 testopt [internalflags6], dif6_debug_mode 4954 jnz .skipints 4955 %endif 4956 ; Simulate to restore interrupt vectors. 0 00000B91 BE[C00D] mov si, inttab 0 00000B94 BF[D50D] mov di, intforcetab 4959 %if _CATCHINT06 && _DETECT95LX 0 00000B97 8B0E[DE0D] mov cx, word [inttab_number_variable] 4961 %else 4962 mov cx, inttab_number 4963 %endif 0 00000B9B E324 jcxz .intsimend 0 00000B9D 31D2 xor dx, dx 4966 .nextintsim: 0 00000B9F AC lodsb 0 00000BA0 93 xchg ax, bx ; bl = number 0 00000BA1 AD lodsw ; si -> list 0 00000BA2 96 xchg ax, si ; si -> entry, ax -> list 0 00000BA3 93 xchg ax, bx ; al = number, bx -> list 0 00000BA4 57 push di 0 00000BA5 8A35 mov dh, byte [di] 0 00000BA7 E8[0000] call UnhookInterruptForceSim 0 00000BAA 5F pop di 0 00000BAB 16 push ss 0 00000BAC 07 pop es 0 00000BAD 730D jnc @F 0 00000BAF BF[0000] mov di, msg.serial_cannot_unhook.int 0 00000BB2 E8[0000] call hexbyte 0 00000BB5 BA[0000] mov dx, msg.serial_cannot_unhook.nowarn 0 00000BB8 E8[0000] call putsz 0 00000BBB 45 inc bp 4984 @@: 0 00000BBC 47 inc di 0 00000BBD 87DE xchg bx, si ; si -> list 0 00000BBF E2DE loop .nextintsim 4988 4989 .intsimend: 4990 .skipints: 4991 %endif 4992 0 00000BC1 BA[0000] mov dx, msg.empty_message 0 00000BC4 85ED test bp, bp 0 00000BC6 7403E92503 jnz qq_attached_unterminated.common 4996 4997 4998 %if _DEVICE 4999 qq_device_prepare: 5000 %if _APPLICATION || _BOOTLDR 0 00000BCB F606[EE01]40 testopt [internalflags6], dif6_device_mode 0 00000BD0 7503E99C01 jz qq_nondevice 5003 %endif 5004 5005 %if _PM 5006 mov dx, msg.qq_device_pm 5007 call ispm 5008 jz @F ; in PM --> 5009 %endif 5010 5011 ; Try quitting early in device init ? 0 00000BD5 F606[F513]04 testopt [qq_mode], qqmode_d 0 00000BDA 743D jz .device_c ; no, must be container quit --> 5014 5015 .device_d: 0 00000BDC F606[DA01]40 testopt [internalflags], tsrmode 0 00000BE1 741E jz .check_device_c 5018 0 00000BE3 BE[F80D] mov si, regs 0 00000BE6 BF[780E] mov di, device_quittable_regs 0 00000BE9 B92000 mov cx, words(regs.size) 0 00000BEC F3A7 repe cmpsw ; can quit to device init ? 0 00000BEE 7511 jne .check_device_c 0 00000BF0 C43E[940D] les di, [device_header_address] 0 00000BF4 B0FF mov al, -1 0 00000BF6 B104 mov cl, 4 0 00000BF8 F3AE repe scasb ; is next device pointer still -1 ? 0 00000BFA 16 push ss 0 00000BFB 07 pop es 0 00000BFC 7503E97001 je qq_device_got ; yes --> 5031 5032 .check_device_c: 5033 ; Cannot quit to device init. Clear the flag 5034 ; so we know later on that we're trying QC. 0 00000C01 8026[F513]FB clropt [qq_mode], qqmode_d 0 00000C06 F606[F513]02 testopt [qq_mode], qqmode_c 5037 ; actually want to try QC ? 0 00000C0B 750C jnz .device_c ; yes --> 5039 0 00000C0D BA[0000] mov dx, msg.qq_device_no_d 0 00000C10 B82101 mov ax, 0121h 0 00000C13 E8B405 call setrc 5043 @@: 0 00000C16 E9D702 jmp qq_attached_unterminated.common 5045 5046 .device_c: 0 00000C19 B80258 mov ax, 5802h 0 00000C1C CD21 int 21h 0 00000C1E B400 mov ah, 0 0 00000C20 50 push ax ; preserve UMB link 0 00000C21 B80358 mov ax, 5803h 0 00000C24 BB0100 mov bx, 1 0 00000C27 CD21 int 21h ; enable UMB link 5054 ; we want to support the case in which 5055 ; the first UMCB may have changed. so 5056 ; instead of searching for it again we 5057 ; just request the link enabled. 5058 0 00000C29 BBFFFF mov bx, -1 0 00000C2C B452 mov ah, 52h 0 00000C2E CD21 int 21h 0 00000C30 89DF mov di, bx 0 00000C32 83FBBE cmp bx, - (30h + 12h) 0 00000C35 7603E91E01 ja .no_c 0 00000C3A 83FB01 cmp bx, 1 0 00000C3D 7503E91601 je .no_c 0 00000C42 268B57FE mov dx, word [es:bx - 2] 0 00000C46 B93000 mov cx, 30h 5069 5070 .nulloop: 0 00000C49 BE[0000] mov si, msg.NULblank 0 00000C4C A7 cmpsw ; di += 2, si += 2. compare 0 00000C4D 750A jne .nulnext 5074 .nulcheck: 0 00000C4F 57 push di 0 00000C50 51 push cx 0 00000C51 B103 mov cl, 3 ; 3 more words to go 0 00000C53 F3A7 repe cmpsw ; match ? 0 00000C55 59 pop cx 0 00000C56 5F pop di 0 00000C57 7406 je .nulfound 5082 .nulnext: 0 00000C59 4F dec di ; di -= 1 so it ends up 1 higher than prior 0 00000C5A E2ED loop .nulloop 0 00000C5C E9F900 jmp .no_c 5086 5087 .nulfound: 0 00000C5F 83EF0C sub di, 3 * 2 + 4 + 2 ; (strategy, interrupt, flags are words, 5089 ; next device pointer is a dword. 5090 ; additional plus 2 for the cmpsw output.) 5091 5092 ; es:di -> NUL device header 5093 .devloop: 0 00000C62 A1[940D] mov ax, word [device_header_address] 0 00000C65 263B05 cmp ax, word [es:di] 0 00000C68 7509 jne .devnext 0 00000C6A A1[960D] mov ax, word [device_header_address + 2] 0 00000C6D 263B4502 cmp ax, word [es:di + 2] 0 00000C71 7411 je .mcb 5100 .devnext: 0 00000C73 41 inc cx 0 00000C74 7903E9DF00 js .no_c 5103 0 00000C79 26C43D les di, [es:di] 0 00000C7C 83FFFF cmp di, -1 0 00000C7F 75E1 jne .devloop 0 00000C81 E9D400 jmp .no_c 5108 5109 .mcb: 5110 0 00000C84 893E[F813] mov word [.device_reference], di 0 00000C88 8C06[FA13] mov word [.device_reference + 2], es 5113 0 00000C8C 8326[0214]00 and word [.counter], 0 0 00000C91 89C7 mov di, ax ; => start of memory allocated to us 0 00000C93 8B0E[920D] mov cx, word [device_mcb_paragraphs] 5117 ; = amount paragraphs allocated to us 0 00000C97 01CF add di, cx ; => behind memory allocated to us 5119 5120 ; dx => first MCB 5121 .mcbloop: 0 00000C99 8EC2 mov es, dx 0 00000C9B 89D6 mov si, dx ; => MCB 0 00000C9D 2603360300 add si, word [es:3] 0 00000CA2 46 inc si ; => next MCB (or behind current MCB) 0 00000CA3 26803E00004D cmp byte [es:0], 'M' ; valid MCB ? 0 00000CA9 740B je @F 0 00000CAB 26803E00005A cmp byte [es:0], 'Z' 0 00000CB1 7403E9A200 jne .no_c ; no --> 5130 @@: 0 00000CB6 39C2 cmp dx, ax ; start of MCB < allocation ? 0 00000CB8 731F jae .mcbnext ; no --> 0 00000CBA 39FE cmp si, di ; end of MCB > allocation ? 0 00000CBC 721B jb .mcbnext ; no --> 5135 0 00000CBE 26833E010000 cmp word [es:1], 0 ; free ? 0 00000CC4 7413 je .mcbnext ; do not match --> 0 00000CC6 48 dec ax ; => our (sub) MCB 0 00000CC7 39C2 cmp dx, ax ; matches (DEVLOAD style) ? 0 00000CC9 7520 jne .mcbcontainer ; no --> 0 00000CCB 26390E0300 cmp word [es:3], cx ; size matches ? 0 00000CD0 7519 jne .mcbcontainer ; no --> 0 00000CD2 8326[FC13]00 and word [.container_segment], 0 0 00000CD7 EB7E jmp .mcbdone ; found a non-container MCB 5145 5146 .mcbnext: 0 00000CD9 FF06[0214] inc word [.counter] ; safeguard against infinite loop 0 00000CDD 7479 jz .no_c 0 00000CDF 89F2 mov dx, si ; => next MCB 0 00000CE1 26803E00004D cmp byte [es:0], 'M' ; prior was 'M' ? 0 00000CE7 74B0 je .mcbloop ; yes, so loop --> 0 00000CE9 EB6D jmp .no_c 5153 5154 .mcbcontainer: 0 00000CEB 40 inc ax ; => allocated block (device header) 0 00000CEC 26833E010050 cmp word [es:1], 50h ; SD owner system ? 0 00000CF2 73E5 jae .mcbnext 0 00000CF4 26813E08005344 cmp word [es:8], "SD" 0 00000CFB 75DC jne .mcbnext ; no --> 5160 0 00000CFD 26FF360000 push word [es:0] 0 00000D02 8F06[0014] pop word [.container_is_z] 0 00000D06 8936[FE13] mov word [.container_end], si 0 00000D0A 8916[FC13] mov word [.container_segment], dx 0 00000D0E 42 inc dx ; => sub-MCB 5166 .submcbloop: 0 00000D0F 8EC2 mov es, dx 0 00000D11 89D6 mov si, dx 0 00000D13 2603360300 add si, word [es:3] 0 00000D18 46 inc si ; => next sub or MCB (or behind Z MCB) 0 00000D19 39C2 cmp dx, ax 0 00000D1B 731C jae .submcbnext 0 00000D1D 39FE cmp si, di 0 00000D1F 7218 jb .submcbnext 5175 0 00000D21 50 push ax 0 00000D22 48 dec ax ; => our (sub) MCB 0 00000D23 39C2 cmp dx, ax ; matched start of allocation ? 0 00000D25 58 pop ax 0 00000D26 7511 jne .submcbnext 0 00000D28 26390E0300 cmp word [es:3], cx ; matches allocation size ? 0 00000D2D 750A jne .submcbnext 0 00000D2F 26833E010000 cmp word [es:1], 0 ; is not free ? 0 00000D35 7402 je .submcbnext 0 00000D37 EB1E jmp .mcbdone ; all yes, found it --> 5186 5187 .submcbnext: 0 00000D39 FF06[0214] inc word [.counter] ; safeguard against infinite loop 0 00000D3D 7419 jz .no_c 0 00000D3F 89F2 mov dx, si ; => next sub MCB or after container 0 00000D41 8B36[FE13] mov si, word [.container_end] 0 00000D45 39F2 cmp dx, si ; after container ? 0 00000D47 72C6 jb .submcbloop ; no --> 5194 ; This jump could be a jne but generally 5195 ; we can assume that the container does 5196 ; not overflow across the 1 MiB limit. 5197 ; And this is more hardened against errors. 0 00000D49 89F2 mov dx, si ; insure we use actual container end 0 00000D4B 803E[0014]5A cmp byte [.container_is_z], 'Z' 5200 ; container had a Z ? 0 00000D50 7403E944FF jne .mcbloop ; no --> 5202 ; if here, loop now, dx already updated and 5203 ; furthermore es does not point at container! 0 00000D55 EB01 jmp .no_c 5205 5206 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 5206 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 000013F6 00 align 4, db 0 0 000013F8 00000000 .device_reference: dd 0 0 000013FC 0000 .container_segment: dw 0 0 000013FE 0000 .container_end: dw 0 0 00001400 0000 .container_is_z: dw 0 0 00001402 0000 .counter: dw 0 5213 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 5213 ------------------ note: usesection lDEBUG_CODE 5214 5215 .mcbdone: 5216 0 00000D57 A8 db __TEST_IMM8 ; (skip stc, NC) 5218 .no_c: 0 00000D58 F9 stc 0 00000D59 5B pop bx 0 00000D5A 9C pushf 0 00000D5B B80358 mov ax, 5803h 0 00000D5E CD21 int 21h ; restore UMB link 0 00000D60 9D popf 0 00000D61 16 push ss 0 00000D62 07 pop es 0 00000D63 730C jnc @F 0 00000D65 BA[0000] mov dx, msg.qq_device_no_c 0 00000D68 B82201 mov ax, 0122h 0 00000D6B E85C04 call setrc 0 00000D6E E97F01 jmp qq_attached_unterminated.common 5232 5233 @@: 5234 5235 qq_device_got: 5236 qq_nondevice: 5237 %endif 5238 5239 5240 qq_restore_interrupts: 5241 %if _CATCHINT2D 5242 .2D: 0 00000D71 B02D mov al, 2Dh ; interrupt number 0 00000D73 BE[0000] mov si, int2D ; -> IISP entry header 0 00000D76 B93244 mov cx, "2D" 0 00000D79 BA0800 mov dx, opt4_int_2D_force >> 16 5247 %if (opt4_int_2D_force >> 16) == dif4_int_2D_hooked 0 00000D7C E8D303 call qq_int_unhook_real.set_bx_to_dx 5249 %else 5250 mov bx, dif4_int_2D_hooked 5251 call qq_int_unhook_real 5252 %endif 0 00000D7F 7303E96C01 jc qq_attached_unterminated.common 5254 %endif 5255 5256 5257 %if _CATCHINTFAULTCOND && _CATCHINT0D 5258 .0D: 0 00000D84 B00D mov al, 0Dh ; interrupt number 0 00000D86 BE[0000] mov si, intr0D ; -> IISP entry header 0 00000D89 B93044 mov cx, "0D" 0 00000D8C BA1000 mov dx, opt4_int_0D_force >> 16 5263 %if (opt4_int_0D_force >> 16) == dif4_int_0D_hooked 0 00000D8F E8C003 call qq_int_unhook_real.set_bx_to_dx 5265 %else 5266 mov bx, dif4_int_0D_hooked 5267 call qq_int_unhook_real 5268 %endif 0 00000D92 7303E95901 jc qq_attached_unterminated.common 5270 %endif 5271 5272 5273 %if _CATCHINTFAULTCOND && _CATCHINT0C 5274 .0C: 0 00000D97 B00C mov al, 0Ch ; interrupt number 0 00000D99 BE[0000] mov si, intr0C ; -> IISP entry header 0 00000D9C B93043 mov cx, "0C" 0 00000D9F BA2000 mov dx, opt4_int_0C_force >> 16 5279 %if (opt4_int_0C_force >> 16) == dif4_int_0C_hooked 0 00000DA2 E8AD03 call qq_int_unhook_real.set_bx_to_dx 5281 %else 5282 mov bx, dif4_int_0C_hooked 5283 call qq_int_unhook_real 5284 %endif 0 00000DA5 7303E94601 jc qq_attached_unterminated.common 5286 %endif 5287 5288 5289 %if _CATCHINT08 5290 .08: 0 00000DAA B008 mov al, 08h ; interrupt number 0 00000DAC BE[0000] mov si, intr8 ; -> IISP entry header 0 00000DAF B93038 mov cx, "08" 0 00000DB2 BA0400 mov dx, opt4_int_08_force >> 16 5295 %if (opt4_int_08_force >> 16) == dif4_int_08_hooked 0 00000DB5 E89A03 call qq_int_unhook_real.set_bx_to_dx 5297 %else 5298 mov bx, dif4_int_08_hooked 5299 call qq_int_unhook_real 5300 %endif 0 00000DB8 7303E93301 jc qq_attached_unterminated.common 5302 %endif 5303 5304 5305 .serial: 0 00000DBD F606[690D]01 testopt [serial_flags], sf_init_done 0 00000DC2 740D jz @F 0 00000DC4 E8[0000] call serial_clean_up ; unhook interrupt 0 00000DC7 8026[690D]EE clropt [serial_flags], sf_init_done | sf_use_serial 5310 ; clear (in case return to cmd3) 0 00000DCC 8026[A101]BF clropt [options], enable_serial ; do not output to serial any longer 5312 @@: 0 00000DD1 F606[E401]01 testopt [internalflags4], dif4_int_serial_hooked 0 00000DD6 741F jz .done_serial 0 00000DD8 E8[0000] call serial_uninstall_interrupt_handler 0 00000DDB 731A jnc .done_serial ; if it succeeded --> 5317 0 00000DDD BF[0000] mov di, msg.serial_cannot_unhook.int 0 00000DE0 A0[980D] mov al, byte [serial_installed_intnum] 0 00000DE3 E8[0000] call hexbyte 0 00000DE6 BA[0000] mov dx, msg.serial_cannot_unhook.nowarn 0 00000DE9 C606[0800]00 mov byte [serial_interrupt_handler + ieEOI], 0 5323 ; we do not issue EOI any longer 0 00000DEE B82301 mov ax, 0123h 0 00000DF1 E8D603 call setrc 0 00000DF4 E9F900 jmp qq_attached_unterminated.common 5327 5328 5329 .done_serial: 5330 5331 %if _PM 5332 .2F: 5333 mov al, 2Fh ; interrupt number 5334 mov si, debug2F ; -> IISP entry header 5335 mov cx, "2F" 5336 mov dx, opt4_int_2F_force >> 16 5337 %if (opt4_int_2F_force >> 16) == dif4_int_2F_hooked 5338 mov bx, dx 5339 %else 5340 mov bx, dif4_int_2F_hooked 5341 %endif 5342 testopt [internalflags], hooked2F 5343 jz .noint2F 5344 call qq_int_unhook_real.need 5345 jc qq_attached_unterminated.common 5346 5347 .got2F: 5348 clropt [internalflags], hooked2F 5349 5350 .noint2F: 5351 %endif 5352 5353 %if _LOADER 5354 int 19h 5355 %else ; _LOADER 5356 %if _BOOTLDR 5357 %if _APPLICATION || _DEVICE 0 00000DF7 F606[D901]40 testopt [internalflags], nodosloaded 0 00000DFC 7511 jnz .areas 5360 %else 5361 jmp .areas 5362 %endif 5363 %endif 5364 5365 5366 %if _APPLICATION || _DEVICE 5367 ; Cancel child's process if any. 5368 ; This will drop to real mode if debuggee is in protected mode. 5369 %if _TSR || _DEVICE 0 00000DFE F606[DA01]40 testopt [internalflags], tsrmode 0 00000E03 7402 jz .terminate_attached ; falls through for device or TSR application 5372 5373 %if _PM 5374 call ispm 5375 jz @F ; in PM --> 5376 testopt [internalflags], canswitchmode 5377 jz @FF ; in 86 Mode and cannot switch to PM --> 5378 5379 setopt [internalflags], modeswitched ; set flag for resetmode 5380 mov al, 0 5381 call sr_state ; save state 5382 call switchmode ; switch to PM 5383 ; ! handle_mode_changed not called here ! 5384 ; do not call InDOS or other functions using seg/sels 5385 @@: 5386 call pm_reset_handlers 5387 ; ! this calls resetmode 5388 5389 ; remember that we cannot access Protected Mode any longer 5390 clropt [internalflags], canswitchmode | switchbuffer 5391 @@: 5392 %endif 5393 0 00000E05 EB08 jmp .areas 5395 5396 .terminate_attached: 5397 %endif 5398 0 00000E07 E8CB03 call terminate_attached_process 0 00000E0A 7503E9D500 jz qq_attached_unterminated 5401 %if _PM 5402 call ispm 5403 jnz @F 5404 5405 mov dx, msg.qq_still_pm 5406 mov ax, 0124h 5407 call setrc 5408 jmp qq_attached_unterminated.common 5409 @@: 5410 %endif 5411 %endif 5412 5413 5414 .areas: 5415 %if _AREAS && _AREAS_HOOK_CLIENT 5416 call uninstall_areas.qq_entry 5417 %if _AREAS_HOOK_SERVER 5418 jc .areas_error 5419 %else 5420 jnc @F 5421 mov dx, msg.qqlate_areas_error 5422 mov ax, 0125h 5423 call setrc 5424 jmp qq_attached_unterminated.common 5425 %endif 5426 %endif 5427 5428 @@: 5429 %if _AREAS_HOOK_SERVER 5430 mov dx, word [ddebugareas.next + 2] 5431 mov bx, word [ddebugareas.next] 5432 mov ax, ss 5433 cmp dx, ax 5434 je @F 5435 push dx 5436 push bx 5437 mov al, 0 5438 push cs 5439 call qqlate_86m_to_areastruc_entry 5440 push ss 5441 pop ds 5442 push ss 5443 pop es 5444 pop bx 5445 pop dx 5446 cmp dx, word [ddebugareas.next + 2] 5447 jne @B 5448 cmp bx, word [ddebugareas.next] 5449 jne @B 5450 .areas_error: 5451 mov dx, msg.qqlate_areas_error 5452 mov ax, 0125h 5453 call setrc 5454 jmp qq_attached_unterminated.common 5455 5456 @@: 5457 %endif 5458 5459 5460 .restoreints: 5461 %if CATCHINTAMOUNT && ! (_DEBUG && ! _DEBUG_COND) 5462 %if _DEBUG 5463 testopt [internalflags6], dif6_debug_mode 5464 jnz .skiprestoreints 5465 %endif 5466 ; Restore interrupt vectors. 0 00000E0F BE[C00D] mov si, inttab 0 00000E12 BF[D50D] mov di, intforcetab 5469 %if _CATCHINT06 && _DETECT95LX 0 00000E15 8B0E[DE0D] mov cx, word [inttab_number_variable] 5471 %else 5472 mov cx, inttab_number 5473 %endif 0 00000E19 E313 jcxz .intend 0 00000E1B 31D2 xor dx, dx 5476 .nextint: 0 00000E1D AC lodsb 0 00000E1E 93 xchg ax, bx ; bl = number 0 00000E1F AD lodsw ; si -> list 0 00000E20 96 xchg ax, si ; si -> entry, ax -> list 0 00000E21 93 xchg ax, bx ; al = number, bx -> list 0 00000E22 57 push di 0 00000E23 8A35 mov dh, byte [di] 0 00000E25 E8[0000] call UnhookInterruptForce 0 00000E28 5F pop di 0 00000E29 47 inc di 0 00000E2A 87DE xchg bx, si ; si -> list 0 00000E2C E2EF loop .nextint 5489 5490 .intend: 5491 .skiprestoreints: 5492 %endif 5493 5494 5495 %if _PM 5496 pop ax ; (discard) 5497 %endif 5498 5499 5500 qqlate: 5501 %if _SYMBOLIC 5502 ; Free XMS symbol table. 86 Mode memory backed symbol table 5503 ; is freed by our process's termination. 5504 ; Update: QD device termination does not currently terminate 5505 ; our process. In the meantime, free things explicitly. 5506 ; Note that the calls need to be in this order because of 5507 ; how zz_free_xms calls zz_free_reset first. 5508 nearcall zz_free_dos 5509 nearcall zz_free_xms 5510 %endif 5511 5512 ; Release the registered VDD. 5513 %if _VDD 0 00000E2E F606[D801]04 testopt [internalflags], ntpacket 0 00000E33 7408 jz .novdd 0 00000E35 A1[580C] mov ax, word [hVdd] 0 00000E38 C4C4580190 UnRegisterModule 5518 .novdd: 5519 %endif 5520 5521 %if _VXCHG 0 00000E3D F606[EC01]01 testopt [internalflags6], dif6_vv_mode 0 00000E42 7403 jz @F 5524 0 00000E44 E8[0000] call vv_disable 5526 @@: 5527 %endif 5528 5529 %if _ALTVID 0 00000E47 E8[0000] call setscreen 5531 %endif 5532 5533 ; Restore termination address. 5534 %if _BOOTLDR 5535 %if _APPLICATION || _DEVICE 0 00000E4A F606[D901]40 testopt [internalflags], nodosloaded 0 00000E4F 7403E98B01 jnz .bootterminate ; terminate --> 5538 %else 5539 jmp .bootterminate 5540 %endif 5541 %endif 5542 %if _DEVICE 5543 %if _APPLICATION 0 00000E54 F606[EE01]40 testopt [internalflags6], dif6_device_mode 0 00000E59 7403E99B00 jnz .deviceterminate 5546 %else 5547 jmp .deviceterminate 5548 %endif 5549 %endif 5550 5551 %if _APPLICATION || _DEVICE 5552 %if _TSR || _DEVICE 5553 .appterminate: 0 00000E5E 16 push ss 0 00000E5F 07 pop es 0 00000E60 F606[DA01]40 testopt [internalflags], tsrmode 0 00000E65 745D jz .nontsrterminate 5558 5559 .tsrterminate: 0 00000E67 BA[1514] mov dx, qq.proceedtsrtermination 5561 5562 .terminate_to_shim_process: 0 00000E6A 31F6 xor si, si 0 00000E6C 8E06[8A0B] mov es, word [auxbuff_segorsel] 0 00000E70 31FF xor di, di 0 00000E72 31C0 xor ax, ax 0 00000E74 B90800 mov cx, 8 0 00000E77 F3AB rep stosw ; 10h MCB bytes 0 00000E79 B94000 mov cx, 40h 0 00000E7C F3A5 rep movsw ; 80h PSP bytes 0 00000E7E 8CC0 mov ax, es 0 00000E80 40 inc ax 0 00000E81 26A30100 mov word [es:1], ax ; fake MCB 0 00000E85 1E push ds 0 00000E86 8ED8 mov ds, ax 0 00000E88 C70634001800 mov word [34h], 18h 0 00000E8E A33600 mov word [36h], ax ; insure default PHT and fix segment 0 00000E91 C70632000100 mov word [32h], 1 ; only one PHT entry (zero might crash) 0 00000E97 C6061800FF mov byte [18h], -1 ; PHT entry is closed 0 00000E9C C7062C000000 mov word [2Ch], 0 ; PSP clear 0 00000EA2 E82E01 call .setparent ; make it self-owned, just in case 0 00000EA5 8CD3 mov bx, ss ; => process segment 0 00000EA7 4B dec bx ; span actual MCB 5584 %if _DEVICE 5585 %if _APPLICATION 0 00000EA8 36F606[EE01]40 testopt [ss:internalflags6], dif6_device_mode 0 00000EAE 7403 jz @F 5588 %endif 0 00000EB0 83EB04 sub bx, deviceshim_size_p + paras(10h) 5590 ; span shim and pseudo MCB 5591 @@: 5592 %endif 0 00000EB3 8EDB mov ds, bx ; => our (real) MCB 0 00000EB5 81FA[1514] cmp dx, qq.proceedtsrtermination 0 00000EB9 7503 jne @F 0 00000EBB A30100 mov word [1], ax ; owner = fake PSP 5597 @@: 0 00000EBE 1F pop ds 0 00000EBF E81101 call .setparent ; make the fake PSP our parent 0 00000EC2 EB1B jmp short terminate_00 ; see ya 5601 5602 .nontsrterminate: 5603 %endif 0 00000EC4 BE[680C] mov si, psp22 ; restore termination address 0 00000EC7 BF0A00 mov di, TPIV 0 00000ECA A5 movsw 0 00000ECB A5 movsw 0 00000ECC BF1600 mov di, 16h ; restore PSP of parent 0 00000ECF A5 movsw 5610 ; Really done. 5611 0 00000ED0 F606[F513]01 testopt [qq_mode], qqmode_b 0 00000ED5 7401 jz @F 0 00000ED7 CC int3 5615 5616 @@: 0 00000ED8 B44C mov ah, 4Ch ; quit 0 00000EDA A0[910D] mov al, byte [qqtermcode] 5619 ; return code 0 00000EDD CD21 int 21h 5621 %endif 5622 5623 5624 terminate_00: ; used by terminate_attached_process 0 00000EDF B8004C mov ax, 4C00h ; quit 0 00000EE2 CD21 int 21h 5627 5628 5629 %if _AREAS_HOOK_SERVER 5630 qqlate_86m_to_areastruc_entry: 5631 mov cx, areastruc_entry.qq_entry 5632 push ss 5633 push cx 5634 retf 5635 %endif 5636 %endif ; !_LOADER 5637 5638 5639 qq_attached_unterminated: 5640 %if !_LOADER 0 00000EE4 E8[0000] call putrunint 5642 %endif ; !_LOADER 0 00000EE7 BA[0000] mov dx, msg.qq_unterm 0 00000EEA B82001 mov ax, 0120h 0 00000EED E8DA02 call setrc 5646 5647 .common: 0 00000EF0 B81F01 mov ax, 011Fh 0 00000EF3 E8D402 call setrc 5650 ; Restore state: 5651 %if _PM 5652 %if (opt4_int_2F_hook)&~0FFh 5653 %fatal DCO4 re-ordered, adjust code here 5654 %endif 5655 pop ax 5656 mov [dpmidisable], ah ; (SMC in section lDEBUG_DATA_ENTRY) 5657 and al, opt4_int_2F_hook 5658 clropt [options4], opt4_int_2F_hook 5659 or [options4], al 5660 %endif 0 00000EF6 E9[0000] jmp putsz 5662 5663 5664 %if !_LOADER 5665 %if _DEVICE 5666 qqlate.deviceterminate: 0 00000EF9 F606[F513]04 testopt [qq_mode], qqmode_d 0 00000EFE 7432 jz .mode_c 5669 5670 .mode_d: 5671 ; We modify the device request header 5672 ; only now, so in case of being unable 5673 ; to release something then the debugger 5674 ; will remain usable and stay resident. 0 00000F00 8E06[1C0E] mov es, word [reg_es] 0 00000F04 8B1E[FC0D] mov bx, word [reg_ebx] 0 00000F08 8CD8 mov ax, ds ; => process segment 0 00000F0A 83E804 sub ax, paras(deviceshim_size + 10h) 5679 ; span shim and pseudo MCB 0 00000F0D 26C747030381 mov word [es:bx + 3], 8103h ; error, done, code: unknown command 0 00000F13 2683670E00 and word [es:bx + 0Eh], 0 0 00000F18 26894710 mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 5683 ; es reset in run or qqlate.terminate_to_shim_process 5684 5685 %if 0 ; old code to manually release process resources 5686 xor bx, bx ; = 0 5687 mov cx, word [32h] ; get amount of handles 5688 .loop: 5689 mov ah, 3Eh 5690 int 21h ; close it 5691 inc bx ; next handle 5692 loop .loop ; loop for all process handles --> 5693 %else ; new code re-using TSR terminate handling 0 00000F1C BA[0414] mov dx, .proceed 0 00000F1F E948FF jmp qqlate.terminate_to_shim_process 5696 5697 5698 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 5698 ------------------ note: usesection lDEBUG_DATA_ENTRY 5699 .proceed: 0 00001404 FA cli 0 00001405 8CC8 mov ax, cs 0 00001407 8ED0 mov ss, ax 0 00001409 BC[1010] mov sp, stack_end 0 0000140C 8ED8 mov ds, ax 0 0000140E FC cld 0 0000140F FB sti 5707 0 00001410 E89BFF call entry_to_code_seg 0 00001413 [220F] dw .proceedcode 5710 5711 5712 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 5712 ------------------ note: usesection lDEBUG_CODE 5713 code_insure_low_byte_not_0CCh 5714 .proceedcode: 5715 %endif 5716 5717 %if _DEBUG 5718 ; avoid hooking interrupts again: 5719 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 5720 ; (SMC in section lDEBUG_CODE) 5721 %endif 0 00000F22 F606[F513]01 testopt [qq_mode], qqmode_b 0 00000F27 7406 jz @F 0 00000F29 C706[300E][0000] mov word [reg_eip], entry_int3_retf 5725 @@: 0 00000F2F E9[0000] jmp run ; run this 5727 5728 5729 .mode_c: 5730 qqlate_device_container: 0 00000F32 06 push es 0 00000F33 C43E[F813] les di, [qq_device_prepare.device_reference] 0 00000F37 8CC2 mov dx, es ; => device header pointing to ours 0 00000F39 8CD0 mov ax, ss ; => process segment 0 00000F3B 83E804 sub ax, deviceshim_size_p + paras(10h) 5736 ; span shim and pseudo MCB 5737 ; ! ax is re-used in .handlecontainer 0 00000F3E 8EC0 mov es, ax ; => our device header 0 00000F40 26FF360200 push word [es:0 + 2] 0 00000F45 26FF360000 push word [es:0] ; get our next link 0 00000F4A 8EC2 mov es, dx 0 00000F4C 268F05 pop word [es:di] 0 00000F4F 268F4502 pop word [es:di + 2] ; update their next link 0 00000F53 8EC0 mov es, ax 0 00000F55 26830E0000FF or word [es:0], -1 0 00000F5B 26830E0200FF or word [es:0 + 2], -1 ; de-initialise our next link 0 00000F61 07 pop es 5748 0 00000F62 31C9 xor cx, cx ; flag: do not shrink our allocation 0 00000F64 8B1E[FC13] mov bx, word [qq_device_prepare.container_segment] 0 00000F68 85DB test bx, bx ; are we in a container ? 0 00000F6A 7451 jz .nocontainer ; no --> 5753 .handlecontainer: 0 00000F6C 0306[920D] add ax, word [device_mcb_paragraphs] 5755 ; => behind our allocation 0 00000F70 89C2 mov dx, ax 0 00000F72 F7DA neg dx 0 00000F74 0316[FE13] add dx, word [qq_device_prepare.container_end] 5759 ; are we last in container ? 0 00000F78 1E push ds 0 00000F79 8EDB mov ds, bx ; => container 5762 0 00000F7B 7418 je .notrail ; yes, easier --> 5764 0 00000F7D 48 dec ax ; => last paragraph allocated to us 5766 ; (buffer for trailer container MCB) 0 00000F7E 8EC0 mov es, ax 0 00000F80 31F6 xor si, si 0 00000F82 31FF xor di, di 5770 ; copy over MCB letter, owner, and name/type 0 00000F84 B90800 mov cx, words(16) 0 00000F87 F3A5 rep movsw 0 00000F89 36C606[0014]4D mov byte [ss:qq_device_prepare.container_is_z], 'M' 5774 ; tell subsequent handler to use 'M' 0 00000F8F 2689160300 mov word [es:3], dx ; set new size 0 00000F94 41 inc cx ; flag: shrink our allocation 5777 5778 .notrail: 0 00000F95 E82B00 call .setowner 0 00000F98 26290E0300 sub word [es:3], cx ; -= 1 in case we have trail 0 00000F9D 36A0[0014] mov al, byte [ss:qq_device_prepare.container_is_z] 0 00000FA1 26A20000 mov byte [es:0], al ; set our letter to M or Z 5783 ; (Z only if container had Z and also 5784 ; there is no trailing container created) 5785 0 00000FA5 29DA sub dx, bx ; device mode MCB minus container MCB 0 00000FA7 4A dec dx ; account for MCB paragraph to get MCB size 0 00000FA8 89160300 mov word [3], dx ; adjust size 0 00000FAC C60600004D mov byte [0], 'M' ; set M unconditionally 0 00000FB1 85D2 test dx, dx ; size zero ? 0 00000FB3 7504 jnz @F 0 00000FB5 89160100 mov word [1], dx ; yes, zero the owner too 5793 @@: 0 00000FB9 1F pop ds 0 00000FBA E9A1FE jmp qqlate.appterminate 5796 5797 .nocontainer: 0 00000FBD E80300 call .setowner 0 00000FC0 E99BFE jmp qqlate.appterminate 5800 5801 5802 ; INP: ss = debugger process/data segment 5803 ; OUT: es = dx => our device mode MCB 5804 ; owner of this MCB set to our process 5805 ; STT: R86M 5806 ; CHG: - 5807 .setowner: 0 00000FC3 8CD2 mov dx, ss 0 00000FC5 83EA05 sub dx, deviceshim_size_p + paras(10h + 10h) 5810 ; span shim, pseudo MCB, actual MCB 0 00000FC8 8EC2 mov es, dx ; => device mode MCB 0 00000FCA 268C160100 mov word [es:1], ss ; insure valid owner (must be our PSP) 0 00000FCF C3 retn 5814 %endif 5815 5816 5817 %if (_APPLICATION && _TSR) || _DEVICE 5818 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 5818 ------------------ note: usesection lDEBUG_DATA_ENTRY 5819 5820 qq.proceedtsrtermination: 0 00001415 FA cli 0 00001416 8CC8 mov ax, cs 0 00001418 8ED0 mov ss, ax 0 0000141A BC[1010] mov sp, stack_end 0 0000141D 8ED8 mov ds, ax 0 0000141F FC cld 0 00001420 FB sti 0 00001421 832E[080E]12 sub word [reg_esp], 2+4+((qq.tsrfreecode_size+1)&~1) 0 00001426 8B3E[080E] mov di, word [reg_esp] ; -> stack frame 0 0000142A 8E06[200E] mov es, word [reg_ss] 0 0000142E A1[180E] mov ax, word [reg_ds] 0 00001431 AB stosw ; debuggee's ds 0 00001432 A1[300E] mov ax, word [reg_eip] 0 00001435 AB stosw 0 00001436 A1[240E] mov ax, word [reg_cs] 0 00001439 AB stosw ; debuggee's cs:ip 0 0000143A 06 push es 0 0000143B 57 push di 0 0000143C BE[7814] mov si, qq.tsrfreecode 0 0000143F B90600 mov cx, ((qq.tsrfreecode_size+1)>>1) 0 00001442 F3A5 rep movsw ; code on stack 0 00001444 8CC8 mov ax, cs ; => process segment 0 00001446 48 dec ax ; span actual MCB 5844 %if _DEVICE 5845 %if _APPLICATION 0 00001447 F606[EE01]40 testopt [internalflags6], dif6_device_mode 0 0000144C 7403 jz @F 5848 %endif 0 0000144E 83E804 sub ax, deviceshim_size_p + paras(10h) 5850 ; span shim + pseudo MCB 5851 @@: 5852 %endif 0 00001451 A3[180E] mov word [reg_ds], ax ; = our MCB 0 00001454 8F06[300E] pop word [reg_eip] 0 00001458 8F06[240E] pop word [reg_cs] ; -> code on stack (at int3) 0 0000145C F606[F513]01 testopt [qq_mode], qqmode_b 5857 ; QB mode ? 0 00001461 7504 jnz @F ; yes, leave pointing cs:ip at int3 0 00001463 FF06[300E] inc word [reg_eip] ; point cs:ip past the int3 5860 @@: 0 00001467 F606[AB01]80 testopt [options3], opt3_tsr_quit_leave_tf 0 0000146C 7505 jnz @F 0 0000146E 8026[350E]FE clropt [reg_efl], 100h ; clear TF 5864 @@: 5865 0 00001473 E838FF call entry_to_code_seg 0 00001476 [D00F] dw .proceedtsrcode 5868 5869 5870 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 5870 ------------------ note: usesection lDEBUG_CODE 5871 5872 code_insure_low_byte_not_0CCh 5873 .proceedtsrcode: 5874 %if _DEBUG 5875 ; avoid hooking interrupts again: 5876 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 5877 ; (SMC in section lDEBUG_CODE) 5878 %endif 0 00000FD0 E9[0000] jmp run ; run this 5880 5881 5882 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 5882 ------------------ note: usesection lDEBUG_DATA_ENTRY 5883 5884 align 2, db 0 5885 ; (Update: Explicitly clears TF now, except if the 5886 ; option opt3_tsr_quit_leave_tf is set. See above.) 5887 ; 5888 ; Note that since we are in control of debuggee's TF and 5889 ; reset it every time the debugger is entered, this code 5890 ; will not be entered with TF set. It might be entered 5891 ; with IF set and an interrupt might occur; the only harm 5892 ; done then is that the interrupt handler has less stack 5893 ; available. All flags must be preserved by this code. 5894 qq.tsrfreecode: 0 00001478 CC int3 ; breakpoint for QB mode, 1 byte 0 00001479 C70601000000 mov word [1], 0 ; free the MCB 0 0000147F 1F pop ds ; restore debuggee's ds 0 00001480 CA0C00 retf ((qq.tsrfreecode_size+1)&~1) ; jump 5899 qq.tsrfreecode_size: equ $-qq.tsrfreecode 5900 5901 5902 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 5902 ------------------ note: usesection lDEBUG_CODE 5903 5904 ; INP: ax => PSP segment to set as parent 5905 ; ss:dx -> entrypoint to set as PRA 5906 qqlate.setparent: 0 00000FD3 A31600 mov word [16h], ax 0 00000FD6 89160A00 mov word [0Ah], dx 0 00000FDA 8C160C00 mov word [0Ah+2], ss 0 00000FDE C3 retn 5911 %endif 5912 5913 5914 usesection lDEBUG_CODE 5914 ------------------ note: usesection lDEBUG_CODE 5915 5916 %if _BOOTLDR 5917 qqlate.bootterminate: 0 00000FDF 812E[080E]BE00 sub word [reg_esp], 2*8+4+((qq.bootfreecode_size+1)&~1) 0 00000FE5 8B3E[080E] mov di, word [reg_esp] ; -> stack frame 0 00000FE9 8E06[200E] mov es, word [reg_ss] 0 00000FED A1[180E] mov ax, word [reg_ds] 0 00000FF0 AB stosw 0 00000FF1 A1[1C0E] mov ax, word [reg_es] 0 00000FF4 AB stosw 0 00000FF5 A1[100E] mov ax, word [reg_esi] 0 00000FF8 AB stosw 0 00000FF9 A1[140E] mov ax, word [reg_edi] 0 00000FFC AB stosw 0 00000FFD A1[F80D] mov ax, word [reg_eax] 0 00001000 AB stosw 0 00001001 A1[000E] mov ax, word [reg_ecx] 0 00001004 AB stosw 0 00001005 A1[FC0D] mov ax, word [reg_ebx] 0 00001008 AB stosw 0 00001009 A1[040E] mov ax, word [reg_edx] 0 0000100C AB stosw 0 0000100D A1[300E] mov ax, word [reg_eip] 0 00001010 AB stosw 0 00001011 A1[240E] mov ax, word [reg_cs] 0 00001014 AB stosw ; debuggee's cs:ip 0 00001015 06 push es 0 00001016 57 push di 0 00001017 1E push ds 0 00001018 0E push cs 0 00001019 1F pop ds ; => lDEBUG_CODE 0 0000101A BE[8C10] mov si, qq.bootfreecode 0 0000101D B95500 mov cx, ((qq.bootfreecode_size+1)>>1) 0 00001020 F3A5 rep movsw ; code on stack 0 00001022 1F pop ds 5950 0 00001023 16 push ss 0 00001024 07 pop es 5953 0 00001025 A1[0000] mov ax, word [ boot_new_memsizekib ] 0 00001028 B106 mov cl, 6 0 0000102A D3E0 shl ax, cl ; ax => source of EBDA (new position) 0 0000102C 8B16[0000] mov dx, word [ boot_old_memsizekib ] 0 00001030 D3E2 shl dx, cl ; dx => destination of EBDA (old position) 0 00001032 31C9 xor cx, cx ; size of EBDA to move (if none) 0 00001034 1E push ds 0 00001035 8ED9 mov ds, cx 0 00001037 8B1E0E04 mov bx, word [40Eh] ; new ref in word [0:40Eh] (if none) 0 0000103B 1F pop ds 0 0000103C 803E[0000]00 cmp byte [ boot_ebdaflag ], 0 ; any EBDA ? 0 00001041 7412 jz .noebda 5966 0 00001043 1E push ds 0 00001044 8ED8 mov ds, ax ; => EBDA 0 00001046 31DB xor bx, bx 0 00001048 8A1E0000 mov bl, byte [ 0 ] ; EBDA size in KiB 0 0000104C B106 mov cl, 6 0 0000104E D3E3 shl bx, cl ; *64, to paragraphs 0 00001050 89D9 mov cx, bx ; = size of EBDA to move (in paragraphs) 0 00001052 89D3 mov bx, dx ; = new EBDA reference to put in word [0:40Eh] 0 00001054 1F pop ds 5976 5977 .noebda: 0 00001055 A3[F80D] mov word [reg_eax], ax ; => relocated (new) EBDA position 5979 ; (in front of debugger image) 0 00001058 891E[FC0D] mov word [reg_ebx], bx ; = what to put in word [0:40Eh], 5981 ; unchanged content of that word if no EBDA 0 0000105C 890E[000E] mov word [reg_ecx], cx ; = EBDA size, 0 if no EBDA 0 00001060 8916[040E] mov word [reg_edx], dx ; = original (old) EBDA position 5984 ; = original mem size (in paras) 5985 ; (behind/in debugger image) 0 00001064 C706[180E]0000 mov word [reg_ds], 0 5987 0 0000106A 8F06[300E] pop word [reg_eip] 0 0000106E 8F06[240E] pop word [reg_cs] ; -> code on stack 0 00001072 F606[F513]01 testopt [qq_mode], qqmode_b 5991 ; QB mode ? 0 00001077 7504 jnz @F ; yes, leave pointing cs:ip at int3 0 00001079 FF06[300E] inc word [reg_eip] ; point cs:ip past the int3 5994 @@: 0 0000107D F606[AB01]80 testopt [options3], opt3_tsr_quit_leave_tf 0 00001082 7505 jnz @F 0 00001084 8026[350E]FE clropt [reg_efl], 100h ; clear TF 5998 @@: 5999 ; call dumpregs 6000 %if _DEBUG 6001 ; avoid hooking interrupts again: 6002 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 6003 ; (SMC in section lDEBUG_CODE) 6004 %endif 6005 ; jmp cmd3 0 00001089 E9[0000] jmp run ; run this 6007 6008 6009 align 2, db 0 6010 qq.bootfreecode: 0 0000108C CC int3 ; breakpoint for QB mode, 1 byte 0 0000108D 9C pushf 0 0000108E FA cli 0 0000108F E81800 call movp ; move EBDA back (if any) 0 00001092 891E0E04 mov word [40Eh], bx ; back relocate EBDA (if any) 0 00001096 B106 mov cl, 6 0 00001098 D3EA shr dx, cl ; = to KiB 0 0000109A 89161304 mov word [413h], dx ; back relocate mem size 0 0000109E 9D popf 0 0000109F 1F pop ds 0 000010A0 07 pop es 0 000010A1 5E pop si 0 000010A2 5F pop di 0 000010A3 58 pop ax 0 000010A4 59 pop cx 0 000010A5 5B pop bx 0 000010A6 5A pop dx 0 000010A7 CAAA00 retf ((qq.bootfreecode_size+1)&~1) 6029 %endif 6030 %endif ; !_LOADER 6031 6032 6033 ; Move paragraphs 6034 ; 6035 ; INP: ax:0-> source 6036 ; dx:0-> destination 6037 ; cx = number of paragraphs 6038 ; CHG: - 6039 ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 6040 ; Do not provide a wrapped/HMA source or destination! 6041 movp: section_of_function 0 000010AA 51 push cx 0 000010AB 1E push ds 0 000010AC 56 push si 0 000010AD 06 push es 0 000010AE 57 push di 6047 0 000010AF 39D0 cmp ax, dx ; source above destination ? 0 000010B1 770A ja .up ; yes, move up (forwards) --> 0 000010B3 747B je .return ; same, no need to move --> 0 000010B5 50 push ax 0 000010B6 01C8 add ax, cx ; (expected not to carry) 0 000010B8 39D0 cmp ax, dx ; end of source is above destination ? 0 000010BA 58 pop ax 0 000010BB 7730 ja .down ; yes, move from top down --> 6056 ; Here, the end of source is below-or-equal the destination, 6057 ; so they do not overlap. In this case we prefer moving up. 6058 6059 .up: 0 000010BD 50 push ax 0 000010BE 52 push dx 6062 .uploop: 0 000010BF 8ED8 mov ds, ax 0 000010C1 8EC2 mov es, dx 0 000010C3 31FF xor di, di 0 000010C5 31F6 xor si, si ; -> start of segment 0 000010C7 81E90010 sub cx, 1000h ; 64 KiB left ? 0 000010CB 7610 jbe .uplast ; no --> 0 000010CD 51 push cx 0 000010CE B90080 mov cx, 10000h /2 0 000010D1 F3A5 rep movsw ; move 64 KiB 0 000010D3 59 pop cx 0 000010D4 050010 add ax, 1000h 0 000010D7 81C20010 add dx, 1000h ; -> next segment 0 000010DB EBE2 jmp short .uploop ; proceed for more --> 6076 .uplast: 0 000010DD 81C10010 add cx, 1000h ; restore counter 0 000010E1 D1E1 shl cx, 1 0 000010E3 D1E1 shl cx, 1 0 000010E5 D1E1 shl cx, 1 ; *8, paragraphs to words 0 000010E7 F3A5 rep movsw ; move last part 0 000010E9 5A pop dx 0 000010EA 58 pop ax 0 000010EB EB43 jmp short .return 6085 6086 .down: 0 000010ED FD std ; _AMD_ERRATUM_109_WORKAROUND as below 6088 .dnloop: 0 000010EE 81E90010 sub cx, 1000h ; 64 KiB left ? 0 000010F2 761A jbe .dnlast ; no --> 0 000010F4 50 push ax 0 000010F5 52 push dx 0 000010F6 01C8 add ax, cx 0 000010F8 01CA add dx, cx 0 000010FA 8ED8 mov ds, ax ; -> 64 KiB not yet moved 0 000010FC 8EC2 mov es, dx 0 000010FE 5A pop dx 0 000010FF 58 pop ax 0 00001100 BFFEFF mov di, -2 0 00001103 89FE mov si, di ; moved from last word down 0 00001105 51 push cx 0 00001106 B90080 mov cx, 10000h /2 0 00001109 F3A5 rep movsw ; move 64 KiB 0 0000110B 59 pop cx 0 0000110C EBE0 jmp short .dnloop ; proceed for more --> 6106 .dnlast: 0 0000110E 81C10010 add cx, 1000h ; restore counter 0 00001112 D1E1 shl cx, 1 0 00001114 D1E1 shl cx, 1 0 00001116 D1E1 shl cx, 1 ; *8, paragraphs to words 0 00001118 89CF mov di, cx 0 0000111A 4F dec di 0 0000111B D1E7 shl di, 1 ; words to offset, -> last word 0 0000111D 89FE mov si, di 0 0000111F 8ED8 mov ds, ax 0 00001121 8EC2 mov es, dx ; first segment correct 6117 6118 6119 numdef AMD_ERRATUM_109_WORKAROUND, 1 6120 ; Refer to comment in init.asm init_movp. 6121 6122 %if _AMD_ERRATUM_109_WORKAROUND 0 00001123 E308 jcxz @FF 0 00001125 83F914 cmp cx, 20 0 00001128 7703 ja @FF 6126 @@: 0 0000112A A5 movsw 0 0000112B E2FD loop @B 6129 @@: 6130 %endif 0 0000112D F3A5 rep movsw ; move first part 0 0000112F FC cld 6133 .return: 0 00001130 5F pop di 0 00001131 07 pop es 0 00001132 5E pop si 0 00001133 1F pop ds 0 00001134 59 pop cx 0 00001135 C3 retn 6140 %if !_LOADER 6141 qq.bootfreecode_size: equ $-qq.bootfreecode 6142 %endif 6143 6144 6145 %if (_CATCHINTFAULTCOND && _CATCHINT0D) || (_CATCHINTFAULTCOND && _CATCHINT0C) || _CATCHINT08 || _CATCHINT2D || _PM || 1 ; (serial) 6149 ; INP: ds:si -> IISP entry 6150 ; al = interrupt number 6151 ; dx = interrupt unhook force flag (dif4 high word) 6152 ; bx = interrupt hook status flag (dif4 low word) 6153 ; cx = letters to insert into message 6154 ; bp = number of interrupts already unable to unhook 6155 ; OUT: NC if able to unhook or not currently hooked 6156 ; CY if currently hooked and unable to unhook, 6157 ; error message displayed 6158 ; bp incremented 6159 ; CHG: es, dx, ah, di 6160 qq_int_unhook_sim.set_bx_to_dx: 0 00001136 89D3 mov bx, dx 6162 6163 qq_int_unhook_sim: 0 00001138 851E[E401] test word [internalflags4], bx 0 0000113C 7413 jz .ret ; (NC) 6166 6167 .need: 0 0000113E E8[0000] call UnhookInterruptForceSim 6169 ; try unhooking it 0 00001141 16 push ss 0 00001142 07 pop es 0 00001143 730C jnc .ret 6173 0 00001145 890E[0000] mov word [msg.serial_cannot_unhook.int], cx 0 00001149 BA[0000] mov dx, msg.serial_cannot_unhook.nowarn 0 0000114C E8[0000] call putsz 0 0000114F 45 inc bp 0 00001150 F9 stc 6179 6180 .ret: 0 00001151 C3 retn 6182 %endif 6183 6184 6185 %if (_CATCHINTFAULTCOND && _CATCHINT0D) || (_CATCHINTFAULTCOND && _CATCHINT0C) || _CATCHINT08 || _CATCHINT2D || _PM 6188 ; INP: al = interrupt number 6189 ; ds:si -> IISP entry 6190 ; dx = interrupt unhook force flag (dif4 high word) 6191 ; bx = interrupt hook status flag (dif4 low word) 6192 ; cx = text to insert into error message 6193 ; OUT: CY if is hooked and error unhooking, 6194 ; dx -> error message 6195 ; NC if not hooked now (already wasn't or have unhooked), 6196 ; ZR if was already unhooked 6197 ; NZ if has been unhooked, was hooked 6198 qq_int_unhook_real.set_bx_to_dx: 0 00001152 89D3 mov bx, dx 6200 6201 qq_int_unhook_real: 0 00001154 851E[E401] test word [internalflags4], bx 0 00001158 7419 jz .ret ; --> (NC, ZR) 6204 6205 .need: 0 0000115A E8[0000] call UnhookInterruptForce 6207 ; try unhooking it 0 0000115D 7309 jnc .unhooked 6209 0 0000115F 890E[0000] mov word [msg.serial_cannot_unhook.int], cx 0 00001163 BA[0000] mov dx, msg.serial_cannot_unhook.nowarn 0 00001166 F9 stc 0 00001167 C3 retn 6214 6215 .unhooked: 0 00001168 F7D3 not bx 0 0000116A 211E[E401] and word [internalflags4], bx 0 0000116E E8[0000] call update_inttab_optional 0 00001171 85E4 test sp, sp ; (NC, NZ) 6220 .ret: 0 00001173 C3 retn 6222 %endif 6223 6224 6225 %ifn _LINK || _LINK_COMPAT 6226 %include "ss.asm" 6227 %endif 6228 6229 6230 usesection lDEBUG_CODE 6230 ------------------ note: usesection lDEBUG_CODE 6231 6232 %if 0 6233 getdebuggeebyte: 6234 push bp 6235 mov bp, sp 6236 sub sp, byte 4 6237 push bx 6238 push cx 6239 %define _dedata -4 6240 %define _bp 0 6241 %define _ip 2 6242 %define _adroffset 4 6243 %define _adrsegment 8 6244 test byte [], memorydump 6245 jz .realmemory 6246 6247 jmp short .return 6248 .realmemory32: 6249 .realmemory: 6250 mov ax, word [ bp + _adrsegment ] 6251 mov bx, word [ bp + _adroffset ] 6252 push ds 6253 mov ds, ax 6254 push word [ bx ] 6255 pop word [ bp + _dedata ] 6256 push word [ bx +2 ] 6257 pop word [ bp + _dedata +2 ] 6258 pop ds 6259 ; test ax, ax 6260 ; jnz .return 6261 mov dx, ax 6262 mov cl, 4 6263 shl ax, cl 6264 mov cl, 12 6265 shr dx, cl 6266 add ax, bx 6267 adc dx, byte 0 6268 jnz .return 6269 sub ax, 23h*4 6270 jb .return 6271 cmp ax, 2*4 6272 jae .return 6273 6274 push ds 6275 xor bx, bx 6276 mov ds, bx 6277 push si 6278 push di 6279 mov si, 22h*4 6280 mov di, hackints.dummy22 6281 movsw 6282 movsw 6283 mov bl, 8 6284 add si, bx 6285 add di, bx 6286 movsw 6287 movsw 6288 6289 mov cl, byte [ bx - 4 + hackints2324 ] 6290 mov byte [ bp + _dedata ], cl 6291 .return: 6292 pop cx 6293 pop bx 6294 pop ax 6295 pop dx 6296 pop bp 6297 retn 6 6298 6299 6300 ; Interrupt hack table 6301 ; 6302 ; This contains the Int23 and Int24 handler we want to show 6303 ; the user. As we'll retrieve a dword per access, 6304 align 4, db 0 6305 hackints: 6306 .dummy22: dd 0 6307 .23: dd 0 6308 .24: dd 0 6309 .dummy25: dd 0 6310 %endif 6311 6312 6313 %ifn _LINK || _LINK_COMPAT 6314 %if !_LOADER 6315 %include "ww.asm" 6316 %endif 6317 %endif 6318 6319 6320 usesection lDEBUG_CODE 6320 ------------------ note: usesection lDEBUG_CODE 6321 6322 %ifn _EMS 6323 xx: equ error 6324 %else 6325 %define extcall nearcall 6326 %define extcallcall nearcall 6327 %imacro internalcoderelocation 0-*.nolist 6328 %endmacro 6329 %imacro internaldatarelocation 0-*.nolist 6330 %endmacro 6331 %imacro linkdatarelocation 0-*.nolist 6332 %endmacro 6333 %define relocated(address) address 6334 %assign ELD 0 6335 6336 %include "xxshared.asm" 6337 6338 %undef extcall 6339 %undef extcallcall 6340 %unimacro internalcoderelocation 0-*.nolist 6341 %unimacro internaldatarelocation 0-*.nolist 6342 %unimacro linkdatarelocation 0-*.nolist 6343 %undef relocated 6344 %endif ; _EMS 6345 6346 %if _DUALCODE 6347 usesection lDEBUG_CODE2 6348 error_mirror: 6349 dualcall error 6350 6351 usesection lDEBUG_CODE 6352 %else 6353 error_mirror equ error 6354 %endif 6355 6356 %ifn _EXPRDUALCODE && _DUALCODE 6357 %if _LINK 6358 error_expr: equ error 6359 %endif 6360 %endif 6361 6362 ; Error handlers. 6363 dualfunction 6364 error: section_of_function 0 00001174 16 push ss 0 00001175 07 pop es 0 00001176 16 push ss 0 00001177 1F pop ds 6369 %if _RH 0 00001178 8026[EE01]CF clropt [internalflags6], dif6_rh_mode_2 | dif6_rh_mode 6371 %endif 6372 6373 %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 0000117D B304 mov bl, 4 6375 ; INP: bl = 4 means want to get effective carat position, 6376 ; si -> text with error 6377 ; bl = 5 means want to get carat position with 6378 ; si = input value for counter 6379 ; OUT: bl == 4 if to run default handling, 6380 ; si may be modified 6381 ; bl == 5 if to use si as number of spaces to indent, 6382 ; si = value for counter 6383 ; bl must be 4 or 5 6384 ; CHG: ax, bh, cx, dx, di 6385 ; STT: ds = es = ss 6386 ; UP, EI 0 0000117F E8[0000] call transfer_to_ext_puts_getline 0 00001182 89F1 mov cx, si 0 00001184 80FB04 cmp bl, 4 0 00001187 7511 jne .gotcx 6391 %else 6392 mov cx, si 6393 %endif 0 00001189 81E9[1300] sub cx, line_in+3 0 0000118D 81F90001 cmp cx, 256 0 00001191 7705 ja .invalid 0 00001193 030E[AC0C] add cx, word [promptlen]; number of spaces to skip 0 00001197 A9 db __TEST_IMM16 ; (skip xor) 6399 .invalid: 0 00001198 31C9 xor cx, cx ; if we're really messed up 6401 .gotcx: 0 0000119A 8B26[420C] mov sp, [throwsp] 0 0000119E FF26[400C] jmp near [throwret] 6404 ; INP: cx = number of spaces to indent 6405 6406 ; This is the default address in throwret. 6407 ; Display the error, then jump to errret. 6408 errhandler: 0 000011A2 E8[0000] call get_columns ; ax = columns 6410 .: 0 000011A5 29C1 sub cx, ax 0 000011A7 73FC jnc . 0 000011A9 01C1 add cx, ax 0 000011AB 7407 jz err2 0 000011AD B020 mov al, 32 6416 .loop: 0 000011AF E8[0000] call putc 0 000011B2 E2FB loop .loop 6419 err2: 0 000011B4 BA[0000] mov dx, errcarat 0 000011B7 E8[0000] call putsz ; print string 0 000011BA B8FF01 mov ax, 01FFh 0 000011BD E80A00 call setrc 0 000011C0 C706[520D][4B05] mov word [lastcmd], dmycmd 6425 ; cancel command repetition 0 000011C6 FF26[3E0C] jmp near [errret] ; return to the prompt (cmd3, aa01) 6427 6428 6429 setrc: section_of_function 0 000011CA 833E[B40C]00 cmp word [rc], 0 0 000011CF 7503 jne .ret 0 000011D1 A3[B40C] mov word [rc], ax 6433 .ret: 0 000011D4 C3 retn 6435 6436 6437 %if !_LOADER 6438 ; Terminate the attached process, if any 6439 ; 6440 ; OUT: NZ if now no process attached 6441 ; ZR if still a process attached, 6442 ; ie we failed to terminate this one 6443 terminate_attached_process: 0 000011D5 F606[DA01]80 testopt [internalflags], attachedterm 0 000011DA 753E jnz @F 6446 %if _TSR && (_APPLICATION || _DEVICE) 0 000011DC F606[DA01]40 testopt [internalflags], tsrmode 0 000011E1 7538 jnz .tsr 6449 %endif 0 000011E3 8026[350E]FC clropt [reg_efl], 300h ; clear TF and IF 0 000011E8 8C0E[240E] mov word [reg_cs], cs 0 000011EC C706[300E][DF0E] mov word [reg_eip], terminate_00 0 000011F2 50 push ax ; (dummy to take space for return address) 0 000011F3 8C16[200E] mov word [reg_ss], ss 0 000011F7 8926[080E] mov word [reg_esp], sp ; save current ss:sp 0 000011FB 58 pop ax ; (discard) 0 000011FC 31C0 xor ax, ax 0 000011FE A3[320E] mov word [reg_eip+2], ax 0 00001201 A3[0A0E] mov word [reg_esp+2], ax 0 00001204 A3[360E] mov word [reg_efl+2], ax 6461 %if _PM 6462 mov word [reg_es], ax 6463 mov word [reg_ds], ax 6464 mov word [reg_fs], ax 6465 mov word [reg_gs], ax ; insure valid segregs in PM 6466 %endif 0 00001207 C706[480C]8000 mov word [run_sp_reserve], 128 0 0000120D E8[0000] call run 6469 ; The dummy stack space above is to hold the return address 6470 ; of this call. The debugger stack is used by this run. 0 00001210 8326[480C]00 and word [run_sp_reserve], 0 6472 6473 %if _SYMBOLIC 6474 nearcall zz_detect_xms 6475 clropt [internalflags2], dif2_createdprocess 6476 %endif 6477 .testagain: 0 00001215 F606[DA01]80 testopt [internalflags], attachedterm 6479 @@: 0 0000121A C3 retn 6481 6482 %if _TSR && (_APPLICATION || _DEVICE) 6483 .tsr: 0 0000121B C706[500D][0000] mov word [run_int], msg.tsr_cannot_terminate_attached 0 00001221 EBF2 jmp .testagain 6486 %endif 6487 %endif 6488 6489 6490 %ifn _LINK || _LINK_COMPAT 6491 %include "vv.asm" 6492 %endif 6493 %if !_VXCHG && _LINK 6494 vv equ error 6495 %endif 6496 6497 6498 %if _DEVICE && _DEVICE_SET_2324 6499 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 6499 ------------------ note: usesection lDEBUG_DATA_ENTRY 6500 devint23: 0 00001483 F9 stc 0 00001484 CB retf 6503 6504 devint24: 0 00001485 B003 mov al, 3 0 00001487 CF iret 6507 6508 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 6508 ------------------ note: usesection lDEBUG_CODE 6509 %endif 6510 6511 6512 ;--- this is called by "run" 6513 ;--- set debuggee's INT 23/24. 6514 ;--- don't use INT 21h here, DOS might be "in use". 6515 ;--- registers may be modified - will soon be set to debuggee's 6516 6517 %if !_LOADER 6518 ; Low-level functions to reset to debuggee's interrupt vectors 23h/24h 6519 ; INP: - 6520 ; OUT: - 6521 ; CHG: bx, (e)dx, cx, ax 6522 ; STT: ds = our segment 6523 ; Do not use Int21, even if not in InDOS mode 6524 setint2324: 6525 %if _BOOTLDR 6526 %if _APPLICATION || _DEVICE 0 00001223 F606[D901]40 testopt [internalflags], nodosloaded 0 00001228 7514 jnz .ret ; don't touch int23/24 --> 6529 %else 6530 retn 6531 %endif 6532 %endif 6533 %if _APPLICATION || _DEVICE 6534 %if _PM 6535 call ispm 6536 jz .pm 6537 %endif 0 0000122A 06 push es 0 0000122B 57 push di 0 0000122C 56 push si 6541 0 0000122D 31FF xor di, di 0 0000122F 8EC7 mov es, di 0 00001231 BF8C00 mov di, 23h *4 0 00001234 BE[500C] mov si, run2324 0 00001237 A5 movsw 0 00001238 A5 movsw 0 00001239 A5 movsw 0 0000123A A5 movsw 6550 6551 %if _PM 6552 call InDOS 6553 jnz @F 6554 call hook2F 6555 @@: 6556 %endif 0 0000123B 5E pop si 0 0000123C 5F pop di 0 0000123D 07 pop es 6560 .ret: 0 0000123E C3 retn 6562 %if _PM 6563 .pm: 6564 push si 6565 mov si, run2324 6566 mov bx, 0223h 6567 .loop: 6568 _386_o32 ; mov edx, dword [si+0] 6569 mov dx, word [si+0] 6570 mov cx, word [si+4] 6571 mov ax, 0205h 6572 int 31h 6573 add si, 6 6574 inc bl 6575 dec bh 6576 jnz .loop 6577 pop si 6578 retn 6579 %endif 6580 %endif 6581 6582 6583 ; Low-level functions to save debuggee's interrupt vectors 23h/24h 6584 ; and set our interrupt vectors instead 6585 ; INP: - 6586 ; OUT: - 6587 ; CHG: - 6588 ; STT: ds = our segment 6589 ; Do not use Int21, even if not in InDOS mode 6590 getint2324: 6591 %if _BOOTLDR 6592 %if _APPLICATION || _DEVICE 0 0000123F F606[D901]40 testopt [internalflags], nodosloaded 0 00001244 7525 jnz .ret ; don't touch int23/24 --> 6595 %else 6596 retn 6597 %endif 6598 %endif 6599 %if _APPLICATION || _DEVICE 6600 %if _PM 6601 call ispm 6602 jz .pm 6603 %endif 0 00001246 56 push si 0 00001247 57 push di 0 00001248 06 push es 6607 0 00001249 1E push ds 0 0000124A 07 pop es 0 0000124B 31FF xor di, di 0 0000124D 8EDF mov ds, di 0 0000124F BF[500C] mov di, run2324 0 00001252 BE8C00 mov si, 23h *4 0 00001255 56 push si 0 00001256 A5 movsw ; save interrupt vector 23h 0 00001257 A5 movsw 0 00001258 A5 movsw ; save interrupt vector 24h 0 00001259 A5 movsw 0 0000125A 5F pop di 0 0000125B 06 push es 0 0000125C 1F pop ds 0 0000125D 31F6 xor si, si 0 0000125F 8EC6 mov es, si 0 00001261 BE0E00 mov si, CCIV 0 00001264 A5 movsw 0 00001265 A5 movsw 0 00001266 A5 movsw 0 00001267 A5 movsw 6629 0 00001268 07 pop es 0 00001269 5F pop di 0 0000126A 5E pop si 6633 .ret: 0 0000126B C3 retn 6635 %if _PM 6636 subcpu 286 6637 .pm: 6638 _386_o32 6639 pusha 6640 mov di, run2324 6641 mov bx, 0223h 6642 .loop: 6643 mov ax, 0204h 6644 int 31h 6645 _386_o32 ; mov dword [di+0], edx 6646 mov word [di+0], dx 6647 mov word [di+4], cx 6648 add di, byte 6 6649 inc bl 6650 dec bh 6651 jnz .loop 6652 %if _ONLYNON386 6653 db __TEST_IMM8 ; (skip pusha) 6654 %else 6655 db __TEST_IMM16 ; (skip pushad) 6656 %endif 6657 6658 restoredbgi2324: 6659 setdbgi2324: 6660 _386_o32 6661 pusha 6662 mov si, dbg2324 6663 mov bx, 0223h 6664 _386 xor edx, edx 6665 .loop: 6666 lodsw 6667 mov dx, ax 6668 mov cx, word [cssel] 6669 mov ax, 0205h 6670 int 31h 6671 inc bl 6672 dec bh 6673 jnz .loop 6674 _386_o32 6675 popa 6676 retn 6677 subcpureset 6678 %endif 6679 %endif 6680 6681 %if 0 6682 The next three subroutines concern the handling of Int23 and 24. 6683 These interrupt vectors are saved and restored when running the 6684 child process, but are not active when DEBUG itself is running. 6685 It is still useful for the programmer to be able to check where Int23 6686 and 24 point, so these values are copied into the interrupt table 6687 during parts of the C, D, (DX, DI,) E, M, and S commands, so that 6688 they appear to be in effect. The E command also copies these values 6689 back. 6690 6691 Between calls to dohack and unhack, there should be no calls to DOS, 6692 so that there is no possibility of these vectors being used when 6693 DEBUG itself is running. 6694 6695 ; As long as no DOS is loaded anyway, Int23 and Int24 won't be touched 6696 by us, so the whole hack is unnecessary and will be skipped. 6697 %endif 6698 6699 ; PREPHACK - Set up for interrupt vector substitution. 6700 ; Entry es = cs 6701 prephack: section_of_function 0 0000126C 803E[640C]00 cmp byte [hakstat], 0 0 00001271 7509 jne .err ; if hack status error --> 0 00001273 57 push di 0 00001274 BF[5C0C] mov di, sav2324 ; debugger's Int2324 0 00001277 E80B00 call prehak1 0 0000127A 5F pop di 0 0000127B C3 retn 6709 6710 .err: 0 0000127C 52 push dx 0 0000127D BA[0000] mov dx, ph_msg 0 00001280 E8[0000] call putsz ; display error 0 00001283 5A pop dx 0 00001284 C3 retn 6716 6717 ; INP: di-> saved interrupt vectors 6718 ; OUT: - 6719 ; CHG: - 6720 prehak1: 6721 %if _PM 6722 call ispm 6723 jz .pm ; nothing to do 6724 %endif 0 00001285 1E push ds 0 00001286 56 push si 0 00001287 31F6 xor si, si 0 00001289 8EDE mov ds, si 0 0000128B BE8C00 mov si, 23h *4 0 0000128E A5 movsw 0 0000128F A5 movsw 0 00001290 A5 movsw 0 00001291 A5 movsw 0 00001292 5E pop si 0 00001293 1F pop ds 6736 .pm: 0 00001294 C3 retn 6738 6739 6740 ; DOHACK - Fake the interrupt vectors 23h and 24h to debuggee's 6741 ; UNHACK - Restore interrupt vectors 23h and 24h to our values 6742 ; It's OK to do either of these twice in a row. 6743 ; In particular, the S command may do unhack twice in a row. 6744 ; INP: ds = our segment 6745 ; OUT: es = our segment 6746 ; CHG: - 6747 ; STT: Do not use Int21 6748 dohack: section_of_function 0 00001295 16 push ss 0 00001296 07 pop es 6751 %if _BOOTLDR 6752 %if _APPLICATION || _DEVICE 0 00001297 F606[D901]40 testopt [internalflags], nodosloaded 0 0000129C 752D jnz unhack.ret ; nothing to hack --> 6755 %else 6756 retn 6757 %endif 6758 %endif 6759 %if _APPLICATION || _DEVICE 0 0000129E 56 push si 0 0000129F C606[640C]01 mov byte [hakstat], 1 0 000012A4 BE[500C] mov si, run2324 ; debuggee's interrupt vectors 6763 %if _PM 6764 call ispm 6765 jnz unhack.common 6766 subcpu 286 6767 _386_o32 6768 pusha 6769 mov bx, 0223h 6770 .pm_loop: 6771 _386_o32 6772 mov dx, word [si+0+0] 6773 mov cx, word [si+0+4] 6774 mov ax, 205h 6775 int 31h 6776 add si, byte 6 6777 inc bl 6778 dec bh 6779 jnz .pm_loop 6780 _386_o32 6781 popa 6782 pop si 6783 retn 6784 subcpureset 6785 %else 0 000012A7 EB12 jmp short unhack.common 6787 %endif 6788 %endif 6789 6790 unhack: section_of_function 0 000012A9 16 push ss 0 000012AA 07 pop es 6793 %if _BOOTLDR 6794 %if _APPLICATION || _DEVICE 0 000012AB F606[D901]40 testopt [internalflags], nodosloaded 0 000012B0 7519 jnz .ret ; nothing to hack --> 6797 %else 6798 retn 6799 %endif 6800 %endif 6801 %if _APPLICATION || _DEVICE 0 000012B2 C606[640C]00 mov byte [hakstat], 0 6803 %if _PM 6804 call ispm 6805 jz restoredbgi2324 6806 %endif 0 000012B7 56 push si 0 000012B8 BE[5C0C] mov si, sav2324 ; debugger's interrupt vectors 6809 .common: 0 000012BB 57 push di 0 000012BC 06 push es 0 000012BD 31FF xor di, di 0 000012BF 8EC7 mov es, di 0 000012C1 BF8C00 mov di, 23h *4 0 000012C4 A5 movsw 0 000012C5 A5 movsw 0 000012C6 A5 movsw 0 000012C7 A5 movsw 0 000012C8 07 pop es 0 000012C9 5F pop di 0 000012CA 5E pop si 6822 .ret: 0 000012CB C3 retn 6824 %endif 6825 %endif 6826 6827 %if _LOADER 6828 prephack: section_of_function 6829 dohack: section_of_function 6830 unhack: section_of_function 6831 retn 6832 %endif 6833 6834 6835 InDOS_or_BIOS_output: 0 000012CC F606[B501]02 testopt [options6], opt6_bios_output 0 000012D1 7525 jnz InDOS.return ; if should do output to ROM-BIOS --> 6838 6839 InDOS_or_BIOS_IO: 0 000012D3 F606[B701]01 testopt [options6], opt6_bios_io 0 000012D8 751E jnz InDOS.return ; if should do I/O from/to ROM-BIOS --> 6842 6843 6844 ; OUT: NZ if InDOS mode 6845 ; ZR if not 6846 ; CHG: - 6847 ; STT: ss = ds 6848 InDOS: section_of_function 6849 %if _BOOTLDR 0 000012DA F606[D901]40 testopt [internalflags], nodosloaded 0 000012DF 7517 jnz .return ; always "in DOS" --> 6852 %endif 6853 %if _APPLICATION || _DEVICE 0 000012E1 F606[A001]08 testopt [options], fakeindos 0 000012E6 7510 jnz .return ; faking InDOS on anyway --> 6856 .real_indos: 0 000012E8 1E push ds 0 000012E9 56 push si 0 000012EA BE[740C] mov si, pInDOS + so16aSegSel 0 000012ED E80900 call update_dosdata_segment 0 000012F0 C574FE lds si, [si - so16aSegSel] 0 000012F3 803C00 cmp byte [si], 0 0 000012F6 5E pop si 0 000012F7 1F pop ds 6865 %endif 6866 .return: 0 000012F8 C3 retn 6868 6869 6870 ; INP: si -> word seg or sel, word segment, word selector 6871 update_dosdata_segment: 6872 %if _APPLICATION || _DEVICE 0 000012F9 F606[DF01]20 testopt [internalflags2], dif2_int31_segment 0 000012FE 740D jz .ret 0 00001300 52 push dx 0 00001301 50 push ax 0 00001302 53 push bx 0 00001303 B031 mov al, 31h 0 00001305 E8[0000] call get_86m_interrupt_handler_no_dos 6880 %if _PM 6881 cmp word [si + soaSegment], dx 6882 je @F 6883 6884 call ispm 6885 jnz .realmode 6886 6887 mov bx, dx 6888 mov ax, 0002h 6889 int 31h 6890 6891 mov word [si + soaSegSel], ax 6892 mov word [si + soaSelector], ax 6893 jmp @F 6894 6895 .realmode: 6896 mov word [si + soaSegSel], dx 6897 and word [si + soaSelector], 0 6898 6899 @@: 6900 mov word [si + soaSegment], dx 6901 pop bx 6902 pop ax 6903 %else 0 00001308 5B pop bx 0 00001309 58 pop ax 0 0000130A 8914 mov word [si + soaSegSel], dx 6907 %endif 0 0000130C 5A pop dx 6909 %endif 6910 .ret: 0 0000130D C3 retn 6912 6913 6914 ; PARSECM - Parse command line for C and M commands. 6915 ; Entry AL First nonwhite character of parameters 6916 ; SI Address of the character after that 6917 ; DI (If _PM) getaddr or getaddrX for second parameter 6918 ; Exit DS:ESI Address from first parameter 6919 ; ES:EDI Address from second parameter 6920 ; ECX Length of address range minus one 6921 ; [bAddr32] Set if any high word non-zero 6922 6923 parsecm_have_address: 0 0000130E E8[0000] nearcall getrangeX_have_address_need_length 0 00001311 EB0C jmp @F 6926 6927 parsecm: 0 00001313 E856FF call prephack 0 00001316 8B1E[180E] mov bx, word [reg_ds] ; get source range 0 0000131A 31C9 xor cx, cx 0 0000131C E8[0000] nearcall getrangeX ; get address range into bx:(e)dx bx:(e)cx 6932 ; Bug fixed in Debug/X 2.00: This used the same scratch 6933 ; selector as the getaddr used for the second operand. 6934 ; As we never write to the first operand of an C or M 6935 ; command the simple fix is to use getrangeX here. 6936 @@: 0 0000131F 53 push bx ; save segment first address 0 00001320 E8[0000] call skipcomm0 0 00001323 8B1E[180E] mov bx, word [reg_ds] 6940 _386_PM_o32 ; sub ecx, edx 0 00001327 29D1 sub cx, dx ; number of bytes minus one 6942 _386_PM_o32 ; push edx 0 00001329 52 push dx 6944 _386_PM_o32 ; push ecx 0 0000132A 51 push cx 6946 %if _PM 6947 mov cl, byte [bAddr32] 6948 push cx 6949 %if _DUALCODE && _EXPRDUALCODE 6950 nearcall ..@parsecm_getaddr 6951 6952 usesection lDEBUG_CODE2 6953 ..@parsecm_getaddr: section_of_function 6954 jmp di 6955 6956 usesection lDEBUG_CODE 6957 %else 6958 call di ; get destination address into bx:edx 6959 %endif 6960 pop cx 6961 or byte [bAddr32], cl ; if either is 32-bit, handle both as 32-bit 6962 %else 0 0000132B E8[0000] nearcall getaddr ; get destination address into bx:dx 6964 %endif 6965 _386_PM_o32 0 0000132E 59 pop cx ; pop ecx 6967 _386_PM_o32 ; mov edi, edx 0 0000132F 89D7 mov di, dx 6969 _386_PM_o32 0 00001331 01CA add dx, cx ; add edx, ecx 0 00001333 7208 jc short errorj7 ; if it wrapped around 0 00001335 E8[0000] call chkeol ; expect end of line 0 00001338 8EC3 mov es, bx 6974 _386_PM_o32 ; pop esi 0 0000133A 5E pop si 0 0000133B 1F pop ds 0 0000133C C3 retn 6978 6979 errorj7: 0 0000133D E934FE jmp error 6981 6982 6983 %if _APPLICATION || _DEVICE 6984 ; PARSELW - Parse command line for L and W commands. 6985 ; 6986 ; Entry AL First nonwhite character of parameters 6987 ; SI Address of the character after that 6988 ; 6989 ; Exit If there is at most one argument (program load/write), then the 6990 ; zero flag is set, and registers are set as follows: 6991 ; bx:(e)dx Transfer address 6992 ; 6993 ; If there are more arguments (absolute disk read/write), then the 6994 ; zero flag is clear, and registers are set as follows: 6995 ; 6996 ; DOS versions prior to 3.31: 6997 ; AL Drive number 6998 ; CX Number of sectors to read 6999 ; DX Beginning logical sector number 7000 ; DS:BX Transfer address 7001 ; 7002 ; Later DOS versions: 7003 ; AL Drive number 7004 ; BX Offset of packet 7005 ; CX 0FFFFh 7006 7007 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 7007 ------------------ note: usesection lDEBUG_DATA_ENTRY 7008 align 4, db 0 0 00001488 00000000 packet: dd 0 ; sector number 0 0000148C 0000 dw 0 ; number of sectors to read 0 0000148E 00000000 dd 0 ; transfer address Segm:OOOO 7012 %if _PM 7013 dw 0 ; transfer address might be Segm:OOOOOOOO! 7014 %endif 7015 7016 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 7016 ------------------ note: usesection lDEBUG_CODE 7017 parselw: 0 00001340 8B1E[240E] mov bx, word [reg_cs] ; default segment 0 00001344 66 _386_o32 ; xor edx, edx 0 00001345 31D2 xor dx, dx 0 00001347 F606[580D]08 test byte [fileext], EXT_HEX 0 0000134C 7502 jnz @F ; if .HEX file, default offset is 0 --> 0 0000134E B601 mov dh, 1 ; default offset in dx = 100h 7024 @@: 0 00001350 E8[0000] call iseol? 0 00001353 7468 je plw2 ; if no arguments 0 00001355 E8[0000] nearcall getaddr ; get buffer address into bx:(e)dx 0 00001358 E8[0000] call skipcomm0 0 0000135B E8[0000] call iseol? 0 0000135E 745D je plw2 ; if only one argument 0 00001360 53 push bx ; save segment 0 00001361 52 push dx ; save offset 0 00001362 BB8000 mov bx, 80h ; max number of sectors to read 0 00001365 F7DA neg dx 0 00001367 7406 jz plw1 ; if address is zero 0 00001369 B109 mov cl, 9 0 0000136B D3EA shr dx, cl ; max number of sectors which can be read 0 0000136D 89D7 mov di, dx 7039 plw1: 0 0000136F 803C3A cmp byte [si], ':' ; drive letter specification ? 0 00001372 750F jne @F ; no --> 7042 0 00001374 50 push ax 0 00001375 E8[0000] call capitalise 0 00001378 2C41 sub al, 'A' 0 0000137A 3C20 cmp al, 32 ; valid drive ? 0 0000137C 88C2 mov dl, al ; put drive number 0 0000137E 46 inc si ; -> past the colon 0 0000137F 58 pop ax 0 00001380 7205 jb @FF ; got it --> 0 00001382 4E dec si ; -> at colon 7052 7053 @@: 0 00001383 E8[0000] nearcall getbyte ; get drive number (DL) 0 00001386 A8 db __TEST_IMM8 ; (skip lodsb) 7056 @@: 0 00001387 AC lodsb 0 00001388 E8[0000] call skipcomm0 0 0000138B 52 push dx 0 0000138C 80C241 add dl, 'A' 0 0000138F 8816[0000] mov byte [driveno], dl 0 00001393 E8[0000] nearcall getdword ; get relative sector number 0 00001396 E8[0000] call skipcomm0 0 00001399 53 push bx ; save sector number high 0 0000139A 52 push dx ; save sector number low 0 0000139B 56 push si ; in case we find an error 0 0000139C E8[0000] nearcall getword ; get sector count 0 0000139F 4A dec dx 0 000013A0 39FA cmp dx, di 0 000013A2 7399 jae errorj7 ; if too many sectors 0 000013A4 42 inc dx 0 000013A5 89D1 mov cx, dx 0 000013A7 E8[0000] call chkeol ; expect end of line 0 000013AA F606[D801]07 testopt [internalflags], oldpacket| newpacket| ntpacket 0 000013AF 750D jnz plw3 ; if using a packet --> 0 000013B1 5E pop si ; in case of error 0 000013B2 5A pop dx ; get LoWord starting logical sector number 0 000013B3 5B pop bx ; get HiWord 0 000013B4 85DB test bx, bx ; just a 16-bit sector number possible 0 000013B6 7585 jnz errorj7 ; if too big 0 000013B8 58 pop ax ; drive number 0 000013B9 5B pop bx ; transfer buffer ofs 0 000013BA 1F pop ds ; transfer buffer seg 0 000013BB 85C9 test cx, cx ; NZ 7085 plw2: 0 000013BD C3 retn 7087 7088 ; disk I/O packet for Int25/Int26, Int21.7305, VDD 7089 plw3: 0 000013BE 5B pop bx ; discard si 0 000013BF BB[8814] mov bx, packet 0 000013C2 8F07 pop word [bx+0] ; LoWord sector number 0 000013C4 8F4702 pop word [bx+2] ; HiWord sector number 0 000013C7 894F04 mov word [bx+4], cx ; number of sectors 0 000013CA 58 pop ax ; drive number 0 000013CB 8F4706 pop word [bx+6] ; transfer address ofs 0 000013CE 5A pop dx 0 000013CF 31C9 xor cx, cx 7099 %if _PM 7100 call ispm 7101 jnz plw3_1 7102 cmp byte [dpmi32], 0 7103 jz plw3_1 7104 [cpu 386] 7105 mov word [bx+10], dx ; save segment of transfer buffer 7106 movzx ebx, bx 7107 shr edx, 16 ; get HiWord(offset) 7108 cmp byte [bAddr32], 1 7109 jz plw3_1 7110 xor dx, dx 7111 __CPU__ 7112 plw3_1: 7113 %endif 0 000013D1 895708 mov word [bx+8], dx ; transfer address seg 0 000013D4 49 dec cx ; NZ and make cx = -1 0 000013D5 C3 retn 7117 %endif 7118 7119 7120 %ifn _LINK || _LINK_COMPAT 7121 %include "expr.asm" 7122 %include "rr.asm" 7123 7124 7125 %include "lineio.asm" 7126 7127 7128 %include "ints.asm" 7129 %endif 7130 %if !_40COLUMNS && _LINK 7131 puts_break_line_more: equ dmycmd 7132 %endif 7133 7134 7135 usesection lDEBUG_CODE 7135 ------------------ note: usesection lDEBUG_CODE 7136 7137 %if _BOOTLDR 7138 ; Determine the amount of actual memory 7139 ; 7140 ; This is important to call at the time we need the size, 7141 ; not just save the size initially. Loading other pre-boot 7142 ; installers or RPLs will change the size. 7143 ; 7144 ; INP: - 7145 ; OUT: dx = segment behind usable memory (taking EBDAs & RPLs into account) 7146 ; ds = ss 7147 ; CHG: ax, cx, di, si, ds 7148 bootgetmemorysize: section_of_function 0 000013D6 06 push es 0 000013D7 31C0 xor ax, ax 0 000013D9 8ED8 mov ds, ax 0 000013DB CD12 int 12h ; get memory size in KiB 0 000013DD B106 mov cl, 6 0 000013DF D3E0 shl ax, cl ; *64, convert to paragraphs 0 000013E1 50 push ax 0 000013E2 C536BC00 lds si, [ 2Fh *4 ] ; get current Int2F 0 000013E6 46 inc si ; pointer valid (not 0FFFFh) ? (left increased!) 0 000013E7 741B jz .norpl ; no --> 0 000013E9 8CD8 mov ax, ds 0 000013EB 85C0 test ax, ax ; segment valid (not zero) ? 0 000013ED 7415 jz .norpl ; no --> 0 000013EF 46 times 2 inc si ; +3 with above inc 0 000013F1 0E push cs 0 000013F2 07 pop es 0 000013F3 BF[0914] mov di, .rpl 0 000013F6 B90300 mov cx, .rpl_size 0 000013F9 F3A6 repe cmpsb ; "RPL" signature ? 0 000013FB 7507 jne .norpl ; no --> 0 000013FD 5A pop dx 0 000013FE B8064A mov ax, 4A06h 0 00001401 CD2F int 2Fh ; adjust usable memory size for RPL 0 00001403 A8 db __TEST_IMM8 ; (skip pop) 7173 .norpl: 0 00001404 5A pop dx 7175 ; dx = segment behind last available memory 0 00001405 16 push ss 0 00001406 1F pop ds 0 00001407 07 pop es 0 00001408 C3 retn 7180 0 00001409 52504C .rpl: db "RPL" 7182 endarea .rpl 7183 %endif 7184 7185 7186 %if !_LOADER 7187 ; Ensure a debuggee process is loaded 7188 ; 7189 ; INP: si:di = to preserve if have a process already 7190 ; OUT: NZ if have no process and unable to create process 7191 ; ZR if have a process or created empty process 7192 ; NC if had no process yet, created one or not 7193 ; CY if had a process already, 7194 ; si:di = preserved input 7195 ; NC, ZR if had no process, created empty one, 7196 ; si:di = debuggee cs:ip 7197 ; NC, NZ if int19 occurred (or bootloaded) 7198 ; CHG: si, di, cx 7199 ensuredebuggeeloaded: 0 0000140C 50 push ax 0 0000140D 53 push bx 0 0000140E 52 push dx 7203 0 0000140F F606[E201]20 testopt [internalflags3], dif3_gotint19 0 00001414 746F jz .notint19 7206 0 00001416 8026[E201]DF clropt [internalflags3], dif3_gotint19 7208 %if _BOOTLDR 7209 %if _APPLICATION || _DEVICE 0 0000141B F606[D901]40 testopt [internalflags], nodosloaded 0 00001420 743B jz .dosint19 7212 %endif 7213 7214 .bootint19: 0 00001422 E86E01 call zeroregs 7216 0 00001425 B86000 mov ax, 60h 0 00001428 50 push ax 0 00001429 BF[180E] mov di, reg_ds 0 0000142C AB stosw 0 0000142D AF scasw ; (skip dummy high word) 0 0000142E AB stosw 0 0000142F AF scasw 0 00001430 AB stosw 0 00001431 AF scasw 0 00001432 AB stosw 0 00001433 E8[0000] call adusetup 0 00001436 E89DFF call bootgetmemorysize 0 00001439 83EA60 sub dx, 60h 0 0000143C 81FA0010 cmp dx, 1000h 0 00001440 7602 jbe .bootbelow64kib ; if memory left <= 64 KiB 0 00001442 31D2 xor dx, dx ; dx = 1000h (same thing, after shifting) 7233 .bootbelow64kib: 0 00001444 B104 mov cl, 4 0 00001446 D3E2 shl dx, cl 0 00001448 4A dec dx 0 00001449 4A dec dx 0 0000144A 8916[080E] mov word [reg_esp], dx 0 0000144E 07 pop es 0 0000144F 87D7 xchg dx, di ; es:di = child stack pointer 0 00001451 31C0 xor ax, ax 0 00001453 AB stosw ; push 0 on client's stack 7243 0 00001454 26C7060000CD19 mov word [es:0], 019CDh ; place opcode for int 19h at cs:ip 0 0000145B EB1B jmp @F 7246 %endif 7247 7248 %if _APPLICATION || _DEVICE 7249 .dosint19: 0 0000145D 8B16[080E] mov dx, word [reg_esp] 0 00001461 8B1E[200E] mov bx, word [reg_ss] 7252 0 00001465 E82B01 call zeroregs 7254 7255 ; Upon receiving an int 19h in DOS 7256 ; just set up some shim that will 7257 ; lead to process termination. 7258 ; Unlike before we do not longer try 7259 ; to create a new process then. 0 00001468 8916[080E] mov word [reg_esp], dx 0 0000146C 891E[200E] mov word [reg_ss], bx ; preserve our stack 0 00001470 FF36[4C0C] push word [pspdbe] 0 00001474 8F06[240E] pop word [reg_cs] ; cs = PSP, ip = 0, 7264 ; cs:ip -> int 20h instruction 7265 7266 @@: 0 00001478 F606[DA01]80 testopt [internalflags], attachedterm 0 0000147D 7511 jnz .noprocess ; if also process not loaded 7269 0 0000147F 80CA01 or dl, 1 ; flags return NC, NZ 0 00001482 E9FE00 jmp .return 7272 %endif 7273 7274 .notint19: 0 00001485 F606[DA01]80 testopt [internalflags], attachedterm 0 0000148A 7504 jnz .noprocess ; not loaded, create --> 7277 ; flags return ZR 0 0000148C F9 stc ; flags return CY 0 0000148D E9F300 jmp .return 7280 7281 .noprocess: 7282 %if _BOOTLDR 7283 %if _APPLICATION || _DEVICE 0 00001490 F606[D901]40 testopt [internalflags], nodosloaded 0 00001495 7403E9E900 jnz .return ; flags return NC, NZ 7286 %else 7287 jmp .return 7288 %endif 7289 %endif 7290 7291 %if _APPLICATION || _DEVICE 7292 .dosnoprocess: 0 0000149A B448 mov ah, 48h ; get size of largest free block 0 0000149C BBFFFF mov bx, -1 0 0000149F CD21 int 21h 0 000014A1 83FB20 cmp bx, 20h ; enough for PSP + 256 Bytes for code/stack ? 0 000014A4 7303E9E000 jb .return_no_clr ; no --> 0 000014A9 B448 mov ah, 48h ; allocate it 0 000014AB CD21 int 21h 0 000014AD 7303E9D700 jc .return_no_clr ; (memory taken between the calls) 7301 0 000014B2 50 push ax 0 000014B3 E8DD00 call zeroregs 0 000014B6 C606[310E]01 mov byte [reg_eip+1], 100h>>8 0 000014BB 58 pop ax 7306 0 000014BC 53 push bx 7308 %if _SYMBOLIC 7309 push bx 7310 %endif 0 000014BD BF[180E] mov di, reg_ds ; fill segment registers ds,es,ss,cs 0 000014C0 AB stosw 0 000014C1 AF scasw ; (skip dummy high word) 0 000014C2 AB stosw 0 000014C3 AF scasw 0 000014C4 AB stosw 0 000014C5 AF scasw 0 000014C6 AB stosw 0 000014C7 E8[0000] call adusetup 0 000014CA 8B1E[240E] mov bx, word [reg_cs] ; bx:dx = where to load program 0 000014CE 8EC3 mov es, bx 0 000014D0 58 pop ax ; get size of memory block 0 000014D1 89C2 mov dx, ax 0 000014D3 01DA add dx, bx 0 000014D5 2689160200 mov word [es:ALASAP], dx 0 000014DA 50 push ax 0 000014DB 3D0010 cmp ax, 1000h 0 000014DE 7602 jbe .below64kib ; if memory left <= 64 KiB 0 000014E0 31C0 xor ax, ax ; ax = 1000h (same thing, after shifting) 7330 .below64kib: 0 000014E2 B104 mov cl, 4 0 000014E4 D3E0 shl ax, cl 0 000014E6 48 dec ax 0 000014E7 48 dec ax 0 000014E8 A3[080E] mov word [reg_esp], ax 0 000014EB 97 xchg ax, di ; es:di = child stack pointer 0 000014EC 31C0 xor ax, ax 0 000014EE AB stosw ; push 0 on client's stack 7339 7340 ; Create a PSP 0 000014EF B455 mov ah, 55h ; create child PSP 0 000014F1 8CC2 mov dx, es 0 000014F3 268B360200 mov si, word [es:ALASAP] 0 000014F8 F8 clc ; works around OS/2 bug 0 000014F9 CD21 int 21h 0 000014FB 2689360200 mov word [es:ALASAP], si 0 00001500 E8F5F2 call setpspdbg ; reset PSP to ours 0 00001503 E8[0000] call ll_copy_cmdline_and_fcbs 0 00001506 58 pop ax 7350 0 00001507 1E push ds 0 00001508 06 push es 0 00001509 1F pop ds 0 0000150A 3DFF0F cmp ax, 0FFFh 0 0000150D 7603 jbe @F 0 0000150F B8FF0F mov ax, 0FFFh ; 0FFFh for large blocks 7357 @@: 0 00001512 83E810 sub ax, 10h ; cannot underflow because block is >= 110h Bytes 7359 ; at most 0FEFh 0 00001515 BB0C00 mov bx, 0Ch 0 00001518 29C3 sub bx, ax ; 000Ch - 00FEFh = 0F01Dh 0 0000151A B104 mov cl, 4 0 0000151C D3E0 shl ax, cl ; 0FEF0h 7364 ; call far 0F01Dh:0FEF0h = 1000C0h 7365 ; This is either the same as 0C0h if A20 masked, or in the HMA. 0 0000151E C60605009A mov byte [CPMCALL], 09Ah; call far imm:imm opcode 0 00001523 A30600 mov word [CPMCALL + 1], ax 0 00001526 891E0800 mov word [CPMCALL + 3], bx ; adjusted CALL 5 dispatcher 7369 0 0000152A BA8000 mov dx, 80h 0 0000152D B41A mov ah, 1Ah ; set DTA to default DTA 0 0000152F CD21 int 21h 0 00001531 1F pop ds 7374 7375 ; Finish up. Set termination address. 0 00001532 B82225 mov ax, 2522h ; set interrupt vector 22h 0 00001535 BA[0000] mov dx, int22 0 00001538 CD21 int 21h 0 0000153A 2689160A00 mov word [es:TPIV], dx 0 0000153F 268C1E0C00 mov word [es:TPIV+2], ds 7381 0 00001544 26C6060001C3 mov byte [es:100h], 0C3h ; place opcode for retn at cs:ip 7383 7384 %if _SYMBOLIC 7385 pop bx ; size of memory block 7386 %endif 0 0000154A 8C06[4C0C] mov word [pspdbe], es 0 0000154E 8CC0 mov ax, es 0 00001550 48 dec ax 0 00001551 8EC0 mov es, ax 0 00001553 40 inc ax 0 00001554 26C70608004445 mov word [es:8+0], "DE" 0 0000155B 26C7060A004255 mov word [es:8+2], "BU" 0 00001562 26C7060C004747 mov word [es:8+4], "GG" 0 00001569 26C7060E004545 mov word [es:8+6], "EE" ; set MCB name 0 00001570 26A30100 mov word [es:1], ax ; set MCB owner 7397 7398 %if _SYMBOLIC 7399 setopt [internalflags2], dif2_createdprocess 7400 mov word [created_psp], ax 7401 mov word [created_size], bx 7402 %endif 7403 0 00001574 8B36[240E] mov si, word [reg_cs] 0 00001578 8B3E[300E] mov di, word [reg_eip] ; ? is this ever used ? 7406 0 0000157C 8026[DA01]7F clropt [internalflags], attachedterm 0 00001581 38C0 cmp al, al ; flags return ZR, NC 7409 %endif 7410 7411 .return: 7412 @@: 0 00001583 16 push ss 0 00001584 07 pop es 7415 0 00001585 5A pop dx 0 00001586 5B pop bx 0 00001587 58 pop ax 0 00001588 C3 retn 7420 7421 .return_no_clr: 0 00001589 BA[0000] mov dx, msg.ensure_no_memory 0 0000158C E8[0000] call putsz 0 0000158F 85D2 test dx, dx ; flags return NZ, NC 0 00001591 EBF0 jmp .return 7426 %endif 7427 7428 7429 zeroregs: 7430 ; call set_efl_to_fl ; initialise EFL, and ax = 0 7431 ; set_efl_to_fl: 0 00001593 31C0 xor ax, ax ; initialise ax = 0 and FL = ZR NC etc 0 00001595 50 _no386 push ax ; dummy high word 0 00001596 66 _386_o32 ; pushfd 0 00001597 9C pushf 0 00001598 8F06[340E] pop word [reg_efl] ; set to FL 0 0000159C 8F06[360E] pop word [reg_efl+2] ; set to high word of EFL, or zero 7438 ; retn 7439 0 000015A0 BF[F80D] mov di, regs 0 000015A3 B91E00 mov cx, 15 * 2 ; (8 standard + 6 segregs + eip) * 2 0 000015A6 F3AB rep stosw ; initialise all registers 0 000015A8 C3 retn 7444 7445 7446 %if _PM 7447 ; Hook Int2F if a DPMI host is found. However for Win9x and DosEmu 7448 ; Int2F.1687 is not hooked because it doesn't work. Debugging in 7449 ; protected mode may still work, but the initial switch must be 7450 ; single-stepped. 7451 ; 7452 ; CHG: ah, bx, cx, dx, di, es 7453 ; OUT: al = 0FFh if installed 7454 ; al = status value 0F0h..0FEh else 7455 ; STT: V86/RM 7456 ; ds = debugger data segment 7457 ; ! might be called with unknown ss 7458 ; if [internalflags6] & dif6_in_amis_hook2F 7459 hook2F: 7460 call InDOS 7461 mov al, 0FEh 7462 jnz .return 7463 %if _APPLICATION || _DEVICE 7464 .not_in_dos: 7465 mov al, 0FDh 7466 testopt [internalflags], hooked2F 7467 jnz .return ; don't hook now --> 7468 dec ax ; 0FCh 7469 %if _DEBUG 7470 testopt [internalflags6], dif6_in_hook2F 7471 jnz .return 7472 %endif 7473 .loop: 7474 %if _GUARD_86M_INT2F 7475 push es 7476 xor ax, ax 7477 mov es, ax ; (only used in 86 Mode) 7478 mov ax, [es:2Fh * 4] 7479 cmp ax, -1 7480 je @F ; --> (ZR) 7481 or ax, [es:2Fh * 4 + 2] 7482 @@: 7483 pop es 7484 mov al, 0FBh 7485 jz .return 7486 %endif 7487 %if _DEBUG 7488 testopt [internalflags6], dif6_in_amis_hook2F 7489 jnz @F 7490 push si 7491 call findinstalleddebugger 7492 ; CHG: si, di, es, ax, cx, dx 7493 pop si 7494 jc @F 7495 setopt [internalflags6], dif6_in_hook2F 7496 ; avoid recursion 7497 inc ax ; al = 31h 7498 int 2Dh ; call out to debugger 7499 clropt [internalflags6], dif6_in_hook2F 7500 cmp al, 0FFh 7501 jne @F 7502 %if _DISPHOOK 7503 mov dx, dpmihookamis 7504 call putsz 7505 %endif 7506 @@: 7507 %endif 7508 mov ax, 1687h ; DPMI host installed? 7509 int 2Fh 7510 test ax, ax 7511 mov al, 0FAh 7512 jnz .return 7513 mov word [dpmientry+0], di ; true host DPMI entry 7514 mov word [dpmientry+2], es 7515 mov word [dpmiwatch+0], di 7516 mov word [dpmiwatch+2], es 7517 dec ax ; 0F9h 7518 ; Previously checked DIF nohook2F here. 7519 dec ax ; 0F8h 7520 testopt [options4], opt4_int_2F_hook 7521 jz .return ; requested to not hook --> 7522 mov ax, 352Fh 7523 int 21h 7524 mov word [oldi2F+0], bx 7525 mov word [oldi2F+2], es 7526 mov dx, debug2F ; ds => lDEBUG_DATA_ENTRY 7527 mov ax, 252Fh 7528 int 21h 7529 7530 ; Test whether we can hook the DPMI entrypoint call. 7531 mov ax, 1687h 7532 int 2Fh 7533 test ax, ax 7534 jnz .nohost 7535 cmp di, mydpmientry ; our entrypoint returned ? 7536 jne .nohook 7537 mov ax, es 7538 mov bx, ds ; bx => lDEBUG_DATA_ENTRY 7539 cmp ax, bx 7540 jne .nohook ; no --> 7541 7542 mov word [dpmiwatch+0], mydpmientry 7543 mov word [dpmiwatch+2], ds ; => lDEBUG_DATA_ENTRY 7544 7545 setopt [internalflags], hooked2F 7546 setopt [internalflags4], dif4_int_2F_hooked 7547 call update_inttab_optional 7548 %if _DISPHOOK 7549 testopt [internalflags6], dif6_in_amis_hook2F 7550 jnz @F 7551 mov ax, ds ; ax => lDEBUG_DATA_ENTRY 7552 push ds 7553 pop es 7554 mov di, dpmihookcs 7555 call hexword 7556 mov dx, dpmihook 7557 call putsz 7558 @@: 7559 %endif 7560 mov al, 0FFh 7561 %endif 7562 .return: 7563 push ds 7564 pop es 7565 retn 7566 7567 %if _APPLICATION || _DEVICE 7568 .nohost: 7569 .nohook: 7570 push ds 7571 lds dx, [oldi2F] 7572 mov ax, 252Fh 7573 int 21h ; unhook 7574 pop ds 7575 push ds 7576 pop es ; restore segregs 7577 clropt [options4], opt4_int_2F_hook 7578 ; disable hook next 7579 testopt [internalflags6], dif6_in_amis_hook2F 7580 jnz @F 7581 mov dx, msg.dpmi_no_hook 7582 call putsz ; display message about it 7583 @@: 7584 call .loop 7585 mov al, 0F0h 7586 retn 7587 %endif 7588 %endif 7589 7590 7591 ; Following bits need to be *before* boot.asm 7592 ; to support the _BOOTLDR_DISCARD option. 7593 ; But boot.asm must be included before init.asm 7594 ; so that init will get the nearcall/dualcall 7595 ; uses in boot.asm in its relocation tables. 7596 ; So all code section contents originally from 7597 ; init.asm is now moved to here. 7598 %if _SYMBOLIC && (_APPLICATION || _DEVICE) 7599 ; Moved this here so the nearcall macro is used 7600 ; before we write the relocate_from_code table. 7601 usesection lDEBUG_CODE 7602 ..@switch_s_cont: 7603 nearcall zz_save_strat 7604 nearcall zz_switch_s 7605 dec si 7606 mov dx, si 7607 retf 7608 7609 ..@switch_s_catch: 7610 mov sp, word [throwsp] ; restore stack 7611 ; (needed here if returned to errret) 7612 mov dx, errcarat 7613 call putsz 7614 xor dx, dx 7615 retf 7616 %endif 7617 7618 7619 usesection lDEBUG_CODE 7619 ------------------ note: usesection lDEBUG_CODE 7620 initcont: 7621 %if _APPLICATION 0 000015A9 CD21 int 21h ; resize to required 7623 ; jc ... ; (expected to work since it had to be larger. also we hooked ints) 7624 %endif 7625 7626 %if _APPLICATION || _DEVICE 7627 .device: 7628 %if _VXCHG 0 000015AB E8[0000] call vv_set 7630 %endif 7631 0 000015AE 1E push ds 0 000015AF 07 pop es 0 000015B0 E88CFC call getint2324 ; init run2324 to avoid using or displaying NUL vectors 7635 0 000015B3 1E push ds 0 000015B4 07 pop es 0 000015B5 5E pop si 0 000015B6 AC lodsb 0 000015B7 E8CEF2 call kk ; process the rest of the command line 7641 %endif 7642 7643 .boot_entry: 0 000015BA 1E push ds 0 000015BB 07 pop es ; => lDEBUG_DATA_ENTRY 7646 7647 %if _ALTVID 7648 ; mov al, ALTSCREENBITS 0 000015BC E8[0000] call setscreen 7650 %endif 7651 0 000015BF BE[0000] mov si, cmd3 7653 %if _BOOTLDR 7654 %if _APPLICATION || _DEVICE 0 000015C2 F606[D901]40 testopt [internalflags], nodosloaded 0 000015C7 7402 jz @F 7657 %endif 7658 %if _LOADER 7659 push si 7660 jmp moveloader_hook_ints 7661 %else 0 000015C9 FFE6 jmp si ; directly jump to cmd3 of the installed image 7663 %endif 7664 @@: 7665 %endif 7666 %if _APPLICATION || _DEVICE 0 000015CB 56 push si 0 000015CC E9[0000] jmp ll3 ; load a program if one has been given at the command line 7669 %endif 7670 7671 7672 %if !_LINK && _LINK_COMPAT 7673 usesection lDEBUG_CODE 7674 %if !_LOADER 7675 %include "aa.asm" 7676 %endif 7677 7678 usesection lDEBUG_CODE 7679 %include "amis.asm" 7680 7681 usesection lDEBUG_CODE 7682 %include "bb.asm" 7683 7684 %if !_LOADER 7685 usesection lDEBUG_CODE 7686 %include "cc.asm" 7687 %endif 7688 7689 usesection lDEBUG_CODE 7690 %include "dd.asm" 7691 7692 usesection lDEBUG_CODE 7693 %include "ee.asm" 7694 7695 usesection lDEBUG_CODE 7696 %include "expr.asm" 7697 7698 usesection lDEBUG_CODE 7699 %include "ff.asm" 7700 7701 %if _RN 7702 %imacro internaldatarelocation 0-*.nolist 7703 %endmacro 7704 usesection lDEBUG_CODE 7705 %include "fptostr.asm" 7706 %unimacro internaldatarelocation 0-*.nolist 7707 %endif 7708 %if _HELP_COMPRESSED 7709 overridedef STANDALONE, 0 7710 usesection lDEBUG_CODE 7711 %include "helpdepk.asm" 7712 resetdef STANDALONE 7713 %endif 7714 7715 usesection lDEBUG_CODE 7716 %include "hh.asm" 7717 7718 usesection lDEBUG_CODE 7719 %include "iioo.asm" 7720 7721 %if _IMMASM 7722 usesection lDEBUG_CODE 7723 %include "immasm.asm" 7724 %else 7725 usesection lDEBUG_CODE 7726 immasm: 7727 lodsb 7728 call chkeol 7729 jmp cmd3 7730 %endif 7731 7732 usesection lDEBUG_CODE 7733 %include "install.asm" 7734 7735 usesection lDEBUG_CODE 7736 %include "ints.asm" 7737 7738 usesection lDEBUG_CODE 7739 %include "lineio.asm" 7740 7741 %if !_LOADER 7742 usesection lDEBUG_CODE 7743 %include "ll.asm" 7744 %endif 7745 7746 usesection lDEBUG_CODE 7747 %include "mm.asm" 7748 7749 usesection lDEBUG_DATA_ENTRY 7750 msg_start: 7751 %include "msg.asm" 7752 msg_end: 7753 7754 numdef SHOWMSGSIZE, _DEFAULTSHOWSIZE 7755 %if _SHOWMSGSIZE 7756 %assign MSGSIZE msg_end - msg_start 7757 %warning msg holds MSGSIZE bytes 7758 %endif 7759 7760 %if _PM 7761 usesection lDEBUG_CODE 7762 %include "pmdata.asm" 7763 7764 usesection lDEBUG_CODE 7765 %include "pmentry.asm" 7766 7767 usesection lDEBUG_CODE 7768 %include "pminit.asm" 7769 %endif 7770 7771 usesection lDEBUG_CODE 7772 %include "rr.asm" 7773 7774 usesection lDEBUG_CODE 7775 %include "run.asm" 7776 7777 usesection lDEBUG_CODE 7778 %include "serialp.asm" 7779 7780 usesection lDEBUG_CODE 7781 %include "ss.asm" 7782 7783 %if _SYMBOLIC 7784 usesection lDEBUG_CODE 7785 %include "symbols.asm" 7786 %endif 7787 7788 usesection lDEBUG_CODE 7789 %include "uu.asm" 7790 7791 usesection lDEBUG_CODE 7792 %include "vv.asm" 7793 7794 %if !_LOADER 7795 usesection lDEBUG_CODE 7796 %include "ww.asm" 7797 %endif 7798 7799 %endif 7800 7801 %ifn _LINK 7802 %if _BOOTLDR_DISCARD 7803 usesection lDEBUG_CODE 7804 ldebug_code_bootldr_truncated_size: equ fromparas(paras($ - code_start)) 7805 %else 7806 ldebug_code_bootldr_truncated_size: equ ldebug_code_size 7807 %endif 7808 endarea ldebug_code_bootldr_truncated, 1 7809 7810 %if _BOOTLDR 7811 %include "boot.asm" 7812 %endif 7813 %endif 7814 7815 7816 %if _LINK 7817 [list -] 7890 usesection DATASTACKBASE === Switch to base=000000h -> "DATASTACKBASE" 7890 ------------------ note: usesection DATASTACKBASE 7891 absolute $ 7892 %endif 7893 7894 %if !_LOADER 7895 alignb 4 0 00008120 ???? bp_offset: resw 1 7897 %if _PM 7898 resw 1 7899 %endif 7900 %endif 7901 7902 %if _BREAKPOINTS 0 00008122 ???? alignb 4 0 00008124 ???????? ..@bb_saved_linear: resd 1 7905 7906 alignb 4 0 00008128 ???? ..@bb_id_start: resw 1 0 0000812A ???? ..@bb_id_length: resw 1 0 0000812C ???? ..@bb_when_start: resw 1 0 0000812E ???? ..@bb_when_length: resw 1 7911 %endif 7912 7913 ; I/O buffers 7914 alignb 2 0 00008130 ?? line_in: resb 1 ; maximal length of input line 0 00008131 ?? resb 1 ; actual length (must be one less than previous byte) 7917 00000012 resb 255 ; buffer for 13-terminated input line 7918 .end: 7919 7920 %if _CONFIG 0 00008231 ?? alignb 2 7922 00000112 configpath: resb 128 + 256 0 000083B2 ???? .dir_end: resw 1 7924 7925 alignb 2 7926 00000294 scriptspath: resb 128 + 256 0 00008534 ???? .dir_end: resw 1 7928 7929 yy_try_scriptspath: 0 00008536 ?? .nokeywordused: resb 1 0 00008537 ?? .didnotyettry: resb 1 7932 %endif 7933 %if _EXTENSIONS 7934 alignb 2 0 00008538 ???? ext_cmdline: resw 1 7936 %if _ELDTRAILER 0 0000853A ???????? eldheader: resd 1 7938 %endif 7939 %endif 7940 %if _EXTENSIONS || _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 0000853E ?? yy_is_script: resb 1 ; else extension 7942 %endif 7943 7944 ; zero-initialisation starts here 7945 ..@init_first: 0 0000853F ?? resb 1 ; line_in overflow stop 7947 ; This byte is zero-initialised. When line_in 7948 ; is scanned using skipcomma (in bb.asm) but 7949 ; al already had the CR, then the scan may 7950 ; overflow line_in. Including this byte here 7951 ; (_after_ line_in) insures that the scan will 7952 ; stop while still reading within the section. 7953 ; b_bplist and g_bplist are expected in that order by initcont 7954 %if _BREAKPOINTS 7955 alignb 2 7956 b_bplist: 0 00008540 ???? .used_mask: resb (_NUM_B_BP + _NUM_SYM_BP + 7) >> 3 7958 ; bitmask of used points 0 00008542 ???? .disabled_mask: resb (_NUM_B_BP + _NUM_SYM_BP + 7) >> 3 7960 ; bitmask of disabled points 7961 %if _BREAKPOINTS_STICKY 7962 .sticky_mask: resb (_NUM_B_BP + _NUM_SYM_BP + 7) >> 3 7963 ; bitmask of sticky points 7964 ; desc: stay around during DEBUG's operation unless 7965 ; explicitly removed/un-stickified. This allows 7966 ; to keep breakpoints around while changing from PM. 7967 ; Hits while in DEBUG are ignored though, use DDEBUG. 7968 ; Disabling won't remove them, just ignores hits. 7969 %endif 7970 alignb 2 7971 00000424 .bp: resb (_NUM_B_BP + _NUM_SYM_BP) * BPSIZE 7972 alignb 2 7973 00000484 .counter: resw _NUM_B_BP 7974 alignb 2 7975 000004A4 .id: resw _NUM_B_BP ; array of lengths/offsets, 0 = unused 7976 ; low 10 bits = offset into .idbuffer (0..1023) 7977 ; high 6 bits = length (0..63, 0 if unused) 7978 alignb 2 7979 000004C4 .when: resw _NUM_B_BP ; array of pointers, 0 = unused 7980 .idbuffer.free: 0 00008604 ???? resw 1 ; offset into .idbuffer of free space 7982 ; (0..1024) 7983 .whenbuffer.free: 0 00008606 ???? resw 1 ; *offset* into .whenbuffer 7985 ; (not a pointer) 7986 .idbuffer: 7987 000004E8 resb _NUM_B_ID_BYTES ; buffer holding ID strings 7988 .whenbuffer: 7989 00000668 resb _NUM_B_WHEN_BYTES ; buffer holding condition strings 7990 %endif 7991 %if _NUM_G_BP 0 00008B88 ?? resb 1 - (($-$$) % 2) ; make g_bplist.bp aligned 7993 g_bplist: 0 00008B89 ?? .used_count: resb 1 ; for the byte counter of saved breakpoints 7995 00000A6A .bp: resb _NUM_G_BP*BPSIZE 7996 .end: 7997 %endif 7998 %if !_LOADER 0 00008BEA ?? sss_silent_count_used: resb 1 0 00008BEB ?? drivenumber: resb 1 8001 %if _MCBPOSITION 8002 mcbposition: resb 1 8003 %endif 8004 %if _SDSUB 8005 skipsd: resb 1 8006 %endif 8007 %if _MCBLIMIT 8008 alignb 2 8009 mcblimit: resw 1 8010 %endif 8011 %endif 8012 %if _HISTORY && ! _HISTORY_SEPARATE_FIXED 8013 alignb 2 8014 historybuffer: resb _HISTORY_SIZE 8015 .end: 8016 %endif 8017 8018 ; $ - $$ = offset into section 8019 ; % 2 = 1 if odd offset, 0 if even 8020 ; 2 - = 1 if odd, 2 if even 8021 ; % 2 = 1 if odd, 0 if even 8022 ; resb (2 - (($-$$) % 2)) % 2 8023 ; $ - $$ = offset into section 8024 ; % 2 = 1 if odd offset, 0 if even 8025 ; 1 - = 0 if odd, 1 if even 0 00008BEC ?? resb 1 - (($-$$) % 2) ; make line_out aligned 0 00008BED ?? trim_overflow: resb 1 ; actually part of line_out to avoid overflow of trimputs loop 8028 00000ACE line_out: resb 263 0 00008CF5 ?? resb 1 ; reserved for terminating zero 8030 line_out_end: 8031 alignb 2 0 00008CF6 ???? line_out_overflow: resw 1 ; 2642h if line_out didn't overflow 8033 8034 %if !_LOADER 8035 alignb 4 0 00008CF8 ???????? sss_silent_count: resd 1 8037 %endif 8038 alignb 2 0 00008CFC ???? getrange_lines: resw 1 8040 0 00008CFE ???? serial_save_irq_mask: resw 1 0 00008D00 ???? serial_save_irq_off: resw 1 0 00008D02 ???? serial_save_dl: resw 1 0 00008D04 ?? serial_save_ier: resb 1 0 00008D05 ?? serial_save_lcr: resb 1 0 00008D06 ?? serial_save_mcr: resb 1 8047 %if _USE_TX_FIFO 0 00008D07 ?? serial_fcr_setting: resb 1 8049 %endif 0 00008D08 ?? serial_use_intnum: resb 1 0 00008D09 ?? serial_use_params: resb 1 0 00008D0A ?? serial_use_fifo: resb 1 8053 %if _RH 0 00008D0B ?? rh_display_with_count: resb 1 8055 alignb 2 0 00008D0C ???? rh_count_number: resw 1 8057 %endif 8058 alignb 2 8059 baseport: 0 00008D0E ???? serial_use_baseport: resw 1 0 00008D10 ???? serial_use_dl: resw 1 0 00008D12 ???? serial_use_irqmask: resw 1 8063 8064 alignb 2 0 00008D14 ???? rxhead: resw 1 0 00008D16 ???? rxtail: resw 1 0 00008D18 ???? txhead: resw 1 0 00008D1A ???? txtail: resw 1 0 00008D1C ???????? alignb 16 8070 00000C00 rxfifo: resb _RXFIFOSIZE 8071 alignb 16 8072 00000C80 txfifo: resb _TXFIFOSIZE 8073 8074 %if _SYMBOLIC 8075 %if _BUFFER_86MM_SLICE || _XMS_SYMBOL_TABLE 8076 alignb 16 8077 access_slice_buffer: 8078 .: 8079 resb ssString + 255 8080 alignb 2 8081 .size: equ $ - . 8082 %if _SECOND_SLICE 8083 alignb 16 8084 second_access_slice_buffer: 8085 .: 8086 resb ssString + 255 8087 alignb 2 8088 .size: equ $ - . 8089 %endif 8090 %endif 8091 %endif 8092 8093 alignb 2 8094 while_buffer: 8095 .length equ _WHILEBUFFSIZE 8096 00000D00 resb .length 8097 .end: 8098 8099 %if (_MMXSUPP && _RM && ! _RM_AUX) || (_RN && ! _RN_AUX) 8100 alignb 4 8101 rn_rm_buffer: 8102 %if (_RN && ! _RN_AUX) 8103 resb 128 8104 %else 8105 resb 108 8106 %endif 8107 %endif 8108 8109 %if _SYMBOLIC 8110 alignb 16 8111 str_buffer: resb 512 ; long enough for smName1 + smName2 content 8112 ; by placing this buffer below the stack, a stack overflow 8113 ; might be less harmful if the str_buffer isn't in use. 8114 %endif 8115 8116 ; zero-initialisation ends here 8117 ..@init_behind: 8118 0 00008F28 ???????????????? alignb 16 ; stack might be re-used as GDT, so align it on a paragraph 8120 00000E10 stack: resb _STACKSIZE 8121 alignb 2 ; ensure stack aligned 8122 stack_end: 8123 8124 %if _EXTENSIONS 8125 alignb 16 8126 ext_data_area: 8127 00001010 .: resb _EXT_DATA_BOOT_SIZE 8128 alignb 16 8129 .size equ $ - . 8130 8131 %ifn _LINK 8132 ext_data_max_size_equate equ 0FFF0h - (ext_data_area + SECTIONFIXUP) 8133 %if ((_EXT_DATA_BOOT_SIZE + 15) & ~15) <= ((_EXT_DATA_INIT_SIZE + 15) & ~15) 8134 ext_data_nonboot_add_size equ ((_EXT_DATA_INIT_SIZE + 15) & ~15) - ((_EXT_DATA_BOOT_SIZE + 15) & ~15) 8135 %else 8136 ext_data_nonboot_add_size equ 0 8137 %endif 8138 %endif 8139 %else 8140 %ifn _LINK 8141 ext_data_max_size_equate equ 0 8142 ext_data_nonboot_add_size equ 0 8143 %endif 8144 %endif 8145 8146 %if _LINK 8147 global end_of_datastack 8148 %endif 8149 alignb 16 8150 end_of_datastack: 8151 8152 %ifn _LINK 8153 datastack_size equ $-section.DATASTACK.vstart 8154 endarea datastack, 1 8155 8156 8157 auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 8158 endarea auxbuff, 1 8159 8160 auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 8161 endarea auxbuff_max, 1 8162 8163 %if _INIT_MAX 8164 auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 8165 %else 8166 auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 8167 %endif 8168 endarea auxbuff_init, 1 8169 8170 8171 pspsegment_size: equ 100h + DATAENTRYTABLESIZE + datastack_size 8172 endarea pspsegment, 1 ; size of PSP and image when installed 8173 8174 8175 numdef SHOWASMTABLESIZE, _DEFAULTSHOWSIZE 8176 %if _SHOWASMTABLESIZE 8177 %assign ASMTABLESIZE asmtable1_size + asmtable2_size 8178 %warning asmtables hold ASMTABLESIZE bytes 8179 %endif 8180 8181 8182 %assign __INITSIZE init_size 8183 %if __INITSIZE > (64 * 1024) 8184 %error init segment too large (%[__INITSIZE]) 8185 %endif 8186 8187 numdef SHOWINITSIZE, _DEFAULTSHOWSIZE 8188 %if _SHOWINITSIZE 8189 %warning init segment holds __INITSIZE bytes 8190 %endif 8191 8192 8193 %assign __CODESIZE ldebug_code_size 8194 %if __CODESIZE > (64 * 1024) 8195 %error code segment too large (%[__CODESIZE]) 8196 %endif 8197 8198 numdef SHOWCODESIZE, _DEFAULTSHOWSIZE 8199 %if _SHOWCODESIZE 8200 %warning code segment holds __CODESIZE bytes 8201 %endif 8202 8203 8204 %assign __CODETRUNCATEDSIZE ldebug_code_bootldr_truncated_size 8205 %assign __CODEDISCARDSIZE ldebug_code_size - ldebug_code_bootldr_truncated_size 8206 8207 %if _BOOTLDR_DISCARD 8208 numdef SHOWCODETRUNCATEDSIZE, _DEFAULTSHOWSIZE 8209 %else 8210 numdef SHOWCODETRUNCATEDSIZE, 0 8211 %endif 8212 %if _SHOWCODETRUNCATEDSIZE 8213 %warning code segment truncated holds __CODETRUNCATEDSIZE bytes (__CODEDISCARDSIZE bytes discarded) 8214 %endif 8215 8216 8217 %assign __CODE2SIZE ldebug_code2_size 8218 %if __CODE2SIZE > (64 * 1024) 8219 %error code segment 2 too large (%[__CODE2SIZE]) 8220 %endif 8221 8222 %if _DUALCODE 8223 numdef SHOWCODE2SIZE, _DEFAULTSHOWSIZE 8224 %else 8225 numdef SHOWCODE2SIZE, 0 8226 %endif 8227 %if _SHOWCODE2SIZE 8228 %warning code segment 2 holds __CODE2SIZE bytes 8229 %endif 8230 8231 8232 %assign __MESSAGESEGMENTSIZE messagesegment_nobits_size 8233 %if __MESSAGESEGMENTSIZE > (64 * 1024) 8234 %error message segment too large (%[__MESSAGESEGMENTSIZE]) 8235 %endif 8236 8237 %if _MESSAGESEGMENT 8238 numdef SHOWMESSAGESEGMENTSIZE, _DEFAULTSHOWSIZE 8239 %else 8240 numdef SHOWMESSAGESEGMENTSIZE, 0 8241 %endif 8242 %if _SHOWMESSAGESEGMENTSIZE 8243 %warning message segment holds __MESSAGESEGMENTSIZE bytes 8244 %endif 8245 8246 8247 %assign __MESSAGESEGMENTTRUNCATEDSIZE messagesegment_nobits_truncated_size 8248 %assign __MESSAGESEGMENTDISCARDSIZE messagesegment_nobits_size - messagesegment_nobits_truncated_size 8249 8250 %if _BOOTLDR_DISCARD_HELP 8251 numdef SHOWMESSAGESEGMENTTRUNCATEDSIZE, _DEFAULTSHOWSIZE 8252 %else 8253 numdef SHOWMESSAGESEGMENTTRUNCATEDSIZE, 0 8254 %endif 8255 %if _SHOWMESSAGESEGMENTTRUNCATEDSIZE 8256 %warning message segment truncated holds __MESSAGESEGMENTTRUNCATEDSIZE bytes (__MESSAGESEGMENTDISCARDSIZE bytes discarded) 8257 %endif 8258 8259 8260 %assign __PSPSEGMENTSIZE pspsegment_size 8261 %assign __PSPSEGMENTMAXSIZE pspsegment_size - _EXT_DATA_BOOT_SIZE + ext_data_max_size_equate 8262 %if __PSPSEGMENTSIZE > (64 * 1024) 8263 %error resident size of PSP segment too large (%[__PSPSEGMENTSIZE]) 8264 %elif __PSPSEGMENTMAXSIZE > (64 * 1024 - 16) 8265 %error resident maximum size of PSP segment too large (%[__PSPSEGMENTMAXSIZE]) 8266 %endif 8267 8268 numdef SHOWPSPSIZE, _DEFAULTSHOWSIZE 8269 %if _SHOWPSPSIZE 8270 %warning PSP segment holds __PSPSEGMENTSIZE bytes 8271 %if _EXTENSIONS 8272 %warning Maximum PSP segment holds __PSPSEGMENTMAXSIZE bytes 8273 %endif 8274 %endif 8275 8276 %if CODE_INSURE_COUNT 8277 %warning code_insure_low_byte_not_0CCh needed CODE_INSURE_COUNT times 8278 %endif 8279 %endif === Trace listing source: ../lst/debug.obj/ee.lst 1 2 %if 0 3 4 lDebug E command (enter into memory) 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 "ee.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 0000179B ???????? eldhSignature: resb 4 ; "ELD1" 0 0000179F ?????? resb 3 ; reserved 0 000017A2 ?? resb 1 ; 26 (Ctrl-Z) 0 000017A3 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 000017A7 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 000017A9 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 000017AB ???????? eldhDataOffset: resd 1 0 000017AF ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 000017B1 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000017B3 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000017B5 ???????? eldhReserved: resb 4 ; reserved 0 000017B9 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 000017BB ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000017BF ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000017C3 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000017C7 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 0000179B ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 000017A3 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 000017A7 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 000017A9 ???? 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 0 0000179B ???? 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 0 0000179D ???? eldltAmount: resw 1 0 0000179F ???????? 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 0 0000179B ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 0000179D ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 0000179F ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 000017A1 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 000017A3 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 000017AB ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 0000179B ???? eldlSignature: resw 1 ; 0E1D1h 0 0000179D ???????? eldlReserved: resw 2 0 000017A1 ???? eldlUseLinkHash: resw 1 0 000017A3 ???? eldlDataAmount: resw 1 0 000017A5 ???? eldlDataPrefixes: resw 1 0 000017A7 ???? eldlDataEntries: resw 1 0 000017A9 ???? eldlDataAddresses: resw 1 0 000017AB ???? eldlCodeAmount: resw 1 0 000017AD ???? eldlCodePrefixes: resw 1 0 000017AF ???? eldlCodeEntries: resw 1 0 000017B1 ???? 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 0 0000179B ???? ifKeyword: resw 1 0 0000179D ???? ifDescription: resw 1 0 0000179F ???? ifOptions: resw 1 0 000017A1 ???? ifValue: resw 1 0 000017A3 ???? ifTrying: resw 1 0 000017A5 ???? 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 0 0000179B ???????? saOffset: resd 1 0 0000179F ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 0000179B ???? so16aOffset: resw 1 0 0000179D ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 0000179B ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 0000179B ?????? bsJump: resb 3 0 0000179E ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 0000179B ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 0000179D ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 0000179E ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 000017A0 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 000017A1 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 000017A3 ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 000017A5 ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 000017A6 ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 000017A8 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 000017AA ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 000017AC ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 000017B0 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 000017B4 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 000017B8 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 000017BA ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 000017BC ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 000017C0 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 000017C2 ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 0000179B ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 0000179C ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 0000179D ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 0000179E ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 000017AD ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 0000179B ???????????????? deName: resb 8 0 000017A3 ?????? deExt: resb 3 0 000017A6 ?? deAttrib: resb 1 0 000017A7 ?? dePlusSize: resb 1 0 000017A8 ?????????????? resb 7 0 000017AF ???? deClusterHigh: resw 1 0 000017B1 ???? deTime: resw 1 0 000017B3 ???? deDate: resw 1 0 000017B5 ???? deClusterLow: resw 1 0 000017B7 ???????? 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 0 10000178B ???????? lsvFirstCluster: resd 1 0 10000178F ???????? lsvFATSector: resd 1 0 100001793 ???? lsvFATSeg: resw 1 0 100001795 ???? lsvLoadSeg: resw 1 0 100001797 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 10000177B ???? ldMemoryTop: resw 1 0 10000177D ???? ldLoadTop: resw 1 0 10000177F ???? ldSectorSeg: resw 1 0 100001781 ?? ldFATType: resb 1 92 <2> ldFlags: 0 100001782 ?? ldHasLBA: resb 1 0 100001783 ???? ldClusterSize: resw 1 0 100001785 ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100001787 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100001789 ?? .partition: resb 1 ; byte 0 10000178A ?? .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 <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 0 10000176B ???????? ldRootSector: resd 1 0 10000176F ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 100001771 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 100001773 ???? ldParasLeft: resw 1 0 100001775 ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 10000175B ???????? ldMaxCluster: resd 1 0 10000175F ???????? ldFileSize: resd 1 0 100001763 ???????? ldCurrentCluster: resd 1 0 100001767 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 0000179B ???????? liiSignature: resb 4 ; "NLDR" 0 0000179F ???? liiVersion: resb 2 ; "00" 0 000017A1 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 000017A3 ???? liiAmountParagraphs: resw 1 0 000017A5 ???????????? liiReserved: resw 3 0 000017AB ???? 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 0 000017AD ???? 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 0 000017AF ???? 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 0 000017B1 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 0000179B ???? lpSize: resw 1 0 0000179D ???? lpCount: resw 1 0 0000179F ???????? lpBuffer: resd 1 0 000017A3 ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 0000179B ?? piBoot: resb 1 0 0000179C ?????? piStartCHS: resb 3 0 0000179F ?? piType: resb 1 0 000017A0 ?????? piEndCHS: resb 3 0 000017A3 ???????? piStart: resd 1 0 000017A7 ???????? 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 0 0000179B ???? lsKernelName: resw 1 ; -> kernel file default name 0 0000179D ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 0000179F ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 000017A1 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 000017A3 ???? lsOptions: resw 1 ; option flags 0 000017A5 ???? lsSegment: resw 1 ; => where to load file 0 000017A7 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 000017AB ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 000017AF ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 000017B1 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 000017B3 ???????????????? 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 0 0000179B ???? exact_struc_at 00h, exeSignature: resw 1 0 0000179D ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 0000179F ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 000017A1 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 000017A3 ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 000017A5 ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 000017A7 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 000017A9 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 000017AB ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 000017AD ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 000017AF ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 000017B1 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 000017B3 ???? 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. 0 000017B5 ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 0000179B ???? ifhHandle: resw 1 0 0000179D ???? ifhFlags: resw 1 0 0000179F ???????? 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 <1> areastrucEntry: resb 24 0 000017B3 ???????? areastrucNext: resd 1 0 000017B7 ???????? areastrucPrev: resd 1 0 000017BB ???? areastrucSubAmount: resw 1 0 000017BD ???? areastrucSubOffset: resw 1 0 000017BF ???? areastrucFunAmount: resw 1 0 000017C1 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 0000179B ???????? areastrucsubLinear: resd 1 0 0000179F ???????? areastrucsubLinearEnd: resd 1 0 000017A3 ???? areastrucsubListOffset: resw 1 0 000017A5 ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 0000179B ???????? areastrucfunLinear: resd 1 0 0000179F ???????? areastrucfunLinearEnd: resd 1 0 000017A3 ???? areastrucfunListOffset: resw 1 0 000017A5 ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 0000179B ???? areastart: resw 1 0 0000179D ???? areaend: resw 1 0 0000179F ???? areamessage: resw 1 0 000017A1 ???? 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 0 0000179B ???? 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.) 0 0000179D ???? ivFlags: resw 1 0 0000179F ???? 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. 0 000017A1 ???? 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 0 000017A3 ?? 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. 0 000017A4 ?? 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 0 0000179B ???????? mrLinear: resd 1 0 0000179F ???????? mrOffset: resd 1 0 000017A3 ???? mrSegmentSelector: resw 1 0 000017A5 ???? mrFlags: resw 1 0 000017A7 ???????? 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 0 0000179B ???????? .size_: resd 1 0 0000179F ???? .srchdl: resw 1 0 000017A1 ???????? .srcadr: resd 1 0 000017A5 ???? .dsthdl: resw 1 0 000017A7 ???????? .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 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 23 ------------------ note: usesection lDEBUG_CODE 24 25 ..@ee_access_start: 26 27 %if 0 28 29 ee 0: 30 push ss 31 pop ds 32 push ss 33 pop es 34 mov ax, word [ savesp ] 35 inc ax 36 inc ax 37 mov sp, ax ; restore stack 38 mov bx, word [e_addr + saSegSel] 39 _386_PM_o32 40 mov dx, word [ e_addr ] ; get back address 41 42 43 ; Prompt mode. 44 ee 1: 45 mov word [ errret ], ee 0 46 47 ; Begin loop over lines. 48 ee 2: ; <--- next line 49 mov word [e_addr + saSegSel], bx 50 %if _PM 51 call ispm 52 jnz .86m 53 .pm: 54 mov word [e_addr + saSelector], bx 55 jmp @F 56 .86m: 57 mov word [e_addr + saSegment], bx 58 @@: 59 %endif 60 _386_PM_o32 61 mov word [ e_addr ], dx ; save address 62 mov di, line_out 63 mov ax, bx ; print out segment and offset 64 call hexword 65 66 === 67 68 69 mov al, '.' 70 stosb 71 call getline00 ; read input line 72 call iseol? 73 je .end 74 %if _PM 75 xor bx, bx 76 %endif 77 mov dx, 1 78 call ee_checkplusminus 79 jne .notplusminus 80 cmp al, '+' 81 je ee 3 82 jmp short ee 2 83 84 .notplusminus: 85 86 === 87 88 89 ; INP: al = character, si-> line 90 ; bx:dx = increment to add/subtract if this is an add/sub request 91 ; OUT: al, si unchanged 92 ; NZ if no add/sub request 93 ; ZR if add/sub request, 94 ; [ e_addr ] offset adjusted 95 ee_checkplusminus: 96 cmp al, '-' 97 jne .not 98 cmp al, '+' 99 jne .not 100 push si 101 push ax 102 call skipwhite 103 call iseol? 104 pop ax 105 pop si 106 jne .not 107 cmp al, '-' 108 je .minus 109 add word [ e_addr ], dx 110 _386_PM adc word [ e_addr+2 ], bx 111 jmp short .done 112 113 .minus: 114 sub word [ e_addr ], dx 115 _386_PM sbb word [ e_addr+2 ], bx 116 .done: 117 cmp al, al 118 .not: 119 retn 120 121 === 122 123 124 ee 9: 125 call getline00 126 127 %endif 128 129 errorj4: 0 00003BD2 E9[0000] jmp error 131 132 %if _EXTENSIONS 133 @@: 0 00003BD5 E9[0000] jmp load_extension 135 %endif 136 137 ; E command - edit memory. 138 ee: 139 %if _EXTENSIONS 0 00003BD8 4E dec si 0 00003BD9 4E dec si 0 00003BDA BA[0000] mov dx, msg.ext 0 00003BDD E8[0000] call isstring? 0 00003BE0 74F3 je @B 0 00003BE2 46 inc si 0 00003BE3 AC lodsb 147 %endif 0 00003BE4 E8[0000] call prephack 0 00003BE7 E8[0000] call iseol? 0 00003BEA 750A jne @F 0 00003BEC 8B1E[0400] mov bx, word [e_addr + saSegSel] 152 _386_PM_o32 0 00003BF0 8B16[0000] mov dx, word [e_addr] 0 00003BF4 EB44 jmp ee1 155 156 @@: 0 00003BF6 8B1E[0000] mov bx, word [reg_ds] 0 00003BFA E8[0000] nearcall getaddrX ; get address into bx:(e)dx, no scratchsel 0 00003BFD E8[0000] call skipcomm0 0 00003C00 E8[0000] call iseol? 0 00003C03 7435 je ee1 ; if prompt mode 162 163 eeparsestr: 0 00003C05 53 push bx 165 %if _PM 166 call verifysegm_or_error; get scratchsel if code selector 167 %endif 168 _386_PM_o32 ; push edx 0 00003C06 52 push dx ; save destination offset 0 00003C07 E8[0000] nearcall getstr ; get data bytes 0 00003C0A 89F9 mov cx, di 0 00003C0C BA[0000] mov dx, line_out 0 00003C0F 29D1 sub cx, dx ; length of byte string 174 _386_PM_o32 ; pop edi 0 00003C11 5F pop di 0 00003C12 7410 jz ee2_empty ; if length == 0 --> 177 _386_PM movzx ecx, cx 178 _386_PM_o32 ; mov eax, ecx 0 00003C14 89C8 mov ax, cx 0 00003C16 48 dec ax ; (cannot be 0) 181 _386_PM call test_high_limit ; 32-bit segment ? 182 _386_PM jz .16 ; no --> 183 _386_PM_o32 ; add eax, edi 184 .16: 0 00003C17 01F8 add ax, di 0 00003C19 72B7 jc short errorj4 ; if it wraps around 0 00003C1B E8[0000] call dohack 0 00003C1E 89D6 mov si, dx 0 00003C20 8EC3 mov es, bx 190 %if _PM 191 cmp byte [bAddr32], 0 192 jz ee_2 193 [cpu 386] 194 movzx esi, si ; ds:esi -> source 195 a32 ; a32 rep movsb 196 __CPU__ 197 ee_2: 198 %endif 0 00003C22 F3A4 rep movsb 200 ee2_empty: 0 00003C24 5B pop bx 202 _386_PM call test_high_limit ; 32-bit segment ? 203 _386_PM jnz .32 ; yes --> 204 _386_PM movzx edi, di ; limit to 16 bits 205 .32: 0 00003C25 891E[0400] mov word [e_addr + saSegSel], bx 207 _386_PM_o32 0 00003C29 893E[0000] mov word [e_addr], di 209 210 ; Restore ds + es and undo the interrupt vector hack. 211 ; This code is also used by the `m' command. 212 ee0a: 0 00003C2D 16 push ss ; restore ds 0 00003C2E 1F pop ds 0 00003C2F 16 push ss ; restore es 0 00003C30 07 pop es 217 %if !_LOADER 0 00003C31 BF[0000] mov di, run2324 ; debuggee's int 23/24 values 0 00003C34 E8[0000] call prehak1 ; copy things back 0 00003C37 E9[0000] jmp unhack 221 %else 222 retn 223 %endif 224 225 ..@ee_interactive_access_start: 226 227 ; Prompt mode. 228 ee1: 0 00003C3A E8[0000] call guard_re 230 ; Begin loop over lines. 231 ee2: ; <--- next line 0 00003C3D 89D8 mov ax, bx ; print out segment and offset 0 00003C3F E8[0000] call hexword ; (uses original selector, not scratchsel) 0 00003C42 B03A mov al, ':' 0 00003C44 AA stosb 236 _386_PM_o32 ; mov eax, edx 0 00003C45 89D0 mov ax, dx 238 %if _PM 239 call test_high_limit ; 32-bit segment ? 240 jz .16 ; no --> 241 call hexword_high 242 .16: 243 %endif 0 00003C47 E8[0000] call hexword 245 246 %if _40COLUMNS 0 00003C4A F606[0100]10 testopt [options6], opt6_40_columns 0 00003C4F 7405 jz ee3 0 00003C51 B020 mov al, 32 0 00003C53 AA stosb ; only one blank byte here 0 00003C54 EB04 jmp @F 252 %endif 253 254 ; Begin loop over bytes. 255 ee3: ; <--- next byte 0 00003C56 B82020 mov ax, 32<<8|32 ; print old value of byte 0 00003C59 AB stosw 258 @@: 0 00003C5A E8[0000] call dohack ; do the INT pointer hack 0 00003C5D E8[0000] call readmem ; read mem at BX:(E)DX 0 00003C60 E8[0000] call unhack ; undo the INT pointer hack 0 00003C63 891E[0400] mov word [e_addr + saSegSel], bx 263 _386_PM_o32 0 00003C67 8916[0000] mov word [e_addr], dx 0 00003C6B E8[0000] call hexbyte 0 00003C6E B02E mov al, '.' 0 00003C70 AA stosb 0 00003C71 C606[0000]00 mov byte [ linecounter ], 0 ; reset counter 0 00003C76 8026[0200]EF clropt [internalflags], promptwaiting 0 00003C7B 53 push bx 0 00003C7C 52 push dx 0 00003C7D E8[0000] call putsline 0 00003C80 5A pop dx 0 00003C81 5B pop bx 0 00003C82 BE[1000] mov si, line_out+16 ; address of buffer for characters 0 00003C85 31C9 xor cx, cx ; number of characters so far 277 278 ee4_next: 0 00003C87 E8[0000] call getline_is_input_file? 0 00003C8A 7238 jc ee9_getc_tty ; if it's a TTY 281 282 ee_getc_file: 0 00003C8C 800E[0200]40 setopt [internalflags2], dif2_did_getline_file 284 ; set this flag so yy_reset_buf knows 285 ; that we may have buffered the file 286 0 00003C91 56 push si 288 %if _NEWFULLHANDLING 0 00003C92 BF[0300] mov di, line_in+3 ; read max 290 %else 291 mov di, line_in+2 292 %endif 0 00003C95 8B36[0000] mov si, word [bufnext] 294 ee5: 0 00003C99 3B36[0000] cmp si, word [bufend] 0 00003C9D 7207 jb ee6 ; if there's a character already 0 00003C9F E8[0000] call fillbuf 0 00003CA2 B00D mov al, 13 0 00003CA4 7217 jc ee8 ; if eof 300 ee6: 0 00003CA6 803E[0000]0D cmp byte [notatty], 13 0 00003CAB 750C jne ee7 ; if no need to compress CR/LF 0 00003CAD 803C0A cmp byte [si], 10 0 00003CB0 7507 jne ee7 ; if not a line feed 0 00003CB2 46 inc si ; skip it 0 00003CB3 FE06[0000] inc byte [notatty] ; avoid repeating this 0 00003CB7 EBE0 jmp ee5 ; next character 308 309 ee7: 0 00003CB9 AC lodsb ; get the character 0 00003CBA A2[0000] mov byte [notatty], al 312 ee8: 0 00003CBD 8936[0000] mov word [bufnext], si 0 00003CC1 5E pop si 0 00003CC2 EB03 jmp ee10_got_codepoint 316 317 ee9_getc_tty: 0 00003CC4 E8[0000] call getc ; character input without echo 319 ee10_got_codepoint: 0 00003CC7 3C20 cmp al, 32 ; (go to next byte) 0 00003CC9 7440 je ee13_write 0 00003CCB 3C2D cmp al, '-' ; (go to prior byte) 0 00003CCD 743C je ee13_write 0 00003CCF 3C2E cmp al, '.' ; (exit E interactive mode) 0 00003CD1 7438 je ee13_write 0 00003CD3 3C0A cmp al, 10 0 00003CD5 7434 je ee13_write 0 00003CD7 E8[0000] call iseol?.notsemicolon; (also exit E interactive mode) 0 00003CDA 742F je ee13_write ; all: done with this byte --> 0 00003CDC 3C08 cmp al, 8 0 00003CDE 741D je ee11_backspace ; if backspace --> 0 00003CE0 3C7F cmp al, 7Fh 0 00003CE2 7419 je ee11_backspace ; if DEL (handle like backspace) --> 0 00003CE4 83F902 cmp cx, byte 2 ; otherwise, it should be a hex character 0 00003CE7 731B jae ee4_next_j ; if we have a full byte already 0 00003CE9 8804 mov byte [si], al 0 00003CEB E8[0000] nearcall getnyb 0 00003CEE 7214 jc ee4_next_j ; if it's not a hex character 0 00003CF0 41 inc cx 0 00003CF1 AC lodsb ; get the character back 0 00003CF2 EB12 jmp ee12_put_then_next 342 343 ee112_priorbyte: 0 00003CF4 E8[0000] call putc ; display the minus 345 _386_PM call test_high_limit ; 32-bit segment ? 346 _386_PM jz .16 ; no --> 347 _386_PM_o32 348 .16: 0 00003CF7 4A dec dx ; decrement offset (16 bit or 32 bit) 0 00003CF8 BF[0000] mov di, line_out 0 00003CFB EB76 jmp ee15_linebreak_and_ee2 352 353 ee11_backspace: 0 00003CFD E305 jcxz ee4_next_j ; if nothing to backspace over 0 00003CFF 49 dec cx 0 00003D00 4E dec si 0 00003D01 E8[0000] call fullbsout 358 ee4_next_j: 0 00003D04 EB81 jmp ee4_next 360 361 ee12_put_then_next: 0 00003D06 E8[0000] call putc 0 00003D09 EBF9 jmp ee4_next_j ; back for more 364 365 ; We have a byte (if CX != 0). 366 ; 367 ; cx = number of digits we have (0..2) 368 ; al = codepoint specifying how to proceed after writing 369 ee13_write: 0 00003D0B E32D jcxz ee14_done_write ; if no change for this byte 371 0 00003D0D 50 push ax ; preserve proceed control 0 00003D0E 31C0 xor ax, ax ; ah = 0, al = 0 0 00003D10 8804 mov byte [si], al ; terminate the string 0 00003D12 29CE sub si, cx ; point to beginning 376 @@: 0 00003D14 00E4 add ah, ah 0 00003D16 00E4 add ah, ah 0 00003D18 00E4 add ah, ah 0 00003D1A 00E4 add ah, ah ; prior value times 16 0 00003D1C 00C4 add ah, al ; add next digit (0 in first iteration) 0 00003D1E AC lodsb ; load next digit (or NUL) 0 00003D1F E8[0000] nearcall getnyb 0 00003D22 73F0 jnc @B ; if another digit --> (NC) 385 ; (CY can only mean we reached the NUL) 0 00003D24 88E0 mov al, ah ; get byte value 0 00003D26 E8[0000] call dohack ; do the INT pointer hack 0 00003D29 E8[0000] call writemem ; write AL at BX:(E)DX (may use scratchsel) 389 %if !_LOADER 0 00003D2C BF[0000] mov di, run2324 ; debuggee's int 23/24 0 00003D2F E8[0000] call prehak1 ; copy things back 0 00003D32 E8[0000] call unhack ; undo the INT pointer hack 393 %endif 394 _386_PM call test_high_limit ; 32-bit segment ? 395 _386_PM jz .16 ; no --> 396 _386_PM_o32 397 .16: 0 00003D35 FF06[0000] inc word [e_addr] 0 00003D39 58 pop ax ; al = how to proceed 400 401 ; End the loop over bytes. 402 ee14_done_write: 0 00003D3A BF[0000] mov di, line_out ; reset output buffer 404 0 00003D3D 3C20 cmp al, 32 ; (go to next byte) 0 00003D3F 7414 je ee_nextbyte 0 00003D41 3C2D cmp al, '-' ; (go to prior byte) 0 00003D43 74AF je ee112_priorbyte 0 00003D45 3C2E cmp al, '.' ; (exit E interactive mode) 0 00003D47 7431 je ee16_end 0 00003D49 3C0A cmp al, 10 0 00003D4B 742D je ee16_end 0 00003D4D E8[0000] call iseol?.notsemicolon; (also exit E interactive mode) 0 00003D50 7428 je ee16_end 0 00003D52 E9[0000] jmp error ; unexpected value 416 417 ee_nextbyte: 418 _386_PM call test_high_limit ; 32-bit segment ? 419 _386_PM jz .16 ; no --> 420 _386_PM_o32 421 .16: 0 00003D55 42 inc dx ; increment offset (16 bit or 32 bit) 423 %if _40COLUMNS 0 00003D56 F606[0100]10 testopt [options6], opt6_40_columns 0 00003D5B 7405 jz @F 0 00003D5D F6C203 test dl, 3 0 00003D60 7411 jz ee15_linebreak_and_ee2 428 @@: 429 %endif 0 00003D62 F6C207 test dl, 7 0 00003D65 740C jz ee15_linebreak_and_ee2 432 ; if new line 0 00003D67 F7D1 not cx 0 00003D69 83C104 add cx, byte 4 ; compute 3 - cx 0 00003D6C B020 mov al, 32 0 00003D6E F3AA rep stosb ; store that many spaces 0 00003D70 E9E3FE jmp ee3 ; back for more 438 439 ee15_linebreak_and_ee2: 0 00003D73 B80D0A mov ax, 10 << 8 | 13 ; terminate this line 0 00003D76 AB stosw 0 00003D77 E9C3FE jmp ee2 ; back for a new line 443 444 ee16_end: 0 00003D7A E9[0000] jmp putsline_crlf ; call putsline and return 446 447 ..@ee_interactive_access_end: 448 449 ..@ee_access_end: === Trace listing source: ../lst/debug.obj/expr.lst 1 2 %if 0 3 4 lDebug expression evaluator 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 "expr.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 0000179C ???????? eldhSignature: resb 4 ; "ELD1" 0 000017A0 ?????? resb 3 ; reserved 0 000017A3 ?? resb 1 ; 26 (Ctrl-Z) 0 000017A4 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 000017A8 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 000017AA ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 000017AC ???????? eldhDataOffset: resd 1 0 000017B0 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 000017B2 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000017B4 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000017B6 ???????? eldhReserved: resb 4 ; reserved 0 000017BA ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 000017BC ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000017C0 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000017C4 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000017C8 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 0000179C ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 000017A4 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 000017A8 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 000017AA ???? 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 0 0000179C ???? 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 0 0000179E ???? eldltAmount: resw 1 0 000017A0 ???????? 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 0 0000179C ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 0000179E ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 000017A0 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 000017A2 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 000017A4 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 000017AC ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 0000179C ???? eldlSignature: resw 1 ; 0E1D1h 0 0000179E ???????? eldlReserved: resw 2 0 000017A2 ???? eldlUseLinkHash: resw 1 0 000017A4 ???? eldlDataAmount: resw 1 0 000017A6 ???? eldlDataPrefixes: resw 1 0 000017A8 ???? eldlDataEntries: resw 1 0 000017AA ???? eldlDataAddresses: resw 1 0 000017AC ???? eldlCodeAmount: resw 1 0 000017AE ???? eldlCodePrefixes: resw 1 0 000017B0 ???? eldlCodeEntries: resw 1 0 000017B2 ???? 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 0 0000179C ???? ifKeyword: resw 1 0 0000179E ???? ifDescription: resw 1 0 000017A0 ???? ifOptions: resw 1 0 000017A2 ???? ifValue: resw 1 0 000017A4 ???? ifTrying: resw 1 0 000017A6 ???? 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 0 0000179C ???????? saOffset: resd 1 0 000017A0 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 0000179C ???? so16aOffset: resw 1 0 0000179E ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 0000179C ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 0000179C ?????? bsJump: resb 3 0 0000179F ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 0000179C ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 0000179E ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 0000179F ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 000017A1 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 000017A2 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 000017A4 ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 000017A6 ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 000017A7 ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 000017A9 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 000017AB ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 000017AD ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 000017B1 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 000017B5 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 000017B9 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 000017BB ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 000017BD ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 000017C1 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 000017C3 ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 0000179C ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 0000179D ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 0000179E ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 0000179F ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 000017AE ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 0000179C ???????????????? deName: resb 8 0 000017A4 ?????? deExt: resb 3 0 000017A7 ?? deAttrib: resb 1 0 000017A8 ?? dePlusSize: resb 1 0 000017A9 ?????????????? resb 7 0 000017B0 ???? deClusterHigh: resw 1 0 000017B2 ???? deTime: resw 1 0 000017B4 ???? deDate: resw 1 0 000017B6 ???? deClusterLow: resw 1 0 000017B8 ???????? 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 0 10000178C ???????? lsvFirstCluster: resd 1 0 100001790 ???????? lsvFATSector: resd 1 0 100001794 ???? lsvFATSeg: resw 1 0 100001796 ???? lsvLoadSeg: resw 1 0 100001798 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 10000177C ???? ldMemoryTop: resw 1 0 10000177E ???? ldLoadTop: resw 1 0 100001780 ???? ldSectorSeg: resw 1 0 100001782 ?? ldFATType: resb 1 92 <2> ldFlags: 0 100001783 ?? ldHasLBA: resb 1 0 100001784 ???? ldClusterSize: resw 1 0 100001786 ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100001788 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 10000178A ?? .partition: resb 1 ; byte 0 10000178B ?? .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 <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 0 10000176C ???????? ldRootSector: resd 1 0 100001770 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 100001772 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 100001774 ???? ldParasLeft: resw 1 0 100001776 ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 10000175C ???????? ldMaxCluster: resd 1 0 100001760 ???????? ldFileSize: resd 1 0 100001764 ???????? ldCurrentCluster: resd 1 0 100001768 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 0000179C ???????? liiSignature: resb 4 ; "NLDR" 0 000017A0 ???? liiVersion: resb 2 ; "00" 0 000017A2 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 000017A4 ???? liiAmountParagraphs: resw 1 0 000017A6 ???????????? liiReserved: resw 3 0 000017AC ???? 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 0 000017AE ???? 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 0 000017B0 ???? 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 0 000017B2 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 0000179C ???? lpSize: resw 1 0 0000179E ???? lpCount: resw 1 0 000017A0 ???????? lpBuffer: resd 1 0 000017A4 ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 0000179C ?? piBoot: resb 1 0 0000179D ?????? piStartCHS: resb 3 0 000017A0 ?? piType: resb 1 0 000017A1 ?????? piEndCHS: resb 3 0 000017A4 ???????? piStart: resd 1 0 000017A8 ???????? 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 0 0000179C ???? lsKernelName: resw 1 ; -> kernel file default name 0 0000179E ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 000017A0 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 000017A2 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 000017A4 ???? lsOptions: resw 1 ; option flags 0 000017A6 ???? lsSegment: resw 1 ; => where to load file 0 000017A8 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 000017AC ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 000017B0 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 000017B2 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 000017B4 ???????????????? 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 0 0000179C ???? exact_struc_at 00h, exeSignature: resw 1 0 0000179E ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 000017A0 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 000017A2 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 000017A4 ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 000017A6 ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 000017A8 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 000017AA ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 000017AC ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 000017AE ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 000017B0 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 000017B2 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 000017B4 ???? 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. 0 000017B6 ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 0000179C ???? ifhHandle: resw 1 0 0000179E ???? ifhFlags: resw 1 0 000017A0 ???????? 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 <1> areastrucEntry: resb 24 0 000017B4 ???????? areastrucNext: resd 1 0 000017B8 ???????? areastrucPrev: resd 1 0 000017BC ???? areastrucSubAmount: resw 1 0 000017BE ???? areastrucSubOffset: resw 1 0 000017C0 ???? areastrucFunAmount: resw 1 0 000017C2 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 0000179C ???????? areastrucsubLinear: resd 1 0 000017A0 ???????? areastrucsubLinearEnd: resd 1 0 000017A4 ???? areastrucsubListOffset: resw 1 0 000017A6 ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 0000179C ???????? areastrucfunLinear: resd 1 0 000017A0 ???????? areastrucfunLinearEnd: resd 1 0 000017A4 ???? areastrucfunListOffset: resw 1 0 000017A6 ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 0000179C ???? areastart: resw 1 0 0000179E ???? areaend: resw 1 0 000017A0 ???? areamessage: resw 1 0 000017A2 ???? 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 0 0000179C ???? 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.) 0 0000179E ???? ivFlags: resw 1 0 000017A0 ???? 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. 0 000017A2 ???? 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 0 000017A4 ?? 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. 0 000017A5 ?? 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 0 0000179C ???????? mrLinear: resd 1 0 000017A0 ???????? mrOffset: resd 1 0 000017A4 ???? mrSegmentSelector: resw 1 0 000017A6 ???? mrFlags: resw 1 0 000017A8 ???????? 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 0 0000179C ???????? .size_: resd 1 0 000017A0 ???? .srchdl: resw 1 0 000017A2 ???????? .srcadr: resd 1 0 000017A6 ???? .dsthdl: resw 1 0 000017A8 ???????? .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 %endif 21 22 %if _LINK_COMPAT 23 usesection lDEBUG_DATA_ENTRY 23 ------------------ note: usesection lDEBUG_DATA_ENTRY 24 align 4, db 0 25 %endif 26 27 28 %if _EXPRDUALCODE && _DUALCODE 29 usesection lDEBUG_CODE2 30 31 error_expr: nearcall error 32 33 %if _DEBUG4 || _DEBUG5 34 %define _DEB_ASM_PREFIX expr_ 35 %include "deb.asm" 36 %endif 37 38 %else 39 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 39 ------------------ note: usesection lDEBUG_CODE 40 41 %ifn _LINK 42 error_expr: equ error 43 %endif 44 45 %if _DEBUG4 || _DEBUG5 46 expr_d4message equ d4message 47 %endif 48 %endif 49 50 %xdefine _EXPR_SECTION _CURRENT_SECTION 51 52 53 ;--- get a valid offset for segment in BX 54 55 ; INP: bx = segment 56 ; al = first character, si -> next character 57 ; ah = 1 if might be a segment or pointer 58 ; ah = 0 if must be an offset 59 ; OUT: CY if pointer type return, bx:dx = pointer 60 ; DebugX on a 386: 61 ; edx = offset (even if 16-bit PM/86M segment) 62 ; ah = 1 if a 32-bit segment, 0 if a 16-bit segment 63 ; DebugX otherwise: 64 ; dx = offset 65 ; ah = 0 66 ; Debug: 67 ; dx = offset 68 ; al, si refer to next part of command line 69 ; CHG: Debug: ah, DebugX: - 70 ; REM: The byte [bAddr32] is no longer changed by this 71 ; function. The caller has to use the status that 72 ; is returned in ah, if desired. 73 ; REM: It is expected that INP:bx is a selector in PM, 74 ; however it may be a segment or arbitrary value 75 ; as well. In this case a 32-bit offset input may 76 ; be rejected or accepted by this function. 77 getofsforbx: section_of_function 0 00003D7D 51 push cx ; preserve 0 00003D7E 53 push bx ; preserve 0 00003D7F 88E5 mov ch, ah ; ch = 0 if must be an offset 81 %if _PM 82 _386 xor edx, edx ; properly initialize high word 83 nearcall test_high_limit 84 jz .16 ; 16-bit segment --> 85 [cpu 386] 86 nearcall getdword 87 push bx 88 push dx 89 pop edx ; edx = 32-bit offset 90 nearcall checkpointer 91 mov ah, 1 ; return 32-bit offset flag 92 jmp .ret_pop_NC 93 __CPU__ 94 %endif 95 96 .16: 0 00003D81 E8B30C nearcall getexpression 0 00003D84 E80700 nearcall checkpointer 0 00003D87 E8A111 nearcall getword.checksignificantbits 100 %if _PM 101 mov ah, 0 ; return 16-bit offset flag 102 %endif 103 .ret_pop_NC: 0 00003D8A 5B pop bx 0 00003D8B 59 pop cx ; restore 0 00003D8C F8 clc ; NC: not a pointer type 0 00003D8D C3 retn 108 109 ; Internal function for getofsforbx 110 ; 111 ; INP: ah = return from getexpression 112 ; (flag 80h = pointer type expression) 113 ; ch = 0 if must be an offset, 1 if may be pointer/segment 114 ; bx:dx = return from getexpression 115 ; ss:sp -> near return address (checkpointer), 116 ; bx restore, 117 ; cx restore, 118 ; near return address (getofsforbx) 119 ; OUT: returns near if not a pointer type expression 120 ; returns to caller of getofsforbx if pointer type expr, 121 ; CY 122 ; bx:dx = expression 123 ; DebugX on a 386: edxh = 0 124 ; DebugX: ah = 0 125 ; cx = restored from stack 126 checkpointer: section_of_function 0 00003D8E 84E4 test ah, ah ; pointer type ? 0 00003D90 7908 jns .ret ; no --> 0 00003D92 84ED test ch, ch ; can be a pointer or segment ? 0 00003D94 7414 jz errorj10 ; no --> 0 00003D96 59 pop cx ; discard a near return address 0 00003D97 59 pop cx ; discard bx 0 00003D98 59 pop cx ; restore cx 134 %if _PM 135 _386 movzx edx, dx ; edx = dx 136 mov ah, 0 ; always treat as 16-bit offset 137 %endif 0 00003D99 F9 stc ; return a pointer type 139 .ret: 140 retn_expr: 0 00003D9A C3 retn 142 143 144 ; GETRANGE - Get address range from input line. 145 ; a range consists of either start and end address 146 ; or a start address, a 'L' and a length. 147 ; Entry AL First character of range 148 ; SI Address of next character 149 ; BX Default segment to use 150 ; CX Default length to use (or 0 if not allowed) 151 ; di Default length in lines if nonzero 152 ; (only used for getrange.lines entrypoint 153 ; and with word getrange_lines & 8000h set) 154 ; must be <= 7FFFh 155 ; Exit AL First character beyond range 156 ; SI Address of the character after that 157 ; BX:(E)DX First address in range 158 ; BX:(E)CX Last address in range 159 ; Uses AH 160 161 %if _PM 162 getrangeX: section_of_function 163 and word [getrange_lines], 0 164 .lines: section_of_function getrangeX 165 %if _MS_0RANGE_COMPAT 166 %if !_LOADER 167 mov byte [getrange_is_uu], 0 168 %endif 169 .lines_and_uu: section_of_function getrangeX 170 %endif 171 clropt [internalflags3], dif3_accept_getrange_0 172 _386 movzx ecx, cx 173 .ecx_and_0_valid: section_of_function getrangeX 174 _386_PM_o32 175 push cx 176 nearcall getaddrX 177 jmp short getrange.common 178 %else 179 check_section_of getrangeX 180 check_section_of getrangeX.lines 181 %if _MS_0RANGE_COMPAT 182 check_section_of getrangeX.lines_and_uu 183 %endif 184 check_section_of getrangeX.ecx_and_0_valid 185 getrangeX: equ getrange 186 getrangeX.lines: equ getrange.lines 187 %if _MS_0RANGE_COMPAT 188 getrangeX.lines_and_uu: equ getrange.lines_and_uu 189 %endif 190 getrangeX.ecx_and_0_valid: equ getrange.ecx_and_0_valid 191 %endif 192 193 getrangeX_have_address_need_length: section_of_function 0 00003D9B 8326[0000]00 and word [getrange_lines], 0 0 00003DA0 8026[0300]FB clropt [internalflags3], dif3_accept_getrange_0 196 _386_PM_o32 0 00003DA5 31C9 xor cx, cx 198 _386_PM_o32 0 00003DA7 51 push cx ; save the default length 0 00003DA8 EB16 jmp getrange.common 201 202 0 00003DAA E9[0000] errorj10: jmp error_expr 204 205 getrange: section_of_function 0 00003DAD 8326[0000]00 and word [getrange_lines], 0 207 .lines: section_of_function getrange 208 %if _MS_0RANGE_COMPAT 209 %if !_LOADER 0 00003DB2 C606[0000]00 mov byte [getrange_is_uu], 0 211 %endif 212 .lines_and_uu: section_of_function getrange 213 %endif 0 00003DB7 8026[0300]FB clropt [internalflags3], dif3_accept_getrange_0 215 _386_PM movzx ecx, cx 216 .ecx_and_0_valid: section_of_function getrange 217 _386_PM_o32 0 00003DBC 51 push cx ; save the default length 0 00003DBD E89900 nearcall getaddr ; get address into bx:(e)dx (sets bAddr32) (returns edx) 220 .common: 221 _386_PM_o32 0 00003DC0 59 pop cx 0 00003DC1 E8[0000] nearcall skipcomm0 0 00003DC4 E8[0000] nearcall iseol? 0 00003DC7 752F jne getrange_not_eol 226 0 00003DC9 F606[0100]80 testopt [getrange_lines], 8000h 0 00003DCE 740D jz @F ; if lines length not supported --> 0 00003DD0 85FF test di, di ; default lines given ? 0 00003DD2 7409 jz @F ; no --> 0 00003DD4 78D4 js short errorj10 ; error if sign bit set --> 0 00003DD6 893E[0000] mov word [getrange_lines], di 233 ; return lines (PL) 234 _386_PM_o32 0 00003DDA 31C9 xor cx, cx ; (e)cx = 0 0 00003DDC 41 inc cx ; placeholder length = 1 237 @@: 238 0 00003DDD B402 mov ah, 2 ; do not allow past boundary if F RANGE 0 00003DDF F606[0300]04 testopt [internalflags3], dif3_accept_getrange_0 241 ; F RANGE special case ? 0 00003DE4 7504 jnz @F ; yes --> 243 _386_PM_a32 0 00003DE6 E3C2 jcxz errorj10 ; if a range is mandatory 0 00003DE8 30E4 xor ah, ah ; default range, allow clamping to boundary 246 @@: 247 getrange_length.addcheck: 248 _386_PM cmp byte [bAddr32], 0 249 _386_PM je .16 250 _386_PM dec ecx 251 _386_PM add ecx, edx 252 _386_PM jnc getrange_retn ; if no wraparound 253 _386_PM or ecx, byte -1 ; go to end of segment 254 _386_PM jmp short .checkclamped ; check if clamping allowed --> 255 .16: 256 _386_PM test ah, 2 ; F RANGE with implicit length ? 257 _386_PM jz @F ; no --> 258 _386_PM cmp ecx, 1_0000h ; yes, is it a 32-bit length > 64 KiB ? 259 _386_PM ja short errorj10 ; error if so (don't try to clamp) --> 260 @@: 261 _386_PM cmp ecx, 0FFFFh ; was high ? 262 _386_PM jbe @F ; no --> (ecxh = 0) 263 _386_PM xor ecx, ecx ; ecxh = 0 and prepare so as to 264 ; result in cx = FFFFh after dec 265 @@: 0 00003DEA 49 dec cx 0 00003DEB 01D1 add cx, dx 0 00003DED 7325 jnc getrange_retn ; if no wraparound 0 00003DEF B9FFFF mov cx, -1 ; go to end of segment 270 ; next, check if clamping allowed 271 .checkclamped: ; checks if clamping allowed 0 00003DF2 84E4 test ah, ah ; clamping allowed ? 0 00003DF4 741E jz getrange_retn 0 00003DF6 EBB2 jmp errorj10 ; (no) if a specified length wrapped --> 275 276 getrange_not_eol: 0 00003DF8 E8[0000] nearcall capitalise 0 00003DFB 3C4C cmp al, 'L' 0 00003DFD 7416 je getrange_length ; if a range with length is given 280 _386_PM_o32 ; xchg ecx, edx 0 00003DFF 87CA xchg cx, dx ; ecx = start offset, edx clobbered 0 00003E01 BA[0000] mov dx, msg.end ; dx clobbered 0 00003E04 4E dec si ; -> nonblank 0 00003E05 E8[0000] nearcall isstring? ; (advance si if match) 0 00003E08 AC lodsb ; load separator byte or initial nonblank 0 00003E09 B400 mov ah, 0 ; must be offset 0 00003E0B E86FFF nearcall getofsforbx_remember_bitness 288 ; (DebugX: returns edx no matter what) 289 _386_PM_o32 ; xchg ecx, edx 0 00003E0E 87CA xchg cx, dx ; ecx = end offset, edx = start offset 291 _386_PM_o32 ; cmp edx, ecx 0 00003E10 39CA cmp dx, cx 0 00003E12 7742 ja short errorj2b ; if empty range --> 294 getrange_retn: 0 00003E14 C3 retn 296 297 getrange_length: 0 00003E15 4E dec si ; -> at 'L' 0 00003E16 52 push dx 0 00003E17 BA[0000] mov dx, msg.length 0 00003E1A E8[0000] nearcall isstring? ; if match: ZR, NC, else: NZ, CY 0 00003E1D 5A pop dx 303 %if 0 304 jne .notlength 305 db __TEST_IMM8 ; (skip inc, si -> terminator after "LENGTH") 306 .notlength: 307 inc si ; -> behind 'L' 308 %else 0 00003E1E 83D600 adc si, 0 ; -> behind 'L' if mismatch, 310 ; stay at -> behind "LENGTH" else 311 %endif 0 00003E21 E8[0000] nearcall skipcomma ; discard the 'L' 313 ;--- a range is entered with the L/ength argument 314 ;--- get a valid length for segment in BX 0 00003E24 52 push dx 0 00003E25 53 push bx 317 _386_PM nearcall test_high_limit 318 _386_PM pushf 0 00003E26 8B0E[0000] mov cx, word [getrange_lines] 320 ; cx from getrange_not_eol clobbered 0 00003E2A E87301 nearcall get_length.lines 322 _386_PM popf 323 _386_PM jnz .not16_64kib ; don't check for <= 64 KiB 0 00003E2D 83FB01 cmp bx, byte 1 0 00003E30 7206 jb .not16_64kib ; < 64 KiB in 16-bit segment --> 0 00003E32 7522 jne short errorj2b ; 16-bit segment, above 64 KiB --> 0 00003E34 85D2 test dx, dx 0 00003E36 751E jnz short errorj2b ; 16-bit segment, above 64 KiB --> 329 .not16_64kib: 330 @@: 331 %if _PM 332 _386 push bx ; (only push high word on 386+) 333 push dx 334 _386_o32 ; pop ecx ; mov ecx, bxdx 335 pop cx ; mov cx, dx 336 %else 0 00003E38 89D1 mov cx, dx 338 %endif 0 00003E3A 09D3 or bx, dx ; zero ? 0 00003E3C 7406 jz short explicit0range ; yes, error --> 0 00003E3E 5B pop bx 0 00003E3F 5A pop dx 0 00003E40 B401 mov ah, 1 ; disallow clamping / overflow 0 00003E42 EBA6 jmp .addcheck ; check for overflow 345 346 explicit0range: 347 %if _MS_0RANGE_COMPAT 0 00003E44 F606[0200]04 testopt [options2], opt2_0range_compat 0 00003E49 740B jz errorj2b 0 00003E4B 43 inc bx ; bx:dx = 10000h (64 KiB) 351 %if !_LOADER 0 00003E4C D006[0000] rol byte [getrange_is_uu], 1 0 00003E50 73E6 jnc @B ; if not uu --> 0 00003E52 87DA xchg bx, dx ; bx:dx = 1 355 %endif 0 00003E54 EBE2 jmp @B 357 %endif 358 errorj2b: 0 00003E56 E9[0000] jmp error_expr 360 361 362 ; GETADDR - Get address from input line. 363 ; Entry AL First character of address 364 ; SI Address of next character 365 ; BX Default segment to use 366 ; Exit AL First character beyond address 367 ; SI Address of the character after that 368 ; BX:(E)DX Address found 369 ; Uses AH,CX 370 ; REM: mm expects that numeric expressions evaluating 371 ; to numbers in the range 0 to C3h are always 372 ; allowed here regardless the default segment's 373 ; D/B bit and limit. This is needed for its mc 374 ; command detection. 375 376 getaddr: section_of_function 377 %if _PM 378 nearcall getaddrX 379 %if _EXPRDUALCODE && _DUALCODE 380 nearcall verifysegm_or_error ; make BX a writeable segment 381 retn 382 %else 383 jmp verifysegm_or_error ; make BX a writeable segment 384 %endif 385 386 ; getaddrX differs from getaddr in that BX is not ensured 387 ; to be writeable in PM. 388 ; 389 ; For DEBUG without PM support, getaddr is getaddrX. Both don't return CF. 390 391 getaddrX: section_of_function 392 mov byte [bAddr32], 0 393 xor cx, cx 394 cmp al, '$' ; a real-mode segment? 395 jne getaddr_no_dollar 396 lodsb 397 %if _DOUBLEDOLLAR 398 cmp al, '$' 399 jne @F 400 lodsb 401 dec cx ; indicate double dollar sign (0FFFFh) 402 @@: 403 %endif 404 405 _386 xor edx, edx ; edxh = 0 406 nearcall getexpression 407 test ah, ah ; pointer type ? 408 jns @F 409 410 nearcall ispm ; need to translate ? 411 jnz .ret ; no --> 412 ; bx = segment 413 ; after falling through we get bx:(e)dx = segmented address 414 415 check_section_of seg_bx_to_sel 416 seg_bx_to_sel: equ $ ; (no base for local labels) 417 push ax 418 mov ax, 0002h 419 int 31h 420 jc short errorj2 421 mov bx, ax ; bx = segment 422 %if _DOUBLEDOLLAR 423 push dx 424 push cx 425 xor cx, cx 426 mov dx, -1 427 mov ax, 0008h 428 int 31h ; set segment limit 0FFFFh 429 pop cx 430 jcxz .no_double_dollar 431 mov dx, cx ; cx = dx = 0FFFFh 432 mov ax, 0008h 433 int 31h ; set segment limit 0FFFF_FFFFh 434 .no_double_dollar: 435 pop dx 436 %endif 437 pop ax 438 .ret: 439 retn 440 441 @@: 442 nearcall getword.checksignificantbits 443 nearcall ispm ; need to translate ? 444 jnz .checkseg ; no --> 445 mov bx, dx 446 nearcall seg_bx_to_sel 447 mov dx, bx 448 .checkseg: 449 nearcall skipwh0 450 cmp al, ':' ; was a segment at all? 451 je getaddr_segment ; yes --> 452 errorj2: 453 jmp error_expr 454 %else 455 getaddrX: section_of_function 0 00003E59 3C24 cmp al, '$' 0 00003E5B 7516 jne getaddr_no_dollar 0 00003E5D AC lodsb 459 %if _DOUBLEDOLLAR 460 cmp al, '$' 461 jne @F 462 lodsb 463 @@: 464 %endif 0 00003E5E E8D60B nearcall getexpression 0 00003E61 84E4 test ah, ah ; pointer type ? 0 00003E63 780D js .ret ; return bx:dx = segmented address 0 00003E65 E8C310 nearcall getword.checksignificantbits 0 00003E68 E8[0000] nearcall skipwh0 0 00003E6B 3C3A cmp al, ':' 0 00003E6D 742B je getaddr_segment 0 00003E6F E9[0000] jmp error_expr 473 474 .ret: 0 00003E72 C3 retn 476 %endif 477 478 479 %if !_LOADER 480 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 480 ------------------ note: usesection lDEBUG_DATA_ENTRY 481 482 align 2, db 0 483 getaddr_taken_table: 0 0000179C [0000]0100 dw msg.t, 1 0 000017A0 [0000]0100 dw msg.taken, 1 0 000017A4 [0000]0000 dw msg.nt, 0 0 000017A8 [0000]0000 dw msg.nottaken, 0 0 000017AC 0000 dw 0 ; end of table 489 %endif 490 491 %if _EXPRDUALCODE && _DUALCODE 492 usesection lDEBUG_CODE2 493 %else 494 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 494 ------------------ note: usesection lDEBUG_CODE 495 %endif 496 getaddr_no_dollar: 0 00003E73 4E dec si ; si -> text 498 %if !_LOADER 0 00003E74 57 push di 0 00003E75 BF[FEFF] mov di, getaddr_taken_table - 2 501 ; -> table minus 2 502 @@: 0 00003E78 AF scasw ; di += 2, -> -> string to compare 0 00003E79 8B15 mov dx, [di] ; -> string to compare (0 if end of table) 0 00003E7B AF scasw ; di += 2, -> taken status (1 = taken) 0 00003E7C 85D2 test dx, dx ; end of table ? 0 00003E7E 7409 jz @F ; if end of table --> 0 00003E80 E8[0000] nearcall isstring? ; is it this keyword ? 0 00003E83 75F3 jne @B ; no, loop --> 0 00003E85 8B05 mov ax, [di] ; get taken status 0 00003E87 EB1B jmp getaddr_taken ; branch to taken handling, di on stack 512 513 @@: 0 00003E89 5F pop di ; restore di 515 %endif 0 00003E8A AC lodsb ; reload al = text, si -> after 0 00003E8B B401 mov ah, 1 ; might be a pointer type 0 00003E8D E8EDFE nearcall getofsforbx 0 00003E90 7207 jc .ret ; if pointer type then return --> 0 00003E92 E8[0000] nearcall skipwh0 0 00003E95 3C3A cmp al, ':' 0 00003E97 7401 je getaddr_segment_check_high 523 ; if this is a segment/selector --> 524 .ret: 525 %if _PM 526 jmp short remember_bitness 527 ; remember 32-bitness (only if no segment) 528 %else 0 00003E99 C3 retn 530 %endif 531 532 getaddr_segment_check_high: 533 _386_PM cmp edx, 0001_0000h ; segment/selector fits in word ? 534 _386_PM jae short errorj2 ; no --> 535 getaddr_segment: 536 ; al = colon ':' 537 ; si -> text after colon 0 00003E9A 89D3 mov bx, dx ; mov segment into BX 0 00003E9C E8[0000] nearcall skipwhite ; skip to next word 0 00003E9F B400 mov ah, 0 ; must be an offset 541 %if _PM 542 getofsforbx_remember_bitness: section_of_function 543 nearcall getofsforbx 544 remember_bitness: section_of_function 545 or byte [bAddr32], ah ; remember 32-bitness 546 retn 547 %else 0 00003EA1 E9D9FE jmp getofsforbx 549 550 check_section_of getofsforbx_remember_bitness 551 getofsforbx_remember_bitness: equ getofsforbx 552 %endif 553 554 555 %if !_LOADER 556 ; INP: ax = 1 if taken, 0 if nottaken 557 ; ss:sp -> di value 558 getaddr_taken: section_of_function 559 _386_PM_o32 ; (push esi) 0 00003EA4 56 push si 561 _386_PM_o32 ; (push eax) 0 00003EA5 50 push ax ; ! must be the LAST word in this stack frame 563 0 00003EA6 BA0F00 mov dx, 15 ; DL = number of bytes to go, DH = prefix flags 0 00003EA9 8B1E[0000] mov bx, word [reg_cs] 566 _386_PM_o32 ; mov esi, dword [reg_eip] 0 00003EAD 8B36[0000] mov si, word [reg_eip] 568 .pp2: 0 00003EB1 E8[0000] nearcall pp16 ; get next instruction byte into AL 0 00003EB4 BF[0000] mov di, ppbytes 0 00003EB7 B9[0000] mov cx, PPLEN_ONLY_PREFIXES 0 00003EBA F2AE repne scasb ; asize, osize, seg prefixes (ie, hints) ? 0 00003EBC 7510 jne @F ; no --> 574 %if _LINK_COMPAT 0 00003EBE 8A85[FFFF] mov al,byte [word di+PPLEN-1]; get corresponding byte in ppinfo 576 %else 577 mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 578 %endif 579 ; test al, PP_PREFIX ; prefix ? 580 ; jz pp3 ; no --> 581 ; (Always set in getaddr_taken.) 0 00003EC2 08C6 or dh, al ; set the OSIZE or ASIZE flags if either of these 583 ; Note: Multiple OSIZE in a 16-bit cs do not toggle 584 ; between decoding as O32 and O16, they're always 585 ; decoded as O32. The same is true for A32, and 586 ; in a 32-bit cs for O16 and A16. 587 .next: 0 00003EC4 FECA dec dl 0 00003EC6 75E9 jnz .pp2 ; if not out of bytes --> 590 .pp5: ; unknown, error out on the (NOT)TAKEN keyword 591 _386_PM_o32 ; (pop eax) 0 00003EC8 58 pop ax 593 _386_PM_o32 ; (pop esi) 0 00003EC9 5E pop si ; restore si so error will be behind keyword 0 00003ECA 5F pop di 0 00003ECB 46 inc si 0 00003ECC EB45 jmp errorj2a 598 599 @@: 0 00003ECE 3C70 cmp al, 70h ; jcc rel8 ? 0 00003ED0 7204 jb @F ; no --> 0 00003ED2 3C7F cmp al, 7Fh 0 00003ED4 7623 jbe .rel_8 ; yes --> 604 @@: 0 00003ED6 3CE0 cmp al, 0E0h ; loop* / j(e)cxz rel8 ? 0 00003ED8 7204 jb @F ; no --> 0 00003EDA 3CE3 cmp al, 0E3h 0 00003EDC 761B jbe .rel_8 ; yes --> 609 @@: 0 00003EDE 3C0F cmp al, 0Fh ; prefix byte ? 0 00003EE0 75E6 jne .pp5 ; no, no valid conditional branch (error) --> 0 00003EE2 E8[0000] nearcall pp16 0 00003EE5 3C80 cmp al, 80h ; jcc rel16/rel32 ? 0 00003EE7 72DF jb .pp5 0 00003EE9 3C8F cmp al, 8Fh 0 00003EEB 77DB ja .pp5 ; no, error --> 617 .rel_16_32: 618 _386_PM nearcall pp_fix32bitflags 0 00003EED E8[0000] nearcall pp16 0 00003EF0 86C4 xchg al, ah 0 00003EF2 E8[0000] nearcall pp16 0 00003EF5 86C4 xchg al, ah ; ax = rel16 623 _386_PM test dh, PP_OPSIZ 624 _386_PM jz @F ; have 16-bit displacement --> 625 _386_PM rol eax, 16 ; preserve low 16 bits in high 16 bits 626 _386_PM nearcall pp16 627 _386_PM ror eax, 8 628 _386_PM nearcall pp16 629 _386_PM ror eax, 8 ; magic swap to put high 16 bits where they belong 0 00003EF7 EB04 jmp @FF ; have 32-bit displacement --> 631 ; (When _PM=0 build or no 386, this branch will do the 632 ; same thing as taking it as a 16-bit displacement.) 633 634 .rel_8: 0 00003EF9 E8[0000] nearcall pp16 ; get 8-bit displacement 0 00003EFC 98 cbw ; 8 to 16 bits 637 @@: 638 _386_PM cwde ; 16 to 32 bits 639 @@: 0 00003EFD 5A pop dx ; get ax from stack 0 00003EFE 52 push dx ; restore it to the stack 0 00003EFF 84D2 test dl, dl ; 1 if taken, 0 if nottaken 0 00003F01 7402 jz @F ; nottaken, esi has eip value after inst --> 644 _386_PM_o32 ; (add esi, eax) 0 00003F03 01C6 add si, ax ; taken: apply displacement to esi 646 @@: 647 _386_PM_o32 0 00003F05 89F2 mov dx, si ; get into (e)dx, bx already has seg/sel 649 _386_PM nearcall test_d_b_bit 650 _386_PM jnz @F ; if 32-bit cs --> 651 _386_PM movzx edx, dx ; clear high 16 bits 652 @@: 653 _386_PM_o32 ; (pop eax) 0 00003F07 58 pop ax 655 _386_PM_o32 ; (pop esi) 0 00003F08 5E pop si 0 00003F09 5F pop di 658 _386_PM mov ah, 0 ; do not remember bitness (is 16 bit) 659 _386_PM jz @F ; if 16-bit cs --> 660 _386_PM inc ah ; remember bitness as 1 (is 32 bit) 661 @@: 662 _386_PM nearcall remember_bitness 663 %if _EXPRDUALCODE && _DUALCODE 664 nearcall skipwhite 665 retn 666 %else 0 00003F0A E9[0000] jmp skipwhite 668 %endif 669 %endif 670 671 %if _STRNUM 672 getstr_check_limit: 0 00003F0D 3BBF[1E00] cmp di, word [getstr_dispatch_table.limit + bx] 0 00003F11 7664 jbe getstr_retn 675 %endif 676 errorj2a: 0 00003F13 E9[0000] jmp error_expr 678 679 680 ; GETSTR - Get string of bytes. Put the answer in line_out. 681 ; Entry AL first character 682 ; SI address of next character 683 ; Exit [line_out] first byte of string 684 ; DI address of last+1 byte of string 685 ; Uses AX, cx, dx,SI 686 687 getstr: section_of_function 688 %if _STRNUM 0 00003F16 53 push bx 0 00003F17 31DB xor bx, bx ; 0 = byte size as default 691 %endif 0 00003F19 BF[0000] mov di, line_out 0 00003F1C E8[0000] nearcall iseol? 0 00003F1F 74F2 je short errorj2a ; we don't allow empty byte strings 695 getstr_loop: 696 %if _STRNUM 0 00003F21 E8[0000] nearcall skipcomm0 0 00003F24 4E dec si ; -> nonblank 0 00003F25 BA[0000] mov dx, msg.as ; "AS" keyword ? 0 00003F28 E8[0000] nearcall isstring? 0 00003F2B AC lodsb 0 00003F2C 7515 jne .notas ; no --> 0 00003F2E E8[0000] nearcall skipcomm0 0 00003F31 4E dec si ; -> nonblank 0 00003F32 E8B000 nearcall get_length_keyword 0 00003F35 75DC jnz errorj2a 0 00003F37 80F902 cmp cl, 2 ; 0 = bytes, 1 = words, 2 = dwords 708 ; (ch is always zero) 0 00003F3A 77D7 ja errorj2a ; higher is invalid --> 0 00003F3C 89CB mov bx, cx 0 00003F3E 01DB add bx, bx ; make a table offset 0 00003F40 AC lodsb 0 00003F41 EB2B jmp getstr_next 714 715 .notas: 716 %endif 0 00003F43 3C27 cmp al, "'" 0 00003F45 740D je getstr_start_quote ; if string 0 00003F47 3C22 cmp al, '"' 0 00003F49 7409 je getstr_start_quote ; ditto 721 722 %if _STRNUM 0 00003F4B E8BFFF call getstr_check_limit 0 00003F4E FF97[1200] call near [getstr_dispatch_table.numeric + bx] 725 %else 726 nearcall getbyte ; byte in DL 727 mov byte [di], dl ; store the byte 728 inc di 729 %endif 0 00003F52 EB1A jmp short getstr_next 731 732 getstr_start_quote: 0 00003F54 88C4 mov ah, al ; save quote character 734 getstr_loop_quoted: 0 00003F56 AC lodsb 0 00003F57 38E0 cmp al, ah 0 00003F59 740E je getstr_quote_quoted ; if possible end of string 0 00003F5B E8[0000] nearcall iseol?.notsemicolon 0 00003F5E 74B3 je short errorj2a ; if end of line 740 getstr_store_quoted: 741 %if _STRNUM 0 00003F60 E8AAFF call getstr_check_limit 0 00003F63 FF97[1800] call near [getstr_dispatch_table.string + bx] 744 %else 745 stosb ; save character and continue 746 %endif 0 00003F67 EBED jmp short getstr_loop_quoted 748 749 getstr_quote_quoted: 0 00003F69 AC lodsb 0 00003F6A 38E0 cmp al, ah 0 00003F6C 74F2 je getstr_store_quoted ; if doubled quote character 753 getstr_next: 0 00003F6E E8[0000] nearcall skipcomm0 ; go back for more 0 00003F71 E8[0000] nearcall iseol? 0 00003F74 75AB jne getstr_loop ; if not done yet 757 %if _STRNUM 0 00003F76 5B pop bx 759 getstr_retn: 760 %endif 0 00003F77 C3 retn 762 763 764 %if _STRNUM 765 getstr_numeric_byte: 0 00003F78 E8B90F nearcall getbyte ; byte in DL 0 00003F7B 8815 mov byte [di], dl ; store the byte 0 00003F7D 47 inc di 0 00003F7E C3 retn 770 771 getstr_numeric_word: 0 00003F7F E8A40F nearcall getword ; dx 0 00003F82 8915 mov word [di], dx ; store 0 00003F84 AF scasw ; di += 2 0 00003F85 C3 retn 776 777 getstr_numeric_dword: 0 00003F86 53 push bx 0 00003F87 E8AD0A nearcall getdword ; bx:dx 0 00003F8A 8915 mov word [di], dx ; store 0 00003F8C AF scasw ; di += 2 0 00003F8D 891D mov word [di], bx ; store 0 00003F8F AF scasw ; di += 2 0 00003F90 5B pop bx 0 00003F91 C3 retn 786 787 788 getstr_string_word: 0 00003F92 AA stosb ; save character and continue 0 00003F93 B000 mov al, 0 0 00003F95 AA stosb 0 00003F96 C3 retn 793 794 getstr_string_dword: 0 00003F97 AA stosb ; save character and continue 0 00003F98 B000 mov al, 0 0 00003F9A AA stosb 0 00003F9B AA stosb 799 getstr_string_byte: 0 00003F9C AA stosb 0 00003F9D C3 retn 802 803 804 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 804 ------------------ note: usesection lDEBUG_DATA_ENTRY 805 806 ; REM: Dispatch table in section lDEBUG_CODE or lDEBUG_CODE2 807 align 2, db 0 808 getstr_dispatch_table: 0 000017AE [FB01] .numeric: dw getstr_numeric_byte 0 000017B0 [0202] dw getstr_numeric_word 0 000017B2 [0902] dw getstr_numeric_dword 0 000017B4 [1F02] .string: dw getstr_string_byte 0 000017B6 [1502] dw getstr_string_word 0 000017B8 [1A02] dw getstr_string_dword 0 000017BA [FFFF] .limit: dw line_out_end - 1 0 000017BC [FEFF] dw line_out_end - 2 0 000017BE [FCFF] dw line_out_end - 4 818 819 %if _EXPRDUALCODE && _DUALCODE 820 usesection lDEBUG_CODE2 821 %else 822 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 822 ------------------ note: usesection lDEBUG_CODE 823 %endif 824 825 %endif ; _STRNUM 826 827 828 ; INP: al =, si -> input 829 ; cx = getrange lines flag (8000h if LINES allowed) 830 ; OUT: al =, si -> after number / keyword 831 ; If not LINES, 832 ; word [getrange_lines] unchanged 833 ; bx:dx = size 834 ; If LINES, 835 ; word [getrange_lines] = number of lines 836 ; (must be >= 1 and <= 7FFFh) 837 ; bx:dx = 1, as a placeholder value 838 ; CHG: ah, cx 839 ; REM: jumps to error on invalid input 840 get_length: section_of_function 0 00003F9E 31C9 xor cx, cx ; do not allow LINES 842 .lines: section_of_function get_length 843 0 00003FA0 E8940A nearcall getdword 0 00003FA3 4E dec si 0 00003FA4 56 push si ; -> before comma 0 00003FA5 E8[0000] nearcall skipcomma 848 0 00003FA8 52 push dx ; = low word of number 0 00003FA9 4E dec si 851 0 00003FAA 85C9 test cx, cx ; LINES allowed ? 0 00003FAC 791F jns @F ; no --> 854 0 00003FAE BA[0000] mov dx, msg.lines 0 00003FB1 E8[0000] nearcall isstring? ; LINES specified ? 0 00003FB4 7517 jne @F ; no --> 858 0 00003FB6 5A pop dx ; restore = low word of number 0 00003FB7 85DB test bx, bx ; lines must be <= 7FFFh 0 00003FB9 750F jnz .error ; if > FFFFh --> 0 00003FBB 85D2 test dx, dx 0 00003FBD 740B jz .error ; lines mustn't be zero --> 0 00003FBF 7809 js .error ; if >= 8000h --> 0 00003FC1 8916[0000] mov word [getrange_lines], dx 866 ; save lines specified 0 00003FC5 BA0100 mov dx, 1 ; return a placeholder size in bx:dx 0 00003FC8 EB13 jmp .done 869 870 .error: 0 00003FCA E9[0000] jmp error_expr 872 873 @@: 0 00003FCD E81500 nearcall get_length_keyword 875 ; si -> terminator after length unit 876 ; (or -> after expression if no unit) 0 00003FD0 5A pop dx ; restore = low word of number 0 00003FD1 750F jnz .nokeyword ; no unit given, reset to -> before comma --> 0 00003FD3 E308 jcxz .noshift ; "BYTES" given --> 880 .shiftloop: 0 00003FD5 D1E2 shl dx, 1 0 00003FD7 D1D3 rcl bx, 1 0 00003FD9 72EF jc short .error ; too large --> 0 00003FDB E2F8 loop .shiftloop ; loop shifting (if it was shift count > 1) 885 .noshift: 886 .done: 0 00003FDD 59 pop cx ; discard -> before comma 0 00003FDE E8[0000] nearcall skipwhite ; al = next character, si -> after that 0 00003FE1 C3 retn 890 891 .nokeyword: 0 00003FE2 5E pop si ; restore -> before comma 0 00003FE3 AC lodsb ; al = comma or other nonblank, si -> after 0 00003FE4 C3 retn 895 896 897 ; INP: si -> potential keyword 898 ; OUT: NZ if no keyword, 899 ; si unchanged 900 ; cx = 0 (default length shift like BYTES) 901 ; ZR if keyword found, 902 ; si -> separator behind keyword 903 ; cx = length shift (< 256) 904 ; CHG: dx, al 905 get_length_keyword: section_of_function 0 00003FE5 57 push di 0 00003FE6 BF[0000] mov di, table_length_keywords 0 00003FE9 A9 db __TEST_IMM16 ; (skip jcxz in first iteration) 909 @@: 0 00003FEA E30B jcxz .gotsize ; prior was the last entry --> (NZ) 911 ; This branch cannot be taken in the first iteration. 912 ; If it is taken then the flags are always NZ here. 0 00003FEC 8B0D mov cx, word [di] ; = shift count (0 if last entry of table) 0 00003FEE AF scasw ; di += 2 0 00003FEF 8B15 mov dx, word [di] ; -> keyword in allcaps ASCIZ 0 00003FF1 AF scasw ; di += 2 0 00003FF2 E8[0000] nearcall isstring? ; this keyword matches ? 0 00003FF5 75F3 jne @B ; no, loop --> (NZ, si unchanged) 919 ; matched, si is advanced -> past the keyword 920 ; ZR 921 922 .gotsize: 0 00003FF7 5F pop di 0 00003FF8 C3 retn 925 926 927 isbracketorunaryoperator?: section_of_function 0 00003FF9 E80900 nearcall isunaryoperator? 0 00003FFC 7406 je .yes 930 %if _INDIRECTION 0 00003FFE 3C5B cmp al, '[' 0 00004000 7402 je .yes 933 %endif 0 00004002 3C28 cmp al, '(' 935 .yes: 0 00004004 C3 retn 937 938 939 ; Is al one of the simple unary operators? 940 ; OUT: NZ if not 941 ; ZR if so, 942 ; NC 943 ; cx = index into unaryoperators 944 isunaryoperator?: section_of_function 0 00004005 57 push di 0 00004006 BF[5800] mov di, unaryoperators ; -> countedw 0 00004009 EB04 jmp short isoperator?.common 948 949 ; See previous description. 950 isoperator?: section_of_function 0 0000400B 57 push di 0 0000400C BF[4000] mov di, operators ; -> countedw 953 .common: 0 0000400F 8B0D mov cx, word [di] ; get amount of scan byte entries 0 00004011 51 push cx 0 00004012 AF scasw ; skip amount 0 00004013 F2AE repne scasb ; scan, cx = remainder of entries 0 00004015 5F pop di ; = amount 0 00004016 7506 jne .no ; --> (NZ) 960 ; neg cx = not cx \ inc cx 961 ; therefore not cx = neg cx \ dec cx 0 00004018 F7D1 not cx ; minus remainder minus 1 0 0000401A 01F9 add cx, di ; amount minus remainder minus 1 964 ; if last matches, remainder = 0 965 ; if second to last matches, remainder = 1 966 ; therefore amount - remainder - 1 = 0-based index 0 0000401C 38C0 cmp al, al ; NC, ZR 968 .no: 0 0000401E 5F pop di 0 0000401F C3 retn 971 972 973 ; INP: al = character 974 ; OUT: al = capitalised character 975 ; ZR, NC if a separator 976 ; NZ if no separator 977 isseparator?: section_of_function 978 .: 0 00004020 E8[0000] nearcall capitalise 0 00004023 51 push cx 981 %if _EXPRESSIONS 0 00004024 3C41 cmp al, 'A' 0 00004026 7204 jb @F 0 00004028 3C5A cmp al, 'Z' 0 0000402A 7605 jbe @FF 986 @@: 0 0000402C E8DCFF nearcall isoperator? ; normal operators are separators (also handles equality sign) 0 0000402F 740A je .yes ; if match --> (ZR, NC) 989 @@: 990 %endif 0 00004031 57 push di 0 00004032 BF[500B] mov di, separators 0 00004035 8B0D mov cx, word [di] ; = amount of scan byte entries 0 00004037 AF scasw ; skip amount 0 00004038 F2AE repne scasb ; ZR, NC on match, NZ else 0 0000403A 5F pop di 997 .yes: 0 0000403B 59 pop cx 0 0000403C C3 retn 1000 1001 ; INP: al = character 1002 ; OUT: al = capitalised character 1003 ; ZR, NC if a separator (not L or dot) 1004 ; NZ if no separator (including L or dot) 1005 .except_L_or_dot: section_of_function isseparator? 0 0000403D E8[0000] nearcall capitalise 0 00004040 3C2E cmp al, '.' 0 00004042 7404 je .ret_NZ 0 00004044 3C4C cmp al, 'L' 0 00004046 75D8 jne . 1011 .ret_NZ: 0 00004048 84C0 test al, al 0 0000404A C3 retn 1014 1015 1016 ; Does one of the type operators start in input? 1017 ; 1018 ; INP: al = first character 1019 ; si-> next character 1020 ; OUT: Iff NC, 1021 ; bx>>1 = offset into typebitmasks and typehandlers tables 1022 ; bx&1 = set iff signed type 1023 ; di-> behind the type operator 1024 ; CHG: bx, cx, di 1025 ; 1026 ; Note: Signed types are specified by an S prefix to 1027 ; the type names. Only non-address types can 1028 ; be signed (that is, offset, segment, and 1029 ; pointer cannot be signed). 1030 ; Types can be specified with abbreviated names, 1031 ; except where that would clash with numeric 1032 ; input or a register name or ambiguity would 1033 ; be caused. These cases are: 1034 ; SS, S (short, seg, signed, ss) 1035 ; B (byte, numeric 0Bh) 1036 ; C (char, numeric 0Ch) 1037 ; D (dword, numeric 0Dh) 1038 ; 3 (3byte, numeric 3) 1039 ; 3B (3byte, numeric 3Bh) 1040 ; CH (char, register ch) 1041 istype?: section_of_function 1042 %if maxtypesize & 1 0 0000404B B90800 mov cx, maxtypesize+1 ; = maximum count + 1 1044 %else 1045 mov cx, maxtypesize ; = maximum count 1046 %endif 1047 ; cx is even here! 0 0000404E 52 push dx 0 0000404F 50 push ax 0 00004050 56 push si 1051 0 00004051 29CC sub sp, cx ; allocate name buffer 0 00004053 89E7 mov di, sp ; -> name buffer 0 00004055 57 push di 0 00004056 31DB xor bx, bx ; initialise count 1056 %ifn maxtypesize & 1 1057 inc cx ; = maximum count + 1 1058 %endif 1059 ; The +1 does not represent an off-by-one 1060 ; because the below loop stores to the 1061 ; buffer at the beginning of subsequent 1062 ; iterations, after checking cx. 1063 0 00004058 A9 db __TEST_IMM16 ; (skip stosb and lodsb) 1065 .storename: 0 00004059 AA stosb ; store in name buffer 0 0000405A AC lodsb ; get next character to check 0 0000405B E8[0000] nearcall capitalise 0 0000405E 51 push cx 0 0000405F E897FF nearcall isbracketorunaryoperator?; terminator ? 0 00004062 59 pop cx 0 00004063 7417 je .endname 0 00004065 E8[0000] nearcall iseol? 0 00004068 7412 je .endname 0 0000406A 3C20 cmp al, 32 0 0000406C 740E je .endname 0 0000406E 3C09 cmp al, 9 0 00004070 740A je .endname 0 00004072 3C2C cmp al, ',' 0 00004074 7406 je .endname ; yes --> 1081 ; We don't check for digits here. 1082 ; Immediate values and variables 1083 ; must leave a space inbetween. 0 00004076 43 inc bx ; count characters 0 00004077 E2E0 loop .storename ; count remaining buffer space 1086 ; Here, the potential name was too 1087 ; long for a valid type name. 0 00004079 F9 stc 0 0000407A EB1F jmp short .done ; --> 1090 1091 .endname: 0 0000407C E8[0000] nearcall skipwh0 ; skip to next field 0 0000407F 4E dec si ; -> behind potential name 0 00004080 5F pop di ; -> name buffer 0 00004081 89D9 mov cx, bx ; cx = length 0 00004083 56 push si ; save position in input line 0 00004084 89FE mov si, di ; si-> name buffer 0 00004086 53 push bx 0 00004087 57 push di 0 00004088 F8 clc ; indicate unsigned check 0 00004089 E81900 nearcall isunsignedtype? ; matches an unsigned type ? 0 0000408C 5E pop si 0 0000408D 59 pop cx 0 0000408E 730B jnc .done ; yes --> 1105 0 00004090 AC lodsb ; al = first, si-> second character 0 00004091 49 dec cx ; cx = length less one 0 00004092 3C53 cmp al, 'S' ; first character an "S" ? 0 00004094 F9 stc ; (indicate signed check, or: no type) 0 00004095 7504 jne .done ; no, not signed either --> 0 00004097 E80B00 nearcall isunsignedtype? ; matches an unsigned type now ? 0 0000409A 43 inc bx ; if NC, set to indicate signed type 1113 .done: 0 0000409B 9F lahf 0 0000409C 5F pop di ; if NC, -> behind matched type name 0 0000409D 83C408 add sp, (maxtypesize+1) & ~1 ; discard name buffer 0 000040A0 5E pop si 0 000040A1 9E sahf 0 000040A2 58 pop ax 0 000040A3 5A pop dx 0 000040A4 C3 retn 1122 1123 ; Does one of the unsigned type operators start in buffer? 1124 ; 1125 ; INP: si-> name buffer with capitalised potential name 1126 ; cx = length of potential name 1127 ; CY iff looking for signed type 1128 ; OUT: Iff NC, 1129 ; bx>>1 = offset into typebitmasks and typehandlers tables 1130 ; bx&1 = 0 1131 ; CHG: ax, bx, cx, dx, si, di 1132 isunsignedtype?: section_of_function 0 000040A5 BF[0000] mov di, types 0 000040A8 19D2 sbb dx, dx ; 0FFFFh if signed check else 0 0 000040AA E352 jcxz .notype ; if zero characters --> 0 000040AC 83F902 cmp cx, 2 0 000040AF 750C jne @F 0 000040B1 813C4348 cmp word [si], "CH" 0 000040B5 7447 je .notype 0 000040B7 813C3342 cmp word [si], "3B" 0 000040BB 7441 je .notype 1142 @@: 0 000040BD E214 loop .single_character_checked ; if not single character --> 1144 0 000040BF AC lodsb ; get that character 0 000040C0 3C53 cmp al, 'S' ; specified "S" or "SS" ? 0 000040C2 743A je .notype ; yes, not allowed --> 0 000040C4 08D0 or al, dl ; iff signed check, al |= 0FFh 0 000040C6 4E dec si ; (restore) 0 000040C7 3C33 cmp al, '3' 0 000040C9 7433 je .notype 0 000040CB 3C41 cmp al, 'A' ; specified only a valid digit ? 0 000040CD 7204 jb .single_character_checked 0 000040CF 3C47 cmp al, 'F'+1 0 000040D1 722B jb .notype ; yes, not allowed --> 1156 1157 .single_character_checked: 0 000040D3 41 inc cx ; (restore) 1159 %if _LINK_COMPAT 0 000040D4 81E2[0000] and dx, strict word types.addresses_minus_end ; = 0 iff unsigned check 1161 %else 1162 and dx, types.addresses_minus_end ; = 0 iff unsigned check 1163 %endif 0 000040D8 31C0 xor ax, ax ; initialise ah, and ax = 0 first 0 000040DA 31DB xor bx, bx 0 000040DC 87FE xchg di, si 0 000040DE 81C2[0000] add dx, types.end ; = .addresses for signed check, 1168 ; = .end for unsigned check 1169 1170 ; Before each iteration, 1171 ; si-> byte-counted next name to check 1172 ; di-> potential name (in name buffer) 1173 ; cx = cl = length of potential name 1174 ; (dx-1) = maximum value for si 1175 ; ah = 0 1176 ; Before the first iteration additionally, 1177 ; bx&~3 = index to return for this name (if match) 1178 ; al = 0 1179 ; Before subsequent iterations additionally, 1180 ; (bx+2)&~3 = index to return for this name (if match) 1181 ; al = offset to add to si first 0 000040E2 A9 db __TEST_IMM16 ; (skip two times inc bx) 1183 .loop: 0 000040E3 43 inc bx 0 000040E4 43 inc bx ; increase index 0 000040E5 01C6 add si, ax ; -> next table entry 0 000040E7 AC lodsb ; ax = length of full name 0 000040E8 39D6 cmp si, dx ; checked all allowed names? 0 000040EA 7312 jae .notype ; yes, done --> 0 000040EC 39C8 cmp ax, cx ; full name large enough ? 0 000040EE 72F3 jb .loop ; no --> 0 000040F0 57 push di 0 000040F1 51 push cx 0 000040F2 56 push si 0 000040F3 F3A6 repe cmpsb ; potential name matches ? 0 000040F5 5E pop si 0 000040F6 59 pop cx 0 000040F7 5F pop di 0 000040F8 75E9 jne .loop ; no --> 1200 0 000040FA 80E3FC and bl, ~3 ; conflate alternative type names 0 000040FD A8 db __TEST_IMM8 ; (NC, skip stc) 1203 .notype: 0 000040FE F9 stc 0 000040FF C3 retn 1206 1207 1208 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 1208 ------------------ note: usesection lDEBUG_DATA_ENTRY 1209 1210 ; Table of bit masks and shift counts to determine 1211 ; how a type modifies the bit mask of required bytes. 1212 ; 1213 ; It would be possible to always retrieve a full dword 1214 ; from memory to process indirection in expressions, 1215 ; but this could fault if accessing inexistent data. 1216 ; Hence the debugger should minimise memory access. 1217 ; For this reason, types allow the expression evaluator 1218 ; to keep track which of the term's bytes are actually 1219 ; going to be used. The bit mask of required bytes 1220 ; indicates which bytes are not discarded by any of a 1221 ; term's type operators. 1222 ; 1223 ; The second byte of each entry (applied to ch by the 1224 ; reader, ie high byte of cx) indicates a mask to 1225 ; apply to the bit mask of required bytes. Note that 1226 ; this mask is applied first, before the shift that's 1227 ; described next. 1228 ; The first byte of each entry (loaded into cl by the 1229 ; reader, ie low byte of cx) indicates a shift left 1230 ; count to apply to the bit mask of required bytes. 1231 ; (Only the segment type doesn't have 0 currently.) 1232 ; 1233 ; Note that types are parsed forwards through the input 1234 ; (ie the specified command) but are actually applied 1235 ; to the numeric value they refer to backwards, that 1236 ; is, a type that is closer to the term in the input 1237 ; is applied to the term's result before a type that's 1238 ; farther from the term. 1239 ; Misleadingly, this reversal isn't very apparent in 1240 ; most processing of the type and unary operators. 1241 ; The segment type's shifting and masking reflects the 1242 ; reversal: while the actual operation is to shift 1243 ; right then restrict to the low word, the entry in 1244 ; this table indicates to restrict the bit mask to 1245 ; the low word then shift left. 1246 align 2, db 0 1247 typebitmasks: 0 000017C0 0001 db 0, 1b ; byte 0 000017C2 0003 db 0, 11b ; word 0 000017C4 0007 db 0, 111b ; 3byte 0 000017C6 000F db 0, 1111b ; dword 0 000017C8 000F db 0, 1111b ; pointer 0 000017CA 0003 db 0, 11b ; offset 0 000017CC 0203 db 2, 11b ; segment 1255 1256 1257 ; Dispatch table for type conversion functions. 1258 ; 1259 ; INP: bx:dx = dword input 1260 ; CF = signedness of type conversion 1261 ; ah from lahf with the same CF as current 1262 ; al = type (80h = pointer, 40h = signed) 1263 ; OUT: bx:dx = new value 1264 ; ah = type (80h = pointer, 40h = signed) 1265 ; CHG: ax 1266 ; REM: Dispatch table in section lDEBUG_CODE or lDEBUG_CODE2 1267 align 2, db 0 1268 typehandlers: 0 000017CE [9603] dw handlebyte 0 000017D0 [A103] dw handleword 0 000017D2 [8903] dw handle3byte 0 000017D4 [AC03] dw handledword 0 000017D6 [B403] dw handlepointer 0 000017D8 [A103] dw handleoffset 0 000017DA [8303] dw handlesegment 1276 1277 1278 %if _EXPRDUALCODE && _DUALCODE 1279 usesection lDEBUG_CODE2 1280 %else 1281 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 1281 ------------------ note: usesection lDEBUG_CODE 1282 %endif 1283 1284 handlesegment: section_of_function 0 00004100 89DA mov dx, bx 0 00004102 30E4 xor ah, ah ; NC, ah = 0 0 00004104 EB18 jmp short handleword 1288 handleoffset equ handleword 1289 1290 handle3byte: section_of_function 0 00004106 B700 mov bh, 0 0 00004108 7307 jnc .zero ; (iff unsigned type -->) 0 0000410A 84DB test bl, bl ; signed ? 0 0000410C 7902 jns .zero_f ; no --> 0 0000410E FECF dec bh 1296 .zero_f: 0 00004110 9E sahf ; restore CF 1298 .zero: 0 00004111 EB16 jmp handledword 1300 1301 handlebyte: section_of_function 0 00004113 B600 mov dh, 0 0 00004115 7307 jnc .zero ; (iff unsigned type -->) 0 00004117 84D2 test dl, dl ; signed ? 0 00004119 7902 jns .zero_f ; no --> 0 0000411B FECE dec dh 1307 .zero_f: 0 0000411D 9E sahf ; restore CF 1309 .zero: 1310 handleword: section_of_function 0 0000411E BB0000 mov bx, 0 0 00004121 7306 jnc .zero ; (iff unsigned type -->) 0 00004123 85D2 test dx, dx ; signed ? 0 00004125 7901 jns .zero_f ; no --> 0 00004127 4B dec bx 1316 .zero_f: 0 00004128 9E sahf ; restore CF 1318 .zero: 1319 handledword: section_of_function 0 00004129 7203 jc .signed ; if signed --> 0 0000412B 30E4 xor ah, ah ; return pointer=0 signed=0 0 0000412D C3 retn 1323 1324 .signed: 0 0000412E B440 mov ah, 40h ; return pointer=0 signed=1 0 00004130 C3 retn 1327 1328 handlepointer: section_of_function 0 00004131 B480 mov ah, 80h ; return pointer=1 signed=0 0 00004133 C3 retn 1331 1332 1333 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 1333 ------------------ note: usesection lDEBUG_DATA_ENTRY 1334 1335 ; List of binary and unary operators. 1336 ; The order has to match that in the respective 1337 ; operator handler dispatch table below. 1338 align 2, db 0 1339 operators: 0 000017DC 15006F4F6141785863 .: countedw "oOaAxXcC?","+-*/%<>=!|&^" 0 000017E5 433F2B2D2A2F253C3E 0 000017EE 3D217C265E 1341 .amount: equ $ - . - 2 0 000017F3 00 align 2, db 0 1343 unaryoperators: 0 000017F4 05002B2D7E213F .: countedw "+-~!?" 1345 .amount: equ $ - . - 2 1346 1347 1348 ; Dispatch table for unary operators, 1349 ; used by getexpression. 1350 ; Functions in this table are called with: 1351 ; 1352 ; INP: bx:dx = number 1353 ; ah = type 1354 ; OUT: bx:dx = result 1355 ; ah = type 1356 ; CHG: - 1357 ; REM: Dispatch table in section lDEBUG_CODE or lDEBUG_CODE2 0 000017FB 00 align 2, db 0 1359 unaryoperatorhandlers: 1360 .: 0 000017FC [CA03] dw uoh_plus ; + 0 000017FE [C003] dw uoh_minus ; - 0 00001800 [CB03] dw uoh_not_bitwise ; ~ 0 00001802 [D203] dw uoh_not_boolean ; ! 0 00001804 [B703] dw uoh_abs ; ? 1366 .amount: equ ($ - .) / 2 1367 %if .amount != unaryoperators.amount 1368 %error String and table mismatch 1369 %endif 1370 1371 1372 %if _EXPRDUALCODE && _DUALCODE 1373 usesection lDEBUG_CODE2 1374 %else 1375 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 1375 ------------------ note: usesection lDEBUG_CODE 1376 %endif 1377 1378 uoh_abs: section_of_function 0 00004134 80E4BF and ah, ~ 40h ; make type signed=0 0 00004137 F6C780 test bh, 80h ; negative ? 0 0000413A 7504 jnz calculate_minus_bxdx; yes --> 0 0000413C C3 retn ; no, done 1383 1384 uoh_minus: section_of_function 0 0000413D 80CC40 or ah, 40h ; make type signed=1 1386 calculate_minus_bxdx: section_of_function 0 00004140 F7DB neg bx 0 00004142 F7DA neg dx 0 00004144 83DB00 sbb bx, byte 0 ; neg bx:dx 1390 uoh_plus: section_of_function ; (nop) 0 00004147 C3 retn 1392 1393 uoh_not_bitwise: section_of_function 0 00004148 B400 mov ah, 0 ; make type pointer=0 signed=0 0 0000414A F7D3 not bx 0 0000414C F7D2 not dx 0 0000414E C3 retn 1398 1399 uoh_not_boolean: section_of_function 0 0000414F B400 mov ah, 0 ; make type pointer=0 signed=0 0 00004151 E8CA01 nearcall toboolean 0 00004154 80F201 xor dl, 1 ; toggle only bit 0 0 00004157 C3 retn 1404 1405 1406 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 1406 ------------------ note: usesection lDEBUG_DATA_ENTRY 1407 1408 ; Word table operatordispatchers: order as in string operators 1409 ; Pointed functions dispatch depending on operator characters 1410 ; Return: operator index, 0 = invalid 1411 1412 ; Word table operator_default_indexes: order as in string operators 1413 ; Default INP:bx for operator dispatchers functions. 1414 ; This is used to optimise the operator dispatchers. 1415 1416 ; Word table operator_default_strings: order as in string operators 1417 ; Default INP:dx for operator dispatchers functions. 1418 ; This is used to optimise the operator dispatchers. 1419 1420 ; Operator index (byte): 1421 ; 0 = invalid, no operator found 1422 ; 1.. = 1-based index in byte table operatorprecedences 1423 ; = 1-based index in word table operatorfunctions 1424 ; = 1-based index in word table operatornames 1425 1426 %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 0 0000179C ?? OPPREC_INVALID: resb 1 0 0000179D ?? OPPREC_COND: resb 1 0 0000179E ?? OPPREC_BOOL_OR: resb 1 0 0000179F ?? OPPREC_BOOL_XOR:resb 1 0 000017A0 ?? OPPREC_BOOL_AND:resb 1 0 000017A1 ?? OPPREC_COMPARE: resb 1 0 000017A2 ?? OPPREC_BIT_OR: resb 1 0 000017A3 ?? OPPREC_BIT_XOR: resb 1 0 000017A4 ?? OPPREC_BIT_AND: resb 1 0 000017A5 ?? OPPREC_BIT_CLR: resb 1 0 000017A6 ?? OPPREC_SHIFT: resb 1 0 000017A7 ?? OPPREC_ADDSUB: resb 1 0 000017A8 ?? OPPREC_MULDIV: resb 1 0 000017A9 ?? 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 0 0000179C ?? OPERATOR_INVALID: resb 1 ; 0 - invalid 0 0000179D ?? OPERATOR_PLUS: resb 1 ; + 0 0000179E ?? OPERATOR_MINUS: resb 1 ; - 0 0000179F ?? OPERATOR_MULTIPLY: resb 1 ; * 0 000017A0 ?? OPERATOR_DIVIDE: resb 1 ; / 0 000017A1 ?? OPERATOR_MODULO: resb 1 ; % 0 000017A2 ?? OPERATOR_POWER: resb 1 ; ** 0 000017A3 ?? OPERATOR_CMP_BELOW: resb 1 ; < 0 000017A4 ?? OPERATOR_CMP_BELOW_EQUAL: resb 1 ; <= 0 000017A5 ?? OPERATOR_CMP_ABOVE: resb 1 ; > 0 000017A6 ?? OPERATOR_CMP_ABOVE_EQUAL: resb 1 ; >= 0 000017A7 ?? OPERATOR_CMP_EQUAL: resb 1 ; == 0 000017A8 ?? OPERATOR_CMP_NOT_EQUAL: resb 1 ; != 0 000017A9 ?? OPERATOR_SHIFT_LEFT: resb 1 ; << 0 000017AA ?? OPERATOR_SHIFT_RIGHT: resb 1 ; >> 0 000017AB ?? OPERATOR_SHIFT_RIGHT_SIGNED: resb 1 ; >>> 0 000017AC ?? OPERATOR_BIT_MIRROR: resb 1 ; >< 0 000017AD ?? OPERATOR_BIT_CLR: resb 1 ; clr (bitwise AND with bitwise NOT) 0 000017AE ?? OPERATOR_BIT_OR: resb 1 ; | 0 000017AF ?? OPERATOR_BIT_XOR: resb 1 ; ^ 0 000017B0 ?? OPERATOR_BIT_AND: resb 1 ; & 0 000017B1 ?? OPERATOR_BOOL_OR: resb 1 ; || 0 000017B2 ?? OPERATOR_BOOL_XOR: resb 1 ; ^^ 0 000017B3 ?? OPERATOR_BOOL_AND: resb 1 ; && 0 000017B4 ?? OPERATOR_COND: resb 1 ; ?? :: construct (special) 0 000017B5 ?? 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). 1427 1428 1429 ; Dispatch table for (binary) expression operators, 1430 ; used by getexpression. 1431 ; Functions in this table are called with: 1432 ; INP: al = operator character (which is also implicit) 1433 ; si-> remaining line (directly) behind operator character 1434 ; bx = value from operator_default_indexes 1435 ; dx = value from operator_default_strings, 1436 ; random value if unused (the table is truncated) 1437 ; OUT: bl != 0 if a valid operator, 1438 ; bl = operator index 1439 ; si-> behind the last character belonging to the operator 1440 ; bl = 0 if no valid operator 1441 ; CHG: al, bh, dx 1442 ; REM: Dispatch table in section lDEBUG_CODE or lDEBUG_CODE2 1443 align 2, db 0 1444 operatordispatchers: 1445 .: 0 00001806 [3404] dw od_o ; o 0 00001808 [3404] dw od_o ; O 0 0000180A [3404] dw od_a ; a 0 0000180C [3404] dw od_a ; A 0 0000180E [3404] dw od_x ; x 0 00001810 [3404] dw od_x ; X 0 00001812 [3404] dw od_c ; c 0 00001814 [3404] dw od_c ; C 0 00001816 [3404] dw od_cond ; ? 1455 0 00001818 [3304] dw od_plus ; + 0 0000181A [3304] dw od_minus ; - 0 0000181C [DB03] dw od_multiply ; * ** 0 0000181E [3304] dw od_divide ; / 0 00001820 [3304] dw od_modulo ; % 0 00001822 [0204] dw od_below ; < <> <= << 0 00001824 [E303] dw od_above ; > >< >= >> >>> 0 00001826 [1504] dw od_equal ; == =< => 0 00001828 [2304] dw od_not ; != 0 0000182A [2B04] dw od_or ; | || 0 0000182C [2B04] dw od_and ; & && 0 0000182E [2B04] dw od_xor ; ^ ^^ 1468 .end: equ $ - . 1469 .amount: equ ($ - .) / 2 1470 %if .amount != operators.amount 1471 %error String and table mismatch 1472 %endif 1473 %if .amount > 100h 1474 %error Too many operator dispatchers 1475 %endif 1476 1477 1478 align 2, db 0 1479 operator_default_indexes: 1480 .: 0 00001830 1200 dw OPERATOR_BIT_OR ; o 0 00001832 1200 dw OPERATOR_BIT_OR ; O 0 00001834 1400 dw OPERATOR_BIT_AND ; a 0 00001836 1400 dw OPERATOR_BIT_AND ; A 0 00001838 1300 dw OPERATOR_BIT_XOR ; x 0 0000183A 1300 dw OPERATOR_BIT_XOR ; X 0 0000183C 1100 dw OPERATOR_BIT_CLR ; c 0 0000183E 1100 dw OPERATOR_BIT_CLR ; C 0 00001840 1800 dw OPERATOR_COND ; ? 1490 0 00001842 0100 dw OPERATOR_PLUS ; + 0 00001844 0200 dw OPERATOR_MINUS ; - 0 00001846 0300 dw OPERATOR_MULTIPLY ; * ** 0 00001848 0400 dw OPERATOR_DIVIDE ; / 0 0000184A 0500 dw OPERATOR_MODULO ; % 0 0000184C 0C00 dw OPERATOR_CMP_NOT_EQUAL ; < <> <= << 0 0000184E 0900 dw OPERATOR_CMP_ABOVE ; > >< >= >> >>> 0 00001850 0B00 dw OPERATOR_CMP_EQUAL ; == =< => 0 00001852 0C00 dw OPERATOR_CMP_NOT_EQUAL ; != 0 00001854 1200 dw OPERATOR_BIT_OR ; | || 0 00001856 1400 dw OPERATOR_BIT_AND ; & && 0 00001858 1300 dw OPERATOR_BIT_XOR ; ^ ^^ 1503 .end: equ $ - . 1504 .amount: equ ($ - .) / 2 1505 %if .amount != operators.amount 1506 %error String and table mismatch 1507 %endif 1508 %if .amount > 100h 1509 %error Too many operator dispatchers 1510 %endif 1511 1512 1513 align 2, db 0 1514 operator_default_strings: 1515 .: 0 0000185A [0000] dw msg.r ; o 0 0000185C [0000] dw msg.r ; O 0 0000185E [0000] dw msg.nd ; a 0 00001860 [0000] dw msg.nd ; A 0 00001862 [0000] dw msg.or ; x 0 00001864 [0000] dw msg.or ; X 0 00001866 [0000] dw msg.lr ; c 0 00001868 [0000] dw msg.lr ; C 0 0000186A [0000] dw msg.questionmark ; ? 1525 .end: equ $ - . 1526 .amount: equ ($ - .) / 2 1527 %if .amount > operators.amount 1528 %error String and table mismatch 1529 %endif 1530 %if .amount > 100h 1531 %error Too many operator dispatchers 1532 %endif 1533 1534 1535 operatorprecedences: 1536 .: 0 0000186C 00 db OPPREC_INVALID ; need this for some checks 0 0000186D 0B db OPPREC_ADDSUB ; + 0 0000186E 0B db OPPREC_ADDSUB ; - 0 0000186F 0C db OPPREC_MULDIV ; * 0 00001870 0C db OPPREC_MULDIV ; / 0 00001871 0C db OPPREC_MULDIV ; % 0 00001872 0D db OPPREC_POWER ; ** 0 00001873 05 db OPPREC_COMPARE ; < 0 00001874 05 db OPPREC_COMPARE ; <= 0 00001875 05 db OPPREC_COMPARE ; > 0 00001876 05 db OPPREC_COMPARE ; >= 0 00001877 05 db OPPREC_COMPARE ; == 0 00001878 05 db OPPREC_COMPARE ; != 0 00001879 0A db OPPREC_SHIFT ; << 0 0000187A 0A db OPPREC_SHIFT ; >> 0 0000187B 0A db OPPREC_SHIFT ; >>> 0 0000187C 0A db OPPREC_SHIFT ; >< 0 0000187D 09 db OPPREC_BIT_CLR ; clr 0 0000187E 06 db OPPREC_BIT_OR ; | 0 0000187F 07 db OPPREC_BIT_XOR ; ^ 0 00001880 08 db OPPREC_BIT_AND ; & 0 00001881 02 db OPPREC_BOOL_OR ; || 0 00001882 03 db OPPREC_BOOL_XOR ; ^^ 0 00001883 04 db OPPREC_BOOL_AND ; && 0 00001884 01 db OPPREC_COND ; ?? :: construct 0 00001885 0E db OPPREC_RIGHTOP ; getexpression: no number yet 1563 .amount: equ $ - . 1564 %if .amount != ops_size 1565 %error Operators table size mismatch 1566 %endif 1567 1568 1569 ; REM: Dispatch table in section lDEBUG_CODE or lDEBUG_CODE2 1570 align 2, db 0 1571 operatorfunctions: 1572 .: 0 00001886 [0000] dw error_expr ; should not be called 0 00001888 [5D04] dw of_plus ; + 0 0000188A [5A04] dw of_minus ; - 0 0000188C [6A04] dw of_multiply ; * 0 0000188E [9004] dw of_divide ; / 0 00001890 [3A04] dw of_modulo ; % 0 00001892 [2A05] dw of_power ; ** 0 00001894 [8305] dw of_compare_below ; < 0 00001896 [7D05] dw of_compare_below_equal ; <= 0 00001898 [9B05] dw of_compare_above ; > 0 0000189A [9505] dw of_compare_above_equal ; >= 0 0000189C [8F05] dw of_compare_equal ; == 0 0000189E [8905] dw of_compare_not_equal ; != 0 000018A0 [D605] dw of_shift_left ; << 0 000018A2 [BE05] dw of_shift_right ; >> 0 000018A4 [CA05] dw of_shift_right_signed ; >>> 0 000018A6 [FD05] dw of_bit_mirror ; >< 0 000018A8 [5A06] dw of_clr_bitwise ; clr 0 000018AA [4806] dw of_or_bitwise ; | 0 000018AC [6F06] dw of_xor_bitwise ; ^ 0 000018AE [5E06] dw of_and_bitwise ; & 0 000018B0 [5306] dw of_or_boolean ; || 0 000018B2 [7906] dw of_xor_boolean ; ^^ 0 000018B4 [6806] dw of_and_boolean ; && 0 000018B6 [3211] dw of_cond ; ?? :: construct 0 000018B8 [AB05] dw of_rightop ; set to right operand 1599 .amount: equ ($ - .) / 2 1600 %if .amount != ops_size 1601 %error Operators table size mismatch 1602 %endif 1603 1604 1605 %if _EXPRESSION_DEBUG 1606 1607 %define OPNAMES db "" 1608 %macro opname 1.nolist 1609 %defstr %%string %1 1610 %substr %%prefix %%string 1,3 1611 %ifidni %%prefix, "of_" 1612 %substr %%string %%string 4,-1 1613 %endif 1614 %xdefine OPNAMES OPNAMES,%%name:,{asciz %%string} 1615 dw %%name 1616 %endmacro 1617 1618 %macro opnamesstrings 1-* 1619 %rep %0 1620 %1 1621 %rotate 1 1622 %endrep 1623 %endmacro 1624 1625 align 2, db 0 1626 operatornames: 1627 .: 1628 opname invalid ; invalid 1629 opname of_plus ; + 1630 opname of_minus ; - 1631 opname of_multiply ; * 1632 opname of_divide ; / 1633 opname of_modulo ; % 1634 opname of_power ; ** 1635 opname of_compare_below ; < 1636 opname of_compare_below_equal ; <= 1637 opname of_compare_above ; > 1638 opname of_compare_above_equal ; >= 1639 opname of_compare_equal ; == 1640 opname of_compare_not_equal ; != 1641 opname of_shift_left ; << 1642 opname of_shift_right ; >> 1643 opname of_shift_right_signed ; >>> 1644 opname of_bit_mirror ; >< 1645 opname of_clr_bitwise ; clr 1646 opname of_or_bitwise ; | 1647 opname of_xor_bitwise ; ^ 1648 opname of_and_bitwise ; & 1649 opname of_or_boolean ; || 1650 opname of_xor_boolean ; ^^ 1651 opname of_and_boolean ; && 1652 opname of_cond ; ?? :: construct 1653 opname right ; set to right operand 1654 .amount: equ ($ - .) / 2 1655 %if .amount != ops_size 1656 %error Operators table size mismatch 1657 %endif 1658 1659 opnamesstrings OPNAMES 1660 %endif 1661 1662 %if _EXPRDUALCODE && _DUALCODE 1663 usesection lDEBUG_CODE2 1664 %else 1665 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 1665 ------------------ note: usesection lDEBUG_CODE 1666 %endif 1667 1668 1669 od_multiply: section_of_function 0 00004158 3804 cmp byte [si], al 0 0000415A 7503 jne .ret 0 0000415C 46 inc si 0 0000415D B306 mov bl, OPERATOR_POWER 1674 .ret: 0 0000415F C3 retn 1676 1677 od_above: section_of_function 0 00004160 3804 cmp byte [si], al 0 00004162 740E je .shr 0 00004164 803C3C cmp byte [si], '<' 0 00004167 7412 je .mirror 0 00004169 803C3D cmp byte [si], '=' 0 0000416C 7542 jne od_retn 1684 .cmp_ae: 0 0000416E 46 inc si 0 0000416F B30A mov bl, OPERATOR_CMP_ABOVE_EQUAL 0 00004171 C3 retn 1688 .shr: 0 00004172 46 inc si 0 00004173 3804 cmp byte [si], al 0 00004175 B30F mov bl, OPERATOR_SHIFT_RIGHT_SIGNED 0 00004177 7404 je .inc_si 1693 %if OPERATOR_SHIFT_RIGHT_SIGNED - 1 != OPERATOR_SHIFT_RIGHT 1694 %error Unexpected layout 1695 %endif 0 00004179 4B dec bx ; = OPERATOR_SHIFT_RIGHT 0 0000417A C3 retn 1698 .mirror: 0 0000417B B310 mov bl, OPERATOR_BIT_MIRROR 1700 .inc_si: 0 0000417D 46 inc si 0 0000417E C3 retn 1703 1704 od_below: section_of_function 0 0000417F 3804 cmp byte [si], al 0 00004181 740C je .shl 0 00004183 803C3E cmp byte [si], '>' 0 00004186 7408 je .ncmp ; (default index) 0 00004188 B307 mov bl, OPERATOR_CMP_BELOW 0 0000418A 803C3D cmp byte [si], '=' 0 0000418D 7521 jne short od_retn 1712 1713 .cmp_be: ; bl = OPERATOR_CMP_BELOW_EQUAL 1714 %if OPERATOR_CMP_BELOW + 1 != OPERATOR_CMP_BELOW_EQUAL 1715 %error Unexpected layout 1716 %endif 1717 .shl: ; bl = OPERATOR_SHIFT_LEFT 1718 %if OPERATOR_CMP_NOT_EQUAL + 1 != OPERATOR_SHIFT_LEFT 1719 %error Unexpected layout 1720 %endif 0 0000418F 43 inc bx 1722 .ncmp: 1723 od_not.ncmp: 1724 od_equal.inc_si: 0 00004190 46 inc si 0 00004191 C3 retn 1727 1728 od_equal: section_of_function 0 00004192 803C3E cmp byte [si], '>' 0 00004195 74D7 je od_above.cmp_ae 0 00004197 803C3C cmp byte [si], '<' 0 0000419A 74F3 je od_below.cmp_be 0 0000419C 3804 cmp byte [si], al 0 0000419E 74F0 je .inc_si 1735 ; no valid operator 1736 ; fall through, next cmp is also a mismatch 1737 1738 od_not: section_of_function 0 000041A0 803C3D cmp byte [si], '=' 0 000041A3 74EB je .ncmp ; (default index) 1741 od_equal.invalid: 1742 od_string_common.invalid: 0 000041A5 B300 mov bl, OPERATOR_INVALID 0 000041A7 C3 retn 1745 1746 od_or: section_of_function 1747 od_and: section_of_function 1748 od_xor: section_of_function 0 000041A8 3804 cmp byte [si], al 0 000041AA 7504 jne od_retn 0 000041AC 46 inc si 1752 %if OPERATOR_BOOL_XOR - OPERATOR_BIT_XOR != OPERATOR_BOOL_AND - OPERATOR_BIT_AND 1753 %error Unexpected layout 1754 %endif 1755 %if OPERATOR_BOOL_XOR - OPERATOR_BIT_XOR != OPERATOR_BOOL_OR - OPERATOR_BIT_OR 1756 %error Unexpected layout 1757 %endif 0 000041AD 80C303 add bl, OPERATOR_BOOL_XOR - OPERATOR_BIT_XOR 1759 1760 od_minus: section_of_function 1761 od_plus: section_of_function 1762 od_divide: section_of_function 1763 od_modulo: section_of_function 1764 od_retn: section_of_function 0 000041B0 C3 retn 1766 1767 od_cond: section_of_function 1768 od_o: section_of_function 1769 od_a: section_of_function 1770 od_x: section_of_function 1771 od_c: section_of_function 1772 od_string_common: section_of_function 0 000041B1 E8[0000] nearcall isstring? 0 000041B4 75EF jne .invalid 0 000041B6 C3 retn 1776 1777 1778 ; (Binary) Expression operator functions, 1779 ; used by getexpression. 1780 ; These functions are called with: 1781 ; INP: dword [hhvar] = previous number (left-hand operand) 1782 ; byte [hhtype] = previous type 1783 ; bx:dx = following number (right-hand operand) 1784 ; ah = following type 1785 ; OUT: bx:dx = result 1786 ; ah = type 1787 ; CHG: ax, cx 1788 ; Note: Errors (divisor zero) are currently simply handled 1789 ; by jumping to "error". 1790 ; getexpression mustn't be called after until hhvar is 1791 ; no longer used, as the call might overwrite hhvar. 1792 ; 1793 ; Type info (in ah and b[hhtype]) appears to be correctly 1794 ; passed to here already. However, how should that be used? 1795 ; 1796 ; Quite simply, doing any arithmetic on two unsigned numbers 1797 ; could return the smallest possible unsigned type (so that 1798 ; if the result is <= 255 then the type is 1, if <= 65536 1799 ; then the type is 2, else the type is 4). 1800 ; 1801 ; Handling two signed numbers here might be equally simple: 1802 ; if the result is >= -128 && <= 127 then the type is 81h, 1803 ; if the result is >= -32768 && <= 32767 then the type is 1804 ; 82h, otherwise the type is 84h. Have to look into this. 1805 ; (How does this interact with the unsignedness of the 1806 ; actual computations?) 1807 ; 1808 ; It gets hairy when one operand is signed and the other 1809 ; isn't; generally, two sub-cases of this exist: first, the 1810 ; signed operand is positive, second, the signed operand is 1811 ; negative. (Whether this distinction actually makes sense 1812 ; for the implementation is still to be determined.) 1813 ; Possible models: 1814 ; * Result is always signed. 1815 ; * Result is always unsigned(?!). 1816 ; * Result is treated as signed, but if it's positive its 1817 ; type is changed to unsigned. 1818 ; 1819 ; It is also possible that operators could be handled 1820 ; differently, for example, (some) bit and boolean 1821 ; operators could imply unsigned operands in any case. 1822 ; (>>> obviously implies a signed left operand already.) 1823 ; 1824 ; Note that (signed) negative bit shifting counts could 1825 ; imply reversing the operation; << becomes >> and such. 1826 ; 1827 ; Note that for the addition of, for example, bit rotation, 1828 ; it would be useful to retain the originally used type 1829 ; inside getdword. At the end of getdword, the current bit 1830 ; counting could be changed to use the "signed" bit of the 1831 ; types and then determine which signed or unsigned type is 1832 ; large enough to hold the value. (It might already work 1833 ; mostly like that.) (Is this specifically about binary 1834 ; operators? - No. In fact, binary operators are the most 1835 ; likely to be (one of) the syntactic element(s) which 1836 ; should change (and possible 'optimize') types. - Then 1837 ; this might still apply to unary operators, and brackets 1838 ; and parentheses. In particular, the later should call 1839 ; a different entry or instruct getdword not to optimize 1840 ; the type at the end so as to retain it. - Although in 1841 ; cases where that matters, the parentheses are arguably 1842 ; unnecessary, aren't they?) 1843 ; 1844 ; It has to be decided whether there should be implicit 1845 ; dispatching based on the operands' types' signedness. 1846 ; For example, currently (with all operands being implied 1847 ; to be unsigned) there exist >> and >>>, and there could 1848 ; exist > and S>. With implicit signedness dispatching, the 1849 ; behaviour of >> would change: it would expose the current 1850 ; >>'s behaviour with an unsigned (left) operand, and the 1851 ; current >>>'s behaviour with a signed (left) operand. 1852 ; (Either U(nsigned)>> and S(igned)>> operators could then 1853 ; exist, which would imply an unsigned or signed left 1854 ; operand respectively, or the affected operands' signedness 1855 ; could be changed with the currently available prefix or 1856 ; possible new postfix unary operators. 1857 of_modulo: section_of_function 0 000041B7 FF36[660B] push word [hhvar+2] 0 000041BB FF36[640B] push word [hhvar] 0 000041BF 53 push bx 0 000041C0 52 push dx 0 000041C1 E86D00 call of_divide.no_hh_div; bx:dx := prev / foll 0 000041C4 8F06[640B] pop word [hhvar] 0 000041C8 8F06[660B] pop word [hhvar+2] 0 000041CC E81800 nearcall of_multiply ; bx:dx := (prev / foll) * foll 0 000041CF 8F06[640B] pop word [hhvar] 0 000041D3 8F06[660B] pop word [hhvar+2] 1868 ; jmp short of_minus ; bx:dx := prev - ((prev / foll) * foll) 1869 1870 of_minus: section_of_function 0 000041D7 E866FF nearcall calculate_minus_bxdx 1872 of_plus: section_of_function 0 000041DA 0316[640B] add dx, word [hhvar] 0 000041DE 131E[660B] adc bx, word [hhvar+2] 1875 or_hhtype: section_of_function 0 000041E2 0A26[750B] or ah, byte [hhtype] 0 000041E6 C3 retn 1878 1879 of_multiply: section_of_function; bx:dx := var * bx:dx 0 000041E7 0826[750B] or byte [hhtype], ah 0 000041EB 57 push di ; di is used as temporary storage 0 000041EC 89D0 mov ax, dx ; low word 0 000041EE 50 push ax ; save low word 0 000041EF F726[640B] mul word [hhvar] ; low * low 0 000041F3 97 xchg di, ax ; di = low word result, clobber ax 0 000041F4 58 pop ax 0 000041F5 53 push bx 0 000041F6 89D3 mov bx, dx ; bx = high word result 1 0 000041F8 F726[660B] mul word [hhvar+2] ; low * high 0 000041FC 01C3 add bx, ax ; bx = high word result 1 plus low * high 0 000041FE 58 pop ax ; high word 0 000041FF F726[640B] mul word [hhvar] 0 00004203 01C3 add bx, ax ; bx = high word result 1894 ; bx*[hhvar+2] not required, completely overflows 0 00004205 89FA mov dx, di ; dx = low word result 0 00004207 5F pop di ; restore those 1897 set_hhtype: section_of_function 0 00004208 8A26[750B] mov ah, byte [hhtype] 0 0000420C C3 retn 1900 1901 of_divide: section_of_function ; bx:dx := var / bx:dx 1902 %if _HHDIVREMAIN 0 0000420D 833E[700B]01 cmp word [hh_depth], 1 0 00004212 751D jne @F 0 00004214 C606[760B]FF mov byte [hh_div_active], -1 0 00004219 8916[6C0B] mov word [hh_div_divisor], dx 0 0000421D 891E[6E0B] mov word [hh_div_divisor + 2], bx 0 00004221 FF36[660B] push word [hhvar + 2] 0 00004225 FF36[640B] push word [hhvar] 0 00004229 8F06[680B] pop word [hh_div_dividend] 0 0000422D 8F06[6A0B] pop word [hh_div_dividend + 2] 1912 @@: 1913 %endif 1914 .no_hh_div: 0 00004231 0826[750B] or byte [hhtype], ah 0 00004235 53 push bx 0 00004236 09D3 or bx, dx ; divisor zero ? 0 00004238 5B pop bx 0 00004239 7448 jz short .error ; divisor zero ! 0 0000423B EB49 _386_jmps .32 ; 386, use 32-bit code --> 1921 %ifn _ONLY386 0 0000423D 85DB test bx, bx ; need only 16-bit divisor ? 0 0000423F 7512 jnz .difficultdiv16 ; nope --> 0 00004241 89D1 mov cx, dx 0 00004243 31D2 xor dx, dx 0 00004245 A1[660B] mov ax, word [hhvar+2] ; dx:ax = high word of previous number 0 00004248 F7F1 div cx 0 0000424A 93 xchg bx, ax ; bx = ax, clobber ax 0 0000424B A1[640B] mov ax, word [hhvar] ; ax = low word of previous number, dx = remainder 0 0000424E F7F1 div cx 0 00004250 92 xchg dx, ax ; bx:dx = result, clobber ax 0 00004251 EBB5 jmp set_hhtype 1933 1934 .difficultdiv16: ; code adapted from Art of Assembly chapter 9 1935 ; refer to http://www.plantation-productions.com/Webster/www.artofasm.com/DOS/ch09/CH09-4.html#HEADING4-99 0 00004253 B92000 mov cx, 32 0 00004256 55 push bp 0 00004257 56 push si 0 00004258 57 push di 0 00004259 A1[640B] mov ax, word [hhvar] 0 0000425C 8B2E[660B] mov bp, word [hhvar+2] ; bp:ax = previous number 0 00004260 31FF xor di, di 0 00004262 31F6 xor si, si ; clear variable si:di 0 00004264 92 xchg ax, dx 0 00004265 87EB xchg bp, bx ; bx:dx = previous number, bp:ax = divisor 1946 .bitloop: 0 00004267 D1E2 shl dx, 1 0 00004269 D1D3 rcl bx, 1 0 0000426B D1D7 rcl di, 1 0 0000426D D1D6 rcl si, 1 ; si:di:bx:dx << 1 0 0000426F 39EE cmp si, bp ; does the divisor fit into si:di here ? 0 00004271 7502 jne @F 0 00004273 39C7 cmp di, ax 1954 @@: 0 00004275 7205 jb .trynext ; no --> 1956 .goesinto: 0 00004277 29C7 sub di, ax 0 00004279 19EE sbb si, bp ; subtract divisor 0 0000427B 42 inc dx ; set a bit of the result (bit was zero before, never carries) 1960 .trynext: 0 0000427C E2E9 loop .bitloop ; loop for 32 bits 0 0000427E 5F pop di 0 0000427F 5E pop si 0 00004280 5D pop bp 0 00004281 EB85 jmp set_hhtype 1966 %endif 1967 1968 .error: 0 00004283 E9[0000] jmp error_expr 1970 1971 %ifn _ONLYNON386 1972 .32: 1973 [cpu 386] 0 00004286 6650 push eax 0 00004288 6653 push ebx 0 0000428A 6652 push edx ; to preserve the high words 0 0000428C 53 push bx 0 0000428D 52 push dx 0 0000428E 665B pop ebx ; ebx = following number 0 00004290 6631D2 xor edx, edx 0 00004293 66A1[640B] mov eax, dword [hhvar] ; edx:eax = previous number 0 00004297 66F7F3 div ebx 0 0000429A 665A pop edx 0 0000429C 665B pop ebx ; restore high words 0 0000429E 6650 push eax 0 000042A0 5A pop dx 0 000042A1 5B pop bx ; bx:dx = result 0 000042A2 6658 pop eax ; restore high word of eax 1989 __CPU__ 0 000042A4 E961FF jmp set_hhtype 1991 %endif 1992 1993 1994 of_power: section_of_function 0 000042A7 0826[750B] or byte [hhtype], ah 0 000042AB 89D9 mov cx, bx 0 000042AD 89D0 mov ax, dx ; get exponent 0 000042AF 09D3 or bx, dx ; exponent zero ? 0 000042B1 BB0000 mov bx, 0 0 000042B4 BA0100 mov dx, 1 0 000042B7 743E jz .ret ; yes, return with result as 1 --> 0 000042B9 3916[640B] cmp word [hhvar], dx ; optimization: 0 000042BD 7506 jne .notone 0 000042BF 391E[660B] cmp word [hhvar+2], bx 0 000042C3 7432 je .ret ; if base is one (and exponent not zero), result is 1 --> 2006 .notone: 0 000042C5 55 push bp 2008 2009 .loop: ; cx:ax non-zero here 0 000042C6 D1E9 shr cx, 1 0 000042C8 D1D8 rcr ax, 1 ; exponent /= 2 0 000042CA 50 push ax 0 000042CB 51 push cx 0 000042CC 7303 jnc .even ; if exponent was even --> 0 000042CE E816FF nearcall of_multiply ; var *= base 2016 .even: 2017 ; In the last iteration, cx:ax might be zero here 2018 ; making the next call unnecessary. Oh well. 0 000042D1 53 push bx 0 000042D2 52 push dx 0 000042D3 8B1E[660B] mov bx, word [hhvar+2] 0 000042D7 8B16[640B] mov dx, word [hhvar] ; base 0 000042DB E809FF nearcall of_multiply ; * base = base squared 0 000042DE 891E[660B] mov word [hhvar+2], bx 0 000042E2 8916[640B] mov word [hhvar], dx ; store as new base 0 000042E6 5A pop dx 0 000042E7 5B pop bx 0 000042E8 59 pop cx 0 000042E9 58 pop ax 2030 0 000042EA 89DD mov bp, bx ; optimization: 0 000042EC 09D5 or bp, dx ; register now zero ? 0 000042EE 7406 jz .ret_bp ; if so, return now --> (multiplying zero always results in zero) 0 000042F0 89CD mov bp, cx 0 000042F2 09C5 or bp, ax ; exponent now zero ? 0 000042F4 75D0 jnz .loop ; no, loop --> 2037 2038 .ret_bp: 0 000042F6 5D pop bp 2040 .ret: 0 000042F7 E90EFF jmp set_hhtype 2042 2043 of_compare_below_equal: section_of_function 0 000042FA E82C00 nearcall of_helper_compare 0 000042FD 7628 jbe of_helper_compare_true 0 000042FF C3 retn 2047 2048 of_compare_below: section_of_function 0 00004300 E82600 nearcall of_helper_compare 0 00004303 7222 jb of_helper_compare_true 0 00004305 C3 retn 2052 2053 of_compare_not_equal: section_of_function 0 00004306 E82000 nearcall of_helper_compare 0 00004309 751C jne of_helper_compare_true 0 0000430B C3 retn 2057 2058 of_compare_equal: section_of_function 0 0000430C E81A00 nearcall of_helper_compare 0 0000430F 7416 je of_helper_compare_true 0 00004311 C3 retn 2062 2063 of_compare_above_equal: section_of_function 0 00004312 E81400 nearcall of_helper_compare 0 00004315 7310 jae of_helper_compare_true 0 00004317 C3 retn 2067 2068 of_compare_above: section_of_function 0 00004318 E80E00 nearcall of_helper_compare 0 0000431B 770A ja of_helper_compare_true 0 0000431D C3 retn 2072 2073 2074 ; Called by operator functions to convert a number to boolean 2075 ; 2076 ; INP: bx:dx 2077 ; OUT: dx = 0 or 1 2078 ; bx = 0 2079 ; ZF 2080 toboolean: section_of_function 0 0000431E 09D3 or bx, dx ; = 0 iff it was 0000_0000h 0 00004320 83FB01 cmp bx, byte 1 ; CY iff it was 0000_0000h, else NC 0 00004323 19D2 sbb dx, dx ; -1 iff it was 0000_0000h, else 0 0 00004325 31DB xor bx, bx 2085 2086 ; INP: dx 2087 ; OUT: dx += 1 2088 of_helper_compare_true: section_of_function 0 00004327 42 inc dx ; bx:dx = 0 iff it was 0000_0000h, else 1 2090 2091 ; Dummy operator computation function, 2092 ; used when setting a register without operator (rr) 2093 ; and to initialize the first getexpression loop iteration 2094 ; INP: dword [hhvar] = previous number (left-hand operand) 2095 ; byte [hhtype] = previous type 2096 ; bx:dx = following number (right-hand operand) 2097 ; ah = following type 2098 ; OUT: bx:dx = result (right-hand operand) 2099 ; ah = type 2100 ; CHG: ax, cx 2101 of_rightop: section_of_function 0 00004328 C3 retn 2103 2104 2105 ; Called by operator functions to compare operands 2106 ; 2107 ; INP: dword [hhvar], byte [hhtype] 2108 ; bx:dx, ah 2109 ; OUT: Flags as for "cmp d[hhvar], bxdx" 2110 ; bx:dx = 0 2111 ; ah = 0 2112 of_helper_compare: section_of_function 0 00004329 30E4 xor ah, ah ; type signed=0 pointer=0 0 0000432B 391E[660B] cmp word [hhvar+2], bx 0 0000432F 7504 jne .ret 0 00004331 3916[640B] cmp word [hhvar], dx 2117 .ret: 0 00004335 BB0000 mov bx, 0 0 00004338 89DA mov dx, bx ; set both to zero (without affecting flags) 0 0000433A C3 retn 2121 2122 of_shift_right: section_of_function 0 0000433B 30E4 xor ah, ah 0 0000433D E81F00 nearcall of_helper_getshiftdata 2125 .loop: 0 00004340 D1EB shr bx, 1 0 00004342 D1DA rcr dx, 1 0 00004344 E2FA loop .loop 0 00004346 C3 retn 2130 2131 of_shift_right_signed: section_of_function 0 00004347 B440 mov ah, 40h 0 00004349 E81300 nearcall of_helper_getshiftdata 2134 .loop: 0 0000434C D1FB sar bx, 1 0 0000434E D1DA rcr dx, 1 0 00004350 E2FA loop .loop 0 00004352 C3 retn 2139 2140 of_shift_left: section_of_function 0 00004353 30E4 xor ah, ah 0 00004355 E80700 nearcall of_helper_getshiftdata 2143 .loop: 0 00004358 D1E2 shl dx, 1 0 0000435A D1D3 rcl bx, 1 0 0000435C E2FA loop .loop 0 0000435E C3 retn 2148 2149 ; Called by operator functions to get shift data 2150 ; 2151 ; This returns to the next caller with the unchanged input 2152 ; operand if the shift count is zero. Otherwise, large shift 2153 ; counts are normalized so the returned value in cx is not 2154 ; zero and not higher than 32. This normalization is not just 2155 ; an optimization, it's required for shift counts that don't 2156 ; fit into a 16-bit counter. 2157 ; 2158 ; INP: bx:dx = shift count 2159 ; OUT: bx:dx = input operand 2160 ; If shift count is >= 1 and <= 32, 2161 ; cx = shift count 2162 ; If shift count is > 32, 2163 ; cx = 32 2164 ; If shift count is zero, 2165 ; discards one near return address before returning 2166 ; CHG: cx 2167 of_helper_getshiftdata: section_of_function 0 0000435F 89D1 mov cx, dx 0 00004361 85DB test bx, bx 0 00004363 7505 jnz .largeshift 0 00004365 83FA20 cmp dx, byte 32 0 00004368 7203 jb .normalshift 2173 .largeshift: 0 0000436A B92000 mov cx, 32 ; fix at maximal shift count 2175 .normalshift: 0 0000436D 8B16[640B] mov dx, word [hhvar] 0 00004371 8B1E[660B] mov bx, word [hhvar+2] 0 00004375 E301 jcxz .break ; shift count zero, return input --> 0 00004377 C3 retn 2180 2181 .break: 0 00004378 59 pop cx ; discard near return address 0 00004379 C3 retn 2184 2185 of_bit_mirror: section_of_function 0 0000437A 30E4 xor ah, ah 0 0000437C 89D1 mov cx, dx 0 0000437E 85DB test bx, bx 0 00004380 7505 jnz .large 0 00004382 83FA40 cmp dx, byte 64 0 00004385 7205 jb .normal 2192 .large: 0 00004387 31DB xor bx, bx ; mirror count 64 or higher: 0 00004389 31D2 xor dx, dx ; all 32 bits mirrored with (nonexistent) zero bits 0 0000438B C3 retn 2196 .normal: 0 0000438C 8B16[640B] mov dx, word [hhvar] 0 00004390 8B1E[660B] mov bx, word [hhvar+2] 0 00004394 80F901 cmp cl, 1 0 00004397 762B jbe .ret ; mirror count one or zero, return input --> 0 00004399 56 push si 0 0000439A 57 push di 2203 0 0000439B 51 push cx 0 0000439C BFFFFF mov di, -1 0 0000439F 89FE mov si, di 2207 .loopmask: 0 000043A1 D1E7 shl di, 1 0 000043A3 D1D6 rcl si, 1 0 000043A5 E2FA loop .loopmask ; create mask of bits not involved in mirroring 0 000043A7 21DE and si, bx 0 000043A9 21D7 and di, dx ; get the uninvolved bits 0 000043AB 59 pop cx 2214 0 000043AC 56 push si 0 000043AD 57 push di ; save them 0 000043AE 31F6 xor si, si 0 000043B0 31FF xor di, di ; initialize mirrored register 2219 .loop: 0 000043B2 D1EB shr bx, 1 0 000043B4 D1DA rcr dx, 1 ; shift out of original register's current LSB 0 000043B6 D1D7 rcl di, 1 0 000043B8 D1D6 rcl si, 1 ; into other register's current LSB 0 000043BA E2F6 loop .loop 0 000043BC 5A pop dx 0 000043BD 5B pop bx ; restore uninvolved bits 0 000043BE 09F3 or bx, si 0 000043C0 09FA or dx, di ; combine with mirrored bits 2229 0 000043C2 5F pop di 0 000043C3 5E pop si 2232 .ret: 0 000043C4 C3 retn 2234 2235 of_or_bitwise: section_of_function 0 000043C5 0B16[640B] or dx, word [hhvar] 0 000043C9 0B1E[660B] or bx, word [hhvar+2] ; bitwise or 2238 or_hhtype_1: section_of_function 0 000043CD E912FE jmp or_hhtype 2240 2241 of_or_boolean: section_of_function 0 000043D0 E82B00 nearcall of_helper_getbool 0 000043D3 09DA or dx, bx ; boolean or 0 000043D5 EB24 jmp short of_helper_retbool 2245 2246 of_clr_bitwise: section_of_function 0 000043D7 F7D3 not bx 0 000043D9 F7D2 not dx 2249 2250 of_and_bitwise: section_of_function 0 000043DB 2316[640B] and dx, word [hhvar] 0 000043DF 231E[660B] and bx, word [hhvar+2] ; bitwise and 0 000043E3 EBE8 jmp or_hhtype_1 2254 2255 of_and_boolean: section_of_function 0 000043E5 E81600 nearcall of_helper_getbool 0 000043E8 21DA and dx, bx ; boolean and 0 000043EA EB0F jmp short of_helper_retbool 2259 2260 of_xor_bitwise: section_of_function 0 000043EC 3316[640B] xor dx, word [hhvar] 0 000043F0 331E[660B] xor bx, word [hhvar+2] ; bitwise xor 0 000043F4 EBD7 jmp or_hhtype_1 2264 2265 of_xor_boolean: section_of_function 0 000043F6 E80500 nearcall of_helper_getbool 0 000043F9 31DA xor dx, bx ; boolean xor 2268 of_helper_retbool: section_of_function 0 000043FB 31DB xor bx, bx ; high word always zero 0 000043FD C3 retn 2271 2272 ; Called by operator functions to convert operands to boolean 2273 ; 2274 ; INP: bx:dx = next number, ah = type 2275 ; [hhvar] = previous number, [hhtype] = type 2276 ; OUT: bx = next number's boolean value 2277 ; dx = previous number's boolean value 2278 ; ah = 0 2279 of_helper_getbool: section_of_function 0 000043FE 30E4 xor ah, ah 0 00004400 E81BFF nearcall toboolean 0 00004403 52 push dx 0 00004404 8B16[640B] mov dx, word [hhvar] 0 00004408 8B1E[660B] mov bx, word [hhvar+2] 0 0000440C E80FFF nearcall toboolean 0 0000440F 5B pop bx 0 00004410 C3 retn 2288 2289 2290 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 2290 ------------------ note: usesection lDEBUG_DATA_ENTRY 2291 2292 isvariable_data: 0 000018BA 1F reverselfsrtop: db 1Fh 2294 2295 %if _DEBUG3 2296 align 8, db 0 2297 kregs: dd 0 2298 dd 1 2299 dd 0aa55aa55h 2300 dd -1 2301 times 12 dd 0 2302 %endif 2303 0 000018BB 00 align 4, db 0 0 000018BC 02000000 lfsr: dd 2 0 000018C0 01000000 reverselfsr: dd 1 0 000018C4 03002080 lfsrtap: dd 8020_0003h 2308 %if _SLEEP_NEW 0 000018C8 0000 getc_repeat_idle: dw 0 0 000018CA 0000 sleep_repeat_idle: dw 0 0 000018CC 0000 sleep_highest_delta: dw 0 0 000018CE 0500 sleep_delta_limit: dw 5 2313 %endif 2314 %if _COUNT || _SCOUNT 0 000018D0 00000000 count_var: dd 0 2316 %endif 2317 %if _RH 0 000018D4 0000 rhcount: dw 0 2319 %endif 2320 2321 2322 ; REM: Dispatch table in section lDEBUG_CODE or lDEBUG_CODE2 2323 align 2, db 0 2324 isvariable_struc_list: 2325 2326 %assign IVS_ONEBYTE 1 2327 isvariable_struc_onebyte_list: 2328 ; name, size, flags, address, array last index, array skip 0 000018D6 00003000[0000] isvariablestruc "V", 4, 0, vregs, VREGSAMOUNT - 1 0 000018DC [E00A]FF00 2330 %if _DEBUG3 2331 isvariablestruc "K", 4, 0, kregs, 15 2332 %endif 2333 isvariable_struc_onebyte_list_end: 2334 2335 %assign IVS_ONEBYTE 0 2336 isvariable_struc_morebyte_list: 2337 2338 %if _EXTENSIONS && _EXT_VARIABLES 2339 ext_var: 2340 ext_var_amount equ _EXT_VARIABLES 2341 ext_var_format equ 1 2342 ext_var_size equ ISVARIABLESTRUC_size 2343 %rep _EXT_VARIABLES 2344 istruc ISVARIABLESTRUC 2345 at ivName, dw 0 2346 at ivFlags, dw 0 2347 at ivAddress, dw 0 2348 at ivSetup, dw var_ext_setup 2349 at ivArrayLast, db 0 2350 at ivArrayBetween, db 0 2351 iend 2352 %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2353 %endrep 2344 <1> istruc ISVARIABLESTRUC 0 000018E0 0000 at ivName, dw 0 0 000018E2 0000 at ivFlags, dw 0 0 000018E4 0000 at ivAddress, dw 0 0 000018E6 [9406] at ivSetup, dw var_ext_setup 0 000018E8 00 at ivArrayLast, db 0 0 000018E9 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 000018EA 0000 at ivName, dw 0 0 000018EC 0000 at ivFlags, dw 0 0 000018EE 0000 at ivAddress, dw 0 0 000018F0 [9406] at ivSetup, dw var_ext_setup 0 000018F2 00 at ivArrayLast, db 0 0 000018F3 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 000018F4 0000 at ivName, dw 0 0 000018F6 0000 at ivFlags, dw 0 0 000018F8 0000 at ivAddress, dw 0 0 000018FA [9406] at ivSetup, dw var_ext_setup 0 000018FC 00 at ivArrayLast, db 0 0 000018FD 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 000018FE 0000 at ivName, dw 0 0 00001900 0000 at ivFlags, dw 0 0 00001902 0000 at ivAddress, dw 0 0 00001904 [9406] at ivSetup, dw var_ext_setup 0 00001906 00 at ivArrayLast, db 0 0 00001907 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001908 0000 at ivName, dw 0 0 0000190A 0000 at ivFlags, dw 0 0 0000190C 0000 at ivAddress, dw 0 0 0000190E [9406] at ivSetup, dw var_ext_setup 0 00001910 00 at ivArrayLast, db 0 0 00001911 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001912 0000 at ivName, dw 0 0 00001914 0000 at ivFlags, dw 0 0 00001916 0000 at ivAddress, dw 0 0 00001918 [9406] at ivSetup, dw var_ext_setup 0 0000191A 00 at ivArrayLast, db 0 0 0000191B 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 0000191C 0000 at ivName, dw 0 0 0000191E 0000 at ivFlags, dw 0 0 00001920 0000 at ivAddress, dw 0 0 00001922 [9406] at ivSetup, dw var_ext_setup 0 00001924 00 at ivArrayLast, db 0 0 00001925 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001926 0000 at ivName, dw 0 0 00001928 0000 at ivFlags, dw 0 0 0000192A 0000 at ivAddress, dw 0 0 0000192C [9406] at ivSetup, dw var_ext_setup 0 0000192E 00 at ivArrayLast, db 0 0 0000192F 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001930 0000 at ivName, dw 0 0 00001932 0000 at ivFlags, dw 0 0 00001934 0000 at ivAddress, dw 0 0 00001936 [9406] at ivSetup, dw var_ext_setup 0 00001938 00 at ivArrayLast, db 0 0 00001939 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 0000193A 0000 at ivName, dw 0 0 0000193C 0000 at ivFlags, dw 0 0 0000193E 0000 at ivAddress, dw 0 0 00001940 [9406] at ivSetup, dw var_ext_setup 0 00001942 00 at ivArrayLast, db 0 0 00001943 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001944 0000 at ivName, dw 0 0 00001946 0000 at ivFlags, dw 0 0 00001948 0000 at ivAddress, dw 0 0 0000194A [9406] at ivSetup, dw var_ext_setup 0 0000194C 00 at ivArrayLast, db 0 0 0000194D 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 0000194E 0000 at ivName, dw 0 0 00001950 0000 at ivFlags, dw 0 0 00001952 0000 at ivAddress, dw 0 0 00001954 [9406] at ivSetup, dw var_ext_setup 0 00001956 00 at ivArrayLast, db 0 0 00001957 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001958 0000 at ivName, dw 0 0 0000195A 0000 at ivFlags, dw 0 0 0000195C 0000 at ivAddress, dw 0 0 0000195E [9406] at ivSetup, dw var_ext_setup 0 00001960 00 at ivArrayLast, db 0 0 00001961 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001962 0000 at ivName, dw 0 0 00001964 0000 at ivFlags, dw 0 0 00001966 0000 at ivAddress, dw 0 0 00001968 [9406] at ivSetup, dw var_ext_setup 0 0000196A 00 at ivArrayLast, db 0 0 0000196B 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 0000196C 0000 at ivName, dw 0 0 0000196E 0000 at ivFlags, dw 0 0 00001970 0000 at ivAddress, dw 0 0 00001972 [9406] at ivSetup, dw var_ext_setup 0 00001974 00 at ivArrayLast, db 0 0 00001975 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001976 0000 at ivName, dw 0 0 00001978 0000 at ivFlags, dw 0 0 0000197A 0000 at ivAddress, dw 0 0 0000197C [9406] at ivSetup, dw var_ext_setup 0 0000197E 00 at ivArrayLast, db 0 0 0000197F 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2354 %endif 2355 2356 %if !_LOADER 0 00001980 [EA08]1600[0000] isvariablestruc "INT8CTRL", 2, 0, intr8_limit 0 00001986 [E00A]0000 2358 %endif 0 0000198A [F008]32000000 isvariablestruc "LFSR", 4, 0, 0, 0, 0, var_lfsr_setup 0 00001990 [A606]0000 0 00001994 [F208]33000000 isvariablestruc "RLFSR", 4, 0, 0, 0, 0, var_reverselfsr_setup 0 0000199A [BC06]0000 0 0000199E [F508]3500[2801] isvariablestruc "LFSRTAP", 4, 0, lfsrtap 0 000019A4 [E00A]0000 0 000019A8 [FA08]0600[1E01] isvariablestruc "RLFSRTOP", 1, 0, reverselfsrtop 0 000019AE [E00A]0000 2363 %if _SLEEP_NEW 0 000019B2 [0009]0600[2C01] isvariablestruc "GREPIDLE", 1, 0, getc_repeat_idle 0 000019B8 [E00A]0000 0 000019BC [0609]0600[2E01] isvariablestruc "SREPIDLE", 1, 0, sleep_repeat_idle 0 000019C2 [E00A]0000 0 000019C6 [0C09]1700[3001] isvariablestruc "SMAXDELTA", 2, 0, sleep_highest_delta 0 000019CC [E00A]0000 0 000019D0 [1309]1900[3201] isvariablestruc "SDELTALIMIT", 2, 0, sleep_delta_limit 0 000019D6 [E00A]0000 2368 %endif 2369 %if !_LOADER 0 000019DA [1C09]9800[0000] isvariablestruc "DEVICESIZE", 2, ivfReadOnly, device_mcb_paragraphs 0 000019E0 [E00A]0000 0 000019E4 [2409]BA00[0000] isvariablestruc "DEVICEHEADER", 4, ivfReadOnly, device_header_address 0 000019EA [E00A]0000 2372 %endif 0 000019EE [2E09]0700[0000] isvariablestruc "DDTEXTAND", 1, 0, dd_text_and 0 000019F4 [E00A]0000 0 000019F8 [3509]8500[0000] isvariablestruc "MACHX86", 1, ivfReadOnly, machine 0 000019FE [E00A]0000 0 00001A02 [3A09]8500[0000] isvariablestruc "MACHX87", 1, ivfReadOnly, encodedmach87 0 00001A08 [E00A]0000 2376 %if !_LOADER 0 00001A0C [3F09]0100[0000] isvariablestruc "MMT", 1, 0, maxmachinetype 0 00001A12 [E00A]0000 2378 %endif 0 00001A16 [4009]3103[0000] isvariablestruc "DCO", 4, ivfArrayOneBased | ivfArrayOptional, options, 7 0 00001A1C [E00A]0700 0 00001A20 [4109]B103[0000] isvariablestruc "DCS", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, startoptions, 7 0 00001A26 [E00A]0700 0 00001A2A [4209]B103[0000] isvariablestruc "DIF", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, internalflags, 7 0 00001A30 [E00A]0700 2385 %if !_LOADER 0 00001A34 [4309]3100[0000] isvariablestruc "DAO", 4, 0, asm_options 0 00001A3A [E00A]0000 0 00001A3E [4409]B100[0000] isvariablestruc "DAS", 4, ivfReadOnly, asm_startoptions 0 00001A44 [E00A]0000 0 00001A48 [4509]B100[0000] isvariablestruc "DPI", 4, ivfReadOnly, psp22 0 00001A4E [E00A]0000 2392 %endif 0 00001A52 [4609]9100[0000] isvariablestruc "DPR", 2, ivfReadOnly, pspdbg 0 00001A58 [E00A]0000 2395 %if !_LOADER 0 00001A5C [4709]9100[0000] isvariablestruc "DPP", 2, ivfReadOnly, parent 0 00001A62 [E00A]0000 0 00001A66 [4809]B200[0000] isvariablestruc "DPRA", 4, ivfReadOnly, psp22 0 00001A6C [E00A]0000 2400 %endif 0 00001A70 [4A09]9200[0000] isvariablestruc "DPSP", 2, ivfReadOnly, pspdbg 0 00001A76 [E00A]0000 2403 %if !_LOADER 0 00001A7A [4C09]9500[0000] isvariablestruc "DPARENT", 2, ivfReadOnly, parent 0 00001A80 [E00A]0000 2406 %endif 2407 %if _PM 2408 isvariablestruc "DPS", 2, ivfReadOnly, 0, 0, 0, var_seldbg_setup 2410 isvariablestruc "DPSPSEL", 2, ivfReadOnly, 0, 0, 0, var_dpspsel_setup 2412 %else 0 00001A84 [5109]9500[0000] isvariablestruc "DPSPSEL", 2, ivfReadOnly, pspdbg 0 00001A8A [E00A]0000 2415 %endif 2416 2417 %if !_LOADER 0 00001A8E [5609]3100[0000] isvariablestruc "PPC", 4, 0, default_pp_count 0 00001A94 [E00A]0000 0 00001A98 [5709]3100[0000] isvariablestruc "TPC", 4, 0, default_tp_count 0 00001A9E [E00A]0000 0 00001AA2 [5809]3100[0000] isvariablestruc "TTC", 4, 0, default_tt_count 0 00001AA8 [E00A]0000 2421 0 00001AAC [5909]3500[0000] isvariablestruc "RELIMIT", 4, 0, re_limit 0 00001AB2 [E00A]0000 0 00001AB6 [5E09]3500[0000] isvariablestruc "RECOUNT", 4, 0, re_count 0 00001ABC [E00A]0000 2424 %endif 0 00001AC0 [6309]3500[0000] isvariablestruc "RCLIMIT", 4, 0, rc_limit 0 00001AC6 [E00A]0000 0 00001ACA [6809]3500[0000] isvariablestruc "RCCOUNT", 4, 0, rc_count 0 00001AD0 [E00A]0000 2427 0 00001AD4 [6D09]1000[0000] isvariablestruc "RC", 2, 0, priorrc 0 00001ADA [E00A]0000 0 00001ADE [6D09]1100[0000] isvariablestruc "ERC", 2, 0, erc 0 00001AE4 [E00A]0000 2430 %if !_LOADER 0 00001AE8 [6E09]0400[0000] isvariablestruc "QQCODE", 1, 0, qqtermcode 0 00001AEE [E00A]0000 0 00001AF2 [7209]1600[0000] isvariablestruc "TERMCODE", 2, 0, usertermcode 0 00001AF8 [E00A]0000 2433 %endif 2434 2435 %if _PM 2436 %assign var_addr_offset 4 2437 %else 2438 %assign var_addr_offset 2 2439 %endif 2440 2441 %if !_LOADER 0 00001AFC [7809]1100[0000] isvariablestruc "AAO", var_addr_offset, 0, a_addr 0 00001B02 [E00A]0000 0 00001B06 [7909]1100[0400] isvariablestruc "AAS", 2, 0, a_addr + saSegSel 0 00001B0C [E00A]0000 2444 %endif 0 00001B10 [7A09]1100[0000] isvariablestruc "ADO", var_addr_offset, 0, d_addr 0 00001B16 [E00A]0000 0 00001B1A [7B09]1100[0400] isvariablestruc "ADS", 2, 0, d_addr + saSegSel 0 00001B20 [E00A]0000 2447 %if !_LOADER 0 00001B24 [7C09]1100[0000] isvariablestruc "ABO", var_addr_offset, 0, behind_r_u_addr 0 00001B2A [E00A]0000 0 00001B2E [7D09]1100[0400] isvariablestruc "ABS", 2, 0, behind_r_u_addr + saSegSel 0 00001B34 [E00A]0000 0 00001B38 [7E09]1100[0000] isvariablestruc "AUO", var_addr_offset, 0, u_addr 0 00001B3E [E00A]0000 0 00001B42 [7F09]1100[0400] isvariablestruc "AUS", 2, 0, u_addr + saSegSel 0 00001B48 [E00A]0000 2452 %endif 0 00001B4C [8009]1100[0000] isvariablestruc "AEO", var_addr_offset, 0, e_addr 0 00001B52 [E00A]0000 0 00001B56 [8109]1100[0400] isvariablestruc "AES", 2, 0, e_addr + saSegSel 0 00001B5C [E00A]0000 2455 %if _DSTRINGS 0 00001B60 [8209]1100[0000] isvariablestruc "AZO", var_addr_offset, 0, dz_addr 0 00001B66 [E00A]0000 0 00001B6A [8309]1100[0400] isvariablestruc "AZS", 2, 0, dz_addr + saSegSel 0 00001B70 [E00A]0000 0 00001B74 [8409]1100[0000] isvariablestruc "ACO", var_addr_offset, 0, dcpm_addr 0 00001B7A [E00A]0000 0 00001B7E [8509]1100[0400] isvariablestruc "ACS", 2, 0, dcpm_addr + saSegSel 0 00001B84 [E00A]0000 0 00001B88 [8609]1100[0000] isvariablestruc "APO", var_addr_offset, 0, dcount_addr 0 00001B8E [E00A]0000 0 00001B92 [8709]1100[0400] isvariablestruc "APS", 2, 0, dcount_addr + saSegSel 0 00001B98 [E00A]0000 0 00001B9C [8809]1100[0000] isvariablestruc "AWO", var_addr_offset, 0, dwcount_addr 0 00001BA2 [E00A]0000 0 00001BA6 [8909]1100[0400] isvariablestruc "AWS", 2, 0, dwcount_addr + saSegSel 0 00001BAC [E00A]0000 2464 %endif 2465 %if _DX 2466 isvariablestruc "AXO", 4, 0, x_addr 2467 %endif 2468 0 00001BB0 [8A09]0100[0000] isvariablestruc "DSR", 1, 0, serial_rows 0 00001BB6 [E00A]0000 0 00001BBA [8B09]0100[0000] isvariablestruc "DSC", 1, 0, serial_columns 0 00001BC0 [E00A]0000 0 00001BC4 [8C09]0100[0000] isvariablestruc "DST", 1, 0, serial_keep_timeout 0 00001BCA [E00A]0000 2472 %if _USE_TX_FIFO 0 00001BCE [8D09]0100[0000] isvariablestruc "DSF", 1, 0, serial_fifo_size 0 00001BD4 [E00A]0000 2474 %endif 0 00001BD8 [8E09]0300[0000] isvariablestruc "DSPVI", 1, 0, serial_var_intnum 0 00001BDE [E00A]0000 0 00001BE2 [9109]8300[0000] isvariablestruc "DSPUI", 1, ivfReadOnly, serial_use_intnum 0 00001BE8 [E00A]0000 0 00001BEC [9409]0300[0000] isvariablestruc "DSPVS", 1, 0, serial_var_params 0 00001BF2 [E00A]0000 0 00001BF6 [9709]8300[0000] isvariablestruc "DSPUS", 1, ivfReadOnly, serial_use_params 0 00001BFC [E00A]0000 0 00001C00 [9A09]0300[0000] isvariablestruc "DSPVF", 1, 0, serial_var_fifo 0 00001C06 [E00A]0000 0 00001C0A [9D09]8300[0000] isvariablestruc "DSPUF", 1, ivfReadOnly, serial_use_fifo 0 00001C10 [E00A]0000 0 00001C14 [A009]1300[0000] isvariablestruc "DSPVP", 2, 0, serial_var_baseport 0 00001C1A [E00A]0000 0 00001C1E [A309]9300[0000] isvariablestruc "DSPUP", 2, ivfReadOnly, serial_use_baseport 0 00001C24 [E00A]0000 0 00001C28 [A609]1300[0000] isvariablestruc "DSPVD", 2, 0, serial_var_dl 0 00001C2E [E00A]0000 0 00001C32 [A909]9300[0000] isvariablestruc "DSPUD", 2, ivfReadOnly, serial_use_dl 0 00001C38 [E00A]0000 0 00001C3C [AC09]1300[0000] isvariablestruc "DSPVM", 2, 0, serial_var_irqmask 0 00001C42 [E00A]0000 0 00001C46 [AF09]9300[0000] isvariablestruc "DSPUM", 2, ivfReadOnly, serial_use_irqmask 0 00001C4C [E00A]0000 2487 2488 %if _40COLUMNS 0 00001C50 [B209]0500[0000] isvariablestruc "IOCLINE", 1, 0, io_columns_getline 0 00001C56 [E00A]0000 2490 ; IOCLINE must be before IOC as otherwise "IOCLINE" would get 2491 ; misdetected as "IOC" + "L" separator + junk 2492 %endif 0 00001C5A [B709]0100[0000] isvariablestruc "IOR", 1, 0, io_rows 0 00001C60 [E00A]0000 0 00001C64 [B809]0100[0000] isvariablestruc "IOC", 1, 0, io_columns 0 00001C6A [E00A]0000 0 00001C6E [B909]1100[0000] isvariablestruc "IOS", 2, 0, io_start_buffer 0 00001C74 [E00A]0000 0 00001C78 [BA09]1100[0000] isvariablestruc "IOE", 2, 0, io_end_buffer 0 00001C7E [E00A]0000 0 00001C82 [BB09]1100[0000] isvariablestruc "IOL", 2, 0, io_levels 0 00001C88 [E00A]0000 0 00001C8C [BC09]1100[0000] isvariablestruc "IOF", 2, 0, io_flags 0 00001C92 [E00A]0000 0 00001C96 [BD09]91000000 isvariablestruc "IOI", 2, ivfReadOnly, 0, 0, 0, var_ioi_setup 0 00001C9C [2D07]0000 0 00001CA0 [BE09]91000000 isvariablestruc "IOK", 2, ivfReadOnly, 0, 0, 0, var_iok_setup 0 00001CA6 [4107]0000 2501 2502 %if _CATCHINT2D 0 00001CAA [BF09]8500[0000] isvariablestruc "AMISNUM", 1, ivfReadOnly, amis_multiplex_number 0 00001CB0 [E00A]0000 0 00001CB4 [C409]0800[0000] isvariablestruc "TRYAMISNUM", 1, 0, try_amis_multiplex_number 0 00001CBA [E00A]0000 2505 %endif 2506 0 00001CBE [CC09]3600[0000] isvariablestruc "HHRESULT", 4, 0, hhresult 0 00001CC4 [E00A]0000 2508 %if _PM 2509 isvariablestruc "DARESULT", 2, 0, daresult 2510 %endif 2511 %if _EMS 2512 isvariablestruc "XARESULT", 2, 0, xaresult 2513 %endif 2514 %if _COUNT || _SCOUNT 0 00001CC8 [D209]3300[3401] isvariablestruc "COUNT", 4, 0, count_var 0 00001CCE [E00A]0000 2516 %endif 2517 %if _RH 0 00001CD2 [D509]95000000 isvariablestruc "RHCOUNT", 2, ivfReadOnly, 0, 0, 0, var_rhcount_setup 0 00001CD8 [1807]0000 2519 %endif 2520 2521 %if _DEBUG1 2522 isvariablestruc "TRC", 2, ivfArrayOptional, test_records_Readmem + 4, 15, 4 2524 isvariablestruc "TRA", 4, ivfArrayOptional, test_records_Readmem, 15, 2 2526 isvariablestruc "TWC", 2, ivfArrayOptional, test_records_Writemem + 4, 15, 4 2528 isvariablestruc "TWA", 4, ivfArrayOptional, test_records_Writemem, 15, 2 2530 isvariablestruc "TLC", 2, ivfArrayOptional, test_records_getLinear + 4, 15, 4 2532 isvariablestruc "TLA", 4, ivfArrayOptional, test_records_getLinear, 15, 2 2534 isvariablestruc "TSC", 2, ivfArrayOptional, test_records_getSegmented + 4, 15, 4 2536 isvariablestruc "TSA", 4, ivfArrayOptional, test_records_getSegmented, 15, 2 2538 isvariablestruc "TRV", 1, 0, test_readmem_value 2540 %endif 2541 2542 2543 %if !_LOADER 2544 %if _PM 2545 isvariablestruc "SRO", 4, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 2547 isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 4, 15, 4 2549 %else 0 00001CDC [DA09]9102[0000] isvariablestruc "SRO", 2, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 0 00001CE2 [E00A]0F02 0 00001CE6 [DB09]9102[0200] isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 2, 15, 2 0 00001CEC [E00A]0F02 2554 %endif 0 00001CF0 [DC09]B100[0000] isvariablestruc "SRC", 4, ivfReadOnly, sscounter 0 00001CF6 [E00A]0000 2557 %endif 2558 0 00001CFA [DD09]90040000 isvariablestruc "RI", 2, ivfSeparatorSpecial | ivfReadOnly, 0, 255, 0, var_ri_setup 0 00001D00 [8F0B]FF00 2561 2562 %if _MMXSUPP 0 00001D04 [DD09]B0040000 isvariablestruc "MM", 4, ivfSeparatorSpecial | ivfReadOnly, 0, 7, 0, var_mm_setup 0 00001D0A [F90A]0700 2565 %endif 2566 2567 %if _DEBUG3 2568 isvariablestruc "MT", 4, 0, 0, 1, 0, var_mt_setup 2569 %endif 2570 2571 %if _INPUT_FILE_BOOT || _INPUT_FILE_HANDLES 0 00001D0E [DD09]11020000 isvariablestruc "YSF", 2, ivfArrayOptional, 0, 15, 0, var_ysf_setup 0 00001D14 [2E0C]0F00 2574 %if _INPUT_FILE_HANDLES 0 00001D18 [DE09]11020000 isvariablestruc "YHF", 2, ivfArrayOptional, 0, 15, 0, var_ysf_setup 0 00001D1E [2E0C]0F00 2577 %endif 2578 %if _INPUT_FILE_BOOT 0 00001D22 [DF09]11020000 isvariablestruc "YBF", 2, ivfArrayOptional, 0, 15, 0, var_ysf_setup 0 00001D28 [2E0C]0F00 2581 %endif 2582 %endif 2583 2584 %if _ACCESS_VARIABLES_AMOUNT 0 00001D2C [E009]B502[0000] isvariablestruc "READADR", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 0 00001D32 [E00A]0304 0 00001D36 [E509]B502[0400] isvariablestruc "READLEN", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 0 00001D3C [E00A]0304 0 00001D40 [EA09]B502[0000] isvariablestruc "WRITADR", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 0 00001D46 [E00A]0304 0 00001D4A [EF09]B502[0400] isvariablestruc "WRITLEN", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 0 00001D50 [E00A]0304 2593 %endif 2594 2595 %if !_LOADER 2596 %if _PSPVARIABLES 2597 %if _PM 2598 isvariablestruc "PSPS", 2, ivfReadOnly, 0, 0, 0, var_psps_setup 2599 isvariablestruc "PSPSEL", 2, ivfReadOnly, 0, 0, 0, var_psps_setup 2600 %else 0 00001D54 [F409]9200[0000] isvariablestruc "PSPS", 2, ivfReadOnly, pspdbe 0 00001D5A [E00A]0000 0 00001D5E [F609]9400[0000] isvariablestruc "PSPSEL", 2, ivfReadOnly, pspdbe 0 00001D64 [E00A]0000 2603 %endif 0 00001D68 [FA09]9100[0000] isvariablestruc "PSP", 2, ivfReadOnly, pspdbe 0 00001D6E [E00A]0000 0 00001D72 [FB09]91000000 isvariablestruc "PPR", 2, ivfReadOnly, 0, 0, 0, var_ppr_setup 0 00001D78 [5507]0000 0 00001D7C [FC09]B1000000 isvariablestruc "PPI", 4, ivfReadOnly, 0, 0, 0, var_ppi_setup 0 00001D82 [6B07]0000 0 00001D86 [FD09]94000000 isvariablestruc "PARENT", 2, ivfReadOnly, 0, 0, 0, var_ppr_setup 0 00001D8C [5507]0000 0 00001D90 [010A]B1000000 isvariablestruc "PRA", 4, ivfReadOnly, 0, 0, 0, var_ppi_setup 0 00001D96 [6B07]0000 2609 %endif 2610 %endif 2611 2612 %if _BOOTLDR 0 00001D9A [020A]08000000 isvariablestruc "BOOTUNITFL", 1, 0, 0, 255, 0, var_bootunitflags_setup 0 00001DA0 [F307]FF00 0 00001DA4 [0A0A]89000000 isvariablestruc "BOOTLDPUNIT", 1, ivfReadOnly, 0, 0, 0, var_bootldpunit_setup 0 00001DAA [B107]0000 0 00001DAE [130A]89000000 isvariablestruc "BOOTSDPUNIT", 1, ivfReadOnly, 0, 0, 0, var_bootsdpunit_setup 0 00001DB4 [B607]0000 2616 %if _INPUT_FILE_BOOT 0 00001DB8 [1C0A]89000000 isvariablestruc "BOOTYDPUNIT", 1, ivfReadOnly, 0, 0, 0, var_bootydpunit_setup 0 00001DBE [BB07]0000 2618 %endif 0 00001DC2 [250A]B9000000 isvariablestruc "BOOTLDPPART", 4, ivfReadOnly, 0, 0, 0, var_bootldppart_setup 0 00001DC8 [D207]0000 0 00001DCC [2E0A]B9000000 isvariablestruc "BOOTSDPPART", 4, ivfReadOnly, 0, 0, 0, var_bootsdppart_setup 0 00001DD2 [D707]0000 2621 %if _INPUT_FILE_BOOT 0 00001DD6 [370A]B9000000 isvariablestruc "BOOTYDPPART", 4, ivfReadOnly, 0, 0, 0, var_bootydppart_setup 0 00001DDC [DC07]0000 2623 %endif 2624 %endif 2625 2626 %if !_LOADER 0 00001DE0 [400A]0900[0000] isvariablestruc "TRYDEBUGNUM", 1, 0, try_debugger_amis_multiplex_number 0 00001DE6 [E00A]0000 0 00001DEA [490A]9700[0000] isvariablestruc "DEBUGFUNC", 2, ivfReadOnly, debuggerfunction 0 00001DF0 [E00A]0000 2629 %if _MCLOPT 2630 isvariablestruc "MASTERPICBASE", 1, 0, master_pic_base 2631 %endif 2632 %endif 2633 0 00001DF4 [500A]9700[0000] isvariablestruc "DSTACKLEN", 2, ivfReadOnly, entryseg_size 0 00001DFA [E00A]0000 0 00001DFE [570A]9700[0000] isvariablestruc "DSTACKSEG", 2, ivfReadOnly, pspdbg 0 00001E04 [E00A]0000 0 00001E08 [5E0A]9700[0000] isvariablestruc "DENTRYLEN", 2, ivfReadOnly, entryseg_size 0 00001E0E [E00A]0000 0 00001E12 [650A]9700[0000] isvariablestruc "DENTRYSEG", 2, ivfReadOnly, pspdbg 0 00001E18 [E00A]0000 0 00001E1C [6C0A]9700[0000] isvariablestruc "DCODE1LEN", 2, ivfReadOnly, code_size 0 00001E22 [E00A]0000 0 00001E26 [730A]9700[0000] isvariablestruc "DCODE1SEG", 2, ivfReadOnly, code_seg 0 00001E2C [E00A]0000 2640 %if _DUALCODE 2641 isvariablestruc "DCODE2LEN", 2, ivfReadOnly, code2_size 2642 isvariablestruc "DCODE2SEG", 2, ivfReadOnly, code2_seg 2643 %endif 2644 %if _MESSAGESEGMENT 0 00001E30 [7A0A]9900[0000] isvariablestruc "DMESSAGELEN", 2, ivfReadOnly, messageseg_size 0 00001E36 [E00A]0000 0 00001E3A [830A]9900[0000] isvariablestruc "DMESSAGESEG", 2, ivfReadOnly, messageseg 0 00001E40 [E00A]0000 2647 %endif 0 00001E44 [8C0A]9800[0000] isvariablestruc "DAUXBUFLEN", 2, ivfReadOnly, auxbuff_current_size 0 00001E4A [E00A]0000 2649 %if _PM 2650 isvariablestruc "DAUXBUFSEG", 2, ivfReadOnly, auxbuff_segorsel + soaSegment 2651 %if _HISTORY_SEPARATE_FIXED && _HISTORY 2652 isvariablestruc "DHISBUFLEN", 2, ivfReadOnly, historyseg_size 2653 isvariablestruc "DHISBUFSEG", 2, ivfReadOnly, history.segorsel + soaSegment 2654 %endif 2655 %else 0 00001E4E [940A]9800[0000] isvariablestruc "DAUXBUFSEG", 2, ivfReadOnly, auxbuff_segorsel 0 00001E54 [E00A]0000 2657 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00001E58 [9C0A]9800[0000] isvariablestruc "DHISBUFLEN", 2, ivfReadOnly, historyseg_size 0 00001E5E [E00A]0000 0 00001E62 [A40A]9800[0000] isvariablestruc "DHISBUFSEG", 2, ivfReadOnly, history.segorsel 0 00001E68 [E00A]0000 2660 %endif 2661 %endif 2662 %if _IMMASM 0 00001E6C [AC0A]9500[0000] isvariablestruc "DIMMSEG", 2, ivfReadOnly, immseg 0 00001E72 [E00A]0000 2664 %endif 2665 %if _EXTENSIONS 0 00001E76 [B10A]9500[0000] isvariablestruc "DEXTLEN", 2, ivfReadOnly, extseg_size 0 00001E7C [E00A]0000 0 00001E80 [B60A]9600[0000] isvariablestruc "DEXTUSED", 2, ivfReadOnly, extseg_used 0 00001E86 [E00A]0000 2668 ; problem: is not currently effective value if to reclaim 0 00001E8A [BC0A]9500[0000] isvariablestruc "DEXTSEG", 2, ivfReadOnly, extseg 0 00001E90 [E00A]0000 0 00001E94 [C10A]9900[0000] isvariablestruc "DEXTDATALEN", 2, ivfReadOnly, extdata_size 0 00001E9A [E00A]0000 0 00001E9E [CA0A]9A00[0000] isvariablestruc "DEXTDATAUSED", 2, ivfReadOnly, extdata_used 0 00001EA4 [E00A]0000 2672 ; problem: is not currently effective value if to reclaim 0 00001EA8 [D40A]9900[0000] isvariablestruc "DEXTDATAOFS", 2, ivfReadOnly, extdata 0 00001EAE [E00A]0000 2674 %endif 2675 %if _APP_ENV_SIZE || _DEV_ENV_SIZE || _BOOT_ENV_SIZE 0 00001EB2 [DD0A]9500[0000] isvariablestruc "DENVLEN", 2, ivfReadOnly, env_size 0 00001EB8 [E00A]0000 0 00001EBC [E20A]9500[0000] isvariablestruc "DENVSEG", 2, ivfReadOnly, envseg 0 00001EC2 [E00A]0000 2678 %endif 0 00001EC6 [E70A]9800[0000] isvariablestruc "DALLOCSIZE", 2, ivfReadOnly, alloc_size 0 00001ECC [E00A]0000 0 00001ED0 [EF0A]9700[0000] isvariablestruc "DALLOCSEG", 2, ivfReadOnly, alloc_seg 0 00001ED6 [E00A]0000 2681 2682 %if _PM 2683 isvariablestruc "DSTACKSEL", 2, ivfReadOnly, dssel 2684 isvariablestruc "DENTRYSEL", 2, ivfReadOnly, cssel 2685 isvariablestruc "DCODE1SEL", 2, ivfReadOnly, code_sel 2686 %if _DUALCODE 2687 isvariablestruc "DCODE2SEL", 2, ivfReadOnly, code2_sel 2688 %endif 2689 %if _MESSAGESEGMENT 2690 isvariablestruc "DMESSAGESEL", 2, ivfReadOnly, messagesel 2691 %endif 2692 isvariablestruc "DAUXBUFSEL", 2, ivfReadOnly, auxbuff_segorsel + soaSelector 2693 %if _HISTORY_SEPARATE_FIXED && _HISTORY 2694 isvariablestruc "DHISBUFSEL", 2, ivfReadOnly, history.segorsel + soaSelector 2695 %endif 2696 isvariablestruc "DSCRATCHSEL", 2, ivfReadOnly, scratchsel 2697 %if _SYMBOLIC 2698 isvariablestruc "DSYM1SEL", 2, ivfReadOnly, symsel1 2699 isvariablestruc "DSYM2SEL", 2, ivfReadOnly, symsel2 2700 %endif 2701 %if _IMMASM 2702 isvariablestruc "DIMMSEL", 2, ivfReadOnly, immsel 2703 %endif 2704 %if _EXTENSIONS 2705 isvariablestruc "DEXTCSSEL", 2, ivfReadOnly, extcssel 2706 isvariablestruc "DEXTDSSEL", 2, ivfReadOnly, extdssel 2707 %endif 2708 %endif 2709 0 00001EDA [F60A]1900[0000] isvariablestruc "DEFAULTDLEN", 2, 0, dd_default_length 0 00001EE0 [E00A]0000 0 00001EE4 [FF0A]1B00[0000] isvariablestruc "DEFAULTDLINES", 2, 0, dd_default_lines 0 00001EEA [E00A]0000 2712 %if !_LOADER 0 00001EEE [0A0B]1900[0000] isvariablestruc "DEFAULTULEN", 2, 0, uu_default_length 0 00001EF4 [E00A]0000 0 00001EF8 [130B]1B00[0000] isvariablestruc "DEFAULTULINES", 2, 0, uu_default_lines 0 00001EFE [E00A]0000 2715 %endif 2716 2717 %if _PM 2718 isvariablestruc "CIP", 2, 0, 0, 0, 0, var_cip_setup 2719 isvariablestruc "CSP", 2, 0, 0, 0, 0, var_csp_setup 2720 %else 0 00001F02 [1E0B]1100[0000] isvariablestruc "CIP", 2, 0, reg_eip 0 00001F08 [E00A]0000 0 00001F0C [1F0B]1100[0000] isvariablestruc "CSP", 2, 0, reg_esp 0 00001F12 [E00A]0000 2723 %endif 2724 2725 %if _ELDLINKINFO 0 00001F16 [200B]9800[0000] isvariablestruc "LINKOFFSET", 2, ivfReadOnly, linkinfoaddress 0 00001F1C [E00A]0000 0 00001F20 [280B]B900[0000] isvariablestruc "LINKPOINTER", 4, ivfReadOnly, linkinfoaddress 0 00001F26 [E00A]0000 0 00001F2A [310B]9500[0000] isvariablestruc "LINKSEG", 2, ivfReadOnly, linkseg 0 00001F30 [E00A]0000 2729 %if _PM 2730 isvariablestruc "LINKSEL", 2, ivfReadOnly, linksel 2731 %endif 2732 2733 %if _LINK 2734 %if _MESSAGESEGMENT 2735 %if _PM 2736 linksel equ messagesel 2737 %else 2738 linksel equ linkseg 2739 %endif 2740 linkseg equ messageseg 2741 %else 2742 %if _PM 2743 linksel equ dssel 2744 %else 2745 linksel equ linkseg 2746 %endif 2747 linkseg equ pspdbg 2748 %endif 2749 %endif 2750 %endif 2751 2752 %if _PM && _DEBUG_PM_ENTRY 2753 isvariablestruc "DEBUGPMET", 4, 0, debug_pm_entry_total 2754 isvariablestruc "DEBUGPMEH", 4, 0, debug_pm_entry_esph 2755 isvariablestruc "DEBUGPMEB", 4, 0, debug_pm_entry_b 2756 %endif 2757 2758 isvariable_struc_morebyte_list_end: 2759 isvariable_struc_list_end: 2760 2761 align 2, db 0 0 00001F34 00000000 interrupt_var: dd 0 2763 align 2, db 0 0 00001F38 0000 ioi_var: dw 0 0 00001F3A 0000 iok_var: dw 0 2766 %if _PM 2767 align 2, db 0 2768 seldbg: dw 0 2769 align 2, db 0 2770 dpspsel: dw 0 2771 %endif 2772 %if _PSPVARIABLES 2773 align 2, db 0 2774 %if _PM 2775 psp_selector: dw 0 2776 %endif 0 00001F3C 0000 psp_parent: dw 0 0 00001F3E 00000000 psp_pra: dd 0 2779 %endif 2780 2781 align 2, db 0 2782 isvariable_morebyte_nameheaders: 2783 .ext: 0 00001F42 000000000000000000 dw IVS_MOREBYTE_NAMEHEADERS 0 00001F4B 000000000000000000 0 00001F54 000000000000000000 0 00001F5D 0000000000494E4C46 0 00001F66 524C4C46524C475253 0 00001F6F 52534D534444454445 0 00001F78 44444D414D414D4D44 0 00001F81 434443444944414441 0 00001F8A 445044504450445044 0 00001F93 504450445050505450 0 00001F9C 545452455245524352 0 00001FA5 435243455251515445 0 00001FAE 414141414144414441 0 00001FB7 424142415541554145 0 00001FC0 4145415A415A414341 0 00001FC9 434150415041574157 0 00001FD2 445344534453445344 0 00001FDB 534453445344534453 0 00001FE4 445344534453445344 0 00001FED 5344534453494F494F 0 00001FF6 494F494F494F494F49 0 00001FFF 4F494F494F414D5452 0 00002008 4848434F5248535253 0 00002011 52535252494D4D5953 0 0000201A 594859425245524557 0 00002023 525752505350535053 0 0000202C 505050505041505242 0 00002035 4F424F424F424F424F 0 0000203E 424F424F5452444544 0 00002047 534453444544454443 0 00002050 4443444D444D444144 0 00002059 414448444844494445 0 00002062 444544454445444544 0 0000206B 454445444544414441 0 00002074 444544454445444543 0 0000207D 4943534C494C494C49 2785 .end: 2786 %if IVS_HAVE_ONEBYTE && ! IVS_SINGLE_ONEBYTE 2787 isvariable_onebyte_names: 2788 db IVS_ONEBYTE_NAMES 2789 .end: 2790 %endif 2791 0 00002086 54384354524C535246 isvariablestrings ISVARIABLESTRINGS 0 0000208F 535253525441504653 0 00002098 52544F50455049444C 0 000020A1 45455049444C454158 0 000020AA 44454C5441454C5441 0 000020B3 4C494D495456494345 0 000020BC 53495A455649434548 0 000020C5 454144455254455854 0 000020CE 414E44434858383643 0 000020D7 48583837544F53464F 0 000020E0 534952505241535041 0 000020E9 52454E54535053454C 0 000020F2 4343434C494D495443 0 000020FB 4F554E544C494D4954 0 00002104 434F554E5443434F44 0 0000210D 45524D434F44454F53 0 00002116 4F534F534F534F534F 0 0000211F 534F534F534F535243 0 00002128 544650564950554950 0 00002131 565350555350564650 0 0000213A 554650565050555050 0 00002143 564450554450564D50 0 0000214C 554D434C494E455243 0 00002155 53454C46494B49534E 0 0000215E 554D59414D49534E55 0 00002167 4D524553554C54554E 0 00002170 54434F554E544F5343 0 00002179 464646414441445241 0 00002182 444C454E4954414452 0 0000218B 49544C454E50535053 0 00002194 454C50524952454E54 0 0000219D 414F54554E4954464C 0 000021A6 4F544C4450554E4954 0 000021AF 4F54534450554E4954 0 000021B8 4F54594450554E4954 0 000021C1 4F544C445050415254 0 000021CA 4F5453445050415254 0 000021D3 4F5459445050415254 0 000021DC 5944454255474E554D 0 000021E5 42554746554E435441 0 000021EE 434B4C454E5441434B 0 000021F7 5345474E5452594C45 0 00002200 4E4E5452595345474F 0 00002209 4445314C454E4F4445 0 00002212 315345474553534147 0 0000221B 454C454E4553534147 0 00002224 455345475558425546 0 0000222D 4C454E555842554653 0 00002236 454749534255464C45 0 0000223F 4E4953425546534547 0 00002248 4D4D53454758544C45 0 00002251 4E5854555345445854 0 0000225A 534547585444415441 0 00002263 4C454E585444415441 0 0000226C 555345445854444154 0 00002275 414F46534E564C454E 0 0000227E 4E565345474C4C4F43 0 00002287 53495A454C4C4F4353 0 00002290 45474641554C54444C 0 00002299 454E4641554C54444C 0 000022A2 494E45534641554C54 0 000022AB 554C454E4641554C54 0 000022B4 554C494E455350504E 0 000022BD 4B4F46465345544E4B 0 000022C6 504F494E5445524E4B 0 000022CF 534547 2793 2794 2795 %if _EXPRDUALCODE && _DUALCODE 2796 usesection lDEBUG_CODE2 2797 %else 2798 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 2798 ------------------ note: usesection lDEBUG_CODE 2799 %endif 2800 isvariable_code: 2801 ; INP: ax = array index (0-based) 2802 ; di = 0 2803 ; cl = default size of variable (1..4) 2804 ; ch = length of variable name 2805 ; bx -> ISVARIABLESTRUC structure 2806 ; CHG: ax, bx, cx, dx, si, di 2807 ; OUT: NC if valid, 2808 ; bx -> var, di = 0 or di -> mask 2809 ; cl = size of variable (1..4) 2810 ; ch = length of variable name 2811 2812 %if _EXTENSIONS && _EXT_VARIABLES 2813 var_ext_setup: section_of_function 0 00004411 87F9 xchg di, cx 0 00004413 8B4F04 mov cx, word [bx + ivAddress] 0 00004416 E303 jcxz .cy 2817 %if _EXPRDUALCODE && _DUALCODE 2818 nearcall transfer_ext_cx_nearcall_from_code2 2819 2820 usesection lDEBUG_CODE 2821 transfer_ext_cx_nearcall_from_code2: section_of_function 2822 add sp, 6 2823 %endif 0 00004418 E9[0000] jmp transfer_ext_cx 2825 2826 %if _EXPRDUALCODE && _DUALCODE 2827 usesection lDEBUG_CODE2 2828 %endif 2829 2830 var_ext_setup.cy: 0 0000441B 87F9 xchg di, cx 0 0000441D F9 stc 0 0000441E C3 retn 2834 2835 var_ext_setup_done: section_of_function 0 0000441F 58 pop ax 0 00004420 58 pop ax 0 00004421 58 pop ax 0 00004422 C3 retn 2840 %endif 2841 2842 2843 %if _PM 2844 var_cip_setup: section_of_function 2845 mov bx, word [reg_cs] 2846 nearcall test_d_b_bit 2847 mov bx, reg_eip 2848 @@: 2849 jz .ret 2850 inc cx 2851 inc cx ; = 4 2852 .ret: 2853 clc ; (NC) 2854 retn 2855 2856 var_csp_setup: section_of_function 2857 mov bx, word [reg_ss] 2858 nearcall test_d_b_bit 2859 mov bx, reg_esp 2860 jmp @B 2861 %endif 2862 2863 2864 var_lfsr_setup: section_of_function 0 00004423 BB[2001] mov bx, lfsr 0 00004426 D16F02 shr word [bx + 2], 1 0 00004429 D11F rcr word [bx], 1 0 0000442B 730B jnc .ret ; if not to tap --> (NC) 0 0000442D A1[2801] mov ax, word [lfsrtap] 0 00004430 3107 xor word [bx], ax 0 00004432 A1[2A01] mov ax, word [lfsrtap + 2] 0 00004435 314702 xor word [bx + 2], ax ; (NC) 2873 .ret: 0 00004438 C3 retn 2875 2876 2877 var_reverselfsr_setup: section_of_function 0 00004439 BB[2401] mov bx, reverselfsr 0 0000443C 91 xchg ax, cx ; preserve original cx 0 0000443D 8A0E[1E01] mov cl, byte [reverselfsrtop] 0 00004441 BE0100 mov si, 1 ; register for shift mask 0 00004444 80F910 cmp cl, 16 ; fits in low 16 bits ? 0 00004447 721B jb .below_16 ; yes --> 0 00004449 80E910 sub cl, 16 ; get bit within high word 0 0000444C 80F910 cmp cl, 16 ; beyond maximum ? 0 0000444F 7202 jb @F 0 00004451 B10F mov cl, 15 ; yes, clamp to bit 31 (for now) 2888 @@: 0 00004453 D3E6 shl si, cl ; shift to get a bitmask 0 00004455 91 xchg cx, ax ; restore the original cx 0 00004456 857702 test word [bx + 2], si ; is top bit set ? 0 00004459 9F lahf ; preserve ZF 0 0000445A F7D6 not si ; invert mask to allow clearing 0 0000445C 217702 and word [bx + 2], si ; clear the bit if it was set 0 0000445F BFFFFF mov di, -1 ; si:di = mask what to clear in taps 0 00004462 EB0F jmp @F 2897 2898 .below_16: 0 00004464 D3E6 shl si, cl ; shift to get a bitmask 0 00004466 91 xchg cx, ax ; restore the original cx 0 00004467 8537 test word [bx], si ; is top bit set ? 0 00004469 9F lahf ; preserve ZF 0 0000446A F7D6 not si ; invert mask to allow clearing 0 0000446C 2137 and word [bx], si ; clear the bit if it was set 0 0000446E 89F7 mov di, si 0 00004470 BEFFFF mov si, -1 ; si:di = mask what to clear in taps 2907 @@: 0 00004473 9E sahf ; restore ZF 0 00004474 97 xchg ax, di ; si:ax = mask what to clear in taps 0 00004475 7416 jz .justshift ; if not to tap, just shift --> (NC) 0 00004477 E81300 call .justshift ; also shift, but return to us afterwards 0 0000447A 2306[2801] and ax, word [lfsrtap] 0 0000447E 2336[2A01] and si, word [lfsrtap + 2] 2914 ; get the taps (highest bit cleared) 0 00004482 F9 stc ; lowest bit will get set to 1 0 00004483 D1D0 rcl ax, 1 0 00004485 D1D6 rcl si, 1 ; shift the taps to create reverse taps 0 00004487 3107 xor word [bx], ax 0 00004489 317702 xor word [bx + 2], si ; tap (NC) 0 0000448C C3 retn 2921 2922 .justshift: 0 0000448D D127 shl word [bx], 1 0 0000448F D15702 rcl word [bx + 2], 1 0 00004492 31FF xor di, di ; restore di = 0 2926 ; also: set NC if return from setup function 0 00004494 C3 retn 2928 2929 2930 %if _PM 2931 var_dpspsel_setup: section_of_function 2932 mov bx, dpspsel 2933 mov word [bx], ss 2934 clc 2935 retn 2936 2937 var_seldbg_setup: section_of_function 2938 mov bx, seldbg 2939 and word [bx], byte 0 2940 nearcall ispm 2941 jnz @F 2942 mov word [bx], ds 2943 @@: 2944 clc 2945 retn 2946 %endif 2947 2948 %if _DEBUG3 2949 var_mt_setup: section_of_function 2950 mov bx, ax 2951 add bx, bx 2952 add bx, bx 2953 mov di, bx 2954 add bx, mtest_regs 2955 add di, masks_test 2956 clc 2957 retn 2958 %endif 2959 2960 2961 %if _RH 2962 ; INP: ax = array index (0-based) 2963 ; di = 0 2964 ; cl = default size of variable (1..4) 2965 ; ch = length of variable name 2966 ; bx -> ISVARIABLESTRUC structure 2967 ; CHG: ax, bx, cx, dx, si, di 2968 ; OUT: NC if valid, 2969 ; bx -> var, di = 0 or di -> mask 2970 ; cl = size of variable (1..4) 2971 ; ch = length of variable name 2972 var_rhcount_setup: section_of_function 0 00004495 51 push cx 2974 %if _PM 2975 mov di, word [auxbuff_switchbuffer_size] 2976 %else 0 00004496 31FF xor di, di 2978 %endif 0 00004498 E8[0000] nearcall silence_get_start.have_di 0 0000449B E8[0000] nearcall silence_count_zeroes 2981 0 0000449E 93 xchg bx, ax 0 0000449F BB[3801] mov bx, rhcount 0 000044A2 8907 mov word [bx], ax 0 000044A4 59 pop cx 0 000044A5 16 push ss 0 000044A6 07 pop es 0 000044A7 31FF xor di, di ; NC 0 000044A9 C3 retn 2990 %endif 2991 2992 2993 var_ioi_setup: section_of_function 0 000044AA 800E[0000]10 setopt [internalflags3], dif3_input_terminal_override 0 000044AF E8[0000] nearcall peekc 0 000044B2 8026[0000]EF clropt [internalflags3], dif3_input_terminal_override 0 000044B7 BB[9C07] mov bx, ioi_var 0 000044BA 8907 mov word [bx], ax 0 000044BC F8 clc 0 000044BD C3 retn 3001 3002 var_iok_setup: section_of_function 0 000044BE 800E[0000]10 setopt [internalflags3], dif3_input_terminal_override 0 000044C3 E8[0000] nearcall getc 0 000044C6 8026[0000]EF clropt [internalflags3], dif3_input_terminal_override 0 000044CB BB[9E07] mov bx, iok_var 0 000044CE 8907 mov word [bx], ax 0 000044D0 F8 clc 0 000044D1 C3 retn 3010 3011 %if !_LOADER 3012 %if _PSPVARIABLES 3013 %if _PM 3014 var_psps_setup: section_of_function 3015 mov bx, psp_selector 3016 nearcall var_get_psp_segment 3017 jc @F 3018 nearcall ispm 3019 jnz @F 3020 push bx 3021 xchg ax, bx 3022 mov ax, 0002h 3023 int 31h 3024 pop bx 3025 @@: 3026 mov word [bx], ax 3027 clc 3028 retn 3029 %endif 3030 3031 3032 var_ppr_setup: section_of_function 3033 %if _PM 3034 sub sp, 8 3035 call save_scratchsel 3036 %endif 0 000044D2 BB[A007] mov bx, psp_parent 0 000044D5 31C0 xor ax, ax 0 000044D7 8907 mov word [bx], ax 0 000044D9 E83900 nearcall var_get_psp_selector 0 000044DC 7206 jc @F 0 000044DE 26A11600 mov ax, word [es:16h] 0 000044E2 8907 mov word [bx], ax ; retrieve parent process 3044 @@: 0 000044E4 16 push ss 0 000044E5 07 pop es 3047 %if _PM 3048 call restore_scratchsel 3049 ; This is not really needed but does not hurt either. 3050 ; getsegmented is used above, but only from PM. 3051 ; This is assumed not to switch modes. 3052 nearcall resetmode ; reset mode if we switched 3053 %endif 0 000044E6 F8 clc 0 000044E7 C3 retn 3056 3057 3058 var_ppi_setup: section_of_function 3059 %if _PM 3060 sub sp, 8 3061 call save_scratchsel 3062 %endif 0 000044E8 BB[A207] mov bx, psp_pra 0 000044EB 31C0 xor ax, ax 0 000044ED 8907 mov word [bx], ax 0 000044EF 894702 mov word [bx + 2], ax 0 000044F2 E82000 nearcall var_get_psp_selector 0 000044F5 72ED jc @B 0 000044F7 26A10A00 mov ax, word [es:TPIV] 0 000044FB 8907 mov word [bx], ax 0 000044FD 26A10C00 mov ax, word [es:TPIV + 2] 0 00004501 894702 mov word [bx + 2], ax ; retrieve Int22 address 0 00004504 EBDE jmp @B 3074 3075 3076 var_get_psp_segment: section_of_function 0 00004506 A1[0000] mov ax, word [pspdbe] 0 00004509 40 inc ax ; FFFFh ? 0 0000450A 7405 jz short .pspvar_psp_invalid ; yes, invalid --> 0 0000450C 48 dec ax ; 0 ? 0 0000450D 7402 jz short .pspvar_psp_invalid ; yes, invalid --> 0 0000450F F8 clc 0 00004510 C3 retn 3084 3085 .pspvar_psp_invalid: 0 00004511 31C0 xor ax, ax 0 00004513 F9 stc 0 00004514 C3 retn 3089 3090 3091 var_get_psp_selector: section_of_function 0 00004515 E8EEFF nearcall var_get_psp_segment 0 00004518 720D jc .pspvar_psp_invalid 3094 %if _PM 3095 nearcall ispm 3096 jnz short .pspvar_rm 3097 push bx 3098 _386_o32 ; push edx 3099 push dx 3100 push cx 3101 xor dx, dx 3102 mov cx, 4 3103 .pspvar_shift: 3104 shl ax, 1 3105 rcl dx, 1 3106 loop .pspvar_shift ; dx:ax = PSP segment << 4 3107 nearcall getsegmented 3108 ; getsegmented is assumed not to switch modes (see below). 3109 jc short .pspvar_error ; (shouldn't happen) 3110 _386_o32 3111 test dx, dx ; test edx, edx 3112 jnz short .pspvar_error ; (assumed not to happen) 3113 nearcall setrmlimit 3114 pop cx 3115 _386_o32 3116 pop dx ; pop edx 3117 xchg ax, bx ; ax = selector 3118 pop bx 3119 .pspvar_rm: 3120 %endif 0 0000451A 8EC0 mov es, ax ; es = segment/selector 0 0000451C 26813E0000CD20 cmp word [es:0], 20CDh ; int 20h opcode ? 0 00004523 7502 jne short .pspvar_psp_invalid ; no, invalid --> 0 00004525 F8 clc 0 00004526 C3 retn 3126 3127 .pspvar_psp_invalid: 0 00004527 F9 stc 0 00004528 C3 retn 3130 3131 .pspvar_error: 0 00004529 31F6 xor si, si 0 0000452B E9[0000] jmp error_expr 3134 %endif 3135 %endif 3136 3137 3138 %if _BOOTLDR 3139 var_bootldpunit_setup: section_of_function 0 0000452E BB[6000] mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit 0 00004531 EB45 jmp @F 3143 3144 var_bootsdpunit_setup: section_of_function 0 00004533 BB[7000] mov bx, load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 0 00004536 EB40 jmp @F 3148 3149 %if _INPUT_FILE_BOOT 3150 var_bootydpunit_setup: section_of_function 0 00004538 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 0000453D 7440 jz .retc 3153 0 0000453F 52 push dx 0 00004540 B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 00004543 F726[0000] mul word [load_input_file.active] 0 00004547 5A pop dx 3158 0 00004548 93 xchg ax, bx 0 00004549 8D9F[8000] lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 0 0000454D EB29 jmp @F 3163 %endif 3164 3165 var_bootldppart_setup: section_of_function 0 0000454F BB[3C00] mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 0 00004552 EB24 jmp @F 3169 3170 var_bootsdppart_setup: section_of_function 0 00004554 BB[4C00] mov bx, load_data - LOADDATA2 + bsBPB + bpbHiddenSectors 0 00004557 EB1F jmp @F 3174 3175 %if _INPUT_FILE_BOOT 3176 var_bootydppart_setup: section_of_function 0 00004559 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 0000455E 741F jz .retc 3179 0 00004560 52 push dx 0 00004561 B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 00004564 F726[0000] mul word [load_input_file.active] 0 00004568 5A pop dx 3184 0 00004569 93 xchg ax, bx 0 0000456A 8D9F[5C00] lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 0 0000456E EB08 jmp @F 3189 %endif 3190 3191 var_bootunitflags_setup: section_of_function 0 00004570 05[0000] add ax, load_unit_flags 0 00004573 89C3 mov bx, ax 0 00004575 BF[4C0B] mov di, mask_bootunitflags 3195 @@: 0 00004578 F606[0100]40 testopt [internalflags], nodosloaded 0 0000457D 7501 jnz @F ; (NC) 3198 var_bootydpunit_setup.retc: 3199 var_bootydppart_setup.retc: 0 0000457F F9 stc 3201 @@: 0 00004580 C3 retn 3203 %endif 3204 3205 3206 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 3206 ------------------ note: usesection lDEBUG_DATA_ENTRY 3207 0 000022D2 00 align 4, db 0 3209 masks: 3210 ; size 4 want masks + 0 3211 ; size 3 want masks + 1 3212 ; size 2 want masks + 2 3213 ; size 1 want masks + 3 3214 ; size 0 want masks + 4 3215 ; 4 - size = offset into masks 0 000022D4 00 mask_4byte: db 0 0 000022D5 00 mask_3byte: db 0 0 000022D6 00 mask_2byte: db 0 0 000022D7 00 mask_1byte: db 0 0 000022D8 FFFFFFFF mask_0byte: dd -1 0 000022DC FFFF0000 mask_compoundwithzero: db -1, -1, 0, 0 3222 mask_compoundreg8withzero: 0 000022E0 FFFF00FF db -1, -1, 0, -1 0 000022E4 FF0FFFFF mask_ysf: dd ~ (ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput) 3226 %if _BOOTLDR 0 000022E8 F8FFFFFF mask_bootunitflags: dd ~ luf_mask_writable 3228 %endif 3229 3230 %if _DEBUG3 3231 masks_test: 3232 mask_test_0: dd 0AA55AA55h 3233 mask_test_1: dd 00FF00FFh 3234 mtest_regs: 3235 mtest_reg_0: dd 0 3236 mtest_reg_1: dd 00110022h 3237 %endif 3238 3239 3240 %if _EXPRDUALCODE && _DUALCODE 3241 usesection lDEBUG_CODE2 3242 %else 3243 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 3243 ------------------ note: usesection lDEBUG_CODE 3244 %endif 3245 3246 %if _SYMBOLIC 3247 ; INP: al = first character 3248 ; si -> next character 3249 ; OUT: CY if no symbol 3250 ; NC if symbol, 3251 ; bx:dx = symbol (offset) value 3252 ; al = next character behind symbol 3253 ; si -> behind next character 3254 ; CHG: ah, bx, cx, dx 3255 ; STT: ss = ds = es, UP 3256 ; 3257 ; Note: This invalidates the symbol table access slice. 3258 issymbol?: section_of_function 3259 nearcall zz_detect_xms ; re-detect XMS if used after run (eg WHILE) 3260 3261 lframe near 3262 lvar word, new_si 3263 lenter 3264 lvar word, orig_si 3265 push si 3266 lvar word, orig_ax 3267 push ax 3268 xor bx, bx 3269 lequ 1, flag_has_nondigit 3270 lequ 2, flag_has_symbol_prefix 3271 lequ 4, flag_has_linear 3272 lequ 8, flag_has_offset 3273 lequ 16, flag_has_base 3274 lequ 32, flag_is_86m_segment 3275 lvar word, flags 3276 push bx 3277 lvar word, main_index ; used as parameter to zz_match_symbol 3278 push ax 3279 3280 dec si 3281 %if 0 3282 cmp al, '.' 3283 jne @F 3284 inc si ; allow dot prefix to symbol name 3285 mov al, byte [si] 3286 @@: 3287 %endif 3288 cmp al, '0' 3289 jb @F 3290 cmp al, '9' 3291 jbe .not 3292 @@: 3293 3294 mov dx, msg.sl 3295 nearcall isstring? 3296 jne @F 3297 lodsb 3298 cmp al, '.' 3299 jne short .error 3300 or byte [bp + ?flags], ?flag_has_symbol_prefix | ?flag_has_linear 3301 jmp .not_symbol_prefix 3302 @@: 3303 3304 mov dx, msg.symbol 3305 nearcall isstring? 3306 jne .not_symbol_prefix 3307 lodsb 3308 cmp al, '.' 3309 jne short .error 3310 or byte [bp + ?flags], ?flag_has_symbol_prefix 3311 3312 mov dx, msg.linear 3313 nearcall isstring? 3314 jne @F 3315 lodsb 3316 cmp al, '.' 3317 jne short .error 3318 or byte [bp + ?flags], ?flag_has_linear 3319 @@: 3320 3321 mov dx, msg.offset 3322 nearcall isstring? 3323 jne @F 3324 lodsb 3325 cmp al, '.' 3326 jne short .error 3327 test byte [bp + ?flags], ?flag_has_linear 3328 jnz short .error 3329 or byte [bp + ?flags], ?flag_has_offset 3330 @@: 3331 3332 mov dx, msg.base 3333 nearcall isstring? 3334 jne @F 3335 lodsb 3336 cmp al, '.' 3337 jne short .error 3338 test byte [bp + ?flags], ?flag_has_linear | ?flag_has_offset 3339 jnz short .error 3340 or byte [bp + ?flags], ?flag_has_base 3341 @@: 3342 3343 .not_symbol_prefix: 3344 3345 xor bx, bx 3346 mov dx, si 3347 .loopname: 3348 lodsb 3349 nearcall isseparator?.except_L_or_dot 3350 je .endname 3351 nearcall getexpression.lit_ishexdigit? 3352 jnc @F 3353 or byte [bp + ?flags], ?flag_has_nondigit 3354 @@: 3355 inc bx 3356 jmp .loopname 3357 3358 .error: 3359 jmp error_expr ; does not use es 3360 3361 .endname: 3362 mov word [bp + ?new_si], si 3363 mov cx, bx 3364 test cx, cx 3365 jz .not 3366 3367 test byte [bp + ?flags], ?flag_has_nondigit | ?flag_has_symbol_prefix 3368 jz .not 3369 3370 mov si, dx 3371 push cx 3372 nearcall zz_hash 3373 pop cx 3374 3375 .loop: 3376 ; ?main_index used as parameter 3377 push ss 3378 push dx 3379 push cx 3380 3381 dualcall zz_match_symbol ; ! note that possibly es != ss 3382 jc .not 3383 3384 testopt [es:di + smFlags], smfPoison 3385 jz @F 3386 setopt [internalflags2], dif2_poison 3387 @@: 3388 3389 mov dx, word [es:di + smLinear] 3390 mov bx, word [es:di + smLinear + 2] 3391 test byte [bp + ?flags], ?flag_has_linear 3392 jnz .got 3393 test byte [bp + ?flags], ?flag_has_base 3394 jz .offset 3395 .base: 3396 ; offset=100 linear=10100 base=10000 3397 sub dx, word [es:di + smOffset] 3398 sbb bx, word [es:di + smOffset + 2] 3399 jmp .got 3400 3401 .offset: 3402 mov si, word [bp + ?new_si] 3403 dec si 3404 nearcall skipcomma ; does not use es 3405 dec si 3406 mov dx, msg.wrt 3407 push es 3408 push ss 3409 pop es 3410 nearcall isstring? ; uses es 3411 pop es 3412 jne .offset_no_wrt 3413 3414 nearcall skipcomma ; does not use es 3415 3416 cmp al, '$' 3417 jne @F 3418 3419 or byte [bp + ?flags], ?flag_is_86m_segment 3420 nearcall skipcomma ; does not use es 3421 @@: 3422 3423 push word [hh_depth_of_single_term] 3424 mov dx, word [hh_depth] 3425 inc dx 3426 mov word [hh_depth_of_single_term], dx 3427 push ss 3428 pop es 3429 nearcall getexpression ; (recursive) uses es 3430 pop word [hh_depth_of_single_term] 3431 3432 ; The getexpression call may recurse into calling 3433 ; this function itself again. Therefore, it can 3434 ; invalidate the access slice. To make sure we 3435 ; can access the SYMMAIN entry again, reload it. 3436 push word [bp + ?main_index] 3437 push ax ; (reserve space, uninitialised) 3438 dualcall getfarpointer.main 3439 pop di 3440 pop es 3441 3442 nearcall skipcomm0 ; does not use es 3443 mov word [bp + ?new_si], si 3444 3445 test bx, bx 3446 jnz short .errorj1 3447 3448 mov bx, dx 3449 %if _PM 3450 test byte [bp + ?flags], ?flag_is_86m_segment 3451 jnz .wrt_rm 3452 nearcall ispm ; does not use es 3453 jnz .wrt_rm 3454 3455 mov ax, 0006h 3456 int 31h ; cx:dx = base 3457 jc short .errorj1 3458 xchg ax, cx ; ax:dx = base 3459 xchg dx, ax ; dx:ax = base 3460 jmp .offset_wrt 3461 3462 .wrt_rm: 3463 %endif 3464 xor dx, dx 3465 mov ax, bx 3466 mov cx, 4 3467 @@: 3468 shl ax, 1 3469 rcl dx, 1 3470 loop @B 3471 3472 .offset_wrt: 3473 ; dx:ax = seg base 3474 3475 ; offset=100 3476 ; linear=10100 3477 ; seg base=8000 3478 ; offset wrt seg=8100 3479 neg dx 3480 neg ax 3481 sbb dx, byte 0 ; neg dx:ax 3482 add ax, word [es:di + smLinear] 3483 adc dx, word [es:di + smLinear + 2] ; linear - seg base 3484 xchg ax, dx ; ax:dx = value 3485 xchg ax, bx ; bx:dx = value 3486 jmp .got 3487 3488 .errorj1: 3489 jmp error_expr ; does not use es 3490 3491 3492 .offset_no_wrt: 3493 mov dx, word [es:di + smOffset] 3494 mov bx, word [es:di + smOffset + 2] 3495 3496 .got: 3497 testopt [es:di + smFlags], smfBase 3498 jz @F 3499 push word [bp + ?main_index] 3500 pop word [sym_storage.main.based.base] 3501 ; if called from zz_add set up base 3502 @@: 3503 3504 mov si, word [bp + ?new_si] 3505 dec si 3506 lodsb 3507 clc 3508 jmp .ret 3509 .not: 3510 stc 3511 3512 mov si, word [bp + ?orig_si] 3513 mov ax, word [bp + ?orig_ax] 3514 .ret: 3515 push ss 3516 pop es ; reset es 3517 lleave 3518 retn 3519 %endif 3520 3521 3522 ; INP: al = first character 3523 ; si-> next character 3524 ; OUT: CY if no variable, 3525 ; al, si = unchanged 3526 ; NC if variable, 3527 ; bx-> low word 3528 ; dx-> high word 3529 ; (if cl <= 2 then dx-> some word in our memory) 3530 ; (dx != bx+2 if compound register) 3531 ; cl = size of variable (1, 2, 3, 4 bytes) 3532 ; ch = size of variable's name (2..13 bytes) 3533 ; (this is limited to ivfNameLengthLimit) 3534 ; INP:si - 1 -> variable's name 3535 ; (can be modified from original content) 3536 ; ah = 0 if a writeable variable (ie simply memory) 3537 ; 1 if a read-only variable (ie simply memory) 3538 ; 2..33 if an MMX register, see note below 3539 ; al = next character behind variable 3540 ; si-> behind next character 3541 ; dword [di] = mask of bits that are read-only 3542 ; CHG: ah, bx, dx, cx, di 3543 ; STT: ss = ds = es, UP 3544 ; 3545 ; Note: For read access to (half of) an MMX register, no 3546 ; special handling is necessary at all, because cl, 3547 ; bx, and dx are set up to access a buffer that 3548 ; contains the current value. (The value should be 3549 ; read at once though, as the buffer may be shared 3550 ; or become outdated otherwise.) 3551 ; Write access to an MMX register must be handled 3552 ; specifically, however. The returned field type 3553 ; in ah indicates the register number (0..7) in the 3554 ; lowest three bits. The two bits above those specify 3555 ; the access type, which also specifies what was read 3556 ; but need not be examined by readers. The access 3557 ; type must be adhered to by writers. These are the 3558 ; access types: 3559 ; 0 zero extension from 32 bits to write all 64 bits 3560 ; 1 sign extension from 32 bits to write all 64 bits 3561 ; 2 writes only low 32 bits 3562 ; 3 writes only high 32 bits 3563 ; (Access type 3 is the only one for which the read 3564 ; buffer is initialised with the high 32 bits.) 3565 ; 3566 ; As dx points to 'some word in our memory' if it 3567 ; doesn't serve any purpose, it is still valid to 3568 ; read the word that it points to. Particularly dx 3569 ; mustn't contain 0FFFFh then, but with the current 3570 ; implementation, it can also be assumed that we do 3571 ; actually 'own' the word (even with a PM segment 3572 ; shorter than 64 KiB the read would be allowed). 3573 isvariable?: section_of_function 0 00004581 A8 db __TEST_IMM8 ; (skip stc, NC) 3575 3576 ; As above but additionally: 3577 ; 3578 ; INP: di -> buffer to receive variable name, 14 bytes 3579 ; OUT: if NC, buffer filled with all-caps ASCIZ name 3580 .return_name: section_of_function isvariable? 0 00004582 F9 stc 3582 0 00004583 4E dec si 3584 lframe 0 00004584 5589E5 lenter 3586 lvar word, bit0_is_return_name 0 00004587 9C pushf 3588 lvar word, return_name_pointer 0 00004588 57 push di 3590 %if ivfNameLengthLimit != 13 3591 %error Adjust code here to new ivfNameLengthLimit 3592 %endif 0 00004589 31C0 xor ax, ax 3594 lvar 16, namebuffer 0 0000458B 50 push ax ; ax = 0 so that accidentally reading past 3596 ; the actual buffer wouldn't match 0 0000458C FF740C push word [si+12] 0 0000458F FF740A push word [si+10] 0 00004592 FF7408 push word [si+8] 0 00004595 FF7406 push word [si+6] 0 00004598 FF7404 push word [si+4] 0 0000459B FF7402 push word [si+2] 0 0000459E FF34 push word [si] 0 000045A0 89E7 mov di, sp ; -> name buffer 3605 3606 lvar word, fieldtype_high_flags_low 3607 lequ ?fieldtype_high_flags_low + 1, fieldtype 3608 lequ ?fieldtype_high_flags_low, flags 0 000045A2 50 push ax ; field type initialised to 0 (RW), flags too 0 000045A3 31DB _386 xor bx, bx ; (a flag for the 32-bit register name check) 3611 lvar word, length_to_add 0 000045A5 50 push ax ; = 0 3613 lvar word, startpointer 0 000045A6 56 push si ; -> name start 0 000045A7 89FE mov si, di 0 000045A9 57 push di 3617 0 000045AA B91000 mov cx, 16 3619 .store: 0 000045AD AC lodsb 3621 ; nearcall uppercase; (isseparator? calls uppercase) 0 000045AE E86FFA nearcall isseparator? 0 000045B1 F8 clc 0 000045B2 7501 jne short .not_separator 0 000045B4 F9 stc 3626 .not_separator: 0 000045B5 D1DA rcr dx, 1 ; dl = flags indicating separators 0 000045B7 AA stosb 0 000045B8 E2F3 loop .store 3630 0 000045BA 5E pop si 3632 0 000045BB F646FE01 test byte [bp + ?bit0_is_return_name], 1 0 000045BF 7409 jz @F 3635 0 000045C1 56 push si 0 000045C2 B107 mov cl, 14 >> 1 0 000045C4 8B7EFC mov di, word [bp + ?return_name_pointer] 0 000045C7 F3A5 rep movsw 0 000045C9 5E pop si 3641 3642 @@: 0 000045CA F6C214 test dl, 1<<2|1<<4 0 000045CD AD lodsw 0 000045CE 7503E9A500 jz .notreg16 3646 0 000045D3 E88C00 call .reg16names_match ; (iff no match, --> .notreg16) 3648 ; bx-> regs entry of (first) match 0 000045D6 F6C204 test dl, 1<<2 0 000045D9 AD lodsw 0 000045DA 7436 jz @F 0 000045DC F6C220 test dl, 1<<5 0 000045DF 742E jz .reg16_j 0 000045E1 817CFC464C cmp word [si - 4], "FL" 0 000045E6 7527 jne .reg16_j 0 000045E8 3C2E cmp al, '.' 0 000045EA 7523 jne .reg16_j 0 000045EC 4E dec si 0 000045ED AD lodsw 0 000045EE BF[0000] mov di, flagnames 0 000045F1 B9[0000] mov cx, flagbits.amount 0 000045F4 F2AF repne scasw 0 000045F6 7517 jne .reg16_j 3664 %if _LINK 0 000045F8 8B85[FEFF] mov ax, [word di - 2 + flagbits] 3666 wlcalc word_minusext_flagnames, equ $ - 2 3667 %elif _LINK_COMPAT 3668 mov ax, [word di - (flagnames + 2) + flagbits] 3669 %else 3670 mov ax, [di - (flagnames + 2) + flagbits] 3671 %endif 0 000045FC BB[0000] mov bx, flagvaron 0 000045FF 8506[0000] test ax, word [reg_efl] 0 00004603 7501 jnz .flagon 0 00004605 43 inc bx 3676 .flagon: 0 00004606 B90105 mov cx, (5 << 8) | 1 ; 5-byte name, 1-byte variable 0 00004609 FE46EB inc byte [bp + ?fieldtype] 3679 ; = 1 (RO) 0 0000460C E9D300 jmp .return_success_var32_set_dx 3681 3682 .reg16_j: 0 0000460F E9CC00 jmp .reg16 ; iff single match --> 3684 3685 @@: 0 00004612 3D3030 cmp ax, "00" 0 00004615 743E je .compoundwithzero 3688 3689 ; Check for a second 16-bit register name 3690 ; (ie check for a compound register name) 0 00004617 E84800 call .reg16names_match ; (iff no match, --> .notreg16) 3692 ; bx-> regs entry of second match 0 0000461A 92 xchg dx, ax ; dx-> regs entry of first match 0 0000461B B90404 mov cx, 4<<8|4 3695 .return_success: ; cx, bx, dx, ?fieldtype set 0 0000461E 31C0 xor ax, ax 0 00004620 88C8 mov al, cl 0 00004622 F7D8 neg ax 0 00004624 05[3C0B] add ax, masks + 4 ; 4 - size = offset into masks 0 00004627 97 xchg di, ax ; di -> mask 0 00004628 807EEB01 cmp byte [bp + ?fieldtype], 1 0 0000462C 7503 jne @F 0 0000462E BF[3C0B] mov di, mask_0byte ; di -> mask 3704 @@: 3705 .return_success_di: 0 00004631 31C0 xor ax, ax 0 00004633 88E8 mov al, ch ; ax = length 3708 0 00004635 F646FE01 test byte [bp + ?bit0_is_return_name], 1 0 00004639 7407 jz @F 3711 0 0000463B 8B76FC mov si, word [bp + ?return_name_pointer] 0 0000463E 01C6 add si, ax 0 00004640 8824 mov byte [si], ah ; zero-terminate 3715 @@: 3716 0 00004642 5E pop si ; ?startpointer 0 00004643 F646EA01 testopt [bp + ?flags], 1 0 00004647 7402 jz @F 0 00004649 58 pop ax ; get length to add to start 0 0000464A 50 push ax ; fill stack slot again 3722 @@: 0 0000464B 01C6 add si, ax ; -> behind name (should NC) 0 0000464D 58 pop ax ; discard ?length_to_add 0 0000464E F8 clc ; (NC) 3726 .return_ax_frame_lodsb: 0 0000464F 58 pop ax ; ah = ?type 0 00004650 89EC5D lleave code 0 00004653 AC lodsb 3730 .retn: 0 00004654 C3 retn 3732 3733 3734 .compoundwithzero: 0 00004655 BF[400B] mov di, mask_compoundwithzero 3736 ; only allow writing upper word 0 00004658 B90404 mov cx, 4 << 8 | 4 ; 4-byte name, 4-byte variable 3738 .return_compoundwithzero: 0 0000465B 89DA mov dx, bx ; -> word to use as upper word 0 0000465D BB[420B] mov bx, mask_compoundwithzero + 2 3741 ; -> (constant) word that is zero, as lower word 3742 ; This depends on the contents of mask_compoundwithzero. 0 00004660 EBCF jmp .return_success_di 3744 3745 3746 ; INP: ax = capitalised candidate register name 3747 ; ch = 0 3748 ; dx, si, bx, etc set up for later checks 3749 ; OUT: Iff match, 3750 ; bx-> associated regs entry (dword-aligned) 3751 ; ax = INP:bx 3752 ; Else, 3753 ; returns to .notreg16 3754 ; bx left unchanged on 386 systems 3755 ; CHG: cl, di, bx, ax 3756 ; 3757 ; Note: The 32-bit register name check depends on the 3758 ; fact that the low two bits of bx are set to 3759 ; zero on a match, which is true because regs 3760 ; is dword-aligned. 3761 ; It also depends on bx being left unchanged on 3762 ; a mismatch, which is the case unless the 3763 ; non-386 additional FS,GS filtering occurs. 3764 .reg16names_match: 0 00004662 BF[0000] mov di, reg16names 0 00004665 B110 mov cl, 16 0 00004667 F2AF repne scasw 0 00004669 750C jne short .notreg16_pop ; no match --> 0 0000466B 01FF add di, di 0 0000466D 93 xchg ax, bx ; (returned for compound register name match) 3771 %if _LINK 0 0000466E 8D9D[FCFF] lea bx, [word di - 2*2 + regs] 3773 wlcalc word_minusext_reg16names, equ $ - 2 3774 wlcalc word_minusext_reg16names, equ $ - 2 3775 %else 3776 lea bx, [di -2*(reg16names+DATASECTIONFIXUP+2) +regs] 3777 %endif 3778 ; -> regs entry 0 00004672 C3 _386 retn 3780 ; cx = number of remaining reg16names 0 00004673 D1E9 _no386 shr cx, 1 ; cx = number of remaining reg16names pairs 3782 ; = 1 iff exactly the IP,FL pair remaining 3783 ; (ie matched one of FS,GS) 0 00004675 E2DD _no386 loop .retn ; iff cx != 1, return the match --> 3785 ; on non-386 systems, FS,GS matches fall through here 3786 .notreg16_pop: 0 00004677 58 pop ax ; (discard near return address) 3788 .notreg16: 3789 ; Check for a 32-bit register name 0 00004678 F6C208 _386 test dl, 1<<3 0 0000467B 7419 _386 jz short .notreg32 3792 0 0000467D 8D76EC _386 lea si, [bp+?namebuffer] 0 00004680 AC _386 lodsb 0 00004681 D0EB _386 shr bl, 1 ; CY iff second entry during same call 3796 ; (in that case, al contains 'E') 0 00004683 1C45 _386 sbb al, 'E' ; possibly an 'E' register ? (on first entry) 0 00004685 AD _386 lodsw 0 00004686 750E _386 jne short .notreg32 ; no --> (or after second entry) 0 00004688 43 _386 inc bx ; prepare flag for second entry 3801 ; (this requires regs to be dword-aligned!) 0 00004689 80FC53 _386 cmp ah, 'S' ; candidate segment register ? 0 0000468C 7408 _386 je short .notreg32 ; yes, skip check (disallow match) --> 3804 0 0000468E E8D1FF _386 call .reg16names_match ; (iff no match, --> .notreg16 (second entry)) 3806 ; bx-> regs entry of match 0 00004691 B90403 _386 mov cx, 3<<8|4 0 00004694 EB4C _386 jmp short .return_success_var32_set_dx 3809 3810 .notreg32: 3811 ; Check for an 8-bit register name 0 00004696 F6C214 test dl, 1 << 2 | 1 << 4 0 00004699 744D jz .notreg8 3814 0 0000469B 8D76EC lea si, [bp+?namebuffer] 0 0000469E AD lodsw 0 0000469F BF[0000] mov di, reg8names 0 000046A2 B108 mov cl, 8 0 000046A4 F2AF repne scasw 0 000046A6 7540 jne short .notreg8 3821 ; cx = cl = number of remaining reg8names 0 000046A8 80E101 and cl, 1 ; cx = cl = 1 iff an xL register, else 0 3823 %if _LINK 0 000046AB 8D9D[FDFF] lea bx, [word di + regs - 2 - 1] 3825 wlcalc word_minusext_reg8names, equ $ - 2 3826 %else 3827 lea bx, [di-reg8names-2+regs-1] 3828 %endif 3829 ; bx-> reg_eax-1 if AL, reg_eax+1 if AH, etc 0 000046AF 01CB add bx, cx ; bx-> reg_eax if AL, reg_eax+1 if AH, etc 0 000046B1 B101 mov cl, 1 3832 0 000046B3 F6C204 test dl, 1 << 2 0 000046B6 7528 jnz .got2bytename 3835 0 000046B8 AD lodsw 0 000046B9 3D3030 cmp ax, "00" 0 000046BC 7417 je .compoundreg8withzero 3839 0 000046BE BF[0000] mov di, reg16names 0 000046C1 B110 mov cl, 16 0 000046C3 F2AF repne scasw 0 000046C5 7521 jne short .notreg8 ; no match --> 0 000046C7 01FF add di, di 0 000046C9 87D3 xchg dx, bx 3846 %if _LINK 0 000046CB 8D9D[FCFF] lea bx, [word di - 2*2 + regs] 3848 wlcalc word_minusext_reg16names, equ $ - 2 3849 wlcalc word_minusext_reg16names, equ $ - 2 3850 %else 3851 lea bx, [di -2*(reg16names+DATASECTIONFIXUP+2) +regs] 3852 %endif 3853 ; -> regs entry 3854 ; bx-> regs entry of second match 3855 ; dx-> regs entry of first match 0 000046CF B90304 mov cx, 4 << 8 | 3 ; 4-byte name, 3-byte variable 0 000046D2 E949FF jmp .return_success ; cx, bx, dx, ?fieldtype set 3858 3859 .compoundreg8withzero: 0 000046D5 BF[440B] mov di, mask_compoundreg8withzero 3861 ; only allow writing low byte of upper word 0 000046D8 B90304 mov cx, 4 << 8 | 3 ; 4-byte name, 3-byte variable 0 000046DB E97DFF jmp .return_compoundwithzero 3864 3865 .reg16: 0 000046DE B102 mov cl, 2 3867 .got2bytename: 3868 .got2bytename_var32_set_dx: 0 000046E0 B502 mov ch, 2 3870 .return_success_var32_set_dx: 0 000046E2 8D5702 lea dx, [bx+2] ; (irrelevant to 8-/16-bit register return) 3872 %define .return_success_j .return_success_j1 3873 %[.return_success_j]: 0 000046E5 E936FF jmp .return_success 3875 3876 .notreg8: 3877 0 000046E8 BF[A607] mov di, isvariable_morebyte_nameheaders 3879 3880 .loop: 0 000046EB 8366EA00 and word [bp + ?fieldtype_high_flags_low], 0 3882 ; clear in case earlier iteration set it 3883 0 000046EF 8B46EC mov ax, word [bp + ?namebuffer] 0 000046F2 B9[EA08] mov cx, isvariable_morebyte_nameheaders.end 0 000046F5 39CF cmp di, cx 0 000046F7 730A jae @F 0 000046F9 29F9 sub cx, di 0 000046FB D1E9 shr cx, 1 ; = how many headers remaining 0 000046FD F2AF repne scasw 0 000046FF 7421 je .check_morebyte 3892 %if IVS_HAVE_ONEBYTE 0 00004701 EB0C jmp .next_no_pop 3894 3895 @@: 3896 %if IVS_SINGLE_ONEBYTE 0 00004703 41 inc cx 0 00004704 39CF cmp di, cx ; iteration after one byte var check ? 0 00004706 7309 jae @F ; yes, end --> 0 00004708 47 inc di ; remember we did the one byte check 0 00004709 3C56 cmp al, IVS_SINGLE_ONEBYTE_NAME 0 0000470B 740A je .check_onebyte 3903 %else 3904 mov cx, isvariable_onebyte_names.end 3905 sub cx, di ; = how many names remaining 3906 jbe @F ; if none --> 3907 repne scasb 3908 je .check_onebyte 3909 %endif 3910 %endif 0 0000470D A8 db __TEST_IMM8 ; (skip pop) 3912 .next: 0 0000470E 5F pop di 3914 .next_no_pop: 0 0000470F EBDA jmp .loop 3916 3917 @@: 3918 .end: 3919 .return_failure: 0 00004711 5E pop si ; ?startpointer 0 00004712 58 pop ax ; ?length_to_add 0 00004713 F9 stc 0 00004714 E938FF jmp .return_ax_frame_lodsb 3924 3925 3926 %if IVS_HAVE_ONEBYTE 3927 .check_onebyte: 0 00004717 57 push di 3929 %if IVS_SINGLE_ONEBYTE 0 00004718 BB[3A01] mov bx, isvariable_struc_onebyte_list 3931 %else 3932 sub di, isvariable_onebyte_names + 1 3933 ; = index 3934 %if ISVARIABLESTRUC_size == 10 3935 add di, di ; = index * 2 3936 mov bx, di ; = index * 2 3937 add di, di ; = index * 4 3938 add di, di ; = index * 8 3939 add di, bx ; = index * 10 3940 %else 3941 %error Unexpected structure size 3942 %endif 3943 lea bx, [di + isvariable_struc_onebyte_list] 3944 %endif 0 0000471B 8D76ED lea si, [bp + ?namebuffer + 1] ; -> buffered string (allcaps) 0 0000471E 31C9 xor cx, cx ; = 0, gets incremented next 0 00004720 EB25 jmp @F 3948 %endif 3949 3950 .check_morebyte: 0 00004722 57 push di 0 00004723 81EF[A807] sub di, isvariable_morebyte_nameheaders + 2 3953 ; = index * 2 3954 %if ISVARIABLESTRUC_size == 10 0 00004727 89FB mov bx, di ; = index * 2 0 00004729 01FF add di, di ; = index * 4 0 0000472B 01FF add di, di ; = index * 8 0 0000472D 01DF add di, bx ; = index * 10 3959 %else 3960 %error Unexpected structure size 3961 %endif 0 0000472F 8D9D[4401] lea bx, [di + isvariable_struc_morebyte_list] 0 00004733 8B4F02 mov cx, word [bx + ivFlags] 0 00004736 83E10F and cx, ivfNameLengthMask ; cx = length 0 00004739 8B3F mov di, word [bx + ivName] ; -> name 0 0000473B 8D76EE lea si, [bp + ?namebuffer + 2] ; -> buffered string (allcaps) 0 0000473E 38C0 cmp al, al ; ZR (in case remaining length is zero) 0 00004740 51 push cx 0 00004741 F3A6 repe cmpsb ; compare 0 00004743 59 pop cx 0 00004744 75C8 jne .next ; if not same --> 0 00004746 41 inc cx ; increment twice 3973 @@: 0 00004747 41 inc cx ; increment once 0 00004748 AC lodsb ; get next byte in buffer 0 00004749 807F0800 cmp byte [bx + ivArrayLast], 0 0 0000474D 7503E9D100 je .notarray 3978 3979 .array: 0 00004752 3C28 cmp al, '(' 0 00004754 7554 jne .array_not_index_expression ; not index expression --> 3982 3983 .array_index_expression: 0 00004756 8B76E6 mov si, word [bp + ?startpointer] 0 00004759 01CE add si, cx ; -> at opening parens 0 0000475B 46 inc si ; -> behind opening parens 0 0000475C AC lodsb 0 0000475D 52 push dx 0 0000475E 53 push bx 0 0000475F E8D502 nearcall getexpression 0 00004762 50 push ax 0 00004763 80E43F and ah, 3Fh 0 00004766 80FC08 cmp ah, 8 ; from checksignificantbits 0 00004769 58 pop ax 0 0000476A B600 mov dh, 0 0 0000476C 89D7 mov di, dx ; di = index 0 0000476E 5B pop bx 0 0000476F 5A pop dx 0 00004770 779C ja short .next ; more than 8 significant bits --> 0 00004772 E8[0000] nearcall skipwh0 0 00004775 3C29 cmp al, ')' ; insure closing parens 0 00004777 753F jne short .error_j3 4003 0 00004779 56 push si 0 0000477A 2B76E6 sub si, word [bp + ?startpointer] 4006 ; = how much to skip 0 0000477D 8976E8 mov word [bp + ?length_to_add], si 0 00004780 5E pop si 0 00004781 804EEA01 setopt [bp + ?flags], 1 4010 0 00004785 F646FE01 test byte [bp + ?bit0_is_return_name], 1 0 00004789 7415 jz .array_no_return_name 4013 0 0000478B 97 xchg ax, di 0 0000478C 8B7EFC mov di, word [bp + ?return_name_pointer] 0 0000478F 01CF add di, cx ; -> behind name 0 00004791 807F080F cmp byte [bx + ivArrayLast], 0Fh 0 00004795 7705 ja @F ; if >= 10h is a valid index --> 0 00004797 E8[0000] nearcall hexnyb ; expand to single digit 0 0000479A EB03 jmp @FF 4021 @@: 0 0000479C E8[0000] nearcall hexbyte ; expand to two digits 4023 @@: 0 0000479F 97 xchg ax, di ; restore di = index 4025 4026 .array_no_return_name: 0 000047A0 41 inc cx ; make space for one digit 0 000047A1 807F080F cmp byte [bx + ivArrayLast], 0Fh 0 000047A5 7601 jna @F ; if maximum index <= 0Fh --> 0 000047A7 41 inc cx ; make space for another digit 4031 @@: 0 000047A8 EB66 jmp .array_index_expression_common 4033 4034 .array_not_index_expression: 0 000047AA E873F8 nearcall isseparator? ; name ends ? 0 000047AD 750C jne @F ; no --> 0 000047AF F6470302 testopt [bx + ivFlags], ivfArrayOptional 4038 ; is the index optional ? 0 000047B3 7573 jnz .arrayfirst ; yes, handle as if first --> 4040 .next_j1: 0 000047B5 E956FF jmp .next ; no, mismatch --> 4042 4043 .error_j3: 0 000047B8 E9[0000] jmp error_expr 4045 4046 @@: 0 000047BB E88D07 nearcall getnyb 0 000047BE 72F5 jc .next_j1 0 000047C0 98 cbw ; ax = first nybble of index 0 000047C1 97 xchg di, ax ; di = first nybble of index 0 000047C2 AC lodsb 0 000047C3 F6470304 testopt [bx + ivFlags], ivfSeparatorSpecial 0 000047C7 740D jz @F 0 000047C9 807F080F cmp byte [bx + ivArrayLast], 0Fh 4055 ; highest > 0Fh ? 0 000047CD 7635 jna .gotseparatorspecial; no --> 0 000047CF E87907 nearcall getnyb 0 000047D2 7230 jc .gotseparatorspecial ; not hexit, treat as separator --> 0 000047D4 EB10 jmp .have_second_digit ; have al == 0..0Fh 4060 4061 @@: 0 000047D6 E847F8 nearcall isseparator? ; single digit ? 0 000047D9 7424 je @F ; yes --> 0 000047DB 807F080F cmp byte [bx + ivArrayLast], 0Fh 4065 ; highest > 0Fh ? 0 000047DF 76D4 jna .next_j1 ; no --> 4067 .get_second_digit: 0 000047E1 E86707 nearcall getnyb 0 000047E4 72CF jc .next_j1 4070 .have_second_digit: 0 000047E6 98 cbw ; ax = second nybble of index 0 000047E7 01FF add di, di 0 000047E9 01FF add di, di 0 000047EB 01FF add di, di 0 000047ED 01FF add di, di ; di = first digit times 16 0 000047EF 01C7 add di, ax ; di = full index 0 000047F1 AC lodsb 0 000047F2 F6470304 testopt [bx + ivFlags], ivfSeparatorSpecial 0 000047F6 7507 jnz @F 0 000047F8 E825F8 nearcall isseparator? 0 000047FB 75B8 jne .next_j1 0 000047FD EB05 jmp .gotseparatorspecial 4083 @@: ; make sure no hexit follows 0 000047FF E84907 nearcall getnyb 0 00004802 73B1 jnc .next_j1 4086 .gotseparatorspecial: 4087 0 00004804 F7DE neg si ; minus -> after separator 0 00004806 8D4AED lea cx, [bp + ?namebuffer + 1 + si] 4090 ; -> buffered string plus 1 minus -> after separator 4091 ; -> buffered string plus 1 minus (-> at separator plus 1) 4092 ; -> buffered string minus -> at separator 0 00004809 F7D9 neg cx ; -> at separator minus -> buffered string 0 0000480B 8B76E6 mov si, word [bp + ?startpointer] 0 0000480E 01CE add si, cx 4096 4097 .array_index_expression_common: 4098 ; si -> behind index 0 00004810 89F8 mov ax, di 4100 ; test ah, ah 4101 ; jnz short .error_j1 ; (not possible) 0 00004812 3A4708 cmp al, byte [bx + ivArrayLast] 4103 ; index > last ? 0 00004815 779E ja short .next_j1 ; then error --> 4105 0 00004817 F6470301 testopt [bx + ivFlags], ivfArrayOneBased 0 0000481B 7403 jz @F ; got index 0 0000481D 48 dec ax ; decrement index to get 0-based 0 0000481E 7895 js short .next_j1 ; if it was 0, invalid --> 4110 @@: 0 00004820 96 xchg ax, si ; si = index 0 00004821 EB07 jmp .arraycommon ; continue 4113 4114 4115 .notarray: 0 00004823 E8FAF7 nearcall isseparator? ; name ends ? 0 00004826 758D jne short .next_j1 ; no, mismatch --> 4118 4119 .arrayfirst: 0 00004828 31F6 xor si, si ; si = array index (0 here) 4121 4122 .arraycommon: 0 0000482A 88CD mov ch, cl ; ch = name length 0 0000482C 8B4702 mov ax, word [bx + ivFlags] 0 0000482F 83E030 and ax, ivfVarLengthMask; ax = shifted encoded var length 0 00004832 B104 mov cl, ivfVarLengthShift 0 00004834 D3E8 shr ax, cl ; ax = encoded var length 0 00004836 40 inc ax ; decode var length 0 00004837 88C1 mov cl, al ; cl = var length 4130 0 00004839 96 xchg ax, si ; ax = array index 4132 0 0000483A F6470280 testopt [bx + ivFlags], ivfReadOnly 0 0000483E 7403 jz @F 0 00004840 FE46EB inc byte [bp + ?fieldtype] 4136 ; = 1 (RO) 4137 @@: 0 00004843 31FF xor di, di ; (NC) 0 00004845 8B7706 mov si, word [bx + ivSetup] 0 00004848 FFD6 call si ; INP: ax = array index (0-based) 4141 ; di = 0 4142 ; cl = default size of variable (1..4) 4143 ; ch = length of variable name 4144 ; bx -> ISVARIABLESTRUC structure 4145 ; CHG: ax, bx, cx, dx, si, di 4146 ; OUT: NC if valid, 4147 ; bx -> var, di = 0 or di -> mask 4148 ; cl = size of variable (1..4) 4149 ; ch = length of variable name 0 0000484A 7303E9BFFE jc .next 0 0000484F 5A pop dx ; (discard pointer into names/headers) 0 00004850 8D5702 lea dx, [bx+2] ; (irrelevant to 8-/16-bit register return) 0 00004853 85FF test di, di 0 00004855 7503E9C4FD jz .return_success 0 0000485A E9D4FD jmp .return_success_di 4156 4157 4158 default_variable_setup: section_of_function 0 0000485D 8A5709 mov dl, byte [bx + ivArrayBetween] 0 00004860 B600 mov dh, 0 ; dx = array between offset 0 00004862 00CA add dl, cl 0 00004864 10F6 adc dh, dh ; dx = array item size 0 00004866 F7E2 mul dx ; dx:ax = ax times dx 0 00004868 85D2 test dx, dx 0 0000486A 7507 jnz short .error_j2 0 0000486C 034704 add ax, word [bx + ivAddress] 4167 ; ax -> variable 0 0000486F 7202 jc short .error_j2 4169 ; NC 0 00004871 93 xchg ax, bx ; bx -> variable 0 00004872 C3 retn 4172 4173 .error_j2: 0 00004873 E9[0000] jmp error_expr 4175 4176 4177 %if _MMXSUPP 4178 var_mm_setup: section_of_function 0 00004876 803E[0000]01 cmp byte [has_mmx], 1 ; MMX supported ? 0 0000487B 7301 jae @F ; yes --> 0 0000487D C3 retn ; (CY) 4182 4183 @@: 4184 [cpu 586] 0 0000487E 50 push ax 0 0000487F 8D76EF lea si, [bp + ?namebuffer + 3] 4187 ; -> may be type letter, if not index expression 0 00004882 F646EA01 testopt [bp + ?flags], 1 0 00004886 7409 jz @F 0 00004888 8B76E6 mov si, word [bp + ?startpointer] 0 0000488B 0376E8 add si, word [bp + ?length_to_add] 0 0000488E FF46E8 inc word [bp + ?length_to_add] 4193 4194 @@: 0 00004891 AC lodsb ; load what may be type letter 0 00004892 E8[0000] nearcall capitalise 4197 0 00004895 3C5A cmp al, 'Z' 0 00004897 7418 je @F ; 0 = ZX low --> 0 00004899 B310 mov bl, 2<<3 ; = 10h = low 0 0000489B 3C4C cmp al, 'L' 0 0000489D 7414 je @FF 0 0000489F B308 mov bl, 1<<3 ; = 8h = SX low 0 000048A1 3C53 cmp al, 'S' 0 000048A3 740E je @FF 0 000048A5 B318 mov bl, 3<<3 ; = 18h = high 0 000048A7 3C48 cmp al, 'H' 0 000048A9 7408 je @FF 0 000048AB FF4EE8 dec word [bp + ?length_to_add] 0 000048AE 4E dec si ; -> back at the last text 4211 ; (subsequent code will check for separator) 0 000048AF B000 mov al, 0 4213 @@: 0 000048B1 B300 mov bl, 0 ; 0 = ZX low 4215 @@: ; is valid letter 0 000048B3 50 push ax 0 000048B4 AC lodsb ; = candidate separator 0 000048B5 E868F7 nearcall isseparator? ; is it ? 0 000048B8 58 pop ax 0 000048B9 754E jne .ret_CY_pop ; no --> 4221 0 000048BB F646FE01 test byte [bp + ?bit0_is_return_name], 1 0 000048BF 7406 jz .no_return_name 4224 0 000048C1 8B76FC mov si, word [bp + ?return_name_pointer] 0 000048C4 884403 mov byte [si + 3], al ; store the additional letter (or 0) 4227 ; pointer + 3 ("MM" then hexit) 4228 4229 .no_return_name: 0 000048C7 84C0 test al, al 0 000048C9 58 pop ax 0 000048CA 7402 jz @F 0 000048CC FEC5 inc ch ; increment name length 4234 @@: 0 000048CE 93 xchg ax, bx 4236 4237 ; INP: bx = register number 0..7 4238 ; al = 0 for ZX low, 8 for SX low, 10h for low, 18h for high 0 000048CF 08D8 or al, bl 0 000048D1 40 inc ax 0 000048D2 40 inc ax 0 000048D3 8846EB mov byte [bp + ?fieldtype], al 4243 4244 %if _PM 4245 sub sp, 8 4246 call save_scratchsel 4247 %if _EXPRDUALCODE && _DUALCODE 4248 mov dx, word [code2_seg] 4249 %else 4250 mov dx, word [code_seg] 4251 %endif 4252 nearcall setes2dx ; es => lDEBUG_CODE/2 (writable) 4253 %else 4254 %if _EXPRDUALCODE && _DUALCODE 4255 mov es, word [code2_seg]; es => lDEBUG_CODE2 4256 %else 0 000048D6 8E06[0000] mov es, word [code_seg] ; es => lDEBUG_CODE 4258 %endif 4259 %endif 0 000048DA C0E303 shl bl, 3 ; shift into reg field 0 000048DD 80CB07 or bl, 07h ; code to get our ModR/M byte (r/m = [bx]) 0 000048E0 26881E[760B] mov byte [es:.getmmxlow_modrm], bl 4263 ; SMC in section lDEBUG_CODE or lDEBUG_CODE2 0 000048E5 26881E[830B] mov byte [es:.getmmxhigh_modrm], bl 4265 ; SMC in section lDEBUG_CODE or lDEBUG_CODE2 0 000048EA EB00 jmp @F ; try to invalidate prefetch 4267 @@: 4268 0 000048EC 16 push ss 0 000048ED 07 pop es 4271 4272 %if _PM 4273 call restore_scratchsel 4274 %endif 4275 0 000048EE BB[0000] mov bx, mmxbuff 4277 .getmmxlow: 4278 .getmmxlow_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 0 000048F1 0F7E07 movd dword [bx], mm0 ; first, initialise with low dword 4280 0 000048F4 3C18 cmp al, 18h ; want to write high dword ? 0 000048F6 720F jb .mmxcommon ; no --> 4283 4284 .getmmxhigh: 0 000048F8 83EC08 sub sp, byte 8 0 000048FB 89E0 mov ax, sp ; (ss = ds) 0 000048FD 93 xchg bx, ax ; bx -> qword on stack, ax -> mmxbuff 4288 .getmmxhigh_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 0 000048FE 0F7F07 movq qword [bx], mm0 0 00004901 93 xchg bx, ax ; restore bx -> mmxbuff 0 00004902 5E pop si 0 00004903 5E pop si ; discard low dword 0 00004904 668F07 pop dword [bx] ; save high dword here 4294 4295 .mmxcommon: 0 00004907 F8 clc 0 00004908 C3 retn 4298 __CPU__ 4299 4300 4301 .ret_CY_pop: 0 00004909 58 pop ax 4303 .ret_CY: 0 0000490A F9 stc 0 0000490B C3 retn 4306 %endif 4307 4308 4309 var_ri_setup: section_of_function 0 0000490C 8D76EF lea si, [bp + ?namebuffer + 3] 0 0000490F F646EA01 testopt [bp + ?flags], 1 0 00004913 740F jz @F 0 00004915 8B76E6 mov si, word [bp + ?startpointer] 0 00004918 0376E8 add si, word [bp + ?length_to_add] 0 0000491B FF46E8 inc word [bp + ?length_to_add] 0 0000491E 50 push ax 0 0000491F B301 mov bl, 1 ; set up 1 additional digit 0 00004921 AC lodsb ; load what must be type letter 0 00004922 EB0A jmp .expr 4320 4321 @@: 0 00004924 50 push ax 0 00004925 B3FF mov bl, -1 4324 @@: 0 00004927 AC lodsb ; al = candidate type letter, or hexit 0 00004928 43 inc bx ; count number of hexits 0 00004929 E81F06 nearcall getnyb 0 0000492C 73F9 jnc @B ; if was a hexit, loop --> 4329 .expr: ; al = type letter 0 0000492E E8[0000] nearcall capitalise 0 00004931 88C7 mov bh, al ; bh = letter 0 00004933 3C4C cmp al, 'L' ; valid one ? 0 00004935 740C je @F 0 00004937 3C4F cmp al, 'O' 0 00004939 7408 je @F 0 0000493B 3C53 cmp al, 'S' 0 0000493D 7404 je @F 0 0000493F 3C50 cmp al, 'P' 0 00004941 7565 jne .ret_CY_pop ; no --> 4340 @@: ; is valid letter 0 00004943 AC lodsb ; = candidate separator 0 00004944 E8D9F6 nearcall isseparator? ; is it ? 0 00004947 755F jne .ret_CY_pop ; no --> 0 00004949 58 pop ax 4345 0 0000494A F646FE01 test byte [bp + ?bit0_is_return_name], 1 0 0000494E 740E jz .interrupt_no_return_name 4348 0 00004950 89DF mov di, bx 0 00004952 81E7FF00 and di, 255 ; get number of additional hexits 0 00004956 037EFC add di, word [bp + ?return_name_pointer] 0 00004959 83C703 add di, 3 ; amount hexits + 3 + pointer 0 0000495C 883D mov byte [di], bh ; store the additional letter 4354 4355 .interrupt_no_return_name: 0 0000495E FEC5 inc ch ; increment name length 0 00004960 93 xchg ax, bx 4358 4359 ; INP: bx = interrupt number 0..255 4360 ; ah = 'S' for segment, 'O' for offset, 'L' for linear 4361 %if _PM 4362 sub sp, 8 4363 call save_scratchsel 4364 %endif 0 00004961 31F6 xor si, si 4366 %if _PM 4367 push bx 4368 nearcall setds2si ; ds => IVT 4369 pop bx 4370 %else 0 00004963 8EDE mov ds, si ; ds => IVT 4372 %endif 0 00004965 80FC53 cmp ah, 'S' 0 00004968 7502 jne @F 0 0000496A 46 inc si 0 0000496B 46 inc si ; si = 2 (displacement to get segment) 4377 @@: 0 0000496C 01DB add bx, bx 0 0000496E 01DB add bx, bx ; ds:bx -> IVT entry 0 00004970 FF7002 push word [bx + si + 2] 0 00004973 FF30 push word [bx + si] ; get segment:offset or trash:segment 0 00004975 16 push ss 0 00004976 1F pop ds 0 00004977 BB[9807] mov bx, interrupt_var 0 0000497A 8F07 pop word [bx] 0 0000497C 8F4702 pop word [bx + 2] 4387 ; store in variable 4388 %if _PM 4389 call restore_scratchsel 4390 %endif 0 0000497F 80FC50 cmp ah, 'P' ; for pointer type ? 0 00004982 741F je .var_size_4 ; yes --> 0 00004984 80FC4C cmp ah, 'L' 0 00004987 751C jne @FF 0 00004989 51 push cx 0 0000498A 31C0 xor ax, ax 0 0000498C 874702 xchg ax, word [bx + 2] ; clear high word, get segment 0 0000498F 31D2 xor dx, dx ; dx:ax = segment 0 00004991 B90400 mov cx, 4 4400 @@: 0 00004994 D1E0 shl ax, 1 0 00004996 D1D2 rcl dx, 1 0 00004998 E2FA loop @B ; shift up 4 bits 0 0000499A 0107 add word [bx], ax 0 0000499C 115702 adc word [bx + 2], dx ; add to dword 0 0000499F 59 pop cx 0 000049A0 B103 mov cl, 3 ; 3byte variable (21 bits needed) 0 000049A2 A9 db __TEST_IMM16 ; (skip mov) 4409 .var_size_4: 0 000049A3 B104 mov cl, 4 ; dword variable 4411 @@: 0 000049A5 31FF xor di, di ; (NC) 0 000049A7 C3 retn 4414 4415 .ret_CY_pop: 0 000049A8 58 pop ax 4417 .ret_CY: 0 000049A9 F9 stc 0 000049AA C3 retn 4420 4421 4422 4423 %if _INPUT_FILE_BOOT || _INPUT_FILE_HANDLES 4424 var_ysf_setup: section_of_function 0 000049AB 93 xchg ax, bx ; bx = index 0 000049AC 8A46ED mov al, byte [bp + ?namebuffer + 1] 0 000049AF 3C53 cmp al, 'S' 0 000049B1 750B jne @F 4429 %if _INPUT_FILE_BOOT 0 000049B3 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 000049B8 B042 mov al, 'B' 0 000049BA 7502 jnz @F 4433 %endif 0 000049BC B048 mov al, 'H' 4435 @@: 0 000049BE 3C42 cmp al, 'B' 0 000049C0 7509 jne @F 4438 %if _INPUT_FILE_BOOT 0 000049C2 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 000049C7 750D jnz @FF 4441 %endif 4442 .notysf: 0 000049C9 F9 stc 0 000049CA C3 retn 4445 @@: 4446 %if _INPUT_FILE_HANDLES 0 000049CB 3C48 cmp al, 'H' 0 000049CD 75FA jne short .notysf 0 000049CF F606[0200]10 testopt [internalflags2], dif2_input_file 0 000049D4 74F3 jz .notysf 4451 %else 4452 jmp .notysf 4453 %endif 4454 @@: 4455 ; bx = index 4456 %if _INPUT_FILE_HANDLES 0 000049D6 BF[0000] mov di, input_file_handles.active 4458 ; -> active index for YHF 4459 %endif 4460 %if _INPUT_FILE_BOOT 4461 %if _INPUT_FILE_HANDLES 0 000049D9 3C42 cmp al, 'B' 0 000049DB 7503 jne @F 4464 %endif 0 000049DD BF[0000] mov di, load_input_file.active 4466 ; -> active index for YBF 4467 @@: 4468 %endif 0 000049E0 F7DB neg bx ; -1 .. 0 0 000049E2 7406 jz @F ; if 0, always valid --> 4471 ; index was nonzero, meaning bx now holds a 4472 ; negative number. if [.active] is large enough, 4473 ; adding it to bx yields a positive number, which 4474 ; carries in the addition. check for that. 0 000049E4 031D add bx, word [di] 0 000049E6 73E1 jnc .notysf ; not valid index --> 0 000049E8 EB02 jmp @FF ; valid, use it 4478 @@: 0 000049EA 031D add bx, word [di] 4480 ; 0 means the topmost level 4481 @@: 4482 %if _INPUT_FILE_BOOT 4483 %if _INPUT_FILE_HANDLES 0 000049EC 3C42 cmp al, 'B' 0 000049EE 750D jne @F 4486 %endif 4487 0 000049F0 B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 000049F3 93 xchg ax, bx 0 000049F4 F7E3 mul bx ; dx ignored, should be zero 0 000049F6 93 xchg ax, bx ; bx = offset into array 0 000049F7 81C3[2600] add bx, load_input_file - LOADDATA3 + ldFATType 4493 ; -> flag word 0 000049FB EB0A jmp @FF 4495 4496 @@: 4497 %endif 4498 %if _INPUT_FILE_HANDLES 0 000049FD D1E3 shl bx, 1 0 000049FF D1E3 shl bx, 1 0 00004A01 D1E3 shl bx, 1 ; to qword array index 4502 %if INPUTFILEHANDLE_size != 8 4503 %error Unexpected structure size 4504 %endif 0 00004A03 81C3[0200] add bx, input_file_handles + ifhFlags 4506 ; -> flags word 4507 %endif 4508 @@: 0 00004A07 BF[480B] mov di, mask_ysf ; give the mask of read-only bits 0 00004A0A F8 clc 0 00004A0B C3 retn 4512 %endif 4513 4514 4515 lleave ctx 4516 4517 4518 ; INP: al, si-> string 4519 ; OUT: CY if no valid digit 0..7 4520 ; NC if valid digit, 4521 ; bl = 0..7 4522 ; al, si-> behind digit specification 4523 ; CHG: bl 4524 getstmmxdigit: section_of_function 0 00004A0C 3C28 cmp al, '(' 0 00004A0E 7407 je .paropen 0 00004A10 E81A00 call .isdigit? 0 00004A13 7201 jc .ret 4529 .retlodsb: 0 00004A15 AC lodsb 4531 .ret: 0 00004A16 C3 retn 4533 4534 .paropen: 0 00004A17 50 push ax 0 00004A18 56 push si 0 00004A19 AC lodsb 0 00004A1A E81000 call .isdigit? 0 00004A1D 720B jc .retpop 0 00004A1F AC lodsb 0 00004A20 3C29 cmp al, ')' ; closing parenthesis ? 0 00004A22 F9 stc 0 00004A23 7505 jne .retpop ; no --> (CY) 0 00004A25 83C404 add sp, byte 4 ; discard saved registers (NC) 0 00004A28 EBEB jmp short .retlodsb 4546 4547 .retpop: 0 00004A2A 5E pop si 0 00004A2B 58 pop ax 0 00004A2C C3 retn 4551 4552 .isdigit?: 0 00004A2D 88C3 mov bl, al 0 00004A2F 80EB30 sub bl, '0' 0 00004A32 80FB08 cmp bl, 8 ; valid digit 0..7 ? (CY if so) 0 00004A35 F5 cmc ; NC if so 0 00004A36 C3 retn 4558 4559 4560 %if _EXPRDUALCODE && _DUALCODE 4561 usesection lDEBUG_CODE2 4562 %else 4563 usesection lDEBUG_CODE 4563 ------------------ note: usesection lDEBUG_CODE 4564 %endif 4565 isvariable_code_size equ $ - isvariable_code 4566 4567 4568 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 4568 ------------------ note: usesection lDEBUG_DATA_ENTRY 4569 isvariable_data_size equ $ - isvariable_data 4570 4571 numdef SHOW_ISVARIABLE_SIZE, _DEFAULTSHOWSIZE 4572 %if _SHOW_ISVARIABLE_SIZE 4573 %assign CODESIZE isvariable_code_size 4574 %assign DATASIZE isvariable_data_size 4575 %warning isvariable size: CODESIZE code, DATASIZE data 4576 %endif 4577 4578 4579 align 2, db 0 0 000022EC 110020090D2F5C2C4C separators: countedw 32,9,13,"/\,L;]:)(=.'",'"',0 0 000022F5 3B5D3A29283D2E2722 0 000022FE 00 4581 4582 %ifn _EXPRESSIONS 4583 %error Building without the expression evaluator is not possible right now 4584 %endif 4585 4586 %if _EXPRESSIONS 4587 0 000022FF 00 align 4, db 0 0 00002300 00000000 hhvar: dd 0 ; left-hand operand for operator functions 4590 %if _HHDIVREMAIN 4591 hh_div_dividend: 0 00002304 00000000 dd 0 4593 hh_div_divisor: 0 00002308 00000000 dd 0 4595 %endif 4596 align 2, db 0 4597 hh_depth: 0 0000230C 0000 dw 0 4599 hh_depth_of_single_term: 0 0000230E 0000 dw 0 0 00002310 00 hhflag: db 0 ; &2: getdword called from hh, default to sub (precedence over 1) 4602 ; &1: getdword called from hh, default to add 4603 ; &4: getdword defaulted to add/sub for hh 4604 ; (Note that during recursive getexpression calls (ie, 4605 ; bracket handling), hh_depth is incremented to 2 and 4606 ; higher. As these flags are only used with hh_depth == 1, 4607 ; this means inside brackets the hh defaulting is 4608 ; not in effect.) 0 00002311 00 hhtype: db 0 ; type info on left-hand operand for operator functions 4610 %if _HHDIVREMAIN 4611 hh_div_active: 0 00002312 00 db 0 4613 %endif 4614 %endif 4615 4616 4617 %if _EXPRDUALCODE && _DUALCODE 4618 usesection lDEBUG_CODE2 4619 %else 4620 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 4620 ------------------ note: usesection lDEBUG_CODE 4621 %endif 4622 4623 ; Get a numerical value from input line 4624 ; INP: al = first character 4625 ; si-> next character 4626 ; OUT: bx:dx = numerical value 4627 ; ah&80h = whether a pointer 4628 ; ah&40h = whether a signed type 4629 ; ah&3Fh = number of significant bits 4630 ; one-based position of highest one bit if unsigned or signed but positive 4631 ; one-based position of lowest one bit from the top if negative signed 4632 ; 4633 ; Note: This invalidates the symbol table access slice. 4634 getdword: section_of_function 4635 getexpression: section_of_function 0 00004A37 FF06[700B] inc word [hh_depth] 0 00004A3B E8[0000] nearcall skipcomm0 0 00004A3E 51 push cx 0 00004A3F 57 push di 4640 lframe 0 00004A40 5589E5 lenter 4642 0 00004A43 31C9 xor cx, cx 0 00004A45 51 push cx 4645 lvar word, ??Count 4646 %define lCount ???Count 4647 4648 ; The first number field's operator is initialized to 4649 ; the dummy right-operand operator, which is set up with 4650 ; the highest precedence. This means it'll be processed 4651 ; immediately in the first iteration below. 0 00004A46 B119 mov cl, OPERATOR_RIGHTOP 0 00004A48 51 push cx ; initialize dummy first number operator 0 00004A49 83EC0A sub sp, byte 6+4 4655 lvar 6, ??A 4656 %define lA ???A 4657 lvar 6, ??B 4658 %define lB ???B 4659 4660 .loop: 4661 ; Get next term of an expression. A term is one variable, 4662 ; one immediate number, one expression contained within 4663 ; round brackets or one expression used to access memory. 4664 ; This code also parses any number of unary operators 4665 ; (including type conversions) in front of the term. 4666 ; 4667 ; INP: (si-1)-> first character 4668 ; OUT: (see label .term_done) 4669 ; bx:dx = numerical value of term 4670 ; ah&80h = whether a pointer 4671 ; ah&40h = whether a signed type 4672 ; al = first character behind term 4673 ; si-> line 4674 ; CHG: di, cx 4675 ; 4676 ; This part might be simplified by directly modifying 6byte[bp+lB] 4677 ; instead of setting bx:dx and ah. (The current interface is one of 4678 ; the holdovers of getexpressionterm as a separate function.) In 4679 ; that case, bx:dx and ah presumably will then be simply added to 4680 ; the CHG specification. 4681 .term: 0 00004A4C 4E dec si 0 00004A4D 56 push si ; -> term 4684 4685 ; count unary operators and type specifiers, 4686 ; get the bit mask of required bytes 4687 ; and skip past the operators and specifiers 0 00004A4E E89904 nearcall count_unary_operators 4689 4690 %if _INDIRECTION 0 00004A51 3C5B cmp al, '[' 0 00004A53 7503E91002 je .indirection ; handle indirected value --> 4693 %endif 0 00004A58 3C28 cmp al, '(' 0 00004A5A 7503E94D02 je .parens ; handle term with precedence --> 4696 0 00004A5F 52 push dx ; remember the count+1 4698 ; (only if no indirection or bracket) 4699 0 00004A60 4E dec si 0 00004A61 BA[0000] mov dx, msg.value ; does a VALUE keyword for VALUE x IN y go here ? 0 00004A64 E8[0000] nearcall isstring? 0 00004A67 7503E94E01 je .value_in ; yes --> 4704 0 00004A6C BA[0000] mov dx, msg.linear ; does a LINEAR keyword go here ? 0 00004A6F E8[0000] nearcall isstring? 0 00004A72 7503E92301 je .linear ; yes --> 4708 4709 %if _PM 4710 mov dx, msg.desctype 4711 nearcall isstring? 4712 je .desctype ; yes --> 4713 %endif 4714 0 00004A77 AC lodsb 4716 0 00004A78 E806FB nearcall isvariable? ; is it a variable ? 0 00004A7B 7226 jc .check_literal_or_symbol 4719 ; no, may be an immediate value or symbol --> 4720 4721 .variable: 0 00004A7D 87DA xchg bx, dx ; bx-> high word 0 00004A7F 88CC mov ah, cl 0 00004A81 31C9 xor cx, cx 0 00004A83 80FC02 cmp ah, 2 0 00004A86 7609 jbe .variable_nohigh 0 00004A88 8B0F mov cx, word [bx] ; get high word 0 00004A8A 80FC03 cmp ah, 3 0 00004A8D 7702 ja @F 0 00004A8F B500 mov ch, 0 4731 @@: 4732 .variable_nohigh: 0 00004A91 87DA xchg bx, dx ; bx-> low word 0 00004A93 8B17 mov dx, word [bx] ; get low word 0 00004A95 89CB mov bx, cx ; high word/zero 0 00004A97 80FC01 cmp ah, 1 0 00004A9A 7702 ja .variable_notbyte 0 00004A9C B600 mov dh, 0 ; limit to byte 4739 .variable_notbyte: 4740 .symbol: 0 00004A9E B400 mov ah, 0 ; type pointer=0 signed=0 0 00004AA0 E91902 jmp .term_end 4743 4744 4745 .check_literal_or_symbol: 4746 %if _SYMBOLIC 4747 nearcall issymbol? ; is it a symbol ? 4748 jnc .symbol ; yes --> 4749 ; no, must be an immediate value 4750 %endif 4751 4752 .literal: 0 00004AA3 31DB xor bx, bx ; (in case of decimal base shortcut: 0 00004AA5 BA0A00 mov dx, 10 ; set base: decimal) 0 00004AA8 3C23 cmp al, '#' ; shortcut change to decimal base, or string literal? 0 00004AAA 7542 jne .lithex_common 0 00004AAC 803C22 cmp byte [si], '"' 0 00004AAF 7407 je .lit_string 0 00004AB1 803C27 cmp byte [si], "'" 0 00004AB4 7402 je .lit_string 0 00004AB6 EB78 jmp .lit_base ; decimal base --> 4762 4763 .lit_string: 0 00004AB8 31D2 xor dx, dx 0 00004ABA AC lodsb 0 00004ABB 86C4 xchg al, ah 4767 0 00004ABD E81900 call @F 0 00004AC0 88C2 mov dl, al 0 00004AC2 E81400 call @F 0 00004AC5 88C6 mov dh, al 0 00004AC7 E80F00 call @F 0 00004ACA 88C3 mov bl, al 0 00004ACC E80A00 call @F 0 00004ACF 88C7 mov bh, al 0 00004AD1 AC lodsb 0 00004AD2 38E0 cmp al, ah 0 00004AD4 7415 je @FFF 4779 .err3: 0 00004AD6 E9BE00 jmp .err2 4781 4782 @@: 0 00004AD9 AC lodsb 0 00004ADA 38E0 cmp al, ah 0 00004ADC 7406 je @F 0 00004ADE E8[0000] nearcall iseol?.notsemicolon 0 00004AE1 74F3 je .err3 4788 .lit_string_retn: 0 00004AE3 C3 retn 4790 4791 @@: 0 00004AE4 AC lodsb 0 00004AE5 38E0 cmp al, ah 0 00004AE7 74FA je .lit_string_retn 0 00004AE9 59 pop cx ; (discard near return address) 0 00004AEA 4E dec si 4797 @@: 0 00004AEB AC lodsb 0 00004AEC EB38 jmp .lit_end_string 4800 4801 4802 .lithex_common: 0 00004AEE E8A103 call .lit_ishexdigit? ; the first character must be a digit then 0 00004AF1 7303E9A100 jc .err2 0 00004AF6 30D2 xor dl, dl ; initialize value 4806 .lithex_loopdigit: 0 00004AF8 3C5F cmp al, '_' 0 00004AFA 7423 je .lithex_skip 0 00004AFC E89303 call .lit_ishexdigit? ; was last character ? 0 00004AFF 7221 jc .lit_end ; yes --> 0 00004B01 F6C7F0 test bh, 0F0h ; would shift bits out ? 0 00004B04 7403E98E00 jnz .err2 0 00004B09 E8[0000] nearcall capitalise 0 00004B0C 2C30 sub al, '0' 0 00004B0E 3C09 cmp al, 9 ; was decimal digit ? 0 00004B10 7602 jbe .lithex_decimaldigit; yes --> 0 00004B12 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 4818 .lithex_decimaldigit: 0 00004B14 B90400 mov cx, 4 4820 .lithex_loopshift: 0 00004B17 D1E2 shl dx, 1 0 00004B19 D1D3 rcl bx, 1 0 00004B1B E2FA loop .lithex_loopshift ; *16 0 00004B1D 08C2 or dl, al ; add in the new digit 4825 .lithex_skip: 0 00004B1F AC lodsb 0 00004B20 EBD6 jmp short .lithex_loopdigit 4828 4829 .lit_end: 0 00004B22 3C23 cmp al, '#' ; base change specification? 0 00004B24 740A je .lit_base ; yes --> 4832 .lit_end_string: 0 00004B26 E8F7F4 nearcall isseparator? ; after the number, there must be a separator 0 00004B29 756C jne .err2 ; none here --> 0 00004B2B B400 mov ah, 0 ; type pointer=0 signed=0 0 00004B2D E98C01 jmp .term_end ; okay --> 4837 .lit_base: 0 00004B30 85DB test bx, bx ; insure base <= 36 0 00004B32 7563 jnz .err2 0 00004B34 83FA24 cmp dx, byte 36 0 00004B37 775E ja .err2 0 00004B39 83FA02 cmp dx, byte 2 ; and >= 2 0 00004B3C 7259 jb .err2 ; otherwise error --> 4844 0 00004B3E AC lodsb 0 00004B3F 80FA10 cmp dl, 16 ; hexadecimal ? 0 00004B42 74AA je .lithex_common ; yes, use specific handling --> 4848 0 00004B44 89D7 mov di, dx ; di = base 0 00004B46 88D1 mov cl, dl 0 00004B48 80C12F add cl, '0'-1 0 00004B4B 80F939 cmp cl, '9' 0 00004B4E 7602 jbe .lit_basebelow11 0 00004B50 B139 mov cl, '9' 4855 .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 0 00004B52 88D5 mov ch, dl 0 00004B54 80C536 add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 4858 0 00004B57 E83B03 call .lit_isdigit? ; first character must be a digit 0 00004B5A 723B jc .err2 0 00004B5C 31D2 xor dx, dx ; initialize value 4862 .lit_loopdigit: 0 00004B5E 3C5F cmp al, '_' 0 00004B60 7432 je .lit_skip 0 00004B62 E83003 call .lit_isdigit? ; was last character ? 0 00004B65 72BB jc .lit_end ; yes --> 0 00004B67 E8[0000] nearcall capitalise 0 00004B6A 2C30 sub al, '0' 0 00004B6C 3C09 cmp al, 9 ; was decimal digit ? 0 00004B6E 7602 jbe .lit_decimaldigit ; yes --> 0 00004B70 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 4872 .lit_decimaldigit: 0 00004B72 50 push ax 0 00004B73 89D0 mov ax, dx 0 00004B75 53 push bx 0 00004B76 F7E7 mul di ; multiply low word with base 0 00004B78 89D3 mov bx, dx 0 00004B7A 89C2 mov dx, ax 0 00004B7C 58 pop ax 0 00004B7D 52 push dx 0 00004B7E F7E7 mul di ; multiply high word with base 0 00004B80 85D2 test dx, dx 0 00004B82 5A pop dx 0 00004B83 7512 jnz .err2 ; overflow --> 0 00004B85 01C3 add bx, ax ; add them 0 00004B87 58 pop ax 0 00004B88 720D jc .err2 ; overflow --> 0 00004B8A 00C2 add dl, al ; add in the new digit 0 00004B8C 80D600 adc dh, 0 0 00004B8F 83D300 adc bx, byte 0 0 00004B92 7203 jc .err2 ; overflow --> 4892 ; The value 3#102002022201221111210 is exactly equal to ffffFFFFh 4893 ; so 3#102002022201221111211 (or ...2) overflows 32 bits and 4894 ; needs to be detected here when adding in the as yet least 4895 ; significant digit. This is why this jump is needed. 4896 ; This also applies to decimal #4294967296. 4897 4898 .lit_skip: 0 00004B94 AC lodsb 0 00004B95 EBC7 jmp short .lit_loopdigit 4901 4902 .err2: 0 00004B97 E9[0000] jmp error_expr 4904 4905 4906 %if _PM 4907 .desctype: 4908 pop ax ; discard unary operators counter 4909 4910 %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_DESCTYPE_STACK_CHECK 4911 call stack_check_indirection 4912 %else 4913 mov ax, _EXPRESSION_DESCTYPE_STACK_CHECK 4914 call stack_check ; abort if deep recursion 4915 %endif 4916 test ax, msg.stack_overflow.desctype 4917 4918 lodsb 4919 nearcall ispm 4920 jnz short .err2 4921 nearcall skipwh0 4922 nearcall getword 4923 _386 push edx 4924 _386 pop dx 4925 _386 lar edx, edx 4926 _386 jz @F 4927 _386 xor edx, edx 4928 @@: 4929 _386 shr edx, 8 4930 _386 push dx 4931 _386 pop edx 4932 subcpu 286 4933 _no386 lar dx, dx 4934 _no386 jz @F 4935 _no386 xor dx, dx 4936 @@: 4937 _no386 xchg dl, dh 4938 subcpureset 4939 xor bx, bx 4940 nearcall skipcomm0 4941 mov ah, 0 ; type pointer=0 signed=0 4942 jmp .term_end_recount 4943 %endif 4944 4945 4946 .linear: 0 00004B9A 58 pop ax ; discard unary operators counter 4948 4949 %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_LINEAR_STACK_CHECK 0 00004B9B E82504 call stack_check_indirection 4951 %else 4952 mov ax, _EXPRESSION_LINEAR_STACK_CHECK 4953 call stack_check ; abort if deep recursion 4954 %endif 0 00004B9E A9[0000] test ax, msg.stack_overflow.linear 4956 0 00004BA1 E8[0000] nearcall skipwhite 4958 _386_PM push word [bAddr32] 4959 _386_PM push edx 4960 _386_PM pop dx 0 00004BA4 8B1E[0000] mov bx, word [reg_ds] 0 00004BA8 E8[0000] nearcall getlinearaddr 4963 _386_PM push dx 4964 _386_PM pop edx 4965 _386_PM pop word [bAddr32] 0 00004BAB 72EA jc .err2 4967 4968 %if !_LOADER 4969 _386_PM_o32 ; or dword 0 00004BAD 830E[0000]FF or word [bp_offset], strict byte -1 4971 ; do not use a preferred offset 4972 %endif 4973 0 00004BB2 E8[0000] nearcall skipcomm0 0 00004BB5 B400 mov ah, 0 ; type pointer=0 signed=0 0 00004BB7 E90101 jmp .term_end_recount 4977 4978 4979 .value_in: 0 00004BBA 58 pop ax ; discard unary operators counter 4981 4982 %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 0 00004BBB E80504 call stack_check_indirection 4984 %else 4985 mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 4986 call stack_check ; abort if deep recursion 4987 %endif 0 00004BBE A9[0000] test ax, msg.stack_overflow.value_in 4989 0 00004BC1 E8[0000] nearcall skipcomma 0 00004BC4 4E dec si 0 00004BC5 BA[0000] mov dx, msg.executing 0 00004BC8 E8[0000] nearcall isstring? 0 00004BCB 7514 jne @F 0 00004BCD E8[0000] nearcall skipcomma 0 00004BD0 56 push si 0 00004BD1 BE[0000] mov si, msg.executing_value_range 0 00004BD4 E88F03 nearcall get_value_range 0 00004BD7 9C pushf ; ! preserve CF 0 00004BD8 E8[0000] nearcall chkeol 0 00004BDB 9D popf 0 00004BDC 5E pop si 0 00004BDD 4E dec si ; preserves CF 0 00004BDE AC lodsb 0 00004BDF EB03 jmp @FF 5006 5007 @@: 0 00004BE1 E88203 nearcall get_value_range; OUT: cx:di = from, bx:dx = to 5009 @@: 0 00004BE4 E8[0000] nearcall skipcomm0 5011 5012 ; If the VALUE is a not normal range (zero length 5013 ; or from > to) then we still have to parse the 5014 ; remaining input line to find the end of the 5015 ; VALUE x IN y construct. So we do this with a 5016 ; sort of hack: we take the invalid / unset 5017 ; range values, do all the (invalid) comparisons, 5018 ; but do not count any of the possible matches. 5019 ; Look at .value_in.found for this hack. 5020 lframe none, nested 0 00004BE7 5589E5 lenter 5022 lvar word, bit0_do_not_match 0 00004BEA 9C pushf 5024 lvar dword, value_from 0 00004BEB 51 push cx 0 00004BEC 57 push di 5027 lvar dword, value_to 0 00004BED 53 push bx 0 00004BEE 52 push dx 0 00004BEF 31C9 xor cx, cx 5031 lvar dword, found 0 00004BF1 51 push cx 0 00004BF2 51 push cx 5034 0 00004BF3 51 push cx ; zero terminator of keyword remembered offsets 0 00004BF4 4E dec si 0 00004BF5 BA[0000] mov dx, msg.in 0 00004BF8 E8[0000] nearcall isstring? 5039 .err3_NZ: 5040 .err4_NZ: 0 00004BFB 759A jne .err2 5042 0 00004BFD E8[0000] nearcall skipcomma 0 00004C00 4E dec si 5045 5046 .value_in.loop: 0 00004C01 E8[0000] nearcall skipwhite 0 00004C04 4E dec si 0 00004C05 BB[0000] mov bx, msgtable_value_range 5050 ; -> table 5051 5052 @@: 0 00004C08 8B17 mov dx, word [bx] 0 00004C0A 85D2 test dx, dx 0 00004C0C 7419 jz @F ; last checked, go get range --> 0 00004C0E E8[0000] nearcall isstring? 0 00004C11 7405 je .value_in.keyword ; found a keyword --> 0 00004C13 83C304 add bx, 4 ; go to next table entry 0 00004C16 EBF0 jmp @B 5060 5061 .value_in.keyword: 5062 %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 0 00004C18 E8A803 call stack_check_indirection 5064 %else 5065 mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 5066 call stack_check ; abort if deep recursion 5067 %endif 0 00004C1B A9[0000] test ax, msg.stack_overflow.value_in 5069 0 00004C1E E8[0000] nearcall skipwhite ; skip past blanks 0 00004C21 56 push si ; remember offset after keyword 0 00004C22 8B7702 mov si, word [bx + 2] ; -> keyword replacement text 0 00004C25 EBDA jmp .value_in.loop ; handle replacement --> 5074 5075 @@: 0 00004C27 E83C03 nearcall get_value_range; OUT: cx:di = from, bx:dx = to 0 00004C2A 7223 jc .value_in.next 5078 5079 ; ! (StartVal > EndMatch) 0 00004C2C 395EFC cmp word [bp + ?value_from + 2], bx 0 00004C2F 7503 jne @F 0 00004C31 3956FA cmp word [bp + ?value_from], dx 5083 @@: 0 00004C34 7719 ja .value_in.next 5085 5086 ; ! (EndVal < StartMatch) 0 00004C36 394EF8 cmp word [bp + ?value_to + 2], cx 0 00004C39 7503 jne @F 0 00004C3B 397EF6 cmp word [bp + ?value_to], di 5090 @@: 0 00004C3E 720F jb .value_in.next 5092 5093 .value_in.found: 0 00004C40 8B4EFE mov cx, word [bp + ?bit0_do_not_match] 0 00004C43 F7D1 not cx 0 00004C45 83E101 and cx, 1 0 00004C48 014EF2 add word [bp + ?found], cx 0 00004C4B 8356F200 adc word [bp + ?found], 0 5099 5100 .value_in.next: 5101 @@: 0 00004C4F E8[0000] nearcall skipwh0 0 00004C52 3C2C cmp al, ',' 0 00004C54 74AB je .value_in.loop 5105 0 00004C56 59 pop cx ; get next remembered offset 0 00004C57 E306 jcxz @F ; if none --> 0 00004C59 89CE mov si, cx ; -> behind keyword 0 00004C5B 4E dec si 0 00004C5C AC lodsb ; reload al 0 00004C5D EBF0 jmp @B ; continue after the keyword --> 5112 5113 @@: 0 00004C5F 5A pop dx 0 00004C60 5B pop bx ; pop ?found counter variable 0 00004C61 89EC5D lleave 5117 0 00004C64 B400 mov ah, 0 ; type pointer=0 signed=0 0 00004C66 EB53 jmp .term_end_recount 5120 5121 5122 %if _INDIRECTION 5123 .indirection: 0 00004C68 E85803 call stack_check_indirection 5125 ; abort if deep recursion 0 00004C6B A9[0000] test ax, msg.stack_overflow.indirection 5127 5128 _386_PM push word [bAddr32] 5129 _386_PM push edx 5130 _386_PM pop dx 5131 0 00004C6E E8[0000] nearcall skipcomma ; also skips the '[' in al 0 00004C71 8B1E[0000] mov bx, word [reg_ds] ; default segment/selector 0 00004C75 51 push cx ; save previous bit mask (ch) 0 00004C76 E8E0F1 nearcall getaddrX ; (recursively calls getexpression:) 0 00004C79 59 pop cx 0 00004C7A B100 mov cl, 0 0 00004C7C 3C5D cmp al, ']' ; verify this is the closing bracket 5139 .err5_NZ: 0 00004C7E 7403E978FF jne .err4_NZ ; if not --> 0 00004C83 AC lodsb ; get next character 5142 ; bx:(e)dx-> data 5143 ; ch = bit mask of required bytes 5144 ; cl = 0 5145 5146 ..@hh_indirection_memory_access_start: 0 00004C84 50 push ax 0 00004C85 55 push bp 0 00004C86 31ED xor bp, bp 0 00004C88 55 push bp 0 00004C89 55 push bp 0 00004C8A 89E5 mov bp, sp ; -> buffer 5153 0 00004C8C E8[0000] nearcall prephack 0 00004C8F E8[0000] nearcall dohack 5156 ; Regarding how this loop handles cx, 5157 ; remember that ch holds the flags for 5158 ; the required bytes. 5159 ; And cl is initialised to 0. In 5160 ; each iteration, cl is incremented. 5161 ; The loop instruction then decrements 5162 ; cl again, but the entire cx is only 5163 ; zero if no more bytes are required. 5164 ; (This hack saves a single byte over 5165 ; the "test ch, ch \ jnz" alternative 5166 ; but it isn't very pretty. It 5167 ; also probably slows down a bit.) 5168 .indirection_loop: 0 00004C92 D0ED shr ch, 1 ; need to read this byte ? 0 00004C94 7306 jnc .indirection_skip ; no --> 5171 %if _DUALCODE && _EXPRDUALCODE 5172 usesection lDEBUG_CODE 5173 ..@hh_code1_indirection_memory_access_start: 5174 5175 section_of ..@hh_readmem 5176 dualfunction 5177 ..@hh_readmem: 5178 lframe dualdistance, nested 5179 lframe_needonlyregistered 5180 lenter 5181 call readmem 5182 lleave 5183 dualreturn 5184 lret 5185 5186 ..@hh_code1_indirection_memory_access_end: 5187 usesection lDEBUG_CODE2 5188 dualcall ..@hh_readmem ; else read byte 5189 %else 0 00004C96 E8[0000] nearcall readmem ; else read byte 5191 %endif 0 00004C99 884600 mov byte [bp+0], al ; store byte 5193 .indirection_skip: 0 00004C9C 41 inc cx ; = 1 if no more to read 0 00004C9D 45 inc bp ; increase buffer pointer 5196 _386_PM_o32 ; inc edx 0 00004C9E 42 inc dx ; increase offset 0 00004C9F E2F1 loop .indirection_loop ; read next byte if any --> 0 00004CA1 E8[0000] nearcall unhack 5200 0 00004CA4 5A pop dx 0 00004CA5 5B pop bx 0 00004CA6 5D pop bp 0 00004CA7 58 pop ax 5205 ..@hh_indirection_memory_access_end: 5206 5207 _386_PM push dx 5208 _386_PM pop edx 5209 _386_PM pop word [bAddr32] 0 00004CA8 B400 mov ah, 0 ; type pointer=0 signed=0 0 00004CAA EB0F jmp short .term_end_recount 5212 %endif 5213 5214 5215 .parens: 5216 %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PARENS_STACK_CHECK 0 00004CAC E81403 call stack_check_indirection 5218 %else 5219 mov ax, _EXPRESSION_PARENS_STACK_CHECK 5220 call stack_check ; abort if deep recursion 5221 %endif 0 00004CAF A9[0000] test ax, msg.stack_overflow.parens 5223 0 00004CB2 AC lodsb 0 00004CB3 E881FD nearcall getexpression ; (recursive) bx:dx = number, ah = type 0 00004CB6 3C29 cmp al, ')' ; closing parens ? 0 00004CB8 75C4 jne .err5_NZ ; no --> 0 00004CBA AC lodsb 5229 5230 .term_end_recount: 0 00004CBB A9 db __TEST_IMM16 ; skip pop, stc; NC 5232 .term_end: 0 00004CBC 59 pop cx ; get count+1 of unary operators and type specifiers 0 00004CBD F9 stc 0 00004CBE 5F pop di ; -> term 0 00004CBF 87F7 xchg si, di 0 00004CC1 57 push di ; save -> behind 5238 ; si-> unary operators and types 0 00004CC2 720B jc .unary_processnext ; if we preserved the count --> 5240 0 00004CC4 53 push bx 0 00004CC5 52 push dx 0 00004CC6 56 push si 0 00004CC7 E82002 nearcall count_unary_operators 0 00004CCA 89D1 mov cx, dx ; get count+1 again 0 00004CCC 5E pop si 0 00004CCD 5A pop dx 0 00004CCE 5B pop bx 5249 5250 .unary_processnext: 0 00004CCF E204 loop .unary_doprocess 0 00004CD1 5E pop si ; -> behind term 0 00004CD2 4E dec si ; -> character to reload in skipwhite 0 00004CD3 EB38 jmp short .term_done 5255 5256 .unary_doprocess: 0 00004CD5 56 push si 0 00004CD6 51 push cx 0 00004CD7 53 push bx 0 00004CD8 52 push dx 5261 0 00004CD9 89CF mov di, cx ; count+1 of operators to skip 0 00004CDB E80E02 nearcall count_unary_operators_restrict ; skip them 0 00004CDE 752A jnz .err ; if not enough --> (?!) 5265 0 00004CE0 E868F3 nearcall istype? ; get type info if it's a type 0 00004CE3 7216 jc .unary_processnotype ; isn't a type --> 0 00004CE5 86C4 xchg al, ah ; al = type input 0 00004CE7 D1EB shr bx, 1 ; CF = signedness 0 00004CE9 9F lahf ; with CF = signedness 0 00004CEA 8B8F[3200] mov cx, word [ typehandlers + bx ] ; function 5272 .unary_processcall: 0 00004CEE 5A pop dx 0 00004CEF 5B pop bx 5275 %if _HHDIVREMAIN 0 00004CF0 C606[760B]00 mov byte [hh_div_active], 0 5277 %endif 0 00004CF5 FFD1 call cx ; call type or unary operator handler 5279 ; bx:dx = output number, ah = type 0 00004CF7 59 pop cx ; restore processing counter 0 00004CF8 5E pop si ; restore ->term 0 00004CF9 EBD4 jmp short .unary_processnext 5283 5284 .unary_processnotype: 0 00004CFB E807F3 nearcall isunaryoperator?; get unary operator index 0 00004CFE 750A jne .err ; if no unary operator --> (?!) 0 00004D00 89CB mov bx, cx 0 00004D02 D1E3 shl bx, 1 0 00004D04 8B8F[6000] mov cx, word [ unaryoperatorhandlers + bx ] 0 00004D08 EBE4 jmp short .unary_processcall 5291 5292 .err: 0 00004D0A E9[0000] jmp error_expr 5294 5295 .term_done: ; bx:dx = number, ah = type 5296 ; get the operator following this number 0 00004D0D E8[0000] nearcall skipwhite 0 00004D10 8956F2 mov word [bp+lB+0], dx 0 00004D13 895EF4 mov word [bp+lB+2], bx ; store numeric value 0 00004D16 8B1E[720B] mov bx, word [hh_depth_of_single_term] 0 00004D1A 3B1E[700B] cmp bx, word [hh_depth] 0 00004D1E 7460 je .operator_invalid 0 00004D20 E8E8F2 nearcall isoperator? ; cl = operator index (if any) 0 00004D23 744C je .operator_apparently_valid 0 00004D25 E8[0000] nearcall iseol? ; end of line follows ? 0 00004D28 7456 je .operator_invalid 5307 .hh_twofold_check: 5308 ; If we are processing a ?? :: conditional 5309 ; construct then we want the :: to end 5310 ; the parsing of the expression at that 5311 ; point, to then execute the OPERATOR_COND 5312 ; function of_cond. That means here we 5313 ; want to not apply the hh twofold case. 5314 5315 ; The next check is for an ?? :: construct 5316 ; if the :: happens at hh depth == 1 and 5317 ; there is no nested ?? :: construct. 0 00004D2A 807EFC18 cmp byte [bp + lA + 4], OPERATOR_COND 0 00004D2E 7450 je .operator_invalid ; special check for conditional operator 5320 5321 ; The next check is for a nested ?? :: 5322 ; construct, or if the clause between 5323 ; ?? and :: contains any other operators 5324 ; than ??. (All operators have higher 5325 ; precedence than ??.) 5326 ; If any ?? is waiting for its :: then we 5327 ; must accept the next :: as an invalid 5328 ; operator, thus not as a separator that 5329 ; activates the hh twofold operation. 0 00004D30 8B4EFE mov cx, word [bp + lCount] ; = how many operators waiting 0 00004D33 E30C jcxz @FF ; if none waiting --> (do hh twofold) 0 00004D35 89E3 mov bx, sp ; -> first waiting operator on stack 5333 @@: 0 00004D37 803F18 cmp byte [bx], OPERATOR_COND ; is it a conditional operator ? 0 00004D3A 7444 je .operator_invalid ; yes, treat as invalid operator --> 5336 ; (it must be a :: to be valid) 0 00004D3C 83C306 add bx, 6 ; -> next waiting operator on stack 0 00004D3F E2F6 loop @B ; loop if any waiting operator left --> 5339 @@: 0 00004D41 833E[700B]01 cmp word [hh_depth], 1 ; are we in first level expression ? 0 00004D46 7538 jne .operator_invalid ; no, do not do special H operation --> 0 00004D48 F606[740B]03 test byte [hhflag], 1|2 ; special H operation requested ? 0 00004D4D 7431 jz .operator_invalid ; no --> 0 00004D4F B302 mov bl, OPERATOR_MINUS ; assume it's sub 0 00004D51 F606[740B]02 test byte [hhflag], 2 ; sub requested by H ? 0 00004D56 7501 jnz .hh_twofold_found ; yes --> 0 00004D58 4B dec bx ; else it must be add 5348 %if (OPERATOR_MINUS - 1) != OPERATOR_PLUS 5349 %error Remove optimisation 5350 %endif 5351 .hh_twofold_found: 0 00004D59 800E[740B]04 or byte [hhflag], 4 ; set flag for H twofold operation 0 00004D5E 4E dec si 0 00004D5F E8[0000] nearcall skipcomma 0 00004D62 EB1E jmp short .operator_done ; return this --> 5356 5357 5358 ; INP: bx = offset into operator dispatchers 5359 ; = 2 * OUT:cx of isoperator? if ZR 5360 ; al = candidate operator text start 5361 ; si -> subsequent text 5362 ; OUT: bl = operator index, 0 if no valid operator 5363 ; if valid: si -> after operator 5364 ; if invalid: si unchanged (?) 5365 ; CHG: al, bh, dx 5366 ..@call_operator_dispatchers: section_of_function 0 00004D64 FFB7[6A00] push word [operatordispatchers + bx] 5368 ; on stack: -> operator dispatcher 0 00004D68 8B97[BE00] mov dx, word [operator_default_strings + bx] 5370 ; dx = default operator string 0 00004D6C 8B9F[9400] mov bx, word [operator_default_indexes + bx] 5372 ; bx = default operator index 0 00004D70 C3 retn 5374 5375 .operator_apparently_valid: 0 00004D71 89CB mov bx, cx 0 00004D73 01DB add bx, bx 0 00004D75 E8ECFF call ..@call_operator_dispatchers 0 00004D78 84DB test bl, bl ; valid ? 0 00004D7A 74AE jz .hh_twofold_check ; no, check for H twofold operation --> 0 00004D7C E8[0000] nearcall skipwhite 0 00004D7F A9 db __TEST_IMM16 5383 .operator_invalid: 0 00004D80 31DB xor bx, bx ; bl = 0 (no operator) 5385 .operator_done: 0 00004D82 88E7 mov bh, ah ; bh = type info 0 00004D84 895EF6 mov word [bp+lB+4], bx ; store type and following operator 5388 5389 %if _EXPRESSION_DEBUG 5390 push ax 5391 push bx 5392 push cx 5393 push dx 5394 push si 5395 push di 5396 5397 lea bx, [bp + lA] 5398 mov dx, .msgA 5399 call .debugdump 5400 5401 lea bx, [bp + lB] 5402 mov dx, .msgB 5403 call .debugdump 5404 5405 pop di 5406 pop si 5407 push si 5408 push di 5409 call .debugline 5410 jmp .debugend 5411 5412 .debugline: 5413 call .debugpad 5414 mov dx, .msg_end1 5415 nearcall putsz 5416 5417 dec si 5418 mov dx, si 5419 @@: 5420 lodsb 5421 nearcall iseol? 5422 jne @B 5423 mov cx, si 5424 dec cx 5425 sub cx, dx 5426 nearcall puts 5427 5428 mov dx, .msg_end2 5429 nearcall putsz 5430 retn 5431 5432 usesection lDEBUG_DATA_ENTRY 5433 5434 .msgB: asciz "B = " 5435 .msgA: asciz "A = " 5436 .msg@: asciz "@ = " 5437 .msgPop: asciz "Pop = " 5438 .msg_opA: asciz "(A) " 5439 .msg_opB: asciz " op (B)",13,10 5440 .msg_none: asciz "none" 5441 .msg_op: asciz ", " 5442 .msg_end: db " op" 5443 .msg_linebreak: asciz 13,10 5444 .msg_end1: asciz '"' 5445 .msg_end2: asciz '"',13,10,13,10 5446 .msg_looping_cond: 5447 asciz "Looping for OPPREC_COND",13,10 5448 5449 %if _EXPRDUALCODE && _DUALCODE 5450 usesection lDEBUG_CODE2 5451 %else 5452 usesection lDEBUG_CODE 5453 %endif 5454 5455 .debugpad: 5456 mov cx, word [hh_depth] 5457 dec cx 5458 jz @FF 5459 @@: 5460 mov al, 32 5461 nearcall putc 5462 loop @B 5463 @@: 5464 retn 5465 5466 .debugdump: 5467 call .debugpad 5468 nearcall putsz 5469 5470 cmp byte [bx + 4], OPERATOR_RIGHTOP 5471 jne @F 5472 mov dx, .msg_none 5473 nearcall putsz 5474 jmp .debugdump_none 5475 5476 @@: 5477 sub sp, 8 5478 mov di, sp 5479 mov ax, word [bx + 2] 5480 nearcall hexword 5481 mov ax, word [bx] 5482 nearcall hexword 5483 mov cx, di 5484 mov di, sp 5485 @@: 5486 cmp byte [di], '0' 5487 jne @F 5488 inc di 5489 cmp cx, di 5490 ja @B 5491 dec di 5492 @@: 5493 sub cx, di 5494 mov dx, di 5495 push bx 5496 nearcall puts 5497 pop bx 5498 add sp, 8 5499 5500 .debugdump_none: 5501 mov dx, .msg_op 5502 nearcall putsz 5503 mov si, word [bx + 4] 5504 and si, 00FFh 5505 add si, si 5506 mov dx, word [operatornames + si] 5507 nearcall putsz 5508 mov dx, .msg_end 5509 nearcall putsz 5510 retn 5511 5512 .debugend: 5513 pop di 5514 pop si 5515 pop dx 5516 pop cx 5517 pop bx 5518 pop ax 5519 %endif 5520 0 00004D87 8A4EFC mov cl, byte [bp+lA+4] 0 00004D8A E8F300 call .compare_operators ; (cmp bl, cl = cmp Boprtr, Aoprtr) 0 00004D8D 7249 jb .high_precedence_A ; compute the first operand first --> 5524 ; (jump taken for invalid Boprtr too) 0 00004D8F 7505 jne @F 5526 ; If we get the same operator precedence for 5527 ; Boprtr and Aoprtr we generally want to 5528 ; handle this as a high-precedence A. 5529 ; This is not true for operator cond. If 5530 ; an expression like this is parsed: 5531 ; Acond ?? Bcond ?? Btrue :: Bfalse :: Afalse 5532 ; Then we get first: 5533 ; A = none, right op 5534 ; B = Acond, cond op 5535 ; After the right op is processed: 5536 ; A = Acond, cond op 5537 ; B = Bcond, cond op 5538 ; Next we want: 5539 ; @ = Acond, cond op 5540 ; A = Bcond, cond op 5541 ; B = Btrue, invalid op (::) 5542 ; If we did high precedence A here instead 5543 ; we would get: 5544 ; A = (Acond) cond op (Bcond) 5545 ; At this point of_cond would parse "Btrue..." 5546 ; as the :: clause, failing because it doesn't 5547 ; start with a "::". 0 00004D91 83FB01 cmp bx, OPPREC_COND 0 00004D94 7542 jne .high_precedence_A 5550 5551 @@: 0 00004D96 FF46FE inc word [bp+lCount] ; increase loop count 0 00004D99 FF76F8 push word [bp+lA+0] 0 00004D9C FF76FA push word [bp+lA+2] 0 00004D9F FF76FC push word [bp+lA+4] ; push A and its operator 5556 5557 %if _EXPRESSION_DEBUG 5558 push ax 5559 push bx 5560 push cx 5561 push dx 5562 push si 5563 push di 5564 5565 lea bx, [bp + lA] 5566 mov dx, .msg@ 5567 call .debugdump 5568 pop di 5569 pop si 5570 pop dx 5571 pop cx 5572 pop bx 5573 pop ax 5574 %endif 5575 0 00004DA2 FF76F6 push word [bp+lB+4] 0 00004DA5 FF76F4 push word [bp+lB+2] 0 00004DA8 FF76F2 push word [bp+lB+0] 0 00004DAB 8F46F8 pop word [bp+lA+0] 0 00004DAE 8F46FA pop word [bp+lA+2] 0 00004DB1 8F46FC pop word [bp+lA+4] ; set A to B, including operator 5582 5583 %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PRECEDENCE_STACK_CHECK 0 00004DB4 E80C02 call stack_check_indirection 5585 %else 5586 mov ax, _EXPRESSION_PRECEDENCE_STACK_CHECK 5587 call stack_check ; abort if deep recursion 5588 %endif 0 00004DB7 A9[0000] test ax, msg.stack_overflow.precedence 5590 5591 d4 call expr_d4message 5592 d4 asciz "getexpression: Entering loop/recursion",13,10 5593 5594 .loop_j: 0 00004DBA E98FFC jmp .loop ; start again (former B as first term) --> 5596 5597 .cont: 5598 5599 d4 call expr_d4message 5600 d4 asciz "getexpression: End of loop/recursion",13,10 5601 0 00004DBD FF76FC push word [bp+lA+4] 0 00004DC0 FF76FA push word [bp+lA+2] 0 00004DC3 FF76F8 push word [bp+lA+0] 0 00004DC6 8F46F2 pop word [bp+lB+0] 0 00004DC9 8F46F4 pop word [bp+lB+2] 0 00004DCC 8F46F6 pop word [bp+lB+4] ; set B to A, including operator 5608 0 00004DCF 8F46FC pop word [bp+lA+4] 0 00004DD2 8F46FA pop word [bp+lA+2] 0 00004DD5 8F46F8 pop word [bp+lA+0] ; pop A and its operator 5612 5613 %if _EXPRESSION_DEBUG 5614 push ax 5615 push bx 5616 push cx 5617 push dx 5618 push si 5619 push di 5620 5621 lea bx, [bp + lA] 5622 mov dx, .msgPop 5623 call .debugdump 5624 lea bx, [bp + lB] 5625 mov dx, .msgB 5626 call .debugdump 5627 5628 pop di 5629 pop si 5630 push si 5631 push di 5632 call .debugline 5633 5634 pop di 5635 pop si 5636 pop dx 5637 pop cx 5638 pop bx 5639 pop ax 5640 %endif 5641 5642 .high_precedence_A: 5643 5644 %if _EXPRESSION_DEBUG 5645 push ax 5646 push bx 5647 push cx 5648 push dx 5649 push si 5650 push di 5651 5652 call .debugpad 5653 mov dx, .msg_opA 5654 nearcall putsz 5655 lea bx, [bp + lA] 5656 mov si, word [bx + 4] 5657 and si, 00FFh 5658 add si, si 5659 mov dx, word [operatornames + si] 5660 nearcall putsz 5661 mov dx, .msg_opB 5662 nearcall putsz 5663 5664 pop di 5665 pop si 5666 pop dx 5667 pop cx 5668 pop bx 5669 pop ax 5670 %endif 5671 0 00004DD8 8B4EFC mov cx, word [bp+lA+4] ; retrieve A's type info and operator 0 00004DDB FF76FA push word [bp+lA+2] 0 00004DDE FF76F8 push word [bp+lA+0] 0 00004DE1 8B46F6 mov ax, word [bp+lB+4] ; retrieve B's type info and operator 0 00004DE4 882E[750B] mov byte [hhtype], ch ; set type info 0 00004DE8 8F06[640B] pop word [hhvar] 0 00004DEC B500 mov ch, 0 ; cx = A's 1-based operator index 0 00004DEE 8F06[660B] pop word [hhvar+2] ; retrieve A's number 0 00004DF2 8B56F2 mov dx, word [bp+lB+0] 0 00004DF5 89CF mov di, cx 0 00004DF7 8B5EF4 mov bx, word [bp+lB+2] ; retrieve B's number 0 00004DFA 01FF add di, di ; = offset into dispatch table 0 00004DFC 50 push ax ; preserve B's operator 5685 %if _HHDIVREMAIN 0 00004DFD C606[760B]00 mov byte [hh_div_active], 0 5687 %endif 0 00004E02 FF95[EA00] call near [operatorfunctions+di]; compute: (A) operatorA (B) 0 00004E06 59 pop cx ; cl = B's operator 5690 0 00004E07 8956F8 mov word [bp+lA+0], dx 0 00004E0A 88C8 mov al, cl ; B's operator 0 00004E0C 895EFA mov word [bp+lA+2], bx 0 00004E0F 8946FC mov word [bp+lA+4], ax ; store result in A, with B's operator 5695 5696 %if OPERATOR_INVALID != 0 5697 %error Remove optimisation 5698 %endif 0 00004E12 84C0 test al, al ; (previous B's) operator valid ? 0 00004E14 7412 jz .end ; no, end of sequence --> 5701 0 00004E16 837EFE00 cmp word [bp+lCount], byte 0 ; in recursion ? 0 00004E1A 749E je .loop_j ; no, loop --> 5704 0 00004E1C 5B pop bx 0 00004E1D 53 push bx ; retrieve saved ('@') operator 5707 0 00004E1E E85F00 call .compare_operators ; (cmp bl, cl = cmp @oprtr, Aoprtr) 0 00004E21 7297 jb .loop_j ; A's operator's precedence higher --> 5710 5711 %if _EXPRESSION_DEBUG 5712 push ax 5713 push bx 5714 push cx 5715 push dx 5716 push si 5717 push di 5718 5719 cmp bx, OPPREC_COND 5720 jne @F 5721 mov dx, .msg_looping_cond 5722 nearcall putsz 5723 @@: 5724 5725 pop di 5726 pop si 5727 pop dx 5728 pop cx 5729 pop bx 5730 pop ax 5731 %endif 5732 0 00004E23 83FB01 cmp bx, OPPREC_COND 0 00004E26 7492 je .loop_j 5735 5736 d4 call expr_d4message 5737 d4 asciz "getexpression: Loop/recursion found to be not necessary anymore",13,10 5738 5739 ; dec word [bp+lCount] 5740 ; jmp .cont ; return to previous level --> 5741 5742 .end: 0 00004E28 FF4EFE dec word [bp+lCount] ; decrease loop count 0 00004E2B 7990 jns .cont ; process next operand from stack --> 5745 0 00004E2D 8B56F8 mov dx, word [bp+lA+0] 0 00004E30 8B5EFA mov bx, word [bp+lA+2] ; retrieve A 0 00004E33 8B46FC mov ax, word [bp+lA+4] ; (discard (invalid) operator) 5749 0 00004E36 89EC5D lleave code ; remove the stack frame 5751 0 00004E39 5F pop di 0 00004E3A 59 pop cx ; restore registers 5754 0 00004E3B FF0E[700B] dec word [hh_depth] 0 00004E3F 4E dec si 0 00004E40 AC lodsb ; (restore al) 5758 5759 .countsignificantbits: section_of_function getexpression 0 00004E41 51 push cx 0 00004E42 52 push dx 0 00004E43 53 push bx 0 00004E44 B90100 mov cx, 1 0 00004E47 53 push bx 0 00004E48 F6C440 test ah, 40h ; signed type ? 0 00004E4B 7416 jz .unsigned ; no --> 0 00004E4D F6C780 test bh, 80h ; negative value ? 0 00004E50 7411 jz .unsigned ; no --> 5769 .signed: 0 00004E52 21D3 and bx, dx 0 00004E54 43 inc bx ; = 0 if -1 (all bits set) 0 00004E55 5B pop bx 0 00004E56 741F jz .done ; is -1, 1 significant bit --> 0 00004E58 B122 mov cl, 32+1+1 ; number of significant bits is 1 + 1-based index of highest clear bit 5775 .signedloop: 0 00004E5A D1E2 shl dx, 1 0 00004E5C D1D3 rcl bx, 1 ; shift up the number 0 00004E5E 49 dec cx ; maintain index 0 00004E5F 72F9 jc .signedloop ; still a set bit --> 0 00004E61 EB14 jmp short .done 5781 .unsigned: 0 00004E63 09D3 or bx, dx ; = 0 if 0 (all bits cleared) 0 00004E65 5B pop bx 0 00004E66 740F jz .done ; is 0, 1 significant bit --> 0 00004E68 B121 mov cl, 32+1 ; number of significant bits is 1-based index of highest set bit 5786 .unsignedloop: 0 00004E6A D1E2 shl dx, 1 0 00004E6C D1D3 rcl bx, 1 0 00004E6E 49 dec cx 0 00004E6F 73F9 jnc .unsignedloop 0 00004E71 F6C440 test ah, 40h ; positive signed value ? 0 00004E74 7401 jz .done ; no --> 0 00004E76 41 inc cx ; then the following zero bit is required too 5794 .done: 0 00004E77 80E4C0 and ah, 1100_0000b 5796 ; insure we only pass the top two type bits 0 00004E7A 08CC or ah, cl 5798 ; low 6 bits = number of significant bits 0 00004E7C 5B pop bx 0 00004E7D 5A pop dx 0 00004E7E 59 pop cx 0 00004E7F C3 retn 5803 5804 5805 ; INP: bl = operator index 1 5806 ; cl = operator index 2 5807 ; OUT: flags as for "cmp precedence1, precedence2" 5808 ; CHG: bx, cx 5809 .compare_operators: 0 00004E80 E80600 call .getprecedence 0 00004E83 E80300 call .getprecedence 0 00004E86 39CB cmp bx, cx 0 00004E88 C3 retn 5814 5815 .getprecedence: 0 00004E89 30FF xor bh, bh 0 00004E8B 8A9F[D000] mov bl, byte [operatorprecedences+bx] 0 00004E8F 87D9 xchg bx, cx 0 00004E91 C3 retn 5820 5821 getexpression.lit_ishexdigit?: section_of_function 0 00004E92 B93946 mov cx, "9F" 5823 getexpression.lit_isdigit?: section_of_function 0 00004E95 3C30 cmp al, '0' 0 00004E97 7214 jb .no 0 00004E99 38C8 cmp al, cl 0 00004E9B 760D jbe .yes 0 00004E9D 50 push ax 0 00004E9E E8[0000] nearcall capitalise 0 00004EA1 38E8 cmp al, ch 0 00004EA3 7707 ja .no_p 0 00004EA5 3C41 cmp al, 'A' 0 00004EA7 7203 jb .no_p 0 00004EA9 58 pop ax 5835 .yes: 0 00004EAA F8 clc 0 00004EAB C3 retn 5838 5839 .no_p: 0 00004EAC 58 pop ax 5841 .no: 0 00004EAD F9 stc 0 00004EAE C3 retn 5844 5845 5846 of_cond: section_of_function 0 00004EAF 50 push ax ; second operand type 0 00004EB0 4E dec si 0 00004EB1 AD lodsw 0 00004EB2 3D3A3A cmp ax, "::" 0 00004EB5 7530 jne short .error 5852 %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_COND_STACK_CHECK 0 00004EB7 E80901 call stack_check_indirection 5854 %else 5855 mov ax, _EXPRESSION_COND_STACK_CHECK 5856 call stack_check ; abort if deep recursion 5857 %endif 0 00004EBA A9[0000] test ax, msg.stack_overflow.cond 5859 0 00004EBD A1[640B] mov ax, word [hhvar] 0 00004EC0 0B06[660B] or ax, word [hhvar + 2] ; ax = flag (zero if to take third operand) 0 00004EC4 53 push bx 0 00004EC5 52 push dx 0 00004EC6 50 push ax ; preserve stack 0 00004EC7 AC lodsb 0 00004EC8 E86CFB nearcall getexpression ; parse third operand 0 00004ECB E8[0000] nearcall skipcomm0 ; allow comma afterwards 0 00004ECE 59 pop cx 0 00004ECF E309 jcxz @F ; if to take third operand --> 0 00004ED1 5A pop dx 0 00004ED2 5B pop bx ; take second operand 0 00004ED3 88C1 mov cl, al 0 00004ED5 58 pop ax ; ah = second operand type 0 00004ED6 88C8 mov al, cl ; preserve al 0 00004ED8 EB03 jmp @FF 5876 5877 @@: 0 00004EDA 59 pop cx 0 00004EDB 59 pop cx ; discard second operand value 0 00004EDC 59 pop cx ; discard second operand type 5881 @@: 0 00004EDD 59 pop cx ; discard near return address 0 00004EDE 59 pop cx ; discard cx on stack 5884 0 00004EDF C646FC19 mov byte [bp+lA+4], OPERATOR_RIGHTOP 0 00004EE3 4E dec si 0 00004EE4 E926FE jmp getexpression.term_done 5888 5889 .error: 0 00004EE7 E9[0000] jmp error_expr 5891 5892 lleave ctx 5893 5894 5895 ; INP: si-> possible unary operators 5896 ; OUT: dx = 1 + count of unary operators 5897 ; al, si-> behind identified unary operators 5898 ; ch = bit mask of required bytes, 5899 ; bits 0..3 represent one byte of a dword each 5900 ; bits 4..7 are clear 5901 ; CHG: bx, ch, di 5902 ; 5903 ; Type specifications are parsed as unary operators 5904 ; here. (Elsewhere, "unary operators" refers only to 5905 ; the unary operators specified as one of "+-~!?".) 5906 count_unary_operators: section_of_function 0 00004EEA 31FF xor di, di 5908 ; INP: si-> possible unary operators 5909 ; di = maximum count+1 of unary operators to process, 5910 ; zero means unlimited 5911 ; OUT: dx = 1 + count of unary operators, 5912 ; at most di 5913 ; al, si-> behind identified unary operators 5914 ; ch = bit mask of required bytes, 5915 ; bits 0..3 represent one byte of a dword each 5916 ; bits 4..7 are clear 5917 ; ZR if maximum reached 5918 ; NZ if maximum not reached 5919 ; CHG: bx, ch 5920 count_unary_operators_restrict: section_of_function 0 00004EEC B50F mov ch, 1111b ; default to access a full dword 0 00004EEE 31D2 xor dx, dx ; initialize counter to zero 0 00004EF0 EB05 jmp @F 5924 5925 .loop: 0 00004EF2 E8[0000] nearcall skipcomma 0 00004EF5 4E dec si 0 00004EF6 5F pop di ; get maximum count 5929 @@: 0 00004EF7 42 inc dx ; count unary operators and type specifiers 0 00004EF8 57 push di ; save maximum count again 0 00004EF9 E8[0000] nearcall skipwhite ; load next character and skip blanks 0 00004EFC 39FA cmp dx, di ; reached maximum ? 0 00004EFE 741B je .end ; yes --> (ZR) 0 00004F00 51 push cx 0 00004F01 E847F1 nearcall istype? ; check for type and if so retrieve info 0 00004F04 720F jc .notype ; not a type --> 0 00004F06 59 pop cx 5939 0 00004F07 D1EB shr bx, 1 ; discard signedness bit 0 00004F09 89FE mov si, di ; -> behind the type specifier 0 00004F0B B11F mov cl, 01Fh ; prepare shift count register 0 00004F0D 238F[2400] and cx,[typebitmasks+bx]; apply mask and get shift count register 0 00004F11 D2E5 shl ch, cl ; apply shift 0 00004F13 EBDD jmp short .loop ; check for more --> 5946 5947 .notype: 0 00004F15 E8EDF0 nearcall isunaryoperator?; is it a unary operator? 0 00004F18 59 pop cx 0 00004F19 74D7 je .loop ; yes, check for more --> 5951 ; (NZ) 5952 .end: 0 00004F1B 5F pop di ; discard 0 00004F1C C3 retn 5955 5956 5957 get3byte.checksignificantbits: section_of_function 0 00004F1D 50 push ax 0 00004F1E 80E43F and ah, 3Fh 0 00004F21 80FC18 cmp ah, 24 0 00004F24 EB1E jmp checksignificantbitscommon 5962 5963 getword: section_of_function 0 00004F26 53 push bx 0 00004F27 E80DFB nearcall getexpression 0 00004F2A 5B pop bx 5967 .checksignificantbits: section_of_function getword 0 00004F2B 50 push ax 0 00004F2C 80E43F and ah, 3Fh 0 00004F2F 80FC10 cmp ah, 16 0 00004F32 EB10 jmp checksignificantbitscommon 5972 5973 getbyte: section_of_function 0 00004F34 53 push bx 0 00004F35 52 push dx 0 00004F36 E8FEFA nearcall getexpression 0 00004F39 5B pop bx 0 00004F3A 88FE mov dh, bh 0 00004F3C 5B pop bx 5980 .checksignificantbits: section_of_function getbyte 0 00004F3D 50 push ax 0 00004F3E 80E43F and ah, 3Fh 0 00004F41 80FC08 cmp ah, 8 5984 checksignificantbitscommon: section_of_function 0 00004F44 58 pop ax 0 00004F45 7701 ja short errorj6 ; if error 0 00004F47 C3 retn 5988 5989 errorj6: 0 00004F48 E9[0000] jmp error_expr 5991 5992 5993 ; GETNYB - Convert the hex character in AL into a nybble. Return 5994 ; carry set in case of error. 5995 5996 getnyb: section_of_function 0 00004F4B 50 push ax 0 00004F4C 2C30 sub al, '0' 0 00004F4E 3C09 cmp al, 9 0 00004F50 760D jbe .return ; if normal digit 0 00004F52 58 pop ax 0 00004F53 50 push ax 0 00004F54 E8[0000] nearcall capitalise 0 00004F57 2C41 sub al, 'A' 0 00004F59 3C05 cmp al, 'F'-'A' 0 00004F5B 7706 ja .error ; if not A..F 0 00004F5D 040A add al, 10 6008 .return: 0 00004F5F 44 inc sp ; normal return (first pop old AX) 0 00004F60 44 inc sp 0 00004F61 F8 clc 0 00004F62 C3 retn 6013 .error: 0 00004F63 58 pop ax ; error return 0 00004F64 F9 stc 0 00004F65 C3 retn 6017 6018 6019 ; INP: si -> input line 6020 ; OUT: NC if normal range (nonzero, upper >= lower), 6021 ; bx:dx = TO value (upper bound) 6022 ; cx:di = FROM value (lower bound) 6023 ; CY if not normal, 6024 ; bx:dx and cx:di may be invalid 6025 ; ZR if FROM LENGTH with zero length, cx:di valid 6026 ; al = first character 6027 ; si -> next character 6028 ; jumps to error if invalid input 6029 get_value_range: section_of_function 0 00004F66 E8[0000] nearcall skipwhite 0 00004F69 4E dec si 0 00004F6A BA[0000] mov dx, msg.from 0 00004F6D E8[0000] nearcall isstring? 0 00004F70 AC lodsb 0 00004F71 7540 jne .not_from 6036 6037 .from: 0 00004F73 E8C1FA nearcall getexpression ; (recursive) 0 00004F76 89D7 mov di, dx 0 00004F78 89D9 mov cx, bx ; cx:di = from 6041 0 00004F7A E8[0000] nearcall skipcomm0 0 00004F7D 4E dec si 0 00004F7E BA[0000] mov dx, msg.to 0 00004F81 E8[0000] nearcall isstring? 0 00004F84 7427 je .from_to 0 00004F86 BA[0000] mov dx, msg.length 0 00004F89 E8[0000] nearcall isstring? 0 00004F8C 7510 jne short .error 6050 6051 .from_length: 0 00004F8E AC lodsb 0 00004F8F 51 push cx 0 00004F90 E80BF0 nearcall get_length ; (recursive call to getexpression) 0 00004F93 59 pop cx 0 00004F94 85DB test bx, bx 0 00004F96 7509 jnz @F 0 00004F98 85D2 test dx, dx 0 00004F9A 7505 jnz @F 6060 ; ZR = length is zero, cx:di = from 6061 .notnormal: 0 00004F9C F9 stc 0 00004F9D C3 retn 6064 6065 .error: 0 00004F9E E9[0000] jmp error_expr 6067 6068 @@: 6069 ; bx:dx = length 0 00004FA1 01FA add dx, di 0 00004FA3 11CB adc bx, cx ; bx:dx = from + length 0 00004FA5 83EA01 sub dx, 1 0 00004FA8 83DB00 sbb bx, 0 ; bx:dx = from + length - 1 0 00004FAB EB0D jmp @F 6075 6076 .from_to: 0 00004FAD AC lodsb 6078 0 00004FAE E886FA nearcall getexpression ; (recursive) 6080 ; bx:dx = to 6081 ; cx:di = from 0 00004FB1 EB07 jmp @F 6083 6084 .not_from: 0 00004FB3 E881FA nearcall getexpression ; (recursive) 0 00004FB6 89D7 mov di, dx 0 00004FB8 89D9 mov cx, bx ; bx:dx = cx:ax = value 6088 6089 @@: 0 00004FBA 39CB cmp bx, cx 0 00004FBC 7502 jne @F 0 00004FBE 39FA cmp dx, di 6093 @@: 0 00004FC0 72DA jb .notnormal ; NZ = length overflow or not normal FROM TO 0 00004FC2 C3 retn ; (NC) 6096 6097 6098 stack_check_indirection: 0 00004FC3 B88000 mov ax, _EXPRESSION_INDIRECTION_STACK_CHECK 6100 6101 ; INP: ax = how much stack should be left 6102 ; word [cs:ip + 1] = message for location 6103 ; OUT: doesn't return if stack overflow 6104 ; CHG: ax 6105 ; STT: ds = ss 6106 stack_check: 6107 %if _SYMBOLIC 6108 call .internal 6109 %else 0 00004FC6 05[0000] add ax, stack 0 00004FC9 39C4 cmp sp, ax 6112 %endif 0 00004FCB 7201 jb @F 0 00004FCD C3 retn 6115 6116 @@: 0 00004FCE 58 pop ax 6118 0 00004FCF 16 push ss 0 00004FD0 07 pop es 0 00004FD1 8B26[0000] mov sp, [throwsp] 6122 0 00004FD5 BF[0000] mov di, msg.stack_overflow.caller 0 00004FD8 E8[0000] nearcall hexword 0 00004FDB BA[0000] mov dx, msg.stack_overflow 0 00004FDE E8[0000] nearcall putsz 0 00004FE1 93 xchg ax, bx 0 00004FE2 2E8B5701 mov dx, [cs:bx + 1] 0 00004FE6 E8[0000] nearcall putsz 0 00004FE9 B83801 mov ax, 0138h 0 00004FEC E8[0000] nearcall setrc 6132 6133 %if _EXPRDUALCODE && _DUALCODE 6134 nearcall to_errret_pop 6135 usesection lDEBUG_CODE 6136 6137 to_errret_pop: equ $ 6138 add sp, 6 6139 jmp near [errret] 6140 usesection lDEBUG_CODE2 6141 %else 0 00004FEF FF26[0000] jmp near [errret] 6143 %endif 6144 6145 6146 %if _SYMBOLIC 6147 ; INP: ax = how much stack should be left 6148 ; OUT: CY if stack overflow 6149 ; CHG: ax 6150 ; STT: ds = ss 6151 .internal: section_of_function stack_check 6152 add ax, word [stack_low_address] 6153 cmp sp, ax 6154 retn 6155 %endif 6156 6157 %if _PM 6158 ; INP: ss:sp -> 8-byte save area 6159 ; OUT: in PM: save area filled 6160 ; save area left on stack 6161 ; CHG: - 6162 ; STT: es = ds = debugger data selector 6163 save_scratchsel: 6164 lframe near 6165 lpar qword, savearea 6166 lpar_return 6167 lenter 6168 nearcall ispm 6169 jnz .ret 6170 push ax 6171 push bx 6172 _386_o32 6173 push di 6174 _386 xor edi, edi 6175 lea di, [bp + ?savearea] 6176 mov bx, word [scratchsel] 6177 mov ax, 000Bh 6178 int 31h ; get descriptor 6179 _386_o32 6180 pop di 6181 pop bx 6182 pop ax 6183 .ret: 6184 lleave 6185 lret 6186 6187 ; INP: ss:sp -> 8-byte save area 6188 ; OUT: in PM: save area used 6189 ; save area popped from stack 6190 ; CHG: - 6191 ; STT: es = ds = debugger data selector 6192 restore_scratchsel: 6193 lframe near 6194 lpar qword, savearea 6195 lenter 6196 nearcall ispm 6197 jnz .ret 6198 push ax 6199 push bx 6200 _386_o32 6201 push di 6202 _386 xor edi, edi 6203 lea di, [bp + ?savearea] 6204 mov bx, word [scratchsel] 6205 mov ax, 000Ch 6206 int 31h ; set descriptor 6207 _386_o32 6208 pop di 6209 pop bx 6210 pop ax 6211 .ret: 6212 lleave 6213 lret 6214 %endif === Trace listing source: ../lst/debug.obj/ff.lst 1 2 %if 0 3 4 lDebug F command (find) 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 "ff.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00002313 ???????? eldhSignature: resb 4 ; "ELD1" 0 00002317 ?????? resb 3 ; reserved 0 0000231A ?? resb 1 ; 26 (Ctrl-Z) 0 0000231B ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000231F ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002321 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002323 ???????? eldhDataOffset: resd 1 0 00002327 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00002329 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000232B ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000232D ???????? eldhReserved: resb 4 ; reserved 0 00002331 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00002333 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00002337 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000233B ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000233F ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002313 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000231B ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000231F ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002321 ???? 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 0 00002313 ???? 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 0 00002315 ???? eldltAmount: resw 1 0 00002317 ???????? 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 0 00002313 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00002315 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00002317 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00002319 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000231B ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002323 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00002313 ???? eldlSignature: resw 1 ; 0E1D1h 0 00002315 ???????? eldlReserved: resw 2 0 00002319 ???? eldlUseLinkHash: resw 1 0 0000231B ???? eldlDataAmount: resw 1 0 0000231D ???? eldlDataPrefixes: resw 1 0 0000231F ???? eldlDataEntries: resw 1 0 00002321 ???? eldlDataAddresses: resw 1 0 00002323 ???? eldlCodeAmount: resw 1 0 00002325 ???? eldlCodePrefixes: resw 1 0 00002327 ???? eldlCodeEntries: resw 1 0 00002329 ???? 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 0 00002313 ???? ifKeyword: resw 1 0 00002315 ???? ifDescription: resw 1 0 00002317 ???? ifOptions: resw 1 0 00002319 ???? ifValue: resw 1 0 0000231B ???? ifTrying: resw 1 0 0000231D ???? 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 0 00002313 ???????? saOffset: resd 1 0 00002317 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00002313 ???? so16aOffset: resw 1 0 00002315 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00002313 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00002313 ?????? bsJump: resb 3 0 00002316 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00002313 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00002315 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00002316 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00002318 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00002319 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000231B ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000231D ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000231E ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00002320 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00002322 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00002324 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00002328 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 0000232C ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00002330 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00002332 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00002334 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00002338 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 0000233A ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00002313 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00002314 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00002315 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00002316 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00002325 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00002313 ???????????????? deName: resb 8 0 0000231B ?????? deExt: resb 3 0 0000231E ?? deAttrib: resb 1 0 0000231F ?? dePlusSize: resb 1 0 00002320 ?????????????? resb 7 0 00002327 ???? deClusterHigh: resw 1 0 00002329 ???? deTime: resw 1 0 0000232B ???? deDate: resw 1 0 0000232D ???? deClusterLow: resw 1 0 0000232F ???????? 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 0 100002303 ???????? lsvFirstCluster: resd 1 0 100002307 ???????? lsvFATSector: resd 1 0 10000230B ???? lsvFATSeg: resw 1 0 10000230D ???? lsvLoadSeg: resw 1 0 10000230F ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 1000022F3 ???? ldMemoryTop: resw 1 0 1000022F5 ???? ldLoadTop: resw 1 0 1000022F7 ???? ldSectorSeg: resw 1 0 1000022F9 ?? ldFATType: resb 1 92 <2> ldFlags: 0 1000022FA ?? ldHasLBA: resb 1 0 1000022FB ???? ldClusterSize: resw 1 0 1000022FD ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 1000022FF ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100002301 ?? .partition: resb 1 ; byte 0 100002302 ?? .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 <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 0 1000022E3 ???????? ldRootSector: resd 1 0 1000022E7 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 1000022E9 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 1000022EB ???? ldParasLeft: resw 1 0 1000022ED ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000022D3 ???????? ldMaxCluster: resd 1 0 1000022D7 ???????? ldFileSize: resd 1 0 1000022DB ???????? ldCurrentCluster: resd 1 0 1000022DF ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00002313 ???????? liiSignature: resb 4 ; "NLDR" 0 00002317 ???? liiVersion: resb 2 ; "00" 0 00002319 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000231B ???? liiAmountParagraphs: resw 1 0 0000231D ???????????? liiReserved: resw 3 0 00002323 ???? 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 0 00002325 ???? 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 0 00002327 ???? 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 0 00002329 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00002313 ???? lpSize: resw 1 0 00002315 ???? lpCount: resw 1 0 00002317 ???????? lpBuffer: resd 1 0 0000231B ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00002313 ?? piBoot: resb 1 0 00002314 ?????? piStartCHS: resb 3 0 00002317 ?? piType: resb 1 0 00002318 ?????? piEndCHS: resb 3 0 0000231B ???????? piStart: resd 1 0 0000231F ???????? 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 0 00002313 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00002315 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00002317 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00002319 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000231B ???? lsOptions: resw 1 ; option flags 0 0000231D ???? lsSegment: resw 1 ; => where to load file 0 0000231F ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00002323 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00002327 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00002329 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 0000232B ???????????????? 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 0 00002313 ???? exact_struc_at 00h, exeSignature: resw 1 0 00002315 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00002317 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00002319 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000231B ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 0000231D ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 0000231F ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00002321 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00002323 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00002325 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00002327 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00002329 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 0000232B ???? 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. 0 0000232D ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00002313 ???? ifhHandle: resw 1 0 00002315 ???? ifhFlags: resw 1 0 00002317 ???????? 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 <1> areastrucEntry: resb 24 0 0000232B ???????? areastrucNext: resd 1 0 0000232F ???????? areastrucPrev: resd 1 0 00002333 ???? areastrucSubAmount: resw 1 0 00002335 ???? areastrucSubOffset: resw 1 0 00002337 ???? areastrucFunAmount: resw 1 0 00002339 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00002313 ???????? areastrucsubLinear: resd 1 0 00002317 ???????? areastrucsubLinearEnd: resd 1 0 0000231B ???? areastrucsubListOffset: resw 1 0 0000231D ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00002313 ???????? areastrucfunLinear: resd 1 0 00002317 ???????? areastrucfunLinearEnd: resd 1 0 0000231B ???? areastrucfunListOffset: resw 1 0 0000231D ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00002313 ???? areastart: resw 1 0 00002315 ???? areaend: resw 1 0 00002317 ???? areamessage: resw 1 0 00002319 ???? 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 0 00002313 ???? 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.) 0 00002315 ???? ivFlags: resw 1 0 00002317 ???? 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. 0 00002319 ???? 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 0 0000231B ?? 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. 0 0000231C ?? 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 0 00002313 ???????? mrLinear: resd 1 0 00002317 ???????? mrOffset: resd 1 0 0000231B ???? mrSegmentSelector: resw 1 0 0000231D ???? mrFlags: resw 1 0 0000231F ???????? 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 0 00002313 ???????? .size_: resd 1 0 00002317 ???? .srchdl: resw 1 0 00002319 ???????? .srcadr: resd 1 0 0000231D ???? .dsthdl: resw 1 0 0000231F ???????? .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 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 23 ------------------ note: usesection lDEBUG_CODE 24 25 ; F command - fill memory 26 ff: 0 00004FF3 31C9 xor cx, cx ; get address range (no default length) 0 00004FF5 8B1E[0000] mov bx, word [reg_ds] 0 00004FF9 E8[0000] nearcall getrange ; get address range into bx:(e)dx 30 _386_PM_o32 ; sub ecx, edx 0 00004FFC 29D1 sub cx, dx 32 _386_PM_o32 ; inc ecx 0 00004FFE 41 inc cx ; (e)cx = number of bytes 0 00004FFF 53 push bx 35 _386_PM_o32 ; push ecx 0 00005000 51 push cx ; save it 37 _386_PM_o32 ; push edx 0 00005001 52 push dx ; save start address 39 0 00005002 4E dec si 0 00005003 BA[0000] mov dx, msg.range 0 00005006 E8[0000] call isstring? 0 00005009 AC lodsb 0 0000500A 751A jne .notrange 45 0 0000500C 8B1E[0000] mov bx, word [reg_ds] ; get search range 0 00005010 800E[0300]04 setopt [internalflags3], dif3_accept_getrange_0 48 %if _MS_0RANGE_COMPAT && !_LOADER 0 00005015 C606[0000]00 mov byte [getrange_is_uu], 0 50 %endif 0 0000501A E8[0000] nearcall getrangeX.ecx_and_0_valid 52 ; try to get second range 0 0000501D E8[0000] call chkeol ; and insure end-of-line 54 ; successful if it returned 55 _386_PM_o32 ; mov esi, edx 0 00005020 89D6 mov si, dx ; bx:esi-> source string 57 _386_PM_o32 ; sub ecx, edx 0 00005022 29D1 sub cx, dx ; ecx = count - 1 0 00005024 EB17 jmp short @F 60 61 .notrange: 0 00005026 E8[0000] call skipcomm0 0 00005029 E8[0000] nearcall getstr ; get string of bytes 0 0000502C 89F9 mov cx, di 0 0000502E 81E9[0000] sub cx, line_out 0 00005032 7503E9[0000] jz error 0 00005037 49 dec cx 68 _386_PM movzx ecx, cx 0 00005038 8CDB mov bx, ds 70 _386_PM xor esi, esi 0 0000503A BE[0000] mov si, line_out 72 73 @@: 74 _386_PM_o32 ; pop edi 0 0000503D 5F pop di 76 _386_PM_o32 ; pop eax 0 0000503E 58 pop ax 0 0000503F 07 pop es 0 00005040 8EDB mov ds, bx 80 %if _PM 81 cmp byte [ss:bAddr32], 0 82 jz ff16 83 ff32: 84 [cpu 386] 85 inc ecx 86 jz error 87 cmp ecx, byte 1 88 je .onebytesource 89 xor edx, edx ; edx:eax = size 90 div ecx 91 test eax, eax 92 jz .partial 93 .loop: 94 push esi 95 push ecx 96 a32 movsb 97 dec ecx 98 a32 rep movsb 99 pop ecx 100 pop esi 101 dec eax 102 jnz .loop 103 .partial: 104 mov ecx, edx ; get remainder (number of bytes in partial copy) 105 jecxz ffret ; if no partial copy --> 106 a32 rep movsb 107 jmp short ffret ; done --> 108 .onebytesource: 109 mov ecx, eax ; size 110 mov al, byte [esi] 111 a32 rep stosb 112 jmp short ffret 113 __CPU__ 114 ff16: 115 %endif 0 00005042 31D2 xor dx, dx ; dx:ax = size 0 00005044 83F801 cmp ax, byte 1 0 00005047 83D200 adc dx, byte 0 ; convert 0000:0000 to 0001:0000 (0 = 64 KiB) 0 0000504A 41 inc cx 0 0000504B 7503 jnz @F 121 ; dx:ax = 1_0000h, remainder = 0, quotient = 1 122 ; dx:ax = 1, remainder = 1, quotient = 0 123 ; dx:ax = 1234h, remainder = 1234h, quotient = 0 0 0000504D 92 xchg ax, dx 0 0000504E EB07 jmp @FF 126 127 @@: 0 00005050 83F901 cmp cx, byte 1 0 00005053 7419 je .onebytesource ; a common optimization 0 00005055 F7F1 div cx ; compute number of whole repetitions 131 @@: 0 00005057 85C0 test ax, ax 0 00005059 740B jz .partial ; if less than one whole rep 134 .loop: 0 0000505B 56 push si 0 0000505C 51 push cx 0 0000505D A4 movsb 0 0000505E 49 dec cx 0 0000505F F3A4 rep movsb 0 00005061 59 pop cx 0 00005062 5E pop si 0 00005063 48 dec ax 0 00005064 75F5 jnz .loop ; if more to go 144 .partial: 0 00005066 89D1 mov cx, dx ; get remainder (number of bytes in partial copy) 0 00005068 E30C jcxz ffret ; if no partial copy --> 0 0000506A F3A4 rep movsb 0 0000506C EB08 jmp short ffret ; done --> 149 .onebytesource: 0 0000506E 89C1 mov cx, ax ; size 0 00005070 8A04 mov al, byte [si] 0 00005072 AA stosb ; cx=0 -> 64 kB 0 00005073 49 dec cx 0 00005074 F3AA rep stosb 155 ffret: 0 00005076 16 push ss ; restore ds 0 00005077 1F pop ds 0 00005078 16 push ss ; restore es 0 00005079 07 pop es 0 0000507A C3 retn === Trace listing source: ../lst/debug.obj/fptostr.lst 1 2 %if 0 3 4 Copyright (C) 2008-2012 E. C. Masloch 5 6 Usage of the works is permitted provided that this 7 instrument is retained with the works, so that any entity 8 that uses the works is notified of this instrument. 9 10 DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 11 12 %endif 13 14 %define SOURCEFILENAME "fptostr.asm" 15 %ifidni __OUTPUT_FORMAT__, obj 16 %include "debug.mac" 1 <1> [list -] 14 <3> [list -] 14 <2> [list -] 86 <1> [list -] 86 ------------------ <1> note: Disable usesection detection === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00002313 ???????? eldhSignature: resb 4 ; "ELD1" 0 00002317 ?????? resb 3 ; reserved 0 0000231A ?? resb 1 ; 26 (Ctrl-Z) 0 0000231B ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000231F ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002321 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002323 ???????? eldhDataOffset: resd 1 0 00002327 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00002329 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000232B ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000232D ???????? eldhReserved: resb 4 ; reserved 0 00002331 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00002333 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00002337 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000233B ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000233F ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002313 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000231B ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000231F ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002321 ???? 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 0 00002313 ???? 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 0 00002315 ???? eldltAmount: resw 1 0 00002317 ???????? 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 0 00002313 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00002315 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00002317 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00002319 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000231B ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002323 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00002313 ???? eldlSignature: resw 1 ; 0E1D1h 0 00002315 ???????? eldlReserved: resw 2 0 00002319 ???? eldlUseLinkHash: resw 1 0 0000231B ???? eldlDataAmount: resw 1 0 0000231D ???? eldlDataPrefixes: resw 1 0 0000231F ???? eldlDataEntries: resw 1 0 00002321 ???? eldlDataAddresses: resw 1 0 00002323 ???? eldlCodeAmount: resw 1 0 00002325 ???? eldlCodePrefixes: resw 1 0 00002327 ???? eldlCodeEntries: resw 1 0 00002329 ???? 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 0 00002313 ???? ifKeyword: resw 1 0 00002315 ???? ifDescription: resw 1 0 00002317 ???? ifOptions: resw 1 0 00002319 ???? ifValue: resw 1 0 0000231B ???? ifTrying: resw 1 0 0000231D ???? 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 0 00002313 ???????? saOffset: resd 1 0 00002317 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00002313 ???? so16aOffset: resw 1 0 00002315 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00002313 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00002313 ?????? bsJump: resb 3 0 00002316 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00002313 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00002315 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00002316 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00002318 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00002319 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000231B ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000231D ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000231E ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00002320 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00002322 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00002324 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00002328 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 0000232C ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00002330 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00002332 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00002334 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00002338 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 0000233A ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00002313 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00002314 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00002315 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00002316 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00002325 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00002313 ???????????????? deName: resb 8 0 0000231B ?????? deExt: resb 3 0 0000231E ?? deAttrib: resb 1 0 0000231F ?? dePlusSize: resb 1 0 00002320 ?????????????? resb 7 0 00002327 ???? deClusterHigh: resw 1 0 00002329 ???? deTime: resw 1 0 0000232B ???? deDate: resw 1 0 0000232D ???? deClusterLow: resw 1 0 0000232F ???????? 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 0 100002303 ???????? lsvFirstCluster: resd 1 0 100002307 ???????? lsvFATSector: resd 1 0 10000230B ???? lsvFATSeg: resw 1 0 10000230D ???? lsvLoadSeg: resw 1 0 10000230F ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 1000022F3 ???? ldMemoryTop: resw 1 0 1000022F5 ???? ldLoadTop: resw 1 0 1000022F7 ???? ldSectorSeg: resw 1 0 1000022F9 ?? ldFATType: resb 1 92 <2> ldFlags: 0 1000022FA ?? ldHasLBA: resb 1 0 1000022FB ???? ldClusterSize: resw 1 0 1000022FD ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 1000022FF ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100002301 ?? .partition: resb 1 ; byte 0 100002302 ?? .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 <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 0 1000022E3 ???????? ldRootSector: resd 1 0 1000022E7 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 1000022E9 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 1000022EB ???? ldParasLeft: resw 1 0 1000022ED ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000022D3 ???????? ldMaxCluster: resd 1 0 1000022D7 ???????? ldFileSize: resd 1 0 1000022DB ???????? ldCurrentCluster: resd 1 0 1000022DF ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00002313 ???????? liiSignature: resb 4 ; "NLDR" 0 00002317 ???? liiVersion: resb 2 ; "00" 0 00002319 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000231B ???? liiAmountParagraphs: resw 1 0 0000231D ???????????? liiReserved: resw 3 0 00002323 ???? 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 0 00002325 ???? 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 0 00002327 ???? 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 0 00002329 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00002313 ???? lpSize: resw 1 0 00002315 ???? lpCount: resw 1 0 00002317 ???????? lpBuffer: resd 1 0 0000231B ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00002313 ?? piBoot: resb 1 0 00002314 ?????? piStartCHS: resb 3 0 00002317 ?? piType: resb 1 0 00002318 ?????? piEndCHS: resb 3 0 0000231B ???????? piStart: resd 1 0 0000231F ???????? 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 0 00002313 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00002315 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00002317 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00002319 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000231B ???? lsOptions: resw 1 ; option flags 0 0000231D ???? lsSegment: resw 1 ; => where to load file 0 0000231F ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00002323 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00002327 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00002329 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 0000232B ???????????????? 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 0 00002313 ???? exact_struc_at 00h, exeSignature: resw 1 0 00002315 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00002317 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00002319 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000231B ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 0000231D ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 0000231F ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00002321 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00002323 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00002325 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00002327 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00002329 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 0000232B ???? 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. 0 0000232D ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00002313 ???? ifhHandle: resw 1 0 00002315 ???? ifhFlags: resw 1 0 00002317 ???????? 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 <1> areastrucEntry: resb 24 0 0000232B ???????? areastrucNext: resd 1 0 0000232F ???????? areastrucPrev: resd 1 0 00002333 ???? areastrucSubAmount: resw 1 0 00002335 ???? areastrucSubOffset: resw 1 0 00002337 ???? areastrucFunAmount: resw 1 0 00002339 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00002313 ???????? areastrucsubLinear: resd 1 0 00002317 ???????? areastrucsubLinearEnd: resd 1 0 0000231B ???? areastrucsubListOffset: resw 1 0 0000231D ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00002313 ???????? areastrucfunLinear: resd 1 0 00002317 ???????? areastrucfunLinearEnd: resd 1 0 0000231B ???? areastrucfunListOffset: resw 1 0 0000231D ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00002313 ???? areastart: resw 1 0 00002315 ???? areaend: resw 1 0 00002317 ???? areamessage: resw 1 0 00002319 ???? 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 0 00002313 ???? 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.) 0 00002315 ???? ivFlags: resw 1 0 00002317 ???? 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. 0 00002319 ???? 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 0 0000231B ?? 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. 0 0000231C ?? 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 0 00002313 ???????? mrLinear: resd 1 0 00002317 ???????? mrOffset: resd 1 0 0000231B ???? mrSegmentSelector: resw 1 0 0000231D ???? mrFlags: resw 1 0 0000231F ???????? 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 0 00002313 ???????? .size_: resd 1 0 00002317 ???? .srchdl: resw 1 0 00002319 ???????? .srcadr: resd 1 0 0000231D ???? .dsthdl: resw 1 0 0000231F ???????? .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 17 %imacro internaldatarelocation 0-*.nolist 18 %endmacro 19 %endif 20 21 22 %if !_LINK || _RN 23 usesection lDEBUG_DATA_ENTRY 24 25 ;--- defines procedures 26 ;--- PowerOf10 27 ;--- FloatToBCD 28 ;--- FloatToStr 29 30 ; These are bits in the FP status word. 31 32 FP_LESSTHAN equ 01h 33 FP_EQUALTO equ 40h 34 35 align 8, db 0 36 ten: dq 10.0 37 ten16: dq 1.0e16 38 ;rounder:dq 5.0e10 39 40 ten_1: dt 1.0e1 ; 10.0 41 dt 1.0e2 ; 100.0 42 dt 1.0e3 ; 1,000.0 43 dt 1.0e4 ; 10,000.0 44 dt 1.0e5 ; 100,000.0 45 dt 1.0e6 ; 1,000,000.0 46 dt 1.0e7 ; 10,000,000.0 47 dt 1.0e8 ; 100,000,000.0 48 dt 1.0e9 ; 1,000,000,000.0 49 dt 1.0e10 ; 10,000,000,000.0 50 dt 1.0e11 ; 100,000,000,000.0 51 dt 1.0e12 ; 1,000,000,000,000.0 52 dt 1.0e13 ; 10,000,000,000,000.0 53 dt 1.0e14 ; 100,000,000,000,000.0 54 dt 1.0e15 ; 1,000,000,000,000,000.0 55 56 ten_16: dt 1.0e16 57 dt 1.0e32 58 dt 1.0e48 59 dt 1.0e64 60 dt 1.0e80 61 dt 1.0e96 62 dt 1.0e112 63 dt 1.0e128 64 dt 1.0e144 65 dt 1.0e160 66 dt 1.0e176 67 dt 1.0e192 68 dt 1.0e208 69 dt 1.0e224 70 dt 1.0e240 71 72 ten_256:dt 1.0e256 73 74 ; The remaining exponents are only necessary for 10-byte doubles. 75 76 dt 1.0e512 77 dt 1.0e768 78 dt 1.0e1024 79 dt 1.0e1280 80 dt 1.0e1536 81 dt 1.0e1792 82 dt 1.0e2048 83 dt 1.0e2304 84 dt 1.0e2560 85 dt 1.0e2816 86 dt 1.0e3072 87 dt 1.0e3328 88 dt 1.0e3584 89 dt 1.0e4096 90 dt 1.0e4352 91 dt 1.0e4608 92 dt 1.0e4864 93 94 %if _DUALCODE 95 usesection lDEBUG_CODE2 96 %else 97 usesection lDEBUG_CODE 98 %endif 99 100 ; Divide or multiply st0 to normalize it 101 ; 102 ; INP: ax = exponent word 103 ; CHG: bx, dx, cl 104 PowerOf10: 105 push si 106 push ax 107 test ax, ax 108 jns .notnegative 109 neg ax 110 .notnegative: 111 fld1 112 mov bl, al 113 and bl, 0Fh ; bits 0..3 114 je .0..3zero 115 mov si, ten_1 116 internaldatarelocation 117 call mul10 118 .0..3zero: 119 mov bl, al 120 mov cl, 4 121 shr bl, cl 122 and bl, 0Fh ; bits 4..7 123 je .4..7zero 124 mov si, ten_16 125 internaldatarelocation 126 call mul10 127 .4..7zero: 128 mov bl, ah 129 and bl, 1Fh ; bits 8..12 130 jz .8..12zero 131 mov si, ten_256 132 internaldatarelocation 133 call mul10 134 .8..12zero: 135 pop ax 136 test ax, ax 137 jns .notnegative2 138 fdivp st1 139 pop si 140 retn 141 142 .notnegative2: 143 fmulp st1 144 pop si 145 retn 146 147 mul10: 148 dec bl 149 mov bh, 0 150 push ax 151 mov ax, bx 152 add ax, ax 153 add ax, ax ; *4 154 add bx, ax ; *5 155 add bx, bx ; *10 156 pop ax 157 fld tword [bx + si] 158 fmulp st1 159 retn 160 161 162 ; Convert a floating point register to ASCII. For internal use. 163 ; The result always has exactly 18 digits, with zero padding 164 ; on the left if required. 165 ; 166 ; INP: st0 = number to convert, 0 <= st0 < 1.0E19 167 ; di-> 18-character output buffer 168 ; CHG: si, di, cx, ax 169 FloatToBCD: 170 push bp 171 mov bp, sp 172 sub sp, 12 173 174 ; The fbstp instruction converts the top of the stack to 175 ; a packed BCD form in ten bytes, with two digits per 176 ; byte. The top byte has the sign, which we ignore. 177 fbstp [ bp-12 ] 178 179 ; Now we need to unpack the BCD to ASCII. 180 lea si, [ bp-4 ] 181 mov cx, 9 182 .nextdigits: 183 mov al, byte [ si ] ; xxxx xxxx AAAA BBBB 184 dec si 185 %if 1 186 mov ah, 0 ; 0000 0000 AAAA BBBB 187 push cx 188 mov cl, 4 189 ror ax, cl ; BBBB xxxx xxxx AAAA 190 rol ah, cl ; xxxx BBBB xxxx AAAA 191 pop cx 192 ;and ax, 0F0Fh ; 0000 BBBB 0000 AAAA 193 %else 194 aam 16 ; 0000 AAAA 0000 BBBB 195 xchg al, ah ; 0000 BBBB 0000 AAAA 196 %endif 197 add ax, "00" 198 stosw 199 loop .nextdigits 200 mov sp, bp 201 pop bp 202 retn 203 204 205 ; Convert a double precision number to a string. 206 ; 207 ; Entry: dword [far pfpin] -> 8-byte double to convert, non-zero 208 ; es = ss : word [pszDbl] -> character buffer 209 ; 210 ; Exit: es = ss : word [pszDbl] -> converted value 211 ; 212 ; CHG: ax, bx, cx, dx 213 ; 214 ; The buffer at pszDbl should be at least 19 bytes long. 215 ; The buffer needs to be initialized with blanks. 216 217 ;FloatToStr PROC stdcall public USES si di pfpin: ptr TBYTE, pszDbl: PTR BYTE 218 dualfunction 219 FloatToStr: section_of_function 220 lframe dualdistance 221 lpar word, ??pszDbl ; pszDbl: PTR BYTE, near 222 lpar dword, ??pfpin ; pfpin: ptr TBYTE, but far 223 lvar word, ??iExp ; LOCAL iExp: WORD 224 lvar word, ??mystat ; LOCAL mystat: WORD 225 lvar 10, ??fpin ; LOCAL fpin: TBYTE 226 lvar 22, ??szTemp ; LOCAL szTemp[22]: BYTE 227 lenter 228 229 %define iExp bp+???%+%? 230 %define mystat bp+???%+%? 231 %define fpin bp+???%+%? 232 %define szTemp bp+???%+%? 233 %define pfpin bp+???%+%? 234 %define pszDbl bp+???%+%? 235 236 push ds 237 push si ; USES si 238 push es 239 push di ; USES di 240 241 ; Special case zero has been filtered already. (fxtract fails for zero.) 242 lds si, [pfpin] 243 push ss 244 pop es 245 lea di, [fpin] 246 mov cx, 5 247 rep movsw ; store number in local buffer 248 push ss 249 pop ds 250 251 mov di, [pszDbl] ; -> output buffer 252 253 ; Check for a negative number. 254 test byte [fpin+9], 80h 255 jz .ispositive 256 and byte [fpin+9], ~80h ; change to positive 257 mov al, '-' ; store a minus sign 258 stosb 259 .ispositive: 260 261 ; Load our value onto the stack two times. 262 fld tword [fpin] 263 fld st0 264 265 ; Compute the closest power of 10 below the number. We can't get an 266 ; exact value because of rounding. We could get close by adding in 267 ; log10(mantissa), but it still wouldn't be exact. Since we'll have to 268 ; check the result anyway, it's silly to waste cycles worrying about 269 ; the mantissa. 270 ; 271 ; The exponent is basically log2(fpin). Those of you who remember 272 ; algebra realize that log2(fpin) x log10(2) = log10(fpin), which is 273 ; what we want. 274 275 fxtract ; ST = mantissa, exponent, fpin 276 fstp st0 ; discard the mantissa 277 fldlg2 ; push log10(2) 278 fmulp st1, st0 ; ST = log10(fpin), fpin 279 fistp word [iExp] ; ST = fpin 280 281 ; An 8-byte double can carry almost 16 digits of precision. Actually, it's 282 ; 15.9 digits, so some numbers close to 1E17 will be wrong in the bottom 283 ; digit. If this is a concern, change the 18 or 16 to a 15. 284 ; 285 ; A 10-byte double can carry almost 19 digits, but fbstp only stores the 286 ; guaranteed 18. Since we're doing 10-byte doubles, we check for 18 instead of 16. 287 288 cmp word [iExp], 18 289 jae .notbelow18 290 fld st0 ; ST = fpin, fpin 291 frndint ; ST = int(fpin), fpin 292 fcomp st1 ; ST = fpin, status set 293 fstsw word [mystat] 294 mov ax, word [mystat] 295 sahf 296 jne .notequal 297 298 ; We have an integer! Lucky day. Go convert it into a temp buffer. 299 300 push di 301 lea di, [szTemp] 302 call FloatToBCD 303 pop di 304 305 mov ax, 16+1 306 mov cx, word [iExp] 307 sub ax, cx 308 inc cx 309 lea si, [szTemp] 310 add si, ax 311 312 ; The off-by-one order of magnitude problem below can hit us here. 313 ; We just trim off the possible leading zero. 314 315 cmp byte [si], '0' 316 jnz .not0digit 317 inc si 318 dec cx 319 .not0digit: 320 321 ; Copy the rest of the converted BCD value to our buffer. 322 323 rep movsb 324 jmp .ftsExit 325 326 .notequal: 327 .notbelow18: 328 329 ; Have fbstp round to 17 places. 330 331 mov ax, 16 ; experiment 332 sub ax, word [iExp] ; adjust exponent to 17 333 call PowerOf10 334 335 ; Either we have exactly 17 digits, or we have exactly 16 digits. We can 336 ; detect that condition and adjust now. 337 338 fcom qword [ten16] 339 internaldatarelocation 340 ; x0xxxx00 means top of stack > ten16 341 ; x0xxxx01 means top of stack < ten16 342 ; x1xxxx00 means top of stack = ten16 343 fstsw word [mystat] 344 mov ax, word [mystat] 345 test ah, 1 346 jz .notset1 347 fmul qword [ten] 348 internaldatarelocation 349 dec word [iExp] 350 .notset1: 351 352 ; Go convert to BCD. 353 354 push di 355 lea di, [szTemp] 356 call FloatToBCD 357 pop di 358 359 lea si, [szTemp+1] ; point to converted buffer 360 361 ; If the exponent is between -15 and 16, we should express this as a number 362 ; without scientific notation. 363 364 mov cx, word [iExp] 365 push cx 366 add cx, 15 367 cmp cx, 15+16 368 pop cx 369 ja .fts6 370 371 ; If the exponent is less than zero, we insert '0.', then -cx 372 ; leading zeros, then 16 digits of mantissa. If the exponent is 373 ; positive, we copy cx+1 digits, then a decimal point (maybe), then 374 ; the remaining 16-cx digits. 375 376 inc cx 377 cmp cx, byte 0 378 jg .ispos1 379 mov ax, "0." 380 stosw 381 neg cx 382 mov al, '0' 383 rep stosb 384 mov cx, 16 385 jmp short .fts3 386 .ispos1: 387 rep movsb 388 mov al, '.' 389 stosb 390 mov cx, 16 391 sub cx, word [iExp] 392 .fts3: 393 rep movsb 394 395 ; Trim off trailing zeros. 396 397 .nextitem2: 398 cmp byte [di-1], '0' 399 jne .fts1 400 dec di 401 jmp short .nextitem2 402 .fts1: 403 404 ; If we cleared out all the decimal digits, kill the decimal point, too. 405 406 cmp byte [di-1], '.' 407 jnz .fts2 408 dec di 409 .fts2: 410 411 ; That's it. 412 413 jmp short .ftsExit 414 .fts6: 415 416 ; Now convert this to a standard, usable format. If needed, a minus 417 ; sign is already present in the outgoing buffer, and di already points 418 ; past it. 419 420 movsb ; copy the first digit 421 mov al, '.' 422 stosb ; plop in a decimal point 423 movsw 424 movsw 425 movsw ; copy six more digits 426 427 %if 0 428 429 ; The printf %g specified trims off trailing zeros here. I dislike 430 ; this, so I've disabled it. Comment out the %if 0 and %endif if you 431 ; want this. 432 433 .fts61: 434 cmp byte [di-1], '0' 435 je .fts62 436 dec di 437 jmp short .fts61 438 .fts62: 439 %endif 440 441 ; Shove in the exponent. If you support 10-byte reals, remember to 442 ; allow 4 digits for the exponent. 443 444 mov ax, "e+" 445 mov dx, word [iExp] 446 test dx, dx 447 jns .fts7 448 neg dx 449 mov ah, '-' 450 .fts7: 451 stosw 452 453 xchg ax, dx 454 mov si, 10 455 mov cx, 4 456 .fts8: 457 xor dx, dx 458 div si 459 push dx 460 loop .fts8 461 mov cl, 4 462 .fts9: 463 pop ax 464 add al, '0' 465 stosb 466 loop .fts9 467 468 %if 0 469 add di, byte 4 ; -> terminator 470 %endif 471 472 ; Clean up and go home. 473 474 .ftsExit: 475 ; fldcw [stat] ; restore control word 476 ; fwait 477 %if 0 478 mov ax, di 479 sub ax, word [pszDbl] 480 mov cx, 21 481 sub cx, ax 482 mov al, 32 483 rep stosb 484 %endif 485 pop di 486 pop es 487 pop si 488 pop ds 489 490 lleave 491 dualreturn 492 lret 493 494 %undef pfpin 495 %undef pszDbl 496 %undef iExp 497 %undef mystat 498 %undef fpin 499 %undef szTemp 500 501 %endif === Trace listing source: ../lst/debug.obj/helpdepk.lst 1 2 %if 0 3 4 lDebug heatshrink/lzexedat depacker for online help 5 6 Copyright (C) 2008-2026 E. C. Masloch 7 8 Usage of the works is permitted provided that this 9 instrument is retained with the works, so that any entity 10 that uses the works is notified of this instrument. 11 12 DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 14 %endif 15 16 %define SOURCEFILENAME "helpdepk.asm" 17 %ifidni __OUTPUT_FORMAT__, obj 18 %include "debug.mac" 1 <1> [list -] 14 <3> [list -] 14 <2> [list -] 86 <1> [list -] 86 ------------------ <1> note: Disable usesection detection === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00002313 ???????? eldhSignature: resb 4 ; "ELD1" 0 00002317 ?????? resb 3 ; reserved 0 0000231A ?? resb 1 ; 26 (Ctrl-Z) 0 0000231B ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000231F ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002321 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002323 ???????? eldhDataOffset: resd 1 0 00002327 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00002329 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000232B ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000232D ???????? eldhReserved: resb 4 ; reserved 0 00002331 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00002333 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00002337 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000233B ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000233F ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002313 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000231B ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000231F ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002321 ???? 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 0 00002313 ???? 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 0 00002315 ???? eldltAmount: resw 1 0 00002317 ???????? 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 0 00002313 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00002315 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00002317 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00002319 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000231B ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002323 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00002313 ???? eldlSignature: resw 1 ; 0E1D1h 0 00002315 ???????? eldlReserved: resw 2 0 00002319 ???? eldlUseLinkHash: resw 1 0 0000231B ???? eldlDataAmount: resw 1 0 0000231D ???? eldlDataPrefixes: resw 1 0 0000231F ???? eldlDataEntries: resw 1 0 00002321 ???? eldlDataAddresses: resw 1 0 00002323 ???? eldlCodeAmount: resw 1 0 00002325 ???? eldlCodePrefixes: resw 1 0 00002327 ???? eldlCodeEntries: resw 1 0 00002329 ???? 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 0 00002313 ???? ifKeyword: resw 1 0 00002315 ???? ifDescription: resw 1 0 00002317 ???? ifOptions: resw 1 0 00002319 ???? ifValue: resw 1 0 0000231B ???? ifTrying: resw 1 0 0000231D ???? 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 0 00002313 ???????? saOffset: resd 1 0 00002317 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00002313 ???? so16aOffset: resw 1 0 00002315 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00002313 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00002313 ?????? bsJump: resb 3 0 00002316 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00002313 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00002315 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00002316 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00002318 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00002319 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000231B ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000231D ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000231E ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00002320 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00002322 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00002324 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00002328 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 0000232C ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00002330 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00002332 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00002334 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00002338 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 0000233A ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00002313 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00002314 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00002315 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00002316 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00002325 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00002313 ???????????????? deName: resb 8 0 0000231B ?????? deExt: resb 3 0 0000231E ?? deAttrib: resb 1 0 0000231F ?? dePlusSize: resb 1 0 00002320 ?????????????? resb 7 0 00002327 ???? deClusterHigh: resw 1 0 00002329 ???? deTime: resw 1 0 0000232B ???? deDate: resw 1 0 0000232D ???? deClusterLow: resw 1 0 0000232F ???????? 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 0 100002303 ???????? lsvFirstCluster: resd 1 0 100002307 ???????? lsvFATSector: resd 1 0 10000230B ???? lsvFATSeg: resw 1 0 10000230D ???? lsvLoadSeg: resw 1 0 10000230F ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 1000022F3 ???? ldMemoryTop: resw 1 0 1000022F5 ???? ldLoadTop: resw 1 0 1000022F7 ???? ldSectorSeg: resw 1 0 1000022F9 ?? ldFATType: resb 1 92 <2> ldFlags: 0 1000022FA ?? ldHasLBA: resb 1 0 1000022FB ???? ldClusterSize: resw 1 0 1000022FD ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 1000022FF ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100002301 ?? .partition: resb 1 ; byte 0 100002302 ?? .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 <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 0 1000022E3 ???????? ldRootSector: resd 1 0 1000022E7 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 1000022E9 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 1000022EB ???? ldParasLeft: resw 1 0 1000022ED ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000022D3 ???????? ldMaxCluster: resd 1 0 1000022D7 ???????? ldFileSize: resd 1 0 1000022DB ???????? ldCurrentCluster: resd 1 0 1000022DF ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00002313 ???????? liiSignature: resb 4 ; "NLDR" 0 00002317 ???? liiVersion: resb 2 ; "00" 0 00002319 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000231B ???? liiAmountParagraphs: resw 1 0 0000231D ???????????? liiReserved: resw 3 0 00002323 ???? 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 0 00002325 ???? 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 0 00002327 ???? 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 0 00002329 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00002313 ???? lpSize: resw 1 0 00002315 ???? lpCount: resw 1 0 00002317 ???????? lpBuffer: resd 1 0 0000231B ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00002313 ?? piBoot: resb 1 0 00002314 ?????? piStartCHS: resb 3 0 00002317 ?? piType: resb 1 0 00002318 ?????? piEndCHS: resb 3 0 0000231B ???????? piStart: resd 1 0 0000231F ???????? 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 0 00002313 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00002315 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00002317 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00002319 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000231B ???? lsOptions: resw 1 ; option flags 0 0000231D ???? lsSegment: resw 1 ; => where to load file 0 0000231F ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00002323 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00002327 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00002329 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 0000232B ???????????????? 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 0 00002313 ???? exact_struc_at 00h, exeSignature: resw 1 0 00002315 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00002317 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00002319 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000231B ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 0000231D ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 0000231F ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00002321 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00002323 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00002325 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00002327 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00002329 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 0000232B ???? 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. 0 0000232D ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00002313 ???? ifhHandle: resw 1 0 00002315 ???? ifhFlags: resw 1 0 00002317 ???????? 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 <1> areastrucEntry: resb 24 0 0000232B ???????? areastrucNext: resd 1 0 0000232F ???????? areastrucPrev: resd 1 0 00002333 ???? areastrucSubAmount: resw 1 0 00002335 ???? areastrucSubOffset: resw 1 0 00002337 ???? areastrucFunAmount: resw 1 0 00002339 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00002313 ???????? areastrucsubLinear: resd 1 0 00002317 ???????? areastrucsubLinearEnd: resd 1 0 0000231B ???? areastrucsubListOffset: resw 1 0 0000231D ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00002313 ???????? areastrucfunLinear: resd 1 0 00002317 ???????? areastrucfunLinearEnd: resd 1 0 0000231B ???? areastrucfunListOffset: resw 1 0 0000231D ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00002313 ???? areastart: resw 1 0 00002315 ???? areaend: resw 1 0 00002317 ???? areamessage: resw 1 0 00002319 ???? 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 0 00002313 ???? 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.) 0 00002315 ???? ivFlags: resw 1 0 00002317 ???? 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. 0 00002319 ???? 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 0 0000231B ?? 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. 0 0000231C ?? 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 0 00002313 ???????? mrLinear: resd 1 0 00002317 ???????? mrOffset: resd 1 0 0000231B ???? mrSegmentSelector: resw 1 0 0000231D ???? mrFlags: resw 1 0 0000231F ???????? 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 0 00002313 ???????? .size_: resd 1 0 00002317 ???? .srchdl: resw 1 0 00002319 ???????? .srcadr: resd 1 0 0000231D ???? .dsthdl: resw 1 0 0000231F ???????? .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 19 overridedef STANDALONE, 0 20 %else 21 %include "lmacros3.mac" 22 %assign _LINK 0 23 %endif 24 25 %if _LINK 26 [list -] === Trace listing source: ../lst/debug.obj/hh.lst 1 2 %if 0 3 4 lDebug H commands (hexadecimal calculation) 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 "hh.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00002314 ???????? eldhSignature: resb 4 ; "ELD1" 0 00002318 ?????? resb 3 ; reserved 0 0000231B ?? resb 1 ; 26 (Ctrl-Z) 0 0000231C ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00002320 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002322 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002324 ???????? eldhDataOffset: resd 1 0 00002328 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000232A ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000232C ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000232E ???????? eldhReserved: resb 4 ; reserved 0 00002332 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00002334 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00002338 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000233C ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00002340 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002314 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000231C ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00002320 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002322 ???? 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 0 00002314 ???? 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 0 00002316 ???? eldltAmount: resw 1 0 00002318 ???????? 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 0 00002314 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00002316 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00002318 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000231A ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000231C ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002324 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00002314 ???? eldlSignature: resw 1 ; 0E1D1h 0 00002316 ???????? eldlReserved: resw 2 0 0000231A ???? eldlUseLinkHash: resw 1 0 0000231C ???? eldlDataAmount: resw 1 0 0000231E ???? eldlDataPrefixes: resw 1 0 00002320 ???? eldlDataEntries: resw 1 0 00002322 ???? eldlDataAddresses: resw 1 0 00002324 ???? eldlCodeAmount: resw 1 0 00002326 ???? eldlCodePrefixes: resw 1 0 00002328 ???? eldlCodeEntries: resw 1 0 0000232A ???? 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 0 00002314 ???? ifKeyword: resw 1 0 00002316 ???? ifDescription: resw 1 0 00002318 ???? ifOptions: resw 1 0 0000231A ???? ifValue: resw 1 0 0000231C ???? ifTrying: resw 1 0 0000231E ???? 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 0 00002314 ???????? saOffset: resd 1 0 00002318 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00002314 ???? so16aOffset: resw 1 0 00002316 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00002314 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00002314 ?????? bsJump: resb 3 0 00002317 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00002314 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00002316 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00002317 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00002319 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 0000231A ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000231C ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000231E ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000231F ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00002321 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00002323 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00002325 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00002329 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 0000232D ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00002331 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00002333 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00002335 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00002339 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 0000233B ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00002314 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00002315 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00002316 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00002317 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00002326 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00002314 ???????????????? deName: resb 8 0 0000231C ?????? deExt: resb 3 0 0000231F ?? deAttrib: resb 1 0 00002320 ?? dePlusSize: resb 1 0 00002321 ?????????????? resb 7 0 00002328 ???? deClusterHigh: resw 1 0 0000232A ???? deTime: resw 1 0 0000232C ???? deDate: resw 1 0 0000232E ???? deClusterLow: resw 1 0 00002330 ???????? 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 0 100002304 ???????? lsvFirstCluster: resd 1 0 100002308 ???????? lsvFATSector: resd 1 0 10000230C ???? lsvFATSeg: resw 1 0 10000230E ???? lsvLoadSeg: resw 1 0 100002310 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 1000022F4 ???? ldMemoryTop: resw 1 0 1000022F6 ???? ldLoadTop: resw 1 0 1000022F8 ???? ldSectorSeg: resw 1 0 1000022FA ?? ldFATType: resb 1 92 <2> ldFlags: 0 1000022FB ?? ldHasLBA: resb 1 0 1000022FC ???? ldClusterSize: resw 1 0 1000022FE ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100002300 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100002302 ?? .partition: resb 1 ; byte 0 100002303 ?? .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 <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 0 1000022E4 ???????? ldRootSector: resd 1 0 1000022E8 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 1000022EA ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 1000022EC ???? ldParasLeft: resw 1 0 1000022EE ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000022D4 ???????? ldMaxCluster: resd 1 0 1000022D8 ???????? ldFileSize: resd 1 0 1000022DC ???????? ldCurrentCluster: resd 1 0 1000022E0 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00002314 ???????? liiSignature: resb 4 ; "NLDR" 0 00002318 ???? liiVersion: resb 2 ; "00" 0 0000231A ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000231C ???? liiAmountParagraphs: resw 1 0 0000231E ???????????? liiReserved: resw 3 0 00002324 ???? 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 0 00002326 ???? 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 0 00002328 ???? 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 0 0000232A ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00002314 ???? lpSize: resw 1 0 00002316 ???? lpCount: resw 1 0 00002318 ???????? lpBuffer: resd 1 0 0000231C ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00002314 ?? piBoot: resb 1 0 00002315 ?????? piStartCHS: resb 3 0 00002318 ?? piType: resb 1 0 00002319 ?????? piEndCHS: resb 3 0 0000231C ???????? piStart: resd 1 0 00002320 ???????? 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 0 00002314 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00002316 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00002318 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 0000231A ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000231C ???? lsOptions: resw 1 ; option flags 0 0000231E ???? lsSegment: resw 1 ; => where to load file 0 00002320 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00002324 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00002328 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 0000232A ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 0000232C ???????????????? 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 0 00002314 ???? exact_struc_at 00h, exeSignature: resw 1 0 00002316 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00002318 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 0000231A ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000231C ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 0000231E ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00002320 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00002322 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00002324 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00002326 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00002328 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 0000232A ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 0000232C ???? 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. 0 0000232E ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00002314 ???? ifhHandle: resw 1 0 00002316 ???? ifhFlags: resw 1 0 00002318 ???????? 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 <1> areastrucEntry: resb 24 0 0000232C ???????? areastrucNext: resd 1 0 00002330 ???????? areastrucPrev: resd 1 0 00002334 ???? areastrucSubAmount: resw 1 0 00002336 ???? areastrucSubOffset: resw 1 0 00002338 ???? areastrucFunAmount: resw 1 0 0000233A ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00002314 ???????? areastrucsubLinear: resd 1 0 00002318 ???????? areastrucsubLinearEnd: resd 1 0 0000231C ???? areastrucsubListOffset: resw 1 0 0000231E ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00002314 ???????? areastrucfunLinear: resd 1 0 00002318 ???????? areastrucfunLinearEnd: resd 1 0 0000231C ???? areastrucfunListOffset: resw 1 0 0000231E ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00002314 ???? areastart: resw 1 0 00002316 ???? areaend: resw 1 0 00002318 ???? areamessage: resw 1 0 0000231A ???? 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 0 00002314 ???? 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.) 0 00002316 ???? ivFlags: resw 1 0 00002318 ???? 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. 0 0000231A ???? 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 0 0000231C ?? 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. 0 0000231D ?? 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 0 00002314 ???????? mrLinear: resd 1 0 00002318 ???????? mrOffset: resd 1 0 0000231C ???? mrSegmentSelector: resw 1 0 0000231E ???? mrFlags: resw 1 0 00002320 ???????? 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 0 00002314 ???????? .size_: resd 1 0 00002318 ???? .srchdl: resw 1 0 0000231A ???????? .srcadr: resd 1 0 0000231E ???? .dsthdl: resw 1 0 00002320 ???????? .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 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 23 ------------------ note: usesection lDEBUG_CODE 24 25 %if _EXPRESSIONS 26 27 ; H command - hex computation 28 hh: 0 0000507B E8[0000] call skipcomm0 0 0000507E 4E dec si 0 0000507F BA[0000] mov dx, msg.base 0 00005082 E8[0000] call isstring? 0 00005085 7403E9CF00 jne .normal 0 0000508A E8[0000] call skipequals 0 0000508D E8[0000] nearcall getexpression 0 00005090 85DB test bx, bx 37 @@: 0 00005092 7403E9BF00 jnz .error 0 00005097 83FA24 cmp dx, 36 0 0000509A 77F6 ja @B 0 0000509C 83FA02 cmp dx, 2 0 0000509F 72F1 jb @B 0 000050A1 52 push dx 44 0 000050A2 E8[0000] call skipcomm0 0 000050A5 4E dec si 0 000050A6 BA[0000] mov dx, msg.group 0 000050A9 E8[0000] call isstring? 0 000050AC BA0000 mov dx, 0 0 000050AF 7513 jne .gotgroup 0 000050B1 E8[0000] call skipequals 0 000050B4 E8[0000] nearcall getexpression 0 000050B7 E8[0000] call skipcomm0 0 000050BA 85DB test bx, bx 0 000050BC 75D4 jnz @B 0 000050BE 83FA20 cmp dx, 32 0 000050C1 77CF ja @B 0 000050C3 4E dec si 59 .gotgroup: 0 000050C4 52 push dx 0 000050C5 BA[0000] mov dx, msg.width 0 000050C8 E8[0000] call isstring? 0 000050CB BB0000 mov bx, 0 0 000050CE 7515 jne .gotwidth 0 000050D0 E8[0000] call skipequals 0 000050D3 E8[0000] nearcall getexpression 0 000050D6 E8[0000] call skipcomm0 0 000050D9 85DB test bx, bx 0 000050DB 75B5 jnz @B 0 000050DD 83FA20 cmp dx, 32 0 000050E0 77B0 ja @B 0 000050E2 89D3 mov bx, dx 0 000050E4 A8 db __TEST_IMM8 ; (skip lodsb) 74 .gotwidth: 0 000050E5 AC lodsb 0 000050E6 53 push bx 0 000050E7 E85701 call .compute 0 000050EA 58 pop ax 0 000050EB 5E pop si 0 000050EC 59 pop cx 0 000050ED BF[4200] mov di, line_out + 66 82 0 000050F0 E88E01 call .storeresult 84 0 000050F3 93 xchg bx, ax ; ax:dx = number, bx = width 0 000050F4 92 xchg ax, dx ; dx:ax = number 87 lframe 0 000050F5 5589E5 lenter 89 lvar dword, dividend 0 000050F8 52 push dx 0 000050F9 50 push ax 0 000050FA 4B dec bx 93 lvar word, minwidth 0 000050FB 53 push bx 95 lvar word, group 0 000050FC 56 push si 97 lvar word, groupcounter 0 000050FD 56 push si 99 0 000050FE 89FB mov bx, di 0 00005100 FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 102 103 ; dword [bp + ?dividend] = number to display 104 ; cx = base 105 .loop_write: 106 0 00005101 31D2 xor dx, dx 0 00005103 57 push di 0 00005104 BF0400 mov di, 4 110 .loop_divide: 0 00005107 8B43FA mov ax, [bp + ?dividend - 2 + di] 0 0000510A F7F1 div cx 0 0000510C 8943FA mov word [bp + ?dividend - 2 + di], ax 0 0000510F 4F dec di 0 00005110 4F dec di 0 00005111 75F4 jnz .loop_divide 117 ; dx = last remainder 0 00005113 5F pop di 0 00005114 92 xchg ax, dx ; ax = remainder (next digit) 120 ; dword [bp + ?dividend] = result of div 0 00005115 0430 add al, '0' 0 00005117 3C39 cmp al, '9' 0 00005119 7602 jbe @F 0 0000511B 0407 add al, -('9'+1)+'A' 125 @@: 0 0000511D AA stosb 127 0 0000511E FF4EF6 dec word [bp + ?groupcounter] 0 00005121 7509 jnz @F 0 00005123 FF76F8 push word [bp + ?group] 0 00005126 8F46F6 pop word [bp + ?groupcounter] 0 00005129 B05F mov al, '_' 0 0000512B AA stosb 134 @@: 135 0 0000512C FF4EFA dec word [bp + ?minwidth] 0 0000512F 79D0 jns .loop_write 138 0 00005131 837EFE00 cmp word [bp + ?dividend + 2], 0 0 00005135 75CA jnz .loop_write 0 00005137 837EFC00 cmp word [bp + ?dividend], 0 142 ; any more ? 0 0000513B 75C4 jnz .loop_write ; loop --> 144 0 0000513D FC cld 146 0 0000513E 29FB sub bx, di 0 00005140 89D9 mov cx, bx 0 00005142 89FE mov si, di 0 00005144 46 inc si 151 0 00005145 BF[0000] mov di, line_out 153 0 00005148 803C5F cmp byte [si], '_' 0 0000514B 7502 jne @F 0 0000514D 46 inc si 0 0000514E 49 dec cx 158 ; never need to loop because next digit is always a digit 159 160 @@: 0 0000514F F3A4 rep movsb ; overlapping! 162 0 00005151 89EC5D lleave 0 00005154 EB76 jmp short .putsline_crlf 165 166 167 .error: 0 00005156 E9[0000] jmp error 169 170 171 .normal: 0 00005159 BA[0000] mov dx, msg.as 0 0000515C E8[0000] call isstring? 0 0000515F 7532 jne .not_as 175 176 .as: 0 00005161 E8[0000] call skipcomma 0 00005164 4E dec si 0 00005165 E8[0000] nearcall get_length_keyword 0 00005168 AC lodsb 0 00005169 75EB jne short .error 0 0000516B E8D300 call .compute 0 0000516E E308 jcxz @FF 184 @@: 0 00005170 D1E2 shl dx, 1 0 00005172 D1D3 rcl bx, 1 0 00005174 72E0 jc short .error 0 00005176 E2F8 loop @B 189 @@: 0 00005178 E80601 call .storeresult 191 0 0000517B B400 mov ah, 0 0 0000517D 53 push bx 0 0000517E 52 push dx 0 0000517F E8C600 call .store 196 0 00005182 B82020 mov ax, (32 << 8) | 32 0 00005185 AB stosw 0 00005186 58 pop ax 0 00005187 5A pop dx 0 00005188 B90100 mov cx, 1 ; cx = 1, multiplier 0 0000518B BB0900 mov bx, 5+4 ; bx = 5+4, width 0 0000518E E8[0000] call disp_dxax_times_cx_width_bx_size.store 0 00005191 EB39 jmp short .putsline_crlf 205 206 207 .not_as: 0 00005193 AC lodsb 0 00005194 56 push si 0 00005195 50 push ax 0 00005196 800E[0000]01 or byte [hhflag], 1 ; set flag so no operator means add 212 %if _HHDIVREMAIN 0 0000519B C606[0000]00 mov byte [hh_div_active], 0 214 %endif 0 000051A0 E89E00 call .compute 0 000051A3 58 pop ax 0 000051A4 5E pop si 0 000051A5 E8D900 call .storeresult 0 000051A8 F606[0000]04 test byte [hhflag], 4 ; any two-fold operation ? 0 000051AD 7420 jz .single_and_div ; no --> 0 000051AF 8A26[0100] mov ah, byte [options2 + 1] 0 000051B3 80E410 and ah, opt2_hh_compat >> 8 0 000051B6 E8A400 call .store2 ; display "FFFFFFFF (-0001)" 0 000051B9 50 push ax 0 000051BA B82020 mov ax, 32<<8|32 0 000051BD AB stosw 0 000051BE 58 pop ax 0 000051BF 50 push ax 0 000051C0 800E[0000]02 or byte [hhflag], 2 ; set flag so no operator means sub 0 000051C5 E87900 call .compute 0 000051C8 58 pop ax 0 000051C9 E89100 call .store2 ; display "FFFFFFFF (-0001)" 233 .putsline_crlf: 0 000051CC E9[0000] jmp putsline_crlf 235 236 .single_and_div: 237 %if _HHDIVREMAIN 0 000051CF D006[0000] rol byte [hh_div_active], 1 0 000051D3 732D jnc .single 240 0 000051D5 E82A00 call .single 242 0 000051D8 BF[0000] mov di, line_out 0 000051DB BE[0000] mov si, msg.hh_div_remainder 0 000051DE E8[0000] call copy_single_counted_string 246 0 000051E1 8B16[0000] mov dx, word [hh_div_divisor] 0 000051E5 8B1E[0200] mov bx, word [hh_div_divisor + 2] 0 000051E9 FF36[0200] push word [hh_div_dividend + 2] 0 000051ED FF36[0000] push word [hh_div_dividend] 0 000051F1 8F06[0000] pop word [hhvar] 0 000051F5 8F06[0200] pop word [hhvar + 2] 0 000051F9 31C0 xor ax, ax 0 000051FB 8826[0000] mov byte [hhtype], ah 0 000051FF E8[0000] nearcall of_modulo 256 %endif 257 258 .single: 0 00005202 B400 mov ah, 0 0 00005204 53 push bx 0 00005205 52 push dx 0 00005206 E85400 call .store2 263 0 00005209 B82020 mov ax, (32 << 8) | 32 0 0000520C AB stosw 0 0000520D B86465 mov ax, "de" 0 00005210 AB stosw 0 00005211 B86369 mov ax, "ci" 0 00005214 AB stosw 0 00005215 B86D61 mov ax, "ma" 0 00005218 AB stosw 0 00005219 B86C3A mov ax, "l:" 0 0000521C AB stosw 0 0000521D B020 mov al, 32 0 0000521F AA stosb 0 00005220 58 pop ax 0 00005221 5A pop dx 0 00005222 E8[0000] call decdword 0 00005225 85D2 test dx, dx ; result negative ? 0 00005227 7916 jns @F ; no --> 0 00005229 50 push ax 0 0000522A B82028 mov ax, " (" 0 0000522D AB stosw 0 0000522E B02D mov al, "-" 0 00005230 AA stosb 0 00005231 58 pop ax 0 00005232 F7DA neg dx 0 00005234 F7D8 neg ax 0 00005236 83DA00 sbb dx, byte 0 ; neg bx:dx 0 00005239 E8[0000] call decdword 0 0000523C B029 mov al, ")" 0 0000523E AA stosb 293 @@: 0 0000523F EB8B jmp .putsline_crlf 295 296 297 .compute: 0 00005241 E8[0000] nearcall getdword 0 00005244 E8[0000] call chkeol ; expect end of line here 300 .comp_ret: 0 00005247 C3 retn 302 303 ; INP: bx:dx = result 304 ; ah = flag, nonzero if to stay 86-DOS Debug compatible 305 ; OUT: displayed 306 ; CHG: di, bx, dx 307 .store: 0 00005248 50 push ax 0 00005249 84E4 test ah, ah 0 0000524B 7509 jnz .store_nothigh 0 0000524D 85DB test bx, bx 0 0000524F 7405 jz .store_nothigh ; no need to display 32-bit value 0 00005251 89D8 mov ax, bx 0 00005253 E8[0000] call hexword 315 .store_nothigh: 0 00005256 89D0 mov ax, dx 0 00005258 E8[0000] call hexword 0 0000525B 58 pop ax 0 0000525C C3 retn 320 321 .store2: 0 0000525D E8E8FF call .store 0 00005260 50 push ax 0 00005261 84E4 test ah, ah 0 00005263 751A jnz .store2_ret 0 00005265 85DB test bx, bx ; result negative ? 0 00005267 7916 jns .store2_ret ; no --> 0 00005269 B82028 mov ax, " (" 0 0000526C AB stosw 0 0000526D B02D mov al, "-" 0 0000526F AA stosb 0 00005270 F7DB neg bx 0 00005272 F7DA neg dx 0 00005274 83DB00 sbb bx, byte 0 ; neg bx:dx 0 00005277 58 pop ax 0 00005278 50 push ax 0 00005279 E8CCFF call .store 0 0000527C B029 mov al, ")" 0 0000527E AA stosb 340 .store2_ret: 0 0000527F 58 pop ax 0 00005280 C3 retn 343 344 345 .storeresult: 0 00005281 8916[0000] mov word [hhresult], dx 0 00005285 891E[0200] mov word [hhresult + 2], bx 0 00005289 C3 retn 349 %else 350 ; H command - hex addition and subtraction. 351 hh: 352 nearcall getdword 353 push bx 354 push dx 355 call skipcomm0 356 nearcall getdword 357 call chkeol ; expect end of line here 358 pop cx 359 pop ax ; first value in AX:CX, second in BX:DX 360 mov si, ax 361 mov bp, cx ; first value in SI:BP now 362 mov ax, cx 363 add ax, dx 364 push ax 365 mov ax, si 366 adc ax, bx 367 jz .nothigh1 ; no need to display 32-bit value 368 call hexword 369 .nothigh1: 370 pop ax 371 call hexword 372 mov ax, 2020h 373 stosw 374 mov ax, bp 375 sub ax, dx 376 push ax 377 mov ax, si 378 sbb ax, bx 379 jz .nothigh2 ; no need to display 32-bit value 380 or si, bx 381 jz .nothigh2 ; both were zero, non-zero result only by carry --> 382 call hexword 383 .nothigh2: 384 pop ax 385 call hexword 386 call putsline_crlf 387 retn 388 %endif 389 390 391 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 391 ------------------ note: usesection lDEBUG_DATA_ENTRY 392 393 align 4, db 0 0 00002314 00000000 hhresult: dd 0 === Trace listing source: ../lst/debug.obj/iioo.lst 1 2 %if 0 3 4 lDebug I and O commands (port input/output) 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 "iioo.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00002318 ???????? eldhSignature: resb 4 ; "ELD1" 0 0000231C ?????? resb 3 ; reserved 0 0000231F ?? resb 1 ; 26 (Ctrl-Z) 0 00002320 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00002324 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002326 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002328 ???????? eldhDataOffset: resd 1 0 0000232C ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000232E ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00002330 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00002332 ???????? eldhReserved: resb 4 ; reserved 0 00002336 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00002338 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 0000233C ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00002340 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00002344 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002318 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00002320 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00002324 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002326 ???? 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 0 00002318 ???? 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 0 0000231A ???? eldltAmount: resw 1 0 0000231C ???????? 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 0 00002318 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 0000231A ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 0000231C ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000231E ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00002320 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002328 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00002318 ???? eldlSignature: resw 1 ; 0E1D1h 0 0000231A ???????? eldlReserved: resw 2 0 0000231E ???? eldlUseLinkHash: resw 1 0 00002320 ???? eldlDataAmount: resw 1 0 00002322 ???? eldlDataPrefixes: resw 1 0 00002324 ???? eldlDataEntries: resw 1 0 00002326 ???? eldlDataAddresses: resw 1 0 00002328 ???? eldlCodeAmount: resw 1 0 0000232A ???? eldlCodePrefixes: resw 1 0 0000232C ???? eldlCodeEntries: resw 1 0 0000232E ???? 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 0 00002318 ???? ifKeyword: resw 1 0 0000231A ???? ifDescription: resw 1 0 0000231C ???? ifOptions: resw 1 0 0000231E ???? ifValue: resw 1 0 00002320 ???? ifTrying: resw 1 0 00002322 ???? 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 0 00002318 ???????? saOffset: resd 1 0 0000231C ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00002318 ???? so16aOffset: resw 1 0 0000231A ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00002318 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00002318 ?????? bsJump: resb 3 0 0000231B ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00002318 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 0000231A ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 0000231B ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 0000231D ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 0000231E ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 00002320 ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 00002322 ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 00002323 ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00002325 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00002327 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00002329 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 0000232D ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 00002331 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00002335 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00002337 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00002339 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 0000233D ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 0000233F ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00002318 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00002319 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 0000231A ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 0000231B ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 0000232A ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00002318 ???????????????? deName: resb 8 0 00002320 ?????? deExt: resb 3 0 00002323 ?? deAttrib: resb 1 0 00002324 ?? dePlusSize: resb 1 0 00002325 ?????????????? resb 7 0 0000232C ???? deClusterHigh: resw 1 0 0000232E ???? deTime: resw 1 0 00002330 ???? deDate: resw 1 0 00002332 ???? deClusterLow: resw 1 0 00002334 ???????? 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 0 100002308 ???????? lsvFirstCluster: resd 1 0 10000230C ???????? lsvFATSector: resd 1 0 100002310 ???? lsvFATSeg: resw 1 0 100002312 ???? lsvLoadSeg: resw 1 0 100002314 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 1000022F8 ???? ldMemoryTop: resw 1 0 1000022FA ???? ldLoadTop: resw 1 0 1000022FC ???? ldSectorSeg: resw 1 0 1000022FE ?? ldFATType: resb 1 92 <2> ldFlags: 0 1000022FF ?? ldHasLBA: resb 1 0 100002300 ???? ldClusterSize: resw 1 0 100002302 ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100002304 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100002306 ?? .partition: resb 1 ; byte 0 100002307 ?? .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 <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 0 1000022E8 ???????? ldRootSector: resd 1 0 1000022EC ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 1000022EE ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 1000022F0 ???? ldParasLeft: resw 1 0 1000022F2 ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000022D8 ???????? ldMaxCluster: resd 1 0 1000022DC ???????? ldFileSize: resd 1 0 1000022E0 ???????? ldCurrentCluster: resd 1 0 1000022E4 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00002318 ???????? liiSignature: resb 4 ; "NLDR" 0 0000231C ???? liiVersion: resb 2 ; "00" 0 0000231E ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 00002320 ???? liiAmountParagraphs: resw 1 0 00002322 ???????????? liiReserved: resw 3 0 00002328 ???? 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 0 0000232A ???? 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 0 0000232C ???? 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 0 0000232E ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00002318 ???? lpSize: resw 1 0 0000231A ???? lpCount: resw 1 0 0000231C ???????? lpBuffer: resd 1 0 00002320 ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00002318 ?? piBoot: resb 1 0 00002319 ?????? piStartCHS: resb 3 0 0000231C ?? piType: resb 1 0 0000231D ?????? piEndCHS: resb 3 0 00002320 ???????? piStart: resd 1 0 00002324 ???????? 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 0 00002318 ???? lsKernelName: resw 1 ; -> kernel file default name 0 0000231A ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 0000231C ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 0000231E ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 00002320 ???? lsOptions: resw 1 ; option flags 0 00002322 ???? lsSegment: resw 1 ; => where to load file 0 00002324 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00002328 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 0000232C ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 0000232E ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 00002330 ???????????????? 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 0 00002318 ???? exact_struc_at 00h, exeSignature: resw 1 0 0000231A ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 0000231C ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 0000231E ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 00002320 ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 00002322 ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00002324 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00002326 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00002328 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 0000232A ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 0000232C ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 0000232E ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 00002330 ???? 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. 0 00002332 ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00002318 ???? ifhHandle: resw 1 0 0000231A ???? ifhFlags: resw 1 0 0000231C ???????? 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 <1> areastrucEntry: resb 24 0 00002330 ???????? areastrucNext: resd 1 0 00002334 ???????? areastrucPrev: resd 1 0 00002338 ???? areastrucSubAmount: resw 1 0 0000233A ???? areastrucSubOffset: resw 1 0 0000233C ???? areastrucFunAmount: resw 1 0 0000233E ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00002318 ???????? areastrucsubLinear: resd 1 0 0000231C ???????? areastrucsubLinearEnd: resd 1 0 00002320 ???? areastrucsubListOffset: resw 1 0 00002322 ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00002318 ???????? areastrucfunLinear: resd 1 0 0000231C ???????? areastrucfunLinearEnd: resd 1 0 00002320 ???? areastrucfunListOffset: resw 1 0 00002322 ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00002318 ???? areastart: resw 1 0 0000231A ???? areaend: resw 1 0 0000231C ???? areamessage: resw 1 0 0000231E ???? 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 0 00002318 ???? 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.) 0 0000231A ???? ivFlags: resw 1 0 0000231C ???? 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. 0 0000231E ???? 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 0 00002320 ?? 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. 0 00002321 ?? 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 0 00002318 ???????? mrLinear: resd 1 0 0000231C ???????? mrOffset: resd 1 0 00002320 ???? mrSegmentSelector: resw 1 0 00002322 ???? mrFlags: resw 1 0 00002324 ???????? 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 0 00002318 ???????? .size_: resd 1 0 0000231C ???? .srchdl: resw 1 0 0000231E ???????? .srcadr: resd 1 0 00002322 ???? .dsthdl: resw 1 0 00002324 ???????? .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 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 23 ------------------ note: usesection lDEBUG_CODE 24 %if _LINK_COMPAT 25 align 2, db 0 26 %endif 27 28 ; O command - output to I/O port. 29 oo: 0 0000528A B44F mov ah, 'O' 0 0000528C BB[0800] mov bx, .tab 0 0000528F E9FD01 jmp ii.common 33 34 35 align 2, db 0 36 .tab: 0 00005292 [0E00][1800][2200] dw .byte, .word, .dword 38 39 40 .byte: 0 00005298 E8[0000] nearcall getbyte ; read value from command line 0 0000529B E8[0000] call chkeol ; expect end of line here 0 0000529E 92 xchg ax, dx ; al = value 0 0000529F 5A pop dx ; recover port number 0 000052A0 EE out dx, al ; send 0 000052A1 C3 retn 47 48 .word: 0 000052A2 E8[0000] nearcall getword 0 000052A5 E8[0000] call chkeol 0 000052A8 92 xchg ax, dx ; ax = value 0 000052A9 5A pop dx 0 000052AA EF out dx, ax 0 000052AB C3 retn 55 56 .dword: 57 [cpu 386] 0 000052AC E8[0000] nearcall getdword 0 000052AF E8[0000] call chkeol ; expect end of line here 0 000052B2 53 push bx 0 000052B3 52 push dx 0 000052B4 6658 pop eax ; eax = value 0 000052B6 5A pop dx 0 000052B7 66EF out dx, eax 0 000052B9 C3 retn 66 __CPU__ 67 68 69 %include "if.asm" ; (jumps to .not_if for port Input commands) 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug IF commands (conditional control flow) 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> 17 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 18 <1> if_exists_check: 0 000052BA 16 push ss 0 000052BB 07 pop es 0 000052BC 8B3E[0000] mov di, word [if_exists_si] 0 000052C0 8B0E[0000] mov cx, word [if_exists_length] 0 000052C4 8B36[0000] mov si, word [if_exists_sp] 0 000052C8 F3A4 rep movsb 0 000052CA 8B0E[0000] mov cx, word [if_exists_length] 0 000052CE 41 inc cx 0 000052CF 80E1FE and cl, ~1 28 <1> 0 000052D2 8B36[0000] mov si, word [if_exists_then_address] 0 000052D6 85F6 test si, si 0 000052D8 740A jz .error 0 000052DA 4E dec si 0 000052DB BA[0000] mov dx, msg.then 0 000052DE E8[0000] call isstring? 0 000052E1 7501 jne .error 0 000052E3 C3 retn 37 <1> 38 <1> .error: 0 000052E4 B84901 mov ax, 0149h 0 000052E7 E8[0000] call setrc 0 000052EA E9[0000] jmp error 42 <1> 43 <1> if_exists_not_found: 0 000052ED E8CAFF call if_exists_check 45 <1> %if _EXTENSIONS 0 000052F0 E8[0000] call close_ext 47 <1> %endif 0 000052F3 F606[0000]40 testopt [internalflags3], dif3_if_not 0 000052F8 7519 jnz if_exists_condition_met 50 <1> if_exists_condition_not_met: 0 000052FA E9[0000] jmp cmd3 52 <1> 53 <1> %if _EXTENSIONS 54 <1> if_exists_found_ext_open: 0 000052FD 16 push ss 0 000052FE 07 pop es 0 000052FF E8[0000] call close_ext 0 00005302 EB05 jmp @F 59 <1> %endif 60 <1> 61 <1> if_exists_found_open: 0 00005304 16 push ss 0 00005305 07 pop es 0 00005306 E8[0000] call getline_close_file 65 <1> 66 <1> @@: 67 <1> if_exists_found_closed: 0 00005309 E8AEFF call if_exists_check 0 0000530C F606[0000]40 testopt [internalflags3], dif3_if_not 0 00005311 75E7 jnz if_exists_condition_not_met 71 <1> if_exists_condition_met: 0 00005313 8B26[0000] mov sp, word [if_exists_sp] 0 00005317 01CC add sp, cx 74 <1> .numeric: 0 00005319 E8[0000] call skipcomma 0 0000531C 5A pop dx ; discard near return address 0 0000531D 8026[0300]E7 clropt [internalflags3], dif3_in_if | dif3_auxbuff_guarded_1 0 00005322 4E dec si 0 00005323 56 push si 0 00005324 31C9 xor cx, cx 81 <1> @@: 0 00005326 41 inc cx 0 00005327 AC lodsb 0 00005328 E8[0000] call iseol?.notsemicolon 0 0000532B 75F9 jne @B ; cx = length including CR 0 0000532D 5E pop si 0 0000532E BF[0100] mov di, line_in + 1 0 00005331 88C8 mov al, cl 0 00005333 48 dec ax ; al = length excluding CR 0 00005334 AA stosb ; store 91 <1> %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 00005335 B306 mov bl, 6 0 00005337 91 xchg ax, cx 94 <1> ; INP: bl = 6 95 <1> ; byte [line_in + 1] = length 96 <1> ; es:di -> line_in + 2 97 <1> ; ds:si -> higher in line_in 98 <1> ; ax = length of data to move down (includes CR) 99 <1> ; CHG: cx, bh, dx 100 <1> ; STT: ds = es = ss 101 <1> ; UP, EI 0 00005338 E8[0000] call transfer_to_ext_puts_getline 0 0000533B 91 xchg ax, cx 104 <1> %endif 0 0000533C F3A4 rep movsb ; move down 0 0000533E BE[0200] mov si, line_in + 2 0 00005341 AC lodsb ; al = first text byte 0 00005342 E9[0000] jmp cmd3_injected 109 <1> %endif 110 <1> 111 <1> 112 <1> ; IF command -- conditional 113 <1> ii: 0 00005345 89F2 mov dx, si 0 00005347 50 push ax 0 00005348 8B44FE mov ax, [si - 2] 0 0000534B 25DFDF and ax, TOUPPER_W 0 0000534E 3D4946 cmp ax, "IF" 0 00005351 58 pop ax 0 00005352 7403E92201 jne .not_if 121 <1> 0 00005357 E8[0000] call skipcomma 0 0000535A E8[0000] nearcall isoperator? 0 0000535D 7513 jne .if 0 0000535F 89CB mov bx, cx 0 00005361 01DB add bx, bx ; bh = 0 ! 0 00005363 50 push ax 0 00005364 E8[0000] nearcall ..@call_operator_dispatchers 0 00005367 58 pop ax 0 00005368 85DB test bx, bx 0 0000536A 7403E90A01 jnz .not_if 0 0000536F E8[0000] call skipcomma 133 <1> .if: 0 00005372 8026[0000]BF clropt [internalflags3], dif3_if_not 0 00005377 4E dec si 0 00005378 BA[0000] mov dx, msg.not 0 0000537B E8[0000] call isstring? 0 0000537E AC lodsb 0 0000537F 7508 jne @F 0 00005381 E8[0000] call skipcomm0 0 00005384 800E[0000]40 setopt [internalflags3], dif3_if_not 142 <1> 143 <1> @@: 144 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00005389 4E dec si 0 0000538A BA[0000] mov dx, msg.exists 0 0000538D E8[0000] call isstring? 0 00005390 AC lodsb 0 00005391 7571 jne .if_numeric 0 00005393 E8[0000] call skipcomm0 0 00005396 4E dec si 0 00005397 BA[0000] mov dx, msg.r 0 0000539A E8[0000] call isstring? 0 0000539D 7503E98D00 je .is_variable 0 000053A2 C606[0000]00 mov byte [yy_is_script], 0 156 <1> %if _EXTENSIONS 0 000053A7 BA[0000] mov dx, msg.ext 0 000053AA E8[0000] call isstring? 0 000053AD 740F je .is_ext 160 <1> %endif 0 000053AF F616[0000] not byte [yy_is_script] 0 000053B3 BA[0000] mov dx, msg.y 0 000053B6 E8[0000] call isstring? 0 000053B9 7403E9[0000] jne error 165 <1> .is_ext: 0 000053BE E8[0000] call skipcomma 167 <1> 0 000053C1 4E dec si 0 000053C2 8936[0000] mov word [if_exists_si], si 0 000053C6 89F3 mov bx, si 171 <1> @@: 0 000053C8 AC lodsb 0 000053C9 E8[0000] call iseol?.notsemicolon 0 000053CC 75FA jne @B 0 000053CE 89F1 mov cx, si ; -> after EOL byte 0 000053D0 29D9 sub cx, bx ; = length including EOL 0 000053D2 890E[0000] mov word [if_exists_length], cx 0 000053D6 41 inc cx ; round up 0 000053D7 80E1FE and cl, ~1 ; make even 0 000053DA 29CC sub sp, cx 0 000053DC 8926[0000] mov word [if_exists_sp], sp 0 000053E0 89E7 mov di, sp 0 000053E2 89DE mov si, bx 0 000053E4 D1E9 shr cx, 1 0 000053E6 F3A5 rep movsw 186 <1> 0 000053E8 89DE mov si, bx 0 000053EA AC lodsb 0 000053EB 8326[0000]00 and word [if_exists_then_address], 0 0 000053F0 800E[0300]08 setopt [internalflags3], dif3_in_if 0 000053F5 D006[0000] rol byte [yy_is_script], 1 0 000053F9 7303 jnc @F 0 000053FB E8[0000] call guard_re 194 <1> @@: 0 000053FE E8[0000] call yy_or_ext_no_guard_re 0 00005401 E9[0000] jmp error 197 <1> %endif 198 <1> 199 <1> .if_numeric: 0 00005404 E8[0000] nearcall getexpression 0 00005407 E8[0000] nearcall toboolean 0 0000540A E8[0000] call skipcomm0 0 0000540D 89D3 mov bx, dx 204 <1> .if_bx: 0 0000540F BA[0000] mov dx, msg.then 0 00005412 4E dec si 0 00005413 E8[0000] call isstring? 0 00005416 7403E9[0000] jne error 209 <1> .if_bx_after_then: 0 0000541B F606[0000]40 testopt [internalflags3], dif3_if_not 0 00005420 7403 jz @F 0 00005422 80F301 xor bl, 1 213 <1> @@: 0 00005425 85DB test bx, bx 0 00005427 7403 jz .if_false 0 00005429 E9EDFE jmp if_exists_condition_met.numeric 217 <1> 218 <1> .if_false: 0 0000542C E9[0000] jmp resetrc 220 <1> 221 <1> 222 <1> .is_variable: 0 0000542F E8[0000] call skipcomma 0 00005432 56 push si 0 00005433 E8[0000] nearcall isvariable? 0 00005436 5F pop di ; - 1 -> start of candidate variable name 0 00005437 7212 jc .skipvariablename ; not valid, go to skip --> (si unchanged) 228 <1> 0 00005439 BB0100 mov bx, 1 ; prepare valid variable return 0 0000543C 4E dec si 0 0000543D E8[0000] call skipcomma 0 00005440 BA[0000] mov dx, msg.then 0 00005443 4E dec si 0 00005444 E8[0000] call isstring? ; keyword as expected ? 0 00005447 74D2 je .if_bx_after_then ; yes, handle THEN command --> 0 00005449 89FE mov si, di ; reset - 1 -> start of name 237 <1> 238 <1> .skipvariablename: 0 0000544B 4E dec si ; -> start of name 240 <1> @@: 0 0000544C AC lodsb 0 0000544D 3C20 cmp al, 32 ; end of name ? 0 0000544F 7420 je @F 0 00005451 3C09 cmp al, 9 0 00005453 741C je @F 0 00005455 3C2C cmp al, ',' 0 00005457 7418 je @F 0 00005459 E8[0000] call iseol? 0 0000545C 7413 je @F ; yes --> 0 0000545E 3C28 cmp al, '(' ; parens (index expression) ? 0 00005460 75EA jne @B ; no, loop --> 0 00005462 E8[0000] call skipwhite 0 00005465 E8[0000] nearcall getexpression ; parse index expression (must be valid) 0 00005468 3C29 cmp al, ')' ; closing parens ? 0 0000546A 7403E9[0000] jne error ; no, error --> 0 0000546F EBDB jmp @B ; loop --> 257 <1> 258 <1> @@: 0 00005471 31DB xor bx, bx ; prepare invalid variable return 260 <1> .if_bx_comma: 0 00005473 4E dec si 0 00005474 E8[0000] call skipcomma 0 00005477 EB96 jmp .if_bx ; check for the THEN keyword --> 70 ; I command - input from I/O port. 71 .not_if: 0 00005479 89D6 mov si, dx 0 0000547B 4E dec si 0 0000547C 4E dec si 0 0000547D BA[0000] mov dx, msg.install 0 00005480 E8[0000] call isstring? 0 00005483 AC lodsb 78 %if _LINK_COMPAT 0 00005484 7503 jne @F 0 00005486 E9[0000] jmp strict near install 81 @@: 82 %else 83 je install 84 %endif 0 00005489 AC lodsb 86 0 0000548A B449 mov ah, 'I' 0 0000548C BB[3802] mov bx, .tab 89 90 ; bx = jump table for byte, word, dword handler 91 ; ah = letter of the command 92 ; si, al etc. 93 .common: 0 0000548F 50 push ax 0 00005490 E8[0000] call capitalise 0 00005493 3C57 cmp al, 'W' 0 00005495 7507 jne .notw 98 .incbx2: 0 00005497 43 inc bx 0 00005498 43 inc bx ; use word handler 0 00005499 E8[0000] call skipwhite ; skip the 'W' til next character 0 0000549C EB12 jmp short .sizeset 103 104 .notw: 0 0000549E 3C44 cmp al, 'D' 0 000054A0 750E jne .sizeset 107 %if 1 0 000054A2 3264FE xor ah, byte [si-2] 0 000054A5 7405 jz .d ; "Id" or "Od" --> (uppercase command) 0 000054A7 80F420 xor ah, 32 0 000054AA 7504 jnz .sizeset ; no space is allowed between the command and 'D' --> 112 ; "id" or "od" here (lowercase command) 113 .d: 114 %endif 0 000054AC 43 _386 inc bx 0 000054AD 43 _386 inc bx ; use dword handler 0 000054AE EBE7 _386_jmps .incbx2 ; bx += 2 and skip the 'D' 118 ; no 386 here. try with D as part of port number 119 .sizeset: 0 000054B0 E8[0000] nearcall getword ; get port 0 000054B3 59 pop cx ; restore letter if necessary 0 000054B4 80FD49 cmp ch, 'I' ; check whether I or O 0 000054B7 7504 jne .o ; O --> 0 000054B9 E8[0000] call chkeol ; expect end of line here for I commands 0 000054BC A8 db __TEST_IMM8 ; (skip push) 126 .o: 0 000054BD 52 push dx ; save port number for O commands 0 000054BE 2EFF27 jmp near [cs:bx] 129 130 0 000054C1 00 align 2, db 0 132 .tab: 0 000054C2 [3E02][4402][4B02] dw .byte, .word, .dword 134 135 .byte: 0 000054C8 EC in al, dx 0 000054C9 E8[0000] call hexbyte 0 000054CC EB04 jmp short .done 139 140 .word: 0 000054CE ED in ax, dx 142 .doneword: 0 000054CF E8[0000] call hexword 144 .done: 0 000054D2 E9[0000] jmp putsline_crlf 146 147 .dword: 148 [cpu 386] 0 000054D5 66ED in eax, dx 0 000054D7 E8[0000] call hexword_high 151 __CPU__ 0 000054DA EBF3 jmp short .doneword 153 154 0 000054DC E9[0000] errorj5:jmp error === Trace listing source: ../lst/debug.obj/immasm.lst 1 %if 0 2 3 lDebug assembler/immediate execution handler 4 5 Copyright (C) 2008-2026 E. C. Masloch 6 7 Usage of the works is permitted provided that this 8 instrument is retained with the works, so that any entity 9 that uses the works is notified of this instrument. 10 11 DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 12 13 %endif 14 15 %define SOURCEFILENAME "immasm.asm" 16 %ifidni __OUTPUT_FORMAT__, obj 17 %include "debug.mac" 1 <1> [list -] 14 <3> [list -] 14 <2> [list -] 86 <1> [list -] 86 ------------------ <1> note: Disable usesection detection === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00002320 ???????? eldhSignature: resb 4 ; "ELD1" 0 00002324 ?????? resb 3 ; reserved 0 00002327 ?? resb 1 ; 26 (Ctrl-Z) 0 00002328 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000232C ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 0000232E ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002330 ???????? eldhDataOffset: resd 1 0 00002334 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00002336 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00002338 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000233A ???????? eldhReserved: resb 4 ; reserved 0 0000233E ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00002340 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00002344 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00002348 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000234C ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002320 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00002328 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000232C ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 0000232E ???? 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 0 00002320 ???? 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 0 00002322 ???? eldltAmount: resw 1 0 00002324 ???????? 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 0 00002320 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00002322 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00002324 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00002326 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00002328 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002330 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00002320 ???? eldlSignature: resw 1 ; 0E1D1h 0 00002322 ???????? eldlReserved: resw 2 0 00002326 ???? eldlUseLinkHash: resw 1 0 00002328 ???? eldlDataAmount: resw 1 0 0000232A ???? eldlDataPrefixes: resw 1 0 0000232C ???? eldlDataEntries: resw 1 0 0000232E ???? eldlDataAddresses: resw 1 0 00002330 ???? eldlCodeAmount: resw 1 0 00002332 ???? eldlCodePrefixes: resw 1 0 00002334 ???? eldlCodeEntries: resw 1 0 00002336 ???? 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 0 00002320 ???? ifKeyword: resw 1 0 00002322 ???? ifDescription: resw 1 0 00002324 ???? ifOptions: resw 1 0 00002326 ???? ifValue: resw 1 0 00002328 ???? ifTrying: resw 1 0 0000232A ???? 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 0 00002320 ???????? saOffset: resd 1 0 00002324 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00002320 ???? so16aOffset: resw 1 0 00002322 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00002320 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00002320 ?????? bsJump: resb 3 0 00002323 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00002320 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00002322 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00002323 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00002325 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00002326 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 00002328 ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000232A ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000232B ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 0000232D ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 0000232F ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00002331 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00002335 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 00002339 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 0000233D ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 0000233F ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00002341 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00002345 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 00002347 ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00002320 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00002321 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00002322 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00002323 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00002332 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00002320 ???????????????? deName: resb 8 0 00002328 ?????? deExt: resb 3 0 0000232B ?? deAttrib: resb 1 0 0000232C ?? dePlusSize: resb 1 0 0000232D ?????????????? resb 7 0 00002334 ???? deClusterHigh: resw 1 0 00002336 ???? deTime: resw 1 0 00002338 ???? deDate: resw 1 0 0000233A ???? deClusterLow: resw 1 0 0000233C ???????? 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 0 100002310 ???????? lsvFirstCluster: resd 1 0 100002314 ???????? lsvFATSector: resd 1 0 100002318 ???? lsvFATSeg: resw 1 0 10000231A ???? lsvLoadSeg: resw 1 0 10000231C ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100002300 ???? ldMemoryTop: resw 1 0 100002302 ???? ldLoadTop: resw 1 0 100002304 ???? ldSectorSeg: resw 1 0 100002306 ?? ldFATType: resb 1 92 <2> ldFlags: 0 100002307 ?? ldHasLBA: resb 1 0 100002308 ???? ldClusterSize: resw 1 0 10000230A ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 10000230C ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 10000230E ?? .partition: resb 1 ; byte 0 10000230F ?? .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 <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 0 1000022F0 ???????? ldRootSector: resd 1 0 1000022F4 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 1000022F6 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 1000022F8 ???? ldParasLeft: resw 1 0 1000022FA ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000022E0 ???????? ldMaxCluster: resd 1 0 1000022E4 ???????? ldFileSize: resd 1 0 1000022E8 ???????? ldCurrentCluster: resd 1 0 1000022EC ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00002320 ???????? liiSignature: resb 4 ; "NLDR" 0 00002324 ???? liiVersion: resb 2 ; "00" 0 00002326 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 00002328 ???? liiAmountParagraphs: resw 1 0 0000232A ???????????? liiReserved: resw 3 0 00002330 ???? 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 0 00002332 ???? 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 0 00002334 ???? 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 0 00002336 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00002320 ???? lpSize: resw 1 0 00002322 ???? lpCount: resw 1 0 00002324 ???????? lpBuffer: resd 1 0 00002328 ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00002320 ?? piBoot: resb 1 0 00002321 ?????? piStartCHS: resb 3 0 00002324 ?? piType: resb 1 0 00002325 ?????? piEndCHS: resb 3 0 00002328 ???????? piStart: resd 1 0 0000232C ???????? 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 0 00002320 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00002322 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00002324 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00002326 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 00002328 ???? lsOptions: resw 1 ; option flags 0 0000232A ???? lsSegment: resw 1 ; => where to load file 0 0000232C ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00002330 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00002334 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00002336 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 00002338 ???????????????? 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 0 00002320 ???? exact_struc_at 00h, exeSignature: resw 1 0 00002322 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00002324 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00002326 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 00002328 ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 0000232A ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 0000232C ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 0000232E ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00002330 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00002332 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00002334 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00002336 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 00002338 ???? 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. 0 0000233A ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00002320 ???? ifhHandle: resw 1 0 00002322 ???? ifhFlags: resw 1 0 00002324 ???????? 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 <1> areastrucEntry: resb 24 0 00002338 ???????? areastrucNext: resd 1 0 0000233C ???????? areastrucPrev: resd 1 0 00002340 ???? areastrucSubAmount: resw 1 0 00002342 ???? areastrucSubOffset: resw 1 0 00002344 ???? areastrucFunAmount: resw 1 0 00002346 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00002320 ???????? areastrucsubLinear: resd 1 0 00002324 ???????? areastrucsubLinearEnd: resd 1 0 00002328 ???? areastrucsubListOffset: resw 1 0 0000232A ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00002320 ???????? areastrucfunLinear: resd 1 0 00002324 ???????? areastrucfunLinearEnd: resd 1 0 00002328 ???? areastrucfunListOffset: resw 1 0 0000232A ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00002320 ???? areastart: resw 1 0 00002322 ???? areaend: resw 1 0 00002324 ???? areamessage: resw 1 0 00002326 ???? 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 0 00002320 ???? 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.) 0 00002322 ???? ivFlags: resw 1 0 00002324 ???? 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. 0 00002326 ???? 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 0 00002328 ?? 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. 0 00002329 ?? 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 0 00002320 ???????? mrLinear: resd 1 0 00002324 ???????? mrOffset: resd 1 0 00002328 ???? mrSegmentSelector: resw 1 0 0000232A ???? mrFlags: resw 1 0 0000232C ???????? 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 0 00002320 ???????? .size_: resd 1 0 00002324 ???? .srchdl: resw 1 0 00002326 ???????? .srcadr: resd 1 0 0000232A ???? .dsthdl: resw 1 0 0000232C ???????? .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 18 %endif 19 20 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 20 ------------------ note: usesection lDEBUG_CODE 21 22 %if _LINK && ! _IMMASM 23 immasm: 24 lodsb 25 call chkeol 26 jmp cmd3 27 %else 28 immasm: 29 %if _DUALCODE 30 usesection lDEBUG_CODE2 31 section_of immasm_relocated 32 33 usesection lDEBUG_CODE 34 dualcall immasm_relocated 35 36 usesection lDEBUG_CODE2 37 38 dualfunction 39 immasm_relocated: section_of_function 40 %endif 0 000054DF E8[0000] nearcall skipwhite 0 000054E2 E8[0000] nearcall iseol? 0 000054E5 7503E93A02 je .ret 0 000054EA C606[4A00]00 mov byte [ ia_exec ], 0 0 000054EF 3C2E cmp al, '.' ; second dot ? 0 000054F1 7507 jne .nodot ; no --> 0 000054F3 FE06[4A00] inc byte [ ia_exec ] ; note it 0 000054F7 E8[0000] nearcall skipwhite ; skip it 49 .nodot: 0 000054FA 3C2C cmp al, ',' ; comma ? 0 000054FC 7508 jne .nocomma ; no --> 0 000054FE 800E[4A00]80 or byte [ ia_exec ], 80h ; note it 0 00005503 E8[0000] nearcall skipwhite ; skip it 54 .nocomma: 0 00005506 E8[0000] nearcall iseol? 0 00005509 7503E99500 je .ret_e ; empty --> 57 58 %if _IMMASM_AUXBUFF 59 nearcall guard_auxbuff 60 %endif 61 0 0000550E 50 push ax 0 0000550F 56 push si 64 0 00005510 BE[0000] mov si, a_addr 0 00005513 BF[2000] mov di, ia_savedaddr 0 00005516 A5 movsw 0 00005517 A5 movsw 0 00005518 A5 movsw ; save A command address 0 00005519 C706[4600][8702] mov word [ ia_restore ], ia_restore_a_addr 71 0 0000551F 06 push es 0 00005520 E83E02 call getimmselseg 0 00005523 31FF xor di, di 0 00005525 891E[0400] mov word [ a_addr+4 ], bx 76 _386_PM and word [ a_addr+2 ], byte 0 0 00005529 893E[0000] mov word [ a_addr+0 ], di ; initialize address 78 79 %if _PM 80 push bx 81 nearcall verifysegm_or_error 82 %endif 0 0000552D 8EC3 mov es, bx 0 0000552F B92000 mov cx, immasm_length 0 00005532 B0CC mov al, 0CCh 0 00005534 F3AA rep stosb ; initialize buffer 87 %if _PM 88 pop bx 89 %endif 0 00005536 07 pop es 91 0 00005537 5E pop si 0 00005538 58 pop ax 0 00005539 C706[0000][7100] mov word [ aa_ret ], .aa_ret ; make assembler return here 0 0000553F 8926[4800] mov word [ ia_sp ], sp ; (possibly unnecessary) 96 97 %if _PM 98 mov byte [ bCSAttr ], 0 99 nearcall test_d_b_bit 100 jz .16 101 mov byte [ bCSAttr ], 40h 102 .16: 103 %endif 104 0 00005543 800E[0300]02 setopt [internalflags6], dif6_immasm 0 00005548 8026[0300]FB clropt [internalflags6], dif6_immasm_rel8 107 %if _DUALCODE 108 dualcall aa_imm_entry 109 110 section_of immasm_relocated.aa_ret_relocated 111 112 usesection lDEBUG_CODE 113 .aa_ret: 114 dualcall immasm_relocated.aa_ret_relocated 115 116 usesection lDEBUG_CODE2 117 .aa_ret_relocated: 118 %else 0 0000554D E9[0000] jmp aa_imm_entry 120 121 .aa_ret: 122 %endif 0 00005550 8B26[4800] mov sp, word [ ia_sp ] 0 00005554 16 push ss 0 00005555 1F pop ds 0 00005556 16 push ss 0 00005557 07 pop es 128 129 ; dwo [a_addr] - dwo [ia_savedaddr] = len of opcode 130 0 00005558 E80B02 nearcall ia_restore_a_addr 132 133 ; for now, disassemble the result 0 0000555B BE[0000] mov si, u_addr 0 0000555E BF[2000] mov di, ia_savedaddr 0 00005561 A5 movsw 0 00005562 A5 movsw 0 00005563 A5 movsw ; save U command address 0 00005564 C706[4600][B002] mov word [ ia_restore ], ia_restore_u_addr 140 0 0000556A E8F401 call getimmselseg 0 0000556D 891E[0400] mov word [ u_addr+4 ], bx 143 _386_PM and word [ u_addr+2 ], byte 0 0 00005571 8326[0000]00 and word [ u_addr+0 ], byte 0 ; initialize address 145 0 00005576 F606[0300]02 testopt [options6], opt6_immasm_display_uu 0 0000557B 7505 jnz @F 0 0000557D 800E[0300]01 setopt [internalflags6], dif6_immasm_no_output 149 @@: 150 0 00005582 C706[0000]0200 mov word [disflags], DIS_F_SHOW 0 00005588 E8[0000] nearcall disasm 0 0000558B 8026[0300]FE clropt [internalflags6], dif6_immasm_no_output 154 0 00005590 16 push ss 0 00005591 1F pop ds 0 00005592 16 push ss 0 00005593 07 pop es 159 0 00005594 E8F801 nearcall ia_restore_u_addr 161 0 00005597 F606[0300]08 testopt [options6], opt6_immasm_flag 0 0000559C 740A jz @F 0 0000559E F606[4A00]01 test byte [ ia_exec ], 1 ; test execution ? 165 .ret_e: 0 000055A3 7503E97C01 jz .ret ; no --> 167 @@: 168 0 000055A8 BE[0000] mov si, reg_eip 0 000055AB BF[2600] mov di, ia_savedcseip 0 000055AE A5 movsw 172 _386_PM movsw 0 000055AF BE[0000] mov si, reg_cs 0 000055B2 A5 movsw ; save CS:(E)IP 0 000055B3 A1[0000] mov ax, word [reg_ds] 0 000055B6 A3[4000] mov word [immasm_save_ds], ax ; unconditionally store ds 177 0 000055B9 8326[4200]00 and word [immasm_temp], 0 0 000055BE 803E[0000]01 cmp byte [segmnt], 1 0 000055C3 752F jne .not_cs_prefix 0 000055C5 FF06[4200] inc word [immasm_temp] ; flag used by .lds 0 000055C9 C606[0000]03 mov byte [segmnt], 3 0 000055CE C706[4600][B502] mov word [ ia_restore ], ia_restore_ds 0 000055D4 A1[0000] mov ax, word [reg_cs] 0 000055D7 A3[0000] mov word [reg_ds], ax 0 000055DA E88401 call getimmselseg 0 000055DD 8EC3 mov es, bx 0 000055DF 31FF xor di, di 0 000055E1 B02E mov al, 2Eh 0 000055E3 B92000 mov cx, immasm_length 0 000055E6 F2AE repne scasb 0 000055E8 7403E9[0000] jne error_mirror 193 %if _PM 194 nearcall verifysegm_or_error 195 mov es, bx 196 %endif 0 000055ED 26C645FF3E mov byte [es:di - 1], 3Eh 0 000055F2 16 push ss 0 000055F3 07 pop es 200 201 .not_cs_prefix: 0 000055F4 A1[0000] mov ax, word [index] 0 000055F7 BF[4C00] mov di, immasm_special_indices 0 000055FA B91200 mov cx, immasm_special_indices.amount 0 000055FD F2AF repne scasw 0 000055FF 7403E98700 jne .notspecial 0 00005604 F606[0300]04 testopt [options6], opt6_immasm_debug 0 00005609 740C jz @F 0 0000560B 8B5522 mov dx, word [di - (immasm_special_indices. + 2) + immasm_special_indices.names] 0 0000560E E8[0000] nearcall putsz 0 00005611 BA[0000] mov dx, crlf 0 00005614 E8[0000] nearcall putsz 213 @@: 0 00005617 8B5546 mov dx, word [di - (immasm_special_indices. + 2) + immasm_special_indices.functions] 0 0000561A BF[0000] mov di, line_out 216 0 0000561D A1[0000] mov ax, word [reg_efl] 0 00005620 A3[3A00] mov word [immasm_efl], ax 0 00005623 A1[0200] mov ax, word [reg_efl + 2] 0 00005626 A3[3C00] mov word [immasm_efl + 2], ax 0 00005629 A1[4000] mov ax, word [immasm_save_ds] 0 0000562C A3[3E00] mov word [immasm_ds], ax 0 0000562F C706[4400][8301] mov word [immasm_callback], .retn 224 225 ; OUT: cx:dx:ax = cs:eip 226 ; dword [immasm_efl] = efl 227 ; word [immasm_ds] = ds 228 ; word [immasm_callback] = to call 229 ; (e)bx = (e)sp 0 00005635 FFD2 call dx 0 00005637 F606[0300]04 testopt [options6], opt6_immasm_debug 0 0000563C 740B jz @F 0 0000563E 50 push ax 0 0000563F 53 push bx 0 00005640 51 push cx 0 00005641 52 push dx 0 00005642 E8[0000] nearcall putsline_crlf 0 00005645 5A pop dx 0 00005646 59 pop cx 0 00005647 5B pop bx 0 00005648 58 pop ax 242 @@: 0 00005649 F606[0300]10 testopt [options6], opt6_immasm_nobranch 0 0000564E 7538 jnz .ret_j 0 00005650 85D2 test dx, dx 0 00005652 740F jz @F 247 %if _PM 248 nearcall ispm 249 jnz .error_eip 250 push bx 251 mov bx, cx 252 nearcall test_d_b_bit 253 pop bx 254 jnz @F 255 %endif 256 .error_eip: 0 00005654 BA[0000] mov dx, msg.immasm_error_eip 0 00005657 E8[0000] nearcall putsz 0 0000565A B83201 mov ax, 0132h 0 0000565D E8[0000] nearcall setrc 0 00005660 EB26 jmp .ret_j 262 263 .retn: 0 00005662 C3 retn 265 266 @@: 0 00005663 A3[0000] mov word [reg_eip], ax 0 00005666 8916[0200] mov word [reg_eip + 2], dx 0 0000566A 890E[0000] mov word [reg_cs], cx 270 _386_PM_o32 0 0000566E 891E[0000] mov word [reg_esp], bx 0 00005672 FF16[4400] call near [immasm_callback] 0 00005676 A1[3A00] mov ax, word [immasm_efl] 0 00005679 A3[0000] mov word [reg_efl], ax 0 0000567C A1[3C00] mov ax, word [immasm_efl + 2] 0 0000567F A3[0200] mov word [reg_efl + 2], ax 0 00005682 A1[3E00] mov ax, word [immasm_ds] 0 00005685 A3[0000] mov word [reg_ds], ax 279 .ret_j: 0 00005688 E99900 jmp .ret 281 282 .notspecial: 283 ..@immasm_not_special: 0 0000568B F606[0300]04 testopt [internalflags6], dif6_immasm_rel8 0 00005690 7421 jz .exec 286 0 00005692 8B36[0000] mov si, word [condmsg] 0 00005696 85F6 test si, si 0 00005698 7406 jz .jumping ; this is an unconditional jump --> 0 0000569A 81FE[0000] cmp si, msg.condjump ; jumping ? 0 0000569E 7506 jne .exec_if_loop ; no, just decrement (e)cx 292 293 .jumping: 294 _386_PM_o32 0 000056A0 A1[2C00] mov ax, word [immasm_rel8_target] 296 _386_PM_o32 0 000056A3 A3[0000] mov word [reg_eip], ax ; update (e)ip with branch target 298 299 .exec_if_loop: 0 000056A6 A1[0000] mov ax, word [index] 0 000056A9 3DE000 cmp ax, 0E0h 0 000056AC 7276 jb .ret 0 000056AE 3DE200 cmp ax, 0E2h 0 000056B1 7771 ja .ret 305 ; decrement (e)cx but keep (e)ip 306 307 .exec: 0 000056B3 B8[A502] mov ax, ia_restore_cseip_and_u_addr 0 000056B6 813E[4600][B502] cmp word [ ia_restore ], ia_restore_ds 0 000056BC 7503 jne @F 0 000056BE B8[9F02] mov ax, ia_restore_cseip_and_u_addr_and_ds 312 @@: 0 000056C1 813E[4600][BD02] cmp word [ ia_restore ], ia_restore_es 0 000056C7 7503 jne @F 0 000056C9 B8[9702] mov ax, ia_restore_cseip_and_u_addr_and_es 316 @@: 0 000056CC A3[4600] mov word [ ia_restore ], ax 318 0 000056CF E88F00 call getimmselseg 0 000056D2 891E[0000] mov word [ reg_cs ], bx 321 _386_PM and word [ reg_eip+2 ], byte 0 0 000056D6 8326[0000]00 and word [ reg_eip+0 ], byte 0 ; initialize address 323 324 325 %if _PM 326 nearcall resetmode 327 %endif 0 000056DB BA0F00 mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 0 000056DE 8B1E[0000] mov bx, word [reg_cs] 330 _386_PM_o32 ; mov esi, dword [reg_eip] 0 000056E2 8B36[0000] mov si, word [reg_eip] 332 .pp2: 0 000056E6 E8[0000] nearcall pp16 ; get next instruction byte into AL 0 000056E9 BF[0000] mov di, ppbytes 0 000056EC B9[0000] mov cx, PPLEN_ONLY_STRING 336 %if _SYMBOLIC 337 mov byte [pp_instruction], al 338 %endif 0 000056EF F2AE repne scasb 0 000056F1 7522 jne .not_p ; if not one of these --> 341 %if _LINK_COMPAT 0 000056F3 8A85[FFFF] mov al,byte [word di+PPLEN-1]; get corresponding byte in ppinfo 343 %else 344 mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 345 %endif 0 000056F7 A880 test al, PP_PREFIX ; prefix ? 0 000056F9 740E jz .pp3 ; no --> 0 000056FB 08C6 or dh, al ; set the OSIZE or ASIZE flags if either of these 349 ; Note: Multiple OSIZE in a 16-bit cs do not toggle 350 ; between decoding as O32 and O16, they're always 351 ; decoded as O32. The same is true for A32, and 352 ; in a 32-bit cs for O16 and A16. 0 000056FD FECA dec dl 0 000056FF 75E5 jnz .pp2 ; if not out of bytes --> 0 00005701 BA[0000] mov dx, msg.warnprefix 0 00005704 E8[0000] nearcall putsz 0 00005707 EB0C jmp .not_p 358 359 ; A repeatable string instruction is to be decoded. 360 ; Finish the decoding and skip the appropriate number 361 ; of opcode bytes. 362 .pp3: 363 _386_PM nearcall pp_fix32bitflags 0 00005709 A847 test al, PP_VARSIZ | PP_SIZ_MASK 0 0000570B 7403E9[0000] jnz error_mirror 366 %if 0 367 test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 368 jz .ignoreosize ; no --> 369 and dh, 2 370 add al, dh 371 .ignoreosize: 372 and ax, PP_SIZ_MASK 373 _386_PM movzx eax, ax ; clear high word (in case it counts) 374 _386_PM_o32 ; add esi, eax 375 add si, ax 376 %endif 377 ; pp10: 378 %if _SYMBOLIC && 0 379 nearcall pp3_check_symhints 380 jc .not_p ; trace --> 381 %endif 382 ; jmp short pp11 ; we have a skippable instruction here 383 ; pp11: 384 _386_PM nearcall resetmode_and_test_d_b_bit 385 _386_PM jnz .32 ; full 32-bit offset valid --> 386 _386_PM movzx esi, si ; clear high word here 387 .32: 0 00005710 E8[0000] nearcall proceedbreakpoint ; run until the breakpoint is hit 389 ; This call might return modeswitched. 0 00005713 EB03 jmp short @F 391 392 .not_p: 0 00005715 E8[0000] nearcall traceone ; call common code 394 @@: 395 %if _PM 396 nearcall resetmode 397 %endif 0 00005718 720D jc .unexpected ; --> (returns to cmd3) 0 0000571A F606[0300]04 testopt [options6], opt6_immasm_debug 0 0000571F 7403 jz .ret 0 00005721 E8[0000] nearcall dumpregs_no_disasm ; dump registers (only) 402 .ret: 403 %if _DUALCODE 404 jmp cmd3_mirror 405 406 .unexpected: 407 dualcall unexpectedinterrupt 408 %else 0 00005724 E9[0000] jmp cmd3 410 411 .unexpected: 0 00005727 E9[0000] jmp unexpectedinterrupt 413 %endif 414 415 416 417 immasm_run_near: 0 0000572A 8B1E[0000] mov bx, word [reg_cs] 419 _386_PM_o32 0 0000572E 8B36[0000] mov si, word [reg_eip] 0 00005732 B20F mov dl, 15 ; number of bytes to go 422 .loop: 0 00005734 E8[0000] nearcall pp16 0 00005737 3CCB cmp al, 0CBh ; retf ? 0 00005739 7424 je .trace 0 0000573B 3CCA cmp al, 0CAh ; retf imm16 ? 0 0000573D 7420 je .trace 0 0000573F 3CCF cmp al, 0CFh ; iret ? 0 00005741 741C je .trace 0 00005743 BF[0000] mov di, ppbytes 0 00005746 B9[0000] mov cx, PPLEN_ONLY_PREFIXES 0 00005749 F2AE repne scasb 0 0000574B 7504 jne .done 434 ; if one of the prefixes 0 0000574D FECA dec dl 0 0000574F 75E3 jnz .loop ; if not out of bytes --> 437 438 ; fall through: do not trace 439 .done: 440 441 immasm_run_far: 0 00005751 E84000 nearcall ia_restore_ds 443 0 00005754 BE[2600] mov si, ia_savedcseip 445 _386_PM_o32 0 00005757 AD lodsw ; (e)ax = (e)ip 447 _386_PM_o32 0 00005758 50 push ax 0 00005759 AD lodsw ; ax = cs 0 0000575A 93 xchg bx, ax ; bx = cs 451 _386_PM_o32 0 0000575B 5E pop si ; (e)si = (e)ip 0 0000575C E8[0000] nearcall proceedbreakpoint 454 immasm_run_near.trace: 0 0000575F EBB7 jmp @B 456 457 458 getimmselseg: 0 00005761 8B1E[0000] mov bx, word [immseg] 460 %if _PM 461 nearcall ispm 462 jnz .ret 463 push cx 464 push ax 465 subcpu 286 466 mov bx, word [reg_cs] 467 nearcall test_d_b_bit 468 mov bx, word [immsel] 469 jz .16 470 .32: 471 lar cx, bx 472 shr cx, 8 473 mov ch, 40h 474 jmp .common 475 476 .16: 477 lar cx, bx 478 shr cx, 8 479 .common: 480 mov ax, 0009h 481 int 31h 482 pop ax 483 pop cx 484 subcpureset 485 %endif 486 .ret: 0 00005765 C3 retn 488 489 490 usesection lDEBUG_CODE 490 ------------------ note: usesection lDEBUG_CODE 491 ia_restore_a_addr: section_of_function 0 00005766 BF[0000] mov di, a_addr 493 .common_u: 0 00005769 BE[2000] mov si, ia_savedaddr 0 0000576C A5 movsw 0 0000576D A5 movsw 0 0000576E A5 movsw ; restore address 498 ia_restore_reset: 0 0000576F C706[4600][9602] mov word [ ia_restore ], ia_restore_none 500 ia_restore_none: 0 00005775 C3 retn 502 503 ia_restore_cseip_and_u_addr_and_es: 0 00005776 A1[4000] mov ax, word [immasm_save_es] 0 00005779 A3[0000] mov word [reg_es], ax 0 0000577C EB06 jmp ia_restore_cseip_and_u_addr 507 508 ia_restore_cseip_and_u_addr_and_ds: 0 0000577E A1[4000] mov ax, word [immasm_save_ds] 0 00005781 A3[0000] mov word [reg_ds], ax 511 ia_restore_cseip_and_u_addr: 0 00005784 BF[0000] mov di, reg_eip 0 00005787 BE[2600] mov si, ia_savedcseip 0 0000578A A5 movsw 515 _386_PM movsw 0 0000578B BF[0000] mov di, reg_cs 0 0000578E A5 movsw 518 519 ia_restore_u_addr: section_of_function 0 0000578F BF[0000] mov di, u_addr 0 00005792 EBD5 jmp short ia_restore_a_addr.common_u 522 523 ia_restore_ds: section_of_function 0 00005794 A1[4000] mov ax, word [immasm_save_ds] 0 00005797 A3[0000] mov word [reg_ds], ax 0 0000579A EBD3 jmp ia_restore_reset 527 528 ia_restore_es: 0 0000579C A1[4000] mov ax, word [immasm_save_es] 0 0000579F A3[0000] mov word [reg_es], ax 0 000057A2 EBCB jmp ia_restore_reset 532 533 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 533 ------------------ note: usesection lDEBUG_DATA_ENTRY 534 %if _LINK_COMPAT 535 align 16, db 0 536 %endif 537 538 %if _IMMASM_AUXBUFF 539 immasm_length: equ _AUXBUFFSIZE 540 %else 541 align 16, db 0 542 immasm_length: equ 32 0 00002320 00 immasm_buffer: times immasm_length db 0 544 %endif 545 align 2, db 0 0 00002340 000000000000 ia_savedaddr: dw 0,0,0 ; a_addr or u_addr 0 00002346 000000000000 ia_savedcseip: dw 0,0,0 ; CS:(E)IP 548 immasm_rel8_target: 549 immasm_rel1632_target: ; (not used at the same time) 0 0000234C 00000000 dd 0 551 immasm_far_target: 0 00002350 000000000000 dw 0,0,0 0 00002356 0000 immasm_imm16: dw 0 0 00002358 0000 dw 0 ; allow loading as a dword 0 0000235A 00000000 immasm_efl: dd 0 0 0000235E 0000 immasm_ds: dw 0 557 immasm_save_es: ; (not used at the same time) 0 00002360 0000 immasm_save_ds: dw 0 0 00002362 0000 immasm_temp: dw 0 0 00002364 0000 immasm_callback:dw 0 0 00002366 [9602] ia_restore: dw ia_restore_none ; called by cmd3 0 00002368 0000 ia_sp: dw 0 0 0000236A 00 ia_exec: db 0 564 0 0000236B 00 align 2, db 0 566 immasm_special_indices: 567 .: 0 0000236C [0400] dw GROUP7 + 4 ; jmp near r/m 0 0000236E [0500] dw GROUP7 + 5 ; jmp far r/m 0 00002370 [0200] dw GROUP7 + 2 ; call near r/m 0 00002372 [0300] dw GROUP7 + 3 ; call far r/m 0 00002374 E800 dw 00E8h ; call near imm 0 00002376 9A00 dw 009Ah ; call far imm 574 ; dw 00EBh ; not needed: jmp short imm 575 ; dw 00E9h ; not needed: jmp near imm 0 00002378 EA00 dw 00EAh ; jmp far imm 0 0000237A C300 dw 00C3h ; retn 0 0000237C C200 dw 00C2h ; retn imm 0 0000237E CB00 dw 00CBh ; retf 0 00002380 CA00 dw 00CAh ; retf imm 0 00002382 CF00 dw 00CFh ; iret 0 00002384 8E00 dw 008Eh ; mov to ds 0 00002386 8C00 dw 008Ch ; mov from ds, cs 0 00002388 0E00 dw 000Eh ; push cs 0 0000238A 1E00 dw 001Eh ; push ds 0 0000238C 1F00 dw 001Fh ; pop ds 0 0000238E C500 dw 00C5h ; lds 588 .amount equ ($ - .) / 2 589 590 %define IMMASMSPECIALMESSAGES db "" 591 %define IMMASMSPECIALFUNCTIONS db "" 592 593 %imacro immasm_special 2 594 %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 596 dw %%message 597 %endmacro 598 %imacro immasm_special_dump 1-*.nolist 599 %rep %0 600 %1 601 %rotate 1 602 %endrep 603 %endmacro 604 .names: 605 immasm_special .jnm, "jmp near m" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 00002390 [B800] dw %%message 606 immasm_special .jfm, "jmp far m" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 00002392 [C300] dw %%message 607 immasm_special .cnm, "call near m" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 00002394 [CD00] dw %%message 608 immasm_special .cfm, "call far m" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 00002396 [D900] dw %%message 609 immasm_special .cni, "call near i" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 00002398 [E400] dw %%message 610 immasm_special .cfi, "call far i" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 0000239A [F000] dw %%message 611 immasm_special .jfi, "jmp far i" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 0000239C [FB00] dw %%message 612 immasm_special .rn, "retn" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 0000239E [0501] dw %%message 613 immasm_special .rni, "retn i" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 000023A0 [0A01] dw %%message 614 immasm_special .rf, "retf" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 000023A2 [1101] dw %%message 615 immasm_special .rfi, "retf i" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 000023A4 [1601] dw %%message 616 immasm_special .ir, "iret" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 000023A6 [1D01] dw %%message 617 immasm_special .movto, "mov to ds" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 000023A8 [2201] dw %%message 618 immasm_special .movfrom, "mov from ds, cs" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 000023AA [2C01] dw %%message 619 immasm_special .pushcs, "push cs" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 000023AC [3C01] dw %%message 620 immasm_special .pushds, "push ds" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 000023AE [4401] dw %%message 621 immasm_special .popds, "pop ds" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 000023B0 [4C01] dw %%message 622 immasm_special .lds, "lds" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 000023B2 [5301] dw %%message 623 .names_amount: equ ($ - .names) / 2 624 625 %if .names_amount != .amount 626 %error Table mismatch 627 %endif 628 629 .functions: 0 000023B4 [C502][4303][E403] immasm_special_dump IMMASMSPECIALFUNCTIONS 0 000023BA [4104][C004][E104] 0 000023C0 [E704][1405][5A05] 0 000023C6 [6C05][C805][CD05] 0 000023CC [1906][8006][0607] 0 000023D2 [2D07][3207][3807] 631 .functions_amount: equ ($ - .functions) / 2 632 633 %if .functions_amount != .amount 634 %error Table mismatch 635 %endif 636 0 000023D8 6A6D70206E65617220 immasm_special_dump IMMASMSPECIALMESSAGES 0 000023E1 6D006A6D7020666172 0 000023EA 206D0063616C6C206E 0 000023F3 656172206D0063616C 0 000023FC 6C20666172206D0063 0 00002405 616C6C206E65617220 0 0000240E 690063616C6C206661 0 00002417 722069006A6D702066 0 00002420 61722069007265746E 0 00002429 007265746E20690072 0 00002432 657466007265746620 0 0000243B 690069726574006D6F 0 00002444 7620746F206473006D 0 0000244D 6F762066726F6D2064 0 00002456 732C20637300707573 0 0000245F 682063730070757368 0 00002468 20647300706F702064 0 00002471 73006C647300 638 639 640 %if _DUALCODE 641 usesection lDEBUG_CODE2 642 %else 643 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 643 ------------------ note: usesection lDEBUG_CODE 644 %endif 645 .jnm: 0 000057A4 A0[0000] mov al, byte [regmem] 0 000057A7 3CC0 cmp al, 1100_0000b 0 000057A9 722C jb .jnm_m 0 000057AB 83E007 and ax, 7 0 000057AE 89C3 mov bx, ax 0 000057B0 01DB add bx, bx 0 000057B2 8B9F[0000] mov bx, word [reg32addr + bx] 0 000057B6 8B5702 mov dx, [bx + 2] 0 000057B9 8B07 mov ax, [bx] 655 .jnm_dxax: 0 000057BB 8B0E[0000] mov cx, word [reg_cs] 0 000057BF F606[0000]10 test byte [presizeflags], PRE32D 0 000057C4 7407 jz @F 0 000057C6 92 xchg ax, dx 0 000057C7 E8[0000] nearcall hexword 0 000057CA 92 xchg ax, dx 0 000057CB EB02 jmp @FF 663 @@: 0 000057CD 31D2 xor dx, dx 665 @@: 0 000057CF E8[0000] nearcall hexword 667 _386_PM_o32 0 000057D2 8B1E[0000] mov bx, word [reg_esp] 0 000057D6 C3 retn 670 671 .jnm_m: 0 000057D7 F606[0000]04 testopt [disflags], DIS_I_SHOW 0 000057DC 7503E9[0000] jz error_mirror 674 0 000057E1 A0[0000] mov al, [segmnt] ; segment number 0 000057E4 98 cbw 0 000057E5 D1E0 shl ax, 1 0 000057E7 93 xchg ax, bx ; mov bx, ax 0 000057E8 8B9F[0000] mov bx, [segrgaddr + bx]; get address of value 0 000057EC 8E07 mov es, [bx] 681 0 000057EE 66 _386_o32 0 000057EF 8B1E[0000] mov bx, word [addrr] 0 000057F3 F606[0100]08 testopt [disflags], DIS_I_SHOW_A32 0 000057F8 7415 jz @F 0 000057FA 26678A7303 _386 mov dh, [es:ebx + 3] 0 000057FF 26678A5302 _386 mov dl, [es:ebx + 2] 0 00005804 26678A6301 _386 mov ah, [es:ebx + 1] 0 00005809 26678A03 _386 mov al, [es:ebx] 0 0000580D EB0F _386 jmp @FF 691 692 @@: 0 0000580F 268A7703 mov dh, [es:bx + 3] 0 00005813 268A5702 mov dl, [es:bx + 2] 0 00005817 268A6701 mov ah, [es:bx + 1] 0 0000581B 268A07 mov al, [es:bx] 697 @@: 0 0000581E 16 push ss 0 0000581F 07 pop es 0 00005820 EB99 jmp .jnm_dxax 701 702 703 .jfm: 0 00005822 A0[0000] mov al, byte [regmem] 0 00005825 3CC0 cmp al, 1100_0000b 0 00005827 7203E9[0000] jae error_mirror 707 708 .jfm_m: 0 0000582C F606[0000]04 testopt [disflags], DIS_I_SHOW 0 00005831 7503E9[0000] jz error_mirror 711 0 00005836 A0[0000] mov al, [segmnt] ; segment number 0 00005839 98 cbw 0 0000583A D1E0 shl ax, 1 0 0000583C 93 xchg ax, bx ; mov bx, ax 0 0000583D 8B9F[0000] mov bx, [segrgaddr + bx]; get address of value 0 00005841 8E07 mov es, [bx] 718 0 00005843 66 _386_o32 0 00005844 8B1E[0000] mov bx, word [addrr] 0 00005848 F606[0100]08 testopt [disflags], DIS_I_SHOW_A32 0 0000584D 7426 jz @F 0 0000584F F606[0000]10 _386 test byte [presizeflags], PRE32D 0 00005854 740A _386 jz .jfm_m_nocx_32 0 00005856 26678A6B05 _386 mov ch, [es:ebx + 5] 0 0000585B 26678A4B04 _386 mov cl, [es:ebx + 4] 727 .jfm_m_nocx_32: 0 00005860 26678A7303 _386 mov dh, [es:ebx + 3] 0 00005865 26678A5302 _386 mov dl, [es:ebx + 2] 0 0000586A 26678A6301 _386 mov ah, [es:ebx + 1] 0 0000586F 26678A03 _386 mov al, [es:ebx] 0 00005873 EB1E _386 jmp @FF 733 734 @@: 0 00005875 F606[0000]10 test byte [presizeflags], PRE32D 0 0000587A 7408 jz .jfm_m_nocx_16 0 0000587C 268A6F05 mov ch, [es:bx + 5] 0 00005880 268A4F04 mov cl, [es:bx + 4] 739 .jfm_m_nocx_16: 0 00005884 268A7703 mov dh, [es:bx + 3] 0 00005888 268A5702 mov dl, [es:bx + 2] 0 0000588C 268A6701 mov ah, [es:bx + 1] 0 00005890 268A07 mov al, [es:bx] 744 @@: 0 00005893 16 push ss 0 00005894 07 pop es 747 0 00005895 F606[0000]10 test byte [presizeflags], PRE32D 0 0000589A 7411 jz @F 0 0000589C 50 push ax 0 0000589D 89C8 mov ax, cx 0 0000589F E8[0000] nearcall hexword 0 000058A2 B03A mov al, ':' 0 000058A4 AA stosb 0 000058A5 58 pop ax 0 000058A6 92 xchg ax, dx 0 000058A7 E8[0000] nearcall hexword 0 000058AA 92 xchg ax, dx 0 000058AB EB0E jmp @FF 760 @@: 0 000058AD 89D1 mov cx, dx 0 000058AF 50 push ax 0 000058B0 89C8 mov ax, cx 0 000058B2 E8[0000] nearcall hexword 0 000058B5 B03A mov al, ':' 0 000058B7 AA stosb 0 000058B8 58 pop ax 0 000058B9 31D2 xor dx, dx 769 @@: 0 000058BB E8[0000] nearcall hexword 771 _386_PM_o32 0 000058BE 8B1E[0000] mov bx, word [reg_esp] 0 000058C2 C3 retn 774 775 776 .cnm: 0 000058C3 E8DEFE call .jnm 778 .cni_common: 0 000058C6 52 push dx 0 000058C7 51 push cx 0 000058C8 50 push ax 0 000058C9 8B1E[0000] mov bx, word [reg_ss] 0 000058CD 8EC3 mov es, bx 0 000058CF 8B16[0200] mov dx, word [reg_eip + 2] 0 000058D3 A1[0000] mov ax, word [reg_eip] 786 %if _PM 787 nearcall test_d_b_bit 788 _386_o32 789 mov bx, word [reg_esp] 790 jz .cnm_16bitstack 791 subcpu 386 792 test byte [presizeflags], PRE32D 793 jz @F 794 sub ebx, 2 795 mov word [es:ebx], dx 796 797 @@: 798 sub ebx, 2 799 mov word [es:ebx], ax 800 jmp .cnm_commonstack 801 subcpureset 802 803 .cnm_16bitstack: 804 %else 0 000058D6 8B1E[0000] mov bx, word [reg_esp] 806 %endif 0 000058DA F606[0000]10 test byte [presizeflags], PRE32D 0 000058DF 7406 jz @F 0 000058E1 83EB02 sub bx, 2 0 000058E4 268917 mov word [es:bx], dx 811 812 @@: 0 000058E7 83EB02 sub bx, 2 0 000058EA 268907 mov word [es:bx], ax 0 000058ED EB00 jmp .cnm_commonstack 816 817 .cnm_commonstack: 818 ; _386_o32 819 ; mov word [reg_esp], bx 820 0 000058EF 16 push ss 0 000058F0 07 pop es 823 0 000058F1 96 xchg ax, si 0 000058F2 B03D mov al, '=' 0 000058F4 AA stosb 0 000058F5 96 xchg ax, si 0 000058F6 F606[0000]10 test byte [presizeflags], PRE32D 0 000058FB 7405 jz @F 0 000058FD 92 xchg ax, dx 0 000058FE E8[0000] nearcall hexword 0 00005901 92 xchg ax, dx 833 @@: 0 00005902 E8[0000] nearcall hexword 835 0 00005905 96 xchg ax, si 0 00005906 B040 mov al, '@' 0 00005908 AA stosb 0 00005909 96 xchg ax, si 840 0 0000590A 93 xchg ax, bx 0 0000590B E8[0000] nearcall hexword 0 0000590E 93 xchg ax, bx 844 0 0000590F 58 pop ax 0 00005910 59 pop cx 0 00005911 5A pop dx 848 0 00005912 F606[4A00]80 testopt [ia_exec], 80h 0 00005917 7406 jz .cnm_retn 0 00005919 C706[4400][4B02] mov word [immasm_callback], immasm_run_near 852 .cnm_retn: 0 0000591F C3 retn 854 855 856 .cfm: 0 00005920 E8FFFE call .jfm 858 .cfi_common: 0 00005923 52 push dx 0 00005924 51 push cx 0 00005925 50 push ax 0 00005926 8B1E[0000] mov bx, word [reg_ss] 0 0000592A 8EC3 mov es, bx 0 0000592C 8B2E[0000] mov bp, word [reg_cs] 0 00005930 8B16[0200] mov dx, word [reg_eip + 2] 0 00005934 A1[0000] mov ax, word [reg_eip] 867 %if _PM 868 nearcall test_d_b_bit 869 _386_o32 870 mov bx, word [reg_esp] 871 jz .cfm_16bitstack 872 subcpu 386 873 test byte [presizeflags], PRE32D 874 jz @F 875 sub ebx, 2 876 and word [es:ebx], 0 877 @@: 878 sub ebx, 2 879 mov word [es:ebx], bp 880 881 test byte [presizeflags], PRE32D 882 jz @F 883 sub ebx, 2 884 mov word [es:ebx], dx 885 @@: 886 sub ebx, 2 887 mov word [es:ebx], ax 888 jmp .cfm_commonstack 889 subcpureset 890 891 .cfm_16bitstack: 892 %else 0 00005937 8B1E[0000] mov bx, word [reg_esp] 894 %endif 0 0000593B F606[0000]10 test byte [presizeflags], PRE32D 0 00005940 7407 jz @F 0 00005942 83EB02 sub bx, 2 0 00005945 26832700 and word [es:bx], 0 899 @@: 0 00005949 83EB02 sub bx, 2 0 0000594C 26892F mov word [es:bx], bp 902 0 0000594F F606[0000]10 test byte [presizeflags], PRE32D 0 00005954 7406 jz @F 0 00005956 83EB02 sub bx, 2 0 00005959 268917 mov word [es:bx], dx 907 @@: 0 0000595C 83EB02 sub bx, 2 0 0000595F 268907 mov word [es:bx], ax 0 00005962 EB00 jmp .cfm_commonstack 911 912 .cfm_commonstack: 913 ; _386_o32 914 ; mov word [reg_esp], bx 915 0 00005964 16 push ss 0 00005965 07 pop es 918 0 00005966 96 xchg ax, si 0 00005967 B03D mov al, '=' 0 00005969 AA stosb 0 0000596A 96 xchg ax, si 0 0000596B 95 xchg ax, bp 0 0000596C E8[0000] nearcall hexword 0 0000596F 95 xchg ax, bp 0 00005970 96 xchg ax, si 0 00005971 B03A mov al, ':' 0 00005973 AA stosb 0 00005974 96 xchg ax, si 930 0 00005975 F606[0000]10 test byte [presizeflags], PRE32D 0 0000597A 7405 jz @F 0 0000597C 92 xchg ax, dx 0 0000597D E8[0000] nearcall hexword 0 00005980 92 xchg ax, dx 936 @@: 0 00005981 E8[0000] nearcall hexword 938 0 00005984 96 xchg ax, si 0 00005985 B040 mov al, '@' 0 00005987 AA stosb 0 00005988 96 xchg ax, si 943 0 00005989 93 xchg ax, bx 0 0000598A E8[0000] nearcall hexword 0 0000598D 93 xchg ax, bx 947 0 0000598E 58 pop ax 0 0000598F 59 pop cx 0 00005990 5A pop dx 0 00005991 F606[4A00]80 testopt [ia_exec], 80h 0 00005996 7406 jz .cfm_retn 0 00005998 C706[4400][7202] mov word [immasm_callback], immasm_run_far 954 .cfm_retn: 0 0000599E C3 retn 956 957 .cni: 0 0000599F 8B16[2E00] mov dx, [immasm_rel1632_target + 2] 0 000059A3 A1[2C00] mov ax, [immasm_rel1632_target] 0 000059A6 8B0E[0000] mov cx, word [reg_cs] 0 000059AA F606[0000]10 test byte [presizeflags], PRE32D 0 000059AF 7407 jz @F 0 000059B1 92 xchg ax, dx 0 000059B2 E8[0000] nearcall hexword 0 000059B5 92 xchg ax, dx 0 000059B6 EB02 jmp @FF 967 @@: 0 000059B8 31D2 xor dx, dx 969 @@: 0 000059BA E8[0000] nearcall hexword 0 000059BD E906FF jmp .cni_common 972 973 .cfi: 0 000059C0 E80300 call .jfi 0 000059C3 E95DFF jmp .cfi_common 976 977 .jfi: 0 000059C6 8B16[3200] mov dx, [immasm_far_target + 2] 0 000059CA A1[3000] mov ax, [immasm_far_target] 0 000059CD 8B0E[3400] mov cx, word [immasm_far_target + 4] 981 0 000059D1 50 push ax 0 000059D2 89C8 mov ax, cx 0 000059D4 E8[0000] nearcall hexword 0 000059D7 B03A mov al, ':' 0 000059D9 AA stosb 0 000059DA 58 pop ax 0 000059DB F606[0000]10 test byte [presizeflags], PRE32D 0 000059E0 7407 jz @F 0 000059E2 92 xchg ax, dx 0 000059E3 E8[0000] nearcall hexword 0 000059E6 92 xchg ax, dx 0 000059E7 EB02 jmp @FF 994 @@: 0 000059E9 31D2 xor dx, dx 996 @@: 0 000059EB E8[0000] nearcall hexword 998 _386_PM_o32 0 000059EE 8B1E[0000] mov bx, word [reg_esp] 0 000059F2 C3 retn 1001 1002 1003 .rn: 0 000059F3 8B0E[0000] mov cx, word [reg_cs] 0 000059F7 8B1E[0000] mov bx, word [reg_ss] 0 000059FB 8EC3 mov es, bx 1007 %if _PM 1008 nearcall test_d_b_bit 1009 _386_o32 1010 mov bx, word [reg_esp] 1011 jz .rn_16bitstack 1012 subcpu 386 1013 mov ax, word [es:ebx] 1014 add ebx, 2 1015 xor dx, dx 1016 test byte [presizeflags], PRE32D 1017 jz @F 1018 mov dx, word [es:ebx] 1019 add ebx, 2 1020 @@: 1021 jmp .rn_commonstack 1022 subcpureset 1023 1024 .rn_16bitstack: 1025 %else 0 000059FD 8B1E[0000] mov bx, word [reg_esp] 1027 %endif 0 00005A01 268B07 mov ax, word [es:bx] 0 00005A04 83C302 add bx, 2 0 00005A07 31D2 xor dx, dx 0 00005A09 F606[0000]10 test byte [presizeflags], PRE32D 0 00005A0E 7406 jz @F 0 00005A10 268B17 mov dx, word [es:bx] 0 00005A13 83C302 add bx, 2 1035 @@: 0 00005A16 EB00 jmp .rn_commonstack 1037 1038 .rn_commonstack: 1039 ; _386_o32 1040 ; mov word [reg_esp], bx 1041 0 00005A18 16 push ss 0 00005A19 07 pop es 1044 0 00005A1A 96 xchg ax, si 0 00005A1B B03D mov al, '=' 0 00005A1D AA stosb 0 00005A1E 96 xchg ax, si 0 00005A1F F606[0000]10 test byte [presizeflags], PRE32D 0 00005A24 7405 jz @F 0 00005A26 92 xchg ax, dx 0 00005A27 E8[0000] nearcall hexword 0 00005A2A 92 xchg ax, dx 1054 @@: 0 00005A2B E8[0000] nearcall hexword 1056 0 00005A2E 96 xchg ax, si 0 00005A2F B040 mov al, '@' 0 00005A31 AA stosb 0 00005A32 96 xchg ax, si 1061 0 00005A33 93 xchg ax, bx 0 00005A34 E8[0000] nearcall hexword 0 00005A37 93 xchg ax, bx 1065 0 00005A38 C3 retn 1067 1068 1069 .rni: 0 00005A39 E8B7FF call .rn 1071 .rfi_common: 1072 %if _PM 1073 push bx 1074 mov bx, word [reg_ss] 1075 nearcall test_d_b_bit 1076 pop bx 1077 jz .rni_16 1078 _386_o32 1079 %endif 1080 .rni_16: 0 00005A3C 031E[3600] add bx, word [immasm_imm16] 1082 ; _386_o32 1083 ; mov word [reg_esp], bx 0 00005A40 50 push ax 0 00005A41 B02C mov al, ',' 0 00005A43 AA stosb 0 00005A44 58 pop ax 0 00005A45 93 xchg ax, bx 0 00005A46 E8[0000] nearcall hexword 0 00005A49 93 xchg ax, bx 0 00005A4A C3 retn 1092 1093 .rf: 0 00005A4B 8B1E[0000] mov bx, word [reg_ss] 0 00005A4F 8EC3 mov es, bx 1096 %if _PM 1097 nearcall test_d_b_bit 1098 _386_o32 1099 mov bx, word [reg_esp] 1100 jz .rf_16bitstack 1101 subcpu 386 1102 mov ax, word [es:ebx] 1103 add ebx, 2 1104 xor dx, dx 1105 test byte [presizeflags], PRE32D 1106 jz @F 1107 mov dx, word [es:ebx] 1108 add ebx, 2 1109 @@: 1110 mov cx, word [es:ebx] 1111 add ebx, 2 1112 test byte [presizeflags], PRE32D 1113 jz @F 1114 add ebx, 2 1115 @@: 1116 jmp .rf_commonstack 1117 subcpureset 1118 1119 .rf_16bitstack: 1120 %else 0 00005A51 8B1E[0000] mov bx, word [reg_esp] 1122 %endif 0 00005A55 268B07 mov ax, word [es:bx] 0 00005A58 83C302 add bx, 2 0 00005A5B 31D2 xor dx, dx 0 00005A5D F606[0000]10 test byte [presizeflags], PRE32D 0 00005A62 7406 jz @F 0 00005A64 268B17 mov dx, word [es:bx] 0 00005A67 83C302 add bx, 2 1130 @@: 0 00005A6A 268B0F mov cx, word [es:bx] 0 00005A6D 83C302 add bx, 2 0 00005A70 F606[0000]10 test byte [presizeflags], PRE32D 0 00005A75 7403 jz @F 0 00005A77 83C302 add bx, 2 1136 @@: 0 00005A7A EB00 jmp .rf_commonstack 1138 1139 .rf_commonstack: 1140 ; _386_o32 1141 ; mov word [reg_esp], bx 1142 0 00005A7C 16 push ss 0 00005A7D 07 pop es 1145 0 00005A7E 96 xchg ax, si 0 00005A7F B03D mov al, '=' 0 00005A81 AA stosb 0 00005A82 96 xchg ax, si 0 00005A83 91 xchg ax, cx 0 00005A84 E8[0000] nearcall hexword 0 00005A87 91 xchg ax, cx 0 00005A88 96 xchg ax, si 0 00005A89 B03A mov al, ':' 0 00005A8B AA stosb 0 00005A8C 96 xchg ax, si 0 00005A8D F606[0000]10 test byte [presizeflags], PRE32D 0 00005A92 7405 jz @F 0 00005A94 92 xchg ax, dx 0 00005A95 E8[0000] nearcall hexword 0 00005A98 92 xchg ax, dx 1162 @@: 0 00005A99 E8[0000] nearcall hexword 1164 0 00005A9C 96 xchg ax, si 0 00005A9D B040 mov al, '@' 0 00005A9F AA stosb 0 00005AA0 96 xchg ax, si 1169 0 00005AA1 93 xchg ax, bx 0 00005AA2 E8[0000] nearcall hexword 0 00005AA5 93 xchg ax, bx 1173 0 00005AA6 C3 retn 1175 1176 .rfi: 0 00005AA7 E8A1FF call .rf 0 00005AAA EB90 jmp .rfi_common 1179 1180 1181 .ir: 0 00005AAC E89CFF call .rf 0 00005AAF 50 push ax 0 00005AB0 53 push bx 0 00005AB1 8B1E[0000] mov bx, word [reg_ss] 0 00005AB5 8EC3 mov es, bx 1187 %if _PM 1188 nearcall test_d_b_bit 1189 pop bx 1190 jz .ir_16bitstack 1191 subcpu 386 1192 mov ax, word [es:ebx] 1193 mov word [immasm_efl], ax 1194 add ebx, 2 1195 test byte [presizeflags], PRE32D 1196 jz @F 1197 mov ax, word [es:ebx] 1198 mov word [immasm_efl + 2], ax 1199 add ebx, 2 1200 @@: 1201 jmp .ir_commonstack 1202 subcpureset 1203 1204 .ir_16bitstack: 1205 %else 0 00005AB7 5B pop bx 1207 %endif 0 00005AB8 268B07 mov ax, word [es:bx] 0 00005ABB A3[3A00] mov word [immasm_efl], ax 0 00005ABE 83C302 add bx, 2 0 00005AC1 F606[0000]10 test byte [presizeflags], PRE32D 0 00005AC6 7409 jz @F 0 00005AC8 268B07 mov ax, word [es:bx] 0 00005ACB A3[3C00] mov word [immasm_efl + 2], ax 0 00005ACE 83C302 add bx, 2 1216 @@: 0 00005AD1 EB00 jmp .ir_commonstack 1218 1219 .ir_commonstack: 1220 ; _386_o32 1221 ; mov word [reg_esp], bx 1222 0 00005AD3 16 push ss 0 00005AD4 07 pop es 1225 0 00005AD5 B05E mov al, '^' 0 00005AD7 AA stosb 0 00005AD8 F606[0000]10 test byte [presizeflags], PRE32D 0 00005ADD 7409 jz @F 0 00005ADF A1[3C00] mov ax, word [immasm_efl + 2] 0 00005AE2 E8[0000] nearcall hexword 0 00005AE5 B05F mov al, '_' 0 00005AE7 AA stosb 1234 @@: 0 00005AE8 A1[3A00] mov ax, word [immasm_efl] 0 00005AEB E8[0000] nearcall hexword 1237 0 00005AEE B02C mov al, ',' 0 00005AF0 AA stosb 0 00005AF1 58 pop ax 0 00005AF2 93 xchg ax, bx 0 00005AF3 E8[0000] nearcall hexword 0 00005AF6 93 xchg ax, bx 0 00005AF7 C3 retn 1245 1246 1247 .movto: 0 00005AF8 A0[0000] mov al, byte [regmem] 0 00005AFB 2438 and al, 00_111_000b 0 00005AFD B103 mov cl, 3 0 00005AFF D2E8 shr al, cl 0 00005B01 3C03 cmp al, 3 ; to ds ? 0 00005B03 7556 jne .notspecial 1254 0 00005B05 A0[0000] mov al, byte [regmem] 0 00005B08 3CC0 cmp al, 1100_0000b 0 00005B0A 7216 jb .movto_mem 1258 .movto_reg: 0 00005B0C 83E007 and ax, 7 0 00005B0F 89C3 mov bx, ax 0 00005B11 01DB add bx, bx 0 00005B13 8B9F[0000] mov bx, word [reg32addr + bx] 0 00005B17 8B07 mov ax, [bx] 1264 .movto_common: 0 00005B19 A3[3E00] mov word [immasm_ds], ax 0 00005B1C E875FC nearcall ia_restore_ds 0 00005B1F E93801 jmp .noop 1268 1269 .movto_mem: 0 00005B22 F606[0000]04 testopt [disflags], DIS_I_SHOW 0 00005B27 7503E9[0000] jz error_mirror 1272 0 00005B2C A0[0000] mov al, [segmnt] ; segment number 0 00005B2F 98 cbw 0 00005B30 D1E0 shl ax, 1 0 00005B32 93 xchg ax, bx ; mov bx, ax 0 00005B33 8B9F[0000] mov bx, [segrgaddr + bx]; get address of value 0 00005B37 8E07 mov es, [bx] 1279 0 00005B39 66 _386_o32 0 00005B3A 8B1E[0000] mov bx, word [addrr] 0 00005B3E F606[0100]08 testopt [disflags], DIS_I_SHOW_A32 0 00005B43 740B jz @F 0 00005B45 26678A6301 _386 mov ah, [es:ebx + 1] 0 00005B4A 26678A03 _386 mov al, [es:ebx] 0 00005B4E EB07 _386 jmp @FF 1287 1288 @@: 0 00005B50 268A6701 mov ah, [es:bx + 1] 0 00005B54 268A07 mov al, [es:bx] 1291 @@: 0 00005B57 16 push ss 0 00005B58 07 pop es 0 00005B59 EBBE jmp .movto_common 1295 1296 .notspecial: 0 00005B5B 58 pop ax 0 00005B5C E92CFB jmp ..@immasm_not_special 1299 1300 1301 .movfrom: 0 00005B5F A0[0000] mov al, byte [regmem] 0 00005B62 2438 and al, 00_111_000b 0 00005B64 B103 mov cl, 3 0 00005B66 D2E8 shr al, cl 0 00005B68 3C03 cmp al, 3 ; to ds ? 0 00005B6A 740A je .movfrom_ds 0 00005B6C 3C01 cmp al, 1 0 00005B6E 75EB jne .notspecial 1310 .movfrom_cs: 0 00005B70 8B0E[0000] mov cx, word [reg_cs] 0 00005B74 EB04 jmp @F 1313 1314 .movfrom_ds: 0 00005B76 8B0E[4000] mov cx, word [immasm_save_ds] 1316 @@: 0 00005B7A 890E[4200] mov word [immasm_temp], cx 0 00005B7E C706[4400][A806] mov word [immasm_callback], .movfrom_callback 0 00005B84 E9D300 jmp .noop 1320 1321 .movfrom_callback: 0 00005B87 A0[0000] mov al, byte [regmem] 0 00005B8A 3CC0 cmp al, 1100_0000b 0 00005B8C 721C jb .movfrom_mem 1325 .movfrom_reg: 0 00005B8E 83E007 and ax, 7 0 00005B91 89C3 mov bx, ax 0 00005B93 01DB add bx, bx 0 00005B95 8B9F[0000] mov bx, word [reg32addr + bx] 0 00005B99 A1[4200] mov ax, word [immasm_temp] 0 00005B9C 8907 mov [bx], ax 0 00005B9E F606[0000]10 test byte [presizeflags], PRE32D 0 00005BA3 7404 jz @F 0 00005BA5 83670200 and word [bx + 2], 0 1335 @@: 0 00005BA9 C3 retn 1337 1338 .movfrom_mem: 0 00005BAA F606[0000]04 testopt [disflags], DIS_I_SHOW 0 00005BAF 7503E9[0000] jz error_mirror 1341 0 00005BB4 A0[0000] mov al, [segmnt] ; segment number 0 00005BB7 98 cbw 0 00005BB8 D1E0 shl ax, 1 0 00005BBA 93 xchg ax, bx ; mov bx, ax 0 00005BBB 8B9F[0000] mov bx, [segrgaddr + bx]; get address of value 0 00005BBF 8E07 mov es, [bx] 1348 0 00005BC1 66 _386_o32 0 00005BC2 8B1E[0000] mov bx, word [addrr] 0 00005BC6 A1[4200] mov ax, word [immasm_temp] 0 00005BC9 F606[0100]08 testopt [disflags], DIS_I_SHOW_A32 0 00005BCE 740B jz @F 0 00005BD0 2667886301 _386 mov [es:ebx + 1], ah 0 00005BD5 26678803 _386 mov [es:ebx], al 0 00005BD9 EB07 _386 jmp @FF 1357 1358 @@: 0 00005BDB 26886701 mov [es:bx + 1], ah 0 00005BDF 268807 mov [es:bx], al 1361 @@: 0 00005BE2 16 push ss 0 00005BE3 07 pop es 0 00005BE4 C3 retn 1365 1366 1367 .pushcs: 0 00005BE5 A1[0000] mov ax, word [reg_cs] 1369 .push_common: 0 00005BE8 8B1E[0000] mov bx, word [reg_ss] 0 00005BEC 8EC3 mov es, bx 1372 %if _PM 1373 nearcall test_d_b_bit 1374 _386_o32 1375 mov bx, word [reg_esp] 1376 jz .push_16bitstack 1377 subcpu 386 1378 test byte [presizeflags], PRE32D 1379 jz @F 1380 sub ebx, 2 1381 and word [es:ebx], 0 1382 1383 @@: 1384 sub ebx, 2 1385 mov word [es:ebx], ax 1386 jmp .push_commonstack 1387 subcpureset 1388 1389 .push_16bitstack: 1390 %else 0 00005BEE 8B1E[0000] mov bx, word [reg_esp] 1392 %endif 0 00005BF2 F606[0000]10 test byte [presizeflags], PRE32D 0 00005BF7 7407 jz @F 0 00005BF9 83EB02 sub bx, 2 0 00005BFC 26832700 and word [es:bx], 0 1397 1398 @@: 0 00005C00 83EB02 sub bx, 2 0 00005C03 268907 mov word [es:bx], ax 0 00005C06 EB00 jmp .push_commonstack 1402 1403 .push_commonstack: 1404 ; _386_o32 1405 ; mov word [reg_esp], bx 1406 0 00005C08 16 push ss 0 00005C09 07 pop es 0 00005C0A EB52 jmp .noop_except_esp 1410 1411 1412 .pushds: 0 00005C0C A1[4000] mov ax, word [immasm_save_ds] 0 00005C0F EBD7 jmp .push_common 1415 1416 1417 .popds: 0 00005C11 E880FB nearcall ia_restore_ds 0 00005C14 E944FF jmp .notspecial 1420 1421 .lds: 0 00005C17 833E[4200]00 cmp word [immasm_temp], 0 0 00005C1C 7503E93AFF je .notspecial 1424 0 00005C21 E870FB nearcall ia_restore_ds 0 00005C24 C606[0000]00 mov byte [segmnt], 0 0 00005C29 A1[0000] mov ax, word [reg_es] 0 00005C2C A3[4000] mov word [immasm_save_es], ax 0 00005C2F C706[4600][BD02] mov word [ ia_restore ], ia_restore_es 0 00005C35 A1[0000] mov ax, word [reg_cs] 0 00005C38 A3[0000] mov word [reg_es], ax 0 00005C3B E823FB call getimmselseg 0 00005C3E 8EC3 mov es, bx 0 00005C40 57 push di 0 00005C41 31FF xor di, di 0 00005C43 B03E mov al, 3Eh 0 00005C45 B92000 mov cx, immasm_length 0 00005C48 F2AE repne scasb 0 00005C4A 7403E9[0000] jne error_mirror 1440 %if _PM 1441 nearcall verifysegm_or_error 1442 mov es, bx 1443 %endif 0 00005C4F 26C645FF26 mov byte [es:di - 1], 26h 0 00005C54 5F pop di 0 00005C55 16 push ss 0 00005C56 07 pop es 0 00005C57 E901FF jmp .notspecial 1449 1450 1451 .noop: 1452 _386_PM_o32 0 00005C5A 8B1E[0000] mov bx, word [reg_esp] 1454 .noop_except_esp: 0 00005C5E 8B0E[0000] mov cx, word [reg_cs] 0 00005C62 8B16[0200] mov dx, word [reg_eip + 2] 0 00005C66 A1[0000] mov ax, word [reg_eip] 0 00005C69 C3 retn 1459 %endif === Trace listing source: ../lst/debug.obj/init.lst 1 2 %if 0 3 4 lDebug initialisation 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 "init.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 0000614A ???????? eldhSignature: resb 4 ; "ELD1" 0 0000614E ?????? resb 3 ; reserved 0 00006151 ?? resb 1 ; 26 (Ctrl-Z) 0 00006152 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00006156 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00006158 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 0000615A ???????? eldhDataOffset: resd 1 0 0000615E ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00006160 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00006162 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00006164 ???????? eldhReserved: resb 4 ; reserved 0 00006168 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 0000616A ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 0000616E ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00006172 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00006176 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 0000614A ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00006152 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00006156 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00006158 ???? 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 0 0000614A ???? 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 0 0000614C ???? eldltAmount: resw 1 0 0000614E ???????? 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 0 0000614A ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 0000614C ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 0000614E ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00006150 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00006152 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 0000615A ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 0000614A ???? eldlSignature: resw 1 ; 0E1D1h 0 0000614C ???????? eldlReserved: resw 2 0 00006150 ???? eldlUseLinkHash: resw 1 0 00006152 ???? eldlDataAmount: resw 1 0 00006154 ???? eldlDataPrefixes: resw 1 0 00006156 ???? eldlDataEntries: resw 1 0 00006158 ???? eldlDataAddresses: resw 1 0 0000615A ???? eldlCodeAmount: resw 1 0 0000615C ???? eldlCodePrefixes: resw 1 0 0000615E ???? eldlCodeEntries: resw 1 0 00006160 ???? 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 0 0000614A ???? ifKeyword: resw 1 0 0000614C ???? ifDescription: resw 1 0 0000614E ???? ifOptions: resw 1 0 00006150 ???? ifValue: resw 1 0 00006152 ???? ifTrying: resw 1 0 00006154 ???? 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 0 0000614A ???????? saOffset: resd 1 0 0000614E ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 0000614A ???? so16aOffset: resw 1 0 0000614C ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 0000614A ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 0000614A ?????? bsJump: resb 3 0 0000614D ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 0000614A ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 0000614C ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 0000614D ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 0000614F ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00006150 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 00006152 ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 00006154 ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 00006155 ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00006157 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00006159 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 0000615B ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 0000615F ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 00006163 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00006167 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00006169 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 0000616B ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 0000616F ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 00006171 ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 0000614A ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 0000614B ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 0000614C ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 0000614D ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 0000615C ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 0000614A ???????????????? deName: resb 8 0 00006152 ?????? deExt: resb 3 0 00006155 ?? deAttrib: resb 1 0 00006156 ?? dePlusSize: resb 1 0 00006157 ?????????????? resb 7 0 0000615E ???? deClusterHigh: resw 1 0 00006160 ???? deTime: resw 1 0 00006162 ???? deDate: resw 1 0 00006164 ???? deClusterLow: resw 1 0 00006166 ???????? 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 0 10000613A ???????? lsvFirstCluster: resd 1 0 10000613E ???????? lsvFATSector: resd 1 0 100006142 ???? lsvFATSeg: resw 1 0 100006144 ???? lsvLoadSeg: resw 1 0 100006146 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 10000612A ???? ldMemoryTop: resw 1 0 10000612C ???? ldLoadTop: resw 1 0 10000612E ???? ldSectorSeg: resw 1 0 100006130 ?? ldFATType: resb 1 92 <2> ldFlags: 0 100006131 ?? ldHasLBA: resb 1 0 100006132 ???? ldClusterSize: resw 1 0 100006134 ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100006136 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100006138 ?? .partition: resb 1 ; byte 0 100006139 ?? .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 <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 0 10000611A ???????? ldRootSector: resd 1 0 10000611E ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 100006120 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 100006122 ???? ldParasLeft: resw 1 0 100006124 ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 10000610A ???????? ldMaxCluster: resd 1 0 10000610E ???????? ldFileSize: resd 1 0 100006112 ???????? ldCurrentCluster: resd 1 0 100006116 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 0000614A ???????? liiSignature: resb 4 ; "NLDR" 0 0000614E ???? liiVersion: resb 2 ; "00" 0 00006150 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 00006152 ???? liiAmountParagraphs: resw 1 0 00006154 ???????????? liiReserved: resw 3 0 0000615A ???? 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 0 0000615C ???? 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 0 0000615E ???? 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 0 00006160 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 0000614A ???? lpSize: resw 1 0 0000614C ???? lpCount: resw 1 0 0000614E ???????? lpBuffer: resd 1 0 00006152 ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 0000614A ?? piBoot: resb 1 0 0000614B ?????? piStartCHS: resb 3 0 0000614E ?? piType: resb 1 0 0000614F ?????? piEndCHS: resb 3 0 00006152 ???????? piStart: resd 1 0 00006156 ???????? 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 0 0000614A ???? lsKernelName: resw 1 ; -> kernel file default name 0 0000614C ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 0000614E ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00006150 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 00006152 ???? lsOptions: resw 1 ; option flags 0 00006154 ???? lsSegment: resw 1 ; => where to load file 0 00006156 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 0000615A ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 0000615E ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00006160 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 00006162 ???????????????? 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 0 0000614A ???? exact_struc_at 00h, exeSignature: resw 1 0 0000614C ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 0000614E ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00006150 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 00006152 ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 00006154 ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00006156 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00006158 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 0000615A ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 0000615C ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 0000615E ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00006160 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 00006162 ???? 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. 0 00006164 ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 0000614A ???? ifhHandle: resw 1 0 0000614C ???? ifhFlags: resw 1 0 0000614E ???????? 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 <1> areastrucEntry: resb 24 0 00006162 ???????? areastrucNext: resd 1 0 00006166 ???????? areastrucPrev: resd 1 0 0000616A ???? areastrucSubAmount: resw 1 0 0000616C ???? areastrucSubOffset: resw 1 0 0000616E ???? areastrucFunAmount: resw 1 0 00006170 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 0000614A ???????? areastrucsubLinear: resd 1 0 0000614E ???????? areastrucsubLinearEnd: resd 1 0 00006152 ???? areastrucsubListOffset: resw 1 0 00006154 ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 0000614A ???????? areastrucfunLinear: resd 1 0 0000614E ???????? areastrucfunLinearEnd: resd 1 0 00006152 ???? areastrucfunListOffset: resw 1 0 00006154 ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 0000614A ???? areastart: resw 1 0 0000614C ???? areaend: resw 1 0 0000614E ???? areamessage: resw 1 0 00006150 ???? 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 0 0000614A ???? 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.) 0 0000614C ???? ivFlags: resw 1 0 0000614E ???? 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. 0 00006150 ???? 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 0 00006152 ?? 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. 0 00006153 ?? 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 0 0000614A ???????? mrLinear: resd 1 0 0000614E ???????? mrOffset: resd 1 0 00006152 ???? mrSegmentSelector: resw 1 0 00006154 ???? mrFlags: resw 1 0 00006156 ???????? 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 0 0000614A ???????? .size_: resd 1 0 0000614E ???? .srchdl: resw 1 0 00006150 ???????? .srcadr: resd 1 0 00006154 ???? .dsthdl: resw 1 0 00006156 ???????? .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 %endif 21 22 %if _LINK_COMPAT 23 %define FORCEWORD word 24 %define FORCESTRICTWORD strict word 25 %else 26 %define FORCEWORD 27 %define FORCESTRICTWORD 28 %endif 29 30 31 %if _LINK 32 33 %if !(_ONLY386 || _ONLYNON386) || _DUALCODE && _PM 34 wllist G_GINITGROUP_SINIT 35 %endif 36 37 %ifn _ONLY386 || _ONLYNON386 38 wllist N_SINIT_Lpatch_386_table 39 wllist N_SINIT_Lpatch_no386_table 40 %if _DUALCODE 41 wllist N_SINIT_Lpatch_386_table2 42 wllist N_SINIT_Lpatch_no386_table2 43 %endif 44 wllist N_SINIT_Lpatch_386_tableentry 45 wllist N_SINIT_Lpatch_no386_tableentry 46 %endif 47 48 %if _DUALCODE && ! _PM 49 wllist N_SINIT_Lrelocate_from_code 50 wllist N_SINIT_Lrelocate_from_code2 51 52 extern relocate_from_code 53 extern relocate_from_code.end 54 extern relocate_from_code2 55 extern relocate_from_code2.end 56 %endif 57 58 %endif 59 usesection INIT === Switch to base=01D8E0h -> "INIT" 59 ------------------ note: usesection INIT 60 61 %ifn _LINK 62 CODETARGET1_equate equ CODETARGET1 63 CODETARGET2_equate equ CODETARGET2 64 AUXTARGET1_equate equ AUXTARGET1 65 AUXTARGET2_equate equ AUXTARGET2 66 BOOTCODETARGET1_equate equ BOOTCODETARGET1 67 BOOTCODETARGET2_equate equ BOOTCODETARGET2 68 BOOTAUXTARGET1_equate equ BOOTAUXTARGET1 69 BOOTAUXTARGET2_equate equ BOOTAUXTARGET2 70 ldebug_codes_size_equate equ ldebug_code_size + ldebug_code2_size 71 ldebug_codes_truncated_size_equate equ ldebug_code_bootldr_truncated_size + ldebug_code2_size 72 auxbuff_size_equate equ auxbuff_size 73 initsectionoffset_p_equate equ paras(INITSECTIONOFFSET) 74 %endif 75 76 initcode: 77 %if ($ - $$) != 0 78 %fatal initcode expected at start of section 79 %endif 80 %ifn _APPLICATION 81 push cs 82 pop ds 83 mov dx, imsg.not_an_application 84 mov ah, 09h 85 int 21h 86 mov ax, 4CFFh 87 int 21h 88 89 ; magic sequence for tellsize 90 %if _LINK 91 mov bx, 1 92 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 93 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 94 wlcalc word_segrel_INIT, equ $ - 2 95 %else 96 mov bx, paras(INITSECTIONOFFSET + init_size + deviceshim_size + 16) 97 %endif 98 mov ah, 4Ah 99 int 21h 100 ; end of magic sequence for tellsize 101 102 ; The +16 is to avoid entering a zero value 103 ; for exeMinAlloc and exeMaxAlloc, which 104 ; seems to be handled in a special way by 105 ; DOS. (This special handling occurs for 106 ; the uncompressed bootable build, eg 107 ; ldebugu.com, and the nonbootable MZ shim 108 ; build, eg debug.com.) 109 %endif 110 111 %if _APPLICATION 0 00000000 8CD0 mov ax, ss 0 00000002 8CDA mov dx, ds 0 00000004 29D0 sub ax, dx 115 0 00000006 50 push ax ; (if sp was zero) 117 0 00000007 89E2 mov dx, sp 0 00000009 B103 mov cl, 3 0 0000000B 83C20F add dx, 15 0 0000000E D1DA rcr dx, 1 0 00000010 D3EA shr dx, cl 0 00000012 01D0 add ax, dx 124 125 %ifn _LINK 126 cmp ax, strict word paras(APPINITSTACK_END) 127 %else 128 129 %if 0 130 %define APPINITTARGET (INITSECTIONOFFSET + datastack_size + ext_data_nonboot_add_size + auxbuff_size + auxbuff_init_size + historysegment_size + app_env_size + extsegment_size) 137 ; The early stack goes behind the init target. 138 %define APPINITSTACK_START (APPINITTARGET+init_size) 139 APPINITSTACK_SIZE equ 512 ; must be even 140 ; This is the size of the application mode 141 ; process memory block required while still 142 ; using the init stack behind init target. 143 %define APPINITSTACK_END (APPINITSTACK_START+APPINITSTACK_SIZE) 144 %endif 145 0 00000014 3D[A118] cmp ax, strict word relocatedzero + paras( 0FFF0h + auxbuff_size + auxbuff_init_size + historysegment_size + app_env_size + extsegment_size + APPINITSTACK_SIZE) 153 wlcalc word_segrel_INIT, equ $ - 2 154 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 155 %endif 0 00000017 7314 jae .stackdownfirst 157 .memupfirst: 158 ; magic sequence for tellsize 159 %ifn _LINK 160 mov bx, paras(APPINITSTACK_END) 161 %else 0 00000019 BB[A118] mov bx, relocatedzero + paras( 0FFF0h + auxbuff_size + auxbuff_init_size + historysegment_size + app_env_size + extsegment_size + APPINITSTACK_SIZE) 169 wlcalc word_segrel_INIT, equ $ - 2 170 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 171 %endif 0 0000001C B44A mov ah, 4Ah 0 0000001E CD21 int 21h 174 ; end of magic sequence for tellsize 0 00000020 730B jnc @F 176 .memfail: 0 00000022 BA[360F] mov dx, imsg.early_mem_fail 178 .earlyfail: 0 00000025 E8591A call init_putsz_cs 0 00000028 B8FF4C mov ax, 4CFFh 0 0000002B CD21 int 21h 182 183 @@: 184 .stackdownfirst: 0 0000002D 8CD8 mov ax, ds 186 %ifn _LINK 187 add ax, paras(APPINITSTACK_START) 188 %else 0 0000002F 05[8118] add ax, strict word relocatedzero + paras( 0FFF0h + auxbuff_size + auxbuff_init_size + historysegment_size + app_env_size + extsegment_size) 195 wlcalc word_segrel_INIT, equ $ - 2 196 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 197 %endif 0 00000032 FA cli 0 00000033 8ED0 mov ss, ax 0 00000035 BC0002 mov sp, APPINITSTACK_SIZE 0 00000038 FB sti 202 203 ; if jumped to .stackdownfirst: now, shrink our memory block 204 ; else: no-op (already grew or shrunk block) 205 %ifn _LINK 206 mov bx, paras(APPINITSTACK_END) 207 %else 0 00000039 BB[A118] mov bx, relocatedzero + paras( 0FFF0h + auxbuff_size + auxbuff_init_size + historysegment_size + app_env_size + extsegment_size + APPINITSTACK_SIZE) 215 wlcalc word_segrel_INIT, equ $ - 2 216 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 217 %endif 0 0000003C B44A mov ah, 4Ah 0 0000003E CD21 int 21h 0 00000040 72E0 jc .memfail 221 222 0 00000042 8CD8 mov ax, ds 224 %ifn _LINK 225 add ax, paras(INITSECTIONOFFSET) 226 %else 0 00000044 05[0000] add ax, strict word relocatedzero + 0 228 wlcalc word_segrel_INIT, equ $ - 2 229 %endif 0 00000047 8CDA mov dx, ds 231 %ifn _LINK 232 add dx, paras(APPINITTARGET) 233 mov cx, init_size_p 234 call init_movp 235 init_size_p_equate equ init_size_p 236 appinittarget_p_equate equ paras(APPINITTARGET) 237 %if initsectionoffset_p_equate + init_size_p_equate > appinittarget_p_equate 238 %error Overlap detected 239 %endif 240 %else 0 00000049 81C2[8118] add dx, strict word relocatedzero + paras( 0FFF0h + auxbuff_size + auxbuff_init_size + historysegment_size + app_env_size + extsegment_size) 247 wlcalc word_segrel_INIT, equ $ - 2 0 0000004D B9[0000] mov cx, relocatedzero + 0 249 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 0 00000050 E89D19 call init_movp 251 %endif 252 0 00000053 52 push dx 0 00000054 E8A001 call init_retf 255 256 %ifn _LINK 257 %if _APP_ENV_SIZE 258 mov word [cs:memsize], paras(CODETARGET2 + ldebug_code_bootldr_truncated_size + ldebug_code2_size + historysegment_size + app_env_size + extsegment_size) 264 %endif 265 266 mov bx, ds 267 mov dx, bx 268 add bx, paras(AUXTARGET1) 269 add dx, paras(CODETARGET1) 270 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _APP_ENV_SIZE 271 mov ax, bx 272 add ax, paras(auxbuff_size) 273 %if AUXTARGET1_equate <= CODETARGET1_equate 274 %assign nn AUXTARGET1_equate 275 %assign mm CODETARGET1_equate 276 %error Unexpected layout aux = nn code = mm 277 %endif 278 %endif 279 mov cx, dx 280 mov word [cs:init_layout], init_app_layout_1 281 call init_check_auxbuff 282 jz @F 283 284 mov bx, ds 285 mov dx, bx 286 add bx, paras(AUXTARGET2) 287 add dx, paras(CODETARGET2) 288 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _APP_ENV_SIZE 289 %if (paras(AUXTARGET1_equate) + paras(auxbuff_size_equate)) != (paras(CODETARGET2_equate) + paras(ldebug_codes_truncated_size_equate)) 291 ldebug_code2_size_equate equ ldebug_code2_size 292 ldebug_code_size_equate equ ldebug_code_size 293 ldebug_code_bootldr_truncated_size_equate equ ldebug_code_bootldr_truncated_size 294 %assign vv (paras(ldebug_code2_size_equate)) 295 %assign uu (paras(ldebug_code_size_equate)) 296 %assign tt (paras(ldebug_code_bootldr_truncated_size_equate)) 297 %assign sss (paras(CODETARGET1_equate)) 298 %assign rr (paras(AUXTARGET1_equate)) 299 %assign qq (paras(CODETARGET2_equate)) 300 %assign pp (paras(auxbuff_size_equate)) 301 %assign oo (paras(ldebug_codes_truncated_size_equate)) 302 %assign nn (paras(AUXTARGET1_equate) + paras(auxbuff_size_equate)) 303 %assign mm (paras(CODETARGET2_equate) + paras(ldebug_codes_truncated_size_equate)) 304 %error Unexpected layout aux1+auxb != code2+trunc 305 %error code2+trunc = mm aux1+auxb = nn trunc = oo auxb = pp code2 = qq aux1 = rr 306 %error code1 = sss codeseg1trunc = tt codeseg1 = uu codeseg2 = vv 307 %endif 308 %endif 309 310 %else ; _LINK 311 %if _APP_ENV_SIZE 312 %if 0 313 %define CODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_truncated_size + datastack_size) 314 %define CODETARGET2 (CODETARGET1+auxbuff_size) 315 %define AUXTARGET1 (CODETARGET1+ldebug_code_bootldr_truncated_size+ldebug_code2_size) 316 %define AUXTARGET2 CODETARGET1 317 %define AUXTARGET3 (AUXTARGET1+auxbuff_size) 318 %endif 0 00000057 2EC706[E60D][8106] mov word [cs:memsize], relocatedzero + paras(auxbuff_size + historysegment_size + app_env_size + extsegment_size) 323 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 324 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 325 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 326 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 327 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 328 %endif 329 0 0000005E 8CDB mov bx, ds 0 00000060 89DA mov dx, bx 332 ; add bx, paras(AUXTARGET1) 0 00000062 81C3[0000] add bx, strict word relocatedzero + 0 334 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 335 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 336 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 337 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 338 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 339 ; add dx, paras(CODETARGET1) 0 00000066 81C2[0000] add dx, strict word relocatedzero + 0 341 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 342 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 343 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 344 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _APP_ENV_SIZE 0 0000006A 89D8 mov ax, bx 0 0000006C 050102 add ax, paras(auxbuff_size) 347 %endif 0 0000006F 89D1 mov cx, dx 0 00000071 2EC706[EC0D][E331] mov word [cs:init_layout], init_app_layout_1 0 00000078 E87D01 call init_check_auxbuff 0 0000007B 743E jz @F 352 0 0000007D 8CDB mov bx, ds 0 0000007F 89DA mov dx, bx 355 ; add bx, paras(AUXTARGET2) 0 00000081 81C3[0000] add bx, strict word relocatedzero + 0 357 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 358 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 359 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 360 ; add dx, paras(CODETARGET2) 0 00000085 81C2[0102] add dx, strict word relocatedzero + paras(auxbuff_size) 362 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 363 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 364 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 365 %endif 0 00000089 2EC706[EC0D][2D32] mov word [cs:init_layout], init_app_layout_2 0 00000090 E86501 call init_check_auxbuff 0 00000093 7426 jz @F 369 370 ; If both prior attempts failed, we allocate 371 ; an additional 8 KiB and move the buffer to 372 ; that. This should always succeed. 373 %ifn _LINK 374 mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size + app_env_size + extsegment_size) 379 ; enlarge the final memory block size 380 381 mov bx, ds 382 add bx, paras(AUXTARGET3) 383 %else ; _LINK 384 %if 0 385 %define CODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_truncated_size + datastack_size) 386 %define CODETARGET2 (CODETARGET1+auxbuff_size) 387 %define AUXTARGET1 (CODETARGET1+ldebug_code_bootldr_truncated_size+ldebug_code2_size) 388 %define AUXTARGET2 CODETARGET1 389 %define AUXTARGET3 (AUXTARGET1+auxbuff_size) 390 %endif 0 00000095 2EC706[E60D][8208] mov word [cs:memsize], relocatedzero + paras(auxbuff_size + auxbuff_size + historysegment_size + app_env_size + extsegment_size) 396 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 397 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 398 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 399 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 400 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 401 ; enlarge the final memory block size 402 0 0000009C 8CDB mov bx, ds 0 0000009E 81C3[0102] add bx, strict word relocatedzero + paras(auxbuff_size) 405 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 406 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 407 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 408 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 409 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 410 %endif ; _LINK 0 000000A2 89CA mov dx, cx 412 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _APP_ENV_SIZE 0 000000A4 89D8 mov ax, bx 0 000000A6 050102 add ax, paras(auxbuff_size) 415 %endif 0 000000A9 2EC706[EC0D][E331] mov word [cs:init_layout], init_app_layout_3 0 000000B0 E84501 call init_check_auxbuff 0 000000B3 7406 jz @F 419 420 ; Because this shouldn't happen, this is 421 ; considered an internal error. 0 000000B5 BA[B00F] mov dx, imsg.early_reloc_fail 0 000000B8 E96AFF jmp .earlyfail 424 425 @@: 426 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _APP_ENV_SIZE 0 000000BB 50 push ax 428 %endif 0 000000BC E82201 call place_code_segments 430 431 %if _MESSAGESEGMENT 0 000000BF 8CD8 mov ax, ds 433 %ifn _LINK 434 add ax, paras(MESSAGESECTIONOFFSET) 435 mov dx, ds 436 add dx, paras(100h + DATAENTRYTABLESIZE + datastack_size) 437 mov cx, paras(messagesegment_truncated_size) 438 %else ; _LINK 0 000000C1 05[0000] add ax, strict word relocatedzero + 0 440 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 0 000000C4 8CDA mov dx, ds 0 000000C6 81C2[0000] add dx, strict word relocatedzero + 0 443 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_end_of_datastack, equ $ - 2 0 000000CA B9[0000] mov cx, relocatedzero + 0 445 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_truncated, equ $ - 2 446 %endif ; _LINK 0 000000CD E82019 call init_movp 0 000000D0 8916[0000] mov word [messageseg], dx 449 %if _HELP_COMPRESSED && ! _PM 450 mov [hshrink_memory_source.segment], dx 451 %endif 452 %if _BOOTLDR_DISCARD_HELP 453 %ifn _LINK 454 mov word [messageseg_size], messagesegment_nobits_truncated_size 455 %else 0 000000D4 C706[0000][0000] mov word [messageseg_size], behind_messagesegment_nobits_truncated wrt MESSAGESEGMENT 457 %endif 458 %if _HELP_COMPRESSED 459 mov word [indirect_hshrink_message_buffer], truncated_hshrink_message_buffer 460 %if _LINK 461 mov es, [code_seg] 462 extern patch_boothelp_uncompressed 463 setopt [es:patch_boothelp_uncompressed], NONCOMPRESSEDFLAG 464 %endif 465 %endif 0 000000DA 1E push ds 0 000000DB 0E push cs 0 000000DC 1F pop ds 0 000000DD BE[A815] mov si, imsg.boothelp_replacement 0 000000E0 8EC2 mov es, dx 0 000000E2 BF[0000] mov di, msg.boothelp 0 000000E5 B91C00 mov cx, imsg.boothelp_replacement_size_w 0 000000E8 F3A5 rep movsw 0 000000EA 31C0 xor ax, ax 475 %ifn _LINK 476 mov cx, words(messagesegment_nobits_truncated_size - (msg.boothelp - messagesegment_start + fromwords(imsg.boothelp_replacement_size_w))) 479 %else 0 000000EC B9[3800] mov cx, relocatedzero + fromwords(imsg.boothelp_replacement_size_w) 481 wlcalc word_ext_msg.boothelp, equ $ - 2 ; length + start 482 wlcalc word_subr_0, equ $ - 2 ; - (length + start) 483 wlcalc word_wrt_MESSAGESEGMENT_ext_behind_messagesegment_nobits_truncated, equ $ - 2 484 ; behind - (length + start) 485 wlcalc word_shr_1, equ $ - 2 ; above >> 1 486 %endif 0 000000EF F3AB rep stosw 0 000000F1 1F pop ds 489 %endif 490 %endif 491 492 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _APP_ENV_SIZE 0 000000F2 58 pop ax 494 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 000000F3 A3[0000] mov word [history.segorsel + soaSegSel], ax 496 %if _PM 497 mov word [history.segorsel + soaSegment], ax 498 %endif 0 000000F6 8EC0 mov es, ax 0 000000F8 31FF xor di, di 0 000000FA B90010 mov cx, historysegment_size >> 1 0 000000FD 31C0 xor ax, ax 0 000000FF F3AB rep stosw 504 %endif 505 506 %if _APP_ENV_SIZE 507 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00000101 8CC0 mov ax, es 0 00000103 050002 add ax, paras(historysegment_size) 510 %endif 0 00000106 A3[0000] mov word [envseg], ax 0 00000109 8EC0 mov es, ax 0 0000010B 31FF xor di, di 0 0000010D B90004 mov cx, app_env_size >> 1 0 00000110 C706[0000]0008 mov word [env_size], app_env_size 0 00000116 31C0 xor ax, ax 0 00000118 F3AB rep stosw 0 0000011A 26C70603007F00 mov word [es:3], paras(app_env_size - 16) 519 %endif 520 521 %if _EXTENSIONS 522 %if _HISTORY_SEPARATE_FIXED && _HISTORY || _APP_ENV_SIZE 0 00000121 8CC0 mov ax, es 524 %if _APP_ENV_SIZE 0 00000123 058000 add ax, paras(app_env_size) 526 %else 527 add ax, paras(historysegment_size) 528 %endif 529 %endif 0 00000126 A3[0000] mov word [extseg], ax 0 00000129 8EC0 mov es, ax 0 0000012B 31FF xor di, di 0 0000012D B90010 mov cx, extsegment_size >> 1 0 00000130 31C0 xor ax, ax 0 00000132 F3AB rep stosw 536 %endif 537 %endif 538 0 00000134 89D8 mov ax, bx 540 0 00000136 A3[0000] mov word [auxbuff_segorsel + soaSegSel], ax 542 %if _PM 543 mov word [auxbuff_segorsel + soaSegment], ax 544 ; initialise auxbuff references 545 %endif 546 %if _IMMASM && _IMMASM_AUXBUFF 547 mov word [immseg], ax 548 %endif 549 0 00000139 8EC0 mov es, ax 0 0000013B 31FF xor di, di 0 0000013D B90810 mov cx, _AUXBUFFSIZE >> 1 0 00000140 31C0 xor ax, ax 0 00000142 F3AB rep stosw ; initialise auxbuff 555 0 00000144 FA cli 0 00000145 8CD8 mov ax, ds 0 00000147 8EC0 mov es, ax 0 00000149 8ED0 mov ss, ax 0 0000014B BC[0000] mov sp, stack_end ; application mode stack switch 0 0000014E FB sti 562 0 0000014F B44A mov ah, 4Ah 564 %ifn _LINK 565 mov bx, paras(APPINITSTACK_START) 566 %else 0 00000151 BB[8118] mov bx, strict word relocatedzero + paras( 0FFF0h + auxbuff_size + auxbuff_init_size + historysegment_size + app_env_size + extsegment_size) 573 wlcalc word_segrel_INIT, equ $ - 2 574 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 575 %endif 0 00000154 2E891E[020E] mov word [cs:init_target_size], bx 0 00000159 2E891E[000E] mov word [cs:init_base_size], bx 0 0000015E CD21 int 21h ; shrink to drop init stack 579 580 %if _CONFIG 581 find_config_application: 0 00000160 C606[0000]00 mov byte [configpath], 0 0 00000165 A12C00 mov ax, [2Ch] 0 00000168 BF[E50E] mov di, imsg.varconfig 0 0000016B B90D00 mov cx, imsg.varconfig.length 0 0000016E BA[0000] mov dx, configpath 0 00000171 E8A52F call init_copyvar 0 00000174 7303 jnc .done 0 00000176 E82200 call find_executable_application 590 .done: 591 592 593 find_scripts_application: 0 00000179 36C606[0000]00 mov byte [ss:scriptspath], 0 0 0000017F 36A12C00 mov ax, [ss:2Ch] 0 00000183 BF[F20E] mov di, imsg.varscripts 0 00000186 B90E00 mov cx, imsg.varscripts.length 0 00000189 BA[0000] mov dx, scriptspath 0 0000018C E88A2F call init_copyvar 0 0000018F 7303 jnc .done 0 00000191 E80700 call find_executable_application 602 .done: 603 0 00000194 16 push ss 0 00000195 1F pop ds 0 00000196 16 push ss 0 00000197 07 pop es 608 %endif 609 0 00000198 E96019 jmp old_initcode 611 612 613 %if _CONFIG 614 ; INP: dx -> buffer 615 ; ds => PSP 616 find_executable_application: 0 0000019B A12C00 mov ax, [2Ch] 0 0000019E 85C0 test ax, ax 0 000001A0 743E jz .noexec 0 000001A2 8ED8 mov ds, ax 0 000001A4 31F6 xor si, si 622 @@: 0 000001A6 E8672F call init_nextvar 0 000001A9 75FB jne @B 0 000001AB 46 inc si 0 000001AC AD lodsw 0 000001AD 83F801 cmp ax, 1 0 000001B0 752E jne .noexec 0 000001B2 1E push ds 0 000001B3 07 pop es 0 000001B4 89F7 mov di, si 0 000001B6 B97F00 mov cx, 127 0 000001B9 B000 mov al, 0 0 000001BB F2AE repne scasb 0 000001BD 7521 jne .noexec 0 000001BF 4F dec di 637 0 000001C0 B90000 mov cx, 0 639 @@: 0 000001C3 39F7 cmp di, si 0 000001C5 7610 jbe @F 0 000001C7 4F dec di 0 000001C8 803D2F cmp byte [di], '/' 0 000001CB 7405 je .slash 0 000001CD 803D5C cmp byte [di], '\' 0 000001D0 75F1 jne @B 647 .slash: 0 000001D2 89F9 mov cx, di 0 000001D4 41 inc cx 0 000001D5 29F1 sub cx, si 651 @@: 652 0 000001D7 16 push ss 0 000001D8 07 pop es 0 000001D9 89D7 mov di, dx 0 000001DB F3A4 rep movsb 0 000001DD B000 mov al, 0 0 000001DF AA stosb 659 660 .noexec: 661 .done: 0 000001E0 C3 retn 663 %endif 664 665 %endif 666 667 668 %if _APPLICATION || _DEVICE 669 ; INP: ds => (pseudo) PSP, data/entry segment 670 ; OUT: word [code_seg] set 671 ; code segments placed 672 ; CHG: ax, cx, dx 673 ; STT: UP 674 place_code_segments: 0 000001E1 8CD8 mov ax, ds 676 %ifn _LINK 677 add ax, paras(CODESECTIONOFFSET) 678 %else 0 000001E3 05[0000] add ax, strict word relocatedzero + 0 680 wlcalc word_segrel_lDEBUG_CODE, equ $ - 2 681 %endif 682 ; => code1 image, then code2 image 683 %if _BOOTLDR_DISCARD 684 %ifn _LINK 685 mov word [code_size], ldebug_code_bootldr_truncated_size 686 mov cx, ldebug_code_bootldr_truncated_size_p 687 %else 0 000001E6 C706[0000][0000] mov word [code_size], behind_code_truncated wrt lDEBUG_CODE 0 000001EC B9[0000] mov cx, relocatedzero + 0 690 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 691 %endif 692 ; prepare for code1 segment move 693 %if _DUALCODE 694 cmp ax, dx ; source above destination ? 695 jae @F ; yes --> 696 call .place_code2 ; source is below, move "backward" (high first) 697 %endif 0 000001EF E8FE17 call init_movp ; low last 699 %if _DUALCODE 700 jmp @FF 701 702 @@: 703 call init_movp ; source is above, move "forward" (low first) 704 call .place_code2 ; high last 705 @@: 706 %endif 707 %else 708 %ifn _LINK 709 mov cx, ldebug_code_size_p + ldebug_code2_size_p ; untruncated 710 %else 711 mov cx, 0 712 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code2, equ $ - 2 713 %endif 714 call init_movp 715 %endif 0 000001F2 8916[0000] mov word [code_seg], dx ; initialise code segment reference 0 000001F6 C3 retn 718 719 %if _BOOTLDR_DISCARD && _DUALCODE 720 .place_code2: 721 push ax 722 push cx 723 push dx 724 add dx, cx ; => behind truncated code1 segment 725 %ifn _LINK 726 add ax, ldebug_code_size_p ; untruncated 727 ; => at code2 image 728 mov cx, ldebug_code2_size_p 729 ; = size of code2 segment 730 %else 731 add ax, strict word relocatedzero + 0 732 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code, equ $ - 2 733 mov cx, relocatedzero + 0 734 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 735 %endif 736 call init_movp 737 pop dx 738 pop cx 739 pop ax 740 retn 741 %endif 742 %endif 743 744 745 init_retf: 0 000001F7 CB retf 747 748 749 ; INP: bx => destination for auxbuff 750 ; (The following are not actually used by this function, 751 ; they're just what is passed in and preserved to 752 ; be used by the caller after returning.) 753 ; dx => destination for code image 754 ; (if boot-loaded:) cx => destination for pseudo-PSP 755 ; (implies cx+10h => destination for data_entry) 756 ; ax => segment for history buffer 757 ; OUT: ZR if this destination for auxbuff doesn't cross 758 ; a 64 KiB boundary 759 ; NZ else 760 ; CHG: si, di 761 init_check_auxbuff: 0 000001F8 89DE mov si, bx ; => auxbuff 763 %if _AUXBUFFSIZE < 8192 764 %error Expected full sector length auxbuff 765 %endif 0 000001FA 8DBC0002 lea di, [si + (8192 >> 4)]; => behind auxbuff (at additional paragraph) 0 000001FE 81E600F0 and si, 0F000h ; => 64 KiB chunk of first paragraph of auxbuff 0 00000202 81E700F0 and di, 0F000h ; => 64 KiB chunk of additional paragraph 0 00000206 39F7 cmp di, si ; same ? 770 ; ZR if they are the same 0 00000208 C3 retn 772 773 774 %if _BOOTLDR 775 ; Our loader transfers control to us with these registers: 776 ; INP: ss:bp -> BPB 777 ; ss:bp - 16 -> loadstackvars 778 ; ss:bp - 32 -> loaddata 779 ; (loader enters at) cs:0 -> loaded payload 780 ; (loader enters at) cs:32 -> entry point 781 ; (entrypoint sets up) ds:100h -> loaded payload 782 ; STT: EI, UP 783 ; all interrupts left from BIOS 784 boot_initcode: 0 00000209 FC cld 786 787 d4 call init_d4message 788 d4 asciz "In boot_initcode",13,10 789 0 0000020A 8B56E0 mov dx, word [bp + ldMemoryTop] 791 792 ; initialise sdp 0 0000020D 8B461E mov ax, word [bp + bsBPB + bpbHiddenSectors + 2] 0 00000210 A3[4E00] mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2], ax 0 00000213 8B461C mov ax, word [bp + bsBPB + bpbHiddenSectors] 0 00000216 A3[4C00] mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors], ax 797 0 00000219 31DB xor bx, bx 0 0000021B 8A4640 mov al, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 0 0000021E A2[7000] mov byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit], al 0 00000221 88C3 mov bl, al ; bx = LD unit 0 00000223 84C0 test al, al ; hdd or diskette ? 0 00000225 8B46EC mov ax, word [bp + ldQueryPatchValue] 0 00000228 7902 jns @F ; diskette --> 0 0000022A 86C4 xchg al, ah ; get high word of query patch value 806 @@: 0 0000022C 84C0 test al, al ; use for our access to this unit ? 0 0000022E 7906 jns @F ; no --> 0 00000230 2407 and al, luf_mask_writable ; clear unused bits 0 00000232 8887[0000] mov byte [load_unit_flags + bx], al 811 ; save here 812 @@: 813 814 0 00000236 8CDB mov bx, ds 0 00000238 8EC3 mov es, bx ; => data entry image 0 0000023A BF[0000] mov di, loaddata_loadedfrom ; -> loaded from data (ldp) 818 819 ; initialise LOADDATA, LOADSTACKVARS, and BPB 0 0000023D 16 push ss 0 0000023E 1F pop ds 0 0000023F 8D76E0 lea si, [bp + LOADDATA] ; -> LOADDATA on stack 0 00000242 B97A00 mov cx, (-LOADDATA + bsBPB + ebpbNew + BPBN_size) 0 00000245 F3A4 rep movsb 825 826 ; initialise cmdline_buffer from below LOADDATA 0 00000247 8DB6E0FE lea si, [bp + ldCommandLine.start] 0 0000024B BF[0000] mov di, cmdline_buffer ; -> our buffer in data entry 829 0 0000024E 813C00FF cmp word [si], 0FF00h 0 00000252 7505 jne @F 832 0 00000254 0E push cs 0 00000255 1F pop ds 0 00000256 BE[D816] mov si, imsg.default_cmdline.boot 836 837 @@: 0 00000259 AC lodsb 0 0000025A 84C0 test al, al 0 0000025C 7423 jz @FF 841 0 0000025E 26800E[0100]01 setopt [es:internalflags3], dif3_input_cmdline 0 00000264 A9 db __TEST_IMM16 844 .switch_c_loop: 0 00000265 AA stosb 0 00000266 AC lodsb 847 .switch_c_loop_after_semicolon: 0 00000267 3C00 cmp al, 0 0 00000269 7415 je @F 0 0000026B 3C3B cmp al, ';' 0 0000026D 7508 jne .switch_c_not_semicolon 0 0000026F B00D mov al, 13 0 00000271 AA stosb 0 00000272 E8632F call init_skipwhite 0 00000275 EBF0 jmp .switch_c_loop_after_semicolon 856 857 .switch_c_not_semicolon: 0 00000277 3C5C cmp al, '\' 0 00000279 75EA jne .switch_c_loop 0 0000027B AC lodsb 0 0000027C 3C00 cmp al, 0 0 0000027E 75E5 jne .switch_c_loop 863 864 @@: 0 00000280 AA stosb 866 @@: 867 868 ; es => data entry image 0 00000281 16 push ss 0 00000282 1F pop ds 0 00000283 8D765A lea si, [bp + bsBPB + ebpbNew + BPBN_size] ; -> tail (FAT32 style) 872 ; ds:si -> tail. this is the same for FAT12/FAT16 as FAT32 0 00000286 B9C201 mov cx, 512 - (bsBPB + bpbNew + BPBN_size) ; tail size FAT12/FAT16 0 00000289 837E1600 cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 0 0000028D 7503 jne @F 0 0000028F B9A601 mov cx, 512 - (bsBPB + ebpbNew + BPBN_size) ; tail size FAT32 877 @@: 0 00000292 E8C304 call findname 879 880 %if _EXECUTABLE 0 00000295 53 push bx 0 00000296 06 push es 0 00000297 1F pop ds 0 00000298 BE[0000] mov si, boot_init_foundname 0 0000029B BF[0000] mov di, init_executable_pathname 0 0000029E 803C00 cmp byte [si], 0 0 000002A1 7415 je .unable 888 0 000002A3 31C9 xor cx, cx 0 000002A5 89F3 mov bx, si 891 @@: 0 000002A7 AC lodsb 0 000002A8 41 inc cx 0 000002A9 84C0 test al, al 0 000002AB 75FA jnz @B 896 0 000002AD BE[2417] mov si, imsg.ldpslash 898 0 000002B0 2EA5 cs movsw 0 000002B2 2EA5 cs movsw 901 0 000002B4 89DE mov si, bx 0 000002B6 F3A4 rep movsb 904 905 .unable: 0 000002B8 BF[0000] mov di, init_executable_pathname 0 000002BB 31C0 xor ax, ax 0 000002BD B98000 mov cx, 128 0 000002C0 F2AE repne scasb 0 000002C2 4F dec di 0 000002C3 893E[0000] mov word [init_executable_pathname.end], di 0 000002C7 5B pop bx 913 %endif 914 0 000002C8 89D0 mov ax, dx 916 %ifn _LINK 917 sub ax, paras(BOOTDELTA) 918 %else 919 %if 0 920 %define BOOTDELTA (fromkib(kib(auxbuff_size * 2 + historysegment_boot_size + boot_env_size + extsegment_boot_size + datastack_size + INITSECTIONOFFSET + 16))) 926 %endif 0 000002CA 2D[830A] sub ax, strict word relocatedzero + paras( + auxbuff_size * 2 + historysegment_boot_size + boot_env_size + extsegment_boot_size + 16) 933 wlcalc word_segrel_INIT, equ $ - 2 934 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 935 wlcalc word_add_63, equ $ - 2 ; 1023 >> 4 936 wlcalc word_clr_63, equ $ - 2 ; 1023 >> 4 937 %endif 0 000002CD 7303E96101 jc .error_out_of_memory 939 ; We exaggerate the target size (BOOTDELTA) for the 940 ; worst case, thus we do not need to check for narrower 941 ; fits later on. BOOTDELTA includes the pseudo-PSP size, 942 ; data_entry size, asmtable1_size, asmtable2_size, 943 ; datastack_size, code_size, 2 times auxbuff_size, 944 ; historysegment_boot_size, boot_env_size, 945 ; extsegment_boot_size, 946 ; plus 16 bytes for the image ident prefix paragraph, 947 ; and all of that rounded to a kibibyte boundary. 948 0 000002D2 8CC9 mov cx, cs 950 %ifn _LINK 951 add cx, paras(init_size + BOOTINITSTACK_SIZE) 952 %else 0 000002D4 81C1[2000] add cx, strict word relocatedzero + paras(BOOTINITSTACK_SIZE) 954 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 955 %endif 0 000002D8 7303E95601 jc .error_out_of_memory 0 000002DD 39D1 cmp cx, dx 0 000002DF 7603E94F01 ja .error_out_of_memory 959 ; This requires that above the image (including init) 960 ; there is some 512 bytes free. That could be a problem 961 ; except we've already exhausted the iniload-internally 962 ; used buffers + stack, and do not need to preserve any 963 ; of those. Recall that dx holds MemoryTop, *not* the 964 ; lower LoadTop which could be right behind the image. 965 ; The sector buffer alone is documented as being 8 KiB 966 ; sized, not to mention the FAT buffer and stack and 967 ; LOADDATA/LOADSTACKVARS/BPB/boot sector. 968 0 000002E4 F646E704 testopt [bp + ldHasLBA], ldhlfPreserveLoader 970 ; set NZ if loader resident 971 0 000002E8 8CCF mov di, cs 0 000002EA FA cli 0 000002EB 8ED7 mov ss, di 975 %ifn _LINK 976 mov sp, init_size + BOOTINITSTACK_SIZE 977 %else 0 000002ED BC[0002] mov sp, BOOTINITSTACK_SIZE + behind_init wrt INIT 979 %endif 0 000002F0 FB sti 981 982 d4 call init_d4message 983 d4 asciz "Switched to init stack",13,10 984 985 lframe none 986 lvar word, target 0 000002F1 5589E550 lenter 988 lvar word, targetstart 0 000002F5 50 push ax 990 lvar word, memtop 0 000002F6 52 push dx 0 000002F7 8D7F10 lea di, [bx + 10h] 993 lvar word, data 0 000002FA 57 push di 995 lvar word, lowestused 0 000002FB 57 push di 997 %ifn _LINK 998 lea di, [bx + paras(CODESECTIONOFFSET)] 999 %else 0 000002FC 8DBF[0000] lea di, [word relocatedzero + bx + 0] 1001 wlcalc word_segrel_lDEBUG_CODE, equ $ - 2 1002 %endif 1003 lvar word, code 0 00000300 57 push di 1005 lvar dword, loaderentry 0 00000301 50 push ax 0 00000302 50 push ax 0 00000303 BF6000 mov di, 60h 1009 lvar word, lowlimit 0 00000306 57 push di 1011 1012 %if !_LOADER 0 00000307 51 push cx 0 00000308 50 push ax 1015 1016 ; had set NZ if loader resident 0 00000309 745B jz .no_loader 0 0000030B E80305 call get_size_and_ebda 0 0000030E 8B5EFA mov bx, word [bp + ?memtop] 0 00000311 2E031E[140E] add bx, [cs:init_boot_ebdasize] 0 00000316 8EC3 mov es, bx 0 00000318 31FF xor di, di 0 0000031A 0E push cs 0 0000031B 1F pop ds 0 0000031C BE[E00D] mov si, loader_imageident 0 0000031F B90300 mov cx, words(loader_imageident.size) 0 00000322 BA[2418] mov dx, imsg.boot_warn_no_loader 0 00000325 F3A7 repe cmpsw 0 00000327 7532 jne .loaderwarning 0 00000329 31F6 xor si, si 0 0000032B 31D2 xor dx, dx 0 0000032D B90800 mov cx, 8 1033 @@: 0 00000330 26AD es lodsw 0 00000332 01C2 add dx, ax 0 00000334 E2FA loop @B 0 00000336 BA[4118] mov dx, imsg.boot_warn_invalid_loader 0 00000339 7520 jnz .loaderwarning 1039 0 0000033B 895EF2 mov word [bp + ?loaderentry + 2], bx 0 0000033E 2EF616[1B0E] not byte [cs:init_preserveloader] 0 00000343 BA[5F18] mov dx, imsg.boot_warn_lazy_loader 0 00000346 268B0E1000 mov cx, word [es:liiEntryQuerySize] 0 0000034B E30E jcxz .loaderwarning 0 0000034D 894EF0 mov word [bp + ?loaderentry], cx 0 00000350 B86000 mov ax, 60h 0 00000353 FF5EF0 call far [bp + ?loaderentry] 0 00000356 8946EE mov word [bp + ?lowlimit], ax 0 00000359 EB0B jmp @F 1050 1051 .loaderwarning: 0 0000035B 52 push dx 0 0000035C BA[1118] mov dx, imsg.bootwarn 0 0000035F E84117 call init_putsz_cs_bootldr 0 00000362 5A pop dx 0 00000363 E83D17 call init_putsz_cs_bootldr 1057 @@: 1058 1059 .no_loader: 0 00000366 58 pop ax 0 00000367 59 pop cx 1062 %endif 1063 0 00000368 39C1 cmp cx, ax ; does init end below-or-equal target ? 0 0000036A 7703E9DF00 jbe .no_relocation ; yes, no relocation needed --> 1066 1067 d4 call init_d4message 1068 d4 asciz "Needs relocation of init segment",13,10 1069 0 0000036F 8B46F8 mov ax, word [bp + ?data] 1071 %ifn _LINK 1072 sub ax, strict word paras(init_size + BOOTINITSTACK_SIZE) 1073 %else 0 00000372 2D[2000] sub ax, strict word relocatedzero + paras(BOOTINITSTACK_SIZE) 1075 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 1076 %endif 0 00000375 7303E9B900 jc .error_out_of_memory ; already at start of memory --> 0 0000037A 3B46EE cmp ax, [bp + ?lowlimit] 0 0000037D 7303E9B100 jb .error_out_of_memory ; already at start of memory --> 1080 1081 ; The relocation never overlaps, as we move init 1082 ; and its stack to the space before the image. 1083 ; Therefore we can move UP. And only a single 1084 ; rep movsw instruction is needed as init and 1085 ; its stack always fit in a single segment. 0 00000382 0E push cs 0 00000383 1F pop ds 0 00000384 31F6 xor si, si ; -> init source 0 00000386 8EC0 mov es, ax 0 00000388 8946F6 mov word [bp + ?lowestused], ax 0 0000038B 31FF xor di, di ; -> init destination 1092 %ifn _LINK 1093 mov cx, words(init_size + BOOTINITSTACK_SIZE) 1094 %else 0 0000038D B9[0102] mov cx, BOOTINITSTACK_SIZE + 1 + behind_init wrt INIT 1096 wlcalc word_shr_1, equ $ - 2 1097 %endif 0 00000390 F3A5 rep movsw ; relocate only init 1099 ; Must not modify the data already on the stack here, 1100 ; until after either .done_relocation or 1101 ; .entire_relocation_done (which both relocate ss). 1102 0 00000392 50 push ax 0 00000393 E861FE call init_retf ; jump to new init 1105 1106 ; mov ss, ax 1107 ; Logic error: The entire load image relocation would 1108 ; make it so that the stack would corrupt part of the 1109 ; load image that had been relocated the first time 1110 ; already here. We want to keep using the high stack 1111 ; here until both relocations are done, at which point 1112 ; we *must* relocate ss so as to get the stack out of 1113 ; the way of installing the final image components. 1114 ; Avoid modifying the stack frame variables until after 1115 ; we have relocated the stack. However, temporary use 1116 ; of the stack is okay before relocating it. (It must 1117 ; be because IRQs and debugger tracing will use it.) 0 00000396 8B4EF4 mov cx, word [bp + ?code] 1119 %ifn _LINK 1120 add cx, paras(ldebug_code_size + ldebug_code2_size) ; untruncated 1121 %else 0 00000399 81C1[0000] add cx, strict word relocatedzero + 0 1123 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code2, equ $ - 2 1124 %endif 0 0000039D 3B4EFC cmp cx, word [bp + ?targetstart] 1126 ; does code end below-or-equal target ? 0 000003A0 7703E99C00 jbe .done_relocation ; yes, relocated enough --> 1128 1129 .entire_relocation_needed: 1130 d4 call init_d4message 1131 d4 asciz "Needs relocation of entire load image",13,10 1132 0 000003A5 8B56EE mov dx, [bp + ?lowlimit] 0 000003A8 8EC2 mov es, dx 0 000003AA 8CC8 mov ax, cs 0 000003AC 39C2 cmp dx, ax ; already at start of memory ? 0 000003AE 7203E98000 jae .error_out_of_memory ; then error --> 1138 ; This move is always downwards, that is, we can 1139 ; move UP. Multiple instructions operating on 1140 ; different segments may be needed as the image 1141 ; can be larger than 64 KiB. 1142 ; However, init was already moved to before the 1143 ; remainder of the image, so the first 64 KiB 1144 ; move will always leave init finished and 1145 ; ready to use. So only move the first chunk 1146 ; in the special relocator, then jump into the 1147 ; final relocated init to do the remainder. 1148 0 000003B3 42 inc dx 1150 ; cmp dx, ax 1151 ; ja .error_out_of_memory 0 000003B4 B9[ED03] mov cx, .relocated 0 000003B7 52 push dx 0 000003B8 51 push cx ; on stack: far address of .relocated 1155 0 000003B9 89C1 mov cx, ax ; source 0 000003BB 29D1 sub cx, dx ; source - target = how far to relocate 1158 0 000003BD 31FF xor di, di ; es:di -> where to put relocator 0 000003BF 06 push es 0 000003C0 57 push di ; on stack: relocator destination 0 000003C1 51 push cx ; on stack: how far to relocate 0 000003C2 0E push cs 0 000003C3 1F pop ds 0 000003C4 BE[EA03] mov si, .relocator ; -> relocator source 0 000003C7 B90800 mov cx, 8 0 000003CA F3A5 rep movsw ; put relocator stub 1168 0 000003CC 8EC2 mov es, dx 0 000003CE 5A pop dx ; dx = how far to relocate 1171 0 000003CF 31FF xor di, di ; -> where to relocate to 0 000003D1 31F6 xor si, si ; -> relocate start 1174 1175 %ifn _LINK 1176 BOOTRELOC1 equ paras( init_size + BOOTINITSTACK_SIZE + DATAENTRYTABLESIZE + messagesegment_size + ldebug_code_size + ldebug_code2_size) ; untruncated 1180 %endif 1181 1182 %if _LINK_COMPAT || _LINK 1183 %ifn _LINK 1184 mov cx, BOOTRELOC1 ; how much to relocate 1185 %else 0 000003D3 B9[1000] mov cx, relocatedzero + paras(BOOTINITSTACK_SIZE - 256) 1187 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 1188 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_behind_progbits_dataentry, equ $ - 2 1189 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment, equ $ - 2 1190 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code2, equ $ - 2 1191 %endif 0 000003D6 BB0010 mov bx, 1000h 0 000003D9 89C8 mov ax, cx 0 000003DB 39D8 cmp ax, bx ; > 64 KiB? 0 000003DD 7602 jbe @F 0 000003DF 89D9 mov cx, bx ; first relocate the first 64 KiB 1197 @@: 0 000003E1 29C8 sub ax, cx ; how much to relocate later 0 000003E3 D1E1 shl cx, 1 0 000003E5 D1E1 shl cx, 1 0 000003E7 D1E1 shl cx, 1 ; how much to relocate first, 1202 ; << 3 == convert paragraphs to words 1203 %else 1204 mov bx, 1000h 1205 %if BOOTRELOC1 > 1000h 1206 mov cx, 8000h 1207 mov ax, BOOTRELOC1 - 1000h 1208 %else 1209 mov cx, BOOTRELOC1 << 3 1210 xor ax, ax 1211 %endif 1212 %endif 0 000003E9 CB retf ; jump to relocator 1214 1215 ; ds:si -> first chunk of to be relocated data 1216 ; es:di -> first chunk of relocation destination 1217 ; (si = di = 0, and es always <= ds) 1218 ; cx = number of words in first chunk 1219 ; ax = how many paragraphs remain after first chunk is done 1220 ; dx = how far to relocate in paragraphs 1221 ; bx = 1000h 1222 ; ss:sp -> far return address into relocated init section 1223 ; (this always points into the first chunk) 1224 .relocator: 0 000003EA F3A5 rep movsw 0 000003EC CB retf ; jump to relocated cs : .relocated 1227 .relocator_size equ $ - .relocator 1228 %if .relocator_size > 16 1229 %error Unexpected large relocator 1230 %endif 1231 1232 .relocated: 1233 ; ds => prior chunk of relocation source (may be corrupted) 1234 ; es => prior chunk of relocation destination 1235 ; cx = 0 1236 ; ax = how many paragraphs remain 1237 ; dx = how far to relocate in paragraphs 1238 ; bx = 1000h 1239 @@: 0 000003ED 8CC1 mov cx, es 0 000003EF 01D9 add cx, bx 0 000003F1 8EC1 mov es, cx ; => next segment 1243 0 000003F3 8CD9 mov cx, ds 0 000003F5 01D9 add cx, bx 0 000003F7 8ED9 mov ds, cx ; => next segment 1247 0 000003F9 29D8 sub ax, bx ; = how much to relocate after this round 0 000003FB B90080 mov cx, 1000h << 3 ; in case another full 64 KiB to relocate 0 000003FE 730B jae @F ; another full 64 KiB to relocate this round --> 0 00000400 01D8 add ax, bx ; restore (possibly zero) 0 00000402 D1E0 shl ax, 1 0 00000404 D1E0 shl ax, 1 0 00000406 D1E0 shl ax, 1 ; convert paragraphs to words 0 00000408 91 xchg cx, ax ; cx = that many words (possibly zero) 0 00000409 31C0 xor ax, ax ; no more to relocate after this round 1257 1258 @@: 1259 ; ds:0 -> next chunk of source 1260 ; es:0 -> next chunk of destination 1261 ; cx = how many words in this chunk, may be zero 1262 ; ax = how many paragraphs remain for next round 1263 ; (if ax is nonzero then cx is 8000h for a full 64 KiB) 1264 ; dx = how far to relocate in paragraphs 1265 ; bx = 1000h 0 0000040B 31F6 xor si, si ; -> source 0 0000040D 31FF xor di, di ; -> destination 0 0000040F F3A5 rep movsw ; relocate next chunk 0 00000411 85C0 test ax, ax ; another round needed? 0 00000413 75D8 jnz @BB ; yes --> 1271 1272 .entire_relocation_done: 0 00000415 8CC8 mov ax, cs 0 00000417 8ED0 mov ss, ax ; relocate the stack 0 00000419 90 nop 1276 ; The stack frame variables have been relocated here 1277 ; along with the INIT segment data. 1278 1279 ; Now okay to modify relocated stack frame variables. 0 0000041A 8946F6 mov word [bp + ?lowestused], ax 0 0000041D 2956F8 sub word [bp + ?data], dx 0 00000420 721A jc .error_internal 0 00000422 2956F4 sub word [bp + ?code], dx 0 00000425 7215 jc .error_internal 1285 0 00000427 8B4EF4 mov cx, word [bp + ?code] 1287 %ifn _LINK 1288 add cx, paras(ldebug_code_size + ldebug_code2_size) ; untruncated 1289 %else 0 0000042A 81C1[0000] add cx, strict word relocatedzero + 0 1291 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code2, equ $ - 2 1292 %endif 0 0000042E 3B4EFC cmp cx, word [bp + ?targetstart] 1294 ; does code end below-or-equal target ? 0 00000431 760E jbe .done_relocation ; yes --> 1296 1297 .error_out_of_memory: 0 00000433 BA[A217] mov dx, imsg.boot_error_out_of_memory 1299 .putsz_error: 0 00000436 E86A16 call init_putsz_cs_bootldr 0 00000439 E95404 jmp init_booterror.soft 1302 1303 .error_internal: 0 0000043C BA[B317] mov dx, imsg.boot_error_internal 0 0000043F EBF5 jmp .putsz_error 1306 1307 1308 .done_relocation: 0 00000441 8CC8 mov ax, cs 0 00000443 8ED0 mov ss, ax ; relocate the stack 0 00000445 90 nop 1312 ; Not needed if we got here after having executed 1313 ; .entire_relocation_done or by branching to this 1314 ; place through the .no_relocation label, but 1315 ; doesn't hurt in those cases either. 1316 ; The stack frame variables have been relocated here 1317 ; along with the INIT segment data. 0 00000446 8B46F6 mov ax, word [bp + ?lowestused] 0 00000449 3B46EE cmp ax, word [bp + ?lowlimit] 0 0000044C 72E5 jb .error_out_of_memory 1321 1322 .no_relocation: 0 0000044E 2EC606[9508]A8 mov byte [cs:init_booterror.patch_switch_stack], __TEST_IMM8 1324 ; SMC in section INIT 1325 1326 ; Due to the prior check in .done_relocation, 1327 ; we only go to .relocatehigh if the init is 1328 ; still at its initial position (*above* the 1329 ; data and code images). We depend on this 1330 ; in order to relocate init first, then do 1331 ; the remaining (image) relocation from init. 0 00000454 8B46F6 mov ax, word [bp + ?lowestused] 0 00000457 2B46EE sub ax, word [bp + ?lowlimit] 0 0000045A 735E jae .highenough 1335 .relocatehigh: 0 0000045C F7D8 neg ax ; how much to relocate higher 0 0000045E 8CC9 mov cx, cs 1338 %ifn _LINK 1339 add cx, paras(init_size + BOOTINITSTACK_SIZE + 256) 1340 %else 0 00000460 81C1[3000] add cx, strict word relocatedzero + paras(BOOTINITSTACK_SIZE + 256) 1342 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 1343 %endif 0 00000464 72CD jc .error_out_of_memory 0 00000466 01C1 add cx, ax ; => past wanted init 0 00000468 72C9 jc .error_out_of_memory 0 0000046A 3B4EFC cmp cx, word [bp + ?targetstart] 0 0000046D 73C4 jae .error_out_of_memory ; if too little left --> 1349 0 0000046F 8CCA mov dx, cs 0 00000471 01C2 add dx, ax ; => destination init 0 00000473 89E3 mov bx, sp ; preserve sp 0 00000475 FA cli 0 00000476 8ED2 mov ss, dx 1355 %ifn _LINK 1356 mov sp, fromwords(words(init_size + BOOTINITSTACK_SIZE + 256 - 1)) 1357 %else 0 00000478 BC[0003] mov sp, behind_init + BOOTINITSTACK_SIZE + 256 wrt INIT 1359 wlcalc word_clr_1, equ $ - 2 1360 %endif 1361 ; go to temporary stack 0 0000047B FB sti 0 0000047C BF[9E04] mov di, .relocatedhigh 0 0000047F 52 push dx 0 00000480 57 push di ; -> relocated .relocatedhigh (temp stack) 0 00000481 41 inc cx 0 00000482 8EC1 mov es, cx ; => relocator destination 0 00000484 31FF xor di, di 0 00000486 06 push es 0 00000487 57 push di ; -> relocator destination (temp stack) 0 00000488 0E push cs 0 00000489 1F pop ds 0 0000048A BE[EA03] mov si, .relocator ; -> relocator source 0 0000048D B90800 mov cx, 8 0 00000490 F3A5 rep movsw ; put relocator stub 0 00000492 8EC2 mov es, dx 1377 %ifn _LINK 1378 mov cx, words(init_size + BOOTINITSTACK_SIZE) 1379 mov si, fromwords(words(init_size + BOOTINITSTACK_SIZE)) - 2 1380 %else 0 00000494 B9[0102] mov cx, behind_init + BOOTINITSTACK_SIZE + 1 wrt INIT 1382 wlcalc word_shr_1, equ $ - 2 0 00000497 BE[FF01] mov si, behind_init + BOOTINITSTACK_SIZE + 1 - 2 wrt INIT 1384 wlcalc word_clr_1, equ $ - 2 1385 %endif 0 0000049A 89F7 mov di, si ; -> last word 0 0000049C FD std 0 0000049D CB retf ; (uses temp stack) 1389 1390 .relocatedhigh: 0 0000049E FC cld 1392 %if 0 ; ss already == dx 1393 cli 1394 mov ss, dx 1395 mov sp, bx 1396 sti 1397 %else 0 0000049F 89DC mov sp, bx ; restore original stack 1399 %endif 0 000004A1 8B56F8 mov dx, word [bp + ?data] ; => data source 0 000004A4 0146F8 add word [bp + ?data], ax 0 000004A7 7293 jc .error_internal 0 000004A9 0146F4 add word [bp + ?code], ax 0 000004AC 728E jc .error_internal 1405 0 000004AE 52 push dx 0 000004AF 01C2 add dx, ax ; => data destination 0 000004B1 7289 jc .error_internal 0 000004B3 58 pop ax ; => data source 1410 %ifn _LINK 1411 mov cx, paras(CODESECTIONOFFSET + ldebug_code_size + ldebug_code2_size) ; untruncated 1413 %else 0 000004B4 B9[0000] mov cx, relocatedzero + 0 1415 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_behind_code2, equ $ - 2 1416 %endif 1417 ; = data + code size 0 000004B7 E83615 call init_movp 1419 1420 .highenough: 1421 1422 1423 d4 call init_d4message 1424 d4 asciz "Relocated enough",13,10 1425 1426 1427 %if !_LOADER 0 000004BA 2ED006[1B0E] rol byte [cs:init_preserveloader], 1 0 000004BF 7326 jnc @F 1430 0 000004C1 BA[9018] mov dx, imsg.boot_warn_loader_no_reloc 0 000004C4 8E46F2 mov es, word [bp + ?loaderentry + 2] 0 000004C7 268B0E1200 mov cx, word [es:liiEntryRelocate] 0 000004CC E30E jcxz .reloc_loaderwarning 0 000004CE 894EF0 mov word [bp + ?loaderentry], cx 0 000004D1 B86000 mov ax, 60h 0 000004D4 FF5EF0 call far [bp + ?loaderentry] 0 000004D7 8946F2 mov word [bp + ?loaderentry + 2], ax 1439 ; update our reference 0 000004DA EB0B jmp @F 1441 1442 .reloc_loaderwarning: 0 000004DC 52 push dx 0 000004DD BA[1118] mov dx, imsg.bootwarn 0 000004E0 E8C015 call init_putsz_cs_bootldr 0 000004E3 5A pop dx 0 000004E4 E8BC15 call init_putsz_cs_bootldr 1448 @@: 1449 %endif 1450 0 000004E7 E82703 call get_size_and_ebda 1452 0 000004EA 8B4EFA mov cx, word [bp + ?memtop] 0 000004ED 2E030E[140E] add cx, [cs:init_boot_ebdasize] 1455 %ifn _LINK 1456 sub cx, paras(INITSECTIONOFFSET - messagesegment_size + messagesegment_nobits_size + datastack_size + auxbuff_size + historysegment_boot_size + boot_env_size + extsegment_boot_size) 1457 %else 0 000004F2 81E9[8108] sub cx, relocatedzero + paras( + auxbuff_size + historysegment_boot_size + boot_env_size + extsegment_boot_size) 1463 wlcalc word_segrel_INIT, equ $ - 2 1464 wlcalc word_wrt_MESSAGESEGMENT_minusextpara_behind_messagesegment, equ $ - 2 1465 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1466 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1467 %endif 1468 1469 ; cx = paragraph of pseudo-PSP if here 1470 %if !_LOADER 0 000004F6 49 dec cx ; => paragraph of image ident 0 000004F7 83E1C0 and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 0 000004FA 41 inc cx ; => paragraph of pseudo-PSP if here 1474 %else 1475 and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 1476 %endif 1477 0 000004FB 89CB mov bx, cx 0 000004FD 89DA mov dx, bx 1480 %ifn _LINK 1481 add bx, paras(BOOTAUXTARGET1) ; => auxbuff target if here 1482 add dx, paras(BOOTCODETARGET1) ; => code target if here 1483 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _BOOT_ENV_SIZE 1484 mov ax, bx 1485 add ax, paras(auxbuff_size) 1486 %if BOOTAUXTARGET1_equate <= BOOTCODETARGET1_equate 1487 %error Unexpected layout 1488 %endif 1489 %endif 1490 %else ; _LINK 1491 %if 0 1492 %define BOOTCODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_size + datastack_size) 1493 %define BOOTCODETARGET2 (BOOTCODETARGET1+auxbuff_size) 1494 %define BOOTAUXTARGET1 (BOOTCODETARGET1+ldebug_code_size+ldebug_code2_size) 1495 %define BOOTAUXTARGET2 BOOTCODETARGET1 1496 %define BOOTAUXTARGET3 (BOOTAUXTARGET1+auxbuff_size) 1497 %endif 1498 ; add bx, paras(BOOTAUXTARGET1) 0 000004FF 81C3[0000] add bx, strict word relocatedzero + 0 1500 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 1501 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1502 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1503 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code, equ $ - 2 1504 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 1505 ; add dx, paras(BOOTCODETARGET1) 0 00000503 81C2[0000] add dx, strict word relocatedzero + 0 1507 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 1508 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1509 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1510 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _BOOT_ENV_SIZE 0 00000507 89D8 mov ax, bx 0 00000509 050102 add ax, paras(auxbuff_size) 1513 %endif 1514 %endif ; _LINK 0 0000050C E8E9FC call init_check_auxbuff 0 0000050F 743E jz @F 1517 1518 d4 call init_d4message 1519 d4 asciz "First layout rejected",13,10 1520 0 00000511 89CB mov bx, cx ; attempt same target again 0 00000513 89DA mov dx, bx 1523 %ifn _LINK 1524 add bx, paras(BOOTAUXTARGET2) ; => auxbuff target if here 1525 add dx, paras(BOOTCODETARGET2) ; => code target if here 1526 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _BOOT_ENV_SIZE 1527 %if (paras(BOOTAUXTARGET1_equate) + paras(auxbuff_size_equate)) != (paras(BOOTCODETARGET2_equate) + paras(ldebug_codes_size_equate)) 1529 %error Unexpected layout 1530 %endif 1531 %endif 1532 %else ; _LINK 1533 %if 0 1534 %define BOOTCODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_size + datastack_size) 1535 %define BOOTCODETARGET2 (BOOTCODETARGET1+auxbuff_size) 1536 %define BOOTAUXTARGET1 (BOOTCODETARGET1+ldebug_code_size+ldebug_code2_size) 1537 %define BOOTAUXTARGET2 BOOTCODETARGET1 1538 %define BOOTAUXTARGET3 (BOOTAUXTARGET1+auxbuff_size) 1539 %endif 1540 ; add bx, paras(BOOTAUXTARGET2) 0 00000515 81C3[0000] add bx, strict word relocatedzero + 0 1542 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 1543 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1544 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1545 ; add dx, paras(BOOTCODETARGET2) 0 00000519 81C2[0102] add dx, strict word relocatedzero + paras(auxbuff_size) 1547 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 1548 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1549 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1550 %endif ; _LINK 0 0000051D E8D8FC call init_check_auxbuff 0 00000520 742D jz @F 1553 1554 d4 call init_d4message 1555 d4 asciz "Second layout rejected",13,10 1556 1557 ; If both prior attempts failed, we allocate 1558 ; an additional 8 KiB and move the buffer to 1559 ; that. This should always succeed. 0 00000522 8B4EFA mov cx, word [bp + ?memtop] 0 00000525 2E030E[140E] add cx, [cs:init_boot_ebdasize] 1562 %ifn _LINK 1563 sub cx, paras(INITSECTIONOFFSET - messagesegment_size + messagesegment_nobits_size + datastack_size + auxbuff_size*2 + historysegment_boot_size + boot_env_size + extsegment_boot_size) 1564 %else ; _LINK 0 0000052A 81E9[820A] sub cx, relocatedzero + paras( + auxbuff_size * 2 + historysegment_boot_size + boot_env_size + extsegment_boot_size) 1570 wlcalc word_segrel_INIT, equ $ - 2 1571 wlcalc word_wrt_MESSAGESEGMENT_minusextpara_behind_messagesegment, equ $ - 2 1572 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1573 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1574 %endif ; _LINK 1575 ; cx = paragraph of pseudo-PSP if here 1576 %if !_LOADER 0 0000052E 49 dec cx ; => paragraph of image ident 0 0000052F 83E1C0 and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 0 00000532 41 inc cx ; => paragraph of pseudo-PSP if here 1580 %else 1581 and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 1582 %endif 0 00000533 89CB mov bx, cx 0 00000535 89DA mov dx, bx 1585 %ifn _LINK 1586 add bx, paras(BOOTAUXTARGET1) ; => auxbuff target if here 1587 ; Note that we use BOOTAUXTARGET1 here, not BOOTAUXTARGET3, because 1588 ; we move where the debugger starts rather than where it ends. 1589 add dx, paras(BOOTCODETARGET1) ; => code target if here 1590 %else ; _LINK 1591 %if 0 1592 %define BOOTCODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_size + datastack_size) 1593 %define BOOTCODETARGET2 (BOOTCODETARGET1+auxbuff_size) 1594 %define BOOTAUXTARGET1 (BOOTCODETARGET1+ldebug_code_size+ldebug_code2_size) 1595 %define BOOTAUXTARGET2 BOOTCODETARGET1 1596 %define BOOTAUXTARGET3 (BOOTAUXTARGET1+auxbuff_size) 1597 %endif 1598 ; add bx, paras(BOOTAUXTARGET1) 0 00000537 81C3[0000] add bx, strict word relocatedzero + 0 1600 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 1601 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1602 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1603 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code, equ $ - 2 1604 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 1605 ; Note that we use BOOTAUXTARGET1 here, not BOOTAUXTARGET3, because 1606 ; we move where the debugger starts rather than where it ends. 1607 ; add dx, paras(BOOTCODETARGET1) 0 0000053B 81C2[0000] add dx, strict word relocatedzero + 0 1609 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 1610 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1611 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1612 %endif ; _LINK 1613 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _BOOT_ENV_SIZE 0 0000053F 89D8 mov ax, bx 0 00000541 050102 add ax, paras(auxbuff_size) 1616 %endif 0 00000544 E8B1FC call init_check_auxbuff 0 00000547 7406 jz @F 1619 1620 ; Because this shouldn't happen, this is 1621 ; considered an internal error. 0 00000549 BA[B00F] mov dx, imsg.early_reloc_fail 0 0000054C E9E7FE jmp .putsz_error 1624 1625 1626 ; cx => data_entry target 1627 ; dx => code target 1628 ; bx => auxbuff target 1629 ; ax => history segment 1630 @@: 1631 d4 call init_d4message 1632 d4 asciz "Layout found" 1633 d4 call init_d4dumpregs 1634 d4 call init_d4message 1635 d4 asciz 13,10 1636 1637 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _BOOT_ENV_SIZE 0 0000054F 50 push ax 1639 %endif 0 00000550 894EFE mov word [bp + ?target], cx 0 00000553 52 push dx 0 00000554 2E803E[1A0E]00 cmp byte [cs:init_boot_ebdaflag], 0 0 0000055A 742F jz .reloc_memtop_no_ebda 1644 %if !_LOADER 0 0000055C 49 dec cx 1646 %endif 0 0000055D 2E2B0E[140E] sub cx, word [cs:init_boot_ebdasize] 0 00000562 2EA1[160E] mov ax, word [cs:init_boot_ebdasource] 0 00000566 89CA mov dx, cx 0 00000568 2E890E[180E] mov word [cs:init_boot_ebdadest], cx 0 0000056D 2E8B0E[140E] mov cx, word [cs:init_boot_ebdasize] 0 00000572 FA cli 0 00000573 E87A14 call init_movp 0 00000576 014EFA add word [bp + ?memtop], cx 0 00000579 2E800E[1A0E]02 or byte [cs:init_boot_ebdaflag], 2 0 0000057F B84000 mov ax, 40h 0 00000582 8EC0 mov es, ax 0 00000584 2689160E00 mov word [es:0Eh], dx ; relocate EBDA 1659 1660 d4 call init_d4message 1661 d4 asciz "EBDA relocated",13,10 1662 0 00000589 EB02 jmp @F 1664 1665 .reloc_memtop_no_ebda: 0 0000058B 89CA mov dx, cx 1667 @@: 0 0000058D B106 mov cl, 6 0 0000058F D3EA shr dx, cl 0 00000591 B84000 mov ax, 40h 0 00000594 8EC0 mov es, ax 0 00000596 2E8916[100E] mov word [ cs:init_boot_new_memsizekib ], dx 0 0000059B 2687161300 xchg word [es:13h], dx 0 000005A0 2E8916[120E] mov word [ cs:init_boot_old_memsizekib ], dx 0 000005A5 5A pop dx 0 000005A6 FB sti 1677 d4 call init_d4message 1678 d4 asciz "Memory top relocated",13,10 1679 0 000005A7 8B4EFE mov cx, word [bp + ?target] 0 000005AA 8ED9 mov ds, cx 0 000005AC 8B7EFA mov di, word [bp + ?memtop] ; => memory top 0 000005AF 81EF4002 sub di, paras(1024+8192) 0 000005B3 8EC7 mov es, di 0 000005B5 39CF cmp di, cx ; max padding starts below target PSP ? 0 000005B7 7209 jb @F ; yes, do not initialise padding 0 000005B9 31FF xor di, di ; -> padding 0 000005BB B90012 mov cx, words(1024+8192) 0 000005BE 31C0 xor ax, ax 0 000005C0 F3AB rep stosw ; initialise padding 1691 @@: 1692 0 000005C2 8B46F4 mov ax, word [bp + ?code] ; => code source 1694 ; dx => code target 1695 %ifn _LINK 1696 mov cx, ldebug_code_size_p + ldebug_code2_size_p ; untruncated 1697 ; = size 1698 %else 0 000005C5 B9[0000] mov cx, relocatedzero + 0 1700 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code2, equ $ - 2 1701 %endif 0 000005C8 E82514 call init_movp ; relocate code to target 1703 d4 call init_d4message 1704 d4 asciz "Code segment relocated",13,10 1705 0 000005CB 52 push dx ; (code segment) 0 000005CC 8B46F8 mov ax, word [bp + ?data] ; => data_entry source 0 000005CF 8CDA mov dx, ds 0 000005D1 83C210 add dx, paras(100h) ; => data_entry target 1710 %ifn _LINK 1711 mov cx, paras(DATAENTRYTABLESIZE) 1712 %else 0 000005D4 B9[F0FF] mov cx, relocatedzero + - paras(256) 1714 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_behind_progbits_dataentry, equ $ - 2 1715 %endif 0 000005D7 E81614 call init_movp ; relocate data_entry to target 0 000005DA 8F06[0000] pop word [code_seg] ; initialise code reference 1718 d4 call init_d4message 1719 d4 asciz "Data segment relocated",13,10 1720 1721 %if _MESSAGESEGMENT 0 000005DE 8B46F8 mov ax, word [bp + ?data] ; => data_entry source 1723 %ifn _LINK 1724 add ax, paras(MESSAGESECTIONOFFSET - 100h) 1725 mov dx, ds 1726 add dx, paras(100h + DATAENTRYTABLESIZE + datastack_size) 1727 mov cx, paras(messagesegment_size) 1728 %else 0 000005E1 05[F0FF] add ax, strict word relocatedzero + - paras(100h) 1730 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 0 000005E4 8CDA mov dx, ds 0 000005E6 81C2[0000] add dx, strict word relocatedzero + 0 1733 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_end_of_datastack, equ $ - 2 0 000005EA B9[0000] mov cx, relocatedzero + 0 1735 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment, equ $ - 2 1736 %endif 0 000005ED E80014 call init_movp 0 000005F0 8916[0000] mov word [messageseg], dx 1739 %if _HELP_COMPRESSED && ! _PM 1740 mov [hshrink_memory_source.segment], dx 1741 %endif 0 000005F4 8EC2 mov es, dx 1743 %ifn _LINK 1744 mov di, messagesegment_size 1745 xor ax, ax 1746 mov cx, words(messagesegment_nobits_size - messagesegment_size) 1747 %else 0 000005F6 BF[0000] mov di, relocatedzero + 0 1749 wlcalc word_wrt_MESSAGESEGMENT_ext_behind_messagesegment, equ $ - 2 0 000005F9 31C0 xor ax, ax 0 000005FB B9[0100] mov cx, behind_messagesegment_nobits + 1 wrt MESSAGESEGMENT 1752 wlcalc word_wrt_MESSAGESEGMENT_minusext_behind_messagesegment, equ $ - 2 1753 wlcalc word_shr_1, equ $ - 2 1754 %endif 0 000005FE F3AB rep stosw 1756 %endif 1757 1758 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _BOOT_ENV_SIZE 0 00000600 58 pop ax 1760 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00000601 A3[0000] mov word [history.segorsel + soaSegSel], ax 1762 %if _PM 1763 mov word [history.segorsel + soaSegment], ax 1764 %endif 0 00000604 8EC0 mov es, ax 0 00000606 31FF xor di, di 0 00000608 B90010 mov cx, historysegment_boot_size >> 1 0 0000060B 31C0 xor ax, ax 0 0000060D F3AB rep stosw 1770 %endif 1771 1772 %if _BOOT_ENV_SIZE 1773 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 0000060F 8CC0 mov ax, es 0 00000611 050002 add ax, paras(historysegment_boot_size) 1776 %endif 0 00000614 A3[0000] mov word [envseg], ax 0 00000617 8EC0 mov es, ax 0 00000619 89C2 mov dx, ax 0 0000061B 42 inc dx 0 0000061C 31FF xor di, di 0 0000061E B90004 mov cx, boot_env_size >> 1 0 00000621 C706[0000]0008 mov word [env_size], boot_env_size 0 00000627 31C0 xor ax, ax 0 00000629 F3AB rep stosw 0 0000062B 26C70603007F00 mov word [es:3], paras(boot_env_size - 16) 1787 %endif 1788 1789 %if _EXTENSIONS 1790 %if _HISTORY_SEPARATE_FIXED && _HISTORY || _BOOT_ENV_SIZE 0 00000632 8CC0 mov ax, es 1792 %if _BOOT_ENV_SIZE 0 00000634 058000 add ax, paras(boot_env_size) 1794 %else 1795 add ax, paras(historysegment_boot_size) 1796 %endif 1797 %endif 0 00000637 A3[0000] mov word [extseg], ax 0 0000063A 8EC0 mov es, ax 0 0000063C 31FF xor di, di 0 0000063E B90020 mov cx, extsegment_boot_size >> 1 0 00000641 C706[0000]0040 mov word [extseg_size], extsegment_boot_size 0 00000647 31C0 xor ax, ax 0 00000649 F3AB rep stosw 1805 %endif 1806 %endif 1807 0 0000064B 89D8 mov ax, bx 0 0000064D A3[0000] mov word [auxbuff_segorsel + soaSegSel], ax 1810 %if _PM 1811 mov word [auxbuff_segorsel + soaSegment], ax 1812 ; initialise auxbuff references 1813 %endif 1814 %if _IMMASM && _IMMASM_AUXBUFF 1815 mov word [immseg], ax 1816 %endif 1817 0 00000650 8EC0 mov es, ax 0 00000652 31FF xor di, di 0 00000654 B90810 mov cx, _AUXBUFFSIZE >> 1 0 00000657 31C0 xor ax, ax 0 00000659 F3AB rep stosw ; initialise auxbuff 1823 d4 call init_d4message 1824 d4 asciz "auxbuff initialised",13,10 1825 0 0000065B 1E push ds 0 0000065C 07 pop es 0 0000065D 31FF xor di, di 0 0000065F B98000 mov cx, words(100h) 0 00000662 F3AB rep stosw ; initialise pseudo-PSP 1831 %if _BOOT_ENV_SIZE 0 00000664 89162C00 mov word [2Ch], dx 1833 %endif 1834 %if _EXTENSIONS 0 00000668 8B0E[0000] mov cx, word [extdata_size] 0 0000066C BF[0000] mov di, ext_data_area 0 0000066F B000 mov al, 0 0 00000671 F3AA rep stosb ; init ext data area 1839 %endif 1840 1841 init_boot_imageident: 0 00000673 8CD8 mov ax, ds 1843 %if !_LOADER 0 00000675 48 dec ax 1845 %endif 0 00000676 8EC0 mov es, ax ; => paragraph for imageident 0 00000678 31FF xor di, di ; -> imageident target 0 0000067A 8B5EFA mov bx, word [bp + ?memtop] 0 0000067D 29C3 sub bx, ax ; = how many paragraphs do we use ? 1850 0 0000067F 891E[0000] mov word [alloc_size], bx 0 00000683 A3[0000] mov word [alloc_seg], ax 1853 0 00000686 0E push cs 0 00000687 1F pop ds 0 00000688 891E[480D] mov word [imageident.size], bx ; set image ident size 1857 0 0000068C BE[400D] mov si, imageident 0 0000068F 56 push si 0 00000690 B90800 mov cx, 8 0 00000693 31D2 xor dx, dx 1862 .loop: 0 00000695 AD lodsw 0 00000696 01C2 add dx, ax 0 00000698 E2FB loop .loop 0 0000069A 5E pop si 1867 0 0000069B F7DA neg dx 0 0000069D 8916[460D] mov word [imageident.check], dx ; set image ident checksum 1870 1871 %if !_LOADER 0 000006A1 B108 mov cl, 8 1873 %else 1874 mov cl, words(2Ch) 1875 %endif 0 000006A3 F3A5 rep movsw ; write image ident paragraph 1877 ; cx = 0 1878 1879 %if !_LOADER 0 000006A5 2ED006[1B0E] rol byte [cs:init_preserveloader], 1 0 000006AA 730F jnc @F 0 000006AC 8B56F2 mov dx, word [bp + ?loaderentry + 2] 0 000006AF 8EC2 mov es, dx 0 000006B1 268B0E1400 mov cx, word [es:liiEntryDebug] ; cx nonzero if it has an entry 0 000006B6 268B1E1600 mov bx, word [es:liiStackPointer] 1886 ; fallback as zero if not supported 1887 @@: 1888 %endif 1889 0 000006BB 8B46FE mov ax, word [bp + ?target] 1891 1892 ; lleave ctx ; dropping this frame for stack switch 1893 ; Frame context still used by get_size_and_ebda 1894 0 000006BE FA cli 0 000006BF 8ED8 mov ds, ax 0 000006C1 8EC0 mov es, ax 0 000006C3 8ED0 mov ss, ax 0 000006C5 BC[0000] mov sp, stack_end ; boot mode stack switch 0 000006C8 FB sti 1901 1902 %if !_LOADER 0 000006C9 E337 jcxz init_boot_noloader 0 000006CB 890E[0000] mov word [reg_eip], cx 0 000006CF 891E[0000] mov word [reg_esp], bx 1906 0 000006D3 31C0 xor ax, ax ; initialise ax = 0 and FL = ZR NC etc 0 000006D5 9C pushf 0 000006D6 8F06[0000] pop word [reg_efl] ; set to FL 1910 0 000006DA 92 xchg ax, dx 0 000006DB BF[0000] mov di, reg_ds 0 000006DE AB stosw 0 000006DF AF scasw ; (skip dummy high word) 0 000006E0 AB stosw 0 000006E1 AF scasw 0 000006E2 AB stosw 0 000006E3 AF scasw 0 000006E4 AB stosw 1920 1921 ; Set up initial addresses for 'a', 'd', and 'u' commands. 1922 init_loader_adusetup: 0 000006E5 A1[0000] mov ax, word [reg_eip] 0 000006E8 8B0E[0200] mov cx, word [reg_eip+2] 0 000006EC 8B1E[0000] mov bx, word [reg_cs] 0 000006F0 BA[0000] mov dx, var_addr_entries.amount 0 000006F3 BF[0000] mov di, var_addr_entries 1928 1929 .loop: 0 000006F6 AB stosw ; IP 1931 %if saSegSel == 4 0 000006F7 890D mov word [di], cx 0 000006F9 AF scasw ; skip this word 1934 %endif 0 000006FA 93 xchg ax, bx 0 000006FB AB stosw ; CS 1937 %if _PM 1938 %if SEGADR_size != 10 1939 %error Unexpected SEGADR size 1940 %endif 1941 .86m: 1942 stosw ; store saSegment 1943 scasw ; skip saSelector 1944 %else 1945 %if SEGADR_size == 10 1946 %error Unexpected SEGADR size 1947 %endif 1948 %endif 0 000006FC 93 xchg ax, bx ; d_addr 1950 0 000006FD 4A dec dx 0 000006FE 75F6 jnz .loop 0 00000700 EB05 jmp @F 1954 %endif 1955 1956 init_boot_noloader: 0 00000702 800E[0200]20 setopt [internalflags3], dif3_gotint19 1958 @@: 1959 0 00000707 2EFF36[120E] push word [cs:init_boot_old_memsizekib] 0 0000070C 8F06[0000] pop word [boot_old_memsizekib] 0 00000710 2EFF36[100E] push word [cs:init_boot_new_memsizekib] 0 00000715 8F06[0000] pop word [boot_new_memsizekib] 0 00000719 2EA0[1A0E] mov al, byte [cs:init_boot_ebdaflag] 0 0000071D 2401 and al, 1 0 0000071F A2[0000] mov byte [boot_ebdaflag], al 1967 0 00000722 800E[0100]40 setopt [internalflags], nodosloaded 0 00000727 8026[0000]0F clropt [internalflags], notstdinput|inputfile|notstdoutput|outputfile 0 0000072C C606[0000]00 mov byte [notatty], 0 ; it _is_ a tty 1971 0 00000731 BA[580F] mov dx, imsg.crlf 0 00000734 E84A13 call init_putsz_cs 1974 1975 d4 call init_d4message 1976 d4 asciz "New boot_initcode done",13,10 1977 1978 %if _CONFIG 1979 write_config_boot: 0 00000737 BF[0000] mov di, configpath 0 0000073A B86C64 mov ax, "ld" 0 0000073D AB stosw 0 0000073E B8702F mov ax, "p/" 0 00000741 AB stosw 0 00000742 893E[0000] mov word [configpath.dir_end], di 0 00000746 BF[0000] mov di, scriptspath 0 00000749 B86C64 mov ax, "ld" 0 0000074C AB stosw 0 0000074D B8702F mov ax, "p/" 0 00000750 AB stosw 0 00000751 893E[0000] mov word [scriptspath.dir_end], di 1992 %endif 1993 0 00000755 E99213 jmp boot_old_initcode 1995 1996 1997 ; INP: ds:si -> first byte to check for name 1998 ; cx = number of bytes left 1999 ; OUT: (8+1+3+1)bytes[es:boot_init_foundname] = found name, 2000 ; converted to 8.3 ASCIZ format, 2001 ; not written if none 2002 ; CY if no filename found, 2003 ; si = INP:si + INP:cx 2004 ; cx = 0 2005 ; NC if filename found, 2006 ; ds:si -> byte behind the name, thus ds:(si-11)-> name 2007 ; cx = number of bytes left 2008 ; CHG: di, ax 2009 findname: 2010 .: 0 00000758 83F90B cmp cx, 11 ; enough for another name ? 0 0000075B 7275 jb .none ; no --> 2013 ; (cx == 0 jumps here too) 2014 .check: 0 0000075D 51 push cx 0 0000075E 56 push si 0 0000075F B90B00 mov cx, 11 0 00000762 AC lodsb 0 00000763 88C4 mov ah, al ; check for same char in all 11 places 0 00000765 3C20 cmp al, 32 ; first character must not be blank 0 00000767 740D je .check_fail ; if it is --> 2022 ; cmp al, 5 ; first character may be 05h to indicate 0E5h 2023 ; je .check_pass 0 00000769 A8 db __TEST_IMM8 ; (skip lodsb) 2025 .check_loop_same: 0 0000076A AC lodsb 0 0000076B 38C4 cmp ah, al 0 0000076D 752E jne .check_loop_differs 0 0000076F E80A00 call .check_character 0 00000772 7202 jc .check_fail 0 00000774 E2F4 loop .check_loop_same 2032 ; if we arrive here, all characters (while valid) are the 2033 ; same character repeated 11 times. we disallow this in case 2034 ; that the padding character is an allowed one (eg '&' 26h). 2035 .check_fail: 0 00000776 5E pop si 0 00000777 59 pop cx 0 00000778 49 dec cx ; lessen the counter 0 00000779 46 inc si ; -> next position to check 0 0000077A EBDC jmp . 2041 2042 .check_character: 0 0000077C 3C20 cmp al, 32 0 0000077E 7218 jb .check_character_fail 0 00000780 3C7F cmp al, 127 2046 ; je .check_character_fail 0 00000782 7314 jae .check_character_fail 2048 ; note: with all characters >= 128 allowed, 2049 ; we get false positives in our sectors. 0 00000784 3C2E cmp al, '.' 0 00000786 7410 je .check_character_fail 0 00000788 3C2F cmp al, '/' 0 0000078A 740C je .check_character_fail 0 0000078C 3C5C cmp al, '\' 0 0000078E 7408 je .check_character_fail 0 00000790 3C61 cmp al, 'a' 0 00000792 7206 jb .check_character_pass 0 00000794 3C7A cmp al, 'z' 0 00000796 7702 ja .check_character_pass 2060 .check_character_fail: 0 00000798 F9 stc 0 00000799 C3 retn 2063 2064 .check_character_pass: 0 0000079A F8 clc 0 0000079B C3 retn 2067 2068 .check_loop: 0 0000079C AC lodsb 2070 .check_loop_differs: 0 0000079D E8DCFF call .check_character 0 000007A0 72D4 jc .check_fail 0 000007A2 3C20 cmp al, 32 0 000007A4 740F je .check_loop_is_blank 2075 .check_pass: 0 000007A6 E2F4 loop .check_loop 2077 0 000007A8 58 pop ax ; (discard si) 0 000007A9 83EE0B sub si, 11 ; -> at name 2080 0 000007AC E82900 call convert_name_to_asciz 2082 ; si -> behind name 0 000007AF 59 pop cx 0 000007B0 83E90B sub cx, 11 ; lessen the counter 0 000007B3 F8 clc 0 000007B4 C3 retn 2087 2088 .check_loop_is_blank: 0 000007B5 88CC mov ah, cl ; = how many remaining in ext (1 to 3) 2090 ; or name+ext (1 to 10, cannot be 11) 0 000007B7 80FC03 cmp ah, 3 ; in ext ? 0 000007BA 7605 jbe @F ; yes --> 0 000007BC 80EC03 sub ah, 3 ; 1 to 7 name field remaining 0 000007BF A8 db __TEST_IMM8 ; (skip lodsb) 2095 .check_loop_blank: 0 000007C0 AC lodsb 2097 @@: 0 000007C1 E8B8FF call .check_character ; general check 0 000007C4 72B0 jc .check_fail 0 000007C6 3C20 cmp al, 32 ; non-blank ? 0 000007C8 75AC jne .check_fail ; yes, fails --> 0 000007CA FECC dec ah ; at end of field ? 0 000007CC 74D8 jz .check_pass ; yes --> 2104 ; no, still in field after blank. 2105 ; check that next trail is all blanks too. 0 000007CE E2F0 loop .check_loop_blank 0 000007D0 EBA4 jmp .check_fail ; (never reached) 2108 2109 .none: 0 000007D2 01CE add si, cx 0 000007D4 31C9 xor cx, cx 0 000007D6 F9 stc 0 000007D7 C3 retn 2114 2115 2116 ; INP: ds:si -> 11-byte blank-padded name 2117 ; es:boot_init_foundname -> (8+1+3+1)-byte buffer 2118 ; OUT: ds:si -> behind 11-byte blank-padded name 2119 ; es:boot_init_foundname filled 2120 ; CHG: cx, di, ax 2121 convert_name_to_asciz: 0 000007D8 BF[0000] mov di, boot_init_foundname 0 000007DB B90800 mov cx, 8 0 000007DE F3A4 rep movsb ; copy over base name, si -> extension 0 000007E0 26807DF805 cmp byte [es:di - 8], 05h ; is it 05h ? 0 000007E5 7505 jne @F ; no --> 0 000007E7 26C645F8E5 mov byte [es:di - 8], 0E5h ; yes, convert to 0E5h 2128 @@: 2129 0 000007EC A8 db __TEST_IMM8 ; (skip dec) 2131 @@: 0 000007ED 4F dec di ; decrement -> at previous trailing blank 0 000007EE 26807DFF20 cmp byte [es:di - 1], 32 ; trailing blank ? 0 000007F3 74F8 je @B ; yes --> 2135 0 000007F5 B02E mov al, '.' 0 000007F7 AA stosb ; store dot (if needed) 0 000007F8 B103 mov cl, 3 0 000007FA F3A4 rep movsb ; copy over extension, si -> behind name 2140 0 000007FC A8 db __TEST_IMM8 ; (skip dec) 2142 @@: 0 000007FD 4F dec di ; decrement -> at previous trailing blank 0 000007FE 26807DFF20 cmp byte [es:di - 1], 32 ; trailing blank ? 0 00000803 74F8 je @B ; yes --> 2146 0 00000805 26807DFF2E cmp byte [es:di - 1], '.' ; trailing dot ? (only occurs if all-blank ext) 0 0000080A 7501 jne @F ; no --> 0 0000080C 4F dec di ; -> at the dot 2150 @@: 0 0000080D B000 mov al, 0 0 0000080F AA stosb ; store filename terminator 0 00000810 C3 retn 2154 2155 2156 get_size_and_ebda: 0 00000811 CD12 int 12h 0 00000813 B106 mov cl, 6 0 00000815 D3E0 shl ax, cl 2160 0 00000817 50 push ax 0 00000818 1E push ds 0 00000819 31F6 xor si, si 0 0000081B 92 xchg dx, ax 0 0000081C 8EDE mov ds, si 0 0000081E C536BC00 lds si, [4 * 2Fh] 0 00000822 83C603 add si, 3 0 00000825 AC lodsb 0 00000826 3C52 cmp al, 'R' 0 00000828 750F jne .no_rpl 0 0000082A AC lodsb 0 0000082B 3C50 cmp al, 'P' 0 0000082D 750A jne .no_rpl 0 0000082F AC lodsb 0 00000830 3C4C cmp al, 'L' 0 00000832 7505 jne .no_rpl 0 00000834 B8064A mov ax, 4A06h 0 00000837 CD2F int 2Fh 2179 .no_rpl: 0 00000839 92 xchg ax, dx 0 0000083A 1F pop ds 0 0000083B 5A pop dx 2183 0 0000083C 39D0 cmp ax, dx 0 0000083E 7406 je .no_error_rpl 2186 ; in case RPL is present, error out (for now) 2187 2188 ; notes for +RPL installation: 2189 ; 1. Allocate enough memory for our MCB + an PSP + our image + the last and the RPL MCB 2190 ; 2. Create the RPL's MCB + a last MCB 2191 ; 3. Relocate, initialise PSP 2192 ; 4. Hook Int2F as RPLOADER to report DOS our new size 2193 0 00000840 BA[2817] mov dx, imsg.rpl_detected 0 00000843 E9F0FB jmp .putsz_error 2196 2197 .no_error_rpl: 2198 d4 call init_d4message 2199 d4 asciz "Loader past RPL detection",13,10 2200 0 00000846 8B5EFA mov bx, word [bp + ?memtop] 0 00000849 39C3 cmp bx, ax 0 0000084B 740D je @F 2204 2205 ; Special debugging support: If memtop is below 2206 ; what we detected using int 12h then update 2207 ; memtop and continue with the changed memtop. 2208 ; The relocations done will suffice in any case. 0 0000084D 8946FA mov word [bp + ?memtop], ax 0 00000850 89C3 mov bx, ax 0 00000852 7206 jb @F 2212 0 00000854 BA[4F17] mov dx, imsg.mismatch_detected 0 00000857 E9DCFB jmp .putsz_error 2215 2216 @@: ; bx => behind usable memory 2217 %if 0 2218 mov ah, 0C1h 2219 stc 2220 int 15h ; BIOS, do you have an EBDA? 2221 mov ax, es 2222 jnc .ebda ; segment in ax --> 2223 ; I don't believe you, let's check 2224 %endif ; Enabling this would enable the BIOS to return an EBDA even if it isn't 2225 ; noted at 40h:0Eh, which would be useless because we have to relocate it. 2226 0 0000085A 31D2 xor dx, dx ; initialise dx to zero if no EBDA 0 0000085C B84000 mov ax, 40h 0 0000085F 8EC0 mov es, ax 0 00000861 26A10E00 mov ax, word [ es:0Eh ] ; EBDA segment (unless zero) or LPT4 base I/O address (200h..3FCh) 0 00000865 3D0004 cmp ax, 400h 0 00000868 7225 jb .noebda ; --> 2233 .ebda: 2234 d4 call init_d4message 2235 d4 asciz "EBDA detected",13,10 2236 0 0000086A 2E800E[1A0E]01 or byte [cs:init_boot_ebdaflag], 1 0 00000870 39D8 cmp ax, bx 2239 ;jb init_booterror.soft ; uhh, the EBDA is inside our memory? 2240 ;ja init_booterror.soft ; EBDA higher than top of memory. This is just as unexpected. 0 00000872 7406 je @F 0 00000874 BA[8317] mov dx, imsg.boot_ebda_unexpected 0 00000877 E9BCFB jmp .putsz_error 2244 2245 @@: 0 0000087A 8ED8 mov ds, ax 0 0000087C 31D2 xor dx, dx 0 0000087E 8A160000 mov dl, byte [ 0 ] ; EBDA size in KiB 0 00000882 B106 mov cl, 6 0 00000884 D3E2 shl dx, cl ; *64, to paragraphs 0 00000886 2E8916[140E] mov word [cs:init_boot_ebdasize], dx 0 0000088B 2EA3[160E] mov word [cs:init_boot_ebdasource], ax 2253 d4 jmp @F 2254 .noebda: 2255 d4 call init_d4message 2256 d4 asciz "No EBDA detected",13,10 2257 @@: 0 0000088F C3 retn 2259 2260 .putsz_error: equ boot_initcode.putsz_error 2261 2262 lleave ctx ; dropping early boot_initcode frame 2263 2264 2265 init_booterror: 2266 .soft: 0 00000890 31C0 xor ax, ax 0 00000892 A9 db __TEST_IMM16 ; (skip mov) 2269 .hard: 0 00000893 B001 mov al, 1 2271 2272 ;d4 call init_d4pocketdosmemdump 2273 d4 call init_d4dumpregs 2274 2275 .patch_switch_stack: 0 00000895 EB09 jmp strict short .no_switch_stack 2277 0 00000897 8CCB mov bx, cs 0 00000899 FA cli 0 0000089A 8ED3 mov ss, bx 2281 %ifn _LINK 2282 mov sp, init_size + BOOTINITSTACK_SIZE 2283 %else 0 0000089C BC[0002] mov sp, BOOTINITSTACK_SIZE + behind_init wrt INIT 2285 %endif 0 0000089F FB sti 2287 2288 .no_switch_stack: 0 000008A0 50 push ax 2290 0 000008A1 B84000 mov ax, 40h 0 000008A4 8EC0 mov es, ax 2293 0 000008A6 2EF606[1A0E]02 test byte [cs:init_boot_ebdaflag], 2 0 000008AC 7417 jz @F 2296 0 000008AE FA cli 0 000008AF 2E8B16[160E] mov dx, [cs:init_boot_ebdasource] 0 000008B4 2EA1[180E] mov ax, [cs:init_boot_ebdadest] 0 000008B8 2E8B0E[140E] mov cx, [cs:init_boot_ebdasize] 0 000008BD E83011 call init_movp 2302 0 000008C0 2689160E00 mov word [es:0Eh], dx 2304 @@: 2305 0 000008C5 2E8B16[120E] mov dx, [cs:init_boot_old_memsizekib] 0 000008CA 85D2 test dx, dx 0 000008CC 7405 jz @F 0 000008CE 2689161300 mov word [es:13h], dx 2310 @@: 0 000008D3 FB sti 2312 0 000008D4 BA[E117] mov dx, imsg.booterror 0 000008D7 E8C911 call init_putsz_cs_bootldr 0 000008DA E89F11 call init_getc_bootldr 0 000008DD 58 pop ax 0 000008DE 85C0 test ax, ax 0 000008E0 7502 jnz @F 0 000008E2 CD19 int 19h 2320 @@: 0 000008E4 EA0000FFFF jmp 0FFFFh:0 2322 %endif ; _BOOTLDR 2323 2324 %if _DEVICE 2325 ; Our entrypoint transfers control to us with these registers: 2326 ; INP: ss:sp -> bx, fl, ds, ax, far return address to DOS 2327 ; ds:100h -> loaded payload 2328 device_initcode: 0 000008E9 FC cld 2330 0 000008EA 830E[0000]FF or word [device_header.next], -1 2332 ; ! this uses offset 100h in the adjusted ds 2333 0 000008EF 5B pop bx 0 000008F0 06 push es 0 000008F1 53 push bx 0 000008F2 51 push cx 0 000008F3 52 push dx 0 000008F4 56 push si 0 000008F5 57 push di 2341 0 000008F6 268B470E mov ax, word [es:bx + 0Eh] ; ax = amount bytes in last segment 0 000008FA B104 mov cl, 4 0 000008FC D3E8 shr ax, cl ; = paragraphs, rounding down 0 000008FE 26034710 add ax, word [es:bx + 0Eh + 2] ; => behind available memory 0 00000902 7212 jc .memorybad 0 00000904 2EA3[EE0D] mov word [cs:dev_memory_end], ax 0 00000908 8CDA mov dx, ds 0 0000090A 83C210 add dx, 10h ; => our memory 0 0000090D 29D0 sub ax, dx ; ax = amount available paragraphs 0 0000090F 7205 jc .memorybad 2352 2353 %ifn _LINK 2354 cmp ax, (DEVICEINITSIZE + 15) >> 4 2355 %else 2356 %if 0 2357 %define DEVICEADJUST (deviceshim_size + 110h) 2358 %define DEVICEINITTARGET (INITSECTIONOFFSET + DEVICEADJUST + datastack_size + ext_data_nonboot_add_size + auxbuff_size + auxbuff_init_size + historysegment_size + dev_env_size + extsegment_size + 10h) 2367 %define DEVICEINITSIZE (DEVICEINITTARGET - 100h + init_size + deviceshim_size) 2370 %endif 0 00000911 3D[8318] cmp ax, strict word relocatedzero + paras( + 0FFF0h + auxbuff_size + auxbuff_init_size + historysegment_size + dev_env_size + extsegment_size + 20h) 2378 wlcalc word_segrel_INIT, equ $ - 2 2379 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2380 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_minusextpara_end_of_datastack, equ $ - 2 2381 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 2382 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2383 %endif 0 00000914 7333 jae .memorygood 2385 2386 .memorybad: 0 00000916 BA[360F] mov dx, imsg.early_mem_fail 0 00000919 E86511 call init_putsz_cs 2389 0 0000091C B80030 mov ax, 3000h 0 0000091F CD21 int 21h 0 00000921 3C05 cmp al, 5 0 00000923 7306 jae @F 0 00000925 BA[DE0F] mov dx, imsg.dos_below_5 2395 .earlyfail: 0 00000928 E85611 call init_putsz_cs 2397 @@: 2398 0 0000092B 5F pop di 0 0000092C 5E pop si 0 0000092D 5A pop dx 0 0000092E 59 pop cx 0 0000092F 5B pop bx 0 00000930 07 pop es 2405 0 00000931 8CD8 mov ax, ds 0 00000933 83C010 add ax, paras(100h) 0 00000936 26C747030581 mov word [es:bx + 3], 8105h ; error, done, code: bad structure length 0 0000093C 2683670E00 and word [es:bx + 0Eh], 0 0 00000941 26894710 mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 2411 0 00000945 9D popf 0 00000946 1F pop ds 0 00000947 58 pop ax 0 00000948 CB retf 2416 2417 .memorygood: 0 00000949 8CD8 mov ax, ds 2419 %ifn _LINK 2420 add ax, paras(INITSECTIONOFFSET) 2421 %else 0 0000094B 05[0000] add ax, strict word relocatedzero + 0 2423 wlcalc word_segrel_INIT, equ $ - 2 2424 %endif 0 0000094E 8CDA mov dx, ds 2426 %ifn _LINK 2427 add dx, paras(DEVICEINITTARGET) 2428 mov cx, init_size_p + deviceshim_size_p 2429 %else 2430 %if 0 2431 %define DEVICEADJUST (deviceshim_size + 110h) 2432 %define DEVICEINITTARGET (INITSECTIONOFFSET + DEVICEADJUST + datastack_size + ext_data_nonboot_add_size + auxbuff_size + auxbuff_init_size + historysegment_size + dev_env_size + extsegment_size + 10h) 2441 %define DEVICEINITSIZE (DEVICEINITTARGET - 100h + init_size + deviceshim_size) 2444 %endif 0 00000950 81C2[9318] add dx, strict word relocatedzero + paras( + 0FFF0h + auxbuff_size + auxbuff_init_size + historysegment_size + dev_env_size + extsegment_size + 120h) 2452 wlcalc word_segrel_INIT, equ $ - 2 2453 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2454 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_minusextpara_end_of_datastack, equ $ - 2 0 00000954 B9[0000] mov cx, relocatedzero + 0 2456 wlcalc word_wrt_INIT_extpara_behind_deviceshim, equ $ - 2 2457 %endif 0 00000957 E89610 call init_movp 2459 %ifn _LINK 2460 init_plus_deviceshim_size_p_equate equ init_size_p + deviceshim_size_p 2461 deviceinittarget_p_equate equ paras(DEVICEINITTARGET) 2462 %if initsectionoffset_p_equate + init_plus_deviceshim_size_p_equate > deviceinittarget_p_equate 2464 %error Overlap detected 2465 %endif 2466 %endif 2467 0 0000095A 52 push dx 0 0000095B E899F8 call init_retf 2470 2471 %if _DEV_ENV_SIZE 2472 %ifn _LINK 2473 mov word [cs:memsize], paras(CODETARGET2 + ldebug_code_bootldr_truncated_size + ldebug_code2_size + historysegment_size + dev_env_size + extsegment_size) 2479 %else 2480 %if 0 2481 %define CODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_truncated_size + datastack_size) 2482 %define CODETARGET2 (CODETARGET1+auxbuff_size) 2483 %define AUXTARGET1 (CODETARGET1+ldebug_code_bootldr_truncated_size+ldebug_code2_size) 2484 %define AUXTARGET2 CODETARGET1 2485 %define AUXTARGET3 (AUXTARGET1+auxbuff_size) 2486 %endif 0 0000095E 2EC706[E60D][8106] mov word [cs:memsize], relocatedzero + paras(auxbuff_size + historysegment_size + dev_env_size + extsegment_size) 2491 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 2492 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 2493 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 2494 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 2495 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 2496 %endif 0 00000965 2EC706[E80D]8000 mov word [cs:mem_envsize], paras(dev_env_size) 2498 %endif 2499 0 0000096C 8CDB mov bx, ds 2501 %ifn _LINK 2502 add bx, FORCESTRICTWORD paras(DEVICEADJUST) 2503 %else 2504 ;%define DEVICEADJUST (deviceshim_size + 110h) 0 0000096E 81C3[1100] add bx, strict word relocatedzero + paras(110h) 2506 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2507 %endif 0 00000972 89DA mov dx, bx 2509 %ifn _LINK 2510 add bx, paras(AUXTARGET1) 2511 add dx, paras(CODETARGET1) 2512 %else 2513 ; add bx, paras(AUXTARGET1) 0 00000974 81C3[0000] add bx, strict word relocatedzero + 0 2515 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 2516 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 2517 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 2518 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 2519 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 2520 ; add dx, paras(CODETARGET1) 0 00000978 81C2[0000] add dx, strict word relocatedzero + 0 2522 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 2523 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 2524 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 2525 %endif 2526 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _DEV_ENV_SIZE 0 0000097C 89D8 mov ax, bx 0 0000097E 050102 add ax, paras(auxbuff_size) 2529 %endif 0 00000981 89D1 mov cx, dx 0 00000983 2EC706[EC0D][4732] mov word [cs:init_layout], init_dev_layout_1 0 0000098A E86BF8 call init_check_auxbuff 0 0000098D 7446 jz @F 2534 0 0000098F 8CDB mov bx, ds 2536 %ifn _LINK 2537 add bx, FORCESTRICTWORD paras(DEVICEADJUST) 2538 %else 2539 ;%define DEVICEADJUST (deviceshim_size + 110h) 0 00000991 81C3[1100] add bx, strict word relocatedzero + paras(110h) 2541 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2542 %endif 0 00000995 89DA mov dx, bx 2544 %ifn _LINK 2545 add bx, paras(AUXTARGET2) 2546 add dx, paras(CODETARGET2) 2547 %else 2548 ; add bx, paras(AUXTARGET2) 0 00000997 81C3[0000] add bx, strict word relocatedzero + 0 2550 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 2551 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 2552 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 2553 ; add dx, paras(CODETARGET2) 0 0000099B 81C2[0102] add dx, strict word relocatedzero + paras(auxbuff_size) 2555 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 2556 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 2557 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 2558 %endif 0 0000099F 2EC706[EC0D][4C32] mov word [cs:init_layout], init_dev_layout_2 0 000009A6 E84FF8 call init_check_auxbuff 0 000009A9 742A jz @F 2562 2563 ; If both prior attempts failed, we allocate 2564 ; an additional 8 KiB and move the buffer to 2565 ; that. This should always succeed. 2566 %ifn _LINK 2567 mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size + dev_env_size + extsegment_size) 2572 ; enlarge the final memory block size 2573 %else 0 000009AB 2EC706[E60D][8208] mov word [cs:memsize], relocatedzero + paras(auxbuff_size + auxbuff_size + historysegment_size + dev_env_size + extsegment_size) 2579 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 2580 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 2581 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 2582 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 2583 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 2584 %endif 2585 0 000009B2 8CDB mov bx, ds 2587 %ifn _LINK 2588 add bx, FORCESTRICTWORD paras(DEVICEADJUST) 2589 %else 2590 ;%define DEVICEADJUST (deviceshim_size + 110h) 0 000009B4 81C3[1100] add bx, strict word relocatedzero + paras(110h) 2592 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2593 %endif 2594 %ifn _LINK 2595 add bx, paras(AUXTARGET3) 2596 %else 0 000009B8 81C3[0102] add bx, strict word relocatedzero + paras(auxbuff_size) 2598 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 2599 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 2600 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 2601 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 2602 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 2603 %endif ; _LINK 0 000009BC 89CA mov dx, cx 2605 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _DEV_ENV_SIZE 0 000009BE 89D8 mov ax, bx 0 000009C0 050102 add ax, paras(auxbuff_size) 2608 %endif 0 000009C3 2EC706[EC0D][5132] mov word [cs:init_layout], init_dev_layout_3 0 000009CA E82BF8 call init_check_auxbuff 0 000009CD 7406 jz @F 2612 2613 ; Because this shouldn't happen, this is 2614 ; considered an internal error. 0 000009CF BA[B00F] mov dx, imsg.early_reloc_fail 0 000009D2 E953FF jmp .earlyfail 2617 2618 @@: 2619 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _DEV_ENV_SIZE 0 000009D5 50 push ax 2621 %endif 0 000009D6 E808F8 call place_code_segments 2623 2624 %if _MESSAGESEGMENT 0 000009D9 8CD8 mov ax, ds 2626 %ifn _LINK 2627 add ax, paras(MESSAGESECTIONOFFSET) 2628 %else 0 000009DB 05[0000] add ax, strict word relocatedzero + 0 2630 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 2631 %endif 0 000009DE 8CDA mov dx, ds 2633 %ifn _LINK 2634 add dx, 10h + paras(deviceshim_size + 110h + DATAENTRYTABLESIZE + datastack_size) 2637 mov cx, paras(messagesegment_truncated_size) 2638 %else 0 000009E0 81C2[1100] add dx, strict word relocatedzero + 10h + paras(110h - 100h) 2640 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2641 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_end_of_datastack, equ $ - 2 0 000009E4 B9[0000] mov cx, relocatedzero + 0 2643 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_truncated, equ $ - 2 2644 %endif 0 000009E7 E80610 call init_movp 2646 %if _BOOTLDR_DISCARD_HELP 2647 %ifn _LINK 2648 mov word [messageseg_size], messagesegment_nobits_truncated_size 2649 %else 0 000009EA C706[0000][0000] mov word [messageseg_size], behind_messagesegment_nobits_truncated wrt MESSAGESEGMENT 2651 %endif 2652 %if _HELP_COMPRESSED 2653 mov word [indirect_hshrink_message_buffer], truncated_hshrink_message_buffer 2654 %if _LINK 2655 mov es, [code_seg] 2656 extern patch_boothelp_uncompressed 2657 setopt [es:patch_boothelp_uncompressed], NONCOMPRESSEDFLAG 2658 %endif 2659 %endif 0 000009F0 1E push ds 0 000009F1 0E push cs 0 000009F2 1F pop ds 0 000009F3 BE[A815] mov si, imsg.boothelp_replacement 0 000009F6 8EC2 mov es, dx 0 000009F8 BF[0000] mov di, msg.boothelp 0 000009FB B91C00 mov cx, imsg.boothelp_replacement_size_w 0 000009FE F3A5 rep movsw 0 00000A00 31C0 xor ax, ax 2669 %ifn _LINK 2670 mov cx, words(messagesegment_nobits_truncated_size - (msg.boothelp - messagesegment_start + fromwords(imsg.boothelp_replacement_size_w))) 2673 %else 0 00000A02 B9[3800] mov cx, relocatedzero + fromwords(imsg.boothelp_replacement_size_w) 2675 wlcalc word_ext_msg.boothelp, equ $ - 2 ; length + start 2676 wlcalc word_subr_0, equ $ - 2 ; - (length + start) 2677 wlcalc word_wrt_MESSAGESEGMENT_ext_behind_messagesegment_nobits_truncated, equ $ - 2 2678 ; behind - (length + start) 2679 wlcalc word_shr_1, equ $ - 2 ; above >> 1 2680 %endif 0 00000A05 F3AB rep stosw 0 00000A07 1F pop ds 2683 %endif 0 00000A08 52 push dx 2685 %endif 2686 0 00000A09 8CD8 mov ax, ds 0 00000A0B 83C010 add ax, 10h 0 00000A0E 89C2 mov dx, ax 2690 %ifn _LINK 2691 add dx, FORCESTRICTWORD paras(deviceshim_size + 110h) 2692 %else 0 00000A10 81C2[1100] add dx, strict word relocatedzero + paras(110h) 2694 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2695 %endif 2696 %ifn _LINK 2697 mov cx, paras(DATAENTRYTABLESIZE) 2698 %else 0 00000A14 B9[F0FF] mov cx, relocatedzero + - paras(256) 2700 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_behind_progbits_dataentry, equ $ - 2 2701 %endif 0 00000A17 E8D60F call init_movp 2703 0 00000A1A 8CC8 mov ax, cs 2705 %ifn _LINK 2706 add ax, init_size_p 2707 %else 0 00000A1C 05[0000] add ax, strict word relocatedzero + 0 2709 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 2710 %endif 0 00000A1F 8CDA mov dx, ds 0 00000A21 83C210 add dx, paras(100h) 2713 %ifn _LINK 2714 mov cx, deviceshim_size_p 2715 %else 0 00000A24 B9[0000] mov cx, relocatedzero + 0 2717 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2718 %endif 0 00000A27 E8C60F call init_movp 2720 0 00000A2A 8CDA mov dx, ds 2722 %ifn _LINK 2723 add dx, FORCESTRICTWORD paras(100h) + deviceshim_size_p 2724 %else 0 00000A2C 81C2[1000] add dx, strict word relocatedzero + paras(100h) 2726 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2727 %endif 0 00000A30 8EC2 mov es, dx 0 00000A32 1E push ds 2730 %ifn _LINK 2731 sub dx, FORCESTRICTWORD deviceshim_size_p + 1 2732 %else 0 00000A33 81EA[0100] sub dx, strict word relocatedzero + 1 2734 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2735 %endif 0 00000A37 8EDA mov ds, dx 0 00000A39 31C0 xor ax, ax 0 00000A3B 31FF xor di, di 0 00000A3D B90400 mov cx, 4 0 00000A40 F3AB rep stosw 0 00000A42 BE0800 mov si, 8 0 00000A45 B104 mov cl, 4 0 00000A47 F3A5 rep movsw 0 00000A49 1F pop ds 2745 0 00000A4A 8CDA mov dx, ds 2747 %ifn _LINK 2748 add dx, FORCESTRICTWORD paras(DEVICEADJUST) 2749 %else 2750 ;%define DEVICEADJUST (deviceshim_size + 110h) 0 00000A4C 81C2[1100] add dx, strict word relocatedzero + paras(110h) 2752 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2753 %endif 0 00000A50 8EDA mov ds, dx 2755 2756 %if _MESSAGESEGMENT 2757 %if _HELP_COMPRESSED && ! _PM 2758 pop ax 2759 mov [hshrink_memory_source.segment], ax 2760 mov [messageseg], ax 2761 %else 0 00000A52 8F06[0000] pop word [messageseg] 2763 %endif 2764 %endif 2765 0 00000A56 53 push bx 0 00000A57 B451 mov ah, 51h 0 00000A59 CD21 int 21h 0 00000A5B 891E[0000] mov word [pspdbe], bx 0 00000A5F 5B pop bx 2771 0 00000A60 8EC2 mov es, dx 0 00000A62 B98000 mov cx, words(256) 0 00000A65 31FF xor di, di 0 00000A67 31C0 xor ax, ax 0 00000A69 F3AB rep stosw ; clear buffer for PSP + command line tail 2777 2778 ; PSP creation moved to later, after command line parsing 2779 2780 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _DEV_ENV_SIZE 0 00000A6B 58 pop ax 2782 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00000A6C A3[0000] mov word [history.segorsel + soaSegSel], ax 2784 %if _PM 2785 mov word [history.segorsel + soaSegment], ax 2786 %endif 0 00000A6F 8EC0 mov es, ax 0 00000A71 31FF xor di, di 0 00000A73 B90010 mov cx, historysegment_size >> 1 0 00000A76 31C0 xor ax, ax 0 00000A78 F3AB rep stosw 2792 %endif 2793 2794 %if _DEV_ENV_SIZE 2795 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00000A7A 8CC0 mov ax, es 0 00000A7C 050002 add ax, paras(historysegment_size) 2798 %endif 0 00000A7F A3[0000] mov word [envseg], ax 0 00000A82 8EC0 mov es, ax 0 00000A84 89C2 mov dx, ax 0 00000A86 42 inc dx 0 00000A87 31FF xor di, di 0 00000A89 B90004 mov cx, dev_env_size >> 1 0 00000A8C C706[0000]0008 mov word [env_size], dev_env_size 0 00000A92 31C0 xor ax, ax 0 00000A94 F3AB rep stosw 0 00000A96 26C70603007F00 mov word [es:3], paras(dev_env_size - 16) 2809 %endif 2810 2811 %if _EXTENSIONS 2812 %if _HISTORY_SEPARATE_FIXED && _HISTORY || _DEV_ENV_SIZE 0 00000A9D 8CC0 mov ax, es 2814 %if _DEV_ENV_SIZE 0 00000A9F 058000 add ax, paras(dev_env_size) 2816 %else 2817 add ax, paras(historysegment_size) 2818 %endif 2819 %endif 0 00000AA2 A3[0000] mov word [extseg], ax 0 00000AA5 8EC0 mov es, ax 0 00000AA7 31FF xor di, di 0 00000AA9 B90010 mov cx, extsegment_size >> 1 0 00000AAC 31C0 xor ax, ax 0 00000AAE F3AB rep stosw 2826 %endif 2827 %endif 2828 0 00000AB0 89D8 mov ax, bx 2830 0 00000AB2 A3[0000] mov word [auxbuff_segorsel + soaSegSel], ax 2832 %if _PM 2833 mov word [auxbuff_segorsel + soaSegment], ax 2834 ; initialise auxbuff references 2835 %endif 2836 %if _IMMASM && _IMMASM_AUXBUFF 2837 mov word [immseg], ax 2838 %endif 2839 0 00000AB5 8EC0 mov es, ax 0 00000AB7 31FF xor di, di 0 00000AB9 B90810 mov cx, _AUXBUFFSIZE >> 1 0 00000ABC 31C0 xor ax, ax 0 00000ABE F3AB rep stosw ; initialise auxbuff 2845 2846 %if _DEV_ENV_SIZE 0 00000AC0 89162C00 mov word [2Ch], dx 0 00000AC4 1E push ds 0 00000AC5 E87701 call init_device_get_environment 0 00000AC8 85C0 test ax, ax 0 00000ACA 7425 jz @F 0 00000ACC 8ED8 mov ds, ax 0 00000ACE 8EC2 mov es, dx 0 00000AD0 31FF xor di, di 0 00000AD2 31F6 xor si, si 2856 .loop_env: 0 00000AD4 E83926 call init_nextvar 0 00000AD7 75FB jne .loop_env 0 00000AD9 46 inc si 0 00000ADA 81FEEE07 cmp si, dev_env_size - 16 - 2 0 00000ADE 7608 jbe .copy_env 0 00000AE0 BA[000F] mov dx, imsg.dev_env_too_large 0 00000AE3 E89B0F call init_putsz_cs 0 00000AE6 EB09 jmp @F 2865 2866 .copy_env: 0 00000AE8 89F1 mov cx, si 0 00000AEA 31F6 xor si, si 0 00000AEC F3A4 rep movsb 0 00000AEE 31C0 xor ax, ax 0 00000AF0 AB stosw 2872 @@: 0 00000AF1 1F pop ds 2874 %endif 2875 0 00000AF2 8CD8 mov ax, ds ; => PSP 2877 %ifn _LINK 2878 sub ax, strict word deviceshim_size_p + paras(10h) 2879 %else 0 00000AF4 2D[0100] sub ax, strict word relocatedzero + paras(10h) 2881 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2882 %endif 0 00000AF7 A3[0200] mov word [device_header_address + 2], ax 0 00000AFA A3[0000] mov word [alloc_seg], ax 2885 0 00000AFD 8CD8 mov ax, ds ; => PSP 0 00000AFF 2E8B1E[E60D] mov bx, word [cs:memsize] 2888 ; = amount paragraphs for PSP + DATA ENTRY + TABLE 2889 ; + DATA STACK + CODE + AUXBUFF + HISTORY + dev ENV + EXT 0 00000B04 01D8 add ax, bx ; => placeholder for trailing container 2891 %ifn _LINK 2892 add bx, FORCESTRICTWORD deviceshim_size_p + paras(10h) + paras(10h) 2893 %else 0 00000B06 81C3[0200] add bx, strict word relocatedzero + paras(10h + 10h) 2895 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2896 %endif 2897 ; (layout is deviceshim, MCB placeholder, debugger segments, 2898 ; placeholder for trailing container MCB) 2899 ; = amount paragraphs expected in MCB 0 00000B0A 891E[0000] mov word [device_mcb_paragraphs], bx 0 00000B0E 891E[0000] mov word [alloc_size], bx 2902 2903 ; ax => where to place container sig 0 00000B12 E80200 call init_dev_place_container_signature 2905 ; ax => behind memory used for device 0 00000B15 EB12 jmp @F 2907 2908 ; INP: ax => where to place container signature 2909 ; OUT: ax => behind memory used for device 2910 ; ax = INP:ax + 1 2911 ; CHG: es, di, cx, si 2912 init_dev_place_container_signature: 0 00000B17 8EC0 mov es, ax 0 00000B19 31FF xor di, di ; -> buffer for trailing container MCB 0 00000B1B B90800 mov cx, words(10h) ; = amount words 0 00000B1E 1E push ds 0 00000B1F 0E push cs 0 00000B20 1F pop ds 0 00000B21 BE[500D] mov si, init_container_signature ; -> init string 0 00000B24 F3A5 rep movsw 0 00000B26 1F pop ds 0 00000B27 40 inc ax ; => behind memory used for device 0 00000B28 C3 retn 2924 2925 2926 @@: 0 00000B29 8F06[0000] pop word [reg_edi] 0 00000B2D 8F06[0000] pop word [reg_esi] 0 00000B31 8F06[0000] pop word [reg_edx] 0 00000B35 8F06[0000] pop word [reg_ecx] 0 00000B39 892E[0000] mov word [reg_ebp], bp 0 00000B3D 5B pop bx 0 00000B3E 07 pop es 0 00000B3F 891E[0000] mov word [reg_ebx], bx 0 00000B43 8C06[0000] mov word [reg_es], es 2936 0 00000B47 26C747030001 mov word [es:bx + 3], 100h ; no error, done 0 00000B4D 2683670E00 and word [es:bx + 0Eh], 0 0 00000B52 26894710 mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 2940 0 00000B56 8F06[0000] pop word [reg_efl] 0 00000B5A 8F06[0000] pop word [reg_ds] 0 00000B5E 8F06[0000] pop word [reg_eax] 0 00000B62 8C16[0000] mov word [reg_ss], ss 0 00000B66 8926[0000] mov word [reg_esp], sp 2946 0 00000B6A 8C1E[0000] mov word [reg_cs], ds 0 00000B6E C706[0000][0000] mov word [reg_eip], entry_retf 2949 2950 .cmdline: 0 00000B74 1E push ds 0 00000B75 26C57712 lds si, [es:bx + 12h] ; ds:si -> device command line 0 00000B79 07 pop es 2954 %if _CONFIG 0 00000B7A 1E push ds 0 00000B7B 56 push si 2957 %endif 0 00000B7C BF8100 mov di, 81h ; es:di -> PSP command line tail 2959 2960 ; Writing MS-DOS Device Drivers, second edition, page 349 2961 ; specifies the following as to the command line termination: 2962 ; "Note that the DEVICE= command string is terminated by an 2963 ; Ah when there are no arguments. When there are arguments, 2964 ; the string is terminated with the following sequence: 2965 ; 0h, Dh, Ah." 2966 2967 ; First skip past name. 2968 @@: 0 00000B7F AC lodsb 0 00000B80 3C20 cmp al, 32 ; blank ? 0 00000B82 7412 je @F 0 00000B84 3C09 cmp al, 9 0 00000B86 740E je @F ; yes, got past executable filename --> 0 00000B88 3C00 cmp al, 0 0 00000B8A 7448 je .cmdline_end 0 00000B8C 3C0D cmp al, 13 0 00000B8E 7444 je .cmdline_end 0 00000B90 3C0A cmp al, 10 0 00000B92 7440 je .cmdline_end ; if empty tail --> 0 00000B94 EBE9 jmp @B 2981 @@: 0 00000B96 81FFFF00 cmp di, 0FFh ; can store and still have space for CR ? 0 00000B9A 7430 je .cmdline_end_truncate ; no --> 0 00000B9C AA stosb ; store it 0 00000B9D 3C00 cmp al, 0 ; EOL ? 0 00000B9F 7432 je .cmdline_end_dec 0 00000BA1 3C0D cmp al, 13 0 00000BA3 742E je .cmdline_end_dec 0 00000BA5 3C0A cmp al, 10 0 00000BA7 742A je .cmdline_end_dec ; yes --> 0 00000BA9 AC lodsb 0 00000BAA 3C21 cmp al, '!' ; escape for small letters ? 0 00000BAC 75E8 jne @B ; no --> 0 00000BAE AC lodsb 0 00000BAF 3C00 cmp al, 0 0 00000BB1 7414 je .cmdline_end_escaped 0 00000BB3 3C0D cmp al, 13 0 00000BB5 7410 je .cmdline_end_escaped 0 00000BB7 3C0A cmp al, 10 0 00000BB9 740C je .cmdline_end_escaped 3001 ; cmp al, '!' ; (automatically supported) 0 00000BBB 3C41 cmp al, 'A' ; is it a capital letter ? 0 00000BBD 72D7 jb @B 0 00000BBF 3C5A cmp al, 'Z' 0 00000BC1 77D3 ja @B 0 00000BC3 3420 xor al, 'a' ^ 'A' ; get the small letter 0 00000BC5 EBCF jmp @B 3008 3009 .cmdline_end_escaped: 0 00000BC7 BA[0710] mov dx, imsg.device_end_escaped 0 00000BCA EB03 jmp @F 3012 3013 .cmdline_end_truncate: 0 00000BCC BA[3610] mov dx, imsg.device_end_truncate 3015 @@: 0 00000BCF E8AF0E call init_putsz_cs 0 00000BD2 A8 db __TEST_IMM8 ; skip dec 3018 .cmdline_end_dec: 0 00000BD3 4F dec di 3020 .cmdline_end: 0 00000BD4 B00D mov al, 13 0 00000BD6 AA stosb ; store CR 0 00000BD7 97 xchg ax, di 0 00000BD8 8CC3 mov bx, es 0 00000BDA 8EDB mov ds, bx 0 00000BDC 2C82 sub al, 82h ; if -> 82h (CR at 81h). get 0 0 00000BDE A28000 mov byte [80h], al ; store length 3028 3029 %if _CONFIG 0 00000BE1 5E pop si 0 00000BE2 5A pop dx 3032 %endif 3033 0 00000BE3 FA cli 0 00000BE4 8ED3 mov ss, bx 0 00000BE6 BC[0000] mov sp, stack_end ; device mode stack switch 0 00000BE9 FB sti 3038 0 00000BEA 800E[0200]40 setopt [internalflags], tsrmode 0 00000BEF 8026[0200]7F clropt [internalflags], attachedterm 0 00000BF4 800E[0200]40 setopt [internalflags6], dif6_device_mode 3042 3043 %if _CONFIG 3044 find_config_device: 0 00000BF9 E84300 call init_device_get_environment 3046 0 00000BFC 36C606[0000]00 mov byte [ss:configpath], 0 0 00000C02 50 push ax 0 00000C03 52 push dx 0 00000C04 56 push si 0 00000C05 BF[E50E] mov di, imsg.varconfig 0 00000C08 B90D00 mov cx, imsg.varconfig.length 0 00000C0B BA[0000] mov dx, configpath 0 00000C0E E80825 call init_copyvar 0 00000C11 5E pop si 0 00000C12 1F pop ds ; -> command line 0 00000C13 1E push ds 0 00000C14 56 push si 0 00000C15 7303 jnc .done 0 00000C17 E84A00 call find_executable_device 3061 .done: 0 00000C1A 5E pop si 0 00000C1B 1F pop ds ; -> command line 0 00000C1C 58 pop ax 3065 3066 find_scripts_device: 0 00000C1D 36C606[0000]00 mov byte [ss:scriptspath], 0 0 00000C23 1E push ds 0 00000C24 56 push si 0 00000C25 BF[F20E] mov di, imsg.varscripts 0 00000C28 B90E00 mov cx, imsg.varscripts.length 0 00000C2B BA[0000] mov dx, scriptspath 0 00000C2E E8E824 call init_copyvar 0 00000C31 5E pop si 0 00000C32 1F pop ds ; -> command line 0 00000C33 7303 jnc .done 0 00000C35 E82C00 call find_executable_device 3078 .done: 3079 0 00000C38 16 push ss 0 00000C39 1F pop ds 0 00000C3A 16 push ss 0 00000C3B 07 pop es 3084 %endif 3085 0 00000C3C E9BC0E jmp old_initcode 3087 3088 3089 init_device_get_environment: 0 00000C3F B451 mov ah, 51h 0 00000C41 CD21 int 21h 0 00000C43 8EDB mov ds, bx 0 00000C45 A12C00 mov ax, [2Ch] 0 00000C48 85C0 test ax, ax 0 00000C4A 7517 jnz @F 0 00000C4C A11600 mov ax, [16h] 0 00000C4F 85C0 test ax, ax 0 00000C51 740E jz .zero 0 00000C53 83F8FF cmp ax, -1 0 00000C56 7409 je .zero 0 00000C58 39D8 cmp ax, bx 0 00000C5A 8ED8 mov ds, ax 0 00000C5C A12C00 mov ax, [2Ch] 0 00000C5F 7502 jne @F 3105 .zero: 0 00000C61 31C0 xor ax, ax 3107 @@: 0 00000C63 C3 retn 3109 3110 3111 %if _CONFIG 3112 ; INP: ss:dx -> buffer 3113 ; ds:si -> device driver command line 3114 find_executable_device: 3115 @@: 0 00000C64 AC lodsb 0 00000C65 3C20 cmp al, 32 0 00000C67 74FB je @B 0 00000C69 3C09 cmp al, 9 0 00000C6B 74F7 je @B 0 00000C6D 4E dec si 0 00000C6E 89F7 mov di, si 3123 @@: 0 00000C70 AC lodsb 0 00000C71 3C09 cmp al, 9 0 00000C73 7410 je @F 0 00000C75 3C20 cmp al, 32 0 00000C77 740C je @F 0 00000C79 3C0D cmp al, 13 0 00000C7B 7408 je @F 0 00000C7D 3C0A cmp al, 10 0 00000C7F 7404 je @F 0 00000C81 84C0 test al, al 0 00000C83 75EB jnz @B 3135 @@: 0 00000C85 4E dec si 0 00000C86 1E push ds 0 00000C87 07 pop es 0 00000C88 89F1 mov cx, si 0 00000C8A 29F9 sub cx, di 0 00000C8C 83F97F cmp cx, 127 0 00000C8F 7722 ja .nodevice 0 00000C91 87FE xchg di, si 3144 0 00000C93 B90000 mov cx, 0 3146 @@: 0 00000C96 39F7 cmp di, si 0 00000C98 7610 jbe @F 0 00000C9A 4F dec di 0 00000C9B 803D2F cmp byte [di], '/' 0 00000C9E 7405 je .slash 0 00000CA0 803D5C cmp byte [di], '\' 0 00000CA3 75F1 jne @B 3154 .slash: 0 00000CA5 89F9 mov cx, di 0 00000CA7 41 inc cx 0 00000CA8 29F1 sub cx, si 3158 @@: 3159 0 00000CAA 16 push ss 0 00000CAB 07 pop es 0 00000CAC 89D7 mov di, dx 0 00000CAE F3A4 rep movsb 0 00000CB0 B000 mov al, 0 0 00000CB2 AA stosb 3166 3167 .nodevice: 3168 .done: 0 00000CB3 C3 retn 3170 %endif 3171 3172 3173 init_device_error_late: 0 00000CB4 F606[0100]80 testopt [internalflags], has386 0 00000CB9 7431 jz .16 3176 3177 subcpu 386 0 00000CBB 66A1[0000] mov eax, [reg_eax] 0 00000CBF 668B1E[0000] mov ebx, [reg_ebx] 0 00000CC4 668B0E[0000] mov ecx, [reg_ecx] 0 00000CC9 668B16[0000] mov edx, [reg_edx] 0 00000CCE 668B36[0000] mov esi, [reg_esi] 0 00000CD3 668B3E[0000] mov edi, [reg_edi] 0 00000CD8 668B2E[0000] mov ebp, [reg_ebp] 0 00000CDD 66FF36[0000] push dword [reg_efl] 0 00000CE2 669D popfd 0 00000CE4 8E26[0000] mov fs, [reg_fs] 0 00000CE8 8E2E[0000] mov gs, [reg_gs] 3189 subcpureset 3190 3191 .16: 3192 ; ax done last 0 00000CEC 8B1E[0000] mov bx, [reg_ebx] 0 00000CF0 8B0E[0000] mov cx, [reg_ecx] 0 00000CF4 8B16[0000] mov dx, [reg_edx] 0 00000CF8 8B36[0000] mov si, [reg_esi] 0 00000CFC 8B3E[0000] mov di, [reg_edi] 0 00000D00 8B2E[0000] mov bp, [reg_ebp] 0 00000D04 FF36[0000] push word [reg_efl] 0 00000D08 9D popf 0 00000D09 8E06[0000] mov es, [reg_es] 0 00000D0D 8E16[0000] mov ss, [reg_ss] 0 00000D11 8B26[0000] mov sp, [reg_esp] 0 00000D15 FF36[0000] push word [reg_eax] 0 00000D19 8CD8 mov ax, ds 0 00000D1B 8E1E[0000] mov ds, [reg_ds] 3207 3208 %ifn _LINK 3209 sub ax, strict word paras(deviceshim_size + 10h) 3210 %else 0 00000D1F 2D[0100] sub ax, strict word relocatedzero + paras(10h) 3212 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 3213 %endif 0 00000D22 26C747030381 mov word [es:bx + 3], 8103h ; error, done, code: unknown command 0 00000D28 2683670E00 and word [es:bx + 0Eh], 0 0 00000D2D 26894710 mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 0 00000D31 58 pop ax 0 00000D32 CB retf 3219 %endif 3220 3221 3222 %if _DEBUG4 || _DEBUG5 3223 %define _DEB_ASM_PREFIX init_ 3224 %include "deb.asm" 3225 %endif 3226 3227 3228 %if ! _LINK && ! _LINK_COMPAT 3229 align 2, db 0 ; align on word boundary 3230 ; Table of patches that are to be set NOP if not running on a 386. 3231 writepatchtable patch_no386_table, PATCH_NO386_TABLE 3232 %undef PATCH_NO386_TABLE 3233 3234 align 2, db 0 3235 ; Table of patches that are to be set NOP if running on a 386. 3236 writepatchtable patch_386_table, PATCH_386_TABLE 3237 %undef PATCH_386_TABLE 3238 3239 %if _DUALCODE 3240 align 2, db 0 ; align on word boundary 3241 ; Table of patches that are to be set NOP if not running on a 386. 3242 writepatchtable patch_no386_table2, PATCH_NO386_TABLE2 3243 %undef PATCH_NO386_TABLE2 3244 3245 align 2, db 0 3246 ; Table of patches that are to be set NOP if running on a 386. 3247 writepatchtable patch_386_table2, PATCH_386_TABLE2 3248 %undef PATCH_386_TABLE2 3249 %else 3250 %assign __patch_no386_table2_method 0 3251 %assign __patch_386_table2_method 0 3252 %endif 3253 3254 align 2, db 0 ; align on word boundary 3255 ; Table of patches that are to be set NOP if not running on a 386. 3256 writepatchtable patch_no386_tableentry, PATCH_NO386_TABLEENTRY 3257 %undef PATCH_NO386_TABLEENTRY 3258 3259 align 2, db 0 3260 ; Table of patches that are to be set NOP if running on a 386. 3261 writepatchtable patch_386_tableentry, PATCH_386_TABLEENTRY 3262 %undef PATCH_386_TABLEENTRY 3263 %elif _LINK 3264 %ifn _ONLY386 || _ONLYNON386 3265 extern patch_no386_table 3266 extern patch_no386_table.amount 3267 %assign __patch_no386_table_method 1 3268 extern patch_386_table 3269 extern patch_386_table.amount 3270 %assign __patch_386_table_method 1 3271 %if _DUALCODE 3272 extern patch_no386_table2 3273 extern patch_no386_table2.amount 3274 %assign __patch_no386_table2_method 1 3275 extern patch_386_table2 3276 extern patch_386_table2.amount 3277 %assign __patch_386_table2_method 1 3278 %else 3279 %assign __patch_no386_table2_method 0 3280 %assign __patch_386_table2_method 0 3281 %endif 3282 extern patch_no386_tableentry 3283 extern patch_no386_tableentry.amount 3284 %assign __patch_no386_tableentry_method 1 3285 extern patch_386_tableentry 3286 extern patch_386_tableentry.amount 3287 %assign __patch_386_tableentry_method 1 3288 %assign patch_386_tableentry_size 1 ; placeholder 3289 %assign patch_no386_tableentry_size 1 ; placeholder 3290 %endif 3291 %endif 3292 3293 %if !_LINK && _LINK_COMPAT 3294 %assign _patch_no386_table_FORCE_METHOD 1 3295 %assign _patch_386_table_FORCE_METHOD 1 3296 %assign _patch_no386_table2_FORCE_METHOD 1 3297 %assign _patch_386_table2_FORCE_METHOD 1 3298 %assign _patch_no386_tableentry_FORCE_METHOD 1 3299 %assign _patch_386_tableentry_FORCE_METHOD 1 3300 3301 %ifn _ONLY386 || _ONLYNON386 3302 %assign __patch_no386_table_method 1 3303 %assign __patch_386_table_method 1 3304 %if _DUALCODE 3305 %assign __patch_no386_table2_method 1 3306 %assign __patch_386_table2_method 1 3307 %else 3308 %assign __patch_no386_table2_method 0 3309 %assign __patch_386_table2_method 0 3310 %endif 3311 %assign __patch_no386_tableentry_method 1 3312 %assign __patch_386_tableentry_method 1 3313 %endif 3314 %endif 3315 3316 3317 %ifn _LINK || _LINK_COMPAT 3318 %if _DUALCODE && ! _PM 3319 align 2, db 0 3320 relocate_from_code: 3321 dw PATCH_RELOCATE_FROM_lDEBUG_CODE 3322 .end: 3323 align 2, db 0 3324 relocate_from_code2: 3325 dw PATCH_RELOCATE_FROM_lDEBUG_CODE2 3326 .end: 3327 3328 %unimacro dualcall 1.nolist 3329 ; make sure we do not allow later uses 3330 %endif 3331 %endif 3332 3333 3334 %if _BOOTLDR 0 00000D33 00 align 16, db 0 3336 ; Image identification 3337 ; First dword: signature 3338 ; Next word: version, two ASCII digits 3339 ; Next word: checksum. adding up all words of the paragraph gives zero 3340 ; Next word: size of image (including this paragraph) 3341 ; Three words reserved, zero. 3342 imageident: 3343 %if !_LOADER 0 00000D40 4E4445423030 db "NDEB00" 0 00000D46 0000 .check: dw 0 0 00000D48 0000 .size: dw 0 0 00000D4A 0000 times 3 dw 0 3348 %else 3349 istruc LOADERIMAGEIDENT 3350 at liiSignature 3351 db "NLDR00" 3352 at liiChecksum 3353 .check: dw 0 3354 at liiAmountParagraphs 3355 .size: dw 0 3356 at liiReserved 3357 times 3 dw 0 3358 at liiEntryQuerySize 3359 dw loader_query 3360 at liiEntryRelocate 3361 dw loader_transfer_relocate 3362 at liiEntryDebug 3363 dw loader_transfer_cmd3 3364 at liiStackPointer 3365 dw stack_end 3366 iend 3367 times (2Ch - ($ - imageident)) / 2 dw 0 3368 %endif 3369 %endif 3370 %if _DEVICE 3371 align 16, db 0 3372 init_container_signature: 0 00000D50 464F525F53445F434F fill 16, 0, db "FOR_SD_CONTAINER" 0 00000D59 4E5441494E4552 3374 %endif 3375 %if _EXTENSIONS 3376 align 16, db 0 3377 eld_linkcall: 3378 .: 3379 istruc ELD_INSTANCE 0 00000D60 0000 at eldiStartCode, dw 0 0 00000D62 8000 at eldiEndCode, dw .end - . 0 00000D64 0000 at eldiStartData, dw 0 0 00000D66 0000 at eldiEndData, dw 0 0 00000D68 4C494E4B43414C4C at eldiIdentifier, fill 8, 32, db "LINKCALL" 0 00000D70 0100 at eldiFlags, dw eldifResident 0 00000D72 00 iend 3387 .to_entry: 0 00000D80 53 push bx 0 00000D81 B300 mov bl, 0 * (1 + !!_PM) 0 00000D83 EB06 jmp @F 0 00000D85 90 align 8 3392 .to_code1: 0 00000D88 53 push bx 0 00000D89 B302 mov bl, 2 * (1 + !!_PM) 3395 %if _DUALCODE 3396 jmp @F 3397 align 8 3398 .to_code2: 3399 push bx 3400 mov bl, 4 * (1 + !!_PM) 3401 %endif 3402 @@: 3403 lframe 0 3404 lpar word, origret_farret_seg 3405 lpar word, origbx_farret_ofs 3406 lpar word, restore_back_nearret 0 00000D8B 50 push ax 3408 lpar dword, transfer 0 00000D8C 50 push ax 0 00000D8D 50 push ax 0 00000D8E 5589E5 lenter 3412 lvar word, restorebx 0 00000D91 FF7608 push word [bp + ?origbx_farret_ofs] 3414 %if _PM 3415 lvar word, restoredi 3416 push di 3417 %endif 0 00000D94 B700 mov bh, 0 0 00000D96 36FFB7[0000] push word [ss:extcall_table.ret + bx] 0 00000D9B 8F4606 pop word [bp + ?restore_back_nearret] 3421 %if _PM 3422 mov di, [ss:pm_2_86m_0] 3423 mov bx, word [ss:extcall_table.segsel + bx + di] 3424 %else 0 00000D9E 368B9F[0000] mov bx, word [ss:extcall_table.segsel + bx] 3426 %endif 0 00000DA3 368B1F mov bx, word [ss:bx] 0 00000DA6 895E04 mov word [bp + ?transfer + 2], bx 3429 0 00000DA9 8B5E0A mov bx, word [bp + ?origret_farret_seg] 0 00000DAC 2EFF7702 push word [cs:bx + 2] 0 00000DB0 8F4602 pop word [bp + ?transfer] 0 00000DB3 895E08 mov word [bp + ?origbx_farret_ofs], bx 3434 %ifn _PM 0 00000DB6 8C4E0A mov word [bp + ?origret_farret_seg], cs 3436 %endif 3437 %if _PM 3438 pop di ; ?restoredi 3439 %endif 0 00000DB9 5B pop bx ; ?restorebx 3441 lleave ctx 0 00000DBA 5D pop bp ; ?frame_bp 0 00000DBB CB retf ; ?transfer 3444 ; still on stack: near return address, far return address 3445 0 00000DBC 90 times 79h - ($ - .) nop 3447 .call_cmd3: 0 00000DD9 E8ACFF call .to_code1 0 00000DDC EBFE jmp strict short $ 0 00000DDE [0000] dw cmd3 3451 3452 align 16 3453 times 128 - ($ - .) nop 3454 .end: 3455 endarea eld_linkcall 3456 %endif 3457 3458 %if _BOOTLDR 3459 align 2, db 0 3460 loader_imageident: 3461 .: 0 00000DE0 4E4C44523030 db "NLDR00" 3463 .size equ $ - . 3464 %endif 3465 3466 align 2, db 0 3467 memsize: 3468 %ifn _LINK 3469 dw paras(CODETARGET2 + ldebug_code_bootldr_truncated_size + ldebug_code2_size + historysegment_size + extsegment_size) 3474 ; same as paras(AUXTARGET1 3475 ; + auxbuff_size 3476 ; + historysegment_size 3477 ; + extsegment_size) 3478 %else 3479 %if 0 3480 %define CODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_truncated_size + datastack_size) 3481 %define CODETARGET2 (CODETARGET1+auxbuff_size) 3482 %define AUXTARGET1 (CODETARGET1+ldebug_code_bootldr_truncated_size+ldebug_code2_size) 3483 %define AUXTARGET2 CODETARGET1 3484 %define AUXTARGET3 (AUXTARGET1+auxbuff_size) 3485 %endif 0 00000DE6 [0106] dw relocatedzero + paras(auxbuff_size + historysegment_size + extsegment_size) 3489 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 3490 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 3491 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 3492 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 3493 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 3494 %endif 3495 3496 %if _DEV_ENV_SIZE || _APP_ENV_SIZE 0 00000DE8 0000 mem_envsize: dw 0 3498 %endif 3499 cmdline_buffer_start: 0 00000DEA [0000] dw cmdline_buffer 3501 init_layout: 0 00000DEC [7432] dw init_layout_none 3503 %if _DEVICE 0 00000DEE 0000 dev_memory_end: dw 0 3505 %endif 3506 init_auxbuff_want: 0 00000DF0 1020 dw _AUXBUFFSIZE 3508 %if _EXTENSIONS 0 00000DF2 0040 init_ext_want: dw _EXT_CODE_DEFAULT_SIZE 0 00000DF4 0040 init_extdata_want: dw _EXT_DATA_DEFAULT_SIZE 3511 %endif 3512 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00000DF6 0020 init_history_want: dw _HISTORY_WANT_SIZE 3514 %endif 3515 3516 init_switch_p_low_pathsearch_high_guessextension: 0 00000DF8 00 init_switch_p_pathsearch: db 0 0 00000DF9 00 init_switch_p_guessextension: db 0 0 00000DFA 0000 relocate_source: dw 0 0 00000DFC 0000 relocate_down: dw 0 0 00000DFE 0000 init_switch_r: dw 0 0 00000E00 0000 init_base_size: dw 0 0 00000E02 0000 init_target_size: dw 0 0 00000E04 0100 init_switch_t_umblink: dw 1 ; Add UMBs to memory chain 0 00000E06 FFFF dw -1 0 00000E08 FFFF dw -1 0 00000E0A 8200 init_switch_t_strategy: dw 82h ; Last fit, high then low 0 00000E0C 8200 dw 82h 0 00000E0E 8200 dw 82h 3530 %if _BOOTLDR 0 00000E10 0000 init_boot_new_memsizekib: dw 0 0 00000E12 0000 init_boot_old_memsizekib: dw 0 3533 0 00000E14 0000 init_boot_ebdasize: dw 0 0 00000E16 0000 init_boot_ebdasource: dw 0 0 00000E18 0000 init_boot_ebdadest: dw 0 0 00000E1A 00 init_boot_ebdaflag: db 0 0 00000E1B 00 init_preserveloader: db 0 3539 %endif 0 00000E1C FF init_switch_pw: db 0FFh 0 00000E1D 00 init_switch_t: db 0 0 00000E1E 00 init_switch_t_ignore: db 0 0 00000E1F 00 init_switch_t_break: db 0 0 00000E20 00 init_switch_t_variable: db 0 ; /TV: do not relocate environment 3545 %if _APP_ENV_SIZE || _DEV_ENV_SIZE 0 00000E21 00 app_env_allocation: db 0 ; set to 0FFh if app's environment 3547 ; *is* in its own separate memory block 3548 ; (like it used to be always) 3549 %endif 3550 3551 3552 imsg: 3553 3554 %if _APPLICATION || _DEVICE 3555 %assign ELD 0 3556 %assign INTERC3 0 3557 %assign PART1 0 3558 %assign PART2 0 3559 %assign PART3 1 3560 3561 %include "pathshar.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug initialisation - Path analyse and search 5 <1> 6 <1> Copyright (C) 2008-2025 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> 17 <1> ; defines used: 18 <1> ; ELD = nonzero iff included by Extension for lDebug path.asm (for path.eld) 19 <1> ; INTERC3 = nonzero iff included by INTERC3 intercep.asm 20 <1> ; else included by lDebug init.asm 21 <1> ; PART1 = nonzero if to embed main code 22 <1> ; PART2 = nonzero if to embed subfunctions 23 <1> ; PART3 = nonzero if to embed imsg messages 24 <1> 25 <1> %if PART1 26 <1> ; INP: si -> pathname followed by command line 27 <1> ; word [ss:sp] = si 28 <1> ; OUT: word [ss:sp] -> final buffer 29 <1> init_analyse_pathname: 30 <1> mov bx, si 31 <1> xor dx, dx 32 <1> mov al, 0 33 <1> @@: 34 <1> cmp al, '/' 35 <1> je .slash 36 <1> cmp al, '\' 37 <1> je .slash 38 <1> cmp al, ':' 39 <1> je .colon 40 <1> cmp al, '.' 41 <1> jne .next 42 <1> .dot: 43 <1> mov dl, 1 ; set dl (fn with dot) 44 <1> jmp .next 45 <1> 46 <1> .slash: 47 <1> .colon: 48 <1> mov dx, 100h ; set dh (is a pathname), reset dl (fn with dot) 49 <1> .next: 50 <1> lodsb 51 <1> call init_ifsep 52 <1> jne @B 53 <1> dec si ; bx -> name, si -> terminator 54 <1> ; dh = nonzero if a pathname not just filename 55 <1> ; dl = nonzero if filename contains a dot 56 <1> push ss 57 <1> pop es 58 <1> mov cx, si 59 <1> sub cx, bx ; es:bx -> name, cx = length 60 <1> 61 <1> 62 <1> init_check_warn_extension: 63 <1> push dx 64 <1> push es 65 <1> 66 <1> test dl, dl ; last component has a dot ? 67 <1> jz .done ; no, do not warn --> 68 <1> 69 <1> rol byte [init_data_segment:init_switch_pw], 1 70 <1> internaldatarelocation 71 <1> jnc .done ; warning disabled --> 72 <1> 73 <1> cmp cx, 4 ; can fit an expected extension ? 74 <1> jb .warn ; no, warn --> 75 <1> 76 <1> sub si, 4 ; -> possible extension 77 <1> push init_data_segment 78 <1> pop es 79 <1> mov di, imsg.no_warn_extensions 80 <1> internaldatarelocation ; es:di -> allowed extensions 81 <1> .loop: 82 <1> mov al, 0 83 <1> xchg byte [init_data_segment:di+4], al 84 <1> ; NUL-terminate the candidate extension 85 <1> push ax 86 <1> mov dx, di 87 <1> call init_isstring? ; is it this one ? 88 <1> pop ax 89 <1> mov byte [init_data_segment:di+4], al 90 <1> ; restore next extension text 91 <1> je .done ; yes, do not warn --> 92 <1> scasw 93 <1> scasw ; di += 4 94 <1> test al, al ; was last ? 95 <1> jnz .loop 96 <1> .warn: 97 <1> mov dx, imsg.extension_warning 98 <1> internaldatarelocation 99 <1> call init_putsz_cs 100 <1> 101 <1> .done: 102 <1> pop es 103 <1> pop dx 104 <1> 105 <1> 106 <1> init_find_path: 107 <1> %if ELD 108 <1> extcallcall InDOS 109 <1> jnz .done_j 110 <1> testopt [relocateddata], tt_while 111 <1> linkdatarelocation internalflags_with_tt_while, -3 112 <1> jnz .done_j 113 <1> %endif 114 <1> cmp word [init_data_segment: init_switch_p_low_pathsearch_high_guessextension], strict byte 0 116 <1> internaldatarelocation -3 117 <1> je .done_j 118 <1> 119 <1> jcxz .done_j ; if no filename given --> 120 <1> 121 <1> ; es:bx -> name, cx = length 122 <1> mov di, relocated(while_buffer) 123 <1> linkdatarelocation while_buffer ; ss:while_buffer -> prefix, ss:di -> after end 124 <1> 125 <1> call init_check_filename 126 <1> jnc .found 127 <1> 128 <1> test dh, dh 129 <1> jz @F 130 <1> .done_j: 131 <1> jmp .done 132 <1> @@: 133 <1> rol byte [init_data_segment:init_switch_p_pathsearch], 1 134 <1> internaldatarelocation 135 <1> jnc .done_j 136 <1> 137 <1> %if _DEVICE && _APPLICATION && ! ELD && ! INTERC3 138 <1> testopt [internalflags6], dif6_device_mode 139 <1> jnz .device 140 <1> %endif 141 <1> %if _APPLICATION || ELD || INTERC3 142 <1> mov ax, [2Ch] 143 <1> %if _DEVICE && ! ELD && ! INTERC3 144 <1> jmp @F 145 <1> %endif 146 <1> %endif 147 <1> 148 <1> %if _DEVICE && ! ELD && ! INTERC3 149 <1> .device: 150 <1> call init_device_get_environment 151 <1> @@: 152 <1> %endif 153 <1> 154 <1> push cx 155 <1> mov di, imsg.varpath 156 <1> internaldatarelocation 157 <1> mov cx, imsg.varpath.length 158 <1> call init_findvar 159 <1> jc .done_pop 160 <1> 161 <1> .pathloop: 162 <1> push si 163 <1> mov cx, 128 ; put a limit 164 <1> @@: 165 <1> lodsb ; get next text 166 <1> cmp al, ';' ; separator ? 167 <1> je @F ; yes --> 168 <1> cmp al, 0 ; separator ? 169 <1> je @F ; yes --> 170 <1> loop @B ; loop up to limit 171 <1> jmp .pathtoolong ; error --> 172 <1> @@: 173 <1> mov cx, si 174 <1> dec cx ; -> terminator 175 <1> pop si ; -> content text 176 <1> sub cx, si ; = length excluding terminator 177 <1> push ss 178 <1> pop es 179 <1> mov di, relocated(while_buffer) 180 <1> linkdatarelocation while_buffer ; es:di -> buffer 181 <1> 182 <1> mov al, 0 ; no backslash if empty 183 <1> jcxz @FFF ; skip loop if empty --> 184 <1> @@: 185 <1> lodsb ; load from variable 186 <1> cmp al, '/' ; forward slash ? 187 <1> jne @F ; no --> 188 <1> mov al, '\' ; replace by backslash 189 <1> @@: 190 <1> stosb ; store 191 <1> loop @BB ; loop for cx = count 192 <1> @@: 193 <1> cmp al, '\' ; trailing backslash ? 194 <1> je @F ; yes --> 195 <1> mov al, '\' 196 <1> stosb ; append it 197 <1> @@: 198 <1> pop cx 199 <1> 200 <1> push ds 201 <1> push si 202 <1> ; ss = es, es:bx -> name, cx = length 203 <1> ; ss:while_buffer -> prefix, ss:di -> after end 204 <1> call init_check_filename 205 <1> pop si 206 <1> pop ds ; ds:si -> terminator of path element 207 <1> jnc .found 208 <1> 209 <1> lodsb ; get terminator 210 <1> cmp al, ';' ; semicolon ? 211 <1> jne .done ; no --> 212 <1> push cx 213 <1> jmp .pathloop ; try next --> 214 <1> 215 <1> 216 <1> .found: 217 <1> push ss 218 <1> pop ds ; ds => PSP 219 <1> pop si 220 <1> add si, cx ; ds:si -> behind original name 221 <1> push ss 222 <1> pop es 223 <1> dec di ; es:di -> NUL 224 <1> %if INTERC3 225 <1> mov al, 32 ; blank codepoint 226 <1> cmp byte [si], al ; <= 32 ? 227 <1> ja @F ; no, store a blank first --> 228 <1> %endif 229 <1> jmp @FF ; skip store on first iteration 230 <1> 231 <1> @@: 232 <1> cmp di, relocated(while_buffer.end) - 2 233 <1> linkdatarelocation while_buffer.end 234 <1> ja .toolong 235 <1> stosb 236 <1> @@: 237 <1> lodsb 238 <1> cmp al, 0 239 <1> je @F 240 <1> cmp al, 13 241 <1> jne @BB 242 <1> @@: ; (targeted from both directions) 243 <1> mov al, 13 244 <1> stosb 245 <1> mov si, relocated(while_buffer) 246 <1> linkdatarelocation while_buffer 247 <1> push si ; offset for N/K command (kk) 248 <1> jmp .done 249 <1> 250 <1> .toolong: 251 <1> mov dx, imsg.kktoolong 252 <1> internaldatarelocation 253 <1> call init_putsz_cs 254 <1> jmp @B 255 <1> 256 <1> .pathtoolong: 257 <1> %if ELD 258 <1> push ss 259 <1> pop ds 260 <1> %endif 261 <1> mov dx, imsg.pathtoolong 262 <1> internaldatarelocation 263 <1> call init_putsz_cs 264 <1> 265 <1> pop ax ; (discard si) 266 <1> .done_pop: 267 <1> pop ax ; (discard cx) 268 <1> .done: 269 <1> %endif 270 <1> 271 <1> 272 <1> %if PART2 273 <1> ; Compare character with separators 274 <1> ; 275 <1> ; INP: al = character 276 <1> ; OUT: ZR if al is CR, NUL, blank, tab, comma, semicolon, or equal sign 277 <1> ; ZR if switch character is a slash and al is a slash 278 <1> ; NZ else 279 <1> ; REM: This is only used for parsing FCBs. 280 <1> init_ifsep: 281 <1> cmp al, 0 282 <1> je .return 283 <1> cmp al, 13 284 <1> je .return 285 <1> cmp al, ';' 286 <1> je .return 287 <1> cmp al, 32 288 <1> je .return 289 <1> cmp al, 9 290 <1> je .return 291 <1> cmp al, ',' 292 <1> je .return 293 <1> cmp al, '=' 294 <1> je .return 295 <1> cmp al, byte [ss:relocated(swch1)] 296 <1> linkdatarelocation swch1 297 <1> .return: 298 <1> retn 299 <1> 300 <1> 301 <1> %if _APPLICATION || _DEVICE 302 <1> ; INP: es:bx -> name to try, cx = length 303 <1> ; dl = zero if to attempt filename extensions 304 <1> ; ss:while_buffer -> prefix, ss:di -> after 305 <1> ; OUT: NC if file found, 306 <1> ; ss:while_buffer = name, ss:di -> after NUL 307 <1> ; CY if file not found 308 <1> ; ds = ss 309 <1> ; CHG: si, ax 310 <1> init_check_filename: 311 <1> push es 312 <1> push cx 313 <1> 314 <1> push es 315 <1> pop ds 316 <1> mov si, bx ; ds:si -> name 317 <1> push ss 318 <1> pop es ; es:di -> where to append name 319 <1> rep movsb ; append the name 320 <1> push di ; on stack: at initial terminator 321 <1> mov si, imsg.p_extensions 322 <1> internaldatarelocation 323 <1> ; cs:si -> extensions to try 324 <1> .loop: 325 <1> mov al, 0 326 <1> stosb ; zero-terminate name 327 <1> mov ax, 4300h ; get attributes 328 <1> push dx 329 <1> push ss 330 <1> pop ds 331 <1> mov dx, relocated(while_buffer) ; ds:dx -> pathname to try 332 <1> linkdatarelocation while_buffer 333 <1> stc 334 <1> %if ELD 335 <1> extcallcall _doscall 336 <1> %else 337 <1> int 21h ; try to get attributes 338 <1> %endif 339 <1> jc @F ; not found --> CY 340 <1> test cl, 10h ; directory ? 341 <1> jz @F ; no --> NC 342 <1> stc ; yes, handle as not found: CY 343 <1> @@: 344 <1> pop dx 345 <1> jnc .ret ; --> (NC) 346 <1> test dl, dl ; had an extension originally ? 347 <1> jnz .ret_CY ; yes, do not try to append one --> 348 <1> rol byte [init_data_segment:init_switch_p_guessextension], 1 349 <1> internaldatarelocation 350 <1> jnc .ret_CY ; if no guessing extension --> 351 <1> pop di 352 <1> push di 353 <1> cmp byte [init_data_segment:si], 0 354 <1> ; last attempt done ? 355 <1> je .ret_CY ; yes --> 356 <1> init_data_segment movsw ; ".C" 357 <1> init_data_segment movsw ; "OM" 358 <1> jmp .loop 359 <1> 360 <1> .ret_CY: 361 <1> stc ; CY 362 <1> .ret: 363 <1> pop ax ; (discard) 364 <1> pop cx 365 <1> pop es 366 <1> retn 367 <1> %endif 368 <1> 369 <1> 370 <1> ; INP: ax => environment, zero if none 371 <1> ; cs:di -> variable name, including '=' terminator 372 <1> ; cx = variable name length, including '=' terminator 373 <1> ; OUT: CY if not found 374 <1> ; NC if found, 375 <1> ; ds:si -> behind '=' of found variable 376 <1> ; CHG: ax, es, di, ds, si, cx 377 <1> init_findvar: 378 <1> test ax, ax 379 <1> jz .notvar 380 <1> mov ds, ax 381 <1> xor si, si 382 <1> 383 <1> @@: 384 <1> push init_data_segment 385 <1> pop es 386 <1> push cx 387 <1> push di 388 <1> push si 389 <1> repe cmpsb 390 <1> je .foundvar ; --> (NC) 391 <1> pop si 392 <1> pop di 393 <1> pop cx 394 <1> call init_nextvar 395 <1> jnz @B 396 <1> .notvar: 397 <1> stc 398 <1> retn 399 <1> 400 <1> .foundvar: 401 <1> pop ax 402 <1> pop ax 403 <1> pop ax 404 <1> retn 405 <1> 406 <1> 407 <1> init_nextvar: 408 <1> @@: 409 <1> lodsb 410 <1> test al, al 411 <1> jnz @B 412 <1> cmp byte [si], 0 413 <1> retn 414 <1> %endif 415 <1> 416 <1> 417 <1> %if PART3 418 <1> %if INTERC3 419 <1> %define _PROGNAME "" 420 <1> %endif 421 <1> align 2, db 0 422 <1> .no_warn_extensions: 423 <1> %ifn INTERC3 0 00000E22 2E4845582E524F4D db ".HEX",".ROM" 425 <1> %endif 426 <1> %if (($ - .no_warn_extensions) % 4) != 0 427 <1> %error Wrong extensions length 428 <1> %endif 0 00000E2A 2E434F4D .p_extensions: db ".COM" 0 00000E2E 2E455845 db ".EXE" 431 <1> %ifn INTERC3 0 00000E32 2E42494E db ".BIN" 433 <1> %endif 0 00000E36 00 asciz 435 <1> %if (($ - 1 - .p_extensions) % 4) != 0 436 <1> %error Wrong extensions length 437 <1> %endif 0 00000E37 504154483D .varpath: db "PATH=" 439 <1> .varpath.length equ $ - .varpath 440 <1> .extension_warning: 441 <1> %ifn ELD 0 00000E3C 6C44656275673A20 db _PROGNAME,": " 443 <1> %endif 0 00000E44 5761726E696E672C20 asciz "Warning, unknown filename extension specified!",13,10 0 00000E4D 756E6B6E6F776E2066 0 00000E56 696C656E616D652065 0 00000E5F 7874656E73696F6E20 0 00000E68 737065636966696564 0 00000E71 210D0A00 445 <1> .kktoolong: 446 <1> %ifn ELD 0 00000E75 6C44656275673A20 db _PROGNAME,": " 448 <1> %endif 0 00000E7D 4572726F722C20746F asciz "Error, too long command line tail!",13,10 0 00000E86 6F206C6F6E6720636F 0 00000E8F 6D6D616E64206C696E 0 00000E98 65207461696C210D0A 0 00000EA1 00 450 <1> .pathtoolong: 451 <1> %ifn ELD 0 00000EA2 6C44656275673A20 db _PROGNAME,": " 453 <1> %endif 0 00000EAA 4572726F722C20746F asciz "Error, too long %PATH% variable element!",13,10 0 00000EB3 6F206C6F6E67202550 0 00000EBC 415448252076617269 0 00000EC5 61626C6520656C656D 0 00000ECE 656E74210D0A00 455 <1> %endif 3562 %endif 3563 0 00000ED5 4D415800 .max: asciz "MAX" 0 00000ED9 4D494E00 .min: asciz "MIN" 3566 .default: 0 00000EDD 44454641554C5400 asciz "DEFAULT" 3568 %if _CONFIG 0 00000EE5 4C4445425547434F4E .varconfig: db "LDEBUGCONFIG=" 0 00000EEE 4649473D 3570 .varconfig.length equ $ - .varconfig 0 00000EF2 4C4445425547534352 .varscripts: db "LDEBUGSCRIPTS=" 0 00000EFB 495054533D 3572 .varscripts.length equ $ - .varscripts 3573 %endif 3574 %if _DEVICE && _DEV_ENV_SIZE || _APPLICATION && _APP_ENV_SIZE 3575 .app_env_too_large: 3576 .dev_env_too_large: 0 00000F00 6C44656275673A2057 asciz _PROGNAME,": Warning, too long environment! Not copying.",13,10 0 00000F09 61726E696E672C2074 0 00000F12 6F6F206C6F6E672065 0 00000F1B 6E7669726F6E6D656E 0 00000F24 7421204E6F7420636F 0 00000F2D 7079696E672E0D0A00 3578 %endif 3579 %if _APPLICATION || _DEVICE 3580 .early_mem_fail: 0 00000F36 6C44656275673A2046 db _PROGNAME,": Failed to allocate memory!" 0 00000F3F 61696C656420746F20 0 00000F48 616C6C6F6361746520 0 00000F51 6D656D6F727921 3582 %endif 3583 .crlf: 0 00000F58 0D0A00 asciz 13,10 3585 .relocate_failure: 0 00000F5B 6C44656275673A2052 asciz _PROGNAME,": Relocation failed.",13,10 0 00000F64 656C6F636174696F6E 0 00000F6D 206661696C65642E0D 0 00000F76 0A00 3587 .init_relocate_failure: 0 00000F78 6C44656275673A2053 asciz _PROGNAME,": Second init relocation failed, out of memory.",13,10 0 00000F81 65636F6E6420696E69 0 00000F8A 742072656C6F636174 0 00000F93 696F6E206661696C65 0 00000F9C 642C206F7574206F66 0 00000FA5 206D656D6F72792E0D 0 00000FAE 0A00 3589 .early_reloc_fail: 0 00000FB0 6C44656275673A2046 asciz _PROGNAME,": Failed to relocate, internal error!",13,10 0 00000FB9 61696C656420746F20 0 00000FC2 72656C6F636174652C 0 00000FCB 20696E7465726E616C 0 00000FD4 206572726F72210D0A 0 00000FDD 00 3591 %if _DEVICE 3592 .dos_below_5: 0 00000FDE 204E6F74653A20444F asciz " Note: DOS must be at least version 5.",13,10 0 00000FE7 53206D757374206265 0 00000FF0 206174206C65617374 0 00000FF9 2076657273696F6E20 0 00001002 352E0D0A00 3594 .device_end_escaped: 0 00001007 6C44656275673A2045 asciz _PROGNAME,": Error, got escaped command line end!",13,10 0 00001010 72726F722C20676F74 0 00001019 206573636170656420 0 00001022 636F6D6D616E64206C 0 0000102B 696E6520656E64210D 0 00001034 0A00 3596 .device_end_truncate: 0 00001036 6C44656275673A2045 asciz _PROGNAME,": Error, truncating too long command line!",13,10 0 0000103F 72726F722C20747275 0 00001048 6E636174696E672074 0 00001051 6F6F206C6F6E672063 0 0000105A 6F6D6D616E64206C69 0 00001063 6E65210D0A00 3598 %endif 3599 %ifn _APPLICATION 3600 .not_an_application: 3601 ascic _PROGNAME,": Error, no application mode included!",13,10 3602 %endif 3603 %if _APPLICATION || _DEVICE 3604 %if _ALTVID 3605 .noaltvid: 0 00001069 6C44656275673A2045 asciz _PROGNAME,": Error, no alternative video adapter detected!",13,10 0 00001072 72726F722C206E6F20 0 0000107B 616C7465726E617469 0 00001084 766520766964656F20 0 0000108D 616461707465722064 0 00001096 65746563746564210D 0 0000109F 0A00 3607 %endif 0 000010A1 00 align 2, db 0 3609 .help.defaultfilename: 0 000010A2 4445425547 db _FILENAME 3611 .help.defaultfilename.length equ $ - .help.defaultfilename 3612 0 000010A7 00 align 2, db 0 3614 .help.1: 0 000010A8 6C4465627567202832 fill_at_least 80, 0, asciz _PROGNAME,_VERSION,", debugger.",13,10 0 000010B1 3032362D30332D3133 0 000010BA 292C20646562756767 0 000010C3 65722E0D0A0000 0 000010C3 3616 3617 .help.1a: 0 000010F8 0D0A db 13,10 0 000010FA 55736167653A20 db "Usage: " 0 00001101 00 asciz 3621 .help.2: 0 00001102 5B2E434F4D5D205B2F db "[.COM] [/C=commands] [[drive:][path]progname.ext [parameters]]",13,10 0 0000110B 433D636F6D6D616E64 0 00001114 735D205B5B64726976 0 0000111D 653A5D5B706174685D 0 00001126 70726F676E616D652E 0 0000112F 657874205B70617261 0 00001138 6D65746572735D5D0D 0 00001141 0A 0 00001142 0D0A db 13,10 0 00001144 20202F433D636F6D6D db " /C=commands",9,9, "semicolon-separated list of commands (quote spaces)",13,10 0 0000114D 616E6473090973656D 0 00001156 69636F6C6F6E2D7365 0 0000115F 70617261746564206C 0 00001168 697374206F6620636F 0 00001171 6D6D616E6473202871 0 0000117A 756F74652073706163 0 00001183 6573290D0A 3625 %if _CONFIG 0 00001188 20202F494E09090964 db " /IN",9,9,9, "discard command line buffer, do not run config",13,10 0 00001191 69736361726420636F 0 0000119A 6D6D616E64206C696E 0 000011A3 65206275666665722C 0 000011AC 20646F206E6F742072 0 000011B5 756E20636F6E666967 0 000011BE 0D0A 3627 %endif 3628 %if _AUXBUFFSIZE != _AUXBUFFMAXSIZE 0 000011C0 20202F413D4D415809 db " /A=MAX",9,9, "expand auxiliary buffer to maximum, #" 0 000011C9 09657870616E642061 0 000011D2 7578696C6961727920 0 000011DB 62756666657220746F 0 000011E4 206D6178696D756D2C 0 000011ED 2023 0 000011EF 32345F353736 _autodigits _AUXBUFFMAXSIZE, 1, 1 0 000011F5 2042797465730D0A db " Bytes",13,10 0 000011FD 20202F413D4D494E09 db " /A=MIN",9,9, "restrict auxiliary buffer to minimum, #" 0 00001206 097265737472696374 0 0000120F 20617578696C696172 0 00001218 792062756666657220 0 00001221 746F206D696E696D75 0 0000122A 6D2C2023 0 0000122E 385F323038 _autodigits _AUXBUFFSIZE, 1, 1 0 00001233 2042797465730D0A db " Bytes",13,10 0 0000123B 20202F413D6E756D62 db " /A=number",9,9, "set auxiliary buffer size to hex number of bytes",13,10 0 00001244 657209097365742061 0 0000124D 7578696C6961727920 0 00001256 627566666572207369 0 0000125F 7A6520746F20686578 0 00001268 206E756D626572206F 0 00001271 662062797465730D0A 0 0000127A 20202F413D236E756D db " /A=#number",9,9, "set auxiliary buffer size to decimal number of bytes",13,10 0 00001283 626572090973657420 0 0000128C 617578696C69617279 0 00001295 206275666665722073 0 0000129E 697A6520746F206465 0 000012A7 63696D616C206E756D 0 000012B0 626572206F66206279 0 000012B9 7465730D0A 0 000012BE 20202F41090909616C db " /A",9,9,9, "alias for /A=MAX",13,10 0 000012C7 69617320666F72202F 0 000012D0 413D4D41580D0A 3638 %endif 3639 %if _EXTENSIONS 0 000012D7 20202F583D5B4D4158 db " /X=[MAX|MIN|number]",9, "change ELD code buffer size, 0 to #65_520 Bytes",13,10 0 000012E0 7C4D494E7C6E756D62 0 000012E9 65725D096368616E67 0 000012F2 6520454C4420636F64 0 000012FB 652062756666657220 0 00001304 73697A652C20302074 0 0000130D 6F202336355F353230 0 00001316 2042797465730D0A 0 0000131E 20202F593D5B4D4158 db " /Y=[MAX|MIN|number]",9, "change ELD data buffer size, 0 to #" 0 00001327 7C4D494E7C6E756D62 0 00001330 65725D096368616E67 0 00001339 6520454C4420646174 0 00001342 612062756666657220 0 0000134B 73697A652C20302074 0 00001354 6F2023 3642 %ifn _LINK 3643 %assign NUMBER ext_data_max_size_equate_early 3644 _autodigits NUMBER, 1, 1 3645 db " Bytes",13,10 3646 %else 3647 wlcalc word_minusext_ext_data_area, equ $ 3648 wlcalc word_itoa_31_06_0Ah, equ $ 0 00001357 [F0FF] dw relocatedzero + 0FFF0h 0 00001359 00 times 4 db 0 0 0000135D 2042797465730D0A db " Bytes",13,10 3652 %endif 3653 %endif 3654 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00001365 20202F483D5B4D4158 db " /H=[MAX|MIN|number]",9, "change history buffer size, #260 to #65_520 Bytes",13,10 0 0000136E 7C4D494E7C6E756D62 0 00001377 65725D096368616E67 0 00001380 6520686973746F7279 0 00001389 206275666665722073 0 00001392 697A652C2023323630 0 0000139B 20746F202336355F35 0 000013A4 32302042797465730D 0 000013AD 0A 3656 %endif 0 000013AE 20202F420909097275 db " /B",9,9,9, "run a breakpoint within initialisation",13,10 0 000013B7 6E206120627265616B 0 000013C0 706F696E7420776974 0 000013C9 68696E20696E697469 0 000013D2 616C69736174696F6E 0 000013DB 0D0A 0 000013DD 20202F505B2B7C2D5D db " /P[+|-]",9,9, "append ext to initial filename and search path",13,10 0 000013E6 0909617070656E6420 0 000013EF 65787420746F20696E 0 000013F8 697469616C2066696C 0 00001401 656E616D6520616E64 0 0000140A 207365617263682070 0 00001413 6174680D0A 0 00001418 20202F465B2B7C2D5D db " /F[+|-]",9,9, "always treat executable file as a flat binary",13,10 0 00001421 0909616C7761797320 0 0000142A 747265617420657865 0 00001433 63757461626C652066 0 0000143C 696C65206173206120 0 00001445 666C61742062696E61 0 0000144E 72790D0A 0 00001452 20202F455B2B7C2D5D db " /E[+|-]",9,9, "for flat binaries set up Stack Segment != PSP",13,10 0 0000145B 0909666F7220666C61 0 00001464 742062696E61726965 0 0000146D 732073657420757020 0 00001476 537461636B20536567 0 0000147F 6D656E7420213D2050 0 00001488 53500D0A 3661 %if _VXCHG 0 0000148C 20202F565B2B7C2D5D db " /V[+|-]",9,9, "enable/disable video screen swapping",13,10 0 00001495 0909656E61626C652F 0 0000149E 64697361626C652076 0 000014A7 6964656F2073637265 0 000014B0 656E20737761707069 0 000014B9 6E670D0A 3663 %endif 3664 %if _DEBUG && _DEBUG_COND 3665 db " /D[+|-]",9,9, "enable/disable debuggable mode",13,10 3666 %endif 3667 %if _ALTVID 0 000014BD 20202F325B2B7C2D5D db " /2[+|-]",9,9, "enable/disable use alternate video adapter for output",13,10 0 000014C6 0909656E61626C652F 0 000014CF 64697361626C652075 0 000014D8 736520616C7465726E 0 000014E1 61746520766964656F 0 000014EA 206164617074657220 0 000014F3 666F72206F75747075 0 000014FC 740D0A 3669 %endif 0 000014FF 202070726F676E616D db " progname.ext",9,9,"(executable) file to debug or examine",13,10 0 00001508 652E65787409092865 0 00001511 786563757461626C65 0 0000151A 292066696C6520746F 0 00001523 206465627567206F72 0 0000152C 206578616D696E650D 0 00001535 0A 0 00001536 2020706172616D6574 db " parameters",9,9, "parameters given to program",13,10 0 0000153F 657273090970617261 0 00001548 6D6574657273206769 0 00001551 76656E20746F207072 0 0000155A 6F6772616D0D0A 0 00001561 0D0A db 13,10 0 00001563 466F722061206C6973 db "For a list of debugging commands, run " 0 0000156C 74206F662064656275 0 00001575 6767696E6720636F6D 0 0000157E 6D616E64732C207275 0 00001587 6E20 0 00001589 00 asciz 3675 .help.3: 0 0000158A 20616E642074797065 db " and type ? at the prompt.",13,10 0 00001593 203F20617420746865 0 0000159C 2070726F6D70742E0D 0 000015A5 0A 0 000015A6 00 asciz 3678 %endif 3679 %if _ONLY386 3680 .no386: ascizline "Error: This ",_PROGNAME," build requires a 386 CPU or higher." 3681 %elif _ONLYNON386 3682 .386: asciiline "Warning: This ",_PROGNAME," build is ignorant of 386 CPU specifics." 3683 ascizline 9," It does not allow access to the available 386-specific registers!" 3684 %endif 3685 3686 %if _BOOTLDR_DISCARD_HELP 0 000015A7 00 align 2, db 0 3688 %ifn _LINK 3689 .boothelp_replacement: helppage bootdisc 3690 %else 3691 .boothelp_replacement: 3692 %define MESSAGE_INLINE 3693 %include "help/bootdisc.asm" 1 <1> %if 0 2 <1> 3 <1> lDebug help message pages 4 <1> 5 <1> Copyright (C) 1995-2003 Paul Vojta 6 <1> Copyright (C) 2008-2023 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> %define MESSAGE "This help page is only available in boot loaded mode.",13,10 17 <1> 18 <1> %ifndef GET_MESSAGE_LENGTH 19 <1> %ifndef MESSAGE_INLINE 20 <1> %include "debug.mac" 21 <1> %endif 22 <1> 0 000015A8 546869732068656C70 db MESSAGE 0 000015B1 207061676520697320 0 000015BA 6F6E6C792061766169 0 000015C3 6C61626C6520696E20 0 000015CC 626F6F74206C6F6164 0 000015D5 6564206D6F64652E0D 0 000015DE 0A 24 <1> %else 25 <1> _strlen MESSAGE,0 26 <1> %endif 3694 %undef MESSAGE_INLINE 0 000015DF 00 asciz 3696 %endif 3697 endarea .boothelp_replacement 3698 %endif 3699 3700 %if _APPLICATION || _DEVICE 3701 %if _SYMBOLIC 3702 .switch_s_garbage: 3703 asciz "Ignoring garbage at end of /S switch!",13,10 3704 .switch_s_error: 3705 asciz "Switch /S invalid content",13,10 3706 %endif 3707 .invalidswitch: 0 000015E0 496E76616C69642073 db "Invalid switch - " 0 000015E9 7769746368202D20 3709 .invalidswitch_a: 0 000015F1 780D0A00 asciz "x",13,10 3711 .switch_x_error: 0 000015F5 537769746368202F db "Switch /" 3713 .switch_x_error_a: 0 000015FD 7820696E76616C6964 asciz "x invalid content",13,10 0 00001606 20636F6E74656E740D 0 0000160F 0A00 3715 %endif 3716 %if _CONFIG 3717 %if _APPLICATION 0 00001611 00 align 2, db 0 3719 .default_cmdline.app: 3720 db _APPSCRIPTPREFIX 0 00001612 406966206578697374 db "@if exists y ::CONFIG::",_APPSCRIPTNAME," :",_APPSCRIPTLABEL 0 0000161B 732079203A3A434F4E 0 00001624 4649473A3A4C444542 0 0000162D 55472E534C44203A61 0 00001636 70706C69636174696F 0 0000163F 6E73746172747570 0 00001647 207468656E2079203A db " then y ::CONFIG::",_APPSCRIPTNAME," :",_APPSCRIPTLABEL 0 00001650 3A434F4E4649473A3A 0 00001659 4C44454255472E534C 0 00001662 44203A6170706C6963 0 0000166B 6174696F6E73746172 0 00001674 747570 0 00001677 0D db 13 3724 .default_cmdline.app.length equ $ - .default_cmdline.app 0 00001678 00 db 0 3726 %if .default_cmdline.app.length + 128 + 8 > _RC_BUFFER_SIZE 3727 %error Too large default app cmdline 3728 %endif 3729 %endif 3730 %if _DEVICE 0 00001679 00 align 2, db 0 3732 .default_cmdline.dev: 3733 db _DEVSCRIPTPREFIX 0 0000167A 406966206578697374 db "@if exists y ::CONFIG::",_DEVSCRIPTNAME," :",_DEVSCRIPTLABEL 0 00001683 732079203A3A434F4E 0 0000168C 4649473A3A4C444542 0 00001695 55472E534C44203A64 0 0000169E 657669636573746172 0 000016A7 747570 0 000016AA 207468656E2079203A db " then y ::CONFIG::",_DEVSCRIPTNAME," :",_DEVSCRIPTLABEL 0 000016B3 3A434F4E4649473A3A 0 000016BC 4C44454255472E534C 0 000016C5 44203A646576696365 0 000016CE 73746172747570 0 000016D5 0D db 13 3737 .default_cmdline.dev.length equ $ - .default_cmdline.dev 0 000016D6 00 db 0 3739 %if .default_cmdline.dev.length + 128 + 8 > _RC_BUFFER_SIZE 3740 %error Too large default dev cmdline 3741 %endif 3742 %endif 3743 %endif 3744 %if _BOOTLDR 0 000016D7 00 align 2, db 0 3746 .default_cmdline.boot: 3747 db _BOOTSCRIPTPREFIX 0 000016D8 406966206578697374 db "@if exists y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 0 000016E1 732079206C64702F4C 0 000016EA 44454255472E534C44 0 000016F3 203A626F6F74737461 0 000016FC 72747570 0 00001700 207468656E2079206C db " then y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 0 00001709 64702F4C4445425547 0 00001712 2E534C44203A626F6F 0 0000171B 7473746172747570 0 00001723 00 asciz 3751 .default_cmdline.boot.length equ $ - .default_cmdline.boot 3752 %if .default_cmdline.boot.length + 8 > _RC_BUFFER_SIZE 3753 %error Too large default boot cmdline 3754 %endif 3755 3756 %if _EXECUTABLE 3757 .ldpslash: 0 00001724 6C64702F db "ldp/" 3759 %endif 3760 .rpl_detected: 0 00001728 52504C206465746563 asciz "RPL detected! Currently unsupported.",13,10 0 00001731 746564212043757272 0 0000173A 656E746C7920756E73 0 00001743 7570706F727465642E 0 0000174C 0D0A00 3762 .mismatch_detected: 0 0000174F 4D69736D6174636820 asciz "Mismatch in memory size detected! Internal error!",13,10 0 00001758 696E206D656D6F7279 0 00001761 2073697A6520646574 0 0000176A 65637465642120496E 0 00001773 7465726E616C206572 0 0000177C 726F72210D0A00 3764 .boot_ebda_unexpected: 0 00001783 454244412061742075 asciz "EBDA at unexpected position.",13,10 0 0000178C 6E6578706563746564 0 00001795 20706F736974696F6E 0 0000179E 2E0D0A00 3766 .boot_error_out_of_memory: 0 000017A2 4F7574206F66206D65 asciz "Out of memory!",13,10 0 000017AB 6D6F7279210D0A00 3768 .boot_error_internal: 0 000017B3 496E7465726E616C20 asciz "Internal error while relocating load image!",13,10 0 000017BC 6572726F7220776869 0 000017C5 6C652072656C6F6361 0 000017CE 74696E67206C6F6164 0 000017D7 20696D616765210D0A 0 000017E0 00 3770 .booterror: 0 000017E1 0D0A6C446562756720 asciz 13,10,_PROGNAME," boot error. Press any key to reboot.",13,10 0 000017EA 626F6F74206572726F 0 000017F3 722E20507265737320 0 000017FC 616E79206B65792074 0 00001805 6F207265626F6F742E 0 0000180E 0D0A00 3772 .bootwarn: 0 00001811 0D0A6C446562756720 asciz 13,10,_PROGNAME," warning: " 0 0000181A 7761726E696E673A20 0 00001823 00 3774 .boot_warn_no_loader: 0 00001824 457870656374656420 asciz "Expected loader not found!",13,10 0 0000182D 6C6F61646572206E6F 0 00001836 7420666F756E64210D 0 0000183F 0A00 3776 .boot_warn_invalid_loader: 0 00001841 457870656374656420 asciz "Expected loader is invalid!",13,10 0 0000184A 6C6F61646572206973 0 00001853 20696E76616C696421 0 0000185C 0D0A00 3778 .boot_warn_lazy_loader: 0 0000185F 457870656374656420 asciz "Expected loader doesn't have a query function!",13,10 0 00001868 6C6F6164657220646F 0 00001871 65736E277420686176 0 0000187A 652061207175657279 0 00001883 2066756E6374696F6E 0 0000188C 210D0A00 3780 .boot_warn_loader_no_reloc: 0 00001890 4C6F6164657220646F asciz "Loader doesn't provide a relocation function!",13,10 0 00001899 65736E27742070726F 0 000018A2 766964652061207265 0 000018AB 6C6F636174696F6E20 0 000018B4 66756E6374696F6E21 0 000018BD 0D0A00 3782 %endif 3783 %if _DOSEMU 0 000018C0 30322F32352F3933 .dosemudate: db "02/25/93" 3785 %endif 3786 %if _VDD && (_APPLICATION || _DEVICE) 0 000018C8 44454258585644442E .vdd: asciz "DEBXXVDD.DLL" 0 000018D1 444C4C00 0 000018D5 446973706174636800 .dispatch: asciz "Dispatch" 0 000018DE 496E697400 .init: asciz "Init" 0 000018E3 4D4F555345202020 .mouse: db "MOUSE",32,32,32 ; Looks like a device name 0 000018EB 416E64792057617473 .andy: db "Andy Watson" ; I don't know him and why he's inside the NTVDM mouse driver 0 000018F4 6F6E 3792 endarea .andy 0 000018F6 57696E646F7773204E .ntdos: db "Windows NT MS-DOS subsystem Mouse Driver" ; Int33.004D mouse driver copyright string (not ASCIZ) 0 000018FF 54204D532D444F5320 0 00001908 73756273797374656D 0 00001911 204D6F757365204472 0 0000191A 69766572 3794 endarea .ntdos 3795 3796 ; INP: - 3797 ; OUT: CY if not NTVDM 3798 ; NC if NTVDM 3799 ; ds = es = cs 3800 ; CHG: ax, bx, cx, dx, di, si, bp, es, ds 3801 isnt: 0 0000191E B80258 mov ax, 5802h ; Get UMB link state 0 00001921 CD21 int 21h 0 00001923 30E4 xor ah, ah 0 00001925 50 push ax ; Save UMB link state 0 00001926 B80358 mov ax, 5803h ; Set UMB link state: 0 00001929 BB0100 mov bx, 1 ; Add UMBs to memory chain 0 0000192C CD21 int 21h 0 0000192E B452 mov ah, 52h 0 00001930 BBFFFF mov bx, -1 0 00001933 CD21 int 21h ; Get list of lists 0 00001935 43 inc bx ; 0FFFFh ? 0 00001936 7503E98E00 jz .notnt ; invalid --> 0 0000193B 83FB02 cmp bx, 2 ; would access word at 0FFFFh ? 0 0000193E 7503E98600 je .notnt ; yes, invalid --> 0 00001943 268B47FD mov ax, word [es:bx-3] ; First MCB 0 00001947 0E push cs 0 00001948 07 pop es ; reset es 3819 .loop: 0 00001949 8ED8 mov ds, ax ; ds = MCB 0 0000194B 40 inc ax ; Now segment of memory block itself 0 0000194C 31D2 xor dx, dx 0 0000194E 31DB xor bx, bx 0 00001950 803F5A cmp byte [bx], 'Z' ; End of MCB chain? 0 00001953 7503 jne .notlast 0 00001955 42 inc dx 0 00001956 EB05 jmp short .notchain 3828 .notlast: 0 00001958 803F4D cmp byte [bx], 'M' ; Valid MCB chain? 0 0000195B 756C jne .error 3831 .notchain: 0 0000195D 8B4F03 mov cx, [bx+3] ; MCB size in paragraphs 3833 ; ax = current memory block 3834 ; cx = size of current memory block in paragraphs 3835 ; dx = flag whether this is the last MCB 3836 ; ds = current MCB (before memory block) 0 00001960 837F0108 cmp word [bx+1], 8 ; MCB owner DOS? 0 00001964 755D jne .notfound_1 0 00001966 817F085344 cmp word [bx+8], "SD" ; MCB name "SD"? 0 0000196B 7556 jne .notfound_1 3841 .loopsub: 0 0000196D 8ED8 mov ds, ax ; SD sub-segment inside memory block 0 0000196F 40 inc ax 0 00001970 49 dec cx 0 00001971 8B6F03 mov bp, word [bx+3] ; Paragraphs 'til end of SD sub-segment 3846 ; ax = current SD sub-segment 3847 ; cx = paragraphs from SD sub-segment start (ax) to current memory block end 3848 ; ds = current SD sub-MCB (like MCB, but for SD sub-segment) 3849 ; bp = current SD sub-segment size in paragraphs 0 00001974 39E9 cmp cx, bp 0 00001976 724B jb .notfound_1 ; Goes beyond memory block, invalid --> 0 00001978 803F51 cmp byte [bx], 'Q' ; NTVDM type 51h sub-segment ? 0 0000197B 753C jne .notfound_2 ; no --> 0 0000197D BE0800 mov si, 8 ; Offset of device name (if SD device driver sub-segment) 0 00001980 BF[E318] mov di, imsg.mouse 0 00001983 51 push cx 0 00001984 89F1 mov cx, si ; length of name 0 00001986 F3A6 repe cmpsb ; blank-padded device name "MOUSE" ? 0 00001988 59 pop cx 0 00001989 752E jne .notfound_2 ; Device name doesn't match, try next SD sub-segment 0 0000198B 8CD8 mov ax, ds 0 0000198D 40 inc ax 0 0000198E 8ED8 mov ds, ax ; Segment of SD sub-segment 3864 ; ds = current SD sub-segment 0 00001990 89E8 mov ax, bp ; Leave paragraph value in bp 0 00001992 A900F0 test ax, 0F000h ; Would *16 cause an overflow? 0 00001995 7520 jnz .notfound_3 ; Then too large --> 0 00001997 51 push cx 0 00001998 B104 mov cl, 4 0 0000199A D3E0 shl ax, cl ; *16 0 0000199C 59 pop cx 3872 ; ax = current SD sub-segment size in byte 3873 .andy: 0 0000199D BF[EB18] mov di, imsg.andy 0 000019A0 51 push cx 0 000019A1 B90B00 mov cx, imsg.andy_size 0 000019A4 E82E00 call findstring ; String "Andy Watson"? 0 000019A7 59 pop cx 0 000019A8 720D jc .notfound_3 3880 .ntdos: 0 000019AA BF[F618] mov di, imsg.ntdos 0 000019AD 51 push cx 0 000019AE B92800 mov cx, imsg.ntdos_size 0 000019B1 E82100 call findstring ; String "Windows NT MS-DOS subsystem Mouse Driver"? 0 000019B4 59 pop cx 0 000019B5 7313 jnc .found ; (NC) 3887 .notfound_3: 0 000019B7 8CD8 mov ax, ds 3889 .notfound_2: 0 000019B9 39E9 cmp cx, bp 0 000019BB 7406 je .notfound_1 ; End of SD memory block, get next MCB 0 000019BD 01E8 add ax, bp ; Address next SD sub-MCB 0 000019BF 29E9 sub cx, bp 0 000019C1 EBAA jmp short .loopsub ; Try next SD sub-segment 3895 .notfound_1: 0 000019C3 01C8 add ax, cx ; Address next MCB 0 000019C5 85D2 test dx, dx ; Non-zero if 'Z' MCB 0 000019C7 7480 jz .loop ; If not at end of MCB chain, try next 3899 ; jmp short .notnt ; Otherwise, not found 3900 .error: 3901 .notnt: 0 000019C9 F9 stc 3903 .found: 0 000019CA 0E push cs 0 000019CB 1F pop ds ; restore ds 3906 0 000019CC 5B pop bx ; saved UMB link state 0 000019CD B80358 mov ax, 5803h 0 000019D0 9C pushf 0 000019D1 CD21 int 21h ; Set UMB link state 0 000019D3 9D popf 0 000019D4 C3 retn 3913 3914 findstring: 0 000019D5 31F6 xor si, si 3916 .loop: 0 000019D7 56 push si 0 000019D8 01CE add si, cx 0 000019DA 7203 jc .notfound_c 0 000019DC 4E dec si ; The largest offset we need for this compare 0 000019DD 39F0 cmp ax, si 3922 .notfound_c: 0 000019DF 5E pop si 0 000019E0 720D jb .return ; Not found if at top of memory block --> 0 000019E2 57 push di 0 000019E3 56 push si 0 000019E4 51 push cx 0 000019E5 F3A6 repe cmpsb ; String somewhere inside program? 0 000019E7 59 pop cx 0 000019E8 5E pop si 0 000019E9 5F pop di 0 000019EA 7403 je .return ; Yes, proceed --> (if ZR, NC) 0 000019EC 46 inc si ; Increase pointer by one 0 000019ED EBE8 jmp short .loop ; Try next address 3935 .return: 0 000019EF C3 retn 3937 %endif 3938 3939 3940 ; Move paragraphs 3941 ; 3942 ; INP: ax:0-> source 3943 ; dx:0-> destination 3944 ; cx = number of paragraphs 3945 ; CHG: - 3946 ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 3947 ; Do not provide a wrapped/HMA source or destination! 3948 init_movp: 0 000019F0 51 push cx 0 000019F1 1E push ds 0 000019F2 56 push si 0 000019F3 06 push es 0 000019F4 57 push di 3954 0 000019F5 39D0 cmp ax, dx ; source above destination ? 0 000019F7 770A ja .up ; yes, move up (forwards) --> 0 000019F9 747B je .return ; same, no need to move --> 0 000019FB 50 push ax 0 000019FC 01C8 add ax, cx ; (expected not to carry) 0 000019FE 39D0 cmp ax, dx ; end of source is above destination ? 0 00001A00 58 pop ax 0 00001A01 7730 ja .down ; yes, move from top down --> 3963 ; Here, the end of source is below-or-equal the destination, 3964 ; so they do not overlap. In this case we prefer moving up. 3965 3966 .up: 0 00001A03 50 push ax 0 00001A04 52 push dx 3969 .uploop: 0 00001A05 8ED8 mov ds, ax 0 00001A07 8EC2 mov es, dx 0 00001A09 31FF xor di, di 0 00001A0B 31F6 xor si, si ; -> start of segment 0 00001A0D 81E90010 sub cx, 1000h ; 64 KiB left ? 0 00001A11 7610 jbe .uplast ; no --> 0 00001A13 51 push cx 0 00001A14 B90080 mov cx, 10000h /2 0 00001A17 F3A5 rep movsw ; move 64 KiB 0 00001A19 59 pop cx 0 00001A1A 050010 add ax, 1000h 0 00001A1D 81C20010 add dx, 1000h ; -> next segment 0 00001A21 EBE2 jmp short .uploop ; proceed for more --> 3983 .uplast: 0 00001A23 81C10010 add cx, 1000h ; restore counter 0 00001A27 D1E1 shl cx, 1 0 00001A29 D1E1 shl cx, 1 0 00001A2B D1E1 shl cx, 1 ; *8, paragraphs to words 0 00001A2D F3A5 rep movsw ; move last part 0 00001A2F 5A pop dx 0 00001A30 58 pop ax 0 00001A31 EB43 jmp short .return 3992 3993 .down: 0 00001A33 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 3995 .dnloop: 0 00001A34 81E90010 sub cx, 1000h ; 64 KiB left ? 0 00001A38 761A jbe .dnlast ; no --> 0 00001A3A 50 push ax 0 00001A3B 52 push dx 0 00001A3C 01C8 add ax, cx 0 00001A3E 01CA add dx, cx 0 00001A40 8ED8 mov ds, ax ; -> 64 KiB not yet moved 0 00001A42 8EC2 mov es, dx 0 00001A44 5A pop dx 0 00001A45 58 pop ax 0 00001A46 BFFEFF mov di, -2 0 00001A49 89FE mov si, di ; moved from last word down 0 00001A4B 51 push cx 0 00001A4C B90080 mov cx, 10000h /2 0 00001A4F F3A5 rep movsw ; move 64 KiB 0 00001A51 59 pop cx 0 00001A52 EBE0 jmp short .dnloop ; proceed for more --> 4013 .dnlast: 0 00001A54 81C10010 add cx, 1000h ; restore counter 0 00001A58 D1E1 shl cx, 1 0 00001A5A D1E1 shl cx, 1 0 00001A5C D1E1 shl cx, 1 ; *8, paragraphs to words 0 00001A5E 89CF mov di, cx 0 00001A60 4F dec di 0 00001A61 D1E7 shl di, 1 ; words to offset, -> last word 0 00001A63 89FE mov si, di 0 00001A65 8ED8 mov ds, ax 0 00001A67 8EC2 mov es, dx ; first segment correct 4024 4025 4026 numdef AMD_ERRATUM_109_WORKAROUND, 1 4027 %if 0 4028 4029 Jack R. Ellis pointed out this erratum: 4030 4031 Quoting from https://www.amd.com/system/files/TechDocs/25759.pdf page 69: 4032 4033 109 Certain Reverse REP MOVS May Produce Unpredictable Behavior 4034 4035 Description 4036 4037 In certain situations a REP MOVS instruction may lead to 4038 incorrect results. An incorrect address size, data size 4039 or source operand segment may be used or a succeeding 4040 instruction may be skipped. This may occur under the 4041 following conditions: 4042 4043 * EFLAGS.DF=1 (the string is being moved in the reverse direction). 4044 4045 * The number of items being moved (RCX) is between 1 and 20. 4046 4047 * The REP MOVS instruction is preceded by some microcoded instruction 4048 that has not completely retired by the time the REP MOVS begins 4049 execution. The set of such instructions includes BOUND, CLI, LDS, 4050 LES, LFS, LGS, LSS, IDIV, and most microcoded x87 instructions. 4051 4052 Potential Effect on System 4053 4054 Incorrect results may be produced or the system may hang. 4055 4056 Suggested Workaround 4057 4058 Contact your AMD representative for information on a BIOS update. 4059 4060 %endif 4061 4062 %if _AMD_ERRATUM_109_WORKAROUND 0 00001A69 E308 jcxz @FF 0 00001A6B 83F914 cmp cx, 20 0 00001A6E 7703 ja @FF 4066 @@: 0 00001A70 A5 movsw 0 00001A71 E2FD loop @B 4069 @@: 4070 %endif 0 00001A73 F3A5 rep movsw ; move first part 0 00001A75 FC cld 4073 .return: 0 00001A76 5F pop di 0 00001A77 07 pop es 0 00001A78 5E pop si 0 00001A79 1F pop ds 0 00001A7A 59 pop cx 0 00001A7B C3 retn 4080 4081 4082 %if _BOOTLDR 4083 ; only called for boot-loaded mode 4084 init_getc_bootldr: 0 00001A7C 31C0 xor ax, ax 0 00001A7E CD16 int 16h 0 00001A80 C3 retn 4088 %endif 4089 4090 init_putsz_cs: 0 00001A81 50 push ax 0 00001A82 53 push bx 0 00001A83 51 push cx 0 00001A84 52 push dx 0 00001A85 1E push ds 0 00001A86 06 push es 0 00001A87 57 push di 0 00001A88 0E push cs 0 00001A89 07 pop es 0 00001A8A 0E push cs 0 00001A8B 1F pop ds 0 00001A8C 89D7 mov di, dx ; es:di-> string 0 00001A8E 30C0 xor al, al 0 00001A90 B9FFFF mov cx, -1 0 00001A93 F2AE repne scasb ; search zero 0 00001A95 F7D1 not cx 0 00001A97 49 dec cx ; cx = length of message 0 00001A98 5F pop di 0 00001A99 E82900 call init_puts_ds 0 00001A9C 07 pop es 0 00001A9D 1F pop ds 0 00001A9E 5A pop dx 0 00001A9F 59 pop cx 0 00001AA0 5B pop bx 0 00001AA1 58 pop ax 0 00001AA2 C3 retn 4117 4118 %if _BOOTLDR 4119 init_putsz_cs_bootldr: 0 00001AA3 50 push ax 0 00001AA4 53 push bx 0 00001AA5 51 push cx 0 00001AA6 52 push dx 0 00001AA7 1E push ds 0 00001AA8 06 push es 0 00001AA9 57 push di 0 00001AAA 0E push cs 0 00001AAB 07 pop es 0 00001AAC 0E push cs 0 00001AAD 1F pop ds 0 00001AAE 89D7 mov di, dx ; es:di-> string 0 00001AB0 30C0 xor al, al 0 00001AB2 B9FFFF mov cx, -1 0 00001AB5 F2AE repne scasb ; search zero 0 00001AB7 F7D1 not cx 0 00001AB9 49 dec cx ; cx = length of message 0 00001ABA 5F pop di 0 00001ABB E80F00 call init_puts_ds_bootldr 0 00001ABE 07 pop es 0 00001ABF 1F pop ds 0 00001AC0 5A pop dx 0 00001AC1 59 pop cx 0 00001AC2 5B pop bx 0 00001AC3 58 pop ax 0 00001AC4 C3 retn 4146 %endif 4147 4148 init_puts_ds: 4149 %if _BOOTLDR 4150 %if _APPLICATION || _DEVICE 0 00001AC5 36F606[0100]40 testopt [ss:internalflags], nodosloaded 0 00001ACB 7413 jz @F 4153 %endif 4154 4155 init_puts_ds_bootldr: 0 00001ACD 56 push si 0 00001ACE 55 push bp 0 00001ACF 89D6 mov si, dx 0 00001AD1 E30A jcxz .return 4160 .loop: 0 00001AD3 AC lodsb 0 00001AD4 BB0700 mov bx, 0007 0 00001AD7 B40E mov ah, 0Eh 0 00001AD9 CD10 int 10h 0 00001ADB E2F6 loop .loop 4166 .return: 0 00001ADD 5D pop bp 0 00001ADE 5E pop si 0 00001ADF C3 retn 4170 4171 @@: 4172 %endif 4173 %if _APPLICATION || _DEVICE 0 00001AE0 BB0100 mov bx, 1 ; standard output 0 00001AE3 B440 mov ah, 40h ; write to file 0 00001AE5 E302 jcxz @F 0 00001AE7 CD21 int 21h 4178 @@: 0 00001AE9 C3 retn 4180 %endif 4181 4182 4183 %if _BOOTLDR 4184 ; ds = ss = debugger data segment 4185 ; (ds - 1) = image ident prefix paragraph 4186 boot_old_initcode: 0 00001AEA FC cld 4188 4189 d4 call init_d4message 4190 d4 asciz "In boot loader; press any key",13,10 4191 d4 call init_d4pauseforkey 4192 4193 %if !_LOADER 0 00001AEB C706[0000]8000 mov word [execblk.cmdline], 80h 0 00001AF1 C60681000D mov byte [81h], 0Dh 0 00001AF6 C606[0000]01 mov byte [fileext], EXT_OTHER ; empty file name and command line as per N 4197 %endif 4198 %endif ; _BOOTLDR 4199 4200 old_initcode: 0 00001AFB FC cld 4202 d0bp 0 00001AFC 8CD8 mov ax, ds 4204 %if !_LOADER 0 00001AFE A3[0200] mov word [execblk.cmdline + 2], ax 0 00001B01 A3[0200] mov word [execblk.fcb1 + 2], ax 0 00001B04 A3[0200] mov word [execblk.fcb2 + 2], ax ; set up parameter block for exec command 4208 %endif 0 00001B07 A3[0000] mov word [pspdbg], ax 4210 4211 %if _IMMASM && !_IMMASM_AUXBUFF 4212 %ifn _LINK 4213 add ax, (immasm_buffer + DATASECTIONFIXUP) >> 4 4214 %else 0 00001B0A 05[0000] add ax, strict word immasm_buffer 4216 wlcalc word_shr_4, equ $ - 2 4217 %endif 0 00001B0D A3[0000] mov word [immseg], ax 4219 %endif 4220 0 00001B10 1E push ds 0 00001B11 B84000 mov ax, 40h 0 00001B14 8ED8 mov ds, ax 0 00001B16 A18200 mov ax, word [82h] ; end of circular keypress buffer 0 00001B19 8B168000 mov dx, word [80h] ; start of circular buffer 0 00001B1D 85C0 test ax, ax 0 00001B1F 7431 jz .forcekeybuffer 0 00001B21 85D2 test dx, dx 0 00001B23 742D jz .forcekeybuffer 0 00001B25 89C3 mov bx, ax 0 00001B27 29D3 sub bx, dx ; cmp end, start 0 00001B29 7627 jbe .forcekeybuffer ; below or equal is invalid --> 0 00001B2B F6C301 test bl, 1 ; even amount of bytes ? 0 00001B2E 7522 jnz .forcekeybuffer ; no, invalid --> 0 00001B30 8B1E1A00 mov bx, word [1Ah] ; current head of circular buffer 0 00001B34 39C3 cmp bx, ax 0 00001B36 731A jae .forcekeybuffer 0 00001B38 29D3 sub bx, dx 0 00001B3A 7216 jb .forcekeybuffer 0 00001B3C F6C301 test bl, 1 0 00001B3F 7511 jnz .forcekeybuffer ; invalid --> 0 00001B41 8B1E1C00 mov bx, word [1Ch] ; current tail of circular buffer 0 00001B45 39C3 cmp bx, ax 0 00001B47 7309 jae .forcekeybuffer 0 00001B49 29D3 sub bx, dx 0 00001B4B 7205 jb .forcekeybuffer 0 00001B4D F6C301 test bl, 1 0 00001B50 740E jz @F ; valid --> 4249 .forcekeybuffer: 0 00001B52 1F pop ds 0 00001B53 C706[0000]3E00 mov word [io_end_buffer], 3Eh 0 00001B59 C706[0000]1E00 mov word [io_start_buffer], 1Eh 0 00001B5F A8 db __TEST_IMM8 ; (skip pop) 4254 @@: 0 00001B60 1F pop ds 4256 4257 %if _BOOTLDR 4258 %if _APPLICATION || _DEVICE 0 00001B61 F606[0100]40 testopt [internalflags], nodosloaded 0 00001B66 7403 jz .checkio 4261 %endif 4262 d4 call init_d4message 4263 d4 asciz "Common initialisation, determining processor type now",13,10 0 00001B68 E9BB00 jmp init_determineprocessor 4265 .checkio: 4266 %endif 4267 4268 %if _APPLICATION || _DEVICE 4269 ; Check for console input vs. input from a file or other device. 4270 ; This has to be done early because MS-DOS seems to switch CON 4271 ; to cooked I/O mode only then. 0 00001B6B B80044 mov ax, 4400h ; IOCTL get device information 0 00001B6E 31DB xor bx, bx ; StdIn 0 00001B70 B283 mov dl, 83h ; default if 21.4400 fails 0 00001B72 CD21 int 21h 0 00001B74 F6C280 test dl, 80h 0 00001B77 7414 jz .inputfile 0 00001B79 8026[0000]DF clropt [internalflags], inputfile 0 00001B7E F6C203 test dl, 3 0 00001B81 740A jz .inputdevice ; if not the console input 0 00001B83 8026[0000]EF clropt [internalflags], notstdinput 0 00001B88 C606[0000]00 mov byte [notatty], 0 ; it _is_ a tty 4283 .inputdevice: 4284 .inputfile: 0 00001B8D B80044 mov ax, 4400h ; IOCTL get device information 0 00001B90 43 inc bx ; StdOut 0 00001B91 B283 mov dl, 83h ; default if 21.4400 fails 0 00001B93 CD21 int 21h 0 00001B95 F6C280 test dl, 80h 0 00001B98 740F jz .outputfile 0 00001B9A 8026[0000]7F clropt [internalflags], outputfile 0 00001B9F F6C203 test dl, 3 0 00001BA2 7405 jz .outputdevice ; if not the console output 0 00001BA4 8026[0000]BF clropt [internalflags], notstdoutput 4295 .outputdevice: 4296 .outputfile: 4297 4298 ; Check DOS version 4299 %if _VDD 0 00001BA9 1E push ds 0 00001BAA 0E push cs 0 00001BAB 1F pop ds 0 00001BAC 0E push cs 0 00001BAD 07 pop es 0 00001BAE E86DFD call isnt ; NTVDM ? 0 00001BB1 1F pop ds 0 00001BB2 7205 jc .isnotnt ; no --> 0 00001BB4 800E[0200]02 setopt [internalflags], runningnt 4309 .isnotnt: 4310 %endif 4311 0 00001BB9 B80030 mov ax, 3000h ; check DOS version 0 00001BBC CD21 int 21h 0 00001BBE 86C4 xchg al, ah 0 00001BC0 3D1F03 cmp ax, ver(3,31) ; MS-DOS version > 3.30 ? 0 00001BC3 7205 jb .notoldpacket ; no --> 0 00001BC5 800E[0000]01 setopt [internalflags], oldpacket ; assume Int25/Int26 packet method available 4318 .notoldpacket: 0 00001BCA 50 push ax 0 00001BCB 31DB xor bx, bx ; preset to invalid value 0 00001BCD B80633 mov ax, 3306h 0 00001BD0 CD21 int 21h 0 00001BD2 84C0 test al, al ; invalid, DOS 1.x error --> 0 00001BD4 7402 jz .213306invalid 0 00001BD6 3CFF cmp al, -1 ; invalid 4326 .213306invalid: 0 00001BD8 58 pop ax 0 00001BD9 7407 je .useoldver 0 00001BDB 85DB test bx, bx ; 0.0 ? 0 00001BDD 7403 jz .useoldver ; assume invalid --> 0 00001BDF 93 xchg ax, bx ; get version to ax 0 00001BE0 86C4 xchg al, ah ; strange Microsoft version format 4333 .useoldver: 0 00001BE2 3D0107 cmp ax, ver(7,01) ; MS-DOS version > 7.00 ? 0 00001BE5 7205 jb .notnewpacket ; no --> 0 00001BE7 800E[0000]03 setopt [internalflags], newpacket| oldpacket ; assume both packet methods available 4337 .notnewpacket: 4338 %if _VDD 0 00001BEC F606[0200]02 testopt [internalflags], runningnt 0 00001BF1 741F jz .novdd 0 00001BF3 1E push ds 0 00001BF4 0E push cs 0 00001BF5 1F pop ds 0 00001BF6 0E push cs 0 00001BF7 07 pop es 0 00001BF8 BE[C818] mov si, imsg.vdd ; ds:si-> ASCIZ VDD filename 0 00001BFB BB[D518] mov bx, imsg.dispatch ; ds:bx-> ASCIZ dispatching entry 0 00001BFE BF[DE18] mov di, imsg.init ; es:di-> ASCIZ init entry 0 00001C01 F8 clc ; ! 0 00001C02 C4C4580090 RegisterModule ; register VDD 0 00001C07 1F pop ds 0 00001C08 7208 jc .novdd ; error ? --> 0 00001C0A A3[0000] mov word [hVdd], ax 0 00001C0D 800E[0000]05 setopt [internalflags], ntpacket| oldpacket ; assume old packet method also available 4355 .novdd: 4356 %endif 4357 %endif 4358 4359 4360 %if _CONFIG 4361 do_truename_config: 0 00001C12 BA[0000] mov dx, configpath 0 00001C15 E85E16 call do_truename 0 00001C18 893E[0000] mov word [configpath.dir_end], di 4365 do_truename_scripts: 0 00001C1C BA[0000] mov dx, scriptspath 0 00001C1F E85416 call do_truename 0 00001C22 893E[0000] mov word [scriptspath.dir_end], di 4369 %endif 4370 4371 4372 init_determineprocessor: 4373 d4 call init_d4message 4374 d4 asciz "Determining processor type",13,10 4375 0 00001C26 B92101 mov cx, 0121h 0 00001C29 D2E5 shl ch, cl 0 00001C2B 7514 jnz .found_186_plus ; normal 186 masks shift count with 31 --> 4379 4380 ; To make it easier to trace past the long-form pop cx 4381 ; instruction, we now run it in a subfunction. 0 00001C2D E80500 call .detect_nec 0 00001C30 E30F jcxz .found_186_plus ; if it was a nop --> 0 00001C32 E9F700 jmp .cpudone ; is an actual 8088/8086 --> 4385 4386 4387 ; INP: - 4388 ; OUR: cx = 0 if NEC V20 or NEC V30 4389 ; cx = 1 else 4390 ; CHG: ax, cx 4391 .detect_nec: 4392 ; The NEC V20/V30 processors do support the 186 extensions 4393 ; to the instruction set but do not mask the shift count. 4394 ; Therefore, specifically detect them here. Based on the 4395 ; text in http://www.textfiles.com/hamradio/v20_bug.txt 0 00001C35 89E0 mov ax, sp 0 00001C37 B90100 mov cx, 1 ; = 1 if on actual 8088/8086 0 00001C3A 51 push cx 0 00001C3B 49 dec cx ; = 0 if on NEC V20/V30 4400 4401 ; NB: Do *NOT* trace this instruction with Trace Flag = 1 and 4402 ; do *NOT* write a breakpoint at the mov sp instruction, 4403 ; that is the very next instruction after the pop cx. 4404 ; Doing either leads to locking up the HP 95LX, requiring to 4405 ; reset the system using Ctrl-Shift-On (which zeroes the 4406 ; system date and time). 0 00001C3C 8FC1 db 8Fh, 0C1h ; pop r/m16 with cx as operand 4408 ; (reportedly a nop on the NECs) 0 00001C3E 89C4 mov sp, ax ; reset stack to known state 0 00001C40 C3 retn 4411 4412 .found_186_plus: 4413 d4 call init_d4message 4414 d4 asciz "Found 186+ processor",13,10 0 00001C41 FE06[0000] inc byte [ machine ] ; 1 0 00001C45 54 push sp 0 00001C46 58 pop ax 0 00001C47 39E0 cmp ax, sp 0 00001C49 7403E9DE00 jne .cpudone ; 80186 pushes the adjusted value of sp --> 4420 4421 d4 call init_d4message 4422 d4 asciz "Found 286+ processor",13,10 4423 ; Determine the processor type. This is adapted from code in the 4424 ; Pentium Family User's Manual, Volume 3: Architecture and 4425 ; Programming Manual, Intel Corp., 1994, Chapter 5. That code contains 4426 ; the following comment: 4427 ; 4428 ; This program has been developed by Intel Corporation. 4429 ; Software developers have Intel's permission to incorporate 4430 ; this source code into your software royalty free. 4431 ; 4432 ; Intel 286 CPU check. 4433 ; Bits 12-15 of the flags register are always clear on the 4434 ; 286 processor in real-address mode. 4435 ; Bits 12-15 of the FLAGS register are always set on the 4436 ; 8086 and 186 processor. 0 00001C4E FE06[0000] inc byte [ machine ] ; 2 0 00001C52 9C pushf ; save IF 0 00001C53 9C pushf ; get original flags into ax 0 00001C54 58 pop ax 0 00001C55 0D00F0 or ax, 0F000h ; try to set bits 12-15 0 00001C58 25FFFD and ax, ~0200h ; clear IF 0 00001C5B 50 push ax ; save new flags value on stack 0 00001C5C 9D popf ; replace current flags value; DI 0 00001C5D 9C pushf ; get new flags 0 00001C5E 58 pop ax ; store new flags in ax 0 00001C5F 9D popf ; restore IF (in 86 Mode) 0 00001C60 A900F0 test ax, 0F000h ; if bits 12-15 clear, CPU = 80286 0 00001C63 7503E9C400 jz .cpudone ; if 80286 --> 4450 4451 d4 call init_d4message 4452 d4 asciz "Found 386+ processor",13,10 4453 ; Intel 386 CPU check. 4454 ; The AC bit, bit #18, is a new bit introduced in the EFLAGS 4455 ; register on the Intel486 DX cpu to generate alignment faults. 4456 ; This bit cannot be set on the Intel386 CPU. 4457 ; 4458 ; It is now safe to use 32-bit opcode/operands. 4459 subcpu 386 0 00001C68 800E[0100]80 setopt [internalflags], has386 0 00001C6D FE06[0000] inc byte [ machine ] ; 3 4462 4463 %if _DEVICE 4464 %if _APPLICATION || _BOOTLDR 0 00001C71 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00001C76 7440 jz @F 4467 %endif 4468 0 00001C78 8C26[0000] mov word [reg_fs], fs 0 00001C7C 8C2E[0000] mov word [reg_gs], gs 4471 %macro set_gpr_h 1 4472 push e %+ %1 4473 pop %1 4474 pop word [reg_e %+ %1 + 2] 4475 %endmacro 4476 set_gpr_h ax 0 00001C80 6650 push e %+ %1 0 00001C82 58 pop %1 0 00001C83 8F06[0200] pop word [reg_e %+ %1 + 2] 4477 set_gpr_h bx 0 00001C87 6653 push e %+ %1 0 00001C89 5B pop %1 0 00001C8A 8F06[0200] pop word [reg_e %+ %1 + 2] 4478 set_gpr_h cx 0 00001C8E 6651 push e %+ %1 0 00001C90 59 pop %1 0 00001C91 8F06[0200] pop word [reg_e %+ %1 + 2] 4479 set_gpr_h dx 0 00001C95 6652 push e %+ %1 0 00001C97 5A pop %1 0 00001C98 8F06[0200] pop word [reg_e %+ %1 + 2] 4480 set_gpr_h bp 0 00001C9C 6655 push e %+ %1 0 00001C9E 5D pop %1 0 00001C9F 8F06[0200] pop word [reg_e %+ %1 + 2] 4481 set_gpr_h si 0 00001CA3 6656 push e %+ %1 0 00001CA5 5E pop %1 0 00001CA6 8F06[0200] pop word [reg_e %+ %1 + 2] 4482 set_gpr_h di 0 00001CAA 6657 push e %+ %1 0 00001CAC 5F pop %1 0 00001CAD 8F06[0200] pop word [reg_e %+ %1 + 2] 4483 ; esph and eiph remain zero 0 00001CB1 669C pushfd 0 00001CB3 9D popfw 0 00001CB4 8F06[0200] pop word [reg_efl + 2] 4487 %endif 4488 @@: 4489 0 00001CB8 89E3 mov bx, sp ; save current stack pointer to align 0 00001CBA 83E4FC and sp, ~3 ; align stack to avoid AC fault 0 00001CBD 669C pushfd ; push original EFLAGS 0 00001CBF 6658 pop eax ; get original EFLAGS 0 00001CC1 6689C1 mov ecx, eax ; save original EFLAGS in ECX (including IF) 4495 0 00001CC4 663500000400 xor eax, 40000h ; flip AC bit in EFLAGS 0 00001CCA 25FFFD and ax, ~0200h ; clear IF 0 00001CCD 6650 push eax ; put new EFLAGS value on stack 0 00001CCF 669D popfd ; replace EFLAGS value; DI 0 00001CD1 669C pushfd ; get new EFLAGS 0 00001CD3 6658 pop eax ; store new EFLAGS value in EAX 0 00001CD5 89C8 mov ax, cx ; ignore low bits (including IF) 0 00001CD7 6639C8 cmp eax, ecx 0 00001CDA 741A je .cpudone_stack_eax_equals_ecx ; if 80386 --> 4505 4506 d4 call init_d4message 4507 d4 asciz "Found 486+ processor",13,10 4508 ; Intel486 DX CPU, Intel487 SX NDP, and Intel486 SX CPU check. 4509 ; Checking for ability to set/clear ID flag (bit 21) in EFLAGS 4510 ; which indicates the presence of a processor with the ability 4511 ; to use the CPUID instruction. 0 00001CDC FE06[0000] inc byte [ machine ] ; 4 0 00001CE0 6689C8 mov eax, ecx ; get original EFLAGS 0 00001CE3 663500002000 xor eax, 200000h ; flip ID bit in EFLAGS 0 00001CE9 25FFFD and ax, ~0200h ; clear IF 0 00001CEC 6650 push eax ; save new EFLAGS value on stack 0 00001CEE 669D popfd ; replace current EFLAGS value; DI 0 00001CF0 669C pushfd ; get new EFLAGS 0 00001CF2 6658 pop eax ; store new EFLAGS in EAX 0 00001CF4 89C8 mov ax, cx ; ignore low bits (including IF) 4521 4522 .cpudone_stack_eax_equals_ecx: 0 00001CF6 6651 push ecx 0 00001CF8 669D popfd ; restore AC,ID bits and IF in EFLAGS (86 Mode) 0 00001CFA 89DC mov sp, bx ; restore sp 4526 0 00001CFC 6639C8 cmp eax, ecx ; check if it's changed 0 00001CFF 742B je .cpudone ; if it's a 486 (can't toggle ID bit) --> 4529 4530 d4 call init_d4message 4531 d4 asciz "Found processor with CPUID support",13,10 4532 ; Execute CPUID instruction. 4533 subcpu 486 ; NASM (at least 2.10rc1) handles cpuid itself as a 4534 ; 586+ instruction, but we know better. So this 4535 ; part is declared for 486 compatibility, and only 4536 ; the cpuid instructions are emitted with 586 4537 ; compatibility to appease NASM. 4538 %if 0 4539 d4 call init_d4message 4540 d4 asciz "CPUID will NOT be executed, to work around official DOSBox releases",13,10 4541 d4 jmp .cpudone 4542 %endif 0 00001D01 6631C0 xor eax, eax ; set up input for CPUID instruction 4544 d4 call init_d4message 4545 d4 asciz "Executing CPUID 0",13,10 4546 [cpu 586] 0 00001D04 0FA2 cpuid 4548 __CPU__ 4549 d4 call init_d4message 4550 d4 asciz "CPUID 0 executed",13,10 0 00001D06 6683F801 cmp eax, byte 1 0 00001D0A 7220 jb .cpudone ; if 1 is not a valid input value for CPUID 0 00001D0C 6631C0 xor eax, eax ; otherwise, run CPUID with eax = 1 0 00001D0F 6640 inc eax 4555 d4 call init_d4message 4556 d4 asciz "Executing CPUID 1",13,10 4557 [cpu 586] 0 00001D11 0FA2 cpuid 4559 __CPU__ 4560 d4 call init_d4message 4561 d4 asciz "CPUID 1 executed",13,10 4562 %if _MMXSUPP 0 00001D13 66F7C200008000 test edx, 80_0000h 0 00001D1A 0F9506[0000] setnz byte [has_mmx] 4565 %endif 4566 0 00001D1F 88E0 mov al, ah 0 00001D21 240F and al, 0Fh ; bits 8..11 are the model number 0 00001D23 3C06 cmp al, 6 0 00001D25 7202 jb .below686 ; if < 6 0 00001D27 B006 mov al, 6 ; if >= 6, set it to 6 4572 .below686: 0 00001D29 A2[0000] mov byte [ machine ], al; save machine type (486, 586, 686+) 4574 4575 .cpudone: 4576 subcpureset ; subcpu 486 4577 subcpureset ; subcpu 386 4578 d4 call init_d4message 4579 d4 asciz "Determining floating-point unit",13,10 4580 4581 ; Next determine the type of FPU in a system and set the mach_87 4582 ; variable with the appropriate value. All registers are used by 4583 ; this code; none are preserved. 4584 ; 4585 ; Coprocessor check. 4586 ; The algorithm is to determine whether the floating-point 4587 ; status and control words can be written to. If not, no 4588 ; coprocessor exists. If the status and control words can be 4589 ; written to, the correct coprocessor is then determined 4590 ; depending on the processor ID. The Intel 386 CPU can 4591 ; work with either an Intel 287 NDP or an Intel 387 NDP. 4592 ; The infinity of the coprocessor must be checked 4593 ; to determine the correct coprocessor ID. 0 00001D2C A0[0000] mov al, byte [ machine ] 0 00001D2F A2[0000] mov byte [ mach_87 ], al ; by default, set mach_87 to machine 0 00001D32 FE06[0000] inc byte [ has_87 ] 0 00001D36 C606[0000]0C mov byte [encodedmach87], 0Ch 0 00001D3B 3C05 cmp al, 5 ; a Pentium or above always will have a FPU 0 00001D3D 7350 jae .fpudone 0 00001D3F FE0E[0000] dec byte [ has_87 ] ; assume no FPU 0 00001D43 C606[0000]C0 mov byte [encodedmach87], 0C0h 4602 0 00001D48 DBE3 fninit ; reset FPU 0 00001D4A B0FF mov al, -1 ; initialise with a non-zero value 0 00001D4C 50 push ax 0 00001D4D 89E3 mov bx, sp 0 00001D4F 36DD3F fnstsw word [ss:bx] ; save FP status word 0 00001D52 58 pop ax ; retrieve it 0 00001D53 84C0 test al, al 0 00001D55 7538 jnz .fpudone ; if no FPU present 4611 4612 ; al = 0 here 0 00001D57 50 push ax 0 00001D58 36D93F fnstcw word [ss:bx] ; save FP control word 0 00001D5B 58 pop ax ; retrieve it 0 00001D5C 253F10 and ax, 103Fh ; see if selected parts look OK 0 00001D5F 83F83F cmp ax, byte 3Fh 0 00001D62 752B jne .fpudone ; if no FPU present 0 00001D64 FE06[0000] inc byte [ has_87 ] ; there's an FPU 0 00001D68 C606[0000]0C mov byte [encodedmach87], 0Ch 4621 4622 ; If we're using a 386, check for 287 vs. 387 by checking whether 4623 ; +infinity = -infinity. 0 00001D6D 803E[0000]03 cmp byte [ machine ], 3 0 00001D72 751B jne .fpudone ; if not a 386 4626 [cpu 386] 0 00001D74 D9E8 fld1 ; must use default control from FNINIT 0 00001D76 D9EE fldz ; form infinity 0 00001D78 DEF9 fdivp ST1 ; 1 / 0 = infinity 0 00001D7A D9C0 fld ST0 0 00001D7C D9E0 fchs ; form negative infinity 0 00001D7E DED9 fcompp ; see if they are the same and remove them 0 00001D80 9BDFE0 fstsw ax 0 00001D83 9E sahf ; look at status from FCOMPP 0 00001D84 7509 jne .fpudone ; if they are different, then it's a 387 0 00001D86 FE0E[0000] dec byte [ mach_87 ] ; otherwise, it's a 287 0 00001D8A C606[0000]C2 mov byte [encodedmach87], 0C2h 4638 __CPU__ 4639 .fpudone: 4640 4641 apply_patches: 4642 %if _ONLY386 4643 testopt [internalflags], has386 4644 jnz @F ; okay --> 4645 4646 %if _BOOTLDR && (_APPLICATION || _DEVICE) 4647 testopt [internalflags], nodosloaded 4648 lahf ; remember status 4649 %endif 4650 mov dx, imsg.no386 4651 call init_putsz_cs ; display the error 4652 %if _BOOTLDR && (_APPLICATION || _DEVICE) 4653 sahf 4654 jnz init_booterror.soft ; abort for loader --> 4655 %elif _BOOTLDR 4656 jmp init_booterror.soft 4657 %endif 4658 %if _DEVICE && _APPLICATION 4659 testopt [internalflags6], dif6_device_mode 4660 jnz init_device_error_late 4661 %elif _DEVICE 4662 jmp init_device_error_late 4663 %endif 4664 %if _APPLICATION 4665 mov ax, 4C01h 4666 int 21h ; abort our process 4667 %endif 4668 4669 @@: 4670 %elif _ONLYNON386 4671 testopt [internalflags], has386 4672 jz @F ; okay --> 4673 mov dx, imsg.386 4674 call init_putsz_cs ; display the warning 4675 @@: 4676 %endif 4677 4678 ; Determine which patch table to use, then patch 4679 ; out either the 386+ or non-386 code as appropriate. 0 00001D8F 8E06[0000] mov es, [code_seg] 0 00001D93 F606[0100]80 testopt [internalflags], has386 0 00001D98 740B jz @F 0 00001D9A BE[0000] mov si, patch_386_table ; table of patches to set for 386+ 4684 %if __patch_386_table_method == 1 0 00001D9D B9[0000] mov cx, patch_386_table.amount 0 00001DA0 E81C00 call .patch1 4687 %else 4688 call .patch2 4689 %endif 0 00001DA3 EB26 jmp .patch_code1_end 4691 4692 @@: 4693 %ifn _ONLYNON386 4694 4695 %if _RUN2_ENTRY_SECTION 0 00001DA5 C606[0000]3E mov byte [..@patch_no386_ds_code_or_entry], 3Eh 4697 ; write a ds prefix 0 00001DAA C606[0000]CF mov byte [..@patch_no386_iret_code_or_entry], 0CFh 4699 ; write an iret instruction 4700 %else 4701 mov byte [es:..@patch_no386_ds_code_or_entry], 3Eh 4702 ; write a ds prefix 4703 mov byte [es:..@patch_no386_iret_code_or_entry], 0CFh 4704 ; write an iret instruction 4705 %endif 4706 %if _PM && _CATCHPMINT214C 4707 mov byte [..@patch_no386_ds_entry_pmint21_1], 3Eh 4708 mov byte [..@patch_no386_ds_entry_pmint21_2], 3Eh 4709 ; write ds prefixes (note the segment!) 4710 %endif 4711 %if _PM 4712 mov byte [es:..@patch_no386_ds_4], 3Eh 4713 mov byte [es:..@patch_no386_ds_5], 3Eh ; write some more ds prefixes 4714 %endif 4715 %if _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 0 00001DAF C606[0000]3E mov byte [..@patch_no386_ds_6_DATA_ENTRY], 3Eh 4717 ; write a ds prefix (note the segment!) 4718 %endif 4719 %endif 0 00001DB4 BE[0000] mov si, patch_no386_table ; table of patches to set for 16-bit CPU 4721 %if __patch_no386_table_method == 1 0 00001DB7 B9[0000] mov cx, patch_no386_table.amount 0 00001DBA E80200 call .patch1 4724 %else 4725 call .patch2 4726 %endif 0 00001DBD EB0C jmp .patch_code1_end 4728 4729 ; Complicated table patch code. 4730 %if __patch_no386_table_method == 2 || __patch_386_table_method == 2 || __patch_no386_table2_method == 2 || __patch_386_table2_method == 2 || __patch_no386_tableentry_method == 2 || __patch_386_tableentry_method == 2 4733 .patch2: 4734 mov di, code_start ; initialise offset 4735 xor ax, ax ; initialise ah 4736 .looppatch2: 4737 cs lodsb 4738 add di, ax ; skip number of bytes to skip 4739 cmp al, 255 ; really repositioning? 4740 jne .l2patch ; no --> 4741 xchg ax, di ; (to preserve ah) 4742 cs lodsw ; ax = new address 4743 xchg ax, di ; di = new address 4744 .l2patch: 4745 cs lodsb 4746 mov cx, ax ; cx = number of bytes to patch 4747 jcxz .patchesdone ; end of table --> 4748 mov al, 90h ; patch to NOP 4749 rep stosb ; patch as many bytes as specified 4750 jmp short .looppatch2 4751 %endif 4752 4753 ; Simple table patch code. 4754 %if __patch_no386_table_method == 1 || __patch_386_table_method == 1 || __patch_no386_table2_method == 1 || __patch_386_table2_method == 1 || __patch_no386_tableentry_method == 1 || __patch_386_tableentry_method == 1 4757 .patch1: 0 00001DBF E309 jcxz .patchesdone 4759 .looppatch1: 0 00001DC1 2EAD cs lodsw ; load address of patch 0 00001DC3 93 xchg bx, ax ; (set bx = ax, CHG ax) 0 00001DC4 26C60790 mov byte [es:bx], 90h ; patch 0 00001DC8 E2F7 loop .looppatch1 4764 %endif 4765 .patchesdone: 0 00001DCA C3 retn 4767 4768 .patch_code1_end: 4769 4770 %if _DUALCODE 4771 mov dx, es ; dx => code1 seg 4772 %endif 4773 %if _BOOTLDR_DISCARD 0 00001DCB F606[0100]40 testopt [internalflags], nodosloaded 0 00001DD0 7500 jnz @F 4776 4777 %if _AREAS && _AREAS_HOOK_CLIENT 4778 %ifn _LINK 4779 mov ax, ldebug_code_bootldr_truncated_size 4780 %else 4781 mov ax, behind_code_truncated wrt lDEBUG_CODE 4782 wlcalc word_add_15, equ $ - 2 4783 wlcalc word_clr_15, equ $ - 2 4784 %endif 4785 mov word [areas_sub + areastrucfunLinearEnd], ax 4786 mov word [areas_fun + areastrucfunLinearEnd], ax 4787 %endif 4788 %endif 4789 %ifn _DUALCODE 4790 @@: ; if bootloaded 4791 %else 4792 %if _BOOTLDR_DISCARD 4793 %ifn _LINK 4794 add dx, ldebug_code_bootldr_truncated_size_p 4795 %else 4796 add dx, strict word relocatedzero + 0 4797 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 4798 %endif 4799 ; if not bootloaded, use truncated 4800 jmp @FF 4801 @@: ; if bootloaded 4802 %endif 4803 %ifn _LINK 4804 add dx, ldebug_code_size_p ; use untruncated 4805 %else 4806 add dx, strict word relocatedzero + 0 4807 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code, equ $ - 2 4808 %endif 4809 @@: 4810 mov word [code2_seg], dx 4811 patch_relocate: 4812 4813 %if ! _PM 4814 mov si, relocate_from_code 4815 mov di, relocate_from_code.end 4816 call .patch 4817 mov si, relocate_from_code2 4818 mov di, relocate_from_code2.end 4819 %endif 4820 push es 4821 mov es, dx 4822 pop dx 4823 %if ! _PM 4824 call .patch 4825 jmp .done 4826 4827 .loop: 4828 cs lodsw 4829 xchg bx, ax 4830 mov word [es:bx], dx 4831 .patch: 4832 cmp si, di 4833 jb .loop 4834 retn 4835 4836 .done: 4837 %endif 4838 4839 testopt [internalflags], has386 4840 jz @F 4841 mov si, patch_386_table2 ; table of patches to set for 386+ 4842 %if __patch_386_table2_method == 1 4843 mov cx, patch_386_table2.amount 4844 call apply_patches.patch1 4845 %else 4846 call apply_patches.patch2 4847 %endif 4848 jmp .patch_code2_end 4849 4850 @@: 4851 mov si, patch_no386_table2 ; table of patches to set for 16-bit CPU 4852 %if __patch_no386_table2_method == 1 4853 mov cx, patch_no386_table2.amount 4854 call apply_patches.patch1 4855 %else 4856 call apply_patches.patch2 4857 %endif 4858 .patch_code2_end: 4859 %endif 4860 4861 4862 patch_entry: 4863 numdef EMIT_ENTRY_PATCH, _LINK || _LINK_COMPAT 4864 %ifn _EMIT_ENTRY_PATCH 4865 %if patch_386_tableentry_size != 0 || patch_no386_tableentry_size != 0 4866 %assign _EMIT_ENTRY_PATCH 1 4867 %endif 4868 %endif 4869 %if _EMIT_ENTRY_PATCH 0 00001DD2 1E push ds 0 00001DD3 07 pop es 0 00001DD4 F606[0100]80 testopt [internalflags], has386 0 00001DD9 740B jz @F 0 00001DDB BE[0000] mov si, patch_386_tableentry ; table of patches to set for 386+ 4875 %if __patch_386_tableentry_method == 1 0 00001DDE B9[0000] mov cx, patch_386_tableentry.amount 0 00001DE1 E8DBFF call apply_patches.patch1 4878 %else 4879 call apply_patches.patch2 4880 %endif 0 00001DE4 EB09 jmp .patch_entry_end 4882 4883 @@: 0 00001DE6 BE[0000] mov si, patch_no386_tableentry ; table of patches to set for 16-bit CPU 4885 %if __patch_no386_tableentry_method == 1 0 00001DE9 B9[0000] mov cx, patch_no386_tableentry.amount 0 00001DEC E8D0FF call apply_patches.patch1 4888 %else 4889 call apply_patches.patch2 4890 %endif 4891 .patch_entry_end: 4892 %endif 4893 4894 4895 %if _DEVICE 4896 ; This must be done after CPU detection 4897 ; because we want to get the high parts 4898 ; of the registers only initialised here. 0 00001DEF 1E push ds 0 00001DF0 07 pop es 0 00001DF1 BE[0000] mov si, regs 0 00001DF4 BF[0000] mov di, device_quittable_regs 4903 %ifn _LINK 4904 mov cx, words(regs.size) 4905 %else 0 00001DF7 B9[0100] mov cx, regs.size + 1 4907 wlcalc word_shr_1, equ $ - 2 4908 %endif 0 00001DFA F3A5 rep movsw 4910 %endif 4911 4912 4913 ; Check for dosemu. This is done for the boot loaded instance 4914 ; too, as we might be running as DOS inside dosemu. 4915 %if _DOSEMU 0 00001DFC B800F0 mov ax, 0F000h 0 00001DFF 8EC0 mov es, ax 0 00001E01 1E push ds 0 00001E02 0E push cs 0 00001E03 1F pop ds ; avoid "repe cs cmpsw" (8086 bug) 0 00001E04 BFF5FF mov di, 0FFF5h 0 00001E07 BE[C018] mov si, imsg.dosemudate 0 00001E0A B90400 mov cx, 4 0 00001E0D F3A7 repe cmpsw ; running in DosEmu? 0 00001E0F 1F pop ds 0 00001E10 750A jne .dosemuchecked 0 00001E12 800E[0300]01 setopt [internalflags], runningdosemu 4928 %if _DOSEMU_PRESTROKES_HELP 0 00001E17 B80900 mov ax, 0009h 0 00001E1A CDE6 int 0E6h ; run dosemu2 start_pre_strokes function 4931 ; dosemu2 recently gained a feature that tries to avoid 4932 ; a kernel from eating the first text byte of an -input 4933 ; string. However, this interferes with our use because 4934 ; the strokes are only enabled in dos_post_boot (int.c). 4935 ; There is a new int 0E6h helper function now to enable 4936 ; the strokes right away, which is made for lDebug to work 4937 ; when the debugger is booted and wants the input. This 4938 ; is called DOS_HELPER_PRESTROKES_START (also int.c). 4939 ; Reference: https://github.com/dosemu2/dosemu2/issues/2071 4940 %endif 4941 .dosemuchecked: 4942 %endif 4943 0 00001E1C 1E push ds 0 00001E1D 07 pop es ; => lDEBUG_DATA_ENTRY 4946 0 00001E1E BF[0000] mov di, line_in 0 00001E21 B0FF mov al, 255 0 00001E23 AA stosb 0 00001E24 B000 mov al, 0 0 00001E26 AA stosb 0 00001E27 B00D mov al, 13 0 00001E29 AA stosb ; overwrite line_in beginning 4954 0 00001E2A BC[0000] mov sp, stack_end ; stack pointer (paragraph aligned) 0 00001E2D BF[0000] mov di, ..@init_first 4957 %ifn _LINK 4958 mov cx, ..@init_behind - ..@init_first 4959 %else 0 00001E30 B9[0000] mov cx, ..@init_behind 4961 wlcalc word_minusext_..@init_first, equ $ - 2 4962 %endif 0 00001E33 31C0 xor ax, ax 0 00001E35 F3AA rep stosb ; initialise breakpoint lists, line_out 4965 %if 1 4966 ..@init_behind_equate equ ..@init_behind 4967 stack_equate equ stack 4968 %if ..@init_behind_equate != stack_equate 0 00001E37 BF[0000] mov di, stack 4970 %endif 4971 %ifn _LINK 4972 mov cx, stack_end - stack 4973 %else 0 00001E3A B9[0000] mov cx, stack_end 4975 wlcalc word_minusext_stack, equ $ - 2 4976 %endif 0 00001E3D B05E mov al, 5Eh 0 00001E3F F3AA rep stosb ; initialise the stack 4979 %endif 4980 0 00001E41 C606[0000]30 mov byte [ trim_overflow ], '0' ; initialise line_out so the trimputs loop doesn't overflow 0 00001E46 C706[0000]4226 mov word [line_out_overflow], 2642h 4983 4984 4985 %if _AREAS_HOOK_SERVER 4986 mov ax, ds 4987 mov word [ddebugareas.next + 2], ax 4988 mov word [ddebugareas.prev + 2], ax 4989 mov word [..@patch_entry_seg], ax 4990 %endif 4991 4992 %if _AREAS && _AREAS_HOOK_CLIENT 4993 mov ax, word [code_seg] 4994 call add_to_areas_linear_code1 4995 4996 %if _DUALCODE && _EXPRDUALCODE 4997 mov ax, word [code2_seg] 4998 call add_to_areas_linear_code2 4999 %endif 5000 %endif 5001 5002 5003 %if _DEBUG && _DEBUG_COND && _DEBUG_COND_DEFAULT_ON 5004 setopt [internalflags6], dif6_debug_mode 5005 setopt [options6], opt6_debug_mode 5006 setopt [startoptions6], opt6_debug_mode 5007 %endif 5008 5009 %if _CATCHINT06 && _DETECT95LX 0 00001E4C B8D44D mov ax, 4DD4h 0 00001E4F 31DB xor bx, bx 0 00001E51 CD15 int 15h ; HP 95LX/100LX/200LX detect 0 00001E53 81FB5048 cmp bx, 4850h ; "HP" reversed 0 00001E57 7516 jne @F 0 00001E59 81F90101 cmp cx, 0101h ; 95LX ? 0 00001E5D 7510 jne @F ; no --> 5017 5018 %if _CATCHINT2D 0 00001E5F A1[0100] mov ax, word [inttab.i2D + 1] 0 00001E62 A3[0100] mov word [inttab.i06 + 1], ax ; overwrite i06 entry with i2D 0 00001E65 A0[0000] mov al, byte [inttab.i2D] 0 00001E68 A2[0000] mov byte [inttab.i06], al ; interrupt number too 5023 %endif 0 00001E6B FF0E[0000] dec word [inttab_number_variable] ; remember one less in use 5025 @@: 5026 %endif 5027 0 00001E6F B40F mov ah, 0Fh 0 00001E71 CD10 int 10h 0 00001E73 883E[0000] mov byte [vpage], bh 5031 5032 5033 %if _BOOTLDR 5034 %if _APPLICATION || _DEVICE 0 00001E77 F606[0100]40 testopt [internalflags], nodosloaded 0 00001E7C 7439 jz initdos 5037 %endif 5038 d4 call init_d4message 5039 d4 asciz "386-related patches applied, boot initialisation proceeding",13,10 5040 5041 5042 %if CATCHINTAMOUNT 5043 ; Set up interrupt vectors. 5044 5045 ; ds still => lDEBUG_DATA_ENTRY 5046 %if _CATCHINT06 && _DETECT95LX 0 00001E7E 8B0E[0000] mov cx, word [inttab_number_variable] 5048 %else 5049 mov cx, inttab_number 5050 %endif 0 00001E82 E327 jcxz .bootintend 0 00001E84 BE[0000] mov si, inttab 5053 .bootintloop: 5054 5055 ; assumes ss = lDEBUG_DATA_ENTRY 0 00001E87 36AC ss lodsb 0 00001E89 31DB xor bx, bx 0 00001E8B 8EDB mov ds, bx 0 00001E8D 88C3 mov bl, al 0 00001E8F 01DB add bx, bx 0 00001E91 01DB add bx, bx 0 00001E93 97 xchg ax, di 0 00001E94 36AD ss lodsw ; get address of IISP header 0 00001E96 97 xchg ax, di 5065 %if _DEBUG && !_DEBUG_COND 5066 ; vectors are set only when debuggee runs 5067 %else 5068 %if _DEBUG 5069 testopt [ss:internalflags6], dif6_debug_mode 5070 jnz @F 5071 %endif 0 00001E97 FF7702 push word [ bx+2 ] 0 00001E9A FF37 push word [ bx ] ; get vector 0 00001E9C 368F4502 pop word [ ss:di + ieNext ] 0 00001EA0 368F4504 pop word [ ss:di + ieNext + 2 ] 5076 ; store it 0 00001EA4 8C5702 mov word [ bx+2 ], ss 0 00001EA7 893F mov word [ bx ], di ; set interrupt vector 5079 @@: 5080 %endif 0 00001EA9 E2DC loop .bootintloop 5082 5083 .bootintend: 5084 %endif 5085 5086 %if _EXTENSIONS 5087 init_eld_boot: 0 00001EAB E8FC13 call init_eld 5089 %else 5090 push ss 5091 pop ds 5092 push ss 5093 pop es 5094 %endif 5095 5096 d4 call init_d4message 5097 d4 asciz "Jumping to final boot initialisation code",13,10 0 00001EAE BE[0000] mov si, initcont.boot_entry 0 00001EB1 FF36[0000] push word [code_seg] 0 00001EB5 56 push si 0 00001EB6 CB retf 5102 %endif 5103 5104 %if _APPLICATION || _DEVICE 5105 initdos: 5106 %if _MCB || _INT || _EXTENSIONS 0 00001EB7 B80258 mov ax, 5802h 0 00001EBA CD21 int 21h 0 00001EBC 30E4 xor ah, ah ; some "DOS" only return al 0 00001EBE 50 push ax ; save UMB link 5111 5112 getfirstmcb: 0 00001EBF B452 mov ah, 52h ; get list of lists 0 00001EC1 BBFFFF mov bx, -1 0 00001EC4 CD21 int 21h 0 00001EC6 83FBFF cmp bx, -1 0 00001EC9 7503E98800 je mcb_not_found 0 00001ECE 83FB01 cmp bx, 1 0 00001ED1 7503E98000 je mcb_not_found 0 00001ED6 268B47FE mov ax, word [ es:bx-2 ]; start of MCBs 0 00001EDA A3[0000] mov word [firstmcb], ax 5122 5123 getfirstumcb: 0 00001EDD 1E push ds 5125 ; We try to get the first UMCB for gateout 5126 ; for now. To harden our code it should 5127 ; not be assumed that the address is of 5128 ; a valid MCB. However, it is fine to 5129 ; compare an actual MCB address with it. 5130 %if _GUARD_86M_INT2F 0 00001EDE 06 push es 0 00001EDF 31C0 xor ax, ax 0 00001EE1 8EC0 mov es, ax ; (only used in 86 Mode) 0 00001EE3 26A1BC00 mov ax, [es:2Fh * 4] 0 00001EE7 83F8FF cmp ax, -1 0 00001EEA 7405 je @F ; --> (ZR) 0 00001EEC 260B06BE00 or ax, [es:2Fh * 4 + 2] 5138 @@: 0 00001EF1 07 pop es 0 00001EF2 7414 jz .determine 5141 %endif 0 00001EF4 B86112 mov ax, 1261h ; PTS-DOS: Get first UMCB 0 00001EF7 F9 stc 0 00001EF8 CD2F int 2Fh 0 00001EFA 720C jc .determine ; not supported --> 0 00001EFC 40 inc ax 0 00001EFD 83F802 cmp ax, byte 2 ; -1, 0, 1 ? 0 00001F00 7606 jbe .determine ; not supported (or none) --> 0 00001F02 48 dec ax 0 00001F03 A3[0000] mov word [ firstumcb ], ax ; set UMB 0 00001F06 EB4D jmp short .got ; got it --> 5152 5153 .determine: 0 00001F08 B80358 mov ax, 5803h 0 00001F0B 31DB xor bx, bx 0 00001F0D CD21 int 21h ; disable UMB link, leave only LMA chain 0 00001F0F 7244 jc .none ; that isn't supported either --> 5158 0 00001F11 A1[0000] mov ax, word [firstmcb] 0 00001F14 89C2 mov dx, ax ; first MCB 0 00001F16 31DB xor bx, bx ; use offsets from bx, not addresses 5162 .looplmb: 0 00001F18 8ED8 mov ds, ax 0 00001F1A 40 inc ax 0 00001F1B 034703 add ax, word [ bx + 3 ] ; next MCB's address 0 00001F1E 803F4D cmp byte [ bx ], 'M' 0 00001F21 74F5 je .looplmb ; not last --> 0 00001F23 803F5A cmp byte [ bx ], 'Z' 0 00001F26 752D jne .none ; corrupted --> 0 00001F28 92 xchg ax, dx ; dx = what we assume to be the first UMA chain MCB 5171 ; ax = first MCB 5172 0 00001F29 50 push ax 0 00001F2A 43 inc bx ; = 1 0 00001F2B B80358 mov ax, 5803h 0 00001F2E CD21 int 21h ; enable UMB link, include UMA chain 0 00001F30 58 pop ax 0 00001F31 7222 jc .none ; so we can disable it but not enable? --> 5179 0 00001F33 4B dec bx ; = 0 0 00001F34 31C9 xor cx, cx ; flag if assumed first UMCB found 5182 .loopumb: 0 00001F36 39D0 cmp ax, dx 0 00001F38 7501 jne .notlastlmb 0 00001F3A 41 inc cx ; there it is 5186 .notlastlmb: 0 00001F3B 8ED8 mov ds, ax 0 00001F3D 803F4D cmp byte [ bx ], 'M' 0 00001F40 7506 jne .islastumb? ; last or corrupted --> 0 00001F42 40 inc ax 0 00001F43 034703 add ax, word [ bx + 3 ] 0 00001F46 EBEE jmp short .loopumb ; process next --> 5193 .islastumb?: 0 00001F48 803F5A cmp byte [ bx ], 'Z' 0 00001F4B 7508 jne .none ; corrupted --> 0 00001F4D E306 jcxz .none ; didn't find that UMCB --> 5197 ; The MCB at dx which was behind the one that contained the 'Z' 5198 ; signature when we disabled the UMB link is now a valid MCB in 5199 ; the MCB chain after we enabled the UMB link. All previous MCBs 5200 ; are now 'M'. 0 00001F4F 1F pop ds 0 00001F50 8916[0000] mov word [ firstumcb ], dx 0 00001F54 A8 db __TEST_IMM8 ; (skip pop) 5204 .none: 5205 .got: 0 00001F55 1F pop ds 5207 mcb_not_found: 0 00001F56 5B pop bx 0 00001F57 B80358 mov ax, 5803h 0 00001F5A CD21 int 21h ; restore UMB link 5211 %endif 5212 5213 getindosflag: 0 00001F5C B434 mov ah, 34h 0 00001F5E CD21 int 21h 0 00001F60 891E[0000] mov word [pInDOS + so16aOffset], bx 0 00001F64 8C06[0200] mov word [pInDOS + so16aSegSel], es 5218 %if _PM 5219 mov word [pInDOS + so16aSegment], es 5220 %endif 5221 5222 ; get address of DOS swappable DATA area 5223 ; to be used to get/set PSP and thus avoid DOS calls 5224 ; will not work for DOS < 3 5225 %if _USESDA 5226 getsda: 0 00001F68 1E push ds 0 00001F69 B8065D mov ax, 5D06h 0 00001F6C F9 stc ; initialise to CY 0 00001F6D CD21 int 21h 0 00001F6F 8CD8 mov ax, ds 0 00001F71 1F pop ds 0 00001F72 7215 jc .noSDA ; if CY returned, not supported --> 0 00001F74 8EC0 mov es, ax ; es:si -> SDA 5235 %if _DEVICE 0 00001F76 50 push ax 0 00001F77 B451 mov ah, 51h 0 00001F79 CD21 int 21h ; bx = current PSP 0 00001F7B 58 pop ax 5240 %else 5241 mov bx, ds ; bx = our PSP (= current PSP in app mode) 5242 %endif 0 00001F7C 26395C10 cmp word [es:si + 10h], bx ; does this seem like the current PSP field ? 0 00001F80 7507 jne .noSDA ; no --> 0 00001F82 8936[0000] mov word [pSDA + so16aOffset], si 0 00001F86 A3[0200] mov word [pSDA + so16aSegSel], ax 5247 %if _PM 5248 mov word [pSDA + so16aSegment], ax 5249 %endif 5250 .noSDA: 5251 %endif 5252 0 00001F89 B83135 mov ax, 3531h 0 00001F8C CD21 int 21h 0 00001F8E 8CC3 mov bx, es 5256 %if _USESDA 0 00001F90 3B1E[0200] cmp bx, word [pSDA + so16aSegSel] 0 00001F94 750B jne @F 5259 %endif 0 00001F96 3B1E[0200] cmp bx, word [pInDOS + so16aSegSel] 0 00001F9A 7505 jne @F 5262 0 00001F9C 800E[0300]20 setopt [internalflags2], dif2_int31_segment 5264 @@: 5265 5266 5267 commandline: 0 00001FA1 16 push ss 0 00001FA2 07 pop es 5270 5271 %if _CONFIG 5272 %if _APPLICATION 0 00001FA3 BE[1216] mov si, imsg.default_cmdline.app 0 00001FA6 B93300 mov cx, words(imsg.default_cmdline.app.length) 5275 %endif 5276 %if _DEVICE 5277 %if _APPLICATION 0 00001FA9 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00001FAE 7406 jz @F 5280 %endif 0 00001FB0 BE[7A16] mov si, imsg.default_cmdline.dev 0 00001FB3 B92E00 mov cx, words(imsg.default_cmdline.dev.length) 5283 %endif 5284 @@: 5285 0 00001FB6 0E push cs 0 00001FB7 1F pop ds 0 00001FB8 BF[0000] mov di, cmdline_buffer 0 00001FBB F3A5 rep movsw 0 00001FBD 26807DFF00 cmp byte [es:di - 1], 0 0 00001FC2 7501 jne @F 0 00001FC4 4F dec di 5293 @@: 0 00001FC5 893E[EA0D] mov [cmdline_buffer_start], di 0 00001FC9 B000 mov al, 0 0 00001FCB AA stosb 0 00001FCC 16 push ss 0 00001FCD 1F pop ds 0 00001FCE 800E[0100]01 setopt [internalflags3], dif3_input_cmdline 5300 %endif 5301 5302 ; Interpret switches and erase them from the command line. 0 00001FD3 B80037 mov ax, 3700h ; get switch character 0 00001FD6 B22F mov dl, '/' ; preset with default value 0 00001FD8 CD21 int 21h 0 00001FDA 8816[0000] mov byte [ switchar ], dl 0 00001FDE 80FA2F cmp dl, '/' 0 00001FE1 7504 jne .notslash 0 00001FE3 8816[0000] mov byte [ swch1 ], dl 5310 .notslash: 0 00001FE7 BE8100 mov si, DTA+1 5312 %if _MS_N_COMPAT 0 00001FEA C644FF30 mov byte [si - 1], '0' ; avoid kk underflow before start of tail 5314 %endif 5315 .blankloop: 0 00001FEE AC lodsb 0 00001FEF 3C20 cmp al, 32 0 00001FF1 74FB je .blankloop 0 00001FF3 3C09 cmp al, 9 0 00001FF5 74F7 je .blankloop 5321 5322 ; Process the /? switch (or the [switchar]? switch). 5323 ; If switchar != / and /? occurs, make sure nothing follows. 0 00001FF7 3A06[0000] cmp al, byte [switchar] 0 00001FFB 7503E9DB00 je .switch ; if switch character --> 0 00002000 3C2F cmp al, '/' 0 00002002 7403E92208 jne .noswitches ; if not the help switch --> 0 00002007 8A04 mov al, byte [ si ] 0 00002009 3C3F cmp al, '?' 0 0000200B 7403E91908 jne .noswitches ; if not /? 0 00002010 8A4401 mov al, byte [ si+1 ] 0 00002013 3C20 cmp al, 32 0 00002015 740B je .help ; if nothing after /? 0 00002017 3C09 cmp al, 9 0 00002019 7407 je .help ; ditto 0 0000201B 3C0D cmp al, 13 0 0000201D 7403E90708 jne .noswitches ; if something after /? --> 5338 5339 ; Print a help message 5340 .help: 0 00002022 1E push ds 5342 %if _DEVICE 5343 %if _APPLICATION 0 00002023 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002028 742A jz .help_not_device 5346 %endif 5347 5348 ; We modify the device command line here. 5349 ; Is that wise? Seems to work though. 0 0000202A 8B36[0000] mov si, word [reg_ebx] 0 0000202E 8E1E[0000] mov ds, word [reg_es] 0 00002032 C57412 lds si, [si + 12h] 0 00002035 56 push si 5354 @@: 0 00002036 AC lodsb 0 00002037 3C20 cmp al, 32 0 00002039 7412 je @F 0 0000203B 3C09 cmp al, 9 0 0000203D 740E je @F 0 0000203F 3C00 cmp al, 0 0 00002041 740A je @F 0 00002043 3C0D cmp al, 13 0 00002045 7406 je @F 0 00002047 3C0A cmp al, 10 0 00002049 7402 je @F 0 0000204B EBE9 jmp @B 5367 5368 @@: 0 0000204D C644FF00 mov byte [si - 1], 0 0 00002051 5E pop si 0 00002052 EB1B jmp .help_common 5372 5373 .help_not_device: 5374 %endif 5375 %if _APPLICATION 0 00002054 A12C00 mov ax, word [2Ch] ; => environment 0 00002057 85C0 test ax, ax 0 00002059 7476 jz .help.no_name 0 0000205B 8ED8 mov ds, ax 0 0000205D 31F6 xor si, si 5381 @@: 0 0000205F AC lodsb 0 00002060 84C0 test al, al 0 00002062 75FB jnz @B 0 00002064 AC lodsb 0 00002065 84C0 test al, al 0 00002067 75F6 jnz @B 0 00002069 AD lodsw 0 0000206A 83F801 cmp ax, 1 0 0000206D 7562 jne .help.no_name 5391 %endif 5392 .help_common: 5393 @@: 0 0000206F 89F3 mov bx, si 5395 @@: 0 00002071 AC lodsb 0 00002072 3C61 cmp al, 'a' 0 00002074 7208 jb @F 0 00002076 3C7A cmp al, 'z' 0 00002078 7704 ja @F 0 0000207A 806CFF20 sub byte [si - 1], 'a' - 'A' 5402 @@: 0 0000207E 3C5C cmp al, '\' 0 00002080 74ED je @BBB 0 00002082 3C2F cmp al, '/' 0 00002084 74E9 je @BBB 0 00002086 84C0 test al, al 0 00002088 75E7 jnz @BB 5409 0 0000208A 89F1 mov cx, si 0 0000208C 49 dec cx 0 0000208D 29D9 sub cx, bx 5413 5414 @@: 0 0000208F 4E dec si 0 00002090 39DE cmp si, bx 0 00002092 7209 jb @F 0 00002094 803C2E cmp byte [si], '.' 0 00002097 75F6 jne @B 5420 0 00002099 89F1 mov cx, si 0 0000209B 29D9 sub cx, bx 5423 @@: 0 0000209D E332 jcxz .help.no_name 5425 @@: 0 0000209F BA[A810] mov dx, imsg.help.1 ; command-line help message 0 000020A2 E8DCF9 call init_putsz_cs 0 000020A5 BA[F810] mov dx, imsg.help.1a 0 000020A8 E8D6F9 call init_putsz_cs 0 000020AB 53 push bx 0 000020AC 89DA mov dx, bx 0 000020AE E814FA call init_puts_ds 0 000020B1 BA[0211] mov dx, imsg.help.2 0 000020B4 E8CAF9 call init_putsz_cs 0 000020B7 5A pop dx 0 000020B8 E80AFA call init_puts_ds 0 000020BB BA[8A15] mov dx, imsg.help.3 0 000020BE E8C0F9 call init_putsz_cs 0 000020C1 1F pop ds 5440 %if _DEVICE && _APPLICATION 0 000020C2 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 000020C7 7403E9E8EB jnz init_device_error_late 5443 %elif _DEVICE 5444 jmp init_device_error_late 5445 %endif 5446 %if _APPLICATION 0 000020CC B8004C mov ax, 4C00h 0 000020CF CD21 int 21h ; done 5449 %endif 5450 5451 .help.no_name: 0 000020D1 0E push cs 0 000020D2 1F pop ds 0 000020D3 BB[A210] mov bx, imsg.help.defaultfilename 0 000020D6 B90500 mov cx, imsg.help.defaultfilename.length 0 000020D9 EBC4 jmp @B 5457 5458 5459 ; Do the (proper) switches. 0 000020DB AC .switch:lodsb 0 000020DC 3C3F cmp al,'?' 0 000020DE 7503E93FFF je .help ; if -? 0 000020E3 E8AD10 call init_capitalise 5464 %if _CONFIG 0 000020E6 3C49 cmp al, 'I' 0 000020E8 7503E98400 je .switch_i 5467 %endif 0 000020ED 3C43 cmp al, 'C' 0 000020EF 7503E99E00 je .switch_c 0 000020F4 3C50 cmp al, 'P' 0 000020F6 7503E90901 je .switch_p 0 000020FB 3C46 cmp al, 'F' 0 000020FD 7503E99D01 je .switch_f 0 00002102 3C45 cmp al, 'E' 0 00002104 7503E9C601 je .switch_e 0 00002109 3C42 cmp al, 'B' 0 0000210B 7503E9EB00 je .switch_b 0 00002110 3C41 cmp al, 'A' 0 00002112 7503E9F605 je .switch_a 0 00002117 3C54 cmp al, 'T' 0 00002119 7503E9A202 je .switch_t 0 0000211E 3C52 cmp al, 'R' 0 00002120 7503E9A606 je .switch_r 5484 %if _VXCHG 0 00002125 3C56 cmp al, 'V' 0 00002127 7503E9D001 je .switch_v 5487 %endif 5488 %if _ALTVID 0 0000212C 3C32 cmp al, '2' 0 0000212E 7503E90302 je .switch_2 5491 %endif 5492 %if _MCLOPT 5493 cmp al, 'M' 5494 je .switch_m 5495 %endif 5496 5497 %if _SYMBOLIC 5498 cmp al, 'S' 5499 je .switch_s 5500 %endif 5501 5502 %if 1 || (_DEBUG && _DEBUG_COND) 0 00002133 3C44 cmp al, 'D' 0 00002135 7503E9EF01 je .switch_d 5505 %endif 5506 5507 %if _EXTENSIONS 0 0000213A 3C58 cmp al, 'X' 0 0000213C 7503E99D03 je .switch_x 0 00002141 3C59 cmp al, 'Y' 0 00002143 7503E94D04 je .switch_y 5512 %endif 5513 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00002148 3C48 cmp al, 'H' 0 0000214A 7503E9FE04 je .switch_h 5516 %endif 5517 5518 ; Other switches may go here. 0 0000214F 2EA2[F115] mov [ cs:imsg.invalidswitch_a ], al 0 00002153 BA[E015] mov dx, imsg.invalidswitch ; Invalid switch 5521 ..@init_cmdline_error: 0 00002156 E828F9 call init_putsz_cs ; print string 5523 %if _DEVICE && _APPLICATION 0 00002159 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 0000215E 7403E951EB jnz init_device_error_late 5526 %elif _DEVICE 5527 jmp init_device_error_late 5528 %endif 5529 %if _APPLICATION 0 00002163 B8014C mov ax, 4C01h ; Quit and return error status 0 00002166 CD21 int 21h 5532 %endif 5533 5534 ..@init_cmdline_switch_error: 0 00002168 2EA2[FD15] mov byte [cs:imsg.switch_x_error_a], al 0 0000216C BA[F515] mov dx, imsg.switch_x_error 0 0000216F EBE5 jmp ..@init_cmdline_error 5538 5539 5540 %if _CONFIG 5541 .switch_i: 0 00002171 AC lodsb 0 00002172 3C4E cmp al, 'N' 0 00002174 7408 je @F 0 00002176 3C6E cmp al, 'n' 0 00002178 7404 je @F 0 0000217A B049 mov al, 'I' 0 0000217C EBEA jmp ..@init_cmdline_switch_error 5549 5550 @@: 0 0000217E 8026[0100]FE clropt [internalflags3], dif3_input_cmdline 0 00002183 C606[0000]00 mov byte [cmdline_buffer], 0 0 00002188 2EC706[EA0D][0000] mov word [cs:cmdline_buffer_start], cmdline_buffer 0 0000218F E95CFE jmp .blankloop 5555 %endif 5556 5557 .switch_c: 5558 @@: 0 00002192 AC lodsb 0 00002193 3C3D cmp al, '=' 0 00002195 74FB je @B 0 00002197 3C3A cmp al, ':' 0 00002199 74F7 je @B 5564 0 0000219B 2E8B3E[EA0D] mov di, [cs:cmdline_buffer_start] 0 000021A0 B400 mov ah, 0 ; initialise to 0 = unquoted 0 000021A2 A9 db __TEST_IMM16 5568 .switch_c_loop: 0 000021A3 AA stosb 5570 .switch_c_quoted: 0 000021A4 AC lodsb 5572 .switch_c_loop_after_semicolon: 5573 0 000021A5 3C0D cmp al, 13 0 000021A7 7442 je .switch_c_eol 0 000021A9 38E0 cmp al, ah ; close quote mark ? 0 000021AB 7508 jne @F ; no --> 0 000021AD 3C00 cmp al, 0 0 000021AF 743A je .switch_c_eol 0 000021B1 B400 mov ah, 0 ; continue unquoted 0 000021B3 EBEF jmp .switch_c_quoted ; and load next character --> 5582 5583 @@: 0 000021B5 84E4 test ah, ah ; currently quoted ? 0 000021B7 7514 jnz .switch_c_not_blank ; yes --> 5586 0 000021B9 3C22 cmp al, '"' ; open quote mark ? 0 000021BB 7404 je @F 0 000021BD 3C27 cmp al, "'" 0 000021BF 7504 jne @FF ; no --> 5591 @@: 0 000021C1 88C4 mov ah, al ; remember quoted state 0 000021C3 EBDF jmp .switch_c_quoted ; and load next character --> 5594 5595 @@: 0 000021C5 3C20 cmp al, 32 ; blank while unquoted ? 0 000021C7 7426 je .unquoted_blank 0 000021C9 3C09 cmp al, 9 0 000021CB 7422 je .unquoted_blank ; yes --> 5600 .switch_c_not_blank: 0 000021CD 3C3B cmp al, ';' ; unescaped semicolon ? 0 000021CF 750C jne .switch_c_not_semicolon 0 000021D1 B00D mov al, 13 ; yes, replace by CR 0 000021D3 AA stosb 0 000021D4 84E4 test ah, ah 0 000021D6 74CC jz .switch_c_quoted 0 000021D8 E8FD0F call init_skipwhite 0 000021DB EBC8 jmp .switch_c_loop_after_semicolon 5609 5610 .switch_c_not_semicolon: 0 000021DD 3C5C cmp al, '\' ; escape ? 0 000021DF 75C2 jne .switch_c_loop ; no, store literal --> 0 000021E1 AC lodsb ; load escaped character 5614 ; (may be backslash, semicolon, quote) 0 000021E2 3C0D cmp al, 13 ; guard against EOL 0 000021E4 75BD jne .switch_c_loop 5617 .switch_c_error: 0 000021E6 B043 mov al, 'C' 0 000021E8 E97DFF jmp ..@init_cmdline_switch_error 5620 5621 .switch_c_eol: 0 000021EB 84E4 test ah, ah ; in quoted state ? 0 000021ED 75F7 jnz .switch_c_error ; yes, error --> 5624 .unquoted_blank: 0 000021EF B000 mov al, 0 0 000021F1 AA stosb ; terminate command line buffer 0 000021F2 800E[0100]01 setopt [internalflags3], dif3_input_cmdline 0 000021F7 4E dec si 0 000021F8 E9F3FD jmp .blankloop 5630 5631 5632 .switch_b: 0 000021FB 2EC606[2928]CC mov byte [cs:.breakpoint], 0CCh ; SMC in section init, set point 0 00002201 E9EAFD jmp .blankloop 5635 5636 5637 .switch_p: 0 00002204 AC lodsb 0 00002205 E88B0F call init_capitalise 0 00002208 BBFFFF mov bx, 0FFFFh ; or 0FFFFh 0 0000220B 89DA mov dx, bx ; and 0FFFFh 0 0000220D 4E dec si 0 0000220E 3C20 cmp al, 32 0 00002210 7478 je @F 0 00002212 3C09 cmp al, 9 0 00002214 7474 je @F 0 00002216 3C0D cmp al, 13 0 00002218 7470 je @F 0 0000221A 46 inc si 0 0000221B 3C2B cmp al, '+' 0 0000221D 746B je @F 0 0000221F 42 inc dx ; and 0000h 0 00002220 3C2D cmp al, '-' 0 00002222 7466 je @F 5655 5656 .switch_p_not_plusminus: 0 00002224 3C53 cmp al, 'S' 0 00002226 751E jne .switch_p_not_s 0 00002228 B700 mov bh, 00h ; or 0FFh 0 0000222A 4A dec dx ; and 0FFFFh 0 0000222B AC lodsb 0 0000222C 4E dec si 0 0000222D 3C20 cmp al, 32 0 0000222F 7459 je @F 0 00002231 3C09 cmp al, 9 0 00002233 7455 je @F 0 00002235 3C0D cmp al, 13 0 00002237 7451 je @F 0 00002239 46 inc si 0 0000223A 3C2B cmp al, '+' 0 0000223C 744C je @F 0 0000223E B200 mov dl, 00h ; and 0FF00h 0 00002240 3C2D cmp al, '-' 0 00002242 7446 je @F 0 00002244 EB3F jmp .switch_p_error 5676 5677 .switch_p_not_s: 0 00002246 3C45 cmp al, 'E' 0 00002248 751E jne .switch_p_not_e 0 0000224A B300 mov bl, 00h ; or 0FF00h 0 0000224C 4A dec dx ; and 0FFFFh 0 0000224D AC lodsb 0 0000224E 4E dec si 0 0000224F 3C20 cmp al, 32 0 00002251 7437 je @F 0 00002253 3C09 cmp al, 9 0 00002255 7433 je @F 0 00002257 3C0D cmp al, 13 0 00002259 742F je @F 0 0000225B 46 inc si 0 0000225C 3C2B cmp al, '+' 0 0000225E 742A je @F 0 00002260 B600 mov dh, 00h ; and 00FFh 0 00002262 3C2D cmp al, '-' 0 00002264 7424 je @F 0 00002266 EB1D jmp .switch_p_error 5697 5698 .switch_p_not_e: 0 00002268 3C57 cmp al, 'W' 0 0000226A 7519 jne .switch_p_not_w 5701 ; bl = 0FFh 0 0000226C AC lodsb 0 0000226D 4E dec si 0 0000226E 3C20 cmp al, 32 0 00002270 7425 je @FF 0 00002272 3C09 cmp al, 9 0 00002274 7421 je @FF 0 00002276 3C0D cmp al, 13 0 00002278 741D je @FF 0 0000227A 46 inc si 0 0000227B 3C2B cmp al, '+' 0 0000227D 7418 je @FF 0 0000227F B300 mov bl, 00h 0 00002281 3C2D cmp al, '-' 0 00002283 7412 je @FF 5716 ; jmp .switch_p_error 5717 5718 .switch_p_not_w: 5719 .switch_p_error: 0 00002285 B050 mov al, 'P' 0 00002287 E9DEFE jmp ..@init_cmdline_switch_error 5722 @@: 0 0000228A 2E091E[F80D] or [cs:init_switch_p_low_pathsearch_high_guessextension], bx 0 0000228F 2E2116[F80D] and [cs:init_switch_p_low_pathsearch_high_guessextension], dx 0 00002294 E957FD jmp .blankloop 5726 5727 @@: 0 00002297 2E881E[1C0E] mov [cs:init_switch_pw], bl 0 0000229C E94FFD jmp .blankloop 5730 5731 5732 .switch_f: 0 0000229F AC lodsb 0 000022A0 BB000C mov bx, opt6_flat_binary + opt6_big_stack 0 000022A3 4E dec si 0 000022A4 3C20 cmp al, 32 0 000022A6 741B je @F 0 000022A8 3C09 cmp al, 9 0 000022AA 7417 je @F 0 000022AC 3C0D cmp al, 13 0 000022AE 7413 je @F 0 000022B0 BB0004 mov bx, opt6_flat_binary 0 000022B3 46 inc si 0 000022B4 3C2B cmp al, '+' 0 000022B6 740B je @F 0 000022B8 31DB xor bx, bx 0 000022BA 3C2D cmp al, '-' 0 000022BC 7405 je @F 5749 .switch_f_error: 0 000022BE B046 mov al, 'F' 0 000022C0 E9A5FE jmp ..@init_cmdline_switch_error 5752 @@: 0 000022C3 8026[0100]FB clropt [options6], opt6_flat_binary 0 000022C8 091E[0000] or word [options6], bx 0 000022CC E91FFD jmp .blankloop 5756 5757 .switch_e: 0 000022CF AC lodsb 0 000022D0 BB0008 mov bx, opt6_big_stack 0 000022D3 4E dec si 0 000022D4 3C20 cmp al, 32 0 000022D6 7418 je @F 0 000022D8 3C09 cmp al, 9 0 000022DA 7414 je @F 0 000022DC 3C0D cmp al, 13 0 000022DE 7410 je @F 0 000022E0 46 inc si 0 000022E1 3C2B cmp al, '+' 0 000022E3 740B je @F 0 000022E5 31DB xor bx, bx 0 000022E7 3C2D cmp al, '-' 0 000022E9 7405 je @F 5773 .switch_e_error: 0 000022EB B045 mov al, 'E' 0 000022ED E978FE jmp ..@init_cmdline_switch_error 5776 @@: 0 000022F0 8026[0100]F7 clropt [options6], opt6_big_stack 0 000022F5 091E[0000] or word [options6], bx 0 000022F9 E9F2FC jmp .blankloop 5780 5781 %if _MCLOPT 5782 .switch_m: 5783 lodsb 5784 mov bl, 20h 5785 dec si 5786 cmp al, 32 5787 je @F 5788 cmp al, 9 5789 je @F 5790 cmp al, 13 5791 je @F 5792 inc si 5793 cmp al, '+' 5794 je @F 5795 mov bl, 8 5796 cmp al, '-' 5797 je @F 5798 .switch_m_error: 5799 mov al, 'M' 5800 jmp ..@init_cmdline_switch_error 5801 @@: 5802 mov byte [master_pic_base], bl 5803 jmp .blankloop 5804 %endif 5805 5806 %if _VXCHG 5807 .switch_v: 0 000022FC AC lodsb 0 000022FD BB0100 mov bx, opt6_vv_mode 0 00002300 4E dec si 0 00002301 3C20 cmp al, 32 0 00002303 7418 je @F 0 00002305 3C09 cmp al, 9 0 00002307 7414 je @F 0 00002309 3C0D cmp al, 13 0 0000230B 7410 je @F 0 0000230D 46 inc si 0 0000230E 3C2B cmp al, '+' 0 00002310 740B je @F 0 00002312 31DB xor bx, bx 0 00002314 3C2D cmp al, '-' 0 00002316 7405 je @F 5823 .switch_v_error: 0 00002318 B056 mov al, 'V' 0 0000231A E94BFE jmp ..@init_cmdline_switch_error 5826 @@: 0 0000231D 8026[0000]FE clropt [options6], opt6_vv_mode 0 00002322 091E[0000] or word [options6], bx 0 00002326 E9C5FC jmp .blankloop 5830 %endif 5831 5832 %if _DEBUG && _DEBUG_COND 5833 .switch_d: 5834 lodsb 5835 mov bx, dif6_debug_mode 5836 dec si 5837 cmp al, 32 5838 je @F 5839 cmp al, 9 5840 je @F 5841 cmp al, 13 5842 je @F 5843 inc si 5844 cmp al, '+' 5845 je @F 5846 xor bx, bx 5847 cmp al, '-' 5848 je @F 5849 .switch_d_error: 5850 mov al, 'D' 5851 jmp ..@init_cmdline_switch_error 5852 @@: 5853 clropt [internalflags6], dif6_debug_mode 5854 clropt [options6], opt6_debug_mode 5855 or word [internalflags6], bx 5856 or word [options6], bx 5857 %if dif6_debug_mode != opt6_debug_mode 5858 %error Mismatch of flag and option 5859 %endif 5860 jmp .blankloop 5861 %else 5862 .switch_d: 0 00002329 AC lodsb 5864 %if _DEBUG 5865 dec si 5866 cmp al, 32 5867 je @F 5868 cmp al, 9 5869 je @F 5870 cmp al, 13 5871 je @F 5872 inc si 5873 cmp al, '+' 5874 @@: 5875 %else 0 0000232A 3C2D cmp al, '-' 5877 %endif 0 0000232C 7503E9BDFC je .blankloop 0 00002331 B044 mov al, 'D' 0 00002333 E932FE jmp ..@init_cmdline_switch_error 5881 %endif 5882 5883 5884 %if _ALTVID 5885 .switch_2: 0 00002336 AC lodsb 0 00002337 B31E mov bl, 1Eh ; "push ds" 0 00002339 4E dec si 0 0000233A 3C20 cmp al, 32 0 0000233C 7418 je @F 0 0000233E 3C09 cmp al, 9 0 00002340 7414 je @F 0 00002342 3C0D cmp al, 13 0 00002344 7410 je @F 0 00002346 46 inc si 0 00002347 3C2B cmp al, '+' 0 00002349 740B je @F 0 0000234B B3C3 mov bl, 0C3h ; "retn" 0 0000234D 3C2D cmp al, '-' 0 0000234F 7405 je @F 5901 .switch_2_error: 0 00002351 B032 mov al, '2' 0 00002353 E912FE jmp ..@init_cmdline_switch_error 5904 @@: 0 00002356 8E06[0000] mov es, [code_seg] 0 0000235A 26881E[0000] mov byte [es:setscreen], bl 0 0000235F 16 push ss 0 00002360 07 pop es 0 00002361 80FBC3 cmp bl, 0C3h 0 00002364 7445 je .noaltvid 0 00002366 B8001A mov ax, 1A00h 0 00002369 CD10 int 10h 0 0000236B 3C1A cmp al, 1Ah 0 0000236D 753C jnz .noaltvid 0 0000236F 80FF00 cmp bh, 0 0 00002372 7437 jz .noaltvid 5917 0 00002374 1E push ds 0 00002375 B84000 mov ax, 40h 0 00002378 8ED8 mov ds, ax 0 0000237A 8B166300 mov dx, [63h] 0 0000237E 1F pop ds 0 0000237F 80F260 xor dl, 60h 0 00002382 8916[0000] mov [oldcrtp], dx 0 00002386 B007 mov al, 7 0 00002388 80FAB4 cmp dl, 0B4h 0 0000238B 7402 jz @F 0 0000238D B003 mov al, 3 5929 @@: 0 0000238F A2[0000] mov [oldmode], al 0 00002392 B00E mov al, 0Eh 0 00002394 EE out dx, al 0 00002395 42 inc dx 0 00002396 EC in al, dx 0 00002397 88C4 mov ah, al 0 00002399 4A dec dx 0 0000239A B00F mov al, 0Fh 0 0000239C EE out dx, al 0 0000239D 42 inc dx 0 0000239E EC in al, dx 0 0000239F B350 mov bl, 80 0 000023A1 F6F3 div bl 0 000023A3 86C4 xchg al, ah 0 000023A5 A3[0000] mov [oldcsrpos], ax 0 000023A8 E943FC jmp .blankloop 5946 5947 .noaltvid: 0 000023AB BA[6910] mov dx, imsg.noaltvid 0 000023AE E8D0F6 call init_putsz_cs 0 000023B1 8E06[0000] mov es, [code_seg] 0 000023B5 26C606[0000]C3 mov byte [es:setscreen], 0C3h 0 000023BB 16 push ss 0 000023BC 07 pop es 0 000023BD E92EFC jmp .blankloop 5955 %endif 5956 5957 5958 %if _SYMBOLIC 5959 .switch_s: 5960 mov dx, si 5961 lodsb 5962 mov ah, 0 ; flag for not quoted 5963 cmp al, '"' 5964 je .s_quoted 5965 cmp al, "'" 5966 jne .s_unquoted 5967 .s_quoted: 5968 mov ah, al ; save away our quote mark 5969 inc dx ; -> behind the quote mark 5970 @@: 5971 lodsb 5972 cmp al, 13 5973 je .switch_s_error 5974 cmp al, 0 5975 je .switch_s_error 5976 cmp al, ah ; closing quote mark ? 5977 jne @B ; not yet --> 5978 jmp .s_end 5979 5980 db __TEST_IMM8 ; (skip lodsb) 5981 @@: 5982 lodsb 5983 .s_unquoted: 5984 cmp al, 32 5985 ja @B 5986 5987 .s_end: 5988 dec si ; -> blank or terminator or closing quote 5989 push ax 5990 push si 5991 mov byte [si], 13 ; put in a CR for good measure 5992 mov si, dx 5993 5994 push word [errret] 5995 push word [throwret] 5996 push word [throwsp] 5997 5998 push cs 5999 call .jump 6000 6001 pop word [throwsp] 6002 pop word [throwret] ; restore throw destination 6003 pop word [errret] 6004 pop si 6005 pop ax 6006 mov byte [si], al ; restore if it wasn't CR 6007 ; si -> next character to process 6008 test dx, dx 6009 jz @F 6010 6011 cmp dx, si 6012 je @F 6013 6014 mov dx, imsg.switch_s_garbage 6015 call init_putsz_cs 6016 6017 @@: 6018 test ah, ah ; was quoted ? 6019 jz @F ; no --> 6020 inc si ; skip closing quote mark 6021 @@: 6022 jmp .blankloop 6023 6024 .switch_s_error: 6025 mov al, 'S' 6026 jmp ..@init_cmdline_switch_error 6027 6028 .jump: 6029 mov word [errret], ..@switch_s_catch 6030 mov word [throwret], ..@switch_s_catch 6031 mov word [throwsp], sp 6032 6033 mov ax, ..@switch_s_cont 6034 push word [code_seg] 6035 push ax 6036 retf 6037 %endif 6038 6039 6040 usesection INIT 6040 ------------------ note: usesection INIT 6041 6042 .switch_t: 0 000023C0 B3FF mov bl, 0FFh 0 000023C2 31FF xor di, di 6045 .switch_t_loop: 6046 @@: 0 000023C4 AC lodsb 0 000023C5 3C3D cmp al, '=' 0 000023C7 74FB je @B 0 000023C9 3C3A cmp al, ':' 0 000023CB 74F7 je @B 0 000023CD 3C2C cmp al, ',' 0 000023CF 74F3 je @B 0 000023D1 4E dec si 0 000023D2 3C20 cmp al, 32 0 000023D4 7503E9A800 je @F 0 000023D9 3C09 cmp al, 9 0 000023DB 7503E9A100 je @F 0 000023E0 3C0D cmp al, 13 0 000023E2 7503E99A00 je @F 0 000023E7 46 inc si 0 000023E8 3C2B cmp al, '+' 0 000023EA 7503E98C00 je .switch_t_set 0 000023EF 3C2D cmp al, '-' 0 000023F1 7503E98900 je .switch_t_clear 6066 0 000023F6 2E8A1E[1D0E] mov bl, byte [cs:init_switch_t] 0 000023FB E8950D call init_capitalise 0 000023FE 3C49 cmp al, 'I' ; ignore ? 0 00002400 7508 jne .t_notignore 0 00002402 2EC606[1E0E]FF mov byte [cs:init_switch_t_ignore], 0FFh 0 00002408 EBBA jmp @B 6073 6074 .t_notignore: 0 0000240A 3C4F cmp al, 'O' ; only ? 0 0000240C 7508 jne .t_notonly 0 0000240E 2EC606[1E0E]00 mov byte [cs:init_switch_t_ignore], 0 0 00002414 EBAE jmp @B 6079 6080 .t_notonly: 0 00002416 3C50 cmp al, 'P' ; point ? 0 00002418 7508 jne .t_notpoint 0 0000241A 2EC606[1F0E]FF mov byte [cs:init_switch_t_break], 0FFh 0 00002420 EBA2 jmp @B 6085 6086 .t_notpoint: 0 00002422 3C56 cmp al, 'V' ; variable ? 0 00002424 7508 jne .t_notvar 0 00002426 2EC606[200E]FF mov byte [cs:init_switch_t_variable], 0FFh 0 0000242C EB96 jmp @B 6091 6092 .t_notvar: 0 0000242E 3C55 cmp al, 'U' ; enable UMA ? 0 00002430 7509 jne .t_notupper 0 00002432 2EC785[040E]0100 mov word [cs:init_switch_t_umblink + di], 1 0 00002439 EB89 jmp @B 6097 6098 .t_notupper: 0 0000243B 3C4C cmp al, 'L' ; restrict to LMA ? 0 0000243D 750A jne .t_notlower 0 0000243F 2EC785[040E]0000 mov word [cs:init_switch_t_umblink + di], 0 0 00002446 E97BFF jmp @B 6103 6104 .t_notlower: 0 00002449 3C58 cmp al, 'X' 0 0000244B 7505 jne .t_not_x 0 0000244D 31FF xor di, di 0 0000244F E972FF jmp @B 6109 6110 .t_not_x: 0 00002452 3C59 cmp al, 'Y' 0 00002454 7506 jne .t_not_y 0 00002456 BF0200 mov di, 2 0 00002459 E968FF jmp @B 6115 6116 .t_not_y: 0 0000245C 3C5A cmp al, 'Z' 0 0000245E 7506 jne .t_not_z 0 00002460 BF0400 mov di, 4 0 00002463 E95EFF jmp @B 6121 6122 .t_not_z: 0 00002466 3C30 cmp al, '0' 0 00002468 720C jb .switch_t_error 0 0000246A 3C39 cmp al, '9' 0 0000246C 7626 jbe .switch_t_numeric 0 0000246E 3C41 cmp al, 'A' 0 00002470 7204 jb .switch_t_error 0 00002472 3C46 cmp al, 'F' 0 00002474 761E jbe .switch_t_numeric 6131 .switch_t_error: 0 00002476 B054 mov al, 'T' 0 00002478 E9EDFC jmp ..@init_cmdline_switch_error 6134 6135 .switch_t_set: 0 0000247B B3FF mov bl, 0FFh 0 0000247D EB02 jmp @F 6138 6139 .switch_t_clear: 0 0000247F 31DB xor bx, bx 6141 6142 @@: 6143 %if _DEVICE 0 00002481 84DB test bl, bl 0 00002483 7407 jz @F 0 00002485 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 0000248A 75EA jnz .switch_t_error 6148 @@: 6149 %endif 0 0000248C 2E881E[1D0E] mov byte [cs:init_switch_t], bl 0 00002491 E95AFB jmp .blankloop 6152 6153 .switch_t_numeric: 0 00002494 31D2 xor dx, dx 0 00002496 A8 db __TEST_IMM8 ; (skip lodsb) 6156 @@: 0 00002497 AC lodsb 0 00002498 3C2C cmp al, ',' 0 0000249A 7439 je @F 0 0000249C 3C20 cmp al, 32 0 0000249E 7435 je @F 0 000024A0 3C09 cmp al, 9 0 000024A2 7431 je @F 0 000024A4 3C0D cmp al, 13 0 000024A6 742D je @F 0 000024A8 E8E80C call init_capitalise 0 000024AB B400 mov ah, 0 0 000024AD 3C30 cmp al, '0' ; decimal digit ? 0 000024AF 72C5 jb .switch_t_error 0 000024B1 3C39 cmp al, '9' 0 000024B3 7714 ja .switch_t_notdec 0 000024B5 2C30 sub al, '0' ; ax = digit 6173 .switch_t_gotdigit: 0 000024B7 81FA0010 cmp dx, 1000h 0 000024BB 73B9 jae .switch_t_error 0 000024BD 01D2 add dx, dx 0 000024BF 01D2 add dx, dx 0 000024C1 01D2 add dx, dx 0 000024C3 01D2 add dx, dx ; * 16 0 000024C5 01C2 add dx, ax 0 000024C7 EBCE jmp @B 6182 6183 .switch_t_notdec: 0 000024C9 3C41 cmp al, 'A' ; alphabetic ? 0 000024CB 72A9 jb .switch_t_error 0 000024CD 3C46 cmp al, 'F' 0 000024CF 77A5 ja .switch_t_error 0 000024D1 04C9 add al, 10 - 'A' ; ax = digit 0 000024D3 EBE2 jmp .switch_t_gotdigit 6190 6191 @@: 0 000024D5 2E8995[0A0E] mov word [cs:init_switch_t_strategy + di], dx 0 000024DA 4E dec si 0 000024DB E9E6FE jmp .switch_t_loop 6195 6196 %if _EXTENSIONS 6197 .switch_x: 0 000024DE BBF0FF mov bx, _EXT_CODE_SIZE 0 000024E1 AC lodsb 0 000024E2 3C09 cmp al, 9 0 000024E4 7503E9A100 je .switch_x_got 0 000024E9 3C20 cmp al, 32 0 000024EB 7503E99A00 je .switch_x_got 0 000024F0 3C0D cmp al, 13 0 000024F2 7503E99300 je .switch_x_got 0 000024F7 3C3A cmp al, ':' 0 000024F9 7404 je @F 0 000024FB 3C3D cmp al, '=' 0 000024FD 7501 jne @FF 6210 @@: 0 000024FF AC lodsb 6212 @@: 0 00002500 4E dec si 0 00002501 0E push cs 0 00002502 07 pop es 0 00002503 BA[D50E] mov dx, imsg.max 0 00002506 E8340C call init_isstring? 0 00002509 747E je .switch_x_got.lodsb 0 0000250B BB0000 mov bx, 0 0 0000250E BA[D90E] mov dx, imsg.min 0 00002511 E8290C call init_isstring? 0 00002514 7473 je .switch_x_got.lodsb 0 00002516 BB0040 mov bx, _EXT_CODE_DEFAULT_SIZE 0 00002519 BA[DD0E] mov dx, imsg.default 0 0000251C E81E0C call init_isstring? 0 0000251F 7468 je .switch_x_got.lodsb 6227 0 00002521 BA1000 mov dx, 16 0 00002524 803C23 cmp byte [si], '#' 0 00002527 7503 jne .switch_x_zero 0 00002529 46 inc si 0 0000252A B20A mov dl, 10 6233 .switch_x_zero: 0 0000252C 31DB xor bx, bx 6235 .switch_x_num: 0 0000252E AC lodsb 0 0000252F 3C20 cmp al, 32 ; end of number ? 0 00002531 7450 je .switch_x_check 0 00002533 3C09 cmp al, 9 0 00002535 744C je .switch_x_check 0 00002537 3C0D cmp al, 13 0 00002539 7448 je .switch_x_check ; yes --> 0 0000253B 3C5F cmp al, '_' ; separator ? 0 0000253D 74EF je .switch_x_num 0 0000253F 3C23 cmp al, '#' ; base change ? 0 00002541 7432 je .switch_x_base 0 00002543 E84D0C call init_capitalise 0 00002546 B400 mov ah, 0 0 00002548 3C30 cmp al, '0' ; decimal digit ? 0 0000254A 7224 jb .switch_x_error 0 0000254C 3C39 cmp al, '9' 0 0000254E 7712 ja .switch_x_notdec 0 00002550 2C30 sub al, '0' ; ax = digit 6254 .switch_x_gotdigit: 0 00002552 93 xchg ax, bx ; ax = prior 0 00002553 52 push dx 0 00002554 F7E2 mul dx ; dx:ax = prior * base 0 00002556 85D2 test dx, dx ; >= 64 KiB ? 0 00002558 7516 jnz .switch_x_error ; error --> 0 0000255A 5A pop dx 0 0000255B 93 xchg bx, ax ; return bx = prior 0 0000255C 01C3 add bx, ax ; prior += next 0 0000255E 7210 jc .switch_x_error 0 00002560 EBCC jmp .switch_x_num 6265 6266 .switch_x_notdec: 0 00002562 3C41 cmp al, 'A' ; alphabetic ? 0 00002564 720A jb .switch_x_error 0 00002566 3C5A cmp al, 'Z' 0 00002568 7706 ja .switch_x_error 0 0000256A 04C9 add al, 10 - 'A' ; ax = digit 0 0000256C 39D0 cmp ax, dx 0 0000256E 72E2 jb .switch_x_gotdigit 6274 ; jae .switch_x_error 6275 .switch_x_error: 6276 ..@init_cmdline_switch_x_error: 0 00002570 B058 mov al, 'X' 0 00002572 E9F3FB jmp ..@init_cmdline_switch_error 6279 6280 .switch_x_base: 0 00002575 83FB02 cmp bx, 2 0 00002578 72F6 jb .switch_x_error 0 0000257A 83FB24 cmp bx, 36 0 0000257D 77F1 ja .switch_x_error 0 0000257F 89DA mov dx, bx 0 00002581 EBA9 jmp .switch_x_zero 6287 6288 .switch_x_check: 0 00002583 83FBF0 cmp bx, _EXT_CODE_SIZE 0 00002586 77E8 ja .switch_x_error 6291 0 00002588 A8 db __TEST_IMM8 ; (skip lodsb) 6293 .switch_x_got.lodsb: 0 00002589 AC lodsb 6295 .switch_x_got: 0 0000258A 1E push ds 0 0000258B 07 pop es 0 0000258C 2E891E[F20D] mov word [cs:init_ext_want], bx 0 00002591 4E dec si 0 00002592 E959FA jmp .blankloop 6301 6302 6303 .switch_y: 6304 %ifn _LINK 6305 mov bx, ext_data_max_size_equate 6306 %else 0 00002595 BB[F0FF] mov bx, relocatedzero + 0FFF0h 6308 wlcalc word_minusext_ext_data_area, equ $ - 2 6309 %endif 0 00002598 AC lodsb 0 00002599 3C09 cmp al, 9 0 0000259B 7503E9A200 je .switch_y_got 0 000025A0 3C20 cmp al, 32 0 000025A2 7503E99B00 je .switch_y_got 0 000025A7 3C0D cmp al, 13 0 000025A9 7503E99400 je .switch_y_got 0 000025AE 3C3A cmp al, ':' 0 000025B0 7404 je @F 0 000025B2 3C3D cmp al, '=' 0 000025B4 7501 jne @FF 6321 @@: 0 000025B6 AC lodsb 6323 @@: 0 000025B7 4E dec si 0 000025B8 0E push cs 0 000025B9 07 pop es 0 000025BA BA[D50E] mov dx, imsg.max 0 000025BD E87D0B call init_isstring? 0 000025C0 747F je .switch_y_got.lodsb 0 000025C2 BB0000 mov bx, 0 0 000025C5 BA[D90E] mov dx, imsg.min 0 000025C8 E8720B call init_isstring? 0 000025CB 7474 je .switch_y_got.lodsb 0 000025CD BB0040 mov bx, _EXT_DATA_DEFAULT_SIZE 0 000025D0 BA[DD0E] mov dx, imsg.default 0 000025D3 E8670B call init_isstring? 0 000025D6 7469 je .switch_y_got.lodsb 6338 0 000025D8 BA1000 mov dx, 16 0 000025DB 803C23 cmp byte [si], '#' 0 000025DE 7503 jne .switch_y_zero 0 000025E0 46 inc si 0 000025E1 B20A mov dl, 10 6344 .switch_y_zero: 0 000025E3 31DB xor bx, bx 6346 .switch_y_num: 0 000025E5 AC lodsb 0 000025E6 3C20 cmp al, 32 ; end of number ? 0 000025E8 7450 je .switch_y_check 0 000025EA 3C09 cmp al, 9 0 000025EC 744C je .switch_y_check 0 000025EE 3C0D cmp al, 13 0 000025F0 7448 je .switch_y_check ; yes --> 0 000025F2 3C5F cmp al, '_' ; separator ? 0 000025F4 74EF je .switch_y_num 0 000025F6 3C23 cmp al, '#' ; base change ? 0 000025F8 7432 je .switch_y_base 0 000025FA E8960B call init_capitalise 0 000025FD B400 mov ah, 0 0 000025FF 3C30 cmp al, '0' ; decimal digit ? 0 00002601 7224 jb .switch_y_error 0 00002603 3C39 cmp al, '9' 0 00002605 7712 ja .switch_y_notdec 0 00002607 2C30 sub al, '0' ; ax = digit 6365 .switch_y_gotdigit: 0 00002609 93 xchg ax, bx ; ax = prior 0 0000260A 52 push dx 0 0000260B F7E2 mul dx ; dx:ax = prior * base 0 0000260D 85D2 test dx, dx ; >= 64 KiB ? 0 0000260F 7516 jnz .switch_y_error ; error --> 0 00002611 5A pop dx 0 00002612 93 xchg bx, ax ; return bx = prior 0 00002613 01C3 add bx, ax ; prior += next 0 00002615 7210 jc .switch_y_error 0 00002617 EBCC jmp .switch_y_num 6376 6377 .switch_y_notdec: 0 00002619 3C41 cmp al, 'A' ; alphabetic ? 0 0000261B 720A jb .switch_y_error 0 0000261D 3C5A cmp al, 'Z' 0 0000261F 7706 ja .switch_y_error 0 00002621 04C9 add al, 10 - 'A' ; ax = digit 0 00002623 39D0 cmp ax, dx 0 00002625 72E2 jb .switch_y_gotdigit 6385 ; jae .switch_y_error 6386 .switch_y_error: 6387 ..@init_cmdline_switch_y_error: 0 00002627 B059 mov al, 'Y' 0 00002629 E93CFB jmp ..@init_cmdline_switch_error 6390 6391 .switch_y_base: 0 0000262C 83FB02 cmp bx, 2 0 0000262F 72F6 jb .switch_y_error 0 00002631 83FB24 cmp bx, 36 0 00002634 77F1 ja .switch_y_error 0 00002636 89DA mov dx, bx 0 00002638 EBA9 jmp .switch_y_zero 6398 6399 .switch_y_check: 6400 %ifn _LINK 6401 cmp bx, ext_data_max_size_equate 6402 %else 0 0000263A 81FB[F0FF] cmp bx, strict word relocatedzero + 0FFF0h 6404 wlcalc word_minusext_ext_data_area, equ $ - 2 6405 %endif 0 0000263E 77E7 ja .switch_y_error 6407 0 00002640 A8 db __TEST_IMM8 ; (skip lodsb) 6409 .switch_y_got.lodsb: 0 00002641 AC lodsb 6411 .switch_y_got: 0 00002642 1E push ds 0 00002643 07 pop es 0 00002644 2E891E[F40D] mov word [cs:init_extdata_want], bx 0 00002649 4E dec si 0 0000264A E9A1F9 jmp .blankloop 6417 %endif 6418 6419 6420 %if _HISTORY_SEPARATE_FIXED && _HISTORY 6421 .switch_h: 0 0000264D BBF0FF mov bx, 0FFF0h 0 00002650 AC lodsb 0 00002651 3C09 cmp al, 9 0 00002653 7503E9AA00 je .switch_h_got 0 00002658 3C20 cmp al, 32 0 0000265A 7503E9A300 je .switch_h_got 0 0000265F 3C0D cmp al, 13 0 00002661 7503E99C00 je .switch_h_got 0 00002666 3C3A cmp al, ':' 0 00002668 7404 je @F 0 0000266A 3C3D cmp al, '=' 0 0000266C 7501 jne @FF 6434 @@: 0 0000266E AC lodsb 6436 @@: 0 0000266F 4E dec si 0 00002670 0E push cs 0 00002671 07 pop es 0 00002672 BA[D50E] mov dx, imsg.max 0 00002675 E8C50A call init_isstring? 0 00002678 7503E98400 je .switch_h_got.lodsb 0 0000267D BB0401 mov bx, 260 0 00002680 BA[D90E] mov dx, imsg.min 0 00002683 E8B70A call init_isstring? 0 00002686 7479 je .switch_h_got.lodsb 0 00002688 BB0020 mov bx, _HISTORY_WANT_SIZE 0 0000268B BA[DD0E] mov dx, imsg.default 0 0000268E E8AC0A call init_isstring? 0 00002691 746E je .switch_h_got.lodsb 6451 0 00002693 BA1000 mov dx, 16 0 00002696 803C23 cmp byte [si], '#' 0 00002699 7503 jne .switch_h_zero 0 0000269B 46 inc si 0 0000269C B20A mov dl, 10 6457 .switch_h_zero: 0 0000269E 31DB xor bx, bx 6459 .switch_h_num: 0 000026A0 AC lodsb 0 000026A1 3C20 cmp al, 32 ; end of number ? 0 000026A3 7450 je .switch_h_check 0 000026A5 3C09 cmp al, 9 0 000026A7 744C je .switch_h_check 0 000026A9 3C0D cmp al, 13 0 000026AB 7448 je .switch_h_check ; yes --> 0 000026AD 3C5F cmp al, '_' ; separator ? 0 000026AF 74EF je .switch_h_num 0 000026B1 3C23 cmp al, '#' ; base change ? 0 000026B3 7432 je .switch_h_base 0 000026B5 E8DB0A call init_capitalise 0 000026B8 B400 mov ah, 0 0 000026BA 3C30 cmp al, '0' ; decimal digit ? 0 000026BC 7224 jb .switch_h_error 0 000026BE 3C39 cmp al, '9' 0 000026C0 7712 ja .switch_h_notdec 0 000026C2 2C30 sub al, '0' ; ax = digit 6478 .switch_h_gotdigit: 0 000026C4 93 xchg ax, bx ; ax = prior 0 000026C5 52 push dx 0 000026C6 F7E2 mul dx ; dx:ax = prior * base 0 000026C8 85D2 test dx, dx ; >= 64 KiB ? 0 000026CA 7516 jnz .switch_h_error ; error --> 0 000026CC 5A pop dx 0 000026CD 93 xchg bx, ax ; return bx = prior 0 000026CE 01C3 add bx, ax ; prior += next 0 000026D0 7210 jc .switch_h_error 0 000026D2 EBCC jmp .switch_h_num 6489 6490 .switch_h_notdec: 0 000026D4 3C41 cmp al, 'A' ; alphabetic ? 0 000026D6 720A jb .switch_h_error 0 000026D8 3C5A cmp al, 'Z' 0 000026DA 7706 ja .switch_h_error 0 000026DC 04C9 add al, 10 - 'A' ; ax = digit 0 000026DE 39D0 cmp ax, dx 0 000026E0 72E2 jb .switch_h_gotdigit 6498 ; jae .switch_h_error 6499 .switch_h_error: 6500 ..@init_cmdline_switch_h_error: 0 000026E2 B048 mov al, 'H' 0 000026E4 E981FA jmp ..@init_cmdline_switch_error 6503 6504 .switch_h_base: 0 000026E7 83FB02 cmp bx, 2 0 000026EA 72F6 jb .switch_h_error 0 000026EC 83FB24 cmp bx, 36 0 000026EF 77F1 ja .switch_h_error 0 000026F1 89DA mov dx, bx 0 000026F3 EBA9 jmp .switch_h_zero 6511 6512 .switch_h_check: 0 000026F5 83FBF0 cmp bx, 0FFF0h 0 000026F8 77E8 ja .switch_h_error 0 000026FA 81FB0401 cmp bx, 260 0 000026FE 72E2 jb .switch_h_error 6517 0 00002700 A8 db __TEST_IMM8 ; (skip lodsb) 6519 .switch_h_got.lodsb: 0 00002701 AC lodsb 6521 .switch_h_got: 0 00002702 1E push ds 0 00002703 07 pop es 0 00002704 2E891E[F60D] mov word [cs:init_history_want], bx 0 00002709 4E dec si 0 0000270A E9E1F8 jmp .blankloop 6527 %endif 6528 6529 6530 .switch_a: 0 0000270D BB0060 mov bx, _AUXBUFFMAXSIZE 0 00002710 AC lodsb 0 00002711 3C09 cmp al, 9 0 00002713 7503E9A800 je .switch_a_got 0 00002718 3C20 cmp al, 32 0 0000271A 7503E9A100 je .switch_a_got 0 0000271F 3C0D cmp al, 13 0 00002721 7503E99A00 je .switch_a_got 0 00002726 3C3A cmp al, ':' 0 00002728 7404 je @F 0 0000272A 3C3D cmp al, '=' 0 0000272C 7501 jne @FF 6543 @@: 0 0000272E AC lodsb 6545 @@: 0 0000272F 4E dec si 0 00002730 0E push cs 0 00002731 07 pop es 0 00002732 BA[D50E] mov dx, imsg.max 0 00002735 E8050A call init_isstring? 0 00002738 7503E98200 je .switch_a_got.lodsb 0 0000273D BB1020 mov bx, _AUXBUFFSIZE 0 00002740 BA[D90E] mov dx, imsg.min 0 00002743 E8F709 call init_isstring? 0 00002746 7477 je .switch_a_got.lodsb 6556 ; default == minimum 0 00002748 BA[DD0E] mov dx, imsg.default 0 0000274B E8EF09 call init_isstring? 0 0000274E 746F je .switch_a_got.lodsb 6560 0 00002750 BA1000 mov dx, 16 0 00002753 803C23 cmp byte [si], '#' 0 00002756 7503 jne .switch_a_zero 0 00002758 46 inc si 0 00002759 B20A mov dl, 10 6566 .switch_a_zero: 0 0000275B 31DB xor bx, bx 6568 .switch_a_num: 0 0000275D AC lodsb 0 0000275E 3C20 cmp al, 32 ; end of number ? 0 00002760 7450 je .switch_a_check 0 00002762 3C09 cmp al, 9 0 00002764 744C je .switch_a_check 0 00002766 3C0D cmp al, 13 0 00002768 7448 je .switch_a_check ; yes --> 0 0000276A 3C5F cmp al, '_' ; separator ? 0 0000276C 74EF je .switch_a_num 0 0000276E 3C23 cmp al, '#' ; base change ? 0 00002770 7432 je .switch_a_base 0 00002772 E81E0A call init_capitalise 0 00002775 B400 mov ah, 0 0 00002777 3C30 cmp al, '0' ; decimal digit ? 0 00002779 7224 jb .switch_a_error 0 0000277B 3C39 cmp al, '9' 0 0000277D 7712 ja .switch_a_notdec 0 0000277F 2C30 sub al, '0' ; ax = digit 6587 .switch_a_gotdigit: 0 00002781 93 xchg ax, bx ; ax = prior 0 00002782 52 push dx 0 00002783 F7E2 mul dx ; dx:ax = prior * base 0 00002785 85D2 test dx, dx ; >= 64 KiB ? 0 00002787 7516 jnz .switch_a_error ; error --> 0 00002789 5A pop dx 0 0000278A 93 xchg bx, ax ; return bx = prior 0 0000278B 01C3 add bx, ax ; prior += next 0 0000278D 7210 jc .switch_a_error 0 0000278F EBCC jmp .switch_a_num 6598 6599 .switch_a_notdec: 0 00002791 3C41 cmp al, 'A' ; alphabetic ? 0 00002793 720A jb .switch_a_error 0 00002795 3C5A cmp al, 'Z' 0 00002797 7706 ja .switch_a_error 0 00002799 04C9 add al, 10 - 'A' ; ax = digit 0 0000279B 39D0 cmp ax, dx 0 0000279D 72E2 jb .switch_a_gotdigit 6607 ; jae .switch_a_error 6608 .switch_a_error: 6609 ..@init_cmdline_switch_a_error: 0 0000279F B041 mov al, 'A' 0 000027A1 E9C4F9 jmp ..@init_cmdline_switch_error 6612 6613 .switch_a_base: 0 000027A4 83FB02 cmp bx, 2 0 000027A7 72F6 jb .switch_a_error 0 000027A9 83FB24 cmp bx, 36 0 000027AC 77F1 ja .switch_a_error 0 000027AE 89DA mov dx, bx 0 000027B0 EBA9 jmp .switch_a_zero 6620 6621 .switch_a_check: 0 000027B2 81FB1020 cmp bx, _AUXBUFFSIZE 0 000027B6 72E7 jb .switch_a_error 0 000027B8 81FB0060 cmp bx, _AUXBUFFMAXSIZE 0 000027BC 77E1 ja .switch_a_error 6626 0 000027BE A8 db __TEST_IMM8 ; (skip lodsb) 6628 .switch_a_got.lodsb: 0 000027BF AC lodsb 6630 .switch_a_got: 0 000027C0 1E push ds 0 000027C1 07 pop es 0 000027C2 2E891E[F00D] mov word [cs:init_auxbuff_want], bx 0 000027C7 4E dec si 0 000027C8 E923F8 jmp .blankloop 6636 6637 6638 .switch_r: 0 000027CB AC lodsb 0 000027CC 3C3A cmp al, ':' 0 000027CE 7404 je @F 0 000027D0 3C3D cmp al, '=' 0 000027D2 7501 jne @FF 6644 @@: 0 000027D4 A8 db __TEST_IMM8 ; skip dec 6646 @@: 0 000027D5 4E dec si 0 000027D6 BA1000 mov dx, 16 0 000027D9 31DB xor bx, bx 6650 .switch_r_num: 0 000027DB AC lodsb 0 000027DC 3C20 cmp al, 32 ; end of number ? 0 000027DE 743E je .switch_r_check 0 000027E0 3C09 cmp al, 9 0 000027E2 743A je .switch_r_check 0 000027E4 3C0D cmp al, 13 0 000027E6 7436 je .switch_r_check ; yes --> 0 000027E8 3C5F cmp al, '_' ; separator ? 0 000027EA 74EF je .switch_r_num 0 000027EC E8A409 call init_capitalise 0 000027EF B400 mov ah, 0 0 000027F1 3C30 cmp al, '0' ; decimal digit ? 0 000027F3 7224 jb .switch_r_error 0 000027F5 3C39 cmp al, '9' 0 000027F7 7712 ja .switch_r_notdec 0 000027F9 2C30 sub al, '0' ; ax = digit 6667 .switch_r_gotdigit: 0 000027FB 93 xchg ax, bx ; ax = prior 0 000027FC 52 push dx 0 000027FD F7E2 mul dx ; dx:ax = prior * base 0 000027FF 85D2 test dx, dx ; >= 64 KiB ? 0 00002801 7516 jnz .switch_r_error ; error --> 0 00002803 5A pop dx 0 00002804 93 xchg bx, ax ; return bx = prior 0 00002805 01C3 add bx, ax ; prior += next 0 00002807 7210 jc .switch_r_error 0 00002809 EBD0 jmp .switch_r_num 6678 6679 .switch_r_notdec: 0 0000280B 3C41 cmp al, 'A' ; alphabetic ? 0 0000280D 720A jb .switch_r_error 0 0000280F 3C5A cmp al, 'Z' 0 00002811 7706 ja .switch_r_error 0 00002813 04C9 add al, 10 - 'A' ; ax = digit 0 00002815 39D0 cmp ax, dx 0 00002817 72E2 jb .switch_r_gotdigit 6687 ; jae .switch_r_error 6688 .switch_r_error: 6689 ..@init_cmdline_switch_r_error: 0 00002819 B052 mov al, 'R' 0 0000281B E94AF9 jmp ..@init_cmdline_switch_error 6692 6693 .switch_r_check: 6694 .switch_r_got: 0 0000281E 1E push ds 0 0000281F 07 pop es 0 00002820 2E891E[FE0D] mov word [cs:init_switch_r], bx 0 00002825 4E dec si 0 00002826 E9C5F7 jmp .blankloop 6700 6701 6702 .noswitches: 6703 .breakpoint: 0 00002829 90 nop ; SMC in section init 6705 ; Feed the remaining command line to the 'n' command. 0 0000282A 4E dec si 0 0000282B E87B09 call init_skipcomma 0 0000282E 4E dec si 0 0000282F 56 push si 6710 6711 6712 %assign ELD 0 6713 %assign INTERC3 0 6714 %assign PART1 1 6715 %assign PART2 0 6716 %assign PART3 0 6717 %define init_data_segment cs 6718 6719 %imacro internalcoderelocation 0-*.nolist 6720 %endmacro 6721 %imacro internaldatarelocation 0-*.nolist 6722 %endmacro 6723 %imacro linkdatarelocation 0-*.nolist 6724 %endmacro 6725 %define relocated(address) address 6726 6727 %include "pathshar.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug initialisation - Path analyse and search 5 <1> 6 <1> Copyright (C) 2008-2025 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> 17 <1> ; defines used: 18 <1> ; ELD = nonzero iff included by Extension for lDebug path.asm (for path.eld) 19 <1> ; INTERC3 = nonzero iff included by INTERC3 intercep.asm 20 <1> ; else included by lDebug init.asm 21 <1> ; PART1 = nonzero if to embed main code 22 <1> ; PART2 = nonzero if to embed subfunctions 23 <1> ; PART3 = nonzero if to embed imsg messages 24 <1> 25 <1> %if PART1 26 <1> ; INP: si -> pathname followed by command line 27 <1> ; word [ss:sp] = si 28 <1> ; OUT: word [ss:sp] -> final buffer 29 <1> init_analyse_pathname: 0 00002830 89F3 mov bx, si 0 00002832 31D2 xor dx, dx 0 00002834 B000 mov al, 0 33 <1> @@: 0 00002836 3C2F cmp al, '/' 0 00002838 7410 je .slash 0 0000283A 3C5C cmp al, '\' 0 0000283C 740C je .slash 0 0000283E 3C3A cmp al, ':' 0 00002840 7408 je .colon 0 00002842 3C2E cmp al, '.' 0 00002844 7507 jne .next 42 <1> .dot: 0 00002846 B201 mov dl, 1 ; set dl (fn with dot) 0 00002848 EB03 jmp .next 45 <1> 46 <1> .slash: 47 <1> .colon: 0 0000284A BA0001 mov dx, 100h ; set dh (is a pathname), reset dl (fn with dot) 49 <1> .next: 0 0000284D AC lodsb 0 0000284E E83808 call init_ifsep 0 00002851 75E3 jne @B 0 00002853 4E dec si ; bx -> name, si -> terminator 54 <1> ; dh = nonzero if a pathname not just filename 55 <1> ; dl = nonzero if filename contains a dot 0 00002854 16 push ss 0 00002855 07 pop es 0 00002856 89F1 mov cx, si 0 00002858 29D9 sub cx, bx ; es:bx -> name, cx = length 60 <1> 61 <1> 62 <1> init_check_warn_extension: 0 0000285A 52 push dx 0 0000285B 06 push es 65 <1> 0 0000285C 84D2 test dl, dl ; last component has a dot ? 0 0000285E 7433 jz .done ; no, do not warn --> 68 <1> 0 00002860 2ED006[1C0E] rol byte [init_data_segment:init_switch_pw], 1 70 <1> internaldatarelocation 0 00002865 732C jnc .done ; warning disabled --> 72 <1> 0 00002867 83F904 cmp cx, 4 ; can fit an expected extension ? 0 0000286A 7221 jb .warn ; no, warn --> 75 <1> 0 0000286C 83EE04 sub si, 4 ; -> possible extension 0 0000286F 0E push init_data_segment 0 00002870 07 pop es 0 00002871 BF[220E] mov di, imsg.no_warn_extensions 80 <1> internaldatarelocation ; es:di -> allowed extensions 81 <1> .loop: 0 00002874 B000 mov al, 0 0 00002876 2E864504 xchg byte [init_data_segment:di+4], al 84 <1> ; NUL-terminate the candidate extension 0 0000287A 50 push ax 0 0000287B 89FA mov dx, di 0 0000287D E8BD08 call init_isstring? ; is it this one ? 0 00002880 58 pop ax 0 00002881 2E884504 mov byte [init_data_segment:di+4], al 90 <1> ; restore next extension text 0 00002885 740C je .done ; yes, do not warn --> 0 00002887 AF scasw 0 00002888 AF scasw ; di += 4 0 00002889 84C0 test al, al ; was last ? 0 0000288B 75E7 jnz .loop 96 <1> .warn: 0 0000288D BA[3C0E] mov dx, imsg.extension_warning 98 <1> internaldatarelocation 0 00002890 E8EEF1 call init_putsz_cs 100 <1> 101 <1> .done: 0 00002893 07 pop es 0 00002894 5A pop dx 104 <1> 105 <1> 106 <1> init_find_path: 107 <1> %if ELD 108 <1> extcallcall InDOS 109 <1> jnz .done_j 110 <1> testopt [relocateddata], tt_while 111 <1> linkdatarelocation internalflags_with_tt_while, -3 112 <1> jnz .done_j 113 <1> %endif 0 00002895 2E833E[F80D]00 cmp word [init_data_segment: init_switch_p_low_pathsearch_high_guessextension], strict byte 0 116 <1> internaldatarelocation -3 0 0000289B 740E je .done_j 118 <1> 0 0000289D E30C jcxz .done_j ; if no filename given --> 120 <1> 121 <1> ; es:bx -> name, cx = length 0 0000289F BF[0000] mov di, relocated(while_buffer) 123 <1> linkdatarelocation while_buffer ; ss:while_buffer -> prefix, ss:di -> after end 124 <1> 0 000028A2 E80608 call init_check_filename 0 000028A5 736C jnc .found 127 <1> 0 000028A7 84F6 test dh, dh 0 000028A9 7403 jz @F 130 <1> .done_j: 0 000028AB E99800 jmp .done 132 <1> @@: 0 000028AE 2ED006[F80D] rol byte [init_data_segment:init_switch_p_pathsearch], 1 134 <1> internaldatarelocation 0 000028B3 73F6 jnc .done_j 136 <1> 137 <1> %if _DEVICE && _APPLICATION && ! ELD && ! INTERC3 0 000028B5 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 000028BA 7505 jnz .device 140 <1> %endif 141 <1> %if _APPLICATION || ELD || INTERC3 0 000028BC A12C00 mov ax, [2Ch] 143 <1> %if _DEVICE && ! ELD && ! INTERC3 0 000028BF EB03 jmp @F 145 <1> %endif 146 <1> %endif 147 <1> 148 <1> %if _DEVICE && ! ELD && ! INTERC3 149 <1> .device: 0 000028C1 E87BE3 call init_device_get_environment 151 <1> @@: 152 <1> %endif 153 <1> 0 000028C4 51 push cx 0 000028C5 BF[370E] mov di, imsg.varpath 156 <1> internaldatarelocation 0 000028C8 B90500 mov cx, imsg.varpath.length 0 000028CB E82308 call init_findvar 0 000028CE 7275 jc .done_pop 160 <1> 161 <1> .pathloop: 0 000028D0 56 push si 0 000028D1 B98000 mov cx, 128 ; put a limit 164 <1> @@: 0 000028D4 AC lodsb ; get next text 0 000028D5 3C3B cmp al, ';' ; separator ? 0 000028D7 7408 je @F ; yes --> 0 000028D9 3C00 cmp al, 0 ; separator ? 0 000028DB 7404 je @F ; yes --> 0 000028DD E2F5 loop @B ; loop up to limit 0 000028DF EB5D jmp .pathtoolong ; error --> 172 <1> @@: 0 000028E1 89F1 mov cx, si 0 000028E3 49 dec cx ; -> terminator 0 000028E4 5E pop si ; -> content text 0 000028E5 29F1 sub cx, si ; = length excluding terminator 0 000028E7 16 push ss 0 000028E8 07 pop es 0 000028E9 BF[0000] mov di, relocated(while_buffer) 180 <1> linkdatarelocation while_buffer ; es:di -> buffer 181 <1> 0 000028EC B000 mov al, 0 ; no backslash if empty 0 000028EE E30A jcxz @FFF ; skip loop if empty --> 184 <1> @@: 0 000028F0 AC lodsb ; load from variable 0 000028F1 3C2F cmp al, '/' ; forward slash ? 0 000028F3 7502 jne @F ; no --> 0 000028F5 B05C mov al, '\' ; replace by backslash 189 <1> @@: 0 000028F7 AA stosb ; store 0 000028F8 E2F6 loop @BB ; loop for cx = count 192 <1> @@: 0 000028FA 3C5C cmp al, '\' ; trailing backslash ? 0 000028FC 7403 je @F ; yes --> 0 000028FE B05C mov al, '\' 0 00002900 AA stosb ; append it 197 <1> @@: 0 00002901 59 pop cx 199 <1> 0 00002902 1E push ds 0 00002903 56 push si 202 <1> ; ss = es, es:bx -> name, cx = length 203 <1> ; ss:while_buffer -> prefix, ss:di -> after end 0 00002904 E8A407 call init_check_filename 0 00002907 5E pop si 0 00002908 1F pop ds ; ds:si -> terminator of path element 0 00002909 7308 jnc .found 208 <1> 0 0000290B AC lodsb ; get terminator 0 0000290C 3C3B cmp al, ';' ; semicolon ? 0 0000290E 7536 jne .done ; no --> 0 00002910 51 push cx 0 00002911 EBBD jmp .pathloop ; try next --> 214 <1> 215 <1> 216 <1> .found: 0 00002913 16 push ss 0 00002914 1F pop ds ; ds => PSP 0 00002915 5E pop si 0 00002916 01CE add si, cx ; ds:si -> behind original name 0 00002918 16 push ss 0 00002919 07 pop es 0 0000291A 4F dec di ; es:di -> NUL 224 <1> %if INTERC3 225 <1> mov al, 32 ; blank codepoint 226 <1> cmp byte [si], al ; <= 32 ? 227 <1> ja @F ; no, store a blank first --> 228 <1> %endif 0 0000291B EB07 jmp @FF ; skip store on first iteration 230 <1> 231 <1> @@: 0 0000291D 81FF[FEFF] cmp di, relocated(while_buffer.end) - 2 233 <1> linkdatarelocation while_buffer.end 0 00002921 7713 ja .toolong 0 00002923 AA stosb 236 <1> @@: 0 00002924 AC lodsb 0 00002925 3C00 cmp al, 0 0 00002927 7404 je @F 0 00002929 3C0D cmp al, 13 0 0000292B 75F0 jne @BB 242 <1> @@: ; (targeted from both directions) 0 0000292D B00D mov al, 13 0 0000292F AA stosb 0 00002930 BE[0000] mov si, relocated(while_buffer) 246 <1> linkdatarelocation while_buffer 0 00002933 56 push si ; offset for N/K command (kk) 0 00002934 EB10 jmp .done 249 <1> 250 <1> .toolong: 0 00002936 BA[750E] mov dx, imsg.kktoolong 252 <1> internaldatarelocation 0 00002939 E845F1 call init_putsz_cs 0 0000293C EBEF jmp @B 255 <1> 256 <1> .pathtoolong: 257 <1> %if ELD 258 <1> push ss 259 <1> pop ds 260 <1> %endif 0 0000293E BA[A20E] mov dx, imsg.pathtoolong 262 <1> internaldatarelocation 0 00002941 E83DF1 call init_putsz_cs 264 <1> 0 00002944 58 pop ax ; (discard si) 266 <1> .done_pop: 0 00002945 58 pop ax ; (discard cx) 268 <1> .done: 269 <1> %endif 270 <1> 271 <1> 272 <1> %if PART2 273 <1> ; Compare character with separators 274 <1> ; 275 <1> ; INP: al = character 276 <1> ; OUT: ZR if al is CR, NUL, blank, tab, comma, semicolon, or equal sign 277 <1> ; ZR if switch character is a slash and al is a slash 278 <1> ; NZ else 279 <1> ; REM: This is only used for parsing FCBs. 280 <1> init_ifsep: 281 <1> cmp al, 0 282 <1> je .return 283 <1> cmp al, 13 284 <1> je .return 285 <1> cmp al, ';' 286 <1> je .return 287 <1> cmp al, 32 288 <1> je .return 289 <1> cmp al, 9 290 <1> je .return 291 <1> cmp al, ',' 292 <1> je .return 293 <1> cmp al, '=' 294 <1> je .return 295 <1> cmp al, byte [ss:relocated(swch1)] 296 <1> linkdatarelocation swch1 297 <1> .return: 298 <1> retn 299 <1> 300 <1> 301 <1> %if _APPLICATION || _DEVICE 302 <1> ; INP: es:bx -> name to try, cx = length 303 <1> ; dl = zero if to attempt filename extensions 304 <1> ; ss:while_buffer -> prefix, ss:di -> after 305 <1> ; OUT: NC if file found, 306 <1> ; ss:while_buffer = name, ss:di -> after NUL 307 <1> ; CY if file not found 308 <1> ; ds = ss 309 <1> ; CHG: si, ax 310 <1> init_check_filename: 311 <1> push es 312 <1> push cx 313 <1> 314 <1> push es 315 <1> pop ds 316 <1> mov si, bx ; ds:si -> name 317 <1> push ss 318 <1> pop es ; es:di -> where to append name 319 <1> rep movsb ; append the name 320 <1> push di ; on stack: at initial terminator 321 <1> mov si, imsg.p_extensions 322 <1> internaldatarelocation 323 <1> ; cs:si -> extensions to try 324 <1> .loop: 325 <1> mov al, 0 326 <1> stosb ; zero-terminate name 327 <1> mov ax, 4300h ; get attributes 328 <1> push dx 329 <1> push ss 330 <1> pop ds 331 <1> mov dx, relocated(while_buffer) ; ds:dx -> pathname to try 332 <1> linkdatarelocation while_buffer 333 <1> stc 334 <1> %if ELD 335 <1> extcallcall _doscall 336 <1> %else 337 <1> int 21h ; try to get attributes 338 <1> %endif 339 <1> jc @F ; not found --> CY 340 <1> test cl, 10h ; directory ? 341 <1> jz @F ; no --> NC 342 <1> stc ; yes, handle as not found: CY 343 <1> @@: 344 <1> pop dx 345 <1> jnc .ret ; --> (NC) 346 <1> test dl, dl ; had an extension originally ? 347 <1> jnz .ret_CY ; yes, do not try to append one --> 348 <1> rol byte [init_data_segment:init_switch_p_guessextension], 1 349 <1> internaldatarelocation 350 <1> jnc .ret_CY ; if no guessing extension --> 351 <1> pop di 352 <1> push di 353 <1> cmp byte [init_data_segment:si], 0 354 <1> ; last attempt done ? 355 <1> je .ret_CY ; yes --> 356 <1> init_data_segment movsw ; ".C" 357 <1> init_data_segment movsw ; "OM" 358 <1> jmp .loop 359 <1> 360 <1> .ret_CY: 361 <1> stc ; CY 362 <1> .ret: 363 <1> pop ax ; (discard) 364 <1> pop cx 365 <1> pop es 366 <1> retn 367 <1> %endif 368 <1> 369 <1> 370 <1> ; INP: ax => environment, zero if none 371 <1> ; cs:di -> variable name, including '=' terminator 372 <1> ; cx = variable name length, including '=' terminator 373 <1> ; OUT: CY if not found 374 <1> ; NC if found, 375 <1> ; ds:si -> behind '=' of found variable 376 <1> ; CHG: ax, es, di, ds, si, cx 377 <1> init_findvar: 378 <1> test ax, ax 379 <1> jz .notvar 380 <1> mov ds, ax 381 <1> xor si, si 382 <1> 383 <1> @@: 384 <1> push init_data_segment 385 <1> pop es 386 <1> push cx 387 <1> push di 388 <1> push si 389 <1> repe cmpsb 390 <1> je .foundvar ; --> (NC) 391 <1> pop si 392 <1> pop di 393 <1> pop cx 394 <1> call init_nextvar 395 <1> jnz @B 396 <1> .notvar: 397 <1> stc 398 <1> retn 399 <1> 400 <1> .foundvar: 401 <1> pop ax 402 <1> pop ax 403 <1> pop ax 404 <1> retn 405 <1> 406 <1> 407 <1> init_nextvar: 408 <1> @@: 409 <1> lodsb 410 <1> test al, al 411 <1> jnz @B 412 <1> cmp byte [si], 0 413 <1> retn 414 <1> %endif 415 <1> 416 <1> 417 <1> %if PART3 418 <1> %if INTERC3 419 <1> %define _PROGNAME "" 420 <1> %endif 421 <1> align 2, db 0 422 <1> .no_warn_extensions: 423 <1> %ifn INTERC3 424 <1> db ".HEX",".ROM" 425 <1> %endif 426 <1> %if (($ - .no_warn_extensions) % 4) != 0 427 <1> %error Wrong extensions length 428 <1> %endif 429 <1> .p_extensions: db ".COM" 430 <1> db ".EXE" 431 <1> %ifn INTERC3 432 <1> db ".BIN" 433 <1> %endif 434 <1> asciz 435 <1> %if (($ - 1 - .p_extensions) % 4) != 0 436 <1> %error Wrong extensions length 437 <1> %endif 438 <1> .varpath: db "PATH=" 439 <1> .varpath.length equ $ - .varpath 440 <1> .extension_warning: 441 <1> %ifn ELD 442 <1> db _PROGNAME,": " 443 <1> %endif 444 <1> asciz "Warning, unknown filename extension specified!",13,10 445 <1> .kktoolong: 446 <1> %ifn ELD 447 <1> db _PROGNAME,": " 448 <1> %endif 449 <1> asciz "Error, too long command line tail!",13,10 450 <1> .pathtoolong: 451 <1> %ifn ELD 452 <1> db _PROGNAME,": " 453 <1> %endif 454 <1> asciz "Error, too long %PATH% variable element!",13,10 455 <1> %endif 6728 6729 %undef extcall 6730 %undef extcallcall 6731 %unimacro internalcoderelocation 0-*.nolist 6732 %unimacro internaldatarelocation 0-*.nolist 6733 %unimacro linkdatarelocation 0-*.nolist 6734 %undef relocated 6735 6736 6737 %if _APP_ENV_SIZE 6738 init_copy_app_env: 0 00002946 16 push ss 0 00002947 1F pop ds 6741 %if _DEVICE 0 00002948 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 0000294D 755F jnz .skip 6744 %endif 0 0000294F 2EC706[E80D]8000 mov word [cs:mem_envsize], paras(app_env_size) 0 00002956 8B16[0000] mov dx, word [envseg] ; => pseudo MCB 0 0000295A 42 inc dx ; => space for environment 0 0000295B A12C00 mov ax, word [2Ch] 0 0000295E 1E push ds 0 0000295F 85C0 test ax, ax 0 00002961 7446 jz @F 0 00002963 8ED8 mov ds, ax 0 00002965 8EC2 mov es, dx 0 00002967 31FF xor di, di 0 00002969 31F6 xor si, si 6756 .loop_env: 0 0000296B E8A207 call init_nextvar 0 0000296E 75FB jne .loop_env 0 00002970 46 inc si 0 00002971 AD lodsw 0 00002972 83F801 cmp ax, 1 0 00002975 7504 jne .notrail 0 00002977 E89607 call init_nextvar 0 0000297A A9 db __TEST_IMM16 6765 .notrail: 0 0000297B 4E dec si 0 0000297C 4E dec si 0 0000297D 81FEEE07 cmp si, app_env_size - 16 - 2 0 00002981 7610 jbe .copy_env 0 00002983 BA[000F] mov dx, imsg.app_env_too_large 0 00002986 E8F8F0 call init_putsz_cs 6772 .no_reloc: 0 00002989 2EC606[210E]FF mov byte [cs:app_env_allocation], 0FFh 0 0000298F 8CDA mov dx, ds 0 00002991 EB16 jmp @F 6776 6777 .copy_env: 0 00002993 2ED006[200E] rol byte [cs:init_switch_t_variable], 1 0 00002998 72EF jc .no_reloc 0 0000299A 89F1 mov cx, si 0 0000299C 31F6 xor si, si 0 0000299E F3A4 rep movsb 0 000029A0 31C0 xor ax, ax 0 000029A2 AB stosw 0 000029A3 1E push ds 0 000029A4 07 pop es 0 000029A5 B449 mov ah, 49h 0 000029A7 CD21 int 21h 6789 @@: 0 000029A9 1F pop ds 0 000029AA 89162C00 mov word [2Ch], dx 6792 6793 .skip: 6794 %endif 6795 6796 6797 init_relocate_init: 0 000029AE 16 push ss 0 000029AF 1F pop ds 0 000029B0 16 push ss 0 000029B1 07 pop es 6802 %if _AUXBUFFSIZE != _AUXBUFFMAXSIZE 0 000029B2 2EA1[F00D] mov ax, word [cs:init_auxbuff_want] 0 000029B6 83C00F add ax, 15 ; cannot carry, ax <= _AUXBUFFMAXSIZE 0 000029B9 24F0 and al, 0F0h 0 000029BB B104 mov cl, 4 0 000029BD 89C3 mov bx, ax 0 000029BF D3EB shr bx, cl 0 000029C1 BEFFFD mov si, - paras(_AUXBUFFSIZE) 0 000029C4 01DE add si, bx ; want size - init size = how much to add 0 000029C6 31D2 xor dx, dx ; always positive 6812 %else 6813 xor si, si ; = 0 6814 xor dx, dx 6815 %endif 6816 6817 %if _EXTENSIONS 0 000029C8 2EA1[F40D] mov ax, word [cs:init_extdata_want] 0 000029CC 83C00F add ax, 15 0 000029CF 24F0 and al, 0F0h 6821 0 000029D1 B104 mov cl, 4 0 000029D3 89C3 mov bx, ax 0 000029D5 D3EB shr bx, cl 0 000029D7 BF00FC mov di, - paras(_EXT_DATA_BOOT_SIZE) 0 000029DA 01DF add di, bx ; want size - init size = how much to add 6827 ; negative if to subtract 0 000029DC 19DB sbb bx, bx ; -1 if >= 0 to add 0 000029DE F7D3 not bx ; -1 if negative 0 000029E0 01FE add si, di 0 000029E2 11DA adc dx, bx ; add positive or negative dword 6832 6833 0 000029E4 2EA1[F20D] mov ax, word [cs:init_ext_want] 0 000029E8 83C00F add ax, 15 0 000029EB 24F0 and al, 0F0h 6837 0 000029ED B104 mov cl, 4 0 000029EF 89C3 mov bx, ax 0 000029F1 D3EB shr bx, cl 0 000029F3 BF00FE mov di, - paras(_EXT_CODE_INIT_SIZE) 0 000029F6 01DF add di, bx ; want size - init size = how much to add 6843 ; negative if to subtract 0 000029F8 19DB sbb bx, bx ; -1 if >= 0 to add 0 000029FA F7D3 not bx 0 000029FC 01FE add si, di 0 000029FE 11DA adc dx, bx ; add positive or negative dword 6848 %endif 6849 6850 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00002A00 2EA1[F60D] mov ax, word [cs:init_history_want] 0 00002A04 83C00F add ax, 15 0 00002A07 24F0 and al, 0F0h 6854 0 00002A09 B104 mov cl, 4 0 00002A0B 89C3 mov bx, ax 0 00002A0D D3EB shr bx, cl 0 00002A0F BF00FE mov di, - paras(historysegment_size) 0 00002A12 01DF add di, bx ; want size - init size = how much to add 6860 ; negative if to subtract 0 00002A14 19DB sbb bx, bx ; -1 if >= 0 to add 0 00002A16 F7D3 not bx ; -1 if negative 0 00002A18 01FE add si, di 0 00002A1A 11DA adc dx, bx ; add positive or negative dword 6865 %endif 6866 0 00002A1C 85D2 test dx, dx ; add paras is negative ? 0 00002A1E 7567 jnz .done ; yes --> 0 00002A20 85F6 test si, si 0 00002A22 7463 jz .done ; if to add == 0 --> 6871 6872 .reloc: 0 00002A24 2E0336[E60D] add si, word [cs:memsize] ; = new memsize 0 00002A29 7256 jc .error 0 00002A2B 8CD8 mov ax, ds 0 00002A2D 01C6 add si, ax ; => past want alloc 0 00002A2F 7250 jc .error 6878 %if _DEVICE 0 00002A31 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002A36 7403 jz @F 0 00002A38 46 inc si ; account for container paragraph 0 00002A39 7446 jz .error 6883 @@: 6884 %endif 0 00002A3B 8CCB mov bx, cs 0 00002A3D 39DE cmp si, bx ; below-or-equal cs ? 0 00002A3F 7646 jbe .done ; yes, no need to relocate --> 6888 6889 %ifn _LINK 6890 mov cx, init_size_p ; size of init 6891 %else 0 00002A41 B9[0000] mov cx, relocatedzero + 0 6893 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 6894 %endif 0 00002A44 01CB add bx, cx ; => minimum init reloc target 0 00002A46 39DE cmp si, bx 0 00002A48 7602 jbe .havetarget 0 00002A4A 89F3 mov bx, si ; => needed init reloc target 6899 6900 .havetarget: 0 00002A4C 89DA mov dx, bx ; dx => target 0 00002A4E 01CB add bx, cx ; bx => behind target 0 00002A50 722F jc .error 6904 %if _DEVICE 0 00002A52 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002A57 7409 jz @F 0 00002A59 2E3B1E[EE0D] cmp bx, word [cs:dev_memory_end]; enough space ? 0 00002A5E 7721 ja .error ; no --> 0 00002A60 EB14 jmp .movp 6910 6911 @@: 6912 %endif 0 00002A62 8CD8 mov ax, ds 0 00002A64 29C3 sub bx, ax ; = amount paragraphs needed 0 00002A66 2E891E[020E] mov word [cs:init_target_size], bx 0 00002A6B 2E891E[000E] mov word [cs:init_base_size], bx 0 00002A70 B44A mov ah, 4Ah 0 00002A72 CD21 int 21h ; resize memory block = es 0 00002A74 720B jc .error ; if error --> 6920 6921 .movp: 0 00002A76 8CC8 mov ax, cs 0 00002A78 E875EF call init_movp ; move init 0 00002A7B 52 push dx ; => relocated init 0 00002A7C E878D7 call init_retf ; ttansfer control 0 00002A7F EB06 jmp .done ; done 6927 6928 .error: 0 00002A81 BA[780F] mov dx, imsg.init_relocate_failure 0 00002A84 E9CFF6 jmp ..@init_cmdline_error 6931 6932 .done: 6933 6934 6935 init_change_auxbuff_size: 0 00002A87 16 push ss 0 00002A88 1F pop ds 0 00002A89 16 push ss 0 00002A8A 07 pop es 6940 %if _AUXBUFFSIZE != _AUXBUFFMAXSIZE 0 00002A8B 2EA1[F00D] mov ax, word [cs:init_auxbuff_want] 0 00002A8F 83C00F add ax, 15 ; cannot carry, ax <= _AUXBUFFMAXSIZE 0 00002A92 24F0 and al, 0F0h 6944 0 00002A94 89C7 mov di, ax 0 00002A96 83EF18 sub di, 8 * 3 0 00002A99 A3[0000] mov word [auxbuff_current_size], ax 0 00002A9C 893E[0000] mov word [auxbuff_current_size_minus_24], di 6949 0 00002AA0 B104 mov cl, 4 0 00002AA2 89C3 mov bx, ax 0 00002AA4 D3EB shr bx, cl 0 00002AA6 BEFFFD mov si, - paras(_AUXBUFFSIZE) 0 00002AA9 01DE add si, bx 0 00002AAB 740E jz @F ; if to keep minimum size 6956 6957 ; INP: ax = wanted size (rounded to paragraph boundary) 6958 ; bx = wanted size paragraphs 6959 ; si = bx - paragraphs of minimum size = how much to enlarge 6960 ; ip -> function depending on layout 6961 ; STT: ss = ds = es 6962 ; OUT: NC if success 6963 ; CY if error, branch to command line error 0 00002AAD 2EFF16[EC0D] call near [cs:init_layout] 0 00002AB2 16 push ss 0 00002AB3 1F pop ds 0 00002AB4 16 push ss 0 00002AB5 07 pop es 0 00002AB6 7303E9E4FC jc ..@init_cmdline_switch_a_error 6970 @@: 6971 %endif 6972 6973 6974 %if _EXTENSIONS 6975 init_change_extdata_size_and_init: 0 00002ABB 2EA1[F40D] mov ax, word [cs:init_extdata_want] 0 00002ABF 83C00F add ax, 15 0 00002AC2 24F0 and al, 0F0h 0 00002AC4 A3[0000] mov word [extdata_size], ax 6980 0 00002AC7 89C1 mov cx, ax 0 00002AC9 81E90040 sub cx, fromparas(paras(_EXT_DATA_BOOT_SIZE)) 0 00002ACD 010E[0000] add word [entryseg_size], cx 6984 0 00002AD1 B104 mov cl, 4 0 00002AD3 89C3 mov bx, ax 0 00002AD5 D3EB shr bx, cl 0 00002AD7 BE0004 mov si, paras(_EXT_DATA_BOOT_SIZE) 0 00002ADA 29DE sub si, bx ; init size - want 6990 ; negative if larger want than init 0 00002ADC 747D jz .keep ; if to keep init size 0 00002ADE 19FF sbb di, di ; -1 if negative 0 00002AE0 F7D7 not di ; -1 if positive (smaller want than init) 0 00002AE2 2E893E[FC0D] mov word [cs:relocate_down], di ; relocating down if smaller want 6995 0 00002AE7 2E8B0E[E60D] mov cx, word [cs:memsize] ; how many paragraphs do we have 6997 %if _DEVICE 0 00002AEC F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002AF1 7401 jz @F 0 00002AF3 41 inc cx ; account for container paragraph 7001 @@: 7002 %endif 0 00002AF4 2E2936[E60D] sub word [cs:memsize], si 7004 0 00002AF9 8CD8 mov ax, ds 7006 %ifn _LINK 7007 add ax, paras(100h + DATAENTRYTABLESIZE + datastack_size) 7008 mov dx, ax 7009 sub dx, si 7010 sub cx, paras(100h + DATAENTRYTABLESIZE + datastack_size) 7011 %else 0 00002AFB 05[0000] add ax, strict word relocatedzero + 0 7013 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_end_of_datastack, equ $ - 2 0 00002AFE 89C2 mov dx, ax 0 00002B00 29F2 sub dx, si 0 00002B02 81E9[0000] sub cx, strict word relocatedzero + 0 7017 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_end_of_datastack, equ $ - 2 7018 %endif 0 00002B06 E8E7EE call init_movp 7020 7021 %if _DEVICE 0 00002B09 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002B0E 7416 jz @F 7024 0 00002B10 2936[0000] sub word [device_mcb_paragraphs], si 7026 ; fix our variable 0 00002B14 2936[0000] sub word [alloc_size], si ; this one too 0 00002B18 8E06[0000] mov es, word [reg_es] 0 00002B1C 8B1E[0000] mov bx, word [reg_ebx] ; -> device request header 0 00002B20 26297710 sub word [es:bx + 0Eh + 2], si ; -> behind memory in use 0 00002B24 16 push ss 0 00002B25 07 pop es 7033 %endif 7034 @@: 7035 0 00002B26 F7DE neg si 7037 7038 %if _HISTORY_SEPARATE_FIXED && _HISTORY 7039 .relocate_history: 0 00002B28 0136[0000] add word [history.segorsel + soaSegSel], si 7041 %if _PM 7042 add word [history.segorsel + soaSegment], si 7043 %endif 7044 %endif 7045 7046 %if _APP_ENV_SIZE || _DEV_ENV_SIZE 7047 .relocate_env: 0 00002B2C 2ED006[210E] rol byte [cs:app_env_allocation], 1 0 00002B31 7204 jc @F 0 00002B33 01362C00 add word [2Ch], si 7051 @@: 0 00002B37 833E[0000]00 cmp word [envseg], 0 0 00002B3C 7404 je @F 0 00002B3E 0136[0000] add word [envseg], si 7055 @@: 7056 %endif 7057 7058 %if _EXTENSIONS 7059 .relocate_ext: 0 00002B42 0136[0000] add word [extseg], si 7061 %endif 7062 7063 .relocate_code: 0 00002B46 A1[0000] mov ax, word [code_seg] 0 00002B49 89C2 mov dx, ax 0 00002B4B 01F2 add dx, si 7067 0 00002B4D 8EC2 mov es, dx 0 00002B4F 0136[0000] add word [code_seg], si 7070 %if _DUALCODE 7071 add word [code2_seg], si 7072 mov dx, word [code2_seg] 7073 push si 7074 %if ! _PM 7075 mov si, relocate_from_code 7076 mov di, relocate_from_code.end 7077 call .relocate_code_patch 7078 mov si, relocate_from_code2 7079 mov di, relocate_from_code2.end 7080 %endif 7081 push es 7082 mov es, dx 7083 pop dx 7084 %if ! _PM 7085 call .relocate_code_patch 7086 jmp .relocate_code_done 7087 7088 .relocate_code_loop: 7089 cs lodsw 7090 xchg bx, ax 7091 mov word [es:bx], dx 7092 .relocate_code_patch: 7093 cmp si, di 7094 jb .relocate_code_loop 7095 retn 7096 7097 .relocate_code_done: 7098 %endif 7099 pop si 7100 %endif 7101 7102 %if _AREAS && _AREAS_HOOK_CLIENT 7103 mov ax, si 7104 mov dx, word [cs:relocate_down] 7105 call add_to_areas_linear_code1.dxax 7106 %if _DUALCODE && _EXPRDUALCODE 7107 mov ax, si 7108 mov dx, word [cs:relocate_down] 7109 call add_to_areas_linear_code2.dxax 7110 %endif 7111 %endif 7112 7113 7114 .relocate_auxbuff: 0 00002B53 0136[0000] add word [auxbuff_segorsel + soaSegSel], si 7116 %if _PM 7117 add word [auxbuff_segorsel + soaSegment], si 7118 ; initialise auxbuff references 7119 %endif 7120 %if _IMMASM && _IMMASM_AUXBUFF 7121 add word [immseg], si 7122 %endif 7123 7124 7125 %if _MESSAGESEGMENT 7126 .relocate_messagesegment: 0 00002B57 0136[0000] add word [messageseg], si 7128 %if _HELP_COMPRESSED && ! _PM 7129 add word [hshrink_memory_source.segment], si 7130 %endif 7131 %endif 7132 7133 .keep: 0 00002B5B 8B0E[0000] mov cx, word [extdata_size] 0 00002B5F 16 push ss 0 00002B60 07 pop es 0 00002B61 BF[0000] mov di, ext_data_area 0 00002B64 B000 mov al, 0 0 00002B66 F3AA rep stosb ; init ext data area 7140 %endif 7141 7142 7143 %if _EXTENSIONS 7144 init_change_ext_size: 0 00002B68 2EA1[F20D] mov ax, word [cs:init_ext_want] 0 00002B6C 83C00F add ax, 15 0 00002B6F 24F0 and al, 0F0h 0 00002B71 A3[0000] mov word [extseg_size], ax 7149 0 00002B74 B104 mov cl, 4 0 00002B76 89C3 mov bx, ax 0 00002B78 D3EB shr bx, cl 0 00002B7A BE0002 mov si, paras(_EXT_CODE_INIT_SIZE) 0 00002B7D 29DE sub si, bx ; init size - want 7155 ; negative if larger want than init 0 00002B7F 7441 jz @F ; if to keep init size 7157 0 00002B81 2E2936[E60D] sub word [cs:memsize], si 7159 0 00002B86 85F6 test si, si 0 00002B88 7911 jns .smaller 0 00002B8A BF0020 mov di, _EXT_CODE_INIT_SIZE 0 00002B8D 8E06[0000] mov es, word [extseg] 0 00002B91 8B0E[0000] mov cx, word [extseg_size] 0 00002B95 29F9 sub cx, di 0 00002B97 B000 mov al, 0 0 00002B99 F3AA rep stosb ; init trailer 7168 .smaller: 7169 7170 %if _DEVICE 0 00002B9B F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002BA0 7420 jz @F 7173 0 00002BA2 2936[0000] sub word [device_mcb_paragraphs], si 7175 ; fix our variable 0 00002BA6 2936[0000] sub word [alloc_size], si ; this one too 0 00002BAA 8CD8 mov ax, ds ; => PSP 0 00002BAC 2E0306[E60D] add ax, word [cs:memsize] ; => where to place container sig 0 00002BB1 E863DF call init_dev_place_container_signature 7180 ; CHG: es, di, cx, si 7181 ; ax => behind memory used for device 0 00002BB4 8E06[0000] mov es, word [reg_es] 0 00002BB8 8B1E[0000] mov bx, word [reg_ebx] ; -> device request header 0 00002BBC 26894710 mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 0 00002BC0 16 push ss 0 00002BC1 07 pop es 7187 %endif 7188 @@: 7189 %endif 7190 7191 7192 %if _HISTORY_SEPARATE_FIXED && _HISTORY 7193 init_change_history_size: 0 00002BC2 2EA1[F60D] mov ax, word [cs:init_history_want] 0 00002BC6 83C00F add ax, 15 0 00002BC9 24F0 and al, 0F0h 0 00002BCB A3[0000] mov word [historyseg_size], ax 0 00002BCE 89C3 mov bx, ax 7199 0 00002BD0 48 dec ax 0 00002BD1 48 dec ax 0 00002BD2 A3[0000] mov word [history.first], ax 0 00002BD5 A3[0000] mov word [history.last], ax 7204 0 00002BD8 B104 mov cl, 4 0 00002BDA D3EB shr bx, cl 0 00002BDC BE0002 mov si, paras(historysegment_size) 0 00002BDF 29DE sub si, bx ; init size - want 7209 ; negative if larger want than init 0 00002BE1 7467 jz .keep ; if to keep init size 0 00002BE3 19FF sbb di, di ; -1 if negative 0 00002BE5 F7D7 not di ; -1 if positive (smaller want than init) 0 00002BE7 2E893E[FC0D] mov word [cs:relocate_down], di ; relocating down if smaller want 7214 0 00002BEC 2E8B0E[E60D] mov cx, word [cs:memsize] ; how many paragraphs do we have 7216 %if _DEVICE 0 00002BF1 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002BF6 7401 jz @F 0 00002BF8 41 inc cx ; account for container paragraph 7220 @@: 7221 %endif 0 00002BF9 2E2936[E60D] sub word [cs:memsize], si 7223 0 00002BFE 8CD8 mov ax, ds 0 00002C00 01C1 add cx, ax 0 00002C02 A1[0000] mov ax, word [history.segorsel + soaSegSel] 0 00002C05 89C2 mov dx, ax 0 00002C07 050002 add ax, paras(historysegment_size) 7229 ; => source 0 00002C0A 01DA add dx, bx ; => destination 0 00002C0C 29C1 sub cx, ax 0 00002C0E E8DFED call init_movp 7233 7234 %if _DEVICE 0 00002C11 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002C16 7416 jz @F 7237 0 00002C18 2936[0000] sub word [device_mcb_paragraphs], si 7239 ; fix our variable 0 00002C1C 2936[0000] sub word [alloc_size], si ; this one too 0 00002C20 8E06[0000] mov es, word [reg_es] 0 00002C24 8B1E[0000] mov bx, word [reg_ebx] ; -> device request header 0 00002C28 26297710 sub word [es:bx + 0Eh + 2], si ; -> behind memory in use 0 00002C2C 16 push ss 0 00002C2D 07 pop es 7246 %endif 7247 @@: 7248 0 00002C2E F7DE neg si 7250 7251 %if _APP_ENV_SIZE || _DEV_ENV_SIZE 7252 .relocate_env: 0 00002C30 2ED006[210E] rol byte [cs:app_env_allocation], 1 0 00002C35 7204 jc @F 0 00002C37 01362C00 add word [2Ch], si 7256 @@: 0 00002C3B 833E[0000]00 cmp word [envseg], 0 0 00002C40 7404 je @F 0 00002C42 0136[0000] add word [envseg], si 7260 @@: 7261 %endif 7262 7263 %if _EXTENSIONS 7264 .relocate_ext: 0 00002C46 0136[0000] add word [extseg], si 7266 %endif 7267 7268 .keep: 0 00002C4A 8B0E[0000] mov cx, word [historyseg_size] 0 00002C4E 8E06[0000] mov es, word [history.segorsel + soaSegSel] 0 00002C52 31FF xor di, di 0 00002C54 B000 mov al, 0 0 00002C56 F3AA rep stosb ; init history buffer 7274 %endif 7275 7276 7277 init_relocate: 0 00002C58 2ED006[1D0E] rol byte [cs:init_switch_t], 1 0 00002C5D 7203E9C501 jnc .done_outer 7280 %if _DEVICE 0 00002C62 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002C67 7403E9B501 jnz .error_outer 7283 %endif 7284 0 00002C6C 2ED006[1F0E] rol byte [cs:init_switch_t_break], 1 0 00002C71 7301 jnc @F 0 00002C73 CC int3 7288 @@: 7289 0 00002C74 B80258 mov ax, 5802h ; Get UMB link state 0 00002C77 CD21 int 21h 0 00002C79 30E4 xor ah, ah 0 00002C7B 50 push ax ; Save UMB link state 0 00002C7C B80058 mov ax, 5800h ; Get allocation strategy 0 00002C7F CD21 int 21h 0 00002C81 50 push ax ; Save allocation strategy 7297 0 00002C82 31FF xor di, di ; first set 7299 .retry_alloc: 0 00002C84 B80358 mov ax, 5803h ; Set UMB link state: 0 00002C87 2E8B9D[040E] mov bx, [cs:init_switch_t_umblink + di] 0 00002C8C 83FBFF cmp bx, -1 ; not set ? 0 00002C8F 7503E96901 je .error_no_alloc_retry ; then error out --> 0 00002C94 CD21 int 21h 0 00002C96 B80158 mov ax, 5801h ; Set allocation strategy: 0 00002C99 2E8B9D[0A0E] mov bx, [cs:init_switch_t_strategy + di] 0 00002C9E CD21 int 21h 7308 7309 ; allocate new memory block for process 0 00002CA0 2E8B1E[E60D] mov bx, word [cs:memsize] 0 00002CA5 B448 mov ah, 48h 0 00002CA7 CD21 int 21h 0 00002CA9 7303E94F01 jc .error_no_alloc_retry 7314 0 00002CAE 92 xchg dx, ax ; dx => new process block 7316 7317 ; allocate new memory block for environment 7318 %if _APP_ENV_SIZE 0 00002CAF 2ED006[210E] rol byte [cs:app_env_allocation], 1 0 00002CB4 732D jnc @F 7321 %endif 0 00002CB6 A12C00 mov ax, word [2Ch] 0 00002CB9 85C0 test ax, ax ; zero ? 0 00002CBB 7426 jz .allocated ; yes, nothing to relocate --> 0 00002CBD 48 dec ax 0 00002CBE 8EC0 mov es, ax ; es => MCB 0 00002CC0 268B1E0300 mov bx, word [es:3] ; = MCB size 0 00002CC5 B448 mov ah, 48h 0 00002CC7 CD21 int 21h ; allocate 0 00002CC9 7303E92901 jc .error_no_alloc_retry_free_dx 7331 7332 ; relocate environment 0 00002CCE 52 push dx 0 00002CCF 92 xchg dx, ax ; dx => target 0 00002CD0 A12C00 mov ax, word [2Ch] ; ax => source 0 00002CD3 89D9 mov cx, bx ; cx = amount paragraphs 0 00002CD5 E818ED call init_movp 0 00002CD8 89162C00 mov word [2Ch], dx ; relocate environment 0 00002CDC 5A pop dx ; => process memory block target 0 00002CDD 8EC0 mov es, ax 0 00002CDF B449 mov ah, 49h 0 00002CE1 CD21 int 21h ; explicitly free old environment 7343 ; (not needed depending on method) 7344 @@: 7345 7346 .allocated: ; dx => new process block 0 00002CE3 8CD0 mov ax, ss ; => source process block 0 00002CE5 2E8B0E[E60D] mov cx, word [cs:memsize] ; cx = amount paragraphs 0 00002CEA 2E890E[020E] mov word [cs:init_target_size], cx 0 00002CEF E8FEEC call init_movp 7351 0 00002CF2 2EA3[FA0D] mov word [cs:relocate_source], ax 0 00002CF6 48 dec ax 0 00002CF7 1E push ds 0 00002CF8 8ED8 mov ds, ax ; ds => original block MCB 0 00002CFA 89160100 mov word [1], dx ; set original block owner to new 7357 0 00002CFE 89D0 mov ax, dx 0 00002D00 48 dec ax 0 00002D01 8EC0 mov es, ax ; es => new block MCB 0 00002D03 2689160100 mov word [es:1], dx ; set new block owner to new 7362 0 00002D08 BF0800 mov di, 8 ; es:di-> MCB name field 0 00002D0B 89FE mov si, di 0 00002D0D A5 movsw 0 00002D0E A5 movsw 0 00002D0F A5 movsw 0 00002D10 A5 movsw ; Force MCB string 0 00002D11 1F pop ds ; restore => old block 7370 0 00002D12 A12C00 mov ax, word [2Ch] ; => environment, or zero 0 00002D15 85C0 test ax, ax 0 00002D17 7408 jz @F 0 00002D19 48 dec ax 0 00002D1A 8EC0 mov es, ax ; => environment MCB 0 00002D1C 2689160100 mov word [es:1], dx ; set environment block owner to new 7377 @@: 7378 0 00002D21 8CD0 mov ax, ss ; ax => old PSP 0 00002D23 8ED2 mov ss, dx ; relocate stack 0 00002D25 90 nop 7382 ; ds still => old PSP 0 00002D26 92 xchg ax, dx ; ax => new PSP, dx => old PSP 7384 7385 ; code from ecm TSR 0 00002D27 8EC0 mov es, ax ; es = new PSP 0 00002D29 BF1800 mov di, 18h 0 00002D2C B91400 mov cx, 20 0 00002D2F 26A33600 mov word [ es:34h+2 ], ax 0 00002D33 26893E3400 mov word [ es:34h ], di ; fix the new PSP's PHT pointer 0 00002D38 26890E3200 mov word [ es:32h ], cx ; and the count of PHT entries field 0 00002D3D 50 push ax 0 00002D3E B0FF mov al, -1 0 00002D40 57 push di 0 00002D41 89CB mov bx, cx ; = 20 0 00002D43 F3AA rep stosb ; initialise new PHT with empty entries 0 00002D45 5F pop di 0 00002D46 8B0E3200 mov cx, word [ 32h ] ; cx = count of PHT entries 0 00002D4A 39D9 cmp cx, bx ; >= 20 ? 0 00002D4C 7202 jb .shortertable ; no --> 0 00002D4E 89D9 mov cx, bx ; limit to 20 7402 .shortertable: 0 00002D50 C5363400 lds si, [ 34h ] ; ds:si-> old PHT 0 00002D54 56 push si 0 00002D55 51 push cx 0 00002D56 F3A4 rep movsb ; get all entries 0 00002D58 59 pop cx 0 00002D59 5F pop di 0 00002D5A 1E push ds 0 00002D5B 07 pop es ; es:di-> old PHT 0 00002D5C F3AA rep stosb ; fill moved entries with -1 (closed) 0 00002D5E 58 pop ax 0 00002D5F 8EDA mov ds, dx ; ds = old PSP 0 00002D61 C7060A00[962D] mov word [ 0Ah ], .terminated 0 00002D67 8C0E0C00 mov word [ 0Ah+2 ], cs ; Parent Return Address -> us 7416 %if 0 ; (not used) 7417 mov word [ 0Eh ], i23 7418 mov word [ 0Eh+2 ], ax 7419 mov word [ 12h ], i24 7420 mov word [ 12h+2 ], ax ; set interrupt vectors to ours 7421 %endif 0 00002D6B A31600 mov word [ 16h ], ax ; set parent PSP to the relocated one 0 00002D6E 36A33000 mov word [ ss:2Eh+2 ], ax 7424 ; set SS used by process termination 7425 0 00002D72 93 xchg ax, bx ; bx = new location, dx = old location 0 00002D73 B85D33 mov ax, 335Dh 0 00002D76 CD21 int 21h ; PSP relocated call-out 7429 7430 ; In order to set the correct stack address here, 7431 ; the last Int21 call to a usual function (such as 7432 ; Int21.48, .49) must've been made with the same stack 7433 ; pointer as the Int21.4C call below gets. 7434 ; 7435 ; Update: dosemu2 does weird things to the stack. 7436 ; In particular, it inserts an additional iret 7437 ; frame depending on some conditions. 7438 ; Only the interrupt 21h subfunctions 00h, 26h, 7439 ; 31h, 4Bh, and 4Ch are handled differently. 7440 ; As a workaround we can call service 4Bh as the 7441 ; last interrupt 21h function before terminating. 7442 ; Refer to https://github.com/dosemu2/dosemu2/blob/d7402eec84478c051d25e7b26dd8515514c186e2/src/base/core/int.c#L1633-L1639 7443 7444 ; rol byte [j_flags.invalidexec], 1 7445 ; jnc @F 7446 0 00002D78 0E push cs 0 00002D79 1F pop ds 0 00002D7A BA[902D] mov dx, .nullbyte ; just in case, ds:dx -> zero value byte 0 00002D7D B87F4B mov ax, 4B7Fh ; 21.4B with invalid subfunction in al 7451 ; (note that FreeDOS masks off 80h) 0 00002D80 CD21 int 21h 7453 @@: 7454 0 00002D82 2E8E06[FA0D] mov es, word [cs:relocate_source] 0 00002D87 26FF362E00 push word [ es:2Eh ] 0 00002D8C 368F062E00 pop word [ ss:2Eh ] ; set SP used by process termination 7458 .nullbyte: equ $ - 1 7459 0 00002D91 B8004C mov ax, 4C00h 0 00002D94 CD21 int 21h ; terminate, and make the new PSP active 7462 ; also handles freeing all memory allocated to the old PSP 7463 ; also closes any handles >20 if PHT larger 7464 ; (not used) also relocates Int23, Int24 7465 ; also notifies resident software old PSP is no longer valid 7466 .terminated: ; (ax, bx, es might be changed) 0 00002D96 16 push ss 0 00002D97 1F pop ds 0 00002D98 16 push ss 0 00002D99 07 pop es 7471 ; end code from ecm TSR 7472 7473 7474 .relocate: 0 00002D9A 2E8326[FC0D]00 and word [cs:relocate_down], 0 ; = 0 0 00002DA0 8CD6 mov si, ss 0 00002DA2 2E2B36[FA0D] sub si, word [cs:relocate_source] 0 00002DA7 7305 jnc @F 0 00002DA9 2EF716[FC0D] not word [cs:relocate_down] ; = 0FFFFh 7480 @@: 7481 ; target - source = delta 7482 ; delta + source = target 7483 ; because target - source + source = target 7484 7485 %if _HISTORY_SEPARATE_FIXED && _HISTORY 7486 .relocate_history: 0 00002DAE 0136[0000] add word [history.segorsel + soaSegSel], si 7488 %if _PM 7489 add word [history.segorsel + soaSegment], si 7490 %endif 7491 %endif 7492 7493 %if _APP_ENV_SIZE 7494 .relocate_env: 0 00002DB2 2ED006[210E] rol byte [cs:app_env_allocation], 1 0 00002DB7 7204 jc @F 0 00002DB9 01362C00 add word [2Ch], si 7498 @@: 0 00002DBD 833E[0000]00 cmp word [envseg], 0 0 00002DC2 7404 je @F 0 00002DC4 0136[0000] add word [envseg], si 7502 @@: 7503 %endif 7504 7505 %if _EXTENSIONS 7506 .relocate_ext: 0 00002DC8 0136[0000] add word [extseg], si 7508 %endif 7509 7510 .relocate_code: 0 00002DCC A1[0000] mov ax, word [code_seg] 0 00002DCF 89C2 mov dx, ax 0 00002DD1 01F2 add dx, si 7514 0 00002DD3 8EC2 mov es, dx 0 00002DD5 0136[0000] add word [code_seg], si 7517 %if _DUALCODE 7518 add word [code2_seg], si 7519 mov dx, word [code2_seg] 7520 push si 7521 %if ! _PM 7522 mov si, relocate_from_code 7523 mov di, relocate_from_code.end 7524 call .relocate_code_patch 7525 mov si, relocate_from_code2 7526 mov di, relocate_from_code2.end 7527 %endif 7528 push es 7529 mov es, dx 7530 pop dx 7531 %if ! _PM 7532 call .relocate_code_patch 7533 jmp .relocate_code_done 7534 7535 .relocate_code_loop: 7536 cs lodsw 7537 xchg bx, ax 7538 mov word [es:bx], dx 7539 .relocate_code_patch: 7540 cmp si, di 7541 jb .relocate_code_loop 7542 retn 7543 7544 .relocate_code_done: 7545 %endif 7546 pop si 7547 %endif 7548 7549 %if _AREAS && _AREAS_HOOK_CLIENT 7550 mov ax, si 7551 mov dx, word [cs:relocate_down] 7552 call add_to_areas_linear_code1.dxax 7553 %if _DUALCODE && _EXPRDUALCODE 7554 mov ax, si 7555 mov dx, word [cs:relocate_down] 7556 call add_to_areas_linear_code2.dxax 7557 %endif 7558 %endif 7559 7560 7561 .relocate_auxbuff: 0 00002DD9 0136[0000] add word [auxbuff_segorsel + soaSegSel], si 7563 %if _PM 7564 add word [auxbuff_segorsel + soaSegment], si 7565 ; initialise auxbuff references 7566 %endif 7567 %if _IMMASM && _IMMASM_AUXBUFF 7568 add word [immseg], si 7569 %endif 7570 7571 7572 %if _MESSAGESEGMENT 7573 .relocate_messagesegment: 0 00002DDD 0136[0000] add word [messageseg], si 7575 %if _HELP_COMPRESSED && ! _PM 7576 add word [hshrink_memory_source.segment], si 7577 %endif 7578 %endif 7579 7580 7581 .relocate_old_initcode_variables: 0 00002DE1 8CD8 mov ax, ds 0 00002DE3 A3[0200] mov word [execblk.cmdline + 2], ax 0 00002DE6 A3[0200] mov word [execblk.fcb1 + 2], ax 0 00002DE9 A3[0200] mov word [execblk.fcb2 + 2], ax ; set up parameter block for exec command 0 00002DEC A3[0000] mov word [pspdbg], ax 7587 7588 %if _IMMASM && !_IMMASM_AUXBUFF 7589 %ifn _LINK 7590 add ax, (immasm_buffer + DATASECTIONFIXUP) >> 4 7591 %else 0 00002DEF 05[0000] add ax, strict word immasm_buffer 7593 wlcalc word_shr_4, equ $ - 2 7594 %endif 0 00002DF2 A3[0000] mov word [immseg], ax 7596 %endif 7597 7598 7599 %if _AREAS_HOOK_SERVER 7600 .relocate_areas: 7601 mov ax, ds 7602 mov word [ddebugareas.next + 2], ax 7603 mov word [ddebugareas.prev + 2], ax 7604 mov word [..@patch_entry_seg], ax 7605 %endif 7606 7607 7608 .relocate_done: 0 00002DF5 EB16 jmp .done 7610 7611 7612 ; environment could not be allocated 7613 .error_no_alloc_retry_free_dx: 0 00002DF7 8EC2 mov es, dx 0 00002DF9 B449 mov ah, 49h 0 00002DFB CD21 int 21h ; free allocated block 7617 7618 ; some memory could not be allocated 7619 .error_no_alloc_retry: 0 00002DFD AF scasw ; di += 2 0 00002DFE 83FF06 cmp di, 6 0 00002E01 7303E97EFE jb .retry_alloc 7623 7624 .error_no_retry: 0 00002E06 2ED006[1E0E] rol byte [cs:init_switch_t_ignore], 1 0 00002E0B 7301 jnc .error 7627 7628 .done: 0 00002E0D A8 db __TEST_IMM8 ; (skip stc, NC) 7630 .error: 0 00002E0E F9 stc ; CY 7632 .status: 0 00002E0F 19D2 sbb dx, dx ; 0 = NC, -1 = CY 0 00002E11 5B pop bx ; saved allocation strategy 0 00002E12 B80158 mov ax, 5801h 0 00002E15 CD21 int 21h ; Set allocation strategy 0 00002E17 5B pop bx ; saved UMB link state 0 00002E18 B80358 mov ax, 5803h 0 00002E1B CD21 int 21h ; Set UMB link state 0 00002E1D 85D2 test dx, dx 0 00002E1F 7406 jz .done_outer 7642 .error_outer: 0 00002E21 BA[5B0F] mov dx, imsg.relocate_failure 0 00002E24 E92FF3 jmp ..@init_cmdline_error 7645 7646 .done_outer: 7647 7648 7649 %if _EXECUTABLE 7650 init_executable: 0 00002E27 16 push ss 0 00002E28 1F pop ds 0 00002E29 16 push ss 0 00002E2A 07 pop es 0 00002E2B F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002E30 7539 jnz .device 7657 7658 .application: 0 00002E32 8B162C00 mov dx, word [2Ch] 0 00002E36 85D2 test dx, dx 0 00002E38 746B jz .unable 0 00002E3A 8EC2 mov es, dx 0 00002E3C B90080 mov cx, 8000h 0 00002E3F 31F6 xor si, si 7665 @@: 0 00002E41 E81900 call .nextvar 0 00002E44 725F jc .unable 0 00002E46 75F9 jne @B 0 00002E48 46 inc si 0 00002E49 26AD es lodsw 0 00002E4B 83F801 cmp ax, 1 0 00002E4E 7555 jne .unable 7673 0 00002E50 06 push es 0 00002E51 1F pop ds ; => env 0 00002E52 16 push ss 0 00002E53 07 pop es ; => data entry 0 00002E54 BF[0000] mov di, init_executable_pathname 0 00002E57 B460 mov ah, 60h 0 00002E59 CD21 int 21h 0 00002E5B EB48 jmp .done 7682 7683 .nextvar: 7684 @@: 0 00002E5D 26AC es lodsb 0 00002E5F 84C0 test al, al 0 00002E61 E0FA loopnz @B 0 00002E63 F9 stc 0 00002E64 7504 jnz @F 0 00002E66 26803C00 cmp byte [es:si], 0 7691 @@: 0 00002E6A C3 retn 7693 7694 7695 .device: 0 00002E6B 8B36[0000] mov si, word [reg_ebx] 0 00002E6F 8E1E[0000] mov ds, word [reg_es] 0 00002E73 C57412 lds si, [si + 12h] 7699 0 00002E76 89F7 mov di, si 7701 @@: 0 00002E78 AC lodsb 0 00002E79 3C20 cmp al, 32 0 00002E7B 7412 je @F 0 00002E7D 3C09 cmp al, 9 0 00002E7F 740E je @F 0 00002E81 3C00 cmp al, 0 0 00002E83 740A je @F 0 00002E85 3C0D cmp al, 13 0 00002E87 7406 je @F 0 00002E89 3C0A cmp al, 10 0 00002E8B 7402 je @F 0 00002E8D EBE9 jmp @B 7714 7715 @@: 0 00002E8F FF74FF push word [si - 1] 0 00002E92 56 push si 0 00002E93 C644FF00 mov byte [si - 1], 0 0 00002E97 89FE mov si, di 0 00002E99 BF[0000] mov di, init_executable_pathname 0 00002E9C B460 mov ah, 60h 0 00002E9E CD21 int 21h 0 00002EA0 5E pop si 0 00002EA1 58 pop ax 0 00002EA2 8844FF mov byte [si - 1], al 7726 7727 .done: 7728 .unable: 0 00002EA5 16 push ss 0 00002EA6 1F pop ds 0 00002EA7 16 push ss 0 00002EA8 07 pop es 7733 0 00002EA9 BF[0000] mov di, init_executable_pathname 0 00002EAC 31C0 xor ax, ax 0 00002EAE B98000 mov cx, 128 0 00002EB1 F2AE repne scasb 0 00002EB3 4F dec di 0 00002EB4 893E[0000] mov word [init_executable_pathname.end], di 7740 %endif 7741 7742 7743 init_hook_interrupts: 7744 %if CATCHINTAMOUNT 7745 ; Set up interrupt vectors. 7746 %if _CATCHINT06 && _DETECT95LX 0 00002EB8 8B0E[0000] mov cx, word [inttab_number_variable] 7748 %else 7749 mov cx, inttab_number 7750 %endif 0 00002EBC E319 jcxz .intend 0 00002EBE BE[0000] mov si, inttab 7753 .intloop: 0 00002EC1 AC lodsb 0 00002EC2 B435 mov ah, 35h 0 00002EC4 CD21 int 21h ; get vector 0 00002EC6 97 xchg ax, di 0 00002EC7 AD lodsw 0 00002EC8 97 xchg ax, di 7760 %if _DEBUG && !_DEBUG_COND 7761 ; vectors are set only when debuggee runs 7762 %else 7763 %if _DEBUG 7764 testopt [internalflags6], dif6_debug_mode 7765 jnz @F 7766 %endif 0 00002EC9 895D02 mov word [ di + ieNext ], bx 0 00002ECC 8C4504 mov word [ di + ieNext + 2 ], es 7769 ; store it 0 00002ECF 89FA mov dx, di 0 00002ED1 B425 mov ah, 25h ; set interrupt vector 0 00002ED3 CD21 int 21h ; ds => lDEBUG_DATA_ENTRY 7773 @@: 7774 %endif 0 00002ED5 E2EA loop .intloop 7776 7777 .intend: 7778 %endif 7779 7780 7781 ; Disabled this. hook2F (debug.asm) now detects this condition. 7782 %if _PM && 0 7783 ; Windows 9x and DosEmu are among those hosts which handle some 7784 ; V86 Ints internally without first calling the interrupt chain. 7785 ; This causes various sorts of troubles and incompatibilities; 7786 ; in our case, hooking interrupt 2Fh would not intercept calls 7787 ; made to the DPMI interface because the host sees them first. 7788 %if _WIN9XSUPP 7789 %if _GUARD_86M_INT2F 7790 push es 7791 xor ax, ax 7792 mov es, ax ; (only used in 86 Mode) 7793 mov ax, [es:2Fh * 4] 7794 cmp ax, -1 7795 je @F ; --> (ZR) 7796 or ax, [es:2Fh * 4 + 2] 7797 @@: 7798 pop es 7799 jz @F 7800 %endif 7801 mov ax, 1600h ; running in a Win9x DOS box? 7802 int 2Fh 7803 cmp al, 4 7804 jge .no2Fhook ; this is intentionally a signed comparison! 7805 @@: 7806 %endif 7807 %if _DOSEMU 7808 testopt [internalflags], runningdosemu 7809 jnz .no2Fhook 7810 %endif 7811 %if _WIN9XSUPP || _DOSEMU 7812 jmp short .dpmihostchecked 7813 .no2Fhook: 7814 clropt [options4], opt4_int_2F_hook 7815 .dpmihostchecked: 7816 %endif 7817 %endif 7818 7819 %if _EXTENSIONS 7820 init_eld_app_dev: 0 00002ED7 E8D003 call init_eld 7822 %else 7823 push ds 7824 pop es 7825 %endif 7826 7827 set_parent_pra: 7828 ; Save, then modify termination address and parent PSP. 7829 %if _DEVICE && _APPLICATION 0 00002EDA F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002EDF 7403E94201 jnz final_device 7832 %elif _DEVICE 7833 jmp final_device 7834 %endif 7835 %if _APPLICATION 0 00002EE4 BE0A00 mov si, TPIV 0 00002EE7 BF[0000] mov di, psp22 0 00002EEA A5 movsw 0 00002EEB A5 movsw ; save Int22 0 00002EEC BA[0000] mov dx, debug22 0 00002EEF 8954FC mov word [ si-4 ], dx 0 00002EF2 8C5CFE mov word [ si-2 ], ds ; set pspInt22 (required) 0 00002EF5 BE1600 mov si, 16h 0 00002EF8 A5 movsw ; save parent 0 00002EF9 8C5CFE mov word [ si-2 ], ds ; set pspParent 0 00002EFC B82225 mov ax, 2522h ; set Int22 0 00002EFF CD21 int 21h ; (not really required) 7848 7849 init_app_allocate_reserved: 0 00002F01 B80258 mov ax, 5802h ; Get UMB link state 0 00002F04 CD21 int 21h 0 00002F06 30E4 xor ah, ah 0 00002F08 50 push ax ; Save UMB link state 0 00002F09 B80058 mov ax, 5800h ; Get allocation strategy 0 00002F0C CD21 int 21h 0 00002F0E 50 push ax ; Save allocation strategy 7857 0 00002F0F B80358 mov ax, 5803h ; Set UMB link state: 0 00002F12 BB0100 mov bx, 1 ; enabled 0 00002F15 CD21 int 21h 0 00002F17 B80158 mov ax, 5801h ; Set allocation strategy: 0 00002F1A 31DB xor bx, bx ; first fit, LMA then UMA 0 00002F1C CD21 int 21h 7864 0 00002F1E 2E8B16[FE0D] mov dx, word [cs:init_switch_r] 7866 .loop: 0 00002F23 31DB xor bx, bx 0 00002F25 B448 mov ah, 48h 0 00002F27 CD21 int 21h 0 00002F29 722D jc .done 0 00002F2B 8EC0 mov es, ax 0 00002F2D 39D0 cmp ax, dx 0 00002F2F 7606 jbe .grow 7874 .free: 0 00002F31 B449 mov ah, 49h 0 00002F33 CD21 int 21h 0 00002F35 EB21 jmp .done 7878 7879 .grow: 0 00002F37 50 push ax 0 00002F38 93 xchg bx, ax 0 00002F39 F7DB neg bx 0 00002F3B 01D3 add bx, dx ; = dx - bx 0 00002F3D B44A mov ah, 4Ah 0 00002F3F CD21 int 21h ; grow up to desired segment 0 00002F41 58 pop ax ; (if not free grow less) 7887 0 00002F42 85DB test bx, bx 0 00002F44 7501 jnz .nonempty 0 00002F46 48 dec ax ; => MCB (hack into the name field) 7891 .nonempty: 0 00002F47 8EC0 mov es, ax 0 00002F49 26891E0C00 mov word [es:12], bx ; size (0 if in MCB) 0 00002F4E 8706[0000] xchg ax, word [next_reserved_segment] ; :12 -> chain 0 00002F52 26A30E00 mov word [es:14], ax ; => next in chain 0 00002F56 EBCB jmp .loop 7897 7898 .done: 0 00002F58 5B pop bx ; saved allocation strategy 0 00002F59 B80158 mov ax, 5801h 0 00002F5C CD21 int 21h ; Set allocation strategy 0 00002F5E 5B pop bx ; saved UMB link state 0 00002F5F B80358 mov ax, 5803h 0 00002F62 CD21 int 21h ; Set UMB link state 7905 7906 init_app_resize: 7907 ; shrink to required resident size 0 00002F64 1E push ds 0 00002F65 07 pop es 0 00002F66 2EA1[E60D] mov ax, word [cs:memsize] 0 00002F6A A3[0000] mov word [alloc_size_not_reserved], ax 0 00002F6D 8CD8 mov ax, ds 0 00002F6F 2E8B16[FE0D] mov dx, word [cs:init_switch_r] 0 00002F74 8916[0000] mov word [reserved_address], dx 0 00002F78 39D0 cmp ax, dx 0 00002F7A 7325 jae @F 0 00002F7C 2E8B1E[020E] mov bx, word [cs:init_target_size] 0 00002F81 01D8 add ax, bx 0 00002F83 39D0 cmp ax, dx 0 00002F85 7215 jb .fulltargetsize 0 00002F87 8CD8 mov ax, ds 0 00002F89 2E0306[E60D] add ax, word [cs:memsize] 0 00002F8E 39D0 cmp ax, dx 0 00002F90 730F jae @F ; no action needed 0 00002F92 89D3 mov bx, dx 0 00002F94 8CD8 mov ax, ds 0 00002F96 29C3 sub bx, ax ; grow it up to /R (or less) 0 00002F98 B44A mov ah, 4Ah 0 00002F9A CD21 int 21h ; get bx = actual size 7930 .fulltargetsize: 0 00002F9C 2E891E[E60D] mov word [cs:memsize], bx 7932 @@: 0 00002FA1 B44A mov ah, 4Ah 0 00002FA3 2E8B1E[E60D] mov bx, word [cs:memsize] 0 00002FA8 891E[0000] mov word [alloc_size], bx 0 00002FAC 8C1E[0000] mov word [alloc_seg], ds 7937 7938 0 00002FB0 2ED006[1D0E] rol byte [cs:init_switch_t], 1 0 00002FB5 7209 jc .application_relocate 7941 7942 .application_no_relocate: 0 00002FB7 BE[0000] mov si, initcont 0 00002FBA FF36[0000] push word [code_seg] 0 00002FBE 56 push si 0 00002FBF CB retf 7947 7948 .application_relocate: 0 00002FC0 83EC08 sub sp, .relocate_trampoline_size_w * 2 0 00002FC3 89E7 mov di, sp ; es:di -> stack space 0 00002FC5 0E push cs 0 00002FC6 1F pop ds 0 00002FC7 BE[1E30] mov si, .relocate_trampoline ; ds:si -> trampoline code 0 00002FCA B90400 mov cx, .relocate_trampoline_size_w 0 00002FCD 57 push di 0 00002FCE F3A5 rep movsw ; place trampoline 0 00002FD0 5F pop di 7958 0 00002FD1 BE[0000] mov si, initcont 0 00002FD4 36FF36[0000] push word [ss:code_seg] 0 00002FD9 56 push si ; place our return address 7962 0 00002FDA 06 push es 0 00002FDB 53 push bx 0 00002FDC 50 push ax ; stack for trampoline 7966 0 00002FDD B549 mov ch, 49h ; set up to free original block 0 00002FDF A1[FA0D] mov ax, word [relocate_source] 0 00002FE2 50 push ax ; => source block 0 00002FE3 8B16[FE0D] mov dx, word [init_switch_r] 0 00002FE7 39D0 cmp ax, dx 0 00002FE9 732A jae @F 0 00002FEB 2E8B1E[000E] mov bx, word [cs:init_base_size] 0 00002FF0 01D8 add ax, bx 0 00002FF2 39D0 cmp ax, dx 0 00002FF4 7206 jb .fullbasesize 0 00002FF6 89D3 mov bx, dx 0 00002FF8 58 pop ax 0 00002FF9 50 push ax 0 00002FFA 29C3 sub bx, ax 7981 .fullbasesize: 0 00002FFC B54A mov ch, 4Ah ; resize instead 7983 0 00002FFE 58 pop ax 0 00002FFF 50 push ax 0 00003000 85DB test bx, bx 0 00003002 7501 jnz .nonempty 0 00003004 48 dec ax ; => MCB (hack into the name field) 7989 .nonempty: 0 00003005 8EC0 mov es, ax 0 00003007 26891E0C00 mov word [es:12], bx ; size (0 if in MCB) 0 0000300C 368706[0000] xchg ax, word [ss:next_reserved_segment]; :12 -> chain 0 00003011 26A30E00 mov word [es:14], ax ; => next in chain 7994 @@: 0 00003015 58 pop ax 0 00003016 8EC0 mov es, ax ; => relocate source 0 00003018 91 xchg ax, cx ; ah = 49h or 4Ah 7998 0 00003019 16 push ss 0 0000301A 1F pop ds ; reset ds 0 0000301B 16 push ss 0 0000301C 57 push di ; -> placed trampoline 0 0000301D CB retf ; jump to trampoline 8004 8005 8006 align 2, nop 8007 .relocate_trampoline: 0 0000301E CD21 int 21h ; free original process block 0 00003020 58 pop ax ; ah = 4Ah 0 00003021 5B pop bx ; bx = memory size 0 00003022 07 pop es ; es => new block 8012 ; (we do not really need to resize the block here 8013 ; as it was already allocated the wanted size.) 0 00003023 CA0800 retf .relocate_trampoline_size_w * 2 8015 align 2, nop 8016 endarea .relocate_trampoline 8017 8018 %endif 8019 8020 8021 %if _DEVICE 8022 final_device: 0 00003026 BE8000 mov si, 80h ; -> command line tail 0 00003029 89F1 mov cx, si ; = 128 0 0000302B 29CC sub sp, cx ; -> buffer on stack 0 0000302D 89E7 mov di, sp 0 0000302F F3A4 rep movsb ; preserve it 8028 8029 %if _DEV_ENV_SIZE 0 00003031 FF362C00 push word [2Ch] 8031 %endif 8032 0 00003035 8CDA mov dx, ds 0 00003037 B455 mov ah, 55h 0 00003039 F8 clc 0 0000303A CD21 int 21h ; create child PSP 8037 0 0000303C BE0E00 mov si, TPIV + 4 0 0000303F BA[0000] mov dx, debug22 0 00003042 8954FC mov word [ si-4 ], dx 0 00003045 8C5CFE mov word [ si-2 ], ds ; set pspInt22 (required) 8042 %if _DEVICE_SET_2324 0 00003048 C704[0000] mov word [ si ], devint23 0 0000304C 8C5C02 mov word [ si + 2 ], ds ; set pspInt23 0 0000304F C74404[0000] mov word [ si + 4 ], devint24 0 00003054 8C5C06 mov word [ si + 6 ], ds ; set pspInt24 8047 %endif 0 00003057 BE1800 mov si, 16h + 2 0 0000305A 8C5CFE mov word [ si-2 ], ds ; set pspParent 8050 ; mov ax, 2522h ; set Int22 8051 ; int 21h ; (not really required) 8052 8053 %if _DEV_ENV_SIZE 0 0000305D 8F062C00 pop word [2Ch] 8055 %else 8056 xor ax, ax 8057 mov word [2Ch], ax ; set environment to none 8058 %endif 8059 0 00003061 BB0500 mov bx, 5 ; close file handles past std (5) 0 00003064 8B0E3200 mov cx, word [32h] ; = number of file handles 0 00003068 29D9 sub cx, bx ; = number past std handles 0 0000306A 7607 jbe @FF ; if <= 0 handles to close --> 8064 @@: 0 0000306C B43E mov ah, 3Eh 0 0000306E CD21 int 21h ; close file handle 0 00003070 43 inc bx ; next handle 0 00003071 E2F9 loop @B ; loop --> 8069 @@: 8070 0 00003073 89E6 mov si, sp ; -> buffer on stack 0 00003075 BF8000 mov di, 80h ; -> command line tail buffer in PSP 0 00003078 89F8 mov ax, di ; = 128 0 0000307A 89F9 mov cx, di ; = 128 0 0000307C F3A4 rep movsb ; 0 0000307E 01C4 add sp, ax ; discard buffer 8077 0 00003080 BE[0000] mov si, initcont.device 0 00003083 FF36[0000] push word [code_seg] 0 00003087 56 push si 0 00003088 CB retf 8082 %endif 8083 %endif 8084 8085 8086 %assign ELD 0 8087 %assign INTERC3 0 8088 %assign PART1 0 8089 %assign PART2 1 8090 %assign PART3 0 8091 %define init_data_segment cs 8092 8093 %imacro internalcoderelocation 0-*.nolist 8094 %endmacro 8095 %imacro internaldatarelocation 0-*.nolist 8096 %endmacro 8097 %imacro linkdatarelocation 0-*.nolist 8098 %endmacro 8099 %define relocated(address) address 8100 8101 %include "pathshar.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug initialisation - Path analyse and search 5 <1> 6 <1> Copyright (C) 2008-2025 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> 17 <1> ; defines used: 18 <1> ; ELD = nonzero iff included by Extension for lDebug path.asm (for path.eld) 19 <1> ; INTERC3 = nonzero iff included by INTERC3 intercep.asm 20 <1> ; else included by lDebug init.asm 21 <1> ; PART1 = nonzero if to embed main code 22 <1> ; PART2 = nonzero if to embed subfunctions 23 <1> ; PART3 = nonzero if to embed imsg messages 24 <1> 25 <1> %if PART1 26 <1> ; INP: si -> pathname followed by command line 27 <1> ; word [ss:sp] = si 28 <1> ; OUT: word [ss:sp] -> final buffer 29 <1> init_analyse_pathname: 30 <1> mov bx, si 31 <1> xor dx, dx 32 <1> mov al, 0 33 <1> @@: 34 <1> cmp al, '/' 35 <1> je .slash 36 <1> cmp al, '\' 37 <1> je .slash 38 <1> cmp al, ':' 39 <1> je .colon 40 <1> cmp al, '.' 41 <1> jne .next 42 <1> .dot: 43 <1> mov dl, 1 ; set dl (fn with dot) 44 <1> jmp .next 45 <1> 46 <1> .slash: 47 <1> .colon: 48 <1> mov dx, 100h ; set dh (is a pathname), reset dl (fn with dot) 49 <1> .next: 50 <1> lodsb 51 <1> call init_ifsep 52 <1> jne @B 53 <1> dec si ; bx -> name, si -> terminator 54 <1> ; dh = nonzero if a pathname not just filename 55 <1> ; dl = nonzero if filename contains a dot 56 <1> push ss 57 <1> pop es 58 <1> mov cx, si 59 <1> sub cx, bx ; es:bx -> name, cx = length 60 <1> 61 <1> 62 <1> init_check_warn_extension: 63 <1> push dx 64 <1> push es 65 <1> 66 <1> test dl, dl ; last component has a dot ? 67 <1> jz .done ; no, do not warn --> 68 <1> 69 <1> rol byte [init_data_segment:init_switch_pw], 1 70 <1> internaldatarelocation 71 <1> jnc .done ; warning disabled --> 72 <1> 73 <1> cmp cx, 4 ; can fit an expected extension ? 74 <1> jb .warn ; no, warn --> 75 <1> 76 <1> sub si, 4 ; -> possible extension 77 <1> push init_data_segment 78 <1> pop es 79 <1> mov di, imsg.no_warn_extensions 80 <1> internaldatarelocation ; es:di -> allowed extensions 81 <1> .loop: 82 <1> mov al, 0 83 <1> xchg byte [init_data_segment:di+4], al 84 <1> ; NUL-terminate the candidate extension 85 <1> push ax 86 <1> mov dx, di 87 <1> call init_isstring? ; is it this one ? 88 <1> pop ax 89 <1> mov byte [init_data_segment:di+4], al 90 <1> ; restore next extension text 91 <1> je .done ; yes, do not warn --> 92 <1> scasw 93 <1> scasw ; di += 4 94 <1> test al, al ; was last ? 95 <1> jnz .loop 96 <1> .warn: 97 <1> mov dx, imsg.extension_warning 98 <1> internaldatarelocation 99 <1> call init_putsz_cs 100 <1> 101 <1> .done: 102 <1> pop es 103 <1> pop dx 104 <1> 105 <1> 106 <1> init_find_path: 107 <1> %if ELD 108 <1> extcallcall InDOS 109 <1> jnz .done_j 110 <1> testopt [relocateddata], tt_while 111 <1> linkdatarelocation internalflags_with_tt_while, -3 112 <1> jnz .done_j 113 <1> %endif 114 <1> cmp word [init_data_segment: init_switch_p_low_pathsearch_high_guessextension], strict byte 0 116 <1> internaldatarelocation -3 117 <1> je .done_j 118 <1> 119 <1> jcxz .done_j ; if no filename given --> 120 <1> 121 <1> ; es:bx -> name, cx = length 122 <1> mov di, relocated(while_buffer) 123 <1> linkdatarelocation while_buffer ; ss:while_buffer -> prefix, ss:di -> after end 124 <1> 125 <1> call init_check_filename 126 <1> jnc .found 127 <1> 128 <1> test dh, dh 129 <1> jz @F 130 <1> .done_j: 131 <1> jmp .done 132 <1> @@: 133 <1> rol byte [init_data_segment:init_switch_p_pathsearch], 1 134 <1> internaldatarelocation 135 <1> jnc .done_j 136 <1> 137 <1> %if _DEVICE && _APPLICATION && ! ELD && ! INTERC3 138 <1> testopt [internalflags6], dif6_device_mode 139 <1> jnz .device 140 <1> %endif 141 <1> %if _APPLICATION || ELD || INTERC3 142 <1> mov ax, [2Ch] 143 <1> %if _DEVICE && ! ELD && ! INTERC3 144 <1> jmp @F 145 <1> %endif 146 <1> %endif 147 <1> 148 <1> %if _DEVICE && ! ELD && ! INTERC3 149 <1> .device: 150 <1> call init_device_get_environment 151 <1> @@: 152 <1> %endif 153 <1> 154 <1> push cx 155 <1> mov di, imsg.varpath 156 <1> internaldatarelocation 157 <1> mov cx, imsg.varpath.length 158 <1> call init_findvar 159 <1> jc .done_pop 160 <1> 161 <1> .pathloop: 162 <1> push si 163 <1> mov cx, 128 ; put a limit 164 <1> @@: 165 <1> lodsb ; get next text 166 <1> cmp al, ';' ; separator ? 167 <1> je @F ; yes --> 168 <1> cmp al, 0 ; separator ? 169 <1> je @F ; yes --> 170 <1> loop @B ; loop up to limit 171 <1> jmp .pathtoolong ; error --> 172 <1> @@: 173 <1> mov cx, si 174 <1> dec cx ; -> terminator 175 <1> pop si ; -> content text 176 <1> sub cx, si ; = length excluding terminator 177 <1> push ss 178 <1> pop es 179 <1> mov di, relocated(while_buffer) 180 <1> linkdatarelocation while_buffer ; es:di -> buffer 181 <1> 182 <1> mov al, 0 ; no backslash if empty 183 <1> jcxz @FFF ; skip loop if empty --> 184 <1> @@: 185 <1> lodsb ; load from variable 186 <1> cmp al, '/' ; forward slash ? 187 <1> jne @F ; no --> 188 <1> mov al, '\' ; replace by backslash 189 <1> @@: 190 <1> stosb ; store 191 <1> loop @BB ; loop for cx = count 192 <1> @@: 193 <1> cmp al, '\' ; trailing backslash ? 194 <1> je @F ; yes --> 195 <1> mov al, '\' 196 <1> stosb ; append it 197 <1> @@: 198 <1> pop cx 199 <1> 200 <1> push ds 201 <1> push si 202 <1> ; ss = es, es:bx -> name, cx = length 203 <1> ; ss:while_buffer -> prefix, ss:di -> after end 204 <1> call init_check_filename 205 <1> pop si 206 <1> pop ds ; ds:si -> terminator of path element 207 <1> jnc .found 208 <1> 209 <1> lodsb ; get terminator 210 <1> cmp al, ';' ; semicolon ? 211 <1> jne .done ; no --> 212 <1> push cx 213 <1> jmp .pathloop ; try next --> 214 <1> 215 <1> 216 <1> .found: 217 <1> push ss 218 <1> pop ds ; ds => PSP 219 <1> pop si 220 <1> add si, cx ; ds:si -> behind original name 221 <1> push ss 222 <1> pop es 223 <1> dec di ; es:di -> NUL 224 <1> %if INTERC3 225 <1> mov al, 32 ; blank codepoint 226 <1> cmp byte [si], al ; <= 32 ? 227 <1> ja @F ; no, store a blank first --> 228 <1> %endif 229 <1> jmp @FF ; skip store on first iteration 230 <1> 231 <1> @@: 232 <1> cmp di, relocated(while_buffer.end) - 2 233 <1> linkdatarelocation while_buffer.end 234 <1> ja .toolong 235 <1> stosb 236 <1> @@: 237 <1> lodsb 238 <1> cmp al, 0 239 <1> je @F 240 <1> cmp al, 13 241 <1> jne @BB 242 <1> @@: ; (targeted from both directions) 243 <1> mov al, 13 244 <1> stosb 245 <1> mov si, relocated(while_buffer) 246 <1> linkdatarelocation while_buffer 247 <1> push si ; offset for N/K command (kk) 248 <1> jmp .done 249 <1> 250 <1> .toolong: 251 <1> mov dx, imsg.kktoolong 252 <1> internaldatarelocation 253 <1> call init_putsz_cs 254 <1> jmp @B 255 <1> 256 <1> .pathtoolong: 257 <1> %if ELD 258 <1> push ss 259 <1> pop ds 260 <1> %endif 261 <1> mov dx, imsg.pathtoolong 262 <1> internaldatarelocation 263 <1> call init_putsz_cs 264 <1> 265 <1> pop ax ; (discard si) 266 <1> .done_pop: 267 <1> pop ax ; (discard cx) 268 <1> .done: 269 <1> %endif 270 <1> 271 <1> 272 <1> %if PART2 273 <1> ; Compare character with separators 274 <1> ; 275 <1> ; INP: al = character 276 <1> ; OUT: ZR if al is CR, NUL, blank, tab, comma, semicolon, or equal sign 277 <1> ; ZR if switch character is a slash and al is a slash 278 <1> ; NZ else 279 <1> ; REM: This is only used for parsing FCBs. 280 <1> init_ifsep: 0 00003089 3C00 cmp al, 0 0 0000308B 741D je .return 0 0000308D 3C0D cmp al, 13 0 0000308F 7419 je .return 0 00003091 3C3B cmp al, ';' 0 00003093 7415 je .return 0 00003095 3C20 cmp al, 32 0 00003097 7411 je .return 0 00003099 3C09 cmp al, 9 0 0000309B 740D je .return 0 0000309D 3C2C cmp al, ',' 0 0000309F 7409 je .return 0 000030A1 3C3D cmp al, '=' 0 000030A3 7405 je .return 0 000030A5 363A06[0000] cmp al, byte [ss:relocated(swch1)] 296 <1> linkdatarelocation swch1 297 <1> .return: 0 000030AA C3 retn 299 <1> 300 <1> 301 <1> %if _APPLICATION || _DEVICE 302 <1> ; INP: es:bx -> name to try, cx = length 303 <1> ; dl = zero if to attempt filename extensions 304 <1> ; ss:while_buffer -> prefix, ss:di -> after 305 <1> ; OUT: NC if file found, 306 <1> ; ss:while_buffer = name, ss:di -> after NUL 307 <1> ; CY if file not found 308 <1> ; ds = ss 309 <1> ; CHG: si, ax 310 <1> init_check_filename: 0 000030AB 06 push es 0 000030AC 51 push cx 313 <1> 0 000030AD 06 push es 0 000030AE 1F pop ds 0 000030AF 89DE mov si, bx ; ds:si -> name 0 000030B1 16 push ss 0 000030B2 07 pop es ; es:di -> where to append name 0 000030B3 F3A4 rep movsb ; append the name 0 000030B5 57 push di ; on stack: at initial terminator 0 000030B6 BE[2A0E] mov si, imsg.p_extensions 322 <1> internaldatarelocation 323 <1> ; cs:si -> extensions to try 324 <1> .loop: 0 000030B9 B000 mov al, 0 0 000030BB AA stosb ; zero-terminate name 0 000030BC B80043 mov ax, 4300h ; get attributes 0 000030BF 52 push dx 0 000030C0 16 push ss 0 000030C1 1F pop ds 0 000030C2 BA[0000] mov dx, relocated(while_buffer) ; ds:dx -> pathname to try 332 <1> linkdatarelocation while_buffer 0 000030C5 F9 stc 334 <1> %if ELD 335 <1> extcallcall _doscall 336 <1> %else 0 000030C6 CD21 int 21h ; try to get attributes 338 <1> %endif 0 000030C8 7206 jc @F ; not found --> CY 0 000030CA F6C110 test cl, 10h ; directory ? 0 000030CD 7401 jz @F ; no --> NC 0 000030CF F9 stc ; yes, handle as not found: CY 343 <1> @@: 0 000030D0 5A pop dx 0 000030D1 731A jnc .ret ; --> (NC) 0 000030D3 84D2 test dl, dl ; had an extension originally ? 0 000030D5 7515 jnz .ret_CY ; yes, do not try to append one --> 0 000030D7 2ED006[F90D] rol byte [init_data_segment:init_switch_p_guessextension], 1 349 <1> internaldatarelocation 0 000030DC 730E jnc .ret_CY ; if no guessing extension --> 0 000030DE 5F pop di 0 000030DF 57 push di 0 000030E0 2E803C00 cmp byte [init_data_segment:si], 0 354 <1> ; last attempt done ? 0 000030E4 7406 je .ret_CY ; yes --> 0 000030E6 2EA5 init_data_segment movsw ; ".C" 0 000030E8 2EA5 init_data_segment movsw ; "OM" 0 000030EA EBCD jmp .loop 359 <1> 360 <1> .ret_CY: 0 000030EC F9 stc ; CY 362 <1> .ret: 0 000030ED 58 pop ax ; (discard) 0 000030EE 59 pop cx 0 000030EF 07 pop es 0 000030F0 C3 retn 367 <1> %endif 368 <1> 369 <1> 370 <1> ; INP: ax => environment, zero if none 371 <1> ; cs:di -> variable name, including '=' terminator 372 <1> ; cx = variable name length, including '=' terminator 373 <1> ; OUT: CY if not found 374 <1> ; NC if found, 375 <1> ; ds:si -> behind '=' of found variable 376 <1> ; CHG: ax, es, di, ds, si, cx 377 <1> init_findvar: 0 000030F1 85C0 test ax, ax 0 000030F3 7415 jz .notvar 0 000030F5 8ED8 mov ds, ax 0 000030F7 31F6 xor si, si 382 <1> 383 <1> @@: 0 000030F9 0E push init_data_segment 0 000030FA 07 pop es 0 000030FB 51 push cx 0 000030FC 57 push di 0 000030FD 56 push si 0 000030FE F3A6 repe cmpsb 0 00003100 740A je .foundvar ; --> (NC) 0 00003102 5E pop si 0 00003103 5F pop di 0 00003104 59 pop cx 0 00003105 E80800 call init_nextvar 0 00003108 75EF jnz @B 396 <1> .notvar: 0 0000310A F9 stc 0 0000310B C3 retn 399 <1> 400 <1> .foundvar: 0 0000310C 58 pop ax 0 0000310D 58 pop ax 0 0000310E 58 pop ax 0 0000310F C3 retn 405 <1> 406 <1> 407 <1> init_nextvar: 408 <1> @@: 0 00003110 AC lodsb 0 00003111 84C0 test al, al 0 00003113 75FB jnz @B 0 00003115 803C00 cmp byte [si], 0 0 00003118 C3 retn 414 <1> %endif 415 <1> 416 <1> 417 <1> %if PART3 418 <1> %if INTERC3 419 <1> %define _PROGNAME "" 420 <1> %endif 421 <1> align 2, db 0 422 <1> .no_warn_extensions: 423 <1> %ifn INTERC3 424 <1> db ".HEX",".ROM" 425 <1> %endif 426 <1> %if (($ - .no_warn_extensions) % 4) != 0 427 <1> %error Wrong extensions length 428 <1> %endif 429 <1> .p_extensions: db ".COM" 430 <1> db ".EXE" 431 <1> %ifn INTERC3 432 <1> db ".BIN" 433 <1> %endif 434 <1> asciz 435 <1> %if (($ - 1 - .p_extensions) % 4) != 0 436 <1> %error Wrong extensions length 437 <1> %endif 438 <1> .varpath: db "PATH=" 439 <1> .varpath.length equ $ - .varpath 440 <1> .extension_warning: 441 <1> %ifn ELD 442 <1> db _PROGNAME,": " 443 <1> %endif 444 <1> asciz "Warning, unknown filename extension specified!",13,10 445 <1> .kktoolong: 446 <1> %ifn ELD 447 <1> db _PROGNAME,": " 448 <1> %endif 449 <1> asciz "Error, too long command line tail!",13,10 450 <1> .pathtoolong: 451 <1> %ifn ELD 452 <1> db _PROGNAME,": " 453 <1> %endif 454 <1> asciz "Error, too long %PATH% variable element!",13,10 455 <1> %endif 8102 8103 %undef extcall 8104 %undef extcallcall 8105 %unimacro internalcoderelocation 0-*.nolist 8106 %unimacro internaldatarelocation 0-*.nolist 8107 %unimacro linkdatarelocation 0-*.nolist 8108 %undef relocated 8109 8110 8111 %if _CONFIG 8112 ; INP: ax => environment, zero if none 8113 ; cs:di -> variable name, including '=' terminator 8114 ; cx = variable name length, including '=' terminator 8115 ; ss:dx -> buffer to write to, 256 bytes 8116 ; OUT: es = ds = ss 8117 ; CY if not found 8118 ; NC if found, 8119 ; buffer filled 8120 init_copyvar: 0 00003119 E8D5FF call init_findvar 0 0000311C 721A jc .endvar 8123 8124 .foundvar: 0 0000311E 1E push ds 0 0000311F 07 pop es 0 00003120 89F7 mov di, si 0 00003122 B000 mov al, 0 0 00003124 B9FF00 mov cx, 255 0 00003127 F2AE repne scasb 8131 0 00003129 29F7 sub di, si 0 0000312B 4F dec di 0 0000312C 89F9 mov cx, di 8135 0 0000312E 16 push ss 0 0000312F 07 pop es 0 00003130 89D7 mov di, dx 0 00003132 F3A4 rep movsb 0 00003134 B000 mov al, 0 0 00003136 AA stosb 0 00003137 F8 clc 8143 8144 .endvar: 0 00003138 16 push ss 0 00003139 1F pop ds 0 0000313A 16 push ss 0 0000313B 07 pop es 0 0000313C C3 retn 8150 %endif 8151 8152 8153 %assign ELD 0 8154 %define PREFIX init_ 8155 %include "isstring.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug string keyword comparison 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2023 E. C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> ; Check for given string (cap-insensitive) 19 <1> ; 20 <1> ; INP: ds:si -> input string to check (either cap), 21 <1> ; terminated by CR (13), NUL, semicolon, space, 22 <1> ; tab, dot, comma, equals, colon, [, ], (, or ) 23 <1> ; es:dx -> ASCIZ string to check (all-caps) 24 <1> ; OUT: Iff string matches, 25 <1> ; ZR, NC 26 <1> ; si -> at separator that terminates the keyword 27 <1> ; else, 28 <1> ; NZ, CY 29 <1> ; si = input si 30 <1> ; STT: ds = es = ss 31 <1> ; CHG: dx, al 32 <1> %[PREFIX]isstring?: 0 0000313D 56 push si 0 0000313E 87D7 xchg dx, di 35 <1> .loop: 0 00003140 AC lodsb 0 00003141 E84F00 call %[PREFIX]capitalise 0 00003144 AE scasb 0 00003145 7506 jne .mismatch 0 00003147 84C0 test al, al ; NC 0 00003149 75F5 jne .loop 42 <1> ; ZR 0 0000314B EB40 jmp .matched_zr_nc 44 <1> 45 <1> .mismatch: 0 0000314D E84E00 call %[PREFIX]iseol? 0 00003150 7434 je .checkend 0 00003152 3C20 cmp al, 32 0 00003154 7430 je .checkend 0 00003156 3C09 cmp al, 9 0 00003158 742C je .checkend 0 0000315A 3C2E cmp al, '.' 0 0000315C 7428 je .checkend 0 0000315E 3C2C cmp al, ',' 0 00003160 7424 je .checkend 0 00003162 3C3D cmp al, '=' 0 00003164 7420 je .checkend 0 00003166 3C3A cmp al, ':' 0 00003168 741C je .checkend 0 0000316A 3C5B cmp al, '[' 0 0000316C 7418 je .checkend 0 0000316E 3C5D cmp al, ']' 0 00003170 7414 je .checkend 0 00003172 3C28 cmp al, '(' 0 00003174 7410 je .checkend 0 00003176 3C29 cmp al, ')' 0 00003178 740C je .checkend 68 <1> %ifidni PREFIX, init_ 69 <1> %if ELD 70 <1> cmp al, byte [ss:relocateddata] 71 <1> linkdatarelocation swch1 72 <1> %else 0 0000317A 363A06[0000] cmp al, byte [ss:swch1] 74 <1> %endif 0 0000317F 7405 je .checkend 76 <1> %endif 77 <1> .ret_nz: ; NZ 0 00003181 5E pop si 0 00003182 F9 stc ; CY 80 <1> .ret: 0 00003183 87D7 xchg dx, di 0 00003185 C3 retn 83 <1> 84 <1> .checkend: 0 00003186 26807DFF00 cmp byte [es:di - 1], 0 0 0000318B 75F4 jne .ret_nz 87 <1> ; ZR, NC 88 <1> .matched_zr_nc: ; ZR, NC 0 0000318D 5F pop di ; (discard) 0 0000318E 8D74FF lea si, [si - 1] ; -> separator (preserve ZR) 0 00003191 EBF0 jmp .ret 92 <1> 93 <1> 94 <1> %[PREFIX]capitalise: section_of_function 0 00003193 3C61 cmp al, 'a' 0 00003195 7206 jb .ret 0 00003197 3C7A cmp al, 'z' 0 00003199 7702 ja .ret 0 0000319B 24DF and al, TOUPPER 100 <1> .ret: 0 0000319D C3 retn 102 <1> 103 <1> %ifempty PREFIX 104 <1> iseol?_or_then: 105 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 106 <1> testopt [internalflags3], dif3_in_if 107 <1> jz iseol? 108 <1> mov dx, msg.then 109 <1> dec si 110 <1> call isstring? 111 <1> je iseol?.ret 112 <1> lodsb 113 <1> %endif 114 <1> %endif 115 <1> 116 <1> %[PREFIX]iseol?: 0 0000319E 3C3B cmp al, ';' 0 000031A0 7406 je .ret 119 <1> .notsemicolon: 0 000031A2 3C0D cmp al, 13 ; this *IS* iseol? 0 000031A4 7402 je .ret 0 000031A6 3C00 cmp al, 0 123 <1> .ret: 0 000031A8 C3 retn 125 <1> 126 <1> 127 <1> ; Skip blanks, then an optional comma, and then more blanks 128 <1> ; 129 <1> ; INP: ds:si -> first character 130 <1> ; OUT: al = first non-blank character behind 131 <1> ; ds:si -> character behind the first non-blank behind 132 <1> ; NC 133 <1> ; STK: 3 word 134 <1> %[PREFIX]skipcomma: section_of_function 0 000031A9 AC lodsb 136 <1> 137 <1> ; Same as above but we already have the first character in al 138 <1> %[PREFIX]skipcomm0: section_of_function 0 000031AA E82C00 call %[PREFIX]skipwh0 0 000031AD 3C2C cmp al, ',' 0 000031AF 7510 jne .return ; if no comma 0 000031B1 56 push si 0 000031B2 E82300 call %[PREFIX]skipwhite 0 000031B5 E8E6FF call %[PREFIX]iseol? 0 000031B8 7504 jne .noteol ; if not end of line 0 000031BA 5E pop si 0 000031BB B02C mov al, ',' 0 000031BD C3 retn 149 <1> .noteol: 0 000031BE 83C402 add sp, byte 2 ; pop si into nowhere 151 <1> .return: 0 000031C1 C3 retn 153 <1> 154 <1> 155 <1> ; Skip blanks, then an optional equals sign, then more blanks 156 <1> %[PREFIX]skipequals: section_of_function 0 000031C2 AC lodsb 158 <1> %[PREFIX]skipequ0: 0 000031C3 E81300 call %[PREFIX]skipwh0 0 000031C6 3C3D cmp al, '=' 0 000031C8 7503 jne .return 0 000031CA E80B00 call %[PREFIX]skipwhite 163 <1> .return: 0 000031CD C3 retn 165 <1> 166 <1> 167 <1> ; Skip alphabetic characters, and then white space 168 <1> ; 169 <1> ; INP: ds:si-> first character 170 <1> ; OUT: al = first non-blank character behind alphabetic characters 171 <1> ; ds:si-> character behind the first non-blank behind alpha. 172 <1> ; NC 173 <1> %[PREFIX]skipalpha: 174 <1> .: 0 000031CE AC lodsb 0 000031CF 24DF and al, TOUPPER 0 000031D1 2C41 sub al, 'A' 0 000031D3 3C19 cmp al, 'Z'-'A' 0 000031D5 76F7 jbe . 0 000031D7 4E dec si 181 <1> 182 <1> ; Skip blanks and tabs 183 <1> ; 184 <1> ; INP: ds:si-> first character 185 <1> ; OUT: al = first non-blank character 186 <1> ; ds:si-> character behind the first non-blank 187 <1> ; NC 188 <1> ; CHG: - 189 <1> ; STK: 1 word 190 <1> %[PREFIX]skipwhite: section_of_function 0 000031D8 AC lodsb 192 <1> 193 <1> ; Same as above, but first character in al 194 <1> ; 195 <1> ; INP: al = first character 196 <1> ; ds:si-> next character 197 <1> ; OUT: al = first non-blank character 198 <1> ; ds:si-> character behind the first non-blank 199 <1> ; NC 200 <1> ; CHG: - 201 <1> ; STK: 1 word 202 <1> %[PREFIX]skipwh0: section_of_function 0 000031D9 3C20 cmp al, 32 0 000031DB 74FB je %[PREFIX]skipwhite 0 000031DD 3C09 cmp al, 9 0 000031DF 74F7 je %[PREFIX]skipwhite 0 000031E1 F8 clc 0 000031E2 C3 retn 8156 8157 8158 ; INP: bx => destination for auxbuff 8159 ; (The following are not actually used by this function, 8160 ; they're just what is passed in and preserved to 8161 ; be used by the caller after returning.) 8162 ; dx => destination for code image 8163 ; (if boot-loaded:) cx => destination for pseudo-PSP 8164 ; (implies cx+10h => destination for data_entry) 8165 ; ax => segment for history buffer 8166 8167 init_app_layout_1: 8168 %if 0 8169 mov bx, ds 8170 mov dx, bx 8171 add bx, paras(AUXTARGET1) 8172 add dx, paras(CODETARGET1) 8173 %if _HISTORY_SEPARATE_FIXED && _HISTORY 8174 mov ax, bx 8175 add ax, paras(auxbuff_size) 8176 %if AUXTARGET1_equate <= CODETARGET1_equate 8177 ... 8178 %endif 8179 %endif 8180 mov cx, dx 8181 %endif 8182 8183 ; REM: Only history segment and extsegment are behind auxbuff. 8184 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _DEV_ENV_SIZE || _APP_ENV_SIZE 8186 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 000031E3 A1[0000] mov ax, word [history.segorsel + soaSegSel] 8188 ; => history segment 8189 %elif (_DEV_ENV_SIZE || _APP_ENV_SIZE) && _EXTENSIONS 8190 mov ax, word [envseg] 8191 test ax, ax 8192 jnz @F 8193 mov ax, word [extseg] 8194 @@: 8195 %elif (_DEV_ENV_SIZE || _APP_ENV_SIZE) 8196 mov ax, word [envseg] 8197 ; if here then no history segment and no ext segment, 8198 ; so we do not want to copy anything if envseg unused. 8199 ; in this case hope that mem_envsize is 0 so the movp 8200 ; call below is a no-op. 8201 ; better fix: just include a check for zero here. 8202 test ax, ax 8203 jz .skip_env_reloc 8204 %elif _EXTENSIONS 8205 mov ax, word [extseg] 8206 %else 8207 %error Unexpected condition 8208 %endif 0 000031E6 89C2 mov dx, ax 0 000031E8 01F2 add dx, si 0 000031EA B90004 mov cx, paras(historysegment_size + extsegment_size) 8212 ; This runs before init_change_history_size 8213 ; and init_change_ext_size. 8214 %if (_DEV_ENV_SIZE || _APP_ENV_SIZE) 0 000031ED 2E030E[E80D] add cx, word [cs:mem_envsize] 8216 %endif 0 000031F2 E8FBE7 call init_movp 8218 .skip_env_reloc: 8219 init_app_layout_common: 8220 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 000031F5 0136[0000] add word [history.segorsel + soaSegSel], si 8222 %if _PM 8223 add word [history.segorsel + soaSegment], si 8224 %endif 8225 %endif 8226 %if _EXTENSIONS 0 000031F9 0136[0000] add word [extseg], si 8228 %endif 8229 %if (_DEV_ENV_SIZE || _APP_ENV_SIZE) 0 000031FD 2ED006[210E] rol byte [cs:app_env_allocation], 1 0 00003202 7204 jc @F 0 00003204 01362C00 add word [2Ch], si 8233 @@: 0 00003208 833E[0000]00 cmp word [envseg], 0 0 0000320D 7404 je @F 0 0000320F 0136[0000] add word [envseg], si 8237 @@: 8238 %endif 8239 %else 8240 init_app_layout_common: 8241 %endif 0 00003213 2E0136[E60D] add word [cs:memsize], si 0 00003218 8E06[0000] mov es, word [auxbuff_segorsel + soaSegSel] 0 0000321C BF1020 mov di, fromwords(words(_AUXBUFFSIZE)) 0 0000321F 89F1 mov cx, si ; = amount paragraphs added 0 00003221 D1E1 shl cx, 1 ; = amount qwords 0 00003223 D1E1 shl cx, 1 ; = amount dwords 0 00003225 D1E1 shl cx, 1 ; = amount words 0 00003227 31C0 xor ax, ax 0 00003229 F3AB rep stosw ; initialise auxbuff trail 0 0000322B F8 clc 0 0000322C C3 retn 8253 8254 8255 init_app_layout_2: 8256 %if 0 8257 mov bx, ds 8258 mov dx, bx 8259 add bx, paras(AUXTARGET2) 8260 add dx, paras(CODETARGET2) 8261 %if _HISTORY_SEPARATE_FIXED && _HISTORY 8262 %if (paras(AUXTARGET1_equate) + paras(auxbuff_size_equate)) != (paras(CODETARGET2_equate) + paras(ldebug_codes_truncated_size_equate)) 8264 ... 8265 %endif 8266 %endif 8267 %endif 8268 8269 ; REM: Code1/code2 and history segment are behind auxbuff. 0 0000322D A1[0000] mov ax, word [code_seg] 0 00003230 89C2 mov dx, ax 0 00003232 01F2 add dx, si 8273 %ifn _LINK 8274 mov cx, ldebug_code_bootldr_truncated_size_p + ldebug_code2_size_p + paras(historysegment_size) + paras(extsegment_size) 8278 %else 0 00003234 B9[0004] mov cx, relocatedzero + 0 + paras(historysegment_size) + paras(extsegment_size) 8282 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 8283 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 8284 %endif 8285 8286 ; This runs before init_change_history_size 8287 ; and init_change_ext_size. 8288 %if (_DEV_ENV_SIZE || _APP_ENV_SIZE) 0 00003237 2E030E[E80D] add cx, word [cs:mem_envsize] 8290 %endif 0 0000323C E8B1E7 call init_movp 8292 0 0000323F 8EC2 mov es, dx 0 00003241 0136[0000] add word [code_seg], si 8295 %if _DUALCODE 8296 add word [code2_seg], si 8297 mov dx, word [code2_seg] 8298 repatch_relocate: 8299 push si 8300 %if ! _PM 8301 mov si, relocate_from_code 8302 mov di, relocate_from_code.end 8303 call .patch 8304 mov si, relocate_from_code2 8305 mov di, relocate_from_code2.end 8306 %endif 8307 push es 8308 mov es, dx 8309 pop dx 8310 %if ! _PM 8311 call .patch 8312 jmp .done 8313 8314 .loop: 8315 cs lodsw 8316 xchg bx, ax 8317 mov word [es:bx], dx 8318 .patch: 8319 cmp si, di 8320 jb .loop 8321 retn 8322 8323 .done: 8324 %endif 8325 pop si 8326 %endif 8327 8328 %if _AREAS && _AREAS_HOOK_CLIENT 8329 mov ax, si 8330 call add_to_areas_linear_code1 8331 %if _DUALCODE && _EXPRDUALCODE 8332 mov ax, si 8333 call add_to_areas_linear_code2 8334 %endif 8335 %endif 8336 0 00003245 EBAE jmp init_app_layout_common 8338 8339 8340 ; REM: Only history segment is behind auxbuff. 8341 init_app_layout_3: equ init_app_layout_1 8342 %if 0 8343 ; If both prior attempts failed, we allocate 8344 ; an additional 8 KiB and move the buffer to 8345 ; that. This should always succeed. 8346 mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size) 8349 ; enlarge the final memory block size 8350 8351 mov bx, ds 8352 add bx, paras(AUXTARGET3) 8353 mov dx, cx 8354 %if _HISTORY_SEPARATE_FIXED && _HISTORY 8355 mov ax, bx 8356 add ax, paras(auxbuff_size) 8357 %endif 8358 %endif 8359 8360 8361 %if _DEVICE 8362 init_dev_layout_1: 8363 %if 0 8364 mov bx, ds 8365 add bx, paras(DEVICEADJUST) 8366 mov dx, bx 8367 add bx, paras(AUXTARGET1) 8368 add dx, paras(CODETARGET1) 8369 %if _HISTORY_SEPARATE_FIXED && _HISTORY 8370 mov ax, bx 8371 add ax, paras(auxbuff_size) 8372 %endif 8373 mov cx, dx 8374 %endif 0 00003247 E899FF call init_app_layout_1 0 0000324A EB08 jmp init_dev_layout_common 8377 8378 8379 init_dev_layout_2: 8380 %if 0 8381 mov bx, ds 8382 add bx, paras(DEVICEADJUST) 8383 mov dx, bx 8384 add bx, paras(AUXTARGET2) 8385 add dx, paras(CODETARGET2) 8386 %endif 0 0000324C E8DEFF call init_app_layout_2 0 0000324F EB03 jmp init_dev_layout_common 8389 8390 8391 init_dev_layout_3: 8392 %if 0 8393 mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size) 8396 ; enlarge the final memory block size 8397 8398 mov bx, ds 8399 add bx, paras(DEVICEADJUST) 8400 add bx, paras(AUXTARGET3) 8401 mov dx, cx 8402 %if _HISTORY_SEPARATE_FIXED && _HISTORY 8403 mov ax, bx 8404 add ax, paras(auxbuff_size) 8405 %endif 8406 %endif 8407 0 00003251 E88FFF call init_app_layout_3 8409 init_dev_layout_common: 0 00003254 0136[0000] add word [device_mcb_paragraphs], si 8411 ; fix our variable 0 00003258 0136[0000] add word [alloc_size], si ; this one too 0 0000325C 8CD8 mov ax, ds ; => PSP 0 0000325E 2E0306[E60D] add ax, word [cs:memsize] ; => where to place container sig 0 00003263 E8B1D8 call init_dev_place_container_signature 8416 ; CHG: es, di, cx, si 8417 ; ax => behind memory used for device 0 00003266 8E06[0000] mov es, word [reg_es] 0 0000326A 8B1E[0000] mov bx, word [reg_ebx] ; -> device request header 0 0000326E 26894710 mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 0 00003272 F8 clc 0 00003273 C3 retn 8423 %endif 8424 8425 8426 init_layout_none: 0 00003274 F9 stc 0 00003275 C3 retn 8429 8430 8431 %if _AREAS && _AREAS_HOOK_CLIENT 8432 add_to_areas_linear_code1: 8433 xor dx, dx 8434 .dxax: 8435 mov cx, 4 8436 @@: 8437 shl ax, 1 8438 rcl dx, 1 8439 loop @B 8440 8441 add word [areas_sub + areastrucsubLinear], ax 8442 adc word [areas_sub + areastrucsubLinear + 2], dx 8443 add word [areas_sub + areastrucsubLinearEnd], ax 8444 adc word [areas_sub + areastrucsubLinearEnd + 2], dx 8445 8446 add word [areas_fun + areastrucfunLinear], ax 8447 adc word [areas_fun + areastrucfunLinear + 2], dx 8448 add word [areas_fun + areastrucfunLinearEnd], ax 8449 adc word [areas_fun + areastrucfunLinearEnd + 2], dx 8450 retn 8451 8452 %if _DUALCODE && _EXPRDUALCODE 8453 add_to_areas_linear_code2: 8454 xor dx, dx 8455 .dxax: 8456 mov cx, 4 8457 @@: 8458 shl ax, 1 8459 rcl dx, 1 8460 loop @B 8461 8462 add word [areas_sub + AREASTRUCSUB_size + areastrucsubLinear], ax 8463 adc word [areas_sub + AREASTRUCSUB_size + areastrucsubLinear + 2], dx 8464 add word [areas_sub + AREASTRUCSUB_size + areastrucsubLinearEnd], ax 8465 adc word [areas_sub + AREASTRUCSUB_size + areastrucsubLinearEnd + 2], dx 8466 retn 8467 %endif 8468 %endif 8469 8470 8471 %if _CONFIG 8472 do_truename: 8473 .: 0 00003276 16 push ss 0 00003277 1F pop ds 0 00003278 89D6 mov si, dx ; ds:si -> source 0 0000327A 16 push ss 0 0000327B 07 pop es 0 0000327C 89D7 mov di, dx ; es:di -> destination (same) 0 0000327E B460 mov ah, 60h 0 00003280 CD21 int 21h 0 00003282 7309 jnc .done 0 00003284 803C00 cmp byte [si], 0 ; empty ? (kernel rejects this) 0 00003287 C7042E00 mov word [si], "." ; make a dot + NUL (current directory) 0 0000328B 74E9 je . ; if expected failure then repeat --> 8486 8487 .done: 0 0000328D B000 mov al, 0 0 0000328F B98000 mov cx, 128 0 00003292 F2AE repne scasb ; scan for NUL 0 00003294 4F dec di ; -> at the NUL 8492 8493 @@: 0 00003295 39F7 cmp di, si 0 00003297 760C jbe @F 0 00003299 807DFF2F cmp byte [di - 1], '/' 0 0000329D 740A je @FF 0 0000329F 807DFF5C cmp byte [di - 1], '\' 0 000032A3 7404 je @FF 8500 @@: 0 000032A5 C6055C mov byte [di], '\' 0 000032A8 47 inc di 8503 @@: 0 000032A9 C3 retn 8505 %endif 8506 8507 8508 %if _EXTENSIONS 8509 init_eld: 0 000032AA 16 push ss 0 000032AB 1F pop ds 8512 8513 numdef ELD_DEBUG_LINKCALL_NONZERO, 0, 32 8514 %if _ELD_DEBUG_LINKCALL_NONZERO 8515 %if _ELD_DEBUG_LINKCALL_NONZERO & 15 8516 %error Invalid size 8517 %endif 8518 %if _ELD_DEBUG_LINKCALL_NONZERO < 32 8519 %error Invalid size 8520 %endif 8521 %if _ELD_DEBUG_LINKCALL_NONZERO > 65520 8522 %error Invalid size 8523 %endif 8524 mov ax, word [extseg_size] 8525 mov di, word [extseg_used] 8526 sub ax, di ; = amount free space 8527 jc @F 8528 mov cx, _ELD_DEBUG_LINKCALL_NONZERO 8529 cmp ax, cx 8530 jb @F 8531 mov es, word [extseg] ; es:di -> where to place ELD instance 8532 xor ax, ax 8533 push di 8534 shr cx, 1 ; = amount words 8535 rep stosw ; zero 8536 mov word [extseg_used], di ; -> behind ELD 8537 xchg ax, di ; ax -> behind ELD 8538 pop di 8539 mov word [es:di + eldiStartCode], di 8540 mov word [es:di + eldiEndCode], ax 8541 mov ax, "--" 8542 mov cl, 4 8543 add di, eldiIdentifier 8544 rep stosw 8545 8546 @@: 8547 %endif 8548 0 000032AC A1[0000] mov ax, word [extseg_size] 0 000032AF 8B3E[0000] mov di, word [extseg_used] 0 000032B3 29F8 sub ax, di ; = amount free space 0 000032B5 7233 jc .ret 0 000032B7 3D8000 cmp ax, eld_linkcall_size ; enough ? 0 000032BA 722E jb .ret 0 000032BC 89F8 mov ax, di ; -> where to install this ELD 0 000032BE 8E06[0000] mov es, word [extseg] ; es:di -> where to place ELD instance 0 000032C2 0E push cs 0 000032C3 1F pop ds ; ! ds no longer equals ss 0 000032C4 BE[620D] mov si, eld_linkcall + 2 ; ds:si -> ELD source plus one word 0 000032C7 B93E00 mov cx, eld_linkcall_size_w - 2 ; cx = length less two words 0 000032CA AB stosw ; init eldiStartCode 0 000032CB A5 movsw 0 000032CC 260145FE add word [es:di - 2], ax ; init eldiEndCode 0 000032D0 F3A5 rep movsw ; write our ELD 0 000032D2 16 push ss 0 000032D3 1F pop ds 0 000032D4 893E[0000] mov word [extseg_used], di ; -> behind ELD 0 000032D8 83C028 add ax, eld_linkcall.to_code1 - eld_linkcall 0 000032DB A3[0000] mov word [linkcall_table.code1], ax 8570 %if _DUALCODE 8571 add ax, eld_linkcall.to_code2 - eld_linkcall.to_code1 8572 mov word [linkcall_table.code2], ax 8573 add ax, eld_linkcall.to_entry - eld_linkcall.to_code2 8574 %else 0 000032DE 83C0F8 add ax, eld_linkcall.to_entry - eld_linkcall.to_code1 8576 %endif 0 000032E1 A3[0000] mov word [linkcall_table.entry], ax 0 000032E4 C706[0000]0100 mov word [linkcall_table.init], 1 8579 .ret: 0 000032EA 16 push ss 0 000032EB 1F pop ds 0 000032EC 16 push ss 0 000032ED 07 pop es 0 000032EE C3 retn 8585 %endif 8586 8587 %if !_LINK && _LINK_COMPAT 8588 %ifn _ONLY386 || _ONLYNON386 8589 align 2, db 0 8590 ; Table of patches that are to be set NOP if running on a 386. 8591 writepatchtable patch_386_table, PATCH_386_TABLE 8592 %undef PATCH_386_TABLE 8593 8594 align 2, db 0 ; align on word boundary 8595 ; Table of patches that are to be set NOP if not running on a 386. 8596 writepatchtable patch_no386_table, PATCH_NO386_TABLE 8597 %undef PATCH_NO386_TABLE 8598 8599 %if _DUALCODE 8600 align 2, db 0 8601 ; Table of patches that are to be set NOP if running on a 386. 8602 writepatchtable patch_386_table2, PATCH_386_TABLE2 8603 %undef PATCH_386_TABLE2 8604 8605 align 2, db 0 ; align on word boundary 8606 ; Table of patches that are to be set NOP if not running on a 386. 8607 writepatchtable patch_no386_table2, PATCH_NO386_TABLE2 8608 %undef PATCH_NO386_TABLE2 8609 %else 8610 %assign __patch_no386_table2_method 0 8611 %assign __patch_386_table2_method 0 8612 %endif 8613 8614 align 2, db 0 8615 ; Table of patches that are to be set NOP if running on a 386. 8616 writepatchtable patch_386_tableentry, PATCH_386_TABLEENTRY 8617 %undef PATCH_386_TABLEENTRY 8618 8619 align 2, db 0 ; align on word boundary 8620 ; Table of patches that are to be set NOP if not running on a 386. 8621 writepatchtable patch_no386_tableentry, PATCH_NO386_TABLEENTRY 8622 %undef PATCH_NO386_TABLEENTRY 8623 %endif 8624 8625 %if _DUALCODE && ! _PM 8626 align 2, db 0 8627 relocate_from_code: 8628 dw PATCH_RELOCATE_FROM_lDEBUG_CODE 8629 .end: 8630 align 2, db 0 8631 relocate_from_code2: 8632 dw PATCH_RELOCATE_FROM_lDEBUG_CODE2 8633 .end: 8634 8635 %unimacro dualcall 1.nolist 8636 ; make sure we do not allow later uses 8637 %endif 8638 %endif === Trace listing source: ../lst/debug.obj/install.lst 1 2 %if 0 3 4 lDebug INSTALL commands 5 6 Copyright (C) 2008-2026 E. C. Masloch 7 8 Usage of the works is permitted provided that this 9 instrument is retained with the works, so that any entity 10 that uses the works is notified of this instrument. 11 12 DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 14 %endif 15 16 %define SOURCEFILENAME "install.asm" 17 %ifidni __OUTPUT_FORMAT__, obj 18 %include "debug.mac" 1 <1> [list -] 14 <3> [list -] 14 <2> [list -] 86 <1> [list -] 86 ------------------ <1> note: Disable usesection detection === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00002477 ???????? eldhSignature: resb 4 ; "ELD1" 0 0000247B ?????? resb 3 ; reserved 0 0000247E ?? resb 1 ; 26 (Ctrl-Z) 0 0000247F ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00002483 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002485 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002487 ???????? eldhDataOffset: resd 1 0 0000248B ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000248D ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000248F ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00002491 ???????? eldhReserved: resb 4 ; reserved 0 00002495 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00002497 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 0000249B ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000249F ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000024A3 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002477 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000247F ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00002483 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002485 ???? 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 0 00002477 ???? 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 0 00002479 ???? eldltAmount: resw 1 0 0000247B ???????? 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 0 00002477 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00002479 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 0000247B ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000247D ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000247F ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002487 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00002477 ???? eldlSignature: resw 1 ; 0E1D1h 0 00002479 ???????? eldlReserved: resw 2 0 0000247D ???? eldlUseLinkHash: resw 1 0 0000247F ???? eldlDataAmount: resw 1 0 00002481 ???? eldlDataPrefixes: resw 1 0 00002483 ???? eldlDataEntries: resw 1 0 00002485 ???? eldlDataAddresses: resw 1 0 00002487 ???? eldlCodeAmount: resw 1 0 00002489 ???? eldlCodePrefixes: resw 1 0 0000248B ???? eldlCodeEntries: resw 1 0 0000248D ???? 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 0 00002477 ???? ifKeyword: resw 1 0 00002479 ???? ifDescription: resw 1 0 0000247B ???? ifOptions: resw 1 0 0000247D ???? ifValue: resw 1 0 0000247F ???? ifTrying: resw 1 0 00002481 ???? 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 0 00002477 ???????? saOffset: resd 1 0 0000247B ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00002477 ???? so16aOffset: resw 1 0 00002479 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00002477 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00002477 ?????? bsJump: resb 3 0 0000247A ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00002477 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00002479 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 0000247A ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 0000247C ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 0000247D ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000247F ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 00002481 ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 00002482 ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00002484 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00002486 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00002488 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 0000248C ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 00002490 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00002494 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00002496 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00002498 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 0000249C ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 0000249E ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00002477 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00002478 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00002479 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 0000247A ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00002489 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00002477 ???????????????? deName: resb 8 0 0000247F ?????? deExt: resb 3 0 00002482 ?? deAttrib: resb 1 0 00002483 ?? dePlusSize: resb 1 0 00002484 ?????????????? resb 7 0 0000248B ???? deClusterHigh: resw 1 0 0000248D ???? deTime: resw 1 0 0000248F ???? deDate: resw 1 0 00002491 ???? deClusterLow: resw 1 0 00002493 ???????? 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 0 100002467 ???????? lsvFirstCluster: resd 1 0 10000246B ???????? lsvFATSector: resd 1 0 10000246F ???? lsvFATSeg: resw 1 0 100002471 ???? lsvLoadSeg: resw 1 0 100002473 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100002457 ???? ldMemoryTop: resw 1 0 100002459 ???? ldLoadTop: resw 1 0 10000245B ???? ldSectorSeg: resw 1 0 10000245D ?? ldFATType: resb 1 92 <2> ldFlags: 0 10000245E ?? ldHasLBA: resb 1 0 10000245F ???? ldClusterSize: resw 1 0 100002461 ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100002463 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100002465 ?? .partition: resb 1 ; byte 0 100002466 ?? .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 <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 0 100002447 ???????? ldRootSector: resd 1 0 10000244B ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 10000244D ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 10000244F ???? ldParasLeft: resw 1 0 100002451 ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 100002437 ???????? ldMaxCluster: resd 1 0 10000243B ???????? ldFileSize: resd 1 0 10000243F ???????? ldCurrentCluster: resd 1 0 100002443 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00002477 ???????? liiSignature: resb 4 ; "NLDR" 0 0000247B ???? liiVersion: resb 2 ; "00" 0 0000247D ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000247F ???? liiAmountParagraphs: resw 1 0 00002481 ???????????? liiReserved: resw 3 0 00002487 ???? 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 0 00002489 ???? 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 0 0000248B ???? 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 0 0000248D ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00002477 ???? lpSize: resw 1 0 00002479 ???? lpCount: resw 1 0 0000247B ???????? lpBuffer: resd 1 0 0000247F ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00002477 ?? piBoot: resb 1 0 00002478 ?????? piStartCHS: resb 3 0 0000247B ?? piType: resb 1 0 0000247C ?????? piEndCHS: resb 3 0 0000247F ???????? piStart: resd 1 0 00002483 ???????? 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 0 00002477 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00002479 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 0000247B ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 0000247D ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000247F ???? lsOptions: resw 1 ; option flags 0 00002481 ???? lsSegment: resw 1 ; => where to load file 0 00002483 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00002487 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 0000248B ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 0000248D ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 0000248F ???????????????? 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 0 00002477 ???? exact_struc_at 00h, exeSignature: resw 1 0 00002479 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 0000247B ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 0000247D ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000247F ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 00002481 ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00002483 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00002485 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00002487 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00002489 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 0000248B ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 0000248D ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 0000248F ???? 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. 0 00002491 ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00002477 ???? ifhHandle: resw 1 0 00002479 ???? ifhFlags: resw 1 0 0000247B ???????? 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 <1> areastrucEntry: resb 24 0 0000248F ???????? areastrucNext: resd 1 0 00002493 ???????? areastrucPrev: resd 1 0 00002497 ???? areastrucSubAmount: resw 1 0 00002499 ???? areastrucSubOffset: resw 1 0 0000249B ???? areastrucFunAmount: resw 1 0 0000249D ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00002477 ???????? areastrucsubLinear: resd 1 0 0000247B ???????? areastrucsubLinearEnd: resd 1 0 0000247F ???? areastrucsubListOffset: resw 1 0 00002481 ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00002477 ???????? areastrucfunLinear: resd 1 0 0000247B ???????? areastrucfunLinearEnd: resd 1 0 0000247F ???? areastrucfunListOffset: resw 1 0 00002481 ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00002477 ???? areastart: resw 1 0 00002479 ???? areaend: resw 1 0 0000247B ???? areamessage: resw 1 0 0000247D ???? 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 0 00002477 ???? 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.) 0 00002479 ???? ivFlags: resw 1 0 0000247B ???? 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. 0 0000247D ???? 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 0 0000247F ?? 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. 0 00002480 ?? 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 0 00002477 ???????? mrLinear: resd 1 0 0000247B ???????? mrOffset: resd 1 0 0000247F ???? mrSegmentSelector: resw 1 0 00002481 ???? mrFlags: resw 1 0 00002483 ???????? 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 0 00002477 ???????? .size_: resd 1 0 0000247B ???? .srchdl: resw 1 0 0000247D ???????? .srcadr: resd 1 0 00002481 ???? .dsthdl: resw 1 0 00002483 ???????? .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 19 %endif 20 21 22 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 22 ------------------ note: usesection lDEBUG_CODE 23 24 uninstall: 0 00005C6A B9[8B00] mov cx, install.clear 0 00005C6D EB13 jmp install.common 27 28 install: 0 00005C6F B9[5000] mov cx, .toggle 0 00005C72 E8[0000] call skipcomm0 0 00005C75 4E dec si 0 00005C76 BA[0000] mov dx, msg.toggle 0 00005C79 E8[0000] call isstring? 0 00005C7C AC lodsb 0 00005C7D 7403 je .common 0 00005C7F B9[6700] mov cx, .set 37 38 .common: 0 00005C82 E8[0000] call skipcomm0 0 00005C85 56 push si 41 .loopcheck: 0 00005C86 4E dec si 0 00005C87 E8A000 call checkinstallflag ; valid command ? (errors out if no) 0 00005C8A E8[0000] call skipcomma 0 00005C8D E8[0000] call iseol? 0 00005C90 75F4 jne .loopcheck 47 0 00005C92 5E pop si 49 .loopdo: 0 00005C93 4E dec si 0 00005C94 E89300 call checkinstallflag ; re-detect which it is, cannot fail 0 00005C97 8B5702 mov dx, word [bx + ifDescription] 0 00005C9A 8B7F04 mov di, word [bx + ifOptions] 0 00005C9D 8B4706 mov ax, word [bx + ifValue] 0 00005CA0 85FF test di, di ; normal with options pointer ? 0 00005CA2 7503 jnz @F ; yes --> 0 00005CA4 FFD0 call ax ; call ifValue function pointer 0 00005CA6 A9 db __TEST_IMM16 ; (skip call cx) 59 @@: 0 00005CA7 FFD1 call cx ; call install.set or install.clear 0 00005CA9 E8[0000] call skipcomma 0 00005CAC E8[0000] call iseol? 0 00005CAF 75E2 jne .loopdo 0 00005CB1 C3 retn 65 66 67 ; OUT: ZR if not reverse 68 .isreverse: 69 ; (n & (n - 1)) != 0 0 00005CB2 53 push bx 0 00005CB3 89C3 mov bx, ax 0 00005CB5 4B dec bx 0 00005CB6 21C3 and bx, ax 0 00005CB8 5B pop bx 0 00005CB9 C3 retn 76 77 78 .toggle: 0 00005CBA E8F5FF call .isreverse 0 00005CBD 740A jz .togglenormal 81 82 .togglereverse: 0 00005CBF F7D0 not ax 0 00005CC1 3105 xor word [di], ax 0 00005CC3 8505 test word [di], ax 0 00005CC5 7421 jz .settry 0 00005CC7 EB06 jmp @F 88 89 .togglenormal: 0 00005CC9 3105 xor word [di], ax 0 00005CCB 8505 test word [di], ax 0 00005CCD 7519 jnz .settry 93 @@: 0 00005CCF EB3B jmp .cleartry 95 96 97 .set: 0 00005CD1 E8DEFF call .isreverse 0 00005CD4 740C jz .setnormal 100 101 .setreverse: 0 00005CD6 F7D0 not ax 0 00005CD8 8505 test word [di], ax ; already clear ? 0 00005CDA 7410 jz @F ; yes --> 0 00005CDC F7D0 not ax 0 00005CDE 2105 and word [di], ax ; clear flag 0 00005CE0 EB06 jmp .settry 108 109 110 .setnormal: 0 00005CE2 8505 test word [di], ax ; already set ? 0 00005CE4 7506 jnz @F ; yes --> 0 00005CE6 0905 or word [di], ax ; set flag 114 .settry: 0 00005CE8 F8 clc ; NC = setting 0 00005CE9 FF6708 jmp near [bx + ifTrying]; call try handler 117 118 @@: 0 00005CEC E8[0000] call putsz 0 00005CEF BA[0000] mov dx, msg.alreadyenabled 121 .putsz: 0 00005CF2 E9[0000] jmp putsz 123 124 125 .clear: 0 00005CF5 E8BAFF call .isreverse 0 00005CF8 740A jz .clearnormal 128 129 .clearreverse: 0 00005CFA F7D0 not ax 0 00005CFC 8505 test word [di], ax ; already set ? 0 00005CFE 7510 jnz @F 0 00005D00 0905 or word [di], ax ; set flag 0 00005D02 EB08 jmp .cleartry 135 136 .clearnormal: 0 00005D04 8505 test word [di], ax ; already clear ? 0 00005D06 7408 jz @F ; yes --> 0 00005D08 F7D0 not ax ; get mask value 0 00005D0A 2105 and word [di], ax ; clear flag 141 .cleartry: 0 00005D0C F9 stc ; CY = clearing 0 00005D0D FF6708 jmp near [bx + ifTrying]; call try handler 144 145 @@: 0 00005D10 E8[0000] call putsz 0 00005D13 BA[0000] mov dx, msg.alreadydisabled 0 00005D16 EBDA jmp .putsz 149 150 151 install_trying: 0 00005D18 7208 jc .clear 153 .set: 0 00005D1A E8[0000] call putsz 0 00005D1D BA[0000] mov dx, msg.tryenable 0 00005D20 EB06 jmp .putsz 157 158 .clear: 0 00005D22 E8[0000] call putsz 0 00005D25 BA[0000] mov dx, msg.trydisable 161 .putsz: 0 00005D28 EBC8 jmp install.putsz 163 164 checkinstallflag: 0 00005D2A BB[F4FF] mov bx, installflags - INSTALLFLAG_size 166 @@: 0 00005D2D 83C30C add bx, INSTALLFLAG_size 0 00005D30 8B17 mov dx, word [bx + ifKeyword] 0 00005D32 85D2 test dx, dx 0 00005D34 7406 jz .error 0 00005D36 E8[0000] call isstring? 0 00005D39 75F2 jne @B 0 00005D3B C3 retn 174 175 .error: 0 00005D3C E9[0000] jmp error 177 178 179 %if _AREAS && _AREAS_HOOK_CLIENT 180 install_areas: 181 cmp cx, install.clear 182 je .uninstall 183 cmp cx, install.toggle 184 jne .install 185 186 .toggle: 187 cmp word [areas_struc + areastrucEntry], 0CBF9h 188 je .install 189 .uninstall: 190 jmp uninstall_areas 191 192 .install: 193 push si 194 push cx 195 cmp word [areas_struc + areastrucEntry], 0CBF9h 196 je @F 197 mov dx, msg.areasalreadyinstalled 198 mov ax, 0703h 199 .setrc_putsz_ret: 200 call setrc 201 .putsz_ret: 202 call putsz 203 pop cx 204 pop si 205 retn 206 207 @@: 208 call findinstalleddebugger 209 ; CHG: si, di, es, ax, cx, dx 210 push ss 211 pop es 212 jnc @F 213 214 mov dx, msg.areasnodebuggerfound 215 mov ax, 0704h 216 jmp .setrc_putsz_ret 217 218 @@: 219 mov al, 33h 220 mov bx, areas_struc 221 %if _PM 222 mov dx, word [pspdbg] 223 call call_int2D 224 %else 225 mov dx, ss 226 int 2Dh ; install areas 227 %endif 228 push ss 229 pop ds 230 push ss 231 pop es 232 233 test al, al 234 jz .not_supported 235 cmp al, -1 236 je .installed 237 mov di, msg.areasnotinstalled.code 238 call hexbyte 239 mov dx, msg.areasnotinstalled 240 mov ax, 0702h 241 jmp .setrc_putsz_ret 242 243 .not_supported: 244 mov dx, msg.areasnotsupported 245 mov ax, 0701h 246 jmp .setrc_putsz_ret 247 248 .installed: 249 mov dx, msg.areasinstalled 250 jmp .putsz_ret 251 252 253 uninstall_areas: 254 push si 255 ; cx != 0 256 push cx 257 cmp word [areas_struc + areastrucEntry], 0CBF9h 258 jne .is_installed 259 mov dx, msg.areasalreadyuninstalled 260 mov ax, 0705h 261 .setrc_putsz_ret: 262 jmp install_areas.setrc_putsz_ret 263 .putsz_ret: 264 jmp install_areas.putsz_ret 265 266 267 .qq_entry: 268 push si 269 xor cx, cx 270 push cx 271 cmp word [areas_struc + areastrucEntry], 0CBF9h 272 jne .is_installed 273 ; (NC) 274 .ret: 275 pop cx 276 pop si 277 retn 278 279 .ret_qq: 280 cmp al, 0FFh 281 jb .ret ; --> (CY) 282 cmp word [areas_struc + areastrucEntry], 0CBF9h 283 je .ret ; --> (NC) 284 stc 285 jmp .ret 286 287 288 .is_installed: 289 mov al, 0 290 %if _PM 291 call ispm 292 jnz .86m 293 subcpu 286 294 .pm: 295 lframe none 296 lvar 32h, 86m_call_struc 297 lenter 298 mov word [bp + ?86m_call_struc +1Ch], ax ; eax 299 xor ax, ax 300 mov word [bp + ?86m_call_struc +20h], ax ; flags 301 mov word [bp + ?86m_call_struc +0Ch + 2], ax 302 mov word [bp + ?86m_call_struc +0Ch], ax 303 mov word [bp + ?86m_call_struc +2Eh], ax ; sp 304 mov word [bp + ?86m_call_struc +30h], ax ; ss 305 mov word [bp + ?86m_call_struc +22h], ax ; es 306 mov word [bp + ?86m_call_struc +24h], ax ; ds 307 mov ax, word [pspdbg] 308 mov word [bp + ?86m_call_struc +2Ah], areas_struc + areastrucEntry 309 ; ip 310 mov word [bp + ?86m_call_struc +2Ch], ax ; cs 311 ; push ss 312 ; pop es ; => stack 313 lea di, [bp + ?86m_call_struc] ; -> 86-Mode call structure 314 _386 movzx edi, di ; (previously checked b[dpmi32] here) 315 xor bx, bx ; flags/reserved 316 xor cx, cx ; do not copy from PM stack 317 mov ax, 0301h 318 int 31h ; call 86 mode function with far return 319 mov ah, byte [bp + ?86m_call_struc +20h] ; flags 320 sahf 321 mov ax, word [bp + ?86m_call_struc +1Ch] ; eax 322 lleave 323 subcpureset 324 jmp .common 325 %endif 326 .86m: 327 push cs 328 call .86m_to_entry_areas_struc 329 .common: 330 pop cx 331 push cx 332 push ss 333 pop ds 334 push ss 335 pop es 336 jcxz .ret_qq 337 mov di, msg.areasuninstalled.code 338 call hexbyte 339 mov dx, msg.areasuninstalled 340 jmp .putsz_ret 341 342 .86m_to_entry_areas_struc: 343 mov bx, areas_struc + areastrucEntry 344 push ss 345 push bx 346 retf 347 %endif === Trace listing source: ../lst/debug.obj/ints.lst 1 2 %if 0 3 4 Interrupt hooking and unhooking 5 6 2026 by E. C. Masloch 7 8 Usage of the works is permitted provided that this 9 instrument is retained with the works, so that any entity 10 that uses the works is notified of this instrument. 11 12 DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 14 %endif 15 16 %define SOURCEFILENAME "ints.asm" 17 %ifidni __OUTPUT_FORMAT__, obj 18 %include "debug.mac" 1 <1> [list -] 14 <3> [list -] 14 <2> [list -] 86 <1> [list -] 86 ------------------ <1> note: Disable usesection detection === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00002477 ???????? eldhSignature: resb 4 ; "ELD1" 0 0000247B ?????? resb 3 ; reserved 0 0000247E ?? resb 1 ; 26 (Ctrl-Z) 0 0000247F ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00002483 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002485 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002487 ???????? eldhDataOffset: resd 1 0 0000248B ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000248D ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000248F ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00002491 ???????? eldhReserved: resb 4 ; reserved 0 00002495 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00002497 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 0000249B ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000249F ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000024A3 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002477 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000247F ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00002483 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002485 ???? 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 0 00002477 ???? 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 0 00002479 ???? eldltAmount: resw 1 0 0000247B ???????? 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 0 00002477 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00002479 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 0000247B ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000247D ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000247F ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002487 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00002477 ???? eldlSignature: resw 1 ; 0E1D1h 0 00002479 ???????? eldlReserved: resw 2 0 0000247D ???? eldlUseLinkHash: resw 1 0 0000247F ???? eldlDataAmount: resw 1 0 00002481 ???? eldlDataPrefixes: resw 1 0 00002483 ???? eldlDataEntries: resw 1 0 00002485 ???? eldlDataAddresses: resw 1 0 00002487 ???? eldlCodeAmount: resw 1 0 00002489 ???? eldlCodePrefixes: resw 1 0 0000248B ???? eldlCodeEntries: resw 1 0 0000248D ???? 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 0 00002477 ???? ifKeyword: resw 1 0 00002479 ???? ifDescription: resw 1 0 0000247B ???? ifOptions: resw 1 0 0000247D ???? ifValue: resw 1 0 0000247F ???? ifTrying: resw 1 0 00002481 ???? 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 0 00002477 ???????? saOffset: resd 1 0 0000247B ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00002477 ???? so16aOffset: resw 1 0 00002479 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00002477 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00002477 ?????? bsJump: resb 3 0 0000247A ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00002477 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00002479 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 0000247A ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 0000247C ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 0000247D ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000247F ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 00002481 ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 00002482 ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00002484 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00002486 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00002488 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 0000248C ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 00002490 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00002494 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00002496 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00002498 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 0000249C ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 0000249E ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00002477 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00002478 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00002479 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 0000247A ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00002489 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00002477 ???????????????? deName: resb 8 0 0000247F ?????? deExt: resb 3 0 00002482 ?? deAttrib: resb 1 0 00002483 ?? dePlusSize: resb 1 0 00002484 ?????????????? resb 7 0 0000248B ???? deClusterHigh: resw 1 0 0000248D ???? deTime: resw 1 0 0000248F ???? deDate: resw 1 0 00002491 ???? deClusterLow: resw 1 0 00002493 ???????? 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 0 100002467 ???????? lsvFirstCluster: resd 1 0 10000246B ???????? lsvFATSector: resd 1 0 10000246F ???? lsvFATSeg: resw 1 0 100002471 ???? lsvLoadSeg: resw 1 0 100002473 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100002457 ???? ldMemoryTop: resw 1 0 100002459 ???? ldLoadTop: resw 1 0 10000245B ???? ldSectorSeg: resw 1 0 10000245D ?? ldFATType: resb 1 92 <2> ldFlags: 0 10000245E ?? ldHasLBA: resb 1 0 10000245F ???? ldClusterSize: resw 1 0 100002461 ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100002463 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100002465 ?? .partition: resb 1 ; byte 0 100002466 ?? .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 <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 0 100002447 ???????? ldRootSector: resd 1 0 10000244B ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 10000244D ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 10000244F ???? ldParasLeft: resw 1 0 100002451 ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 100002437 ???????? ldMaxCluster: resd 1 0 10000243B ???????? ldFileSize: resd 1 0 10000243F ???????? ldCurrentCluster: resd 1 0 100002443 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00002477 ???????? liiSignature: resb 4 ; "NLDR" 0 0000247B ???? liiVersion: resb 2 ; "00" 0 0000247D ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000247F ???? liiAmountParagraphs: resw 1 0 00002481 ???????????? liiReserved: resw 3 0 00002487 ???? 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 0 00002489 ???? 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 0 0000248B ???? 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 0 0000248D ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00002477 ???? lpSize: resw 1 0 00002479 ???? lpCount: resw 1 0 0000247B ???????? lpBuffer: resd 1 0 0000247F ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00002477 ?? piBoot: resb 1 0 00002478 ?????? piStartCHS: resb 3 0 0000247B ?? piType: resb 1 0 0000247C ?????? piEndCHS: resb 3 0 0000247F ???????? piStart: resd 1 0 00002483 ???????? 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 0 00002477 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00002479 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 0000247B ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 0000247D ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000247F ???? lsOptions: resw 1 ; option flags 0 00002481 ???? lsSegment: resw 1 ; => where to load file 0 00002483 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00002487 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 0000248B ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 0000248D ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 0000248F ???????????????? 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 0 00002477 ???? exact_struc_at 00h, exeSignature: resw 1 0 00002479 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 0000247B ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 0000247D ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000247F ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 00002481 ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00002483 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00002485 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00002487 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00002489 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 0000248B ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 0000248D ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 0000248F ???? 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. 0 00002491 ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00002477 ???? ifhHandle: resw 1 0 00002479 ???? ifhFlags: resw 1 0 0000247B ???????? 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 <1> areastrucEntry: resb 24 0 0000248F ???????? areastrucNext: resd 1 0 00002493 ???????? areastrucPrev: resd 1 0 00002497 ???? areastrucSubAmount: resw 1 0 00002499 ???? areastrucSubOffset: resw 1 0 0000249B ???? areastrucFunAmount: resw 1 0 0000249D ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00002477 ???????? areastrucsubLinear: resd 1 0 0000247B ???????? areastrucsubLinearEnd: resd 1 0 0000247F ???? areastrucsubListOffset: resw 1 0 00002481 ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00002477 ???????? areastrucfunLinear: resd 1 0 0000247B ???????? areastrucfunLinearEnd: resd 1 0 0000247F ???? areastrucfunListOffset: resw 1 0 00002481 ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00002477 ???? areastart: resw 1 0 00002479 ???? areaend: resw 1 0 0000247B ???? areamessage: resw 1 0 0000247D ???? 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 0 00002477 ???? 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.) 0 00002479 ???? ivFlags: resw 1 0 0000247B ???? 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. 0 0000247D ???? 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 0 0000247F ?? 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. 0 00002480 ?? 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 0 00002477 ???????? mrLinear: resd 1 0 0000247B ???????? mrOffset: resd 1 0 0000247F ???? mrSegmentSelector: resw 1 0 00002481 ???? mrFlags: resw 1 0 00002483 ???????? 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 0 00002477 ???????? .size_: resd 1 0 0000247B ???? .srchdl: resw 1 0 0000247D ???????? .srcadr: resd 1 0 00002481 ???? .dsthdl: resw 1 0 00002483 ???????? .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 19 %endif 20 21 22 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 22 ------------------ note: usesection lDEBUG_CODE 23 24 25 ; INP: 86 Mode ss = word [pspdbg] = cs for handler 26 ; si -> handler entrypoint 27 ; dword [si + ieNext] = storage for next vector 28 ; al = interrupt number 29 ; CHG: ax, bx, cx, dx 30 ; STT: ss = ds (= word [pspdbg] if in 86 Mode) 31 install_86m_interrupt_handler: 32 %if _PM 33 call ispm 34 jnz .rm 35 36 xchg ax, bx ; bl = interrupt number 37 mov ax, 0200h 38 int 31h ; cx:dx = interrupt vector 39 mov word [si + ieNext], dx 40 mov word [si + ieNext + 2], cx 41 42 mov ax, 0201h 43 ; bl still = interrupt number 44 mov cx, word [pspdbg] ; cx => lDEBUG_DATA_ENTRY 45 mov dx, si ; cx:dx -> our entrypoint 46 int 31h ; change vector to our handler 47 retn 48 49 .rm: 50 %endif 51 0 00005D3F E8[0000] call InDOS 0 00005D42 7419 jz .notindos 0 00005D44 06 push es 0 00005D45 1E push ds 56 %if 0 && _PM 57 push ax 58 call push_if 59 %else 0 00005D46 9C pushf 61 %endif 0 00005D47 E82600 call access_ivt_86m 0 00005D4A C417 les dx, [bx] ; es:dx = vector 0 00005D4C 36895402 mov word [ss:si + ieNext], dx 0 00005D50 368C4404 mov word [ss:si + ieNext + 2], es 66 ; save prior vector 0 00005D54 8937 mov word [bx], si 0 00005D56 8C5702 mov word [bx + 2], ss ; ss => lDEBUG_DATA_ENTRY 69 ; change vector to our handler 70 %if 0 && _PM 71 call pop_if 72 %else 0 00005D59 9D popf 74 %endif 0 00005D5A 1F pop ds 0 00005D5B 07 pop es 0 00005D5C C3 retn 78 79 .notindos: 0 00005D5D 06 push es 0 00005D5E B435 mov ah, 35h 0 00005D60 CD21 int 21h 0 00005D62 895C02 mov word [si + ieNext], bx 0 00005D65 8C4404 mov word [si + ieNext + 2], es 0 00005D68 07 pop es 0 00005D69 B425 mov ah, 25h 0 00005D6B 89F2 mov dx, si ; ds => lDEBUG_DATA_ENTRY 0 00005D6D CD21 int 21h ; change vector to our handler 0 00005D6F C3 retn 90 91 92 ; INP: al = interrupt number 93 ; OUT: ds:bx -> vector in IVT 94 ; DI 95 ; STT: 86 Mode 96 access_ivt_86m: 0 00005D70 31DB xor bx, bx 0 00005D72 8EDB mov ds, bx 0 00005D74 88C3 mov bl, al 0 00005D76 01DB add bx, bx 0 00005D78 01DB add bx, bx ; ds:bx -> interrupt vector 0 00005D7A FA cli 0 00005D7B C3 retn 104 105 106 %if _PM 107 get_86m_interrupt_handler_no_dos: 108 call ispm 109 jnz get_86m_interrupt_handler.rm_indos 110 %endif 111 112 ; INP: al = interrupt number 113 ; OUT: dx:bx = 86 Mode far pointer 114 ; CHG: ah 115 get_86m_interrupt_handler: 116 %if _PM 117 call ispm 118 jnz .rm 119 120 push ax 121 push cx 122 xchg ax, bx ; bl = interrupt number 123 mov ax, 0200h 124 int 31h ; cx:dx = interrupt vector 125 xchg cx, bx ; bx:dx 126 xchg bx, dx ; dx:bx 127 pop cx 128 pop ax 129 retn 130 131 .rm: 132 %endif 133 0 00005D7C E8[0000] call InDOS 0 00005D7F 740D jz .notindos 136 %ifn _PM 137 get_86m_interrupt_handler_no_dos: equ $ 138 %endif 139 .rm_indos: 0 00005D81 1E push ds 141 %if 0 && _PM 142 push ax 143 call push_if 144 %else 0 00005D82 9C pushf 146 %endif 0 00005D83 E8EAFF call access_ivt_86m 0 00005D86 8B5702 mov dx, word [bx + 2] 0 00005D89 8B1F mov bx, word [bx] 150 %if 0 && _PM 151 call pop_if 152 %else 0 00005D8B 9D popf 154 %endif 0 00005D8C 1F pop ds 0 00005D8D C3 retn 157 158 .notindos: 0 00005D8E 06 push es 0 00005D8F B435 mov ah, 35h 0 00005D91 CD21 int 21h 0 00005D93 8CC2 mov dx, es 0 00005D95 07 pop es 0 00005D96 C3 retn 165 166 167 ; INP: al = interrupt number 168 ; OUT: ZR if offset = -1 or segment = 0 169 ; NZ else 170 ; CHG: ah, dx, bx 171 intchk: section_of_function 0 00005D97 E8E2FF call get_86m_interrupt_handler 0 00005D9A 43 inc bx 0 00005D9B 7402 jz @F ; was 0FFFFh --> 0 00005D9D 85D2 test dx, dx 176 ; jz @F ; was 0000h --> 177 @@: 0 00005D9F C3 retn 179 180 181 ; INP: al = interrupt number 182 ; dx:bx = 86 Mode far pointer 183 ; CHG: ah 184 set_86m_interrupt_handler: 0 00005DA0 50 push ax 0 00005DA1 53 push bx 0 00005DA2 51 push cx 0 00005DA3 52 push dx 189 %if _PM 190 call ispm 191 jnz .rm 192 193 xchg ax, bx ; bl = interrupt number, 194 ; dx:ax = vector 195 xchg ax, dx ; ax:dx 196 xchg cx, ax ; cx:dx 197 mov ax, 0201h 198 int 31h ; cx:dx = interrupt vector 199 jmp .ret 200 201 .rm: 202 %endif 203 0 00005DA4 1E push ds 0 00005DA5 E8[0000] call InDOS 0 00005DA8 740D jz .notindos 207 %if 0 && _PM 208 push ax 209 call push_if 210 %else 0 00005DAA 9C pushf 212 %endif 0 00005DAB 53 push bx 0 00005DAC E8C1FF call access_ivt_86m 0 00005DAF 895702 mov word [bx + 2], dx 0 00005DB2 8F07 pop word [bx] 217 %if 0 && _PM 218 call pop_if 219 %else 0 00005DB4 9D popf 221 %endif 0 00005DB5 EB08 jmp .ret_ds 223 224 .notindos: 0 00005DB7 87DA xchg bx, dx 0 00005DB9 8EDB mov ds, bx ; ds:dx = vector 0 00005DBB B425 mov ah, 25h 0 00005DBD CD21 int 21h 229 .ret_ds: 0 00005DBF 1F pop ds 231 .ret: 0 00005DC0 5A pop dx 0 00005DC1 59 pop cx 0 00005DC2 5B pop bx 0 00005DC3 58 pop ax 0 00005DC4 C3 retn 237 238 239 ; INP: dx = 86 Mode segment to access 240 ; OUT: es => segment 241 ; CHG: - 242 %if _PM 243 setes2dx: section_of_function 244 call ispm 245 jnz @F 246 push bx 247 call setrmsegm 248 mov es, bx 249 pop bx 250 retn 251 252 @@: 253 mov es, dx 254 retn 255 %endif ; _PM 256 257 258 ; INP: ds:si -> source IISP header (or pseudo header) 259 ; es:di -> destination IISP header 260 ; OUT: IF unmodified (may be DI during update) 261 ; si and di both incremented by 6 262 ; CHG: - 263 ; STT: UP 264 update_iisp_header: 265 %if 1 ; !_LOADER 0 00005DC5 50 push ax 0 00005DC6 51 push cx 0 00005DC7 52 push dx 0 00005DC8 57 push di 0 00005DC9 56 push si 0 00005DCA 06 push es 272 %if _PM 273 dualcall selector_to_segment 274 %endif 0 00005DCB 1E push ds 0 00005DCC 16 push ss 0 00005DCD 1F pop ds 0 00005DCE E81D00 call findinstalleddebugger 0 00005DD1 A3[0000] mov word [debuggerfunction], ax 0 00005DD4 1F pop ds ; must be not using scratchsel ! 281 %if _PM 282 pop dx 283 call setes2dx ; this one uses scratchsel 284 %else 0 00005DD5 07 pop es 286 %endif 0 00005DD6 5E pop si 0 00005DD7 5F pop di 0 00005DD8 5A pop dx 0 00005DD9 59 pop cx 0 00005DDA 85C0 test ax, ax ; found the debugger ? 0 00005DDC 7408 jz @F ; no --> 293 %if _PM 294 call ispm 295 jnz .86m 296 [cpu 286] 297 push es ; es 298 dualcall selector_to_segment ; convert to segment 299 push ds ; ds 300 dualcall selector_to_segment ; convert to segment 301 push word 2Dh ; int 2Dh 302 push bp ; bp 303 call intcall_return_parameter_es_parameter_ds 304 add sp, 4 ; discard returned ds, es 305 __CPU__ 306 db __TEST_IMM16 ; (skip int) 307 %endif 308 .86m: 0 00005DDE CD2D int 2Dh ; call its Update IISP Header function 0 00005DE0 3CFF cmp al, 0FFh ; supported ? 0 00005DE2 58 pop ax 0 00005DE3 7408 je .ret ; yes. done --> 0 00005DE5 A8 db __TEST_IMM8 ; (skip pop) 314 @@: 0 00005DE6 58 pop ax ; restore ax, then do manual update 316 %endif 317 %if _PM 318 push ax 319 call push_if 320 %else 0 00005DE7 9C pushf 322 %endif 0 00005DE8 FA cli ; try to rest while updating chain 0 00005DE9 A7 cmpsw ; skip over first word (entrypoint) 325 ; (generally xxEBh or 0EA90h) 0 00005DEA A5 movsw 0 00005DEB A5 movsw ; transfer source ieNext to dest ieNext 328 %if _PM 329 call pop_if 330 %else 0 00005DEC 9D popf 332 %endif 333 .ret: 0 00005DED C3 retn 335 336 337 %if 1 ; !_LOADER 338 ; INP: ds = ss = cs 339 ; OUT: CY, ax = 0000h if not found 340 ; NC, al = 30h if found, 341 ; ah = multiplex number 342 ; CHG: si, di, es, cx, dx 343 findinstalleddebugger: 0 00005DEE B02D mov al, 2Dh 0 00005DF0 53 push bx 0 00005DF1 E8A3FF call intchk 0 00005DF4 5B pop bx 0 00005DF5 741E jz .zero 349 0 00005DF7 F606[0300]08 testopt [options3], opt3_no_call_amis 0 00005DFC 7517 jnz .zero 352 0 00005DFE 8A26[0000] mov ah, byte [try_debugger_amis_multiplex_number] 0 00005E02 E81400 call .check 0 00005E05 7305 jnc @F 356 0 00005E07 B4FF mov ah, 0FFh ; start with multiplex number 0FFh 358 .loop: 0 00005E09 E80D00 call .check 360 @@: 0 00005E0C B030 mov al, 30h ; al = 30h to indicate found, ah = multiplex number 0 00005E0E 7308 jnc .end ; if found --> (NC) 0 00005E10 80EC01 sub ah, 1 ; search is backward (to find latest installed first), from 0FFh to 00h including 0 00005E13 73F4 jnc .loop ; try next if we didn't check all yet --> 365 366 .zero: 0 00005E15 31C0 xor ax, ax ; al = 0 to indicate none found 0 00005E17 F9 stc ; (CY) 369 .end: 0 00005E18 C3 retn 371 372 373 ; INP: ah = multiplex number to check 374 ; ds = ss = cs 375 ; OUT: CY if multiplex number unused or no signature match, 376 ; bp, ah, ds unmodified 377 ; NC if match found, 378 ; ah = multiplex number (unmodified) 379 ; CHG: si, di, es, cx, dx 380 .check: 381 %if _CATCHINT2D 0 00005E19 F606[0000]08 testopt [internalflags4], dif4_int_2D_hooked 0 00005E1E 7406 jz @F 0 00005E20 3A26[0000] cmp ah, byte [amis_multiplex_number] 0 00005E24 7414 je .notfound ; do not use our own multiplexer --> 386 @@: 387 %endif 0 00005E26 B000 mov al, 00h ; AMIS installation check 389 %if _PM 390 call call_int2D 391 %else 0 00005E28 CD2D int 2Dh ; AMIS (or "DOS reserved" = iret if no AMIS present) 393 %endif 0 00005E2A 3CFF cmp al, 0FFh 0 00005E2C 750C jne .notfound 0 00005E2E BE[0000] mov si, debuggeramissig ; ds:si -> our AMIS name strings 397 %if _PM 398 call setes2dx 399 %else 0 00005E31 8EC2 mov es, dx ; es:di -> name strings of AMIS multiplexer that just answered 401 %endif 0 00005E33 B90800 mov cx, 8 ; Ignore description, only compare vendor and program name 0 00005E36 F3A7 repe cmpsw 0 00005E38 7401 je .checkret ; ZR, NC = match --> 405 .notfound: 0 00005E3A F9 stc ; CY no match 407 .checkret: 0 00005E3B C3 retn 409 %endif 410 411 412 ; INP: al = interrupt number 413 ; ds:si-> interrupt entry 414 ; dx = flag in word [options4 + 2] to force 415 ; dx = -1 to force unconditionally 416 ; OUT: es = ss 417 ; CY if unhooking failed, 418 ; ds:si preserved 419 ; NC if unhooking successful 420 ; CHG: ah, di, si 421 ; STT: ds = ss => data entry segment/selector 422 ; word [pspdbg] = data entry 86 Mode segment 423 UnhookInterruptForce: 0 00005E3C E80F00 call UnhookInterrupt 0 00005E3F 730C jnc .ret 0 00005E41 83FAFF cmp dx, -1 0 00005E44 7416 je UnhookInterrupt.easy 0 00005E46 8516[0200] test word [options4 + 2], dx 0 00005E4A 7510 jnz UnhookInterrupt.easy 0 00005E4C F9 stc 431 .ret: 0 00005E4D C3 retn 433 434 435 ; INP: al = interrupt number 436 ; ds:si-> interrupt entry 437 ; OUT: es = ss 438 ; CY if unhooking failed, 439 ; ds:si preserved 440 ; NC if unhooking successful 441 ; CHG: ah, di, si 442 ; STT: ds = ss => data entry segment/selector 443 ; word [pspdbg] = data entry 86 Mode segment 444 UnhookInterrupt: 445 ; UnhookInterruptSim (below) only checks if it's possible to unhook this interrupt. 446 ; This function really unhooks the interrupt if possible. 447 ; 448 ; This is to cover the situation when some of the hooked interrupts can unhook, 449 ; but some can't. If the uninstaller would start to unhook the interrupts and then 450 ; catch the interrupt that can't be unhooked the user would end up with a dead TSR 451 ; that's uninstalled halfway. Very bad. 452 ; 453 ; "Simulating" the unhooking first and checking if all interrupts can unhook 454 ; usually will not return such a state. 0 00005E4E E82900 call UnhookInterruptSim 0 00005E51 721E jc .ret ; bad. --> (CY) 0 00005E53 7407 jz .easy 458 .hard: 459 ; "hard" case: UnhookInterruptSim has however already done the work, 460 ; so the hard case is here indeed easier than the easy case. 0 00005E55 56 push si 0 00005E56 E86CFF call update_iisp_header ; copies our stored pointer into the other's entry 0 00005E59 5E pop si ; restore --> header 0 00005E5A EB0D jmp .done 465 .easy: 0 00005E5C 52 push dx 0 00005E5D 53 push bx 0 00005E5E 8B5404 mov dx, word [si + ieNext + 2] 0 00005E61 8B5C02 mov bx, word [si + ieNext] ; get what we stored in the entry 0 00005E64 E839FF call set_86m_interrupt_handler ; easy case - just reset to the value stored 0 00005E67 5B pop bx 0 00005E68 5A pop dx 473 .done: 0 00005E69 834C04FF or word [si + ieNext + 2], -1 0 00005E6D 834C02FF or word [si + ieNext], -1 ; (NC) 476 .ret: 0 00005E71 16 push ss 0 00005E72 07 pop es 0 00005E73 C3 retn 480 481 482 ; INP: al = interrupt number 483 ; ds:si-> interrupt entry 484 ; dx = flag in word [options4 + 2] to force 485 ; ! dx must not be 0FFFFh 486 ; OUT: NC if no error (hard, easy, or forced case) 487 ; CY if error 488 ; CHG: ah, es, di 489 ; STT: ds = ss => data entry segment/selector 490 ; word [pspdbg] = data entry 86 Mode segment 491 UnhookInterruptForceSim: 0 00005E74 8516[0200] test word [options4 + 2], dx 0 00005E78 751D jnz UnhookInterruptSim.retn ; --> (NC) 494 495 496 ; INP: ds:si-> IISP entry 497 ; al = interrupt number 498 ; OUT: NC if no error (either hard or easy case), 499 ; ZR if easy case, 500 ; ds:si-> our IISP entry, containing stored interrupt 501 ; NZ if hard case, 502 ; ds:si-> our IISP entry 503 ; es:di-> IISP entry to modify 504 ; implies dword [es:di + 2] = far pointer to ours 505 ; CY if error (not first handler and no IISP chain to this handler) 506 ; CHG: ah, es, di 507 ; STT: ds = ss => data entry segment/selector 508 ; word [pspdbg] = data entry 86 Mode segment 509 UnhookInterruptSim: 0 00005E7A 52 push dx 0 00005E7B 53 push bx 512 513 ; harden this, check we are an IISP entry 0 00005E7C 1E push ds 0 00005E7D 07 pop es ; es => our handler segment 0 00005E7E 89F3 mov bx, si ; es:bx -> our handler 0 00005E80 E89A00 call IsIISPEntry? ; does it have an IISP header ? 0 00005E83 753B jne .fail ; fail if not 519 0 00005E85 E8F4FE call get_86m_interrupt_handler ; get current vector 0 00005E88 39DE cmp si, bx ; our pointer ? 0 00005E8A 750C jne .hard 0 00005E8C 3916[0000] cmp word [pspdbg], dx ; our segment ? 0 00005E90 7506 jne .hard 525 0 00005E92 80E400 and ah, 00h ; NC, ZR 0 00005E95 5B pop bx 0 00005E96 5A pop dx 529 .retn: 0 00005E97 C3 retn 531 532 .hard: 533 %if _PM 534 call setes2dx 535 %else 0 00005E98 8EC2 mov es, dx 537 %endif 538 539 ; INP: ds:si-> IISP entry 540 ; es:bx-> current interrupt entry 541 ; OUT: CY if error 542 ; NC, NZ if no error, 543 ; ds:si-> our IISP entry 544 ; es:di-> IISP entry to modify 545 ; implies dword [es:di + 2] = far pointer to ours 546 ; CHG: ah, es, di, (bx, dx) 547 ; STT: ds = ss => data entry segment/selector 548 ; word [pspdbg] = data entry 86 Mode segment 0 00005E9A E86A00 call SearchIISPChain 0 00005E9D 7508 jne .harder 551 .found: ; found reference to our interrupt handler 0 00005E9F 89DF mov di, bx ; es:di-> IISP entry that references our's 0 00005EA1 80CCFF or ah, 0FFh ; NC, NZ 0 00005EA4 5B pop bx 0 00005EA5 5A pop dx 0 00005EA6 C3 retn 557 558 .harder: 559 ; Desperate attempt to find IISP entry that references ours by 560 ; searching through the interrupts hooked by other AMIS TSRs. Note 561 ; that the plexer loop will find and search through the list of 562 ; hooked interrupts of the uninstalling TSR itself, but this causes 563 ; no trouble. 564 ; INP: ds:si-> IISP entry 565 ; OUT: CY if error 566 ; NC, NZ if no error, 567 ; ds:si-> our IISP entry 568 ; es:di-> IISP entry to modify 569 ; implies dword [es:di + 2] = far pointer to ours 570 ; CHG: ah, es, di, (bx, dx) 571 ; STT: ds = ss => data entry segment/selector 572 ; word [pspdbg] = data entry 86 Mode segment 0 00005EA7 51 push cx 0 00005EA8 50 push ax ; register with interrupt number last 575 0 00005EA9 B02D mov al, 2Dh 0 00005EAB E8E9FE call intchk ; ZR if offset = -1 or segment = 0 578 ; CHG: ax, dx, bx 0 00005EAE 740E jz .fail_ax_cx 580 0 00005EB0 31C0 xor ax, ax 582 .loopplex: 0 00005EB2 B000 mov al, 00h ; AMIS installation check 584 ; function 0 changes dx, di, cx, al 585 %if _PM 586 call call_int2D 587 %else 0 00005EB4 CD2D int 2Dh ; enquire whether there's anyone 589 %endif 590 ; but we don't care who it might be 0 00005EB6 FEC0 inc al ; = FFh ? 0 00005EB8 740A jz .search ; yes, it is in use --> 593 .nextplex: 0 00005EBA FEC4 inc ah 0 00005EBC 75F4 jnz .loopplex ; try next multiplexer --> 596 .fail_ax_cx: 0 00005EBE 58 pop ax 0 00005EBF 59 pop cx 599 .fail: ; IISP incompatible TSR between current interrupt entry and our entry 600 ; and no AMIS compatible TSR installed on top of our entry 0 00005EC0 F9 stc 0 00005EC1 5B pop bx 0 00005EC2 5A pop dx 0 00005EC3 C3 retn 605 606 ; INP: ah = multiplex number of AMIS TSR to search through 607 ; ss:sp-> interrupt number (byte), must be preserved 608 ; CHG: es, di, dx, bx 609 .search: 0 00005EC4 B004 mov al, 04h 0 00005EC6 5B pop bx 0 00005EC7 53 push bx ; low byte is the interrupt number 613 ; function 4 changes dx, bx, al 614 %if _PM 615 call call_int2D 616 %else 0 00005EC8 CD2D int 2Dh 618 %endif 0 00005ECA 3C03 cmp al, 03h ; returned its interrupt entry ? 620 ; RBIL doesn't explicitly state that this interrupt entry has to 621 ; be IISP compatible. But I'm too lazy to look up the older AMIS, 622 ; and SearchIISPChain checks the interrupt entry anyway. 0 00005ECC 742A je .search_dxbx 0 00005ECE 3C04 cmp al, 04h ; returned list of hooked interrupts ? 0 00005ED0 75E8 jne .nextplex ; no, try next multiplexer --> 0 00005ED2 89DF mov di, bx 0 00005ED4 5B pop bx 0 00005ED5 53 push bx ; bl = interrupt number 0 00005ED6 88D8 mov al, bl 630 .search_intlist_seg: 631 %if _PM 632 call setes2dx 633 %else 0 00005ED8 8EC2 mov es, dx ; es:di-> list 635 %endif 636 .search_intlist: 637 ; Search the returned list for the required interrupt number. 0 00005EDA AE scasb ; our interrupt number ? 0 00005EDB 740A je .search_found_intlist 0 00005EDD 26807DFF2D cmp byte [es:di-1], 2Dh ; was last in list ? 0 00005EE2 74D6 je .nextplex 0 00005EE4 AF scasw ; skip pointer 0 00005EE5 EBF3 jmp short .search_intlist ; try next entry --> 644 645 .search_found_intlist: 0 00005EE7 268B1D mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 0 00005EEA AF scasw ; skip pointer 0 00005EEB 52 push dx ; preserve dx for .search_intlist_seg 0 00005EEC E81800 call SearchIISPChain 0 00005EEF 5A pop dx 0 00005EF0 740D je .search_found ; found entry --> 652 ; This specific jump supports TSRs that hook the same 653 ; interrupt more than once; jumping to .nextplex instead 654 ; (as previously) aborts the search after the first match 655 ; in the interrupt list. This support might become useful. 0 00005EF2 3C2D cmp al, 2Dh ; was last in list ? 0 00005EF4 74C4 je .nextplex 0 00005EF6 EBE0 jmp short .search_intlist_seg 659 660 .search_dxbx: 661 %if _PM 662 call setes2dx 663 %else 0 00005EF8 8EC2 mov es, dx ; es:bx-> (IISP) interrupt entry 665 %endif 666 ; The entry we found now is possibly behind the non-IISP entry that 667 ; terminated our first SearchIISPChain call (at .hard). We then 668 ; possibly might find our entry in this hidden part of the chain. 0 00005EFA E80A00 call SearchIISPChain 0 00005EFD 75BB jne .nextplex ; didn't find our entry in the chain --> 671 .search_found: 0 00005EFF 58 pop ax 0 00005F00 59 pop cx 0 00005F01 EB9C jmp short .found 675 676 677 SearchIISPChain.next: 678 %if _PM 679 ; dx already next segment 680 mov bx, word [es:bx + ieNext] ; get next offset 681 call setes2dx ; point es:bx -> next handler 682 %else 0 00005F03 26C45F02 les bx, [es:bx + ieNext] ; get next interrupt entry 684 %endif 685 686 ; INP: ds:si-> IISP entry 687 ; es:bx-> current interrupt entry 688 ; OUT: NZ if reference to ds:si not found in IISP chain es:bx-> 689 ; ZR if reference found, 690 ; es:bx-> IISP (or uninstalled iHPFS) interrupt entry with reference 691 ; CHG: es, bx, dx 692 SearchIISPChain: 0 00005F07 E81300 call IsIISPEntry? ; that an IISP entry ? 0 00005F0A 7510 jnz .return ; nope --> (NZ) 0 00005F0C 268B5704 mov dx, word [es:bx + ieNext + 2] ; (for _PM: dx = next segment) 0 00005F10 263B7702 cmp si, word [es:bx + ieNext] ; our offset ? 0 00005F14 75ED jne .next ; no, try next --> 0 00005F16 3B16[0000] cmp dx, word [pspdbg] ; our segment ? 0 00005F1A 75E7 jne .next ; no, try next --> 700 .return: ; yes, found (ZR) 0 00005F1C C3 retn 702 703 704 ; INP: es:bx-> interrupt entry 705 ; OUT: NZ if non-IISP entry 706 ; ZR if IISP entry 707 IsIISPEntry?: section_of_function 0 00005F1D 83FBF8 cmp bx, - (ieSignature + 2) ; may access word at offset FFFFh ? 0 00005F20 7728 ja .return ; yes, avoid --> (NZ) 0 00005F22 26817F064B42 cmp word [ es:bx + ieSignature ], "KB" ; "KB"/424Bh ? ("BK" in MASM) 0 00005F28 7520 jne .return 0 00005F2A 26813F90EA cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 0 00005F2F 7419 je .return ; unused IISP entry (created by iHPFS) --> 0 00005F31 26803FEB cmp byte [ es:bx + ieEntry ], 0EBh ; jmp short ... ? 715 ; (This opcode should strictly be jmp short $+18 but there's programs 716 ; that save an additional jmp opcode by jumping directly into their 717 ; code even though it's not right behind the header.) 0 00005F35 7513 jne .return 0 00005F37 26807F09EB cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ... ? 0 00005F3C 740C je .return ; usual IISP entry --> 0 00005F3E 26807F09CB cmp byte [ es:bx + ieJmphwreset ], 0CBh ; retf ? 0 00005F43 7405 je .return ; a shorter variant --> 0 00005F45 26807F09CF cmp byte [ es:bx + ieJmphwreset ], 0CFh ; iret ? 724 .return: 0 00005F4A C3 retn 726 727 728 ; ! might be called with unknown ss 729 update_inttab_optional: 0 00005F4B 50 push ax 0 00005F4C 53 push bx 0 00005F4D 51 push cx 0 00005F4E 52 push dx 0 00005F4F 56 push si 0 00005F50 BE[0000] mov si, inttab_optional 0 00005F53 BB[0000] mov bx, inttab 737 .loop: 0 00005F56 AD lodsw 0 00005F57 91 xchg ax, cx 0 00005F58 E314 jcxz .end 0 00005F5A AD lodsw 0 00005F5B 91 xchg ax, cx 0 00005F5C 92 xchg ax, dx 0 00005F5D AD lodsw 0 00005F5E 92 xchg ax, dx 0 00005F5F 8516[0000] test word [internalflags4], dx 0 00005F63 7407 jz .next 0 00005F65 4B dec bx 0 00005F66 4B dec bx 0 00005F67 890F mov word [bx], cx 0 00005F69 4B dec bx 0 00005F6A 8807 mov byte [bx], al 753 .next: 0 00005F6C EBE8 jmp .loop 755 756 .end: 0 00005F6E 891E[0000] mov word [amisintr_offset], bx 0 00005F72 5E pop si 0 00005F73 5A pop dx 0 00005F74 59 pop cx 0 00005F75 5B pop bx 0 00005F76 58 pop ax 0 00005F77 C3 retn 764 === Trace listing source: ../lst/debug.obj/lineio.lst 1 2 %if 0 3 4 lDebug line input and output 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 "lineio.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00002478 ???????? eldhSignature: resb 4 ; "ELD1" 0 0000247C ?????? resb 3 ; reserved 0 0000247F ?? resb 1 ; 26 (Ctrl-Z) 0 00002480 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00002484 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002486 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002488 ???????? eldhDataOffset: resd 1 0 0000248C ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000248E ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00002490 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00002492 ???????? eldhReserved: resb 4 ; reserved 0 00002496 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00002498 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 0000249C ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000024A0 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000024A4 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002478 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00002480 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00002484 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002486 ???? 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 0 00002478 ???? 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 0 0000247A ???? eldltAmount: resw 1 0 0000247C ???????? 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 0 00002478 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 0000247A ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 0000247C ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000247E ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00002480 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002488 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00002478 ???? eldlSignature: resw 1 ; 0E1D1h 0 0000247A ???????? eldlReserved: resw 2 0 0000247E ???? eldlUseLinkHash: resw 1 0 00002480 ???? eldlDataAmount: resw 1 0 00002482 ???? eldlDataPrefixes: resw 1 0 00002484 ???? eldlDataEntries: resw 1 0 00002486 ???? eldlDataAddresses: resw 1 0 00002488 ???? eldlCodeAmount: resw 1 0 0000248A ???? eldlCodePrefixes: resw 1 0 0000248C ???? eldlCodeEntries: resw 1 0 0000248E ???? 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 0 00002478 ???? ifKeyword: resw 1 0 0000247A ???? ifDescription: resw 1 0 0000247C ???? ifOptions: resw 1 0 0000247E ???? ifValue: resw 1 0 00002480 ???? ifTrying: resw 1 0 00002482 ???? 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 0 00002478 ???????? saOffset: resd 1 0 0000247C ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00002478 ???? so16aOffset: resw 1 0 0000247A ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00002478 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00002478 ?????? bsJump: resb 3 0 0000247B ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00002478 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 0000247A ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 0000247B ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 0000247D ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 0000247E ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 00002480 ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 00002482 ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 00002483 ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00002485 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00002487 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00002489 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 0000248D ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 00002491 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00002495 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00002497 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00002499 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 0000249D ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 0000249F ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00002478 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00002479 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 0000247A ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 0000247B ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 0000248A ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00002478 ???????????????? deName: resb 8 0 00002480 ?????? deExt: resb 3 0 00002483 ?? deAttrib: resb 1 0 00002484 ?? dePlusSize: resb 1 0 00002485 ?????????????? resb 7 0 0000248C ???? deClusterHigh: resw 1 0 0000248E ???? deTime: resw 1 0 00002490 ???? deDate: resw 1 0 00002492 ???? deClusterLow: resw 1 0 00002494 ???????? 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 0 100002468 ???????? lsvFirstCluster: resd 1 0 10000246C ???????? lsvFATSector: resd 1 0 100002470 ???? lsvFATSeg: resw 1 0 100002472 ???? lsvLoadSeg: resw 1 0 100002474 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100002458 ???? ldMemoryTop: resw 1 0 10000245A ???? ldLoadTop: resw 1 0 10000245C ???? ldSectorSeg: resw 1 0 10000245E ?? ldFATType: resb 1 92 <2> ldFlags: 0 10000245F ?? ldHasLBA: resb 1 0 100002460 ???? ldClusterSize: resw 1 0 100002462 ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100002464 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100002466 ?? .partition: resb 1 ; byte 0 100002467 ?? .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 <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 0 100002448 ???????? ldRootSector: resd 1 0 10000244C ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 10000244E ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 100002450 ???? ldParasLeft: resw 1 0 100002452 ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 100002438 ???????? ldMaxCluster: resd 1 0 10000243C ???????? ldFileSize: resd 1 0 100002440 ???????? ldCurrentCluster: resd 1 0 100002444 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00002478 ???????? liiSignature: resb 4 ; "NLDR" 0 0000247C ???? liiVersion: resb 2 ; "00" 0 0000247E ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 00002480 ???? liiAmountParagraphs: resw 1 0 00002482 ???????????? liiReserved: resw 3 0 00002488 ???? 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 0 0000248A ???? 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 0 0000248C ???? 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 0 0000248E ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00002478 ???? lpSize: resw 1 0 0000247A ???? lpCount: resw 1 0 0000247C ???????? lpBuffer: resd 1 0 00002480 ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00002478 ?? piBoot: resb 1 0 00002479 ?????? piStartCHS: resb 3 0 0000247C ?? piType: resb 1 0 0000247D ?????? piEndCHS: resb 3 0 00002480 ???????? piStart: resd 1 0 00002484 ???????? 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 0 00002478 ???? lsKernelName: resw 1 ; -> kernel file default name 0 0000247A ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 0000247C ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 0000247E ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 00002480 ???? lsOptions: resw 1 ; option flags 0 00002482 ???? lsSegment: resw 1 ; => where to load file 0 00002484 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00002488 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 0000248C ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 0000248E ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 00002490 ???????????????? 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 0 00002478 ???? exact_struc_at 00h, exeSignature: resw 1 0 0000247A ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 0000247C ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 0000247E ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 00002480 ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 00002482 ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00002484 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00002486 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00002488 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 0000248A ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 0000248C ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 0000248E ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 00002490 ???? 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. 0 00002492 ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00002478 ???? ifhHandle: resw 1 0 0000247A ???? ifhFlags: resw 1 0 0000247C ???????? 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 <1> areastrucEntry: resb 24 0 00002490 ???????? areastrucNext: resd 1 0 00002494 ???????? areastrucPrev: resd 1 0 00002498 ???? areastrucSubAmount: resw 1 0 0000249A ???? areastrucSubOffset: resw 1 0 0000249C ???? areastrucFunAmount: resw 1 0 0000249E ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00002478 ???????? areastrucsubLinear: resd 1 0 0000247C ???????? areastrucsubLinearEnd: resd 1 0 00002480 ???? areastrucsubListOffset: resw 1 0 00002482 ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00002478 ???????? areastrucfunLinear: resd 1 0 0000247C ???????? areastrucfunLinearEnd: resd 1 0 00002480 ???? areastrucfunListOffset: resw 1 0 00002482 ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00002478 ???? areastart: resw 1 0 0000247A ???? areaend: resw 1 0 0000247C ???? areamessage: resw 1 0 0000247E ???? 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 0 00002478 ???? 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.) 0 0000247A ???? ivFlags: resw 1 0 0000247C ???? 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. 0 0000247E ???? 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 0 00002480 ?? 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. 0 00002481 ?? 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 0 00002478 ???????? mrLinear: resd 1 0 0000247C ???????? mrOffset: resd 1 0 00002480 ???? mrSegmentSelector: resw 1 0 00002482 ???? mrFlags: resw 1 0 00002484 ???????? 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 0 00002478 ???????? .size_: resd 1 0 0000247C ???? .srchdl: resw 1 0 0000247E ???????? .srcadr: resd 1 0 00002482 ???? .dsthdl: resw 1 0 00002484 ???????? .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 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 23 ------------------ note: usesection lDEBUG_CODE 24 25 %define PREFIX 26 %include "isstring.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug string keyword comparison 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2023 E. C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> ; Check for given string (cap-insensitive) 19 <1> ; 20 <1> ; INP: ds:si -> input string to check (either cap), 21 <1> ; terminated by CR (13), NUL, semicolon, space, 22 <1> ; tab, dot, comma, equals, colon, [, ], (, or ) 23 <1> ; es:dx -> ASCIZ string to check (all-caps) 24 <1> ; OUT: Iff string matches, 25 <1> ; ZR, NC 26 <1> ; si -> at separator that terminates the keyword 27 <1> ; else, 28 <1> ; NZ, CY 29 <1> ; si = input si 30 <1> ; STT: ds = es = ss 31 <1> ; CHG: dx, al 32 <1> %[PREFIX]isstring?: 0 00005F78 56 push si 0 00005F79 87D7 xchg dx, di 35 <1> .loop: 0 00005F7B AC lodsb 0 00005F7C E84800 call %[PREFIX]capitalise 0 00005F7F AE scasb 0 00005F80 7506 jne .mismatch 0 00005F82 84C0 test al, al ; NC 0 00005F84 75F5 jne .loop 42 <1> ; ZR 0 00005F86 EB39 jmp .matched_zr_nc 44 <1> 45 <1> .mismatch: 0 00005F88 E85800 call %[PREFIX]iseol? 0 00005F8B 742D je .checkend 0 00005F8D 3C20 cmp al, 32 0 00005F8F 7429 je .checkend 0 00005F91 3C09 cmp al, 9 0 00005F93 7425 je .checkend 0 00005F95 3C2E cmp al, '.' 0 00005F97 7421 je .checkend 0 00005F99 3C2C cmp al, ',' 0 00005F9B 741D je .checkend 0 00005F9D 3C3D cmp al, '=' 0 00005F9F 7419 je .checkend 0 00005FA1 3C3A cmp al, ':' 0 00005FA3 7415 je .checkend 0 00005FA5 3C5B cmp al, '[' 0 00005FA7 7411 je .checkend 0 00005FA9 3C5D cmp al, ']' 0 00005FAB 740D je .checkend 0 00005FAD 3C28 cmp al, '(' 0 00005FAF 7409 je .checkend 0 00005FB1 3C29 cmp al, ')' 0 00005FB3 7405 je .checkend 68 <1> %ifidni PREFIX, init_ 69 <1> %if ELD 70 <1> cmp al, byte [ss:relocateddata] 71 <1> linkdatarelocation swch1 72 <1> %else 73 <1> cmp al, byte [ss:swch1] 74 <1> %endif 75 <1> je .checkend 76 <1> %endif 77 <1> .ret_nz: ; NZ 0 00005FB5 5E pop si 0 00005FB6 F9 stc ; CY 80 <1> .ret: 0 00005FB7 87D7 xchg dx, di 0 00005FB9 C3 retn 83 <1> 84 <1> .checkend: 0 00005FBA 26807DFF00 cmp byte [es:di - 1], 0 0 00005FBF 75F4 jne .ret_nz 87 <1> ; ZR, NC 88 <1> .matched_zr_nc: ; ZR, NC 0 00005FC1 5F pop di ; (discard) 0 00005FC2 8D74FF lea si, [si - 1] ; -> separator (preserve ZR) 0 00005FC5 EBF0 jmp .ret 92 <1> 93 <1> 94 <1> %[PREFIX]capitalise: section_of_function 0 00005FC7 3C61 cmp al, 'a' 0 00005FC9 7206 jb .ret 0 00005FCB 3C7A cmp al, 'z' 0 00005FCD 7702 ja .ret 0 00005FCF 24DF and al, TOUPPER 100 <1> .ret: 0 00005FD1 C3 retn 102 <1> 103 <1> %ifempty PREFIX 104 <1> iseol?_or_then: 105 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00005FD2 F606[0300]08 testopt [internalflags3], dif3_in_if 0 00005FD7 740A jz iseol? 0 00005FD9 BA[0000] mov dx, msg.then 0 00005FDC 4E dec si 0 00005FDD E898FF call isstring? 0 00005FE0 740B je iseol?.ret 0 00005FE2 AC lodsb 113 <1> %endif 114 <1> %endif 115 <1> 116 <1> %[PREFIX]iseol?: 0 00005FE3 3C3B cmp al, ';' 0 00005FE5 7406 je .ret 119 <1> .notsemicolon: 0 00005FE7 3C0D cmp al, 13 ; this *IS* iseol? 0 00005FE9 7402 je .ret 0 00005FEB 3C00 cmp al, 0 123 <1> .ret: 0 00005FED C3 retn 125 <1> 126 <1> 127 <1> ; Skip blanks, then an optional comma, and then more blanks 128 <1> ; 129 <1> ; INP: ds:si -> first character 130 <1> ; OUT: al = first non-blank character behind 131 <1> ; ds:si -> character behind the first non-blank behind 132 <1> ; NC 133 <1> ; STK: 3 word 134 <1> %[PREFIX]skipcomma: section_of_function 0 00005FEE AC lodsb 136 <1> 137 <1> ; Same as above but we already have the first character in al 138 <1> %[PREFIX]skipcomm0: section_of_function 0 00005FEF E82C00 call %[PREFIX]skipwh0 0 00005FF2 3C2C cmp al, ',' 0 00005FF4 7510 jne .return ; if no comma 0 00005FF6 56 push si 0 00005FF7 E82300 call %[PREFIX]skipwhite 0 00005FFA E8E6FF call %[PREFIX]iseol? 0 00005FFD 7504 jne .noteol ; if not end of line 0 00005FFF 5E pop si 0 00006000 B02C mov al, ',' 0 00006002 C3 retn 149 <1> .noteol: 0 00006003 83C402 add sp, byte 2 ; pop si into nowhere 151 <1> .return: 0 00006006 C3 retn 153 <1> 154 <1> 155 <1> ; Skip blanks, then an optional equals sign, then more blanks 156 <1> %[PREFIX]skipequals: section_of_function 0 00006007 AC lodsb 158 <1> %[PREFIX]skipequ0: 0 00006008 E81300 call %[PREFIX]skipwh0 0 0000600B 3C3D cmp al, '=' 0 0000600D 7503 jne .return 0 0000600F E80B00 call %[PREFIX]skipwhite 163 <1> .return: 0 00006012 C3 retn 165 <1> 166 <1> 167 <1> ; Skip alphabetic characters, and then white space 168 <1> ; 169 <1> ; INP: ds:si-> first character 170 <1> ; OUT: al = first non-blank character behind alphabetic characters 171 <1> ; ds:si-> character behind the first non-blank behind alpha. 172 <1> ; NC 173 <1> %[PREFIX]skipalpha: 174 <1> .: 0 00006013 AC lodsb 0 00006014 24DF and al, TOUPPER 0 00006016 2C41 sub al, 'A' 0 00006018 3C19 cmp al, 'Z'-'A' 0 0000601A 76F7 jbe . 0 0000601C 4E dec si 181 <1> 182 <1> ; Skip blanks and tabs 183 <1> ; 184 <1> ; INP: ds:si-> first character 185 <1> ; OUT: al = first non-blank character 186 <1> ; ds:si-> character behind the first non-blank 187 <1> ; NC 188 <1> ; CHG: - 189 <1> ; STK: 1 word 190 <1> %[PREFIX]skipwhite: section_of_function 0 0000601D AC lodsb 192 <1> 193 <1> ; Same as above, but first character in al 194 <1> ; 195 <1> ; INP: al = first character 196 <1> ; ds:si-> next character 197 <1> ; OUT: al = first non-blank character 198 <1> ; ds:si-> character behind the first non-blank 199 <1> ; NC 200 <1> ; CHG: - 201 <1> ; STK: 1 word 202 <1> %[PREFIX]skipwh0: section_of_function 0 0000601E 3C20 cmp al, 32 0 00006020 74FB je %[PREFIX]skipwhite 0 00006022 3C09 cmp al, 9 0 00006024 74F7 je %[PREFIX]skipwhite 0 00006026 F8 clc 0 00006027 C3 retn 27 28 29 ; REM: call skipcomma/skipcomm0 before this! 30 chkeol_or_then: 31 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00006028 E8A7FF call iseol?_or_then 0 0000602B 74C0 je iseol?.ret ; if EOL --> 0 0000602D EB08 jmp @F 35 %endif 36 37 ; Check for end of line 38 ; 39 ; INP: al = first character 40 ; ds:si-> next character 41 ; OUT: ZR 42 ; al = 13 or al = ';' or al = 0 43 ; (does not return if anything on line beside blanks) 44 chkeol: section_of_function 0 0000602F E8ECFF call skipwh0 0 00006032 E8AEFF call iseol? 0 00006035 74B6 je iseol?.ret ; if EOL --> 48 49 @@: 0 00006037 B80001 mov ax, 0100h 0 0000603A E8[0000] call setrc 52 errorj8: 0 0000603D E9[0000] jmp error 54 55 56 ; SHOWSTRING - Print ASCIZ string. 57 showstring.next: 0 00006040 AA stosb 59 showstring: 0 00006041 AC lodsb 0 00006042 84C0 test al, al 0 00006044 75FA jnz .next 0 00006046 C3 retn 64 65 66 ; Dump byte as decimal number string 67 ; 68 ; INP: al = byte 69 ; di-> where to store 70 ; OUT: - 71 ; CHG: di-> behind variable-length string 72 decbyte: 0 00006047 50 push ax 0 00006048 51 push cx 0 00006049 B96400 mov cx, 100 0 0000604C E80B00 call .div 0 0000604F B10A mov cl, 10 0 00006051 E80600 call .div 0 00006054 0430 add al, '0' 0 00006056 AA stosb 0 00006057 59 pop cx 0 00006058 58 pop ax 0 00006059 C3 retn 84 85 .div: 0 0000605A 30E4 xor ah, ah 0 0000605C F6F1 div cl 0 0000605E 08C5 or ch, al 0 00006060 7403 jz .leadingzero 0 00006062 0430 add al, '0' 0 00006064 AA stosb 92 .leadingzero: 0 00006065 86C4 xchg al, ah 0 00006067 C3 retn 95 96 97 decword: section_of_function 0 00006068 52 push dx 0 00006069 31D2 xor dx, dx 0 0000606B E80200 call decdword 0 0000606E 5A pop dx 0 0000606F C3 retn 103 104 105 decdword: section_of_function 0 00006070 51 push cx 0 00006071 31C9 xor cx, cx 0 00006073 E80200 call dec_dword_minwidth 0 00006076 59 pop cx 0 00006077 C3 retn 111 112 113 ; Dump dword as decimal number string 114 ; 115 ; INP: dx:ax = dword 116 ; cx = minimum width (<= 1 for none, must be < 10) 117 ; es:di -> where to store 118 ; OUT: es:di -> behind variable-length string 119 ; CHG: - 120 ; STT: UP 121 dec_dword_minwidth: section_of_function 122 lframe near 123 lequ 10, bufferlen 124 lvar ?bufferlen,buffer 0 00006078 5589E58D66F6 lenter 126 lvar dword, dividend 0 0000607E 52 push dx 0 0000607F 50 push ax 0 00006080 49 dec cx 130 lvar word, minwidth 0 00006081 51 push cx 0 00006082 41 inc cx 133 0 00006083 50 push ax 0 00006084 53 push bx 0 00006085 51 push cx 0 00006086 52 push dx 0 00006087 56 push si 0 00006088 57 push di 0 00006089 06 push es 141 0 0000608A 16 push ss 0 0000608B 07 pop es 144 0 0000608C 8D7EFF lea di, [bp + ?buffer + ?bufferlen - 1] 0 0000608F 89FB mov bx, di 0 00006091 FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 148 149 ; dword [bp + ?dividend] = number to display 0 00006092 B90A00 mov cx, 10 ; divisor 151 .loop_write: 152 0 00006095 31D2 xor dx, dx 0 00006097 57 push di 0 00006098 BF0400 mov di, 4 156 .loop_divide: 0 0000609B 8B43F0 mov ax, [bp + ?dividend - 2 + di] 0 0000609E F7F1 div cx 0 000060A0 8943F0 mov word [bp + ?dividend - 2 + di], ax 0 000060A3 4F dec di 0 000060A4 4F dec di 0 000060A5 75F4 jnz .loop_divide 163 ; dx = last remainder 0 000060A7 5F pop di 0 000060A8 92 xchg ax, dx ; ax = remainder (next digit) 166 ; dword [bp + ?dividend] = result of div 0 000060A9 0430 add al, '0' 0 000060AB AA stosb 0 000060AC FF4EF0 dec word [bp + ?minwidth] 0 000060AF 79E4 jns .loop_write 171 0 000060B1 837EF400 cmp word [bp + ?dividend + 2], 0 0 000060B5 75DE jnz .loop_write 0 000060B7 837EF200 cmp word [bp + ?dividend], 0 175 ; any more ? 0 000060BB 75D8 jnz .loop_write ; loop --> 177 0 000060BD FC cld 179 0 000060BE 29FB sub bx, di 0 000060C0 89D9 mov cx, bx 0 000060C2 89FE mov si, di 0 000060C4 46 inc si 184 0 000060C5 07 pop es 0 000060C6 5F pop di 187 188 @@: 0 000060C7 36A4 ss movsb ; do not replace by rep ss movsb, because 190 ; some 8086 don't like two-prefix opcodes 0 000060C9 E2FC loop @B 192 0 000060CB 5E pop si 0 000060CC 5A pop dx 0 000060CD 59 pop cx 0 000060CE 5B pop bx 0 000060CF 58 pop ax 198 0 000060D0 89EC5D lleave 0 000060D3 C3 retn 201 202 203 ; dump high word of eax - assumes 386 204 hexword_high: section_of_function 205 [cpu 386] 0 000060D4 66C1C010 rol eax, 16 0 000060D8 E80800 call hexword 0 000060DB 66C1C010 rol eax, 16 209 __CPU__ 0 000060DF C3 retn 211 212 213 ; hexdword - dump dword (in eax) to hex ASCII - assumes 386 214 ; HEXWORD - Print hex word (in AX). 215 ; HEXBYTE - Print hex byte (in AL). 216 ; HEXNYB - Print hex digit. 217 ; Uses none. 218 hexdword: section_of_function 0 000060E0 E8F1FF call hexword_high 220 hexword: section_of_function 0 000060E3 86C4 xchg al, ah 0 000060E5 E80200 call hexbyte 0 000060E8 86C4 xchg al, ah 224 225 hexbyte: section_of_function 0 000060EA 51 push cx 0 000060EB B104 mov cl, 4 0 000060ED D2C0 rol al, cl 0 000060EF E80300 call hexnyb 0 000060F2 D2C0 rol al, cl 0 000060F4 59 pop cx 232 233 hexnyb: section_of_function 0 000060F5 50 push ax 0 000060F6 240F and al, 0Fh 236 .common: 237 ; These three instructions change to ASCII hex. 238 ; Refer to https://codegolf.stackexchange.com/questions/193793/little-endian-number-to-string-conversion/193842#193842 0 000060F8 3C0A cmp al, 10 ; set CF according to digit <= 9 0 000060FA 1C69 sbb al, 69h ; read CF, set CF and conditionally set AF 0 000060FC 2F das ; magic, which happens to work 0 000060FD AA stosb 0 000060FE 58 pop ax 0 000060FF C3 retn 245 246 ; TAB_TO - Space fill line_out until reaching the 247 ; column indicated by AX. (Display a new line if 248 ; necessary.) At least two blanks are stored. 249 ; 250 ; INP: es:di -> behind text to display 251 ; es:line_out -> text to display 252 ; es:ax -> destination to tab to, 253 ; if ax >= di + 2 then just put blanks, 254 ; else pass content so far to trimputs 255 ; and fill line_out with blanks afterwards 256 ; OUT: es:di -> tabbed to buffer in line_out 257 ; CHG: ax, bx, cx, dx 258 tab_to: 0 00006100 50 push ax 0 00006101 48 dec ax ; make sure at least two blanks 0 00006102 39F8 cmp ax, di 0 00006104 7706 ja .sameline ; if there's room on this line --> 263 ; below-or-equal: go to next line. 264 ; That is, if we are at the indicated column 265 ; (actually column - 1 due to dec) then make 266 ; a new line. This covers the case of needing 267 ; zero blanks (or one due to dec) as needing 268 ; a new line, but one or more (two or more) go 269 ; to the same line as prior content. 0 00006106 E80B00 call trimputs 0 00006109 BF[0000] mov di, line_out 272 .sameline: 0 0000610C 59 pop cx 0 0000610D 29F9 sub cx, di 0 0000610F B020 mov al, 32 0 00006111 F3AA rep stosb ; space fill to the right end 277 puts.retn: 0 00006113 C3 retn 279 280 ; Trim excess blanks, append linebreak and display line_out. 281 ; 282 ; INP: es:di -> behind last character to display, or blank 283 ; es:line_out -> text to display 284 ; OUT: es:di -> behind displayed text (CR LF inserted) 285 ; CHG: ax, bx, cx, dx 286 ; 287 ; Note: May overflow if line_out only contains blanks. The byte at 288 ; trim_overflow is used to avoid overflows. 289 trimputs: section_of_function 0 00006114 4F dec di 0 00006115 26803D20 cmp byte [es:di], 32 0 00006119 74F9 je trimputs 0 0000611B 47 inc di 294 295 ; Append linebreak and display line_out 296 ; 297 ; INP: es:di -> behind last character to display 298 ; es:line_out -> text to display 299 ; OUT: es:di -> behind displayed text (CR LF inserted) 300 ; STT: all segment registers same 301 ; CHG: ax, bx, cx, dx 302 putsline_crlf: section_of_function 0 0000611C B80D0A mov ax, 10<<8| 13 0 0000611F AB stosw 305 306 ; Display line_out 307 ; 308 ; INP: es:di -> behind last character to display 309 ; es:line_out -> first character to display 310 ; STT: all segment registers same 311 ; CHG: ax, bx, cx, dx 312 putsline: section_of_function 0 00006120 89F9 mov cx, di 0 00006122 BA[0000] mov dx, line_out 0 00006125 29D1 sub cx, dx 316 317 ; Display message 318 ; 319 ; INP: es:dx -> message to display 320 ; cx = length of message 321 ; STT: ds = ss = debugger data selector 322 ; CHG: ax, bx, cx, dx 323 puts: section_of_function 324 ;d4 call d4message 325 ;d4 asciz "In puts first",13,10 326 327 %if _EXTENSIONS 0 00006127 91 xchg ax, cx 0 00006128 8B0E[0000] mov cx, word [ext_puts_handler] 0 0000612C E308 jcxz @F 331 check_section_of puts_ext_next 332 puts_ext_next: equ $ 0 0000612E E98E18 jmp transfer_ext_cx_NC 334 335 check_section_of puts_ext_done 336 puts_ext_done: equ $ 0 00006131 59 pop cx 0 00006132 59 pop cx 0 00006133 59 pop cx ; discard return addresses 0 00006134 72DD jc .retn 341 342 @@: 0 00006136 91 xchg ax, cx 344 %endif 345 346 %if _IMMASM 0 00006137 F606[0300]01 testopt [internalflags6], dif6_immasm_no_output 0 0000613C 75D5 jnz .retn 349 %endif 350 %if _RH 0 0000613E D006[0000] rol byte [skip_rh], 1 0 00006142 7218 jc .no_rh 353 %endif 354 %if !_LOADER 0 00006144 F606[0300]20 testopt [internalflags], tt_silence 0 00006149 7403E94803 jnz puts_silence 357 %endif 358 %if _RH 0 0000614E F606[0200]30 testopt [internalflags6], dif6_rh_mode | dif6_rh_mode_2 0 00006153 7407 jz @F 0 00006155 52 push dx 0 00006156 51 push cx 0 00006157 E83C03 call puts_silence ; also copy to auxbuff 0 0000615A 59 pop cx 0 0000615B 5A pop dx 366 @@: 367 %endif 368 .no_rh: 369 0 0000615C F606[0100]60 testopt [internalflags3], dif3_unquiet 0 00006161 7507 jnz @F 0 00006163 F606[0100]10 testopt [internalflags3], dif3_quiet_output 0 00006168 75A9 jnz .retn 374 @@: 375 376 377 %if _EXTENSIONS 378 ; Only output actually to be displayed reaches this 379 ; hook. However, [more] prompts do not go here. 380 ; They are inserted later. 0 0000616A 91 xchg ax, cx 0 0000616B 8B0E[0000] mov cx, word [ext_puts_copyoutput_handler] 0 0000616F E308 jcxz @F 0 00006171 E94B18 jmp transfer_ext_cx_NC 385 386 check_section_of puts_copyoutput_ext_done 387 puts_copyoutput_ext_done: equ $ 0 00006174 59 pop cx 0 00006175 59 pop cx 0 00006176 59 pop cx ; discard return addresses 0 00006177 729A jc .retn 392 393 @@: 0 00006179 91 xchg ax, cx 395 %endif 396 397 398 ; The following code contains most of the paging support. 399 ; Based on the number of LF characters in the string it 400 ; displays only parts of the string, then interrupts it by 401 ; the "[more]" prompt which waits for any key before 402 ; proceeding. This is ensured to work proper in InDOS mode. 403 ; 404 ; Paging is deactivated if the command's output mustn't be 405 ; paged (clears pagedcommand, which is set by cmd3). It is 406 ; also not used when we output to a file. 0 0000617A F606[0000]10 testopt [options], nonpagingdevice 0 0000617F 7403E93901 jnz .display ; deactivated by user --> 0 00006184 F606[0100]10 testopt [options3], opt3_paging_rc 0 00006189 750A jnz @F ; don't disable for RC 411 ; RC simply does not disable paging here. 412 ; But it can still be disabled in other 413 ; ways as we do not force it enabled for RC. 0 0000618B F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00006190 7403E92801 jnz .display 416 @@: 417 0 00006195 F606[0100]40 testopt [options3], opt3_paging_re 0 0000619A 750C jnz @F ; enable for RE 0 0000619C F606[0300]01 testopt [internalflags3], dif3_input_re 421 ; is RE ? 0 000061A1 7403E91701 jnz .display ; yes, don't do paging --> 0 000061A6 EB07 jmp @FF 424 425 @@: 0 000061A8 F606[0300]01 testopt [internalflags3], dif3_input_re 427 ; is RE ? 0 000061AD 7555 jnz .dontcheckredirection ; yes, do paging --> 429 @@: 430 0 000061AF F606[0100]20 testopt [options3], opt3_paging_yy 0 000061B4 740E jz @F 0 000061B6 F606[0000]10 testopt [serial_flags], sf_use_serial 434 ; I/O done using serial port ? 0 000061BB 7547 jnz .dontcheckredirection ; yes, is paged --> 0 000061BD E8[0000] call InDOS_or_BIOS_IO ; InDOS mode ? 0 000061C0 7542 jnz .dontcheckredirection ; yes, then we display with Int10 anyway --> 0 000061C2 EB2F jmp @FF ; re-use later @@ 439 440 @@: 441 %if _INPUT_FILE_BOOT 0 000061C4 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 000061C9 7403E9EF00 jnz .display 444 %endif 0 000061CE E8[0000] call InDOS_or_BIOS_IO ; InDOS mode ? 0 000061D1 7531 jnz .dontcheckredirection ; yes, then we display with Int10 anyway --> 447 %if _INPUT_FILE_HANDLES 0 000061D3 F606[0200]10 testopt [internalflags2], dif2_input_file 0 000061D8 7403E9E000 jnz .display 450 %endif 0 000061DD F606[0000]10 testopt [serial_flags], sf_use_serial 452 ; I/O done using serial port ? 0 000061E2 7520 jnz .dontcheckredirection ; yes, is paged --> 0 000061E4 E8[0000] call InDOS_or_BIOS_output 0 000061E7 750A jnz @F 0 000061E9 F606[0000]80 testopt [internalflags], outputfile 0 000061EE 7403E9CA00 jnz .display ; output redirected to file. never page --> 458 @@: ; targeted by two branches 0 000061F3 F606[0100]01 testopt [options], nondospaging 0 000061F8 750A jnz .dontcheckredirection 0 000061FA F606[0000]20 testopt [internalflags], inputfile 0 000061FF 7403E9B900 jnz .display ; input redirected from a file. never page --> 463 .dontcheckredirection: 0 00006204 57 push di 0 00006205 51 push cx ; used as variable: remaining (not yet displayed) line length 0 00006206 89D7 mov di, dx ; es:di-> string, cx = length 467 .looplf: 0 00006208 85C9 test cx, cx 0 0000620A 7503E9AC00 jz .display_pop ; end of string (or ended in LF) --> 470 ; Important: We only ever jump back to .looplf when cx 471 ; zero means it's okay to ignore the waiting prompt as 472 ; flagged below. This is (A) at the start of a string, 473 ; where cx is the whole string's length, (B) after 474 ; determining that prompting is not yet necessary, in 475 ; which case the flag was checked earlier already, (C) 476 ; after the flag has been set and a substring was already 477 ; displayed (so cx is again the whole substring's length) 478 ; or (D) just after the prompt was displayed, in which 479 ; case the flag cannot be set. 480 ; In case A and C, when the (sub)string is empty (ie. cx 481 ; is zero) it's crucial to ignore the waiting prompt as 482 ; this is the exact behaviour we want: If nothing is 483 ; displayed anymore before the getline code prompts 484 ; anyway, do not display our prompt. 0 0000620F F606[0200]10 testopt [internalflags], promptwaiting ; do we have a prompt to display ? 0 00006214 7550 jnz .promptnow ; yes, display it before the string --> 487 0 00006216 31C0 xor ax, ax 0 00006218 F606[0000]10 testopt [serial_flags], sf_use_serial 490 ; serial ? 0 0000621D 7409 jz @F ; no --> 0 0000621F 0A06[0000] or al, byte [serial_rows] ; ax = number of rows if serial 0 00006223 7419 jz .display_pop_ZR ; if zero, do not page --> 0 00006225 48 dec ax ; was 1 ? (adjust to rows minus one) 0 00006226 7516 jnz @FF ; no, use as rows minus one --> (NZ) 496 ; ax = 0 if it was 1 497 @@: 0 00006228 0A06[0000] or al, [io_rows] 0 0000622C 7410 jz .display_pop_ZR 0 0000622E 48 dec ax ; was 1 ? (adjust to rows minus one) 0 0000622F 750D jnz @F ; no, use as rows minus one --> (NZ) 502 ; yes, automatic (use BDA) 0 00006231 06 push es 0 00006232 B84000 mov ax, 40h ; 0040h is a bimodal segment/selector 0 00006235 8EC0 mov es, ax 0 00006237 26A08400 mov al, byte [ es:84h ] ; rows on screen 0 0000623B 07 pop es 0 0000623C 85C0 test ax, ax 509 @@: 510 .display_pop_ZR: 0 0000623E 747B jz .display_pop 512 0 00006240 3806[0000] cmp byte [ linecounter ], al 0 00006244 7268 jb .notyet ; not yet reached --> 0 00006246 F606[0000]08 testopt [internalflags], pagedcommand ; active ? 0 0000624B 7506 jnz .prompt ; yes, prompt --> 0 0000624D FE0E[0000] dec byte [ linecounter ] ; keep count, but don't prompt til next LF 0 00006251 EB5B jmp short .notyet 519 520 .prompt: 0 00006253 58 pop ax ; ax = length of string, cx = length of string remaining 0 00006254 29C8 sub ax, cx ; ax = length of string til LF 0 00006256 91 xchg ax, cx ; cx = til LF incl., ax = behind LF 0 00006257 50 push ax ; new count 525 ; cx = length til LF 526 ; es:dx-> start of part til LF 0 00006258 E86200 call .display ; display part of message which fits on screen 0 0000625B 59 pop cx 0 0000625C 51 push cx ; update cx from variable 0 0000625D 89FA mov dx, di ; dx-> start of next part 0 0000625F 800E[0200]10 setopt [internalflags], promptwaiting ; mark as prompting necessary 0 00006264 EBA2 jmp short .looplf ; now check whether anything follows at all 533 ; This is the magic to suppress unnecessary prompts as 534 ; were displayed previously. Now, we'll set this flag 535 ; which effectively displays the prompt before (!) any 536 ; other output is done. Previously, the prompt would be 537 ; displayed right here. The only case where behaviour 538 ; changed is when no more output occurs until the flag 539 ; is reset elsewhere - ie. if getline prompts anyway. 540 541 .promptnow: 0 00006266 52 push dx 0 00006267 51 push cx 0 00006268 C606[0000]00 mov byte [ linecounter ], 0 ; prompting, so reset the line counter 0 0000626D 8026[0200]EF clropt [internalflags], promptwaiting 0 00006272 06 push es 0 00006273 16 push ss 0 00006274 07 pop es 0 00006275 BA[0000] mov dx, msg.more ; es:dx -> message 0 00006278 B9[0000] mov cx, msg.more_size 0 0000627B E83F00 call .display ; print string (avoiding a recursion) 0 0000627E 07 pop es 553 0 0000627F 800E[0000]10 setopt [internalflags3], dif3_input_terminal_override 555 ; This option is a hack for the sole use of 556 ; demo scripts that only want the user to press 557 ; a key for paging. 0 00006284 F606[0100]01 testopt [options], nondospaging 0 00006289 7405 jz .getc 0 0000628B E82704 call getc.raw ; get a character from BIOS 0 0000628E EB03 jmp short .dispover 562 .getc: 0 00006290 E80904 call getc ; get a character 564 .dispover: 0 00006293 8026[0000]EF clropt [internalflags3], dif3_input_terminal_override 0 00006298 3C03 cmp al, 3 ; is it Ctrl+C ? 0 0000629A 743B je .ctrlc ; yes, handle that --> 0 0000629C E8[0000] call handle_serial_flags_ctrl_c 0 0000629F 06 push es 0 000062A0 16 push ss 0 000062A1 07 pop es 0 000062A2 BA[0000] mov dx, msg.more_over ; es:dx -> message 0 000062A5 B9[0000] mov cx, msg.more_over_size 0 000062A8 E81200 call .display ; overwrite the prompt (avoiding a recursion) 0 000062AB 07 pop es 0 000062AC 59 pop cx 0 000062AD 5A pop dx 578 579 .notyet: 0 000062AE B00A mov al, 10 0 000062B0 F2AE repne scasb ; search LF 0 000062B2 7507 jne .display_pop ; none --> 583 0 000062B4 FE06[0000] inc byte [ linecounter ] ; record how many LFs will be displayed 0 000062B8 E94DFF jmp .looplf ; search for next LF --> 586 587 .display_pop: 0 000062BB 59 pop cx 0 000062BC 5F pop di 590 .display: 591 ; Non-paged output code follows. 592 ;d4 call d4message 593 ;d4 asciz "In puts.display first",13,10 594 0 000062BD F606[0000]10 testopt [serial_flags], sf_use_serial 0 000062C2 7520 jnz .notdos 0 000062C4 E8[0000] call InDOS_or_BIOS_output 0 000062C7 751B jnz .notdos 599 ; es:dx -> message 0 000062C9 BB0100 mov bx, 1 ; standard output 0 000062CC B440 mov ah, 40h ; write to file 0 000062CE E306 jcxz @F 603 %if _PM 604 d5 push di 605 push es ; point ds of _doscall* to msg segment 606 d5 call d4message 607 d5 asciz 13,10,"In puts.display, es=" 608 d5 push es 609 d5 call d4disp_stack_hex 610 d5 call d4message 611 d5 asciz "h",13,10 612 dualcall selector_to_segment ; make sure we give it as a segment 613 ; This assumes that non-access-slice pointers into the 614 ; symbol tables (SYMSTR particularly) can be converted 615 ; into 86M segmented addresses, ie that the selector 616 ; points into 86M-accessible memory. 617 d5 call d4message 618 d5 asciz "In puts.display, on stack =" 619 d5 pop di 620 d5 push di 621 d5 push di 622 d5 call d4disp_stack_hex 623 d5 call d4message 624 d5 asciz "h",13,10 625 dual2call _doscall_return_es_parameter_es_ds 626 add sp, 2 ; discard es returned from call 627 d5 pop di 628 %else 0 000062D0 1E push ds 0 000062D1 06 push es 0 000062D2 1F pop ds ; ds:dx -> message 0 000062D3 CD21 int 21h ; simply call into DOS 0 000062D5 1F pop ds 634 %endif 635 @@: 0 000062D6 C3 retn 637 638 .ctrlc: 639 %if !_LOADER 0 000062D7 F606[0300]10 testopt [internalflags2], dif2_in_silence_dump 0 000062DC 7403 jz @F 0 000062DE E8F202 call reset_silent_mode 643 @@: 644 %endif 0 000062E1 E9[0000] jmp handle_ctrl_c ; abort currently running command --> 646 ; If handled by DOS, Ctrl+C causes our process to be terminated. 647 ; Because we are self-owned, we re-enter our code at debug22 then. 648 ; debug22 only does some re-initialization of registers before 649 ; entering cmd3. Therefore, instead of aborting we can directly jump 650 ; to cmd3 here. This has the additional benefit of not requiring DOS 651 ; at all, so that no workarounds for InDOS mode and boot loader 652 ; operation are necessary. 653 654 ; No command should fail spectacularly when being aborted this way, 655 ; because in fact every command calling puts can already be aborted by 656 ; DOS's Ctrl+C checking if DOS is used. This check is really only an 657 ; _additional_ way the commands can be aborted. 658 659 ; Note that a more complete way to support command abortion would be 660 ; to hook Int1B, and to keep a flag of whether Ctrl+C or Ctrl+Break 661 ; were requested, and to additionally check before or after every I/O 662 ; operation whether Ctrl+C was pressed using non-destructive reads. 663 ; In short, exactly what DOS does. 664 665 .notdos: 0 000062E4 55 push bp 667 ; Some int 10h functions can corrupt bp, eg 668 ; 06h and 0Eh. Insure to preserve it here. 0 000062E5 56 push si 0 000062E6 F606[0200]01 testopt [internalflags], usecharcounter 0 000062EB 7505 jnz .dontresetcharcounter 0 000062ED C606[0000]01 mov byte [ charcounter ], 1 673 ; This assumes we always start at the beginning of a line. 674 ; Therefore any call to puts must display at the beginning 675 ; of a line or tab parsing will not work. Only calls to puts 676 ; not containing tab characters may display partial lines. 677 ; (Calls to puts with partial lines and tab characters have 678 ; to set the flag usecharcounter in internalflags.) 679 .dontresetcharcounter: 0 000062F2 E35F jcxz .return 0 000062F4 89D6 mov si, dx 682 .loop: 0 000062F6 26AC es lodsb 0 000062F8 3C09 cmp al, 9 0 000062FA 750B jne .nottab ; is no tab --> 0 000062FC A0[0000] mov al, byte [ charcounter ] 0 000062FF 2407 and al, 7 ; at 8 character boundary ? 0 00006301 B020 mov al, 32 ; (always replaced by blank) 0 00006303 7402 jz .nottab ; yes, don't use hack --> 0 00006305 41 inc cx 0 00006306 4E dec si ; find tab again next lodsb 692 .nottab: 0 00006307 3C0D cmp al, 13 ; (exact match for CR) 0 00006309 7505 jne .notcr 695 .cr: 0 0000630B C606[0000]00 mov byte [ charcounter ], 0 ; increased to one before displaying 697 .notcr: 698 %if 0 ; currently we never receive BS here 699 cmp al, 8 700 jne .notbs 701 mov bh, byte [vpage] 702 mov bl, al ; save number of characters per column 703 push cx 704 mov ah, 03h 705 int 10h ; get cursor position dx 706 pop cx 707 dec byte [ charcounter ] ; assume not at start of line 708 mov al, 8 ; changed by Int10 709 or dl, dl 710 jnz .dontcount ; not first column, so display normal --> 711 mov byte [ charcounter ], 1 ; assume at start of screen 712 or dh, dh 713 jz .next ; at start of screen, don't display --> 714 dec dh ; previous line 715 mov dl, bl 716 mov byte [ charcounter ], dl ; really at end of line (one-based counter) 717 dec dl ; last column 718 mov ah, 02h 719 int 10h ; set new cursor position 720 jmp short .next 721 .notbs: 722 %endif 0 00006310 3C0A cmp al, 10 0 00006312 7406 je .dontcount_lf ; must not count line feeds! 0 00006314 FE06[0000] inc byte [ charcounter ] 726 %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 0 00006318 EB05 jmp @F 728 .dontcount_lf: 0 0000631A 8026[0200]FD clropt [internalflags3], dif3_int10_highlight 730 @@: 731 %else 732 .dontcount_lf: 733 %endif 0 0000631F F606[0000]10 testopt [serial_flags], sf_use_serial 0 00006324 7405 jz @F 736 0 00006326 E8[0000] call serial_send_char 738 0 00006329 EB26 jmp .next 740 @@: 741 742 %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT || _CLEAR 0 0000632B 3C1B cmp al, 27 0 0000632D 7427 je .try_highlight 745 746 .nohighlight: 747 %endif 0 0000632F 8A3E[0000] mov bh, byte [vpage] ; use the current video page 749 750 %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 0 00006333 F606[0200]02 testopt [internalflags3], dif3_int10_highlight 0 00006338 7411 jz @F 753 754 ; Fix: do not write a musical note for CR. 755 ; This was caused by resetting the flag 756 ; dif3_int10_highlight only for LF. 757 ; Also do not write BEL symbol. 758 ; Hardening: Do not write attributes for 759 ; any nonprintable codepoint. 0 0000633A 3C20 cmp al, 32 0 0000633C 720D jb @F 0 0000633E B409 mov ah, 09h 0 00006340 8A1E[0000] mov bl, byte [.attribute] 0 00006344 51 push cx 0 00006345 B90100 mov cx, 1 0 00006348 CD10 int 10h 0 0000634A 59 pop cx 768 @@: 769 %endif 770 0 0000634B B307 mov bl, 7 0 0000634D B40E mov ah, 0Eh 0 0000634F CD10 int 10h 774 .next: 0 00006351 E2A3 loop .loop 776 .return: 0 00006353 5E pop si 0 00006354 5D pop bp 0 00006355 C3 retn 780 781 782 %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT || _CLEAR 783 .try_highlight: 0 00006356 F606[0200]02 testopt [options3], opt3_r_highlight_dumb 0 0000635B 75D2 jnz .nohighlight 0 0000635D 83F902 cmp cx, 2 0 00006360 76CD jbe .nohighlight 0 00006362 26803C5B cmp byte [es:si], '[' 0 00006366 75C7 jne .nohighlight 790 %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 0 00006368 26807C016D cmp byte [es:si + 1], 'm' 0 0000636D 742F je .highlight_reset 793 %endif 0 0000636F 83F903 cmp cx, 3 0 00006372 74BB je .nohighlight 796 %if _CLEAR 0 00006374 26807C0132 cmp byte [es:si + 1], '2' 0 00006379 7507 jne @F 0 0000637B 26807C024A cmp byte [es:si + 2], 'J' 0 00006380 7458 je .clear 801 @@: 802 %endif 803 %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 0 00006382 26807C0137 cmp byte [es:si + 1], '7' 0 00006387 75A6 jne .nohighlight 0 00006389 26807C026D cmp byte [es:si + 2], 'm' 0 0000638E 759F jne .nohighlight 808 .highlight_set: 0 00006390 E87D00 call check_dumb_mode 0 00006393 749A jz .nohighlight 811 ; This test fails if we are at the very left of 812 ; the screen or in dosemu -dumb mode. So don't 813 ; use highlighting at the beginning of a line! 0 00006395 800E[0200]02 setopt [internalflags3], dif3_int10_highlight 0 0000639A 49 dec cx 0 0000639B 46 inc si 0 0000639C EB05 jmp @F 818 819 .highlight_reset: 0 0000639E E86F00 call check_dumb_mode 0 000063A1 748C jz .nohighlight 822 ; Refer to above comment. 823 @@: 0 000063A3 800E[0200]02 setopt [internalflags3], dif3_int10_highlight 0 000063A8 E81800 call .getattrib 0 000063AB 88E0 mov al, ah 0 000063AD 257788 and ax, 8877h 0 000063B0 D0C0 rol al, 1 0 000063B2 D0C0 rol al, 1 0 000063B4 D0C0 rol al, 1 0 000063B6 D0C0 rol al, 1 0 000063B8 08E0 or al, ah 0 000063BA A2[0000] mov byte [.attribute], al 834 %endif 835 836 .dec_2: 0 000063BD 49 dec cx 0 000063BE 49 dec cx 0 000063BF 46 inc si 0 000063C0 46 inc si 0 000063C1 EB8E jmp .next 842 843 .getattrib: 0 000063C3 FECA dec dl 0 000063C5 B402 mov ah, 02h 0 000063C7 8A3E[0000] mov bh, byte [vpage] 0 000063CB CD10 int 10h ; set cursor position 0 000063CD B408 mov ah, 08h 0 000063CF CD10 int 10h ; read attribute to ah 0 000063D1 50 push ax 0 000063D2 FEC2 inc dl 0 000063D4 B402 mov ah, 02h 0 000063D6 CD10 int 10h ; set cursor position 0 000063D8 58 pop ax 0 000063D9 C3 retn 856 857 %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 858 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 858 ------------------ note: usesection lDEBUG_DATA_ENTRY 859 %if _LINK_COMPAT 860 align 2, db 0 861 %endif 862 0 00002478 00 .attribute: db 0 864 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 864 ------------------ note: usesection lDEBUG_CODE 865 %endif 866 867 %if _CLEAR 868 .clear: 0 000063DA E83300 call check_dumb_mode 0 000063DD 7503E94DFF jz .nohighlight 871 0 000063E2 E8DEFF call .getattrib 0 000063E5 93 xchg bx, ax ; bh = attrib 874 0 000063E6 06 push es 0 000063E7 B84000 mov ax, 40h ; bi-modal seg/sel 0 000063EA 8EC0 mov es, ax 0 000063EC 51 push cx 879 880 ; copied from RxANSI 0 000063ED 31C9 xor cx, cx 0 000063EF 268A164A00 mov dl, [es:4Ah] ; number of rows 0 000063F4 FECA dec dl 0 000063F6 268A368400 mov dh, [es:84h] ; number of columns 0 000063FB B80006 mov ax, 0600h 0 000063FE CD10 int 10h ; Clear screen (bh = attrib) 0 00006400 31D2 xor dx, dx ; Reset cursor to 0/0 0 00006402 8A3E[0000] mov bh, byte [vpage] 0 00006406 B402 mov ah, 02h 0 00006408 CD10 int 10h ; Set cursor 891 0 0000640A 59 pop cx 0 0000640B 07 pop es 894 0 0000640C 49 dec cx 0 0000640D 46 inc si 0 0000640E EBAD jmp .dec_2 898 %endif 899 900 ; INP: byte [vpage] 901 ; CHG: bx, dx 902 ; OUT: ZR iff dumb mode 903 ; STT: ds = ss 904 check_dumb_mode: 0 00006410 50 push ax 0 00006411 51 push cx 0 00006412 B403 mov ah, 3 0 00006414 8A3E[0000] mov bh, byte [vpage] 0 00006418 31D2 xor dx, dx ; pre-initialise to zero 0 0000641A CD10 int 10h ; dl = column, dh = row 0 0000641C 84D2 test dl, dl 0 0000641E 7416 jz .ret 0 00006420 F606[0300]01 testopt [internalflags], runningdosemu 0 00006425 740D jz .ret_NZ 0 00006427 B85500 mov ax, 55h ; function DOS_HELPER_GET_TERM_TYPE 0 0000642A CDE6 int 0E6h ; CHG: ax, bx, cx 0 0000642C 80E401 and ah, 1 ; ax & 100h = dumb mode 0 0000642F 80F401 xor ah, 1 ; NZ if not dumb mode 0 00006432 EB02 jmp .ret 920 .ret_NZ: 0 00006434 85E4 test sp, sp ; (NZ) 922 .ret: 0 00006436 59 pop cx 0 00006437 58 pop ax 0 00006438 C3 retn 926 %endif 927 928 929 %if _40COLUMNS 930 ; Display line_out, with IOCLINE linebreaks 931 ; 932 ; INP: es:di -> behind last character to display 933 ; es:line_out -> first character to display 934 ; ax = last fragment length 935 ; OUT: ax = last fragment length 936 ; STT: ds = ss = debugger data selector 937 ; CHG: ax, bx, cx, dx 938 putsline_break_line: 0 00006439 89F9 mov cx, di 0 0000643B BA[0000] mov dx, line_out 0 0000643E 29D1 sub cx, dx 942 943 ; Display message, with IOCLINE linebreaks 944 ; 945 ; INP: es:dx -> message to display 946 ; cx = length of message 947 ; ax = last fragment length 948 ; OUT: ax = last fragment length 949 ; STT: ds = ss = debugger data selector 950 ; CHG: ax, bx, cx, dx 951 puts_break_line: 0 00006440 01C8 add ax, cx ; how much in this line if fits 0 00006442 8B1E[0000] mov bx, word [io_columns_getline] ; = how many columns to fill 0 00006446 85DB test bx, bx ; disabled ? 0 00006448 7415 jz .no_split ; yes, use normal handler --> 0 0000644A 39D8 cmp ax, bx ; total <= columns ? 0 0000644C 7611 jbe .no_input_split ; yes, back to normal code --> 0 0000644E 56 push si 0 0000644F 89CE mov si, cx ; si = length input 0 00006451 29C8 sub ax, cx ; restore last fragment length 0 00006453 89D9 mov cx, bx 0 00006455 29C1 sub cx, ax ; = how much fits in first line 0 00006457 29CE sub si, cx ; = how much left, cannot carry 964 965 ; INP: si = how much left for subsequent iterations 966 ; es:dx -> data to display 967 ; bx = columns to fill 968 ; cx = length for this iteration 969 ; OUT: cx = length of last write (0 if empty, no linebreak) 970 ; CHG: si, dx 0 00006459 E81500 call puts_partial_write 0 0000645C 91 xchg ax, cx ; ax = last fragment length 0 0000645D 5E pop si 0 0000645E C3 retn 975 976 .no_split: 977 .no_input_split: 0 0000645F 50 push ax 0 00006460 E8C4FC call puts 0 00006463 58 pop ax 981 puts_break_line_more.retn: 0 00006464 C3 retn 983 984 985 ; Display a linebreak if last fragment length is zero 986 ; and there is more to display. This function is only 987 ; to be called if there is more output to display! 988 ; 989 ; INP: ax = last fragment length (no action if nonzero) 990 ; OUT: line break displayed if ax was zero 991 ; CHG: dx 992 puts_break_line_more: 0 00006465 85C0 test ax, ax 0 00006467 75FB jnz .retn 0 00006469 BA[0000] mov dx, crlf 0 0000646C E9CA01 jmp putsz 997 998 999 puts_partial_write.loop: 0 0000646F 89D9 mov cx, bx 1001 1002 ; INP: si = how much left for subsequent iterations 1003 ; es:dx -> data to display 1004 ; bx = columns to fill 1005 ; cx = length for this iteration 1006 ; OUT: cx = length of last write (0 if empty, no linebreak) 1007 ; CHG: si, dx 1008 puts_partial_write: 0 00006471 53 push bx 0 00006472 51 push cx 0 00006473 52 push dx 0 00006474 E8B0FC call puts ; display partial 0 00006477 85F6 test si, si ; more to go ? 0 00006479 7406 jz @F ; no --> 0 0000647B BA[0000] mov dx, crlf 0 0000647E E8B801 call putsz ; put linebreak 1017 @@: 0 00006481 5A pop dx 0 00006482 59 pop cx 0 00006483 5B pop bx 0 00006484 01CA add dx, cx ; advance pointer 0 00006486 29DE sub si, bx ; subtract from counter 0 00006488 73E5 jnc .loop ; still above zero, loop --> 0 0000648A 01DE add si, bx ; restore prior si value 0 0000648C 89F1 mov cx, si 0 0000648E 53 push bx 0 0000648F 51 push cx 0 00006490 E894FC call puts ; display last part (possibly empty) 0 00006493 59 pop cx ; return cx 0 00006494 5B pop bx 0 00006495 C3 retn 1032 %else 1033 putsline_break_line: equ putsline 1034 puts_break_line: equ puts 1035 puts_break_line_more: equ dmycmd 1036 %endif 1037 1038 1039 %if !_LOADER 1040 ; INP: es:dx -> message to display 1041 ; cx = length of message 1042 ; STT: ds = ss = debugger data selector 1043 ; CHG: ax, bx, cx, dx 1044 puts_silence: 0 00006496 56 push si 0 00006497 57 push di 1047 1048 .try_again: 0 00006498 89D6 mov si, dx ; es:si -> message 0 0000649A 8B3E[0000] mov di, word [auxbuff_behind_last_silent] 1051 ; (auxbuff):di -> next buffer (if it fits) 1052 %if _AUXBUFFSIZE == _AUXBUFFMAXSIZE 1053 mov ax, _AUXBUFFSIZE - 1 1054 %else 0 0000649E A1[0000] mov ax, word [auxbuff_current_size] 0 000064A1 48 dec ax 1057 %endif 0 000064A2 29F8 sub ax, di ; number of bytes left free 1059 ; (+ 1 byte terminator) 0 000064A4 7204 jc .delete 0 000064A6 39C8 cmp ax, cx ; fits ? 0 000064A8 730B jae .simple ; yes --> 1063 1064 .delete: 0 000064AA 06 push es 0 000064AB 8E06[0000] mov es, word [auxbuff_segorsel] 0 000064AF E81600 call silence_delete_one_string 0 000064B2 07 pop es 0 000064B3 EBE3 jmp .try_again 1070 1071 .simple: 0 000064B5 1E push ds 0 000064B6 06 push es 0 000064B7 06 push es 0 000064B8 8E06[0000] mov es, word [auxbuff_segorsel] 1076 ; es:di -> next buffer 0 000064BC 1F pop ds ; ds:si -> message 0 000064BD F3A4 rep movsb ; copy over 0 000064BF 07 pop es 0 000064C0 1F pop ds 0 000064C1 893E[0000] mov word [auxbuff_behind_last_silent], di 1082 ; update pointer 0 000064C5 5F pop di 0 000064C6 5E pop si 0 000064C7 C3 retn 1086 1087 1088 ; INP: es => auxbuff 1089 ; ds = ss 1090 ; [auxbuff_behind_last_silent] -> behind last silent 1091 ; OUT: [auxbuff_behind_last_silent] updated 1092 ; auxbuff updated (deleted one of the dump strings, 1093 ; moved forwards in the buffer the remainder) 1094 ; if error, aborts command by jumping to cmd3 1095 ; CHG: ax, di, si 1096 silence_delete_one_string: 0 000064C8 E81F00 call .internal ; call internal implementation 0 000064CB 734F jnc .retn ; no error ? --> 1099 .error: ; else: error, abort command 0 000064CD 16 push ss 0 000064CE 1F pop ds 0 000064CF 16 push ss 0 000064D0 07 pop es 0 000064D1 8026[0300]DF clropt [internalflags], tt_silence 1105 %if _RH 0 000064D6 C606[0000]FF mov byte [skip_rh], 0FFh 1107 %endif 0 000064DB BA[0000] mov dx, msg.silent_error 0 000064DE E85801 call putsz 0 000064E1 B83501 mov ax, 0135h 0 000064E4 E8[0000] call setrc 0 000064E7 E9[0000] jmp cmd3 1113 1114 1115 ; INP: as for silence_delete_one_string 1116 ; OUT: as for silence_delete_one_string, but: 1117 ; CY if error (no more space) 1118 ; NC if success 1119 ; CHG: ax, di, si 1120 ; STT: ds = ss 1121 .internal: 0 000064EA 51 push cx 0 000064EB 8B0E[0000] mov cx, [auxbuff_behind_last_silent] 1124 ; -> next buffer position 1125 %if _PM 1126 mov di, word [auxbuff_switchbuffer_size] 1127 sub cx, di 1128 %else 0 000064EF 31FF xor di, di 1130 %endif 0 000064F1 B000 mov al, 0 0 000064F3 3C01 cmp al, 1 ; initialise to NZ (if cx is zero) 0 000064F5 F2AE repne scasb 0 000064F7 F9 stc 0 000064F8 7522 jne .retn ; error, no NUL found in data (CY) 1136 ; es:di -> behind first NUL 1137 0 000064FA 89FE mov si, di ; es:si -> next message 1139 %if _RH 0 000064FC 89F8 mov ax, di 1141 %endif 1142 %if _PM 1143 mov di, word [auxbuff_switchbuffer_size] 1144 %if _RH 1145 sub ax, di ; -> next minus -> first, length of first 1146 %endif 1147 %else 0 000064FE 31FF xor di, di 1149 %endif 1150 %if _RH 0 00006500 2906[0000] sub word [auxbuff_start_silent], ax 1152 %if _PM 1153 jb .reset_start 1154 cmp word [auxbuff_start_silent], di 1155 %endif 0 00006504 7304 jae @F 1157 .reset_start: 0 00006506 893E[0000] mov word [auxbuff_start_silent], di 1159 @@: 1160 %endif 0 0000650A 8B0E[0000] mov cx, word [auxbuff_behind_last_silent] 0 0000650E 06 push es 0 0000650F 1F pop ds ; ds:si -> next message 0 00006510 29F1 sub cx, si ; remaining buffer 0 00006512 F3A4 rep movsb ; move to start of silent buffer 0 00006514 16 push ss 0 00006515 1F pop ds 0 00006516 893E[0000] mov word [auxbuff_behind_last_silent], di 0 0000651A 59 pop cx 0 0000651B F8 clc ; (NC) 1171 .retn: 0 0000651C C3 retn 1173 1174 1175 ; After having used puts_silence, this dumps all data 1176 ; remaining in the silent buffer in auxbuff. 1177 ; If word [tt_silent_mode_number] is set, only that many 1178 ; data strings (zero-terminated) are dumped, from the end 1179 ; of the buffer. 1180 ; 1181 ; CHG: ax, bx, cx, dx, si, di, es 1182 ; STT: ds = ss = debugger data selector 1183 ; sets es to ss 1184 silence_dump: 0 0000651D F606[0300]10 testopt [internalflags], tt_silent_mode ; is in use ? 0 00006522 7501 jnz @F ; yes --> 0 00006524 C3 retn ; no. simple 1188 1189 @@: 1190 %if _RH 0 00006525 C606[0000]00 mov byte [rh_display_with_count], 0 1192 .rh.all: 0 0000652A B8FFFF mov ax, -1 1194 .rh: 0 0000652D A3[0000] mov word [auxbuff_amount_silent], ax 1196 %endif 0 00006530 8026[0300]DF clropt [internalflags], tt_silence 0 00006535 800E[0300]10 setopt [internalflags2], dif2_in_silence_dump 1199 0 0000653A F606[0100]01 testopt [options3], opt3_silence_paging_set 0 0000653F 7413 jz @F 0 00006541 F606[0100]02 testopt [options3], opt3_silence_paging_on 0 00006546 7407 jz .turn_paging_off 1204 1205 .turn_paging_on: 0 00006548 800E[0000]08 setopt [internalflags], pagedcommand 0 0000654D EB05 jmp @F 1208 1209 .turn_paging_off: 0 0000654F 8026[0000]F7 clropt [internalflags], pagedcommand 1211 @@: 1212 0 00006554 E8BA00 call silence_get_start 0 00006557 741E jz .no_number_given 1215 0 00006559 8B16[0000] mov dx, word [tt_silent_mode_number] 0 0000655D 85D2 test dx, dx 0 0000655F 7416 jz .no_number_given 1219 0 00006561 E8BC00 call silence_count_zeroes 1221 1222 %if _RH 0 00006564 8B3E[0000] mov di, word [auxbuff_start_silent] 1224 ; reset to -> silent buffered data 1225 %endif 0 00006568 29D3 sub bx, dx ; number of dumps - requested number 1227 ; = excess number of dumps 0 0000656A 760B jbe .no_number_given 1229 0 0000656C 89D9 mov cx, bx ; use excess number as loop counter 1231 @@: 1232 %if _RH 0 0000656E 51 push cx 0 0000656F B9FFFF mov cx, -1 1235 ; mov al, 0 0 00006572 F2AE repne scasb 0 00006574 59 pop cx 1238 %else 1239 call silence_delete_one_string 1240 ; delete one string 1241 %endif 0 00006575 E2F7 loop @B ; loop for however many to delete --> 1243 1244 .no_number_given: 1245 %if _RH 0 00006577 E86400 call .rh_display_count 1247 %endif 1248 1249 %ifn _RH 1250 %if _PM 1251 mov di, word [auxbuff_switchbuffer_size] 1252 %else 1253 xor di, di 1254 %endif 1255 %endif 1256 ; es:di -> silent buffer 1257 .loop_line: 0 0000657A 8E06[0000] mov es, word [auxbuff_segorsel] 0 0000657E 8B0E[0000] mov cx, word [auxbuff_behind_last_silent] 0 00006582 29F9 sub cx, di ; any more data ? 0 00006584 744B jz .return ; no, return --> 0 00006586 B000 mov al, 0 0 00006588 49 dec cx ; (in case of branching for next conditional) 0 00006589 AE scasb ; starts with a NUL byte ? 0 0000658A 7404 je @F ; yes, skipped --> 0 0000658C 41 inc cx ; (restore cx to original value) 0 0000658D 4F dec di ; no, decrement 1268 %if _RH 0 0000658E EB05 jmp @FF 1270 @@: 0 00006590 E303 jcxz @F ; anything follows the NUL ? 0 00006592 E84900 call .rh_display_count 1273 %endif 1274 @@: 0 00006595 89FE mov si, di ; es:si -> start of string 1276 0 00006597 81F90001 cmp cx, 256 ; cx > 256 ? 0 0000659B 7603 jbe @F ; no --> 0 0000659D B90001 mov cx, 256 ; limit to 256 bytes per string 1280 ; (line_out is 264 bytes) 1281 @@: 0 000065A0 E32F jcxz .return ; (if single byte that was NUL remaining -->) 0 000065A2 89CB mov bx, cx ; search string length 0 000065A4 B000 mov al, 0 0 000065A6 F2AE repne scasb ; scan for NUL bytes 0 000065A8 7505 jne @F ; (if none found: cx = 0) 1287 ; (if any found: cx = remaining length) 0 000065AA 41 inc cx ; cx = remaining length + 1 (do not output NUL) 1289 %if _RH 0 000065AB FF0E[0000] dec word [auxbuff_amount_silent] 1291 %endif 1292 @@: 0 000065AF 29CB sub bx, cx ; search length - remaining = found length 0 000065B1 89D9 mov cx, bx ; how much to show 0 000065B3 06 push es 0 000065B4 1F pop ds ; ds => auxbuff (ds:si -> start of string) 0 000065B5 16 push ss 0 000065B6 07 pop es ; es => line_out 0 000065B7 BF[0000] mov di, line_out ; es:di -> line_out 0 000065BA 51 push cx 0 000065BB F3A4 rep movsb ; copy over to line_out 0 000065BD 59 pop cx ; cx = message length 1303 0 000065BE 16 push ss 0 000065BF 1F pop ds ; reset seg regs to ss 0 000065C0 BA[0000] mov dx, line_out ; dx -> message, cx = length 0 000065C3 56 push si 0 000065C4 E895FB call puts.no_rh ; print out 0 000065C7 5F pop di ; -> next silent message 1310 %if _RH 0 000065C8 833E[0000]00 cmp word [auxbuff_amount_silent], 0 0 000065CD 7402 je .return 1313 %endif 0 000065CF EBA9 jmp .loop_line 1315 1316 .return: 0 000065D1 16 push ss 0 000065D2 07 pop es 1319 1320 reset_silent_mode: equ $ 0 000065D3 8026[0300]CF clropt [internalflags], tt_silent_mode | tt_silence 0 000065D8 8026[0300]EF clropt [internalflags2], dif2_in_silence_dump 0 000065DD C3 retn 1324 1325 1326 %if _RH 1327 .rh_display_count: 0 000065DE D006[0000] rol byte [rh_display_with_count], 1 0 000065E2 57 push di 0 000065E3 51 push cx 0 000065E4 06 push es 0 000065E5 7326 jnc @F 0 000065E7 A1[0000] mov ax, word [rh_count_number] 0 000065EA 83F8FF cmp ax, -1 0 000065ED 741E je @F 0 000065EF FF0E[0000] dec word [rh_count_number] 0 000065F3 16 push ss 0 000065F4 07 pop es 0 000065F5 BF[0000] mov di, line_out 0 000065F8 BE[0000] mov si, msg.rh_step.1 0 000065FB E8[0000] call copy_single_counted_string 0 000065FE E8E2FA call hexword 0 00006601 BE[0000] mov si, msg.rh_step.2 0 00006604 E8[0000] call copy_single_counted_string 0 00006607 E85EFA call decword 0 0000660A E80FFB call putsline_crlf 1347 @@: 0 0000660D 07 pop es 0 0000660E 59 pop cx 0 0000660F 5F pop di 0 00006610 C3 retn 1352 %endif 1353 1354 1355 ; STT: ss = ds 1356 ; OUT: es => auxbuff 1357 ; es:di -> start of silent data 1358 ; cx = length of silent data 1359 ; ZR if cx == 0 1360 silence_get_start: section_of_function 1361 %if _RH 0 00006611 8B3E[0000] mov di, word [auxbuff_start_silent] 1363 %elif _PM 1364 mov di, word [auxbuff_switchbuffer_size] 1365 %else 1366 xor di, di 1367 %endif 1368 1369 ; INP: auxbuff:di -> start of data 1370 .have_di: section_of_function silence_get_start 0 00006615 8E06[0000] mov es, word [auxbuff_segorsel] 0 00006619 8B0E[0000] mov cx, word [auxbuff_behind_last_silent] 0 0000661D 29F9 sub cx, di 0 0000661F C3 retn 1375 1376 1377 ; STT: ss = ds 1378 ; OUT: es => auxbuff 1379 ; bx = number of zeroes in silent data 1380 ; cx = 0 1381 ; CHG: ax, di 1382 silence_count_zeroes: section_of_function 0 00006620 31DB xor bx, bx ; counter of zeros 1384 @@: 0 00006622 43 inc bx ; count zeros (NZ) 0 00006623 B000 mov al, 0 1387 ; jcxz @F ; no more data --> 1388 ; If cx == 0 then the inc bx left bx <> 0 so NZ. 1389 ; Therefore the repne scasb will run zero iterations 1390 ; and leave NZ, causing the next conditional jump to 1391 ; not branch back into the loop. 0 00006625 F2AE repne scasb ; another zero ? 0 00006627 74F9 je @B ; yes, count and search for next --> 1394 ; no, done 1395 @@: 0 00006629 4B dec bx ; drop bias 0 0000662A C3 retn 1398 %endif 1399 1400 1401 %if _MESSAGESEGMENT && _PM 1402 get_messagesegsel: 1403 mov ds, word [ss:messagesel] 1404 call ispm 1405 jz .ret_pm 1406 .86m: 1407 mov ds, word [ss:messageseg] 1408 .ret_pm: 1409 retn 1410 %endif 1411 1412 1413 ; INP: message segment:(dx & ~1) -> message 1414 ; (dx & 1) if message is uncompressed (ASCIZ), 1415 ; however the low bit must be masked off 1416 ; else the message is compressed 1417 ; CHG: dx low bit 1418 ; OUT: message displayed 1419 ; REM: The protocol implies that all messages passed 1420 ; to this function must start on a word boundary. 1421 putsz_exthelp: 1422 %if _HELP_COMPRESSED 1423 test dl, 1 1424 jnz .uncompressed 1425 1426 .compressed: 1427 push ds 1428 push ax 1429 push bx 1430 push cx 1431 push dx 1432 push es 1433 push di 1434 push si 1435 1436 %if _TEST_HELP_FILE 1437 mov word [ss:hshrink_get_file_byte], hshrink_memory_read 1438 ; insure correct source 1439 %endif 1440 xchg si, dx ; si -> message compressed length 1441 %if _MESSAGESEGMENT 1442 %if _PM 1443 call get_messagesegsel ; ds => message segment 1444 %else 1445 mov ds, word [ss:messageseg] ; ds => message segment 1446 %endif 1447 lodsw ; = length 1448 %else 1449 ss lodsw ; = length 1450 %endif 1451 xchg cx, ax ; = length 1452 mov word [ss:hshrink_memory_source.offset], si 1453 ; save offset of data 1454 push ds 1455 pop es ; => message segment 1456 %if _BOOTLDR_DISCARD_HELP 1457 mov di, [ss:indirect_hshrink_message_buffer] 1458 lea si, [di + hshrink_message_buffer_size] 1459 %else 1460 mov di, nontruncated_hshrink_message_buffer ; es:di -> destination 1461 mov si, nontruncated_hshrink_message_buffer + hshrink_message_buffer_size 1462 ; si -> behind destination end 1463 %endif 1464 push es 1465 push di 1466 call depack ; try depacking 1467 ; ds reset before calling puts 1468 pop dx ; display our decompressed string 1469 pop es 1470 jnc @F ; skip next part if not error --> 1471 push ss 1472 pop es 1473 push ss 1474 pop ds 1475 mov ax, 012Bh 1476 call setrc 1477 mov dx, msg.hshrink_error ; if error 1478 @@: 1479 pop si 1480 jmp putsz.saved 1481 1482 .uncompressed: 1483 and dl, ~1 1484 ; fall through to putsz_messagesegsel 1485 1486 %endif 1487 1488 putsz_messagesegsel: 0 0000662B 1E push ds 1490 %if _MESSAGESEGMENT 1491 %if _PM 1492 call get_messagesegsel 1493 %else 0 0000662C 368E1E[0000] mov ds, word [ss:messageseg] 1495 %endif 1496 %else 1497 push ss 1498 pop ds 1499 %endif 0 00006631 EB07 jmp @F 1501 1502 1503 putsz_error: section_of_function 0 00006633 36800E[0100]20 setopt [ss:internalflags3], dif3_unquiet_error 1505 1506 ; Display ASCIZ message 1507 ; 1508 ; INP: ds:dx -> ASCIZ message to display 1509 ; CHG: - 1510 ; STT: ds, es don't care 1511 putsz: section_of_function 0 00006639 1E push ds 1513 @@: 0 0000663A 50 push ax 0 0000663B 53 push bx 0 0000663C 51 push cx 0 0000663D 52 push dx 0 0000663E 06 push es 0 0000663F 1E push ds 0 00006640 07 pop es 0 00006641 57 push di 1522 .saved: 0 00006642 89D7 mov di, dx ; es:di-> string 0 00006644 30C0 xor al, al 0 00006646 B9FFFF mov cx, -1 0 00006649 F2AE repne scasb ; search zero 0 0000664B F7D1 not cx 0 0000664D 49 dec cx ; cx = length of message 0 0000664E 5F pop di 0 0000664F 16 push ss 0 00006650 1F pop ds ; ds = ss 0 00006651 E8D3FA call puts 0 00006654 07 pop es 0 00006655 5A pop dx 0 00006656 59 pop cx 0 00006657 5B pop bx 0 00006658 58 pop ax 0 00006659 1F pop ds 0 0000665A C3 retn 1540 1541 ; Display character 1542 ; 1543 ; INP: al = character to display 1544 ; CHG: - 1545 ; STT: ds, es don't care 1546 %if _LINK 1547 disp_al: section_of_function 1548 %endif 1549 check_section_of disp_al 1550 putc: section_of_function 0 0000665B 53 push bx 0 0000665C 51 push cx 0 0000665D 52 push dx 0 0000665E 06 push es 0 0000665F 1E push ds 0 00006660 16 push ss 0 00006661 07 pop es ; es:dx -> message 0 00006662 16 push ss 0 00006663 1F pop ds ; ds = ss 0 00006664 50 push ax 0 00006665 B90100 mov cx, 1 ; one character 0 00006668 89E2 mov dx, sp ; ds:dx-> ax on stack 0 0000666A E8BAFA call puts 0 0000666D 58 pop ax 0 0000666E 1F pop ds 0 0000666F 07 pop es 0 00006670 5A pop dx 0 00006671 59 pop cx 0 00006672 5B pop bx 0 00006673 C3 retn 1571 1572 1573 ; OUT: ax = 0 if no input available 1574 ; ax = 0FFFFh if DOS stdin input available 1575 ; ah = scancode, al = ASCII if int 16h input available 1576 ; ax = al = ASCII if serial input available 1577 ; REM: This is always a nondestructive read. 1578 peekc: section_of_function 0 00006674 F606[0000]10 testopt [serial_flags], sf_use_serial 0 00006679 750C jnz .serial 0 0000667B E8[0000] call InDOS_or_BIOS_IO 0 0000667E 740E jz .dos 1583 .bios: 0 00006680 B401 mov ah, 01h 0 00006682 CD16 int 16h ; key available ? 1586 @@: 0 00006684 7412 jz .return_ax_0 0 00006686 C3 retn 1589 1590 .serial: 0 00006687 E8[0000] call serial_check_receive_char 1592 ; do serial getc (check rx buffer) 0 0000668A B400 mov ah, 0 0 0000668C EBF6 jmp @B 1595 1596 .dos: 0 0000668E B40B mov ah, 0Bh 1598 doscall 0 00006690 CD21 int 21h 0 00006692 B4FF mov ah, -1 0 00006694 84C0 test al, al 0 00006696 EBEC jmp @B 1602 1603 .return_ax_0: 0 00006698 B80000 mov ax, 0 1605 .return: 0 0000669B C3 retn 1607 1608 1609 ; Get character/key 1610 ; 1611 ; OUT: al = character (if zero, look for ah) 1612 ; ah = scan code or zero 1613 ; CHG: ax 1614 ; STT: ds = ss = debugger segment/selector 1615 ; 1616 ; Idles system when in InDOS mode. When not in InDOS mode, Int21.08 1617 ; is used which is assumed to idle the system itself. 1618 getc: section_of_function 0 0000669C 57 push di 0 0000669D BF[1F09] mov di, getc_if_any 1621 0 000066A0 F606[0000]20 testopt [internalflags3], dif3_input_serial_override 0 000066A5 750C jnz @F 0 000066A7 F606[0000]10 testopt [serial_flags], sf_use_serial 0 000066AC 7505 jnz @F 0 000066AE E8[0000] call InDOS_or_BIOS_IO 0 000066B1 7450 jz getc_dos_pop_di 1628 @@: 0 000066B3 EB04 jmp @F 1630 1631 .raw: 0 000066B5 57 push di 0 000066B6 BF[8909] mov di, getc_if_any.raw 1634 .loop: 1635 @@: 0 000066B9 FF16[0000] call near word [getline_timer_func] 0 000066BD F606[0000]20 testopt [internalflags3], dif3_input_serial_override 0 000066C2 7523 jnz @F 0 000066C4 F606[0300]01 testopt [internalflags3], dif3_input_re 0 000066C9 751C jnz @F 1641 %if _INPUT_FILE_BOOT 0 000066CB F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 000066D0 7515 jnz @F 1644 %endif 0 000066D2 F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 000066D7 750E jnz @F 0 000066D9 F606[0000]10 testopt [serial_flags], sf_use_serial 0 000066DE 7507 jnz @F 0 000066E0 F606[0100]04 testopt [options], biosidles 1650 ; idling disabled? 0 000066E5 7516 jnz .rawkey ; yes, just request a key --> 1652 1653 @@: 0 000066E7 FFD7 call di ; got a key ? 0 000066E9 7516 jnz .return ; yes --> 1656 .idle: ; common idling for BIOS keyboard and serial 0 000066EB E8[0000] call handle_serial_flags_ctrl_c 1658 %if _SLEEP_NEW 0 000066EE 57 push di 0 000066EF 8B3E[0000] mov di, word [getc_repeat_idle] 0 000066F3 47 inc di 1662 @@: 0 000066F4 E88102 call idle 0 000066F7 4F dec di 0 000066F8 75FA jnz @B 0 000066FA 5F pop di 1667 %else 1668 call idle 1669 %endif 0 000066FB EBBC jmp .loop ; check again --> 1671 1672 .rawkey: 0 000066FD 31C0 xor ax, ax 0 000066FF CD16 int 16h ; get the key and scancode 1675 .return: 0 00006701 5F pop di 0 00006702 C3 retn 1678 1679 1680 getc_dos_pop_di: 0 00006703 5F pop di 1682 getc_dos: 1683 %if _PM 1684 call ispm 1685 jnz @F ; if 86 Mode --> 1686 testopt [options2], opt2_getc_idle_dpmi 1687 jnz @FF 1688 @@: 1689 %endif 0 00006704 F606[0100]20 testopt [options2], opt2_getc_idle 0 00006709 7410 jz getc_dos_internal 1692 @@: 1693 .with_idle: 0 0000670B E88901 call getc_if_any 0 0000670E 7403E9BC00 jnz .return 0 00006713 E8[0000] call handle_serial_flags_ctrl_c 0 00006716 E85F02 call idle 0 00006719 EBF0 jmp .with_idle 1699 1700 .return equ getc_dos_internal_get_extended.return 1701 1702 1703 getc_dos_internal: 1704 ; DOS character devices handle one-byte characters. Therefore 1705 ; non-ASCII keys cannot be returned with scancode in the high 1706 ; byte of the same call. A non-ASCII key will be split into 1707 ; two characters by CON: one NUL byte followed by the scancode. 0 0000671B F606[0000]10 testopt [internalflags3], dif3_input_terminal_override 0 00006720 7403E99300 jnz .terminal 1710 %if !_LOADER 0 00006725 F606[0300]01 testopt [internalflags3], dif3_input_re 0 0000672A 741B jz @F 0 0000672C 56 push si 0 0000672D 8B36[0000] mov si, word [re_buffer.position] 0 00006731 31C0 xor ax, ax 0 00006733 AC lodsb 0 00006734 84C0 test al, al 0 00006736 8936[0000] mov word [re_buffer.position], si 0 0000673A 5E pop si 0 0000673B 7403E98F00 jnz .return 0 00006740 FF0E[0000] dec word [re_buffer.position] 0 00006744 E98800 jmp .return 1723 %endif 1724 1725 .return equ getc_dos_internal_get_extended.return 1726 1727 1728 @@: 1729 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1730 %if _INPUT_FILE_BOOT 0 00006747 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 0000674C 750E jnz .file 1733 %endif 1734 %if _INPUT_FILE_HANDLES 0 0000674E E8[0000] call InDOS_or_BIOS_IO 0 00006751 7545 jnz .file_not 0 00006753 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006758 7502 jnz .file 1739 %endif 0 0000675A EB3C jmp .file_not 1741 1742 .file: 0 0000675C 52 push dx 0 0000675D 51 push cx 0 0000675E 53 push bx 0 0000675F 57 push di 0 00006760 31C0 xor ax, ax ; initialise ah to zero 0 00006762 50 push ax 0 00006763 89E2 mov dx, sp ; ds:dx -> al byte on stack 0 00006765 B90100 mov cx, 1 1751 %if _INPUT_FILE_BOOT 1752 %if _INPUT_FILE_HANDLES 0 00006768 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 0000676D 7408 jz @F 1755 %endif 0 0000676F E8[0000] call yy_boot_remember_seek 0 00006772 E8[0000] call yy_boot_read 1758 %if _INPUT_FILE_HANDLES 0 00006775 EB0A jmp @FF 1760 @@: 1761 %endif 1762 %endif 1763 %if _INPUT_FILE_HANDLES 0 00006777 B43F mov ah, 3Fh 0 00006779 E80C01 call yy_get_handle 0 0000677C E85F13 call yy_remember_seek 1767 doscall ; (depends on ds = ss) 0 0000677F CD21 int 21h 1768 %endif 1769 @@: 0 00006781 7204 jc @F 0 00006783 85C0 test ax, ax 0 00006785 750B jnz .file_got 1773 1774 @@: 0 00006787 E84F00 call yy_close_file 0 0000678A 58 pop ax 0 0000678B 5F pop di 0 0000678C 5B pop bx 0 0000678D 59 pop cx 0 0000678E 5A pop dx 0 0000678F E90AFF jmp getc 1782 1783 1784 .file_got: 0 00006792 58 pop ax ; ah = 0, al = character read 0 00006793 5F pop di 0 00006794 5B pop bx 0 00006795 59 pop cx 0 00006796 5A pop dx 0 00006797 C3 retn 1791 1792 .file_not: 1793 %endif 0 00006798 F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 0000679D 7419 jz @F 0 0000679F 56 push si 0 000067A0 8B36[0000] mov si, word [cmdline_buffer.position] 0 000067A4 31C0 xor ax, ax 0 000067A6 AC lodsb 0 000067A7 84C0 test al, al 0 000067A9 8936[0000] mov word [cmdline_buffer.position], si 0 000067AD 5E pop si 0 000067AE 751F jnz .return 0 000067B0 8026[0100]FE clropt [internalflags3], dif3_input_cmdline 0 000067B5 E9E4FE jmp getc 1806 1807 @@: 1808 .terminal: 0 000067B8 B408 mov ah, 8 1810 doscall ; wait for a key 0 000067BA CD21 int 21h 1811 1812 getc_dos_internal_get_extended: 1813 ; FreeDOS kernel 2036 returns with ax=4C00h upon Control C. 1814 ; This is due to setting ax internally to terminate the 1815 ; process, paired with the termination service just 1816 ; returning for self-owned processes. This was eventually 1817 ; fixed in https://sourceforge.net/p/freedos/svn/1469/ 1818 ; This is a work around to restart our command line then. 1819 ; Usually ah stays 08h when this call returns. 1820 ; (06h if calling from getc_if_any to here.) 0 000067BC 80FC4C cmp ah, 4Ch 0 000067BF 740F je .freedos_ctrlc_workaround 0 000067C1 B400 mov ah, 0 ; assume it is ASCII 0 000067C3 84C0 test al, al 0 000067C5 7508 jne .return ; ASCII, return with ah zero --> 0 000067C7 B408 mov ah, 8 1827 doscall ; scancode of non-ASCII key to al 0 000067C9 CD21 int 21h 0 000067CB 86C4 xchg al, ah ; to ah 0 000067CD B000 mov al, 0 ; return zero for non-ASCII key 1830 .return: 0 000067CF C3 retn 1832 1833 .freedos_ctrlc_workaround: 0 000067D0 BA[0000] mov dx, msg.freedos_ctrlc_workaround 0 000067D3 E863FE call putsz 0 000067D6 E9FEFA jmp puts.ctrlc ; use common handler 1837 1838 1839 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 1840 ; INP: [input_file_handles], dif2_input_file 1841 ; OUT: most recent file closed, flag cleared if no longer file 1842 ; CHG: di, bx, ax 1843 yy_close_file: 1844 %if !_LOADER 0 000067D9 F606[0300]01 testopt [internalflags3], dif3_input_re 0 000067DE 740B jz @F 0 000067E0 8026[0300]FE clropt [internalflags3], dif3_input_re 0 000067E5 800E[0300]02 setopt [internalflags3], dif3_input_re_closed 0 000067EA C3 retn 1850 1851 @@: 1852 %endif 1853 %if _INPUT_FILE_BOOT 0 000067EB F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 000067F0 7406 jz @F 0 000067F2 E8[0000] call yy_boot_clear_remember_seek 0 000067F5 E9[0000] jmp yy_boot_close_file 1858 1859 @@: 1860 %endif 1861 %if _INPUT_FILE_HANDLES 0 000067F8 F606[0200]10 testopt [internalflags2], dif2_input_file 0 000067FD 7455 jz .notfile 0 000067FF 8B3E[0000] mov di, word [input_file_handles.active] 0 00006803 57 push di 0 00006804 D1E7 shl di, 1 0 00006806 D1E7 shl di, 1 0 00006808 D1E7 shl di, 1 1869 %if INPUTFILEHANDLE_size != 8 1870 %error Unexpected structure size 1871 %endif 0 0000680A 8B9D[0000] mov bx, word [input_file_handles + di + ifhHandle] 0 0000680E E8B112 call yy_clear_remember_seek 1874 0 00006811 F685[0300]01 testopt [input_file_handles + di + ifhFlags], ifhfIsDup 0 00006816 7416 jz @F 1877 0 00006818 51 push cx 0 00006819 52 push dx 1880 0 0000681A 8B9D[F8FF] mov bx, word [input_file_handles + di - INPUTFILEHANDLE_size + ifhHandle] 0 0000681E 8B95[0400] mov dx, word [input_file_handles + di + ifhParentSeek] 0 00006822 8B8D[0600] mov cx, word [input_file_handles + di + ifhParentSeek + 2] 0 00006826 B80042 mov ax, 4200h ; seek from start 0 00006829 E82112 call handle_seek_or_remember 1886 0 0000682C 5A pop dx 0 0000682D 59 pop cx 1889 1890 @@: 1891 0 0000682E E8[0000] call InDOS 0 00006831 7406 jz .closefile 1894 0 00006833 FF06[0000] inc word [input_file_handles.to_close] 0 00006837 EB06 jmp @F 1897 1898 .closefile: 0 00006839 B80100 mov ax, 1 0 0000683C E82C00 call yy_close_file_handles 1901 1902 @@: 0 0000683F 5F pop di 0 00006840 4F dec di 0 00006841 790C jns .next 0 00006843 8026[0200]EF clropt [internalflags2], dif2_input_file 0 00006848 800E[0200]20 setopt [internalflags2], dif2_closed_input_file 0 0000684D EB04 jmp .done 1909 .next: 0 0000684F 893E[0000] mov word [input_file_handles.active], di 1911 .done: 0 00006853 C3 retn 1913 %endif 1914 1915 .notfile: 0 00006854 F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00006859 740B jz @F 0 0000685B 8026[0100]FE clropt [internalflags3], dif3_input_cmdline 0 00006860 800E[0100]02 setopt [internalflags3], dif3_input_cmdline_closed 0 00006865 C3 retn 1921 1922 @@: 0 00006866 31F6 xor si, si 0 00006868 E9[0000] jmp error 1925 1926 1927 %if _INPUT_FILE_HANDLES 1928 ; INP: word [input_file_handles.to_close] = how many 1929 ; ax = additionally how many (0 or 1) 1930 ; input_file_handles + di -> first to close 1931 ; OUT: word [input_file_handles.to_close] = 0 1932 ; closed handle fields = -1 1933 ; CHG: ax, bx, di 1934 ; STT: DOS must be accessible 1935 yy_close_file_handles: 0 0000686B 51 push cx 0 0000686C 31C9 xor cx, cx 0 0000686E 870E[0000] xchg cx, word [input_file_handles.to_close] 0 00006872 01C1 add cx, ax 0 00006874 7410 jz @FF 1941 @@: 0 00006876 BBFFFF mov bx, -1 0 00006879 879D[0000] xchg bx, word [input_file_handles + di + ifhHandle] 0 0000687D B43E mov ah, 3Eh 1945 doscall 0 0000687F CD21 int 21h 0 00006881 83C708 add di, INPUTFILEHANDLE_size 0 00006884 E2F0 loop @B 1948 @@: 0 00006886 59 pop cx 0 00006887 C3 retn 1951 1952 1953 ; INP: - 1954 ; OUT: di = active handle offset 1955 ; bx = active handle 1956 ; CHG: - 1957 yy_get_handle: 0 00006888 8B3E[0000] mov di, word [input_file_handles.active] 0 0000688C D1E7 shl di, 1 0 0000688E D1E7 shl di, 1 0 00006890 D1E7 shl di, 1 1962 %if INPUTFILEHANDLE_size != 8 1963 %error Unexpected structure size 1964 %endif 0 00006892 8B9D[0000] mov bx, word [input_file_handles + di + ifhHandle] 1966 %endif 0 00006896 C3 retn 1968 %endif 1969 1970 1971 ; INP: - 1972 ; OUT: NZ if received any, 1973 ; al = character 1974 ; ah = scan code or zero 1975 ; ZR if none received 1976 ; CHG: ax 1977 ; STT: ds = ss = debugger segment/selector 1978 getc_if_any: 0 00006897 F606[0000]20 testopt [internalflags3], dif3_input_serial_override 0 0000689C 755B jnz .serial 0 0000689E F606[0000]10 testopt [internalflags3], dif3_input_terminal_override 0 000068A3 754D jnz .terminal 1983 1984 %if !_LOADER 0 000068A5 F606[0300]01 testopt [internalflags3], dif3_input_re 0 000068AA 741D jz @F 0 000068AC 56 push si 0 000068AD 8B36[0000] mov si, word [re_buffer.position] 0 000068B1 31C0 xor ax, ax 0 000068B3 AC lodsb 0 000068B4 84C0 test al, al 0 000068B6 8936[0000] mov word [re_buffer.position], si 0 000068BA 5E pop si 0 000068BB 7403E9B700 jnz .return 0 000068C0 FF0E[0000] dec word [re_buffer.position] 0 000068C4 38C0 cmp al, al ; ZR 0 000068C6 E9AE00 jmp .return 1998 %endif 1999 2000 @@: 2001 %if _INPUT_FILE_BOOT 0 000068C9 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 000068CE 755B jnz .file 2004 %endif 2005 0 000068D0 F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 000068D5 741B jz @F 0 000068D7 56 push si 0 000068D8 8B36[0000] mov si, word [cmdline_buffer.position] 0 000068DC 31C0 xor ax, ax 0 000068DE AC lodsb 0 000068DF 84C0 test al, al 0 000068E1 8936[0000] mov word [cmdline_buffer.position], si 0 000068E5 5E pop si 0 000068E6 7403E98C00 jnz .return 0 000068EB 8026[0100]FE clropt [internalflags3], dif3_input_cmdline 0 000068F0 EBA5 jmp getc_if_any 2018 2019 @@: 2020 .terminal: 0 000068F2 F606[0000]10 testopt [serial_flags], sf_use_serial 0 000068F7 7411 jz @F ; do BIOS keyboard or DOS getc --> 2023 2024 .serial: 0 000068F9 E8[0000] call serial_receive_char ; do serial getc (check rx buffer) 0 000068FC 7479 jz .return ; no data, go and idle --> 0 000068FE B400 mov ah, 0 0 00006900 C3 retn 2029 2030 .raw: 0 00006901 F606[0000]10 testopt [serial_flags], sf_use_serial 0 00006906 75F1 jnz .serial 0 00006908 EB5F jmp .bios 2034 2035 @@: 0 0000690A E8[0000] call InDOS_or_BIOS_IO 0 0000690D 755A jnz .bios 2038 0 0000690F F606[0000]10 testopt [internalflags3], dif3_input_terminal_override 0 00006914 7546 jnz .dos_terminal 2041 2042 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 2043 %if _INPUT_FILE_BOOT 0 00006916 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 0000691B 750E jnz .file 2046 %endif 2047 %if _INPUT_FILE_HANDLES 0 0000691D E8[0000] call InDOS_or_BIOS_IO 0 00006920 753A jnz .file_not 0 00006922 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006927 7502 jnz .file 2052 %endif 0 00006929 EB31 jmp .file_not 2054 2055 .file: 0 0000692B 57 push di 0 0000692C 53 push bx 0 0000692D 51 push cx 0 0000692E 52 push dx 0 0000692F 31C0 xor ax, ax 0 00006931 50 push ax 2062 0 00006932 89E2 mov dx, sp ; ds:dx -> al byte on stack 0 00006934 B90100 mov cx, 1 ; buffer length = 1 2065 %if _INPUT_FILE_BOOT 2066 %if _INPUT_FILE_HANDLES 0 00006937 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 0000693C 7408 jz @F 2069 %endif 0 0000693E E8[0000] call yy_boot_remember_seek 0 00006941 E8[0000] call yy_boot_read 0 00006944 EB0A jmp @FF 2073 @@: 2074 %endif 2075 %if _INPUT_FILE_HANDLES 0 00006946 B43F mov ah, 3Fh 0 00006948 E83DFF call yy_get_handle 0 0000694B E89011 call yy_remember_seek 2079 doscall ; DOS read file (depends on ds = ss) 0 0000694E CD21 int 21h 2080 %endif 2081 @@: 0 00006950 7302 jnc @F 0 00006952 31C0 xor ax, ax 2084 @@: 0 00006954 85C0 test ax, ax 0 00006956 58 pop ax 0 00006957 5A pop dx 0 00006958 59 pop cx 0 00006959 5B pop bx 0 0000695A 5F pop di 0 0000695B C3 retn ; ZR if no character read 2092 2093 .file_not: 2094 %endif 2095 .dos_terminal: 2096 %if 0 2097 push dx 2098 mov ah, 06h 2099 mov dl, -1 2100 doscall 2101 jz .return_dx ; none available 2102 ; bugfix: the 06h call is a *destructive* read. 2103 ; so do not call getc again, just handle the 2104 ; possible second byte returned. 2105 call getc_dos_internal_get_extended 2106 pop dx 2107 jmp .return_NZ 2108 .return_dx: 2109 pop dx 2110 retn 2111 %else 0 0000695C B40B mov ah, 0Bh 2113 doscall 0 0000695E CD21 int 21h 0 00006960 84C0 test al, al 0 00006962 7413 jz .return 0 00006964 E8B4FD call getc_dos_internal 0 00006967 EB0A jmp .return_NZ 2118 %endif 2119 2120 .bios: 0 00006969 B401 mov ah, 01h 0 0000696B CD16 int 16h ; key available ? 0 0000696D 7408 jz .return 0 0000696F 31C0 xor ax, ax 0 00006971 CD16 int 16h 2126 .return_NZ: 0 00006973 50 push ax 0 00006974 0C01 or al, 1 ; (NZ) 0 00006976 58 pop ax 2130 .return: 0 00006977 C3 retn 2132 2133 2134 ; INP: - 2135 ; OUT: - 2136 ; CHG: ax 2137 ; STT: ds = ss = debugger segment/selector 2138 ; 2139 ; Idle system, using 2F.1680 (in given mode), or 2F.1680 2140 ; (calling down to 86 Mode), or sti \ hlt. 2141 idle: 0 00006978 FB sti 2143 ; Might be required for dosemu2 in loops. Refer to 2144 ; https://hg.pushbx.org/ecm/insight/rev/7973d5dd16f7 0 00006979 90 nop ; help debugging 2146 2147 %if _APPLICATION || _DEVICE 2148 %if _BOOTLDR 0 0000697A F606[0100]40 testopt [internalflags], nodosloaded 0 0000697F 7526 jnz .hlt ; can't call 2F --> 2151 %endif 2152 0 00006981 F606[0300]02 testopt [options3], opt3_no_idle_2F 0 00006986 751F jnz .hlt 2155 %if _GUARD_86M_INT2F 2156 %if _PM 2157 call ispm 2158 jz @FF ; --> (NZ) 2159 %endif 0 00006988 06 push es 0 00006989 31C0 xor ax, ax 0 0000698B 8EC0 mov es, ax ; (only used in 86 Mode) 0 0000698D 26A1BC00 mov ax, [es:2Fh * 4] 0 00006991 83F8FF cmp ax, -1 0 00006994 7405 je @F ; --> (ZR) 0 00006996 260B06BE00 or ax, [es:2Fh * 4 + 2] 2167 @@: 0 0000699B 07 pop es 0 0000699C 7409 jz @FF 2170 @@: 2171 %endif 0 0000699E B88016 mov ax, 1680h 0 000069A1 CD2F int 2Fh ; release timeslice in multitasker 0 000069A3 84C0 test al, al 0 000069A5 740A jz .return ; done idling --> 2176 @@: 2177 %if _PM 2178 call ispm 2179 jnz .hlt 2180 2181 push bx 2182 push cx 2183 push es 2184 _386_PM_o32 ; push edi 2185 push di 2186 _386 xor edi, edi ; clear EDIH 2187 xor cx, cx ; (copy no words from stack) 2188 2189 [cpu 286] 2190 push cx ; ss 2191 push cx ; sp (0:0 = host should allocate a stack) 2192 sub sp, byte 12 ; cs:ip (ignored), segments (uninitialized) 2193 pushf 2194 push cx ; EAXH (uninitialized) 2195 push 1680h ; AX 2196 sub sp, byte 12 ; ecx, edx, ebx (uninitialized) 2197 push cx 2198 push cx ; reserved (zero) 2199 sub sp, byte 12 ; ebp, esi, edi (uninitialized) 2200 push ss 2201 pop es 2202 mov di, sp ; es:(e)di -> 86 Mode call structure 2203 mov ax, 0300h 2204 mov bx, 2Fh ; bl = interrupt, bh = reserved (zero) 2205 int 31h ; call real mode 2F.1680 2206 __CPU__ 2207 2208 add sp, byte 28 ; discard RM call structure 2209 pop ax ; get AX 2210 add sp, byte 20 ; discard RM call structure 2211 2212 _386_PM_o32 ; pop edi 2213 pop di 2214 pop es 2215 pop cx 2216 pop bx 2217 2218 test al, al 2219 jz .return ; done idling --> 2220 %endif 2221 %endif 2222 .hlt: 2223 %if _PM 2224 call ispm 2225 jnz .hlt_86m 2226 .hlt_pm: 2227 testopt [options2], opt2_dpminohlt 2228 jmp @F ; NZ = DPMI host throws GPF when we execute hlt --> 2229 %endif 2230 .hlt_86m: 0 000069A7 F606[0100]02 testopt [options], opt1_86mnohlt 2232 @@: 0 000069AC 7503 jnz .return 0 000069AE FB sti 0 000069AF F4 hlt ; else idle by hlt 0 000069B0 90 nop 2237 .return: 0 000069B1 C3 retn 2239 2240 2241 %if _MS_PROMPT_COMPAT 2242 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 2242 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 00002479 00 align 2, db 0 2244 ; REM: Dispatch table in section lDEBUG_CODE 2245 table_getline_prepare_ldebug: 0 0000247A [420A] dw getline_prepare_blank_blank_colon 0 0000247C [420A] dw getline_prepare_blank_blank_colon 0 0000247E [420A] dw getline_prepare_blank_blank_colon 2249 2250 ; word +0: other 2251 ; word +2: variable (register) 2252 ; word +4: symbolic F (flag states) 2253 ; REM: Dispatch table in section lDEBUG_CODE 2254 table_getline_prepare_ms_debug: 0 00002480 [420A] dw getline_prepare_blank_blank_colon 0 00002482 [3A0A] dw getline_prepare_crlf_colon 0 00002484 [4A0A] dw getline_prepare_blank_dash 2258 2259 2260 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 2260 ------------------ note: usesection lDEBUG_CODE 2261 2262 getline_prepare_crlf_colon: 0 000069B2 E867F7 call putsline_crlf 0 000069B5 BF[0000] mov di, line_out 0 000069B8 EB04 jmp @F 2266 2267 getline_prepare_blank_blank_colon: 0 000069BA B82020 mov ax, 32<<8|32 ; add two spaces and a colon 0 000069BD AB stosw 2270 @@: 0 000069BE B03A mov al, ':' 0 000069C0 AA stosb 0 000069C1 C3 retn 2274 2275 getline_prepare_blank_dash: 0 000069C2 B8202D mov ax, '-' << 8 | 32 0 000069C5 AB stosw 0 000069C6 C3 retn 2279 %endif 2280 2281 2282 ; GETLINE - Print a prompt (address in DX, length in CX) and read a line 2283 ; of input. 2284 ; GETLINE0 - Same as above, but use the output line (so far), plus two 2285 ; spaces and a colon, as a prompt. 2286 ; GETLINE00 - Same as above, but use the output line (so far) as a prompt. 2287 ; Entry CX Length of prompt (getline only) 2288 ; DX Address of prompt string (getline only) 2289 ; 2290 ; DI Address + 1 of last character in prompt (getline0 and 2291 ; getline00 only) 2292 ; 2293 ; Exit AL First nonwhite character in input line 2294 ; SI Address of the next character after that 2295 ; Uses AH,BX,CX,DX,DI 2296 2297 %ifn _MS_PROMPT_COMPAT 2298 getline0: 2299 mov ax, 32<<8|32 ; add two spaces and a colon 2300 stosw 2301 mov al, ':' 2302 stosb 2303 %endif 2304 getline00: 0 000069C7 BA[0000] mov dx, line_out 0 000069CA 89F9 mov cx, di 0 000069CC 29D1 sub cx, dx 2308 2309 getline: ; note: this entry is no longer used 0 000069CE 8026[0100]77 clropt [internalflags3], dif3_quiet_input_single | dif3_return_eof 2311 .use_dif3_flags: 2312 %if _DEBUG && ! _DEBUG_COND 2313 d0bp 2314 %endif 0 000069D3 890E[0000] mov word [promptlen], cx ; save length of prompt 0 000069D7 8326[0000]00 and word [terminator_in_line_in.offset], 0 2317 ; reset this when reading new line 2318 0 000069DC E82102 call getline_is_input_file? 0 000069DF 7303E90801 jc getline_nofile 2321 2322 getline_file: 0 000069E4 F606[0300]01 testopt [internalflags3], dif3_input_re 0 000069E9 7549 jnz .notquiet 2325 2326 %if _INPUT_FILE_BOOT 0 000069EB F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 000069F0 7412 jz @F 0 000069F2 B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 000069F5 52 push dx 0 000069F6 F726[0000] mul word [load_input_file.active] 0 000069FA 5A pop dx 0 000069FB 89C7 mov di, ax 0 000069FD F685[2700]40 testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietInput 0 00006A02 EB29 jmp .quiet_if_nz 2336 2337 @@: 2338 %endif 2339 %if _INPUT_FILE_HANDLES 0 00006A04 E8[0000] call InDOS_or_BIOS_IO 0 00006A07 7518 jnz @F 0 00006A09 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006A0E 7411 jz @F 0 00006A10 8B3E[0000] mov di, word [input_file_handles.active] 0 00006A14 D1E7 shl di, 1 0 00006A16 D1E7 shl di, 1 0 00006A18 D1E7 shl di, 1 ; to qword array index 2348 %if INPUTFILEHANDLE_size != 8 2349 %error Unexpected structure size 2350 %endif 0 00006A1A F685[0300]40 testopt [input_file_handles + di + ifhFlags], ifhfQuietInput 0 00006A1F EB0C jmp .quiet_if_nz 2353 2354 @@: 2355 %endif 0 00006A21 F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00006A26 740C jz @F 0 00006A28 F606[0300]40 testopt [options], opt_cmdline_quiet_input 2359 ; jmp .quiet_if_nz 2360 2361 .quiet_if_nz: 0 00006A2D 7405 jz @F 2363 .quiet: 0 00006A2F 800E[0100]08 setopt [internalflags3], dif3_quiet_input_single 2365 .notquiet: 2366 @@: 2367 0 00006A34 800E[0200]40 setopt [internalflags2], dif2_did_getline_file 2369 2370 2371 ; This part reads the input line from a file (in the case of 2372 ; `debug < file'). It is necessary to do this by hand because DOS 2373 ; function 0Ah does not handle EOF correctly otherwise. This is 2374 ; especially important for DEBUG because it traps Control-C. 0 00006A39 C706[0000][0000] mov word [lastcmd], dmycmd ; disable auto-repeat while reading from a file 2376 2377 %if _NEWFULLHANDLING 0 00006A3F BF[0300] mov di, line_in+3 ; read max 2379 %else 2380 mov di, line_in+2 2381 %endif 0 00006A42 8B36[0000] mov si, word [bufnext] 0 00006A46 3B36[0000] cmp si, word [bufend] 0 00006A4A 7216 jb .char_buffered ; if there's a character already 0 00006A4C E8AB07 call fillbuf 0 00006A4F 7311 jnc .fillbuf_had_data 0 00006A51 F606[0100]80 testopt [internalflags3], dif3_return_eof 0 00006A56 7402 jz @F 0 00006A58 F9 stc 0 00006A59 C3 retn 2391 @@: 0 00006A5A E8DC01 call getline_close_file 0 00006A5D 7403E96CFF jnz getline 2394 2395 .fillbuf_had_data: 2396 .char_buffered: 2397 %if _NEWFULLHANDLING 0 00006A62 4F dec di 2399 %endif 2400 2401 ; Discard an LF if the last character read was CR. 0 00006A63 803E[0000]0D cmp byte [notatty], 13 ; last parsed character was CR ? 0 00006A68 750A jne .no_lf_skip ; no, nothing more to do --> 0 00006A6A 803C0A cmp byte [si], 10 ; first read character is LF ? 0 00006A6D 7505 jne .no_lf_skip ; no --> 0 00006A6F 46 inc si ; skip the LF 0 00006A70 FE06[0000] inc byte [notatty] ; avoid repeating this 2408 .no_lf_skip: 2409 0 00006A74 3B36[0000] cmp si, word [bufend] 0 00006A78 740B je @F 0 00006A7A 803C40 cmp byte [si], '@' ; no display ? 0 00006A7D 7506 jne @F 2414 0 00006A7F 46 inc si ; increment past @ 0 00006A80 800E[0100]08 setopt [internalflags3], dif3_quiet_input_single 2417 @@: 0 00006A85 F606[0100]08 testopt [internalflags3], dif3_quiet_input_single 0 00006A8A 7503 jnz gl1 2420 0 00006A8C E898F6 call puts ; display prompt (having checked it wasn't EOF) 2422 2423 ; si-> next character in buffer 2424 ; w[bufend]-> behind last valid character of buffer 2425 gl1: 0 00006A8F 8B0E[0000] mov cx, word [bufend] 0 00006A93 29F1 sub cx, si ; cx = number of valid characters in buffer 0 00006A95 740C jz gl3 ; if none --> 2429 gl2: 0 00006A97 AC lodsb 0 00006A98 3C0D cmp al, 13 ; (exact match for CR) 0 00006A9A 7410 je gl4 0 00006A9C 3C0A cmp al, 10 0 00006A9E 740C je gl4 ; if EOL --> 0 00006AA0 AA stosb 0 00006AA1 E2F4 loop gl2 ; if more valid characters --> 2437 2438 ; The buffer is empty. Fill it again. 2439 gl3: 2440 %if _NEWFULLHANDLING 0 00006AA3 47 inc di 2442 %endif 0 00006AA4 E85307 call fillbuf 2444 %if _NEWFULLHANDLING 0 00006AA7 4F dec di 2446 %endif 0 00006AA8 73E5 jnc gl1 ; if we have more characters --> 0 00006AAA B00A mov al, 10 ; make jump after gl4 always branch 2449 %ifn _NEWFULLHANDLING ; should now always have at least one byte free 2450 cmp di, line_in+LINE_IN_LEN 2451 jb @F 2452 dec si 2453 dec di 2454 @@: 2455 %endif 2456 2457 gl4: 0 00006AAC 3C0D cmp al, 13 ; terminator was CR ? 0 00006AAE 7508 jne @F ; no --> 0 00006AB0 E306 jcxz @F ; if no other byte buffered --> 0 00006AB2 803C0A cmp byte [si], 10 ; next byte is an LF ? 0 00006AB5 7501 jne @F ; no --> 0 00006AB7 AC lodsb ; increment si past the LF and set al = 10 2464 ; dec cx ; (not used in subsequent code) 2465 @@: 0 00006AB8 8936[0000] mov word [bufnext], si 0 00006ABC A2[0000] mov byte [notatty], al ; store 10 or 13 (depending on the kind of EOL) 2468 0 00006ABF 800E[0100]04 setopt [internalflags3], dif3_at_line_end 0 00006AC4 E8B706 call getline_reset_notatty 2471 0 00006AC7 89F9 mov cx, di ; (counter is for input without CR) 0 00006AC9 B00D mov al, 13 0 00006ACB AA stosb ; terminate line for our usage 0 00006ACC BA[0200] mov dx, line_in + 2 0 00006ACF 29D1 sub cx, dx ; = length of input (no CR) 0 00006AD1 880E[0100] mov byte [line_in+1], cl 0 00006AD5 F606[0100]08 testopt [internalflags3], dif3_quiet_input_single 0 00006ADA 750D jnz @F 0 00006ADC 800E[0200]01 setopt [internalflags], usecharcounter 0 00006AE1 E843F6 call puts ; print out the received line 0 00006AE4 8026[0200]FE clropt [internalflags], usecharcounter 2483 @@: 0 00006AE9 E9E200 jmp getline_eol ; done 2485 2486 getline_nofile: 0 00006AEC E8D80E call yy_reset_buf 0 00006AEF C606[0000]00 mov byte [linecounter], 0 ; reset counter 0 00006AF4 8026[0200]EF clropt [internalflags], promptwaiting 0 00006AF9 51 push cx 0 00006AFA 52 push dx 0 00006AFB E829F6 call puts ; display prompt 0 00006AFE 5A pop dx 0 00006AFF 59 pop cx 0 00006B00 F606[0000]10 testopt [serial_flags], sf_use_serial 0 00006B05 750A jnz .getinput_NZ 0 00006B07 E8[0000] call InDOS_or_BIOS_output 2498 ; Special case: If output is to ROM-BI0S we must use 2499 ; getinput so as to use putc and friends, not the 2500 ; DOS interrupt 21h service 0Ah. 0 00006B0A 7505 jnz .getinput_NZ 2502 %if _PM 2503 call ispm 2504 jnz @F ; if 86 Mode --> 2505 testopt [options2], opt2_getinput_dpmi 2506 jnz .getinput_NZ 2507 @@: 2508 %endif 0 00006B0C F606[0100]08 testopt [options], opt_usegetinput 2510 .getinput_NZ: 0 00006B11 7403E9C601 jnz getinput 2512 2513 %if _PM 2514 call ispm 2515 jnz @F ; if 86 Mode --> 2516 testopt [internalflags], canswitchmode 2517 jz @F ; can't switch to 86M --> 2518 setopt [internalflags], modeswitched 2519 ; set flag for resetmode 2520 mov al, 0 2521 call sr_state ; save state 2522 call switchmode ; switch to 86M 2523 call handle_mode_changed ; ! called with flag set 2524 2525 mov si, getline_extra_int23 2526 mov al, 23h 2527 call install_86m_interrupt_handler 2528 ; override DPMI host's int 23h vector 2529 mov dx, getline_extra_int22 2530 mov ax, 2522h 2531 int 21h 2532 mov word [TPIV], dx ; override our PRI 2533 2534 mov dx, line_in 2535 mov ah, 0Ah 2536 int 21h ; call DOS 2537 2538 call getline_extra_uninstall 2539 ; undo patches 2540 jmp @FF 2541 ; go to common trail 2542 2543 @@: 2544 %endif 0 00006B16 BA[0000] mov dx, line_in 0 00006B19 B40A mov ah, 0Ah ; buffered keyboard input 2547 doscall 0 00006B1B CD21 int 21h 2548 2549 @@: 2550 %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 00006B1D B300 mov bl, 0 2552 %endif 2553 2554 getline_eol_enter_history_and_ext: 2555 %if _EXTENSIONS && _EXT_PUTS_GETLINE 2556 ; byte [line_in + 1] = length 2557 ; line_in + 2 -> text 2558 ; bl = 0 means text is from int 21h service 0Ah 2559 ; bl = 1 means text is from getinput 0 00006B1F E8D100 call transfer_to_ext_puts_getline 2561 %endif 2562 2563 %if _HISTORY 2564 %if 0 2565 2566 The history buffer is implemented as two arrays that grow towards 2567 the middle from either end of the buffer. The first is a byte array 2568 storing text data that starts at the low end (start) of the buffer. 2569 (This is offset 0 in the separate history segment, if used.) The 2570 text is stored back to back, only the content of the lines, no 2571 separators or terminators. 2572 2573 The second array gives the *end* of each history entry's text. 2574 There are N + 1 array entries, each a 16-bit offset word, where 2575 N is the amount of history entries in use. The words are used as 2576 displacement from a base that's the start of the history buffer. 2577 (Again, the start base is at offset 0 for the separate history 2578 segment. However, for simplicity of the code we always do store 2579 the actual base start offset into a register and displace from 2580 that, even when the actual value of that register will be zero.) 2581 The very first entry of the high array is special. It always 2582 holds the displacement value zero. When used as a displacement 2583 added to the base this points at the very beginning of the 2584 entire history buffer (and thus the start of the low array). 2585 2586 The size of a history entry in the low array is obtained by 2587 reading both the entry's end displacement from the high array, 2588 and the prior entry (at the next higher address) also from the 2589 high array to receive the end displacement of the prior history 2590 entry. The end displacement of the prior entry is also the 2591 start displacement of the current entry. The delta of the two 2592 end displacements is the size of this history entry. This also 2593 explains why the very first entry of the high array is needed, 2594 and why it contains a zero displacement. It is needed in order 2595 to determine the start displacement and size of the very first 2596 actual history entry. (We could special case the first entry a 2597 different way but using the special first entry of the high 2598 array that holds a constant zero simplifies the code.) 2599 2600 The history pointers in the word [history.first] as well as 2601 word [history.last] point at the very first (special) entry 2602 of the high array as well as the very last entry of the high 2603 array. (Because the high array grows from the top down, the 2604 first entry is at the highest address and the last entry is 2605 at the lowest address.) Although the word [history.first] is 2606 currently a constant, we use a variable to enable changing 2607 the history allocation dynamically if desired later. If the 2608 two pointers are one and the same then there is no actual 2609 history entry stored in the history. Otherwise, if the 2610 distance between the last high array entry and the last 2611 low array entry is lower than X + 2 bytes then the history is 2612 too full to insert a new entry, where X is the length of the 2613 new history entry's text data and the additional 2 bytes are 2614 for the high array entry to store the end displacement. 2615 2616 The special first entry of the high array *must* be 2617 initialised to hold the displacement value zero. This happens 2618 in init.asm for the separate history buffer segment (when 2619 initialising the entire segment with zeroes) or in the 2620 zeroing of most of the DATASTACK section (when initialising 2621 the variables from ..@init_first up to ..@init_behind). 2622 2623 Insertion is simple, if enough space is left in the history 2624 buffer: Copy the text to behind the last entry of the low 2625 array (this is pointed to by the end displacement in the last 2626 high array entry), then create a new last entry of the high 2627 array which points behind the text's destination. 2628 2629 Deletion is more difficult. (Generally we will delete the 2630 oldest entry, that is the first history entry.) The second 2631 entry of the high array needs to be deleted. All subsequent 2632 entries of the high array need to move "forward" (towards 2633 the higher address), and also must have the length of the 2634 text of the entry to delete subtracted. In the low array the 2635 text data of the first history entry needs to be overwritten 2636 with any subsequent text data; the entire subsequent text data 2637 must be moved "forward" (towards the lower address) by the 2638 distance that equals the length of the entry's text to delete. 2639 2640 %endif 2641 2642 .loop: 0 00006B22 BE[0200] mov si, line_in + 2 0 00006B25 31C9 xor cx, cx 0 00006B27 0A4CFF or cl, byte [si - 1] 0 00006B2A 7503E99D00 jz .dontenter 2647 gethistorysegment es 0 00006B2F 368E06[0000] mov %1, word [ss:history.segorsel] 2648 gethistoryoffset bx 0 00006B34 BB0000 mov %1, 0 0 00006B37 A1[0000] mov ax, word [history.last] 0 00006B3A 3B06[0000] cmp ax, word [history.first] 0 00006B3E 7419 je @F ; if there are no history entries --> 0 00006B40 89C7 mov di, ax ; -> last displacement in high array 0 00006B42 268B15 mov dx, [es:di] ; + bx -> behind last history entry text 0 00006B45 268B7D02 mov di, [es:di + 2] ; + bx -> at last history entry text 0 00006B49 29FA sub dx, di ; = length of last history entry text 0 00006B4B 39D1 cmp cx, dx ; length match ? 0 00006B4D 750A jne @F ; no --> 2658 2659 ; always ZR here. would need to keep this in mind if 2660 ; zero-length entries were considered. (repe cmpsb 2661 ; with cx = 0 leaves cx, si, di, fl unchanged.) 0 00006B4F 8D39 lea di, [di + bx] ; -> at last text 0 00006B51 51 push cx 0 00006B52 56 push si 0 00006B53 F3A6 repe cmpsb ; compare candidate text to last text 0 00006B55 5E pop si 0 00006B56 59 pop cx 0 00006B57 7473 je .dontenter ; equal, so skip it --> 2669 @@: 0 00006B59 89C7 mov di, ax ; -> last displacement 0 00006B5B 268B15 mov dx, [es:di] ; + bx -> free space 0 00006B5E 01DA add dx, bx ; -> free space 0 00006B60 F7DA neg dx ; - free space start 0 00006B62 7502 jnz @F 0 00006B64 4A dec dx ; cause add to overflow (= FFFFh) 0 00006B65 47 inc di ; adjust for prior instruction 2677 @@: 0 00006B66 01FA add dx, di ; - free space start + free space end 2679 ; = free space size 0 00006B68 730A jnc .delete ; invalid (shouldn't happen) --> 0 00006B6A 7408 jz .delete ; zero bytes free --> 0 00006B6C 4A dec dx 0 00006B6D 7405 jz .delete ; one byte free --> 0 00006B6F 4A dec dx 2685 ; jz .delete ; one or two bytes free --> 2686 ; Commented, a zero will fail the next check 2687 ; already. Unless we modify the above code 2688 ; so that empty lines can be entered into 2689 ; the history, at which point we do not want 2690 ; to fail the insertion when only two bytes 2691 ; are free, ie enough for the displacement and 2692 ; a zero-byte length text. 2693 0 00006B70 39D1 cmp cx, dx 0 00006B72 7646 jbe .insert ; enough bytes for the new entry --> 2696 .delete: 0 00006B74 3B06[0000] cmp ax, word [history.first] 0 00006B78 7508 jne @F 2699 2700 .error: 0 00006B7A BA[0000] mov dx, msg.history_internal_error 0 00006B7D E8B9FA call putsz 0 00006B80 EB4A jmp .dontenter 2704 2705 @@: 0 00006B82 89C7 mov di, ax ; -> at last displacement 0 00006B84 268B3D mov di, [es:di] ; + bx -> after last entry's text 0 00006B87 8B36[0000] mov si, word [history.first] 0 00006B8B 268B74FE mov si, [es:si - 2] ; + bx -> at second entry's text 0 00006B8F 29F7 sub di, si ; = after last - after first 2711 ; = text length excluding first 0 00006B91 89F9 mov cx, di ; length to move 0 00006B93 56 push si 0 00006B94 01DE add si, bx ; -> after first entry's text 0 00006B96 89DF mov di, bx ; -> start of buffer 0 00006B98 06 push es 0 00006B99 1F pop ds 0 00006B9A F3A4 rep movsb ; move subsequent text 0 00006B9C 59 pop cx ; = how far we moved (deleted text length) 0 00006B9D 89C7 mov di, ax ; -> at last displacement 0 00006B9F 8B15 mov dx, word [di] ; load last displacement 2722 @@: 0 00006BA1 47 inc di 0 00006BA2 47 inc di ; -> prior displacement 0 00006BA3 363B3E[0000] cmp di, word [ss:history.first] 0 00006BA8 7306 jae @F ; (hardened, shouldn't ever be above) 0 00006BAA 29CA sub dx, cx ; adjust next displacement 2728 ; by deleted text length 0 00006BAC 8715 xchg word [di], dx ; store in prior displacement 2730 ; and load its old value 0 00006BAE EBF1 jmp @B 2732 2733 @@: 0 00006BB0 16 push ss 0 00006BB1 1F pop ds 0 00006BB2 8306[0000]02 add word [history.last], 2 2737 ; deleted one displacement 0 00006BB7 E968FF jmp .loop 2739 2740 .insert: 0 00006BBA 89C7 mov di, ax 0 00006BBC 48 dec ax 0 00006BBD 48 dec ax 0 00006BBE A3[0000] mov word [history.last], ax 0 00006BC1 268B3D mov di, word [es:di] 0 00006BC4 01DF add di, bx 0 00006BC6 F3A4 rep movsb 0 00006BC8 29DF sub di, bx 0 00006BCA 97 xchg di, ax ; es:di -> new last history displacement, 2750 ; ax -> after history text 0 00006BCB AB stosw 2752 2753 .dontenter: 0 00006BCC 16 push ss 0 00006BCD 07 pop es 2756 %endif 2757 2758 getline_eol: 0 00006BCE F606[0100]08 testopt [internalflags3], dif3_quiet_input_single 0 00006BD3 750B jnz @F ; NC 0 00006BD5 B00D mov al, 13 0 00006BD7 E881FA call putc ; fix ZDOS Int21.0A display bug 0 00006BDA B00A mov al, 10 0 00006BDC E87CFA call putc 0 00006BDF F9 stc 2766 @@: 2767 %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 00006BE0 B302 mov bl, 2 0 00006BE2 80D300 adc bl, 0 ; = 3 if displayed 0 00006BE5 E80500 call set_si_line_in_and_skipwhite 2771 ; INP: byte [line_in + 1] = length 2772 ; line_in + 2 -> text 2773 ; word [promptlen] = length of prompt 2774 ; al = first non-whitespace text byte 2775 ; si -> next text 2776 ; bl = 2 or 3 means from getline_eol, any line read 2777 ; bl = 2 if not displayed, = 3 if displayed 2778 ; CHG: ah, bh, cx, dx, di 2779 ; STT: ds = es = ss 2780 ; UP, EI 0 00006BE8 E80800 call transfer_to_ext_puts_getline 0 00006BEB F8 clc ; NC 0 00006BEC C3 retn 2784 %endif 2785 2786 set_si_line_in_and_skipwhite: 0 00006BED BE[0200] mov si, line_in+2 0 00006BF0 E92AF4 jmp skipwhite ; NC 2789 2790 2791 %if _EXTENSIONS && _EXT_PUTS_GETLINE 2792 transfer_to_ext_puts_getline: 0 00006BF3 8B0E[0000] mov cx, word [ext_puts_getline_handler] 0 00006BF7 E306 jcxz @F 0 00006BF9 E9C40D jmp transfer_ext_cx 2796 2797 check_section_of puts_getline_ext_done 2798 puts_getline_ext_done: equ $ 0 00006BFC 59 pop cx 0 00006BFD 59 pop cx 0 00006BFE 59 pop cx ; discard return addresses 2802 @@: 0 00006BFF C3 retn 2804 %endif 2805 2806 2807 %if _PM 2808 getline_extra_uninstall: 2809 mov dx, debug22 2810 mov ax, 2522h 2811 int 21h 2812 mov word [TPIV], dx ; restore default int 22h (PRI) 2813 mov si, getline_extra_int23 2814 mov al, 23h 2815 mov dx, -1 2816 call UnhookInterruptForce 2817 ; restore DPMI host's int 23h handler 2818 jmp resetmode ; return to PM 2819 2820 usesection lDEBUG_DATA_ENTRY 2821 2822 iispentry getline_extra_int23 2823 stc 2824 retf ; indicate to abort syscall and process 2825 2826 align 2 2827 getline_extra_int22: 2828 cli 2829 .cleartraceflag: 2830 cld ; reestablish things 2831 mov ax, cs 2832 mov ds, ax 2833 mov ss, ax 2834 mov sp, word [ savesp ] ; restore stack 2835 times 1 - (($ - $$) & 1) nop ; align in-code parameter 2836 call entry_to_code_seg 2837 dw .code 2838 2839 usesection lDEBUG_CODE 2840 2841 .code: 2842 2843 _386_o32 ; mov esp 2844 mov sp, word [ savesp ] ; restore stack 2845 _386 and sp, ~3 ; align stack 2846 _386_o32 2847 xor ax, ax 2848 _386_o32 2849 push ax 2850 _386_o32 2851 popf 2852 _386 mov sp, word [ savesp ] ; restore stack 2853 cld 2854 sti 2855 2856 call getline_extra_uninstall 2857 ; undo patches and return to PM 2858 jmp handle_ctrl_c ; go to common handler --> 2859 %endif 2860 2861 2862 getline_is_input_file?: 0 00006C00 F606[0000]20 testopt [internalflags3], dif3_input_serial_override 0 00006C05 7530 jnz .nofile 0 00006C07 F606[0300]01 testopt [internalflags3], dif3_input_re 0 00006C0C 7528 jnz .file 0 00006C0E F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00006C13 7521 jnz .file 2869 %if _INPUT_FILE_BOOT 0 00006C15 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00006C1A 751A jnz .file 2872 %endif 0 00006C1C E8[0000] call InDOS_or_BIOS_IO 0 00006C1F 7516 jnz .nofile ; InDOS, not reading from a file --> 2875 %if _INPUT_FILE_HANDLES 0 00006C21 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006C26 750E jnz .file 2878 %endif 0 00006C28 F606[0000]10 testopt [serial_flags], sf_use_serial 0 00006C2D 7508 jnz .nofile 0 00006C2F 803E[0000]00 cmp byte [notatty], 0 ; check this weird flag 0 00006C34 7401 je .nofile ; not reading from a file --> 2883 2884 .file: 0 00006C36 A8 db __TEST_IMM8 ; (skip stc, NC) 2886 .nofile: 0 00006C37 F9 stc 0 00006C38 C3 retn 2889 2890 2891 getline_close_file: 0 00006C39 51 push cx 2893 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 2894 ; EOF reached. if not input file, quit. else, close input file. 2895 %if !_LOADER 0 00006C3A F606[0300]01 testopt [internalflags3], dif3_input_re 0 00006C3F 7515 jnz .re 2898 %endif 2899 %if _INPUT_FILE_HANDLES && _INPUT_FILE_BOOT 0 00006C41 F706[0200]1002 testopt [internalflags2], dif2_input_file | dif2_input_file_boot, 1 0 00006C47 750A jnz @F 2902 %elif _INPUT_FILE_HANDLES 2903 testopt [internalflags2], dif2_input_file 2904 jnz @F 2905 %elif _INPUT_FILE_BOOT 2906 testopt [internalflags2], dif2_input_file_boot 2907 jnz @F 2908 %endif 0 00006C49 F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00006C4E 7462 jz .qq ; if EOF, quit --> 2911 0 00006C50 B1FE mov cl, -2 0 00006C52 A9 db __TEST_IMM16 2914 @@: 0 00006C53 31C9 xor cx, cx 2916 %if !_LOADER 0 00006C55 A9 db __TEST_IMM16 2918 .re: 0 00006C56 B1FF mov cl, -1 2920 %endif 2921 0 00006C58 51 push cx 0 00006C59 E86900 call .resetstuff 0 00006C5C 59 pop cx 2925 0 00006C5D E302 jcxz .notre 0 00006C5F EB15 jmp @F 2928 2929 .notre: 0 00006C61 59 pop cx 0 00006C62 F606[0100]04 testopt [internalflags3], dif3_at_line_end 0 00006C67 750C jnz .return ; (NZ) 2933 0 00006C69 B80D0A mov ax, 13 | 10 << 8 ; pretend we read a CR LF sequence 0 00006C6C AB stosw 0 00006C6D 893E[0000] mov word [bufend], di 0 00006C71 4F dec di 0 00006C72 4F dec di 0 00006C73 38C0 cmp al, al ; ZR 2940 .return: 0 00006C75 C3 retn 2942 2943 @@: 0 00006C76 80F9FE cmp cl, -2 0 00006C79 59 pop cx 2946 %if !_LOADER 0 00006C7A 741B je .finish_cmdline 2948 2949 .finish_re: 0 00006C7C F606[0100]04 testopt [internalflags3], dif3_at_line_end 0 00006C81 750E jnz @F 0 00006C83 B82801 mov ax, 0128h 0 00006C86 E8[0000] call setrc 0 00006C89 BA[0000] mov dx, msg.unexpected_noneol_re 0 00006C8C E8A4F9 call putsz_error 0 00006C8F EB03 jmp @FF 2957 @@: 0 00006C91 E8730F call resetrc 2959 @@: 0 00006C94 E9[0000] jmp dumpregs_extended.exit 2961 %endif 2962 2963 .finish_cmdline: 0 00006C97 F606[0100]04 testopt [internalflags3], dif3_at_line_end 0 00006C9C 750E jnz @F 0 00006C9E B82901 mov ax, 0129h 0 00006CA1 E8[0000] call setrc 0 00006CA4 BA[0000] mov dx, msg.unexpected_noneol_rc 0 00006CA7 E889F9 call putsz_error 0 00006CAA EB03 jmp @FF 2971 @@: 0 00006CAC E8580F call resetrc 2973 @@: 0 00006CAF E9[0000] jmp cmd3 2975 %endif 2976 2977 .qq: 0 00006CB2 C606[0200]0D mov byte [line_in + 2], 13 0 00006CB7 E833FF call set_si_line_in_and_skipwhite 0 00006CBA 830E[0000]08 or word [cmd3_set_options], fakeindos 0 00006CBF E8[0000] call qq ; if EOF, quit --> 0 00006CC2 E9[0000] jmp cmd3 2983 2984 .resetstuff: 0 00006CC5 57 push di 0 00006CC6 E810FB call yy_close_file ; close file 0 00006CC9 5F pop di 2988 2989 %if _NEWFULLHANDLING 0 00006CCA C706[0000][0300] mov word [bufnext], line_in + 3 0 00006CD0 C706[0000][0300] mov word [bufend], line_in + 3 2992 %else 2993 mov word [bufnext], line_in + 2 2994 mov word [bufend], line_in + 2 2995 %endif 2996 0 00006CD6 E8A504 call getline_reset_notatty 2998 0 00006CD9 E9[0000] jmp determine_quiet_output 3000 3001 3002 getinput: 3003 %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 00006CDC F616[0000] not byte [in_getinput] ; set 3005 %endif 3006 lframe 3007 lequ 254, limit 3008 lvar word, columns 3009 lvar word, maxpercol 3010 lvar word, maxpercolhalf 0 00006CE0 5589E58D66FA lenter 0 00006CE6 06 push es 0 00006CE7 52 push dx 3014 lvar dword, prompt ; (in line_out buffer) 0 00006CE8 31C0 xor ax, ax 3016 %if _HISTORY 0 00006CEA 50 push ax 3018 lvar word, historyentry 3019 %endif 0 00006CEB 50 push ax 3021 lvar word, length_displayed 0 00006CEC 50 push ax 3023 lvar word, length_input 0 00006CED 50 push ax 3025 lvar word, offset 0 00006CEE 50 push ax 3027 lvar word, lastskip 0 00006CEF 50 push ax 3029 lvar word, low_redraw_and_high_beep 3030 lequ ?low_redraw_and_high_beep, redraw 3031 lequ ?low_redraw_and_high_beep + 1, beep 0 00006CF0 50 push ax 3033 lvar word, low_cursormove_and_high_append 3034 lequ ?low_cursormove_and_high_append, cursormove 3035 lequ ?low_cursormove_and_high_append + 1,append 0 00006CF1 50 push ax 3037 lvar word, low_cursorright_and_high_edited 3038 lequ ?low_cursorright_and_high_edited, cursorright 3039 lequ ?low_cursorright_and_high_edited + 1, edited 0 00006CF2 51 push cx 3041 lvar word, column 0 00006CF3 51 push cx 3043 lvar word, promptlength 3044 0 00006CF4 57 push di 0 00006CF5 1E push ds 0 00006CF6 07 pop es 3048 3049 .next: 0 00006CF7 E8[0000] call handle_serial_flags_ctrl_c 3051 0 00006CFA D046EA rol byte [bp + ?redraw], 1 0 00006CFD 7203E90701 jnc .no_do_redraw 3054 .do_redraw: 3055 0 00006D02 E8F203 call get_columns 3057 0 00006D05 8946FE mov word [bp + ?columns], ax 0 00006D08 48 dec ax ; $COLS - 1 0 00006D09 2B46E2 sub ax, word [bp + ?promptlength]; - $promptlength 0 00006D0C 8946FC mov word [bp + ?maxpercol], ax 0 00006D0F D1E8 shr ax, 1 ; int($maxpercol / 2) 0 00006D11 7501 jnz @F 0 00006D13 40 inc ax ; insure nonzero 3065 @@: 0 00006D14 8946FA mov word [bp + ?maxpercolhalf], ax 3067 0 00006D17 8B46F0 mov ax, [bp + ?length_input] 0 00006D1A 89C1 mov cx, ax 0 00006D1C 31FF xor di, di ; variable "skip" 3071 ; + line_in + 2 -> to display 0 00006D1E 3B46FC cmp ax, word [bp + ?maxpercol] 0 00006D21 8B46E4 mov ax, word [bp + ?column] ; variable "col" 0 00006D24 763B jna .not_show_a_maxpercol 3075 .show_a_maxpercol: 3076 0 00006D26 8B56FC mov dx, word [bp + ?maxpercol] 0 00006D29 0356E2 add dx, word [bp + ?promptlength] 3079 0 00006D2C 8B5EEC mov bx, word [bp + ?lastskip] 0 00006D2F 395EEE cmp word [bp + ?offset], bx 0 00006D32 7307 jae .offset_ae_lastskip ; spaghetti branch --> 3083 .not_offset_ae_lastskip: 3084 3085 @@: 0 00006D34 39D0 cmp ax, dx 0 00006D36 760B jna .not_col_a_maxpercol 3088 .col_a_maxpercol: 0 00006D38 8B5EFA mov bx, [bp + ?maxpercolhalf] ; bx = step length 3090 3091 .offset_ae_lastskip: ; spaghetti branch target, re-uses the 3092 ; code of .col_a_maxpercol 3093 ; sub ax, bx ; col -= lastskip 3094 ; add di, bx ; skip += lastskip 3095 ; sub cx, bx ; lessen length of part to display 0 00006D3B 29D8 sub ax, bx ; lessen col 0 00006D3D 01DF add di, bx ; heighten offset of part to display 0 00006D3F 29D9 sub cx, bx ; lessen length of part to display 0 00006D41 EBF1 jmp @B 3100 3101 .not_col_a_maxpercol: 0 00006D43 3B7EEC cmp di, word [bp + ?lastskip] ; scrolling forwards ? 0 00006D46 7711 ja @F ; yes --> (else backwards or same) 3104 ; The next check should be redundant with the 3105 ; one after it. However, the call to puts with 3106 ; the comment "draw (to move cursor)" will 3107 ; underflow its counter if ax is decremented 3108 ; when it was below-or-equal ?promptlength. 3109 ; Therefore, this check hardens against that. 3110 ; By checking here we ensure that the sub there 3111 ; doesn't underflow, staying above-or-equal 0. 0 00006D48 3B46E2 cmp ax, word [bp + ?promptlength] 3113 ; possibly at end ? 0 00006D4B 760C jbe @F ; no --> 0 00006D4D 39D0 cmp ax, dx ; are we at end ? 0 00006D4F 7508 jne @F ; no --> 0 00006D51 3B4EFC cmp cx, word [bp + ?maxpercol] ; displaying the last fragment ? 0 00006D54 7603 jbe @F ; yes, do not move up --> 0 00006D56 48 dec ax 0 00006D57 47 inc di 0 00006D58 49 dec cx ; move up display by one column 3122 @@: 0 00006D59 3B4EFC cmp cx, word [bp + ?maxpercol] 0 00006D5C 7603 jbe @F 0 00006D5E 8B4EFC mov cx, word [bp + ?maxpercol] 3126 @@: 3127 .not_show_a_maxpercol: 0 00006D61 397EEC cmp word [bp + ?lastskip], di ; need to scroll ? 0 00006D64 7408 je @F ; no --> 0 00006D66 8366E800 and word [bp + ?low_cursormove_and_high_append], 0 3131 ; yes, ignore appending status 3132 ; ignore cursor move status too 0 00006D6A C646E600 mov byte [bp + ?cursorright], 0 ; also reset this flag 3134 @@: 3135 0 00006D6E 897EEC mov word [bp + ?lastskip], di ; update variable for next iteration 0 00006D71 8D95[0200] lea dx, [di + line_in + 2] ; -> visible text's data 3138 0 00006D75 89CB mov bx, cx 0 00006D77 875EF2 xchg bx, word [bp + ?length_displayed] 3141 ; bx = remember how much we had, 3142 ; and update variable 3143 0 00006D7A D046E8 rol byte [bp + ?cursormove], 1 ; cursor move without visible window move ? 0 00006D7D 7250 jc .redraw_always_move_cursor ; yes, skip full redraw and also 3146 ; force to do cursor movement --> 0 00006D7F 50 push ax 0 00006D80 53 push bx 0 00006D81 51 push cx 0 00006D82 52 push dx 3151 ; On stack: 3152 ; -> start of visible text's data 3153 ; length of visible text 3154 ; prior length of visible text (from prior iteration) 3155 ; variable "col" 0 00006D83 D046E9 rol byte [bp + ?append], 1 ; text appended without visible window move ? 0 00006D86 730E jnc .not_append_redraw ; no, do full redraw --> 0 00006D88 F656E9 not byte [bp + ?append] ; = 0, reset flag after its use 0 00006D8B 01CA add dx, cx ; -> behind text to write 0 00006D8D 4A dec dx ; -> at last codepoint (appended) 0 00006D8E B90100 mov cx, 1 ; only append 3162 %if _GETLINEHIGHLIGHT 3163 ; This appended text is always the very last text 3164 ; in the buffer so it never should get highlighted. 3165 ; If this build option is not in use then the next 3166 ; branch is to the call puts below, re-using that 3167 ; call there that's also used for the full redraw. 0 00006D91 E893F3 call puts ; draw appended text 3169 %endif 0 00006D94 EB1A jmp .after_append_redraw ; skip past more prompt/text redraw 3171 3172 .not_append_redraw: 0 00006D96 51 push cx 0 00006D97 52 push dx 0 00006D98 B00D mov al, 13 0 00006D9A E8BEF8 call putc ; reset to start of line 3177 0 00006D9D C456F6 les dx, [bp + ?prompt] 0 00006DA0 8B4EE2 mov cx, [bp + ?promptlength] 0 00006DA3 E881F3 call puts ; redraw the prompt 0 00006DA6 16 push ss 0 00006DA7 07 pop es ; reset es 0 00006DA8 5A pop dx 0 00006DA9 59 pop cx ; restore registers for text redraw 3185 %if _GETLINEHIGHLIGHT 3186 ; di for prefix highlight condition 0 00006DAA 8B5EF0 mov bx, word [bp + ?length_input] 3188 ; bx for suffix highlight condition 0 00006DAD E87703 call puts_with_highlight ; redraw the text 3190 .after_append_redraw: 3191 %else 3192 .after_append_redraw: 3193 call puts ; redraw the text 3194 %endif 0 00006DB0 5A pop dx 0 00006DB1 5B pop bx 0 00006DB2 59 pop cx 3198 ; dx -> start of visible text's data 3199 ; bx = new length of visible text 3200 ; cx = prior length of visible text (from prior iteration) 3201 ; on stack = variable "col" 0 00006DB3 29D9 sub cx, bx ; = how many blanks needed to overwrite 0 00006DB5 7609 jbe @FF 0 00006DB7 01CB add bx, cx ; = length displayed 0 00006DB9 B020 mov al, 32 3206 @@: 0 00006DBB E89DF8 call putc 0 00006DBE E2FB loop @B 3209 @@: 0 00006DC0 58 pop ax 3211 ; dx -> start of visible text's data 3212 ; ax = variable "col" 3213 ; bx = length of redrawn text (including blanks), 3214 ; this indicates where the cursor is 3215 3216 ; The following check determines whether the 3217 ; cursor is already where we want it to be 3218 ; after the full redraw is done, including the 3219 ; blanks after the visible text that were used 3220 ; to erase the prior visible text (if any). 3221 ; If this branches then the cursor movement is 3222 ; not needed and thus we're done redrawing. 0 00006DC1 01D3 add bx, dx 0 00006DC3 81EB[0200] sub bx, line_in + 2 ; offset into line (with length displayed) 0 00006DC7 035EE2 add bx, word [bp + ?promptlength]; offset into display 0 00006DCA 3B5EE4 cmp bx, word [bp + ?column] ; same as column ? 0 00006DCD 7437 je .do_redraw_done ; yes, skip cursor movement stuff --> 3228 3229 .redraw_always_move_cursor: 0 00006DCF C646E800 mov byte [bp + ?cursormove], 0 ; reset flag after its use 3231 3232 ; dx -> start of visible text's data 3233 ; ax = variable "col" 0 00006DD3 D046E6 rol byte [bp + ?cursorright], 1 ; only cursor to the right without 3235 ; having to scroll the visible text ? 0 00006DD6 7312 jnc @F ; no, do redraw --> 0 00006DD8 F656E6 not byte [bp + ?cursorright] ; = 0, reset for next iteration 0 00006DDB B90100 mov cx, 1 ; length of text to write 0 00006DDE 2B46E2 sub ax, word [bp + ?promptlength] 3240 ; = offset into input text 0 00006DE1 48 dec ax ; -> last codepoint of text 3242 ;; test ax, ax ; at start of visible text ? 0 00006DE2 741D jz .redraw_cursorright ; yes, leave di so as to highlight 3244 ; the prefix as appropriate --> 3245 ; (and dx is correct, we'd add zero) 0 00006DE4 31FF xor di, di ; else, tell it not to highlight 0 00006DE6 01C2 add dx, ax ; dx = "skip" + line_in + 2 + index 0 00006DE8 EB17 jmp .redraw_cursorright 3249 3250 @@: 0 00006DEA 50 push ax 0 00006DEB 52 push dx 0 00006DEC B00D mov al, 13 0 00006DEE E86AF8 call putc ; reset cursor 0 00006DF1 C456F6 les dx, [bp + ?prompt] 0 00006DF4 8B4EE2 mov cx, [bp + ?promptlength] 0 00006DF7 E82DF3 call puts ; redraw prompt 0 00006DFA 16 push ss 0 00006DFB 07 pop es 0 00006DFC 5A pop dx ; -> current input text 0 00006DFD 59 pop cx ; = col 0 00006DFE 2B4EE2 sub cx, word [bp + ?promptlength] 3263 ; = offset into input text, 3264 ; draw that much 3265 .redraw_cursorright: 3266 %if _GETLINEHIGHLIGHT 3267 ; ! di is still set to lastskip value, 3268 ; or reset to zero if cursor right with 3269 ; just a single codepoint redraw but the 3270 ; codepoint to redraw is not at the start 3271 ; of the visible text. 3272 ; di for prefix highlight condition 3273 ; We need to make sure that the suffix is never 3274 ; highlighted here because we are writing a 3275 ; fragment that does not include the last part 3276 ; of the visible text. By zeroing bx we can 3277 ; ensure the suffix highlight condition is 3278 ; always considered to be false. 0 00006E01 31DB xor bx, bx ; bx = 0, never highlight a suffix 0 00006E03 E82103 call puts_with_highlight 3281 %else 3282 call puts ; draw (to move cursor) 3283 %endif 3284 3285 .do_redraw_done: 0 00006E06 F656EA not byte [bp + ?redraw] ; = 0 3287 3288 .no_do_redraw: 3289 0 00006E09 D046EB rol byte [bp + ?beep], 1 0 00006E0C 7308 jnc .no_do_beep 3292 .do_beep: 0 00006E0E B007 mov al, 7 0 00006E10 E848F8 call putc 3295 0 00006E13 F656EB not byte [bp + ?beep] ; = 0 3297 .no_do_beep: 3298 0 00006E16 E883F8 call getc ; ax = keycode, al = ASCII or 0 3300 3301 ; check scancode for int 16h in non-dumb dosemu first 0 00006E19 86C4 xchg al, ah 0 00006E1B 3C48 cmp al, 48h 0 00006E1D 7503E9F501 je .up 0 00006E22 3C4B cmp al, 4Bh 0 00006E24 7503E9C201 je .left 0 00006E29 3C50 cmp al, 50h 0 00006E2B 7503E90202 je .down 0 00006E30 3C4D cmp al, 4Dh 0 00006E32 7503E9C701 je .right 0 00006E37 3C52 cmp al, 52h 0 00006E39 7503E94B02 je .insert 0 00006E3E 3C53 cmp al, 53h 0 00006E40 7503E96801 je .del 0 00006E45 3C47 cmp al, 47h 0 00006E47 7503E98501 je .home 0 00006E4C 3C4F cmp al, 4Fh 0 00006E4E 7503E98A01 je .end 0 00006E53 3C49 cmp al, 49h 0 00006E55 7503E92F02 je .pageup 0 00006E5A 3C51 cmp al, 51h 0 00006E5C 7503E92802 je .pagedown 3323 3324 ; not a special scancode, check character returned 0 00006E61 86C4 xchg al, ah 0 00006E63 3C1B cmp al, 1Bh 0 00006E65 7403E98B00 jne .not_esc 3328 3329 ; check escape scancodes for int 16h in -dumb dosemu 3330 ; or input from serial I/O (picocom/screen/ssh/mate-terminal) 3331 .esc: 0 00006E6A E82FF8 call getc 0 00006E6D 3C5B cmp al, '[' 0 00006E6F 7403E91502 jne .beep 0 00006E74 E825F8 call getc 0 00006E77 3C41 cmp al, 41h 0 00006E79 7503E99901 je .up 0 00006E7E 3C44 cmp al, 44h 0 00006E80 7503E96601 je .left 0 00006E85 3C42 cmp al, 42h 0 00006E87 7503E9A601 je .down 0 00006E8C 3C43 cmp al, 43h 0 00006E8E 7503E96B01 je .right 0 00006E93 3C32 cmp al, 32h 0 00006E95 7425 je .check_insert 0 00006E97 3C33 cmp al, 33h 0 00006E99 7421 je .check_del 0 00006E9B 3C31 cmp al, 31h 0 00006E9D 741D je .check_home 0 00006E9F 3C34 cmp al, 34h 0 00006EA1 7419 je .check_end 0 00006EA3 3C48 cmp al, 48h 0 00006EA5 7503E92701 je .home 0 00006EAA 3C46 cmp al, 46h 0 00006EAC 7503E92C01 je .end 0 00006EB1 3C35 cmp al, 35h 0 00006EB3 7407 je .check_pageup 0 00006EB5 3C36 cmp al, 36h 0 00006EB7 7403 je .check_pagedown 0 00006EB9 E9CD01 jmp .beep 3361 3362 3363 .check_insert: 3364 .check_del: 3365 .check_home: 3366 .check_end: 3367 .check_pageup: 3368 .check_pagedown: 0 00006EBC 50 push ax 0 00006EBD E8DCF7 call getc 0 00006EC0 3C7E cmp al, 7Eh 0 00006EC2 58 pop ax 0 00006EC3 7403E9C101 jne .beep 3374 0 00006EC8 3C32 cmp al, 32h 0 00006ECA 7503E9BA01 je .insert 0 00006ECF 3C33 cmp al, 33h 0 00006ED1 7503E9D700 je .del 0 00006ED6 3C31 cmp al, 31h 0 00006ED8 7503E9F400 je .home 0 00006EDD 3C34 cmp al, 34h 0 00006EDF 7503E9F900 je .end 0 00006EE4 3C35 cmp al, 35h 0 00006EE6 7503E99E01 je .pageup 0 00006EEB 3C36 cmp al, 36h 0 00006EED 7503E99701 je .pagedown 3387 0 00006EF2 E99401 jmp .beep 3389 3390 3391 .not_esc: 3392 ; check regular characters 0 00006EF5 84C0 test al, al ; waste? 0 00006EF7 7503E9FBFD je .next 0 00006EFC 3CE0 cmp al, 0E0h 0 00006EFE 7503E9F4FD je .next ; waste --> 3397 0 00006F03 3C01 cmp al, 'A' - '@' 0 00006F05 7503E9C700 je .home 0 00006F0A 3C05 cmp al, 'E' - '@' 0 00006F0C 7503E9CC00 je .end 0 00006F11 3C03 cmp al, 03h 0 00006F13 7503E97801 je .ctrlc 0 00006F18 3C09 cmp al, 09h 0 00006F1A 7503E96A01 je .beep ; tab 0 00006F1F 3C08 cmp al, 08h 0 00006F21 745F je .backspace 0 00006F23 3C7F cmp al, 7Fh 3409 ; On the server in int 16h of -dumb dosemu, as well as on 3410 ; both systems across serial I/O this code is used. 0 00006F25 745B je .backspace 0 00006F27 3C0A cmp al, 10 ; (allow Linux style linebreak) 0 00006F29 7503E96501 je .done 0 00006F2E 3C0D cmp al, 13 ; (match for CR keypress) 0 00006F30 7503E95E01 je .done 3416 3417 .textcodepoint: 0 00006F35 8B5EF0 mov bx, word [bp + ?length_input] 0 00006F38 81FBFE00 cmp bx, ?limit 0 00006F3C 7207 jb @F 3421 .redraw_and_beep: 0 00006F3E C646EAFF mov byte [bp + ?redraw], -1 0 00006F42 E94401 jmp .beep 3424 @@: 3425 0 00006F45 C646E7FF mov byte [bp + ?edited], -1 0 00006F49 8B56F0 mov dx, word [bp + ?length_input] 0 00006F4C 89D1 mov cx, dx 0 00006F4E 89D7 mov di, dx 0 00006F50 16 push ss 0 00006F51 07 pop es 0 00006F52 81C7[0200] add di, line_in + 2 ; di -> behind end of input 0 00006F56 89FE mov si, di 0 00006F58 4E dec si ; si -> at last entry of input 0 00006F59 2B4EEE sub cx, word [bp + ?offset] 0 00006F5C 7504 jnz @F ; not appending --> 3437 .textappend: 0 00006F5E C646E9FF mov byte [bp + ?append], -1 3439 @@: 0 00006F62 FD std ; AMD erratum 109 workaround done 3441 numdef AMD_ERRATUM_109_WORKAROUND, 1 3442 %if _AMD_ERRATUM_109_WORKAROUND 0 00006F63 E308 jcxz @FF 0 00006F65 83F914 cmp cx, 20 0 00006F68 7703 ja @FF 3446 @@: 0 00006F6A A4 movsb 0 00006F6B E2FD loop @B 3449 @@: 3450 %endif 0 00006F6D F3A4 rep movsb 0 00006F6F FC cld 0 00006F70 8805 mov byte [di], al 0 00006F72 FF46E4 inc word [bp + ?column] 0 00006F75 FF46EE inc word [bp + ?offset] 0 00006F78 FF46F0 inc word [bp + ?length_input] 3457 .redraw: 0 00006F7B C646EAFF mov byte [bp + ?redraw], -1 0 00006F7F E975FD jmp .next 3460 3461 .backspace: 0 00006F82 837EEE00 cmp word [bp + ?offset], 0 0 00006F86 7422 je .backspace_offset_0 3464 0 00006F88 C646E7FF mov byte [bp + ?edited], -1 0 00006F8C 16 push ss 0 00006F8D 07 pop es 0 00006F8E 8B7EEE mov di, word [bp + ?offset] 0 00006F91 8B4EF0 mov cx, word [bp + ?length_input] 0 00006F94 29F9 sub cx, di ; length after offset 0 00006F96 81C7[0200] add di, line_in + 2 ; -> at offset in line 0 00006F9A 89FE mov si, di ; -> at offset in line 0 00006F9C 4F dec di ; -> at offset - 1 in line 0 00006F9D F3A4 rep movsb ; move down additional content 0 00006F9F FF4EE4 dec word [bp + ?column] 0 00006FA2 FF4EEE dec word [bp + ?offset] 0 00006FA5 FF4EF0 dec word [bp + ?length_input] 0 00006FA8 EBD1 jmp .redraw 3479 3480 .backspace_offset_0: 3481 .del_offset_ae_length_input: 3482 .left_offset_0: 3483 .right_offset_too_high: 0 00006FAA E9DC00 jmp .beep 3485 3486 .del: 0 00006FAD 8B46EE mov ax, word [bp + ?offset] 0 00006FB0 3B46F0 cmp ax, word [bp + ?length_input] 0 00006FB3 73F5 jae .del_offset_ae_length_input 0 00006FB5 C646E7FF mov byte [bp + ?edited], -1 0 00006FB9 89C7 mov di, ax 0 00006FBB 81C7[0200] add di, line_in + 2 ; -> at current offset 0 00006FBF 89FE mov si, di 0 00006FC1 46 inc si ; -> after current offset 0 00006FC2 40 inc ax ; offset + 1 0 00006FC3 F7D8 neg ax ; - (offset + 1) 0 00006FC5 0346F0 add ax, word [bp + ?length_input]; length input - (offset + 1) 0 00006FC8 89C1 mov cx, ax 0 00006FCA F3A4 rep movsb ; move down part after deleted point 0 00006FCC FF4EF0 dec word [bp + ?length_input] 0 00006FCF EBAA jmp .redraw 3502 3503 .home: 0 00006FD1 8366EE00 and word [bp + ?offset], 0 0 00006FD5 FF76E2 push word [bp + ?promptlength] 0 00006FD8 8F46E4 pop word [bp + ?column] 0 00006FDB EB9E jmp .redraw 3508 3509 .end: 0 00006FDD 8B46F0 mov ax, word [bp + ?length_input] 0 00006FE0 8946EE mov word [bp + ?offset], ax 0 00006FE3 0346E2 add ax, word [bp + ?promptlength] 0 00006FE6 8946E4 mov word [bp + ?column], ax 0 00006FE9 EB90 jmp .redraw 3515 3516 .left: 0 00006FEB 837EEE00 cmp word [bp + ?offset], 0 0 00006FEF 74B9 je .left_offset_0 0 00006FF1 C646E8FF mov byte [bp + ?cursormove], -1 0 00006FF5 FF4EEE dec word [bp + ?offset] 0 00006FF8 FF4EE4 dec word [bp + ?column] 0 00006FFB E97DFF jmp .redraw 3523 3524 .right: 0 00006FFE 8B46EE mov ax, word [bp + ?offset] 0 00007001 3B46F0 cmp ax, word [bp + ?length_input] 0 00007004 73A4 jnb .right_offset_too_high 0 00007006 C646E8FF mov byte [bp + ?cursormove], -1 0 0000700A C646E6FF mov byte [bp + ?cursorright], -1 0 0000700E FF46EE inc word [bp + ?offset] 0 00007011 FF46E4 inc word [bp + ?column] 0 00007014 E964FF jmp .redraw 3533 3534 .up: 0 00007017 D046E7 rol byte [bp + ?edited], 1 0 0000701A 726D jc .beep 3537 %if _HISTORY 0 0000701C 8B76F4 mov si, word [bp + ?historyentry] 0 0000701F 85F6 test si, si 0 00007021 8D7402 lea si, [si + 2] 0 00007024 7504 jnz @F 0 00007026 8B36[0000] mov si, word [history.last] 3543 @@: 0 0000702A 3B36[0000] cmp si, word [history.first] 0 0000702E 7459 je .beep 0 00007030 EB1A jmp .copyline 3547 3548 .down: 0 00007032 D046E7 rol byte [bp + ?edited], 1 0 00007035 7252 jc .beep 0 00007037 8B76F4 mov si, word [bp + ?historyentry] 0 0000703A 85F6 test si, si 0 0000703C 744B jz .beep 0 0000703E 3B36[0000] cmp si, word [history.last] 0 00007042 7506 jne @F 0 00007044 31C0 xor ax, ax 0 00007046 31C9 xor cx, cx 0 00007048 EB10 jmp .setline 3559 3560 @@: 0 0000704A 4E dec si 0 0000704B 4E dec si 3563 3564 .copyline: 0 0000704C 89F0 mov ax, si 3566 gethistorysegment ds 0 0000704E 368E1E[0000] mov %1, word [ss:history.segorsel] 0 00007053 8B0C mov cx, [si] 0 00007055 8B7402 mov si, [si + 2] 0 00007058 29F1 sub cx, si 3570 3571 .setline: 0 0000705A 8946F4 mov word [bp + ?historyentry], ax 3573 gethistoryoffset bx 0 0000705D BB0000 mov %1, 0 0 00007060 8D30 lea si, [si + bx] 0 00007062 16 push ss 0 00007063 07 pop es 0 00007064 BF[0100] mov di, line_in + 1 0 00007067 88C8 mov al, cl 0 00007069 AA stosb 0 0000706A F3A4 rep movsb 0 0000706C B00D mov al, 13 0 0000706E AA stosb 0 0000706F 16 push ss 0 00007070 1F pop ds 3585 %else 3586 .down: equ .beep 3587 3588 mov byte [bp + ?edited], -1 3589 %endif 0 00007071 31C0 xor ax, ax 0 00007073 A0[0100] mov al, byte [line_in + 1] 0 00007076 8946EE mov word [bp + ?offset], ax 0 00007079 8946F0 mov word [bp + ?length_input], ax 0 0000707C 0346E2 add ax, word [bp + ?promptlength] 0 0000707F 8946E4 mov word [bp + ?column], ax 0 00007082 8366EC00 and word [bp + ?lastskip], 0 0 00007086 E9F2FE jmp .redraw 3598 3599 .insert: 3600 .pageup: 3601 .pagedown: 3602 .beep: 0 00007089 C646EBFF mov byte [bp + ?beep], -1 0 0000708D E967FC jmp .next 3605 3606 .ctrlc: 0 00007090 E9[0000] jmp handle_ctrl_c 3608 3609 .done: 0 00007093 8B7EF0 mov di, word [bp + ?length_input] 3611 0 00007096 8B56EC mov dx, word [bp + ?lastskip] 0 00007099 0356F2 add dx, word [bp + ?length_displayed] 3614 ; offset into line (with length displayed) 0 0000709C 0356E2 add dx, word [bp + ?promptlength]; offset into display 0 0000709F 3B56E4 cmp dx, word [bp + ?column] ; same as column ? 0 000070A2 750A jne @F ; no, always redraw --> 3618 0 000070A4 89F8 mov ax, di 0 000070A6 0346E2 add ax, word [bp + ?promptlength] 0 000070A9 3946FE cmp word [bp + ?columns], ax 0 000070AC 7720 ja .done_no_redraw 3623 3624 @@: 0 000070AE B00D mov al, 13 0 000070B0 E8A8F5 call putc ; reset cursor 0 000070B3 C456F6 les dx, [bp + ?prompt] 0 000070B6 8B4EE2 mov cx, [bp + ?promptlength] ; es:dx length cx -> prompt data 3629 %if _40COLUMNS 0 000070B9 31C0 xor ax, ax ; last fragment length = 0 0 000070BB E882F3 call puts_break_line 0 000070BE 16 push ss 0 000070BF 07 pop es 0 000070C0 8B4EF0 mov cx, word [bp + ?length_input] 0 000070C3 E303 jcxz @F ; if empty line --> 0 000070C5 E89DF3 call puts_break_line_more ; more follows, do a linebreak if ax == 0 3637 @@: 0 000070C8 BA[0200] mov dx, line_in + 2 ; es:dx length cx -> input line data 0 000070CB E872F3 call puts_break_line ; INP:ax = last fragment length 3640 ; jmp .done_no_redraw 3641 ; (fall through) 3642 %else 3643 call puts ; redraw prompt 3644 push ss 3645 pop es 3646 mov dx, line_in + 2 3647 mov cx, word [bp + ?length_input] 3648 call puts ; draw 3649 %endif 3650 3651 .done_no_redraw: 0 000070CE 81C7[0200] add di, line_in + 2 0 000070D2 B00D mov al, 13 0 000070D4 AA stosb ; store the CR (there always is room) 0 000070D5 97 xchg ax, di ; -> behind CR 3656 %ifn _LINK 3657 sub al, ((-section.DATASTACK.vstart+100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size) +line_in+3) & 0FFh ; length of string, excluding CR 3660 ; (This instruction disregards the unnecessary higher byte.) 3661 %else 0 000070D6 2C03 sub al, 3 3663 wlcalc byte_ext_line_in, equ $ - 1 3664 %endif 0 000070D8 5F pop di ; restore di 0 000070D9 A2[0100] mov byte [line_in+1], al ; store the length byte 0 000070DC 89EC5D lleave code 3668 %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 000070DF F616[0000] not byte [in_getinput] ; clear 0 000070E3 B301 mov bl, 1 3671 %endif 0 000070E5 E937FA jmp getline_eol_enter_history_and_ext 3673 3674 lleave ctx 3675 3676 3677 fullbsout: 0 000070E8 B008 mov al, 8 0 000070EA E86EF5 call putc 0 000070ED B020 mov al, 32 0 000070EF E869F5 call putc 0 000070F2 B008 mov al, 8 0 000070F4 E964F5 jmp putc 3684 3685 3686 ; INP: - 3687 ; OUT: ax = number of columns to use 3688 ; STT: ds = ss = debugger data selector 3689 get_columns: 0 000070F7 31C0 xor ax, ax 0 000070F9 F606[0000]10 testopt [serial_flags], sf_use_serial 3692 ; serial ? 0 000070FE 7411 jz @F ; no --> 0 00007100 0A06[0000] or al, byte [serial_columns] ; ax = number of columns if serial 0 00007104 7407 jz .default_columns 0 00007106 3C01 cmp al, 1 0 00007108 751C jne @FF 0 0000710A 48 dec ax ; = 0 0 0000710B EB04 jmp @F ; use IOC / BDA selection 3700 .default_columns: 0 0000710D B050 mov al, 80 0 0000710F EB15 jmp @FF 3703 @@: 0 00007111 0A06[0000] or al, [io_columns] 0 00007115 74F6 jz .default_columns 0 00007117 3C01 cmp al, 1 ; is 1 ? 0 00007119 750B jne @F ; no, use as columns --> 3708 ; yes, automatic (use BDA) 0 0000711B 06 push es 0 0000711C B84000 mov ax, 40h ; 0040h is a bimodal segment/selector 0 0000711F 8EC0 mov es, ax 0 00007121 26A14A00 mov ax, word [ es:4Ah ] ; columns on screen 0 00007125 07 pop es 3714 @@: 0 00007126 C3 retn 3716 3717 3718 %if _GETLINEHIGHLIGHT 3719 ; INP: di = index from total text start to visible text 3720 ; cx = length of visible text to display 3721 ; dx -> visible text to display 3722 ; bx = length of total text 3723 ; di != 0 if to highlight first codepoint 3724 ; di + cx < bx if to highlight last codepoint 3725 ; OUT: if INP:cx == 0, 3726 ; just returns 3727 ; if opt3_getline_highlight not set, 3728 ; just chains to puts 3729 ; no prefix highlight if INP:di == 0, 3730 ; else first codepoint displayed highlighted 3731 ; no suffix highlight if INP:di + INP:cx >= INP:bx, 3732 ; else last codepoint displayed highlighted 3733 ; calls puts and/or putsz to display all text 3734 ; CHG: ax, bx, cx, dx 3735 puts_with_highlight: 0 00007127 E33F jcxz .retn 0 00007129 F606[0300]01 testopt [options3], opt3_getline_highlight 0 0000712E 7439 jz .justputs 0 00007130 51 push cx 0 00007131 85FF test di, di ; prefix to highlight ? 0 00007133 7414 jz @F ; no --> 3742 .prefix: 0 00007135 53 push bx 0 00007136 E83300 call emit_highlight 0 00007139 52 push dx ; ! dx on stack 0 0000713A 51 push cx 0 0000713B B90100 mov cx, 1 0 0000713E E8E6EF call puts ; draw one codepoint 0 00007141 59 pop cx 0 00007142 E83000 call emit_unhighlight 0 00007145 5A pop dx ; ! restore dx -> data 0 00007146 42 inc dx ; -> second codepoint 0 00007147 49 dec cx ; length one less 0 00007148 5B pop bx 3755 @@: 0 00007149 58 pop ax ; = length of text (including prefix) 0 0000714A 01F8 add ax, di ; = index past last displayed 0 0000714C 39D8 cmp ax, bx ; is it equal to total text length ? 0 0000714E 7319 jae .justputs ; yes, just display --> 3760 3761 .suffix: 0 00007150 E316 jcxz .retn ; if no suffix possible --> 0 00007152 49 dec cx ; = length of unhighlighted text 0 00007153 89C8 mov ax, cx 0 00007155 01D0 add ax, dx ; -> at codepoint to highlight 0 00007157 50 push ax 0 00007158 E8CCEF call puts ; draw unhighlighted text 0 0000715B E80E00 call emit_highlight 0 0000715E 5A pop dx ; -> at codepoint to highlight 0 0000715F B90100 mov cx, 1 0 00007162 E8C2EF call puts ; draw one codepoint 0 00007165 E80D00 call emit_unhighlight 3773 .retn: 0 00007168 C3 retn 3775 3776 .justputs: 0 00007169 E9BBEF jmp puts ; draw text (no highlight) 3778 %endif 3779 3780 3781 %if _GETLINEHIGHLIGHT || _DHIGHLIGHT 3782 emit_highlight: 0 0000716C 52 push dx 0 0000716D BA[0100] mov dx, msg.highlight + 1 ; -> ASCIZ escape code 0 00007170 E8C6F4 call putsz 0 00007173 5A pop dx 0 00007174 C3 retn 3788 3789 emit_unhighlight: 0 00007175 52 push dx 0 00007176 BA[0100] mov dx, msg.unhighlight + 1 ; -> ASCIZ escape code 0 00007179 E8BDF4 call putsz 0 0000717C 5A pop dx 0 0000717D C3 retn 3795 %endif 3796 3797 3798 getline_reset_notatty: 0 0000717E F606[0300]02 testopt [internalflags3], dif3_input_re_closed 0 00007183 7421 jz @F 0 00007185 8026[0300]FD clropt [internalflags3], dif3_input_re_closed 0 0000718A F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 0000718F 7515 jnz @F 3804 %if _INPUT_FILE_HANDLES 0 00007191 E8[0000] call InDOS_or_BIOS_IO 0 00007194 7507 jnz .notfile1 0 00007196 F606[0200]10 testopt [internalflags2], dif2_input_file 0 0000719B 7509 jnz @F 3809 .notfile1: 3810 %endif 3811 %if _INPUT_FILE_BOOT 0 0000719D F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 000071A2 7502 jnz @F 3814 %endif 0 000071A4 EB47 jmp .clear_notatty 3816 3817 @@: 0 000071A6 F606[0100]02 testopt [internalflags3], dif3_input_cmdline_closed 0 000071AB 741A jz @F 0 000071AD 8026[0100]FD clropt [internalflags3], dif3_input_cmdline_closed 3821 %if _INPUT_FILE_HANDLES 0 000071B2 E8[0000] call InDOS_or_BIOS_IO 0 000071B5 7507 jnz .notfile2 0 000071B7 F606[0200]10 testopt [internalflags2], dif2_input_file 0 000071BC 7509 jnz @F 3826 .notfile2: 3827 %endif 3828 %if _INPUT_FILE_BOOT 0 000071BE F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 000071C3 7502 jnz @F 3831 %endif 0 000071C5 EB26 jmp .clear_notatty 3833 3834 @@: 3835 %if _INPUT_FILE_BOOT 0 000071C7 F606[0300]04 testopt [internalflags2], dif2_closed_input_file_boot 0 000071CC 7413 jz @F 0 000071CE 8026[0300]FB clropt [internalflags2], dif2_closed_input_file_boot 3839 %if _INPUT_FILE_HANDLES 0 000071D3 E8[0000] call InDOS_or_BIOS_IO 0 000071D6 7507 jnz .notfile3 0 000071D8 F606[0200]10 testopt [internalflags2], dif2_input_file 0 000071DD 7502 jnz @F 3844 .notfile3: 3845 %endif 0 000071DF EB0C jmp .clear_notatty 3847 @@: 3848 %endif 3849 %if _INPUT_FILE_HANDLES 0 000071E1 F606[0200]20 testopt [internalflags2], dif2_closed_input_file 0 000071E6 7411 jz @F 0 000071E8 8026[0200]DF clropt [internalflags2], dif2_closed_input_file 3853 %else 3854 jmp @F 3855 %endif 3856 .clear_notatty: 0 000071ED F606[0000]30 testopt [internalflags], inputfile | notstdinput 0 000071F2 7505 jnz @F 0 000071F4 C606[0000]00 mov byte [notatty], 0 ; it _is_ a tty 3860 @@: 0 000071F9 C3 retn 3862 3863 3864 ; Fill input buffer from file. 3865 ; 3866 ; INP: di-> first available byte in input buffer 3867 ; OUT: CY if DOS returned an error or EOF occured 3868 ; NC if no error 3869 ; si = di 3870 ; CHG: - 3871 fillbuf: 0 000071FA E8[0000] call handle_serial_flags_ctrl_c 0 000071FD 50 push ax 0 000071FE 53 push bx 0 000071FF 51 push cx 0 00007200 52 push dx 0 00007201 89FE mov si, di ; we know this already 0 00007203 B9[0101] mov cx, line_in+LINE_IN_LEN 0 00007206 89FA mov dx, di 0 00007208 29F9 sub cx, di 0 0000720A 7703E99E00 jbe .ret_cy ; if no more room --> 3882 3883 %if !_LOADER 0 0000720F F606[0300]01 testopt [internalflags3], dif3_input_re 0 00007214 7429 jz .not_re 0 00007216 56 push si 0 00007217 57 push di 0 00007218 89CB mov bx, cx 0 0000721A 8B36[0000] mov si, word [re_buffer.position] 0 0000721E 89F7 mov di, si 0 00007220 B9FFFF mov cx, -1 0 00007223 31C0 xor ax, ax 0 00007225 F2AE repne scasb 0 00007227 F7D1 not cx 0 00007229 49 dec cx 0 0000722A 39CB cmp bx, cx 0 0000722C 7702 ja @F 0 0000722E 89D9 mov cx, bx 3899 @@: 0 00007230 89C8 mov ax, cx 0 00007232 89D7 mov di, dx 0 00007234 F3A4 rep movsb 0 00007236 8936[0000] mov word [re_buffer.position], si 0 0000723A 5F pop di 0 0000723B 5E pop si 0 0000723C F8 clc 0 0000723D EB60 jmp .after 3908 3909 .not_re: 3910 %endif 3911 3912 %if _INPUT_FILE_BOOT 0 0000723F F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00007244 7408 jz @F 0 00007246 E8[0000] call yy_boot_remember_seek 0 00007249 E8[0000] call yy_boot_read 0 0000724C EB51 jmp .after 3918 @@: 3919 %endif 3920 3921 %if _INPUT_FILE_HANDLES 0 0000724E E8[0000] call InDOS_or_BIOS_IO 0 00007251 750E jnz @F 0 00007253 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00007258 7407 jz @F ; if not input file --> 0 0000725A 57 push di 0 0000725B E82AF6 call yy_get_handle ; bx = handle 0 0000725E 5F pop di 0 0000725F EB37 jmp .file_handle 3930 %endif 3931 3932 @@: 0 00007261 F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00007266 7429 jz .not_cmdline 0 00007268 56 push si 0 00007269 57 push di 0 0000726A 89CB mov bx, cx 0 0000726C 8B36[0000] mov si, word [cmdline_buffer.position] 0 00007270 89F7 mov di, si 0 00007272 B9FFFF mov cx, -1 0 00007275 31C0 xor ax, ax 0 00007277 F2AE repne scasb 0 00007279 F7D1 not cx 0 0000727B 49 dec cx 0 0000727C 39CB cmp bx, cx 0 0000727E 7702 ja @F 0 00007280 89D9 mov cx, bx 3948 @@: 0 00007282 89C8 mov ax, cx 0 00007284 89D7 mov di, dx 0 00007286 F3A4 rep movsb 0 00007288 8936[0000] mov word [cmdline_buffer.position], si 0 0000728C 5F pop di 0 0000728D 5E pop si 0 0000728E F8 clc 0 0000728F EB0E jmp .after 3957 3958 .not_cmdline: 3959 3960 @@: 0 00007291 31DB xor bx, bx ; bx = handle (0 is STDIN) 0 00007293 E8[0000] call InDOS_or_BIOS_IO 0 00007296 7515 jnz .ret_cy 3964 3965 .file_handle: 0 00007298 B43F mov ah, 3Fh ; read from file 0 0000729A E84108 call yy_remember_seek 3968 doscall 0 0000729D CD21 int 21h 3969 .after: 0 0000729F 720C jc .ret_cy ; if error --> 0 000072A1 85C0 test ax, ax 0 000072A3 7408 jz .ret_cy ; if EOF --> 0 000072A5 01C2 add dx, ax ; -> behind last valid byte 3974 0 000072A7 8026[0100]FB clropt [internalflags3], dif3_at_line_end 3976 0 000072AC A8 db __TEST_IMM8 ; (NC) 3978 .ret_cy: 0 000072AD F9 stc 0 000072AE 8916[0000] mov word [bufend], dx ; -> behind last valid byte 0 000072B2 5A pop dx 0 000072B3 59 pop cx 0 000072B4 5B pop bx 0 000072B5 58 pop ax 0 000072B6 C3 retn 3986 3987 3988 %if _EXTENSIONS || _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 3989 display_y_or_ext: 0 000072B7 52 push dx 3991 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 000072B8 BA[0000] mov dx, msg.y 3993 %if _EXTENSIONS 0 000072BB D006[0000] rol byte [yy_is_script], 1 0 000072BF 7203 jc @F 3996 %endif 3997 %endif 3998 %if _EXTENSIONS 0 000072C1 BA[0000] mov dx, msg.ext 4000 %endif 4001 @@: 0 000072C4 E86CF3 call putsz_error 0 000072C7 5A pop dx 0 000072C8 C3 retn 4005 %endif 4006 4007 4008 %if _EXTENSIONS 4009 close_ext: section_of_function 4010 %if _APPLICATION || _DEVICE 0 000072C9 E8[0000] call InDOS 0 000072CC 7510 jnz @F 0 000072CE BBFFFF mov bx, -1 0 000072D1 871E[0000] xchg bx, word [ext_handle] 0 000072D5 83FBFF cmp bx, -1 0 000072D8 7404 je @F 0 000072DA B43E mov ah, 3Eh 4018 doscall 0 000072DC CD21 int 21h 4019 @@: 4020 %endif 0 000072DE C3 retn 4022 4023 load_extension: 0 000072DF E80CED call skipcomma 0 000072E2 C606[0000]00 mov byte [yy_is_script], 0 0 000072E7 EB08 jmp @F 4027 %endif 4028 4029 %ifn _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4030 yy equ error 4031 %else 4032 yy: 0 000072E9 C606[0000]FF mov byte [yy_is_script], 0FFh 4034 %endif 4035 %if _EXTENSIONS || _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 000072EE E8[0000] call guard_re 4037 @@: 4038 yy_or_ext_no_guard_re: 4039 %if _INPUT_FILE_BOOT || (_EXTENSIONS && _BOOTLDR) 0 000072F1 F606[0100]40 testopt [internalflags], nodosloaded 0 000072F6 7403E9[0000] jnz yy_boot 4042 %endif 4043 %ifn _INPUT_FILE_HANDLES || (_EXTENSIONS && (_APPLICATION || _DEVICE)) 4044 jmp error 4045 %else 4046 %if _EXTENSIONS && (_APPLICATION || _DEVICE) 0 000072FB D006[0000] rol byte [yy_is_script], 1 0 000072FF 721A jc @F 0 00007301 E8[0000] call InDOS 0 00007304 E82B01 call yy_dos_parse_name 0 00007307 8D54FF lea dx, [si - 1] 0 0000730A 8916[0000] mov word [ext_cmdline], dx 0 0000730E E8DEEC call skipcomm0 0 00007311 8936[0000] mov word [if_exists_then_address], si 0 00007315 E82A02 call yy_open_file 0 00007318 E9F702 jmp ext_finish 4057 4058 @@: 4059 %endif 4060 %ifn _INPUT_FILE_HANDLES 4061 jmp error 4062 %else 0 0000731B E8[0000] call InDOS_or_BIOS_IO 0 0000731E E81101 call yy_dos_parse_name 4065 0 00007321 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00007326 7413 jz @F 4068 ; IFH = 1 4069 ; IFH - 1 = 0 4070 ; cmp active, 0 4071 ; active >= 0 --> error 4072 4073 ; IFH = 2 4074 ; IFH - 1 = 1 4075 ; cmp active, 1 4076 ; active >= 1 --> error 0 00007328 833E[0000]0F cmp word [input_file_handles.active], _INPUT_FILE_HANDLES - 1 0 0000732D 720C jb @F 4079 0 0000732F B80803 mov ax, 0308h 0 00007332 E8[0000] call setrc 0 00007335 BA[0000] mov dx, msg.yy_too_many_handles 0 00007338 E99901 jmp yy_disp_error_1 4084 @@: 4085 0 0000733B 803F3A cmp byte [bx], ':' 0 0000733E 755E jne .not_yy_goto_subfunction 4088 0 00007340 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00007345 750C jnz @F 4091 0 00007347 E8B6F8 call getline_is_input_file? 0 0000734A 7246 jc .no_file 0 0000734C F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00007351 753F jnz .no_file 4096 @@: 4097 0 00007353 8B3E[0000] mov di, word [terminator_in_line_in.offset] 0 00007357 A0[0000] mov al, byte [terminator_in_line_in.value] 0 0000735A 8805 mov byte [di], al 4101 0 0000735C 43 inc bx 0 0000735D 89DE mov si, bx 0 0000735F E8BBEC call skipwhite 0 00007362 4E dec si 0 00007363 89F5 mov bp, si 4107 0 00007365 E85F06 call yy_reset_buf 4109 0 00007368 31DB xor bx, bx ; bx = handle (0 is STDIN) 4111 %if _INPUT_FILE_HANDLES 0 0000736A F606[0200]10 testopt [internalflags2], dif2_input_file 0 0000736F 7405 jz @F ; if not input file --> 0 00007371 57 push di 0 00007372 E813F5 call yy_get_handle ; bx = handle 0 00007375 5F pop di 4117 @@: 4118 %endif 0 00007376 B445 mov ah, 45h 4120 doscall ; duplicate file handle 0 00007378 CD21 int 21h 0 0000737A 7303E9FE01 jc yy_open_file.error 0 0000737F 93 xchg ax, bx 4123 0 00007380 31C9 xor cx, cx 0 00007382 31D2 xor dx, dx 0 00007384 B80142 mov ax, 4201h ; lseek, from current file position 4127 doscall ; call DOS 0 00007387 CD21 int 21h 0 00007389 91 xchg ax, cx ; dx:cx = current seek 0 0000738A 87D1 xchg dx, cx ; cx:dx = current seek 0 0000738C BE0001 mov si, ifhfIsDup 0 0000738F 93 xchg ax, bx 0 00007390 EB4F jmp yy_finish 4133 4134 4135 .no_file: 0 00007392 B80903 mov ax, 0309h 0 00007395 E8[0000] call setrc 0 00007398 BA[0000] mov dx, msg.yy_no_file 0 0000739B E93601 jmp yy_disp_error_1 4140 4141 .not_yy_goto_subfunction: 0 0000739E 31ED xor bp, bp 0 000073A0 E84CEC call skipcomm0 0 000073A3 8936[0000] mov word [if_exists_then_address], si 0 000073A7 E828EC call iseol?_or_then 0 000073AA 7429 je .not_yy_goto 4147 0 000073AC 3C3A cmp al, ':' 0 000073AE 7403E9[0000] jne error 4150 0 000073B3 E867EC call skipwhite 0 000073B6 4E dec si 0 000073B7 89F5 mov bp, si 4154 4155 @@: 0 000073B9 AC lodsb 0 000073BA 3C20 cmp al, 32 0 000073BC 740D je @F 0 000073BE 3C09 cmp al, 9 0 000073C0 7409 je @F 0 000073C2 3C2C cmp al, ',' 0 000073C4 7405 je @F 0 000073C6 E81AEC call iseol? 0 000073C9 75EE jne @B 4165 @@: 0 000073CB E821EC call skipcomm0 0 000073CE 8936[0000] mov word [if_exists_then_address], si 0 000073D2 E853EC call chkeol_or_then 4169 4170 .not_yy_goto: 0 000073D5 E86A01 call yy_open_file 4172 4173 ; ax = file handle 0 000073D8 E8EC05 call yy_reset_buf 4175 0 000073DB 31C9 xor cx, cx 0 000073DD 31D2 xor dx, dx 0 000073DF 31F6 xor si, si 4179 yy_finish: 0 000073E1 F606[0200]10 testopt [internalflags2], dif2_input_file 0 000073E6 7509 jnz @F 0 000073E8 800E[0200]10 setopt [internalflags2], dif2_input_file 0 000073ED 31DB xor bx, bx 0 000073EF EB18 jmp @FF 4185 4186 @@: 0 000073F1 FF06[0000] inc word [input_file_handles.active] 0 000073F5 8B1E[0000] mov bx, word [input_file_handles.active] 0 000073F9 D1E3 shl bx, 1 0 000073FB D1E3 shl bx, 1 0 000073FD D1E3 shl bx, 1 ; to qword array index 4192 %if INPUTFILEHANDLE_size != 8 4193 %error Unexpected structure size 4194 %endif 0 000073FF 8BBF[FAFF] mov di, word [input_file_handles + bx - INPUTFILEHANDLE_size + ifhFlags] 0 00007403 81E700F0 and di, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 0 00007407 09FE or si, di 4199 @@: 4200 0 00007409 8987[0000] mov word [input_file_handles + bx + ifhHandle], ax 0 0000740D 89B7[0200] mov word [input_file_handles + bx + ifhFlags], si 0 00007411 8997[0400] mov word [input_file_handles + bx + ifhParentSeek], dx 0 00007415 898F[0600] mov word [input_file_handles + bx + ifhParentSeek + 2], cx 4205 0 00007419 8026[0300]EF clropt [internalflags3], dif3_auxbuff_guarded_1 0 0000741E 89EE mov si, bp 0 00007420 85F6 test si, si 0 00007422 7403E9F406 jnz cmd_goto.yy_entry 4210 4211 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00007427 F606[0300]08 testopt [internalflags3], dif3_in_if 0 0000742C 7403E9[0000] jnz if_exists_found_open 4214 %endif 0 00007431 C3 retn 4216 %endif 4217 %endif 4218 %endif 4219 4220 4221 %if _INPUT_FILE_HANDLES || (_EXTENSIONS && (_APPLICATION || _DEVICE)) 4222 yy_dos_parse_name: section_of_function 0 00007432 740C jz @F 0 00007434 B80503 mov ax, 0305h 0 00007437 E8[0000] call setrc 0 0000743A BA[0000] mov dx, msg.yy_no_dos 0 0000743D E99400 jmp yy_disp_error_1 4228 4229 @@: 4230 ; If input_file_handles.to_close is set, 4231 ; close all left over open files. (This 4232 ; may only be done when DOS is available.) 0 00007440 31DB xor bx, bx ; if none left open, -> first structure 0 00007442 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00007447 740B jz @F 0 00007449 8B1E[0000] mov bx, word [input_file_handles.active] 0 0000744D 43 inc bx ; point to first unused structure 0 0000744E D1E3 shl bx, 1 0 00007450 D1E3 shl bx, 1 0 00007452 D1E3 shl bx, 1 ; to qword array index 4241 %if INPUTFILEHANDLE_size != 8 4242 %error Unexpected structure size 4243 %endif 4244 @@: 0 00007454 89DF mov di, bx ; + input_file_handles -> to close 0 00007456 31C0 xor ax, ax ; zero base amount to close 0 00007458 E810F4 call yy_close_file_handles 4248 ; CHG: ax, bx, di 4249 ; if we remembered to close any, do it now 4250 %if _EXTENSIONS 0 0000745B E86BFE call close_ext 4252 %endif 4253 %endif 4254 4255 yy_common_parse_name: section_of_function 0 0000745E 8D5CFF lea bx, [si - 1] ; -> start of name 4257 4258 ; INP: si - 1 -> text 4259 ; bx -> buffer to store to, 256 Bytes 4260 ; OUT: al = first text byte of trailer 4261 ; si - 1 -> trailer 4262 ; byte [si - 1] may be NUL written there 4263 ; in case that INP:bx == INP:si - 1 4264 ; bx -> pathname, NUL-terminated 4265 ; di -> terminator NUL 4266 ; bx may point into a config path buffer 4267 ; CHG: ax, dx 4268 yy_common_parse_name_bx_buffer: section_of_function 0 00007461 4E dec si 4270 %if _CONFIG || _EXECUTABLE 0 00007462 56 push si ; -> start of name 0 00007463 53 push bx ; -> start of buffer (may != si) 4273 %if _EXECUTABLE 0 00007464 BB[0000] mov bx, init_executable_pathname 0 00007467 8B3E[0000] mov di, word [init_executable_pathname.end] 0 0000746B BA[0000] mov dx, msg.executablekeyword 0 0000746E E807EB call isstring? 0 00007471 743D je .execkw 4279 %endif 4280 %if _CONFIG 0 00007473 830E[0000]FF or word [yy_try_scriptspath], -1 0 00007478 BB[0000] mov bx, scriptspath 0 0000747B 8B3E[0000] mov di, word [scriptspath.dir_end] 0 0000747F BA[0000] mov dx, msg.scriptskeyword 0 00007482 E8F3EA call isstring? 0 00007485 741B je .kw 0 00007487 BB[0000] mov bx, configpath 0 0000748A 8B3E[0000] mov di, word [configpath.dir_end] 0 0000748E BA[0000] mov dx, msg.configkeyword 0 00007491 E8E4EA call isstring? 0 00007494 740C je .kw 0 00007496 5B pop bx ; -> start of buffer 0 00007497 53 push bx 0 00007498 89DF mov di, bx ; -> start of buffer 0 0000749A BA[0000] mov dx, msg.emptykeyword 0 0000749D E8D8EA call isstring? 0 000074A0 751F jne @F 4298 .kw: 0 000074A2 AC lodsb 0 000074A3 3C3A cmp al, ':' 0 000074A5 751A jne @F 0 000074A7 F616[0000] not byte [yy_try_scriptspath.nokeywordused] 0 000074AB 58 pop ax 0 000074AC 58 pop ax 0 000074AD AC lodsb ; load character 0 000074AE EB33 jmp @FFF 4307 %endif 4308 4309 %if _EXECUTABLE 4310 .execkw: 0 000074B0 AC lodsb 0 000074B1 3C3A cmp al, ':' 0 000074B3 750C jne @F 0 000074B5 F616[0000] not byte [yy_try_scriptspath.nokeywordused] 0 000074B9 58 pop ax 0 000074BA 58 pop ax 0 000074BB AC lodsb ; load character 0 000074BC 39FB cmp bx, di ; empty ? 0 000074BE 7449 je .empty ; yes --> 0 000074C0 C3 retn 4321 %endif 4322 @@: 0 000074C1 5B pop bx 0 000074C2 5E pop si 4325 %endif 0 000074C3 89DF mov di, bx ; -> start of buffer 4327 @@: 0 000074C5 AC lodsb ; load character 0 000074C6 E81AEB call iseol? 0 000074C9 7518 jne @F 0 000074CB BA[0000] mov dx, msg.yy_requires_filename 0 000074CE B80403 mov ax, 0304h 0 000074D1 E8[0000] call setrc 4334 yy_disp_error_1: equ $ 0 000074D4 B8FF03 mov ax, 03FFh 0 000074D7 E8[0000] call setrc 0 000074DA E8DAFD call display_y_or_ext 0 000074DD E853F1 call putsz_error 0 000074E0 E9[0000] jmp cmd3 4340 4341 @@: 4342 .unquoted_loop: 0 000074E3 3C20 cmp al, 32 ; blank or EOL outside quoted part ? 0 000074E5 7449 je .blank 0 000074E7 3C09 cmp al, 9 0 000074E9 7445 je .blank 0 000074EB E8F5EA call iseol? ; (includes semicolon in lDebug) 0 000074EE 7440 je .blank ; yes --> 0 000074F0 3C2C cmp al, ',' 0 000074F2 743C je .blank 0 000074F4 3C22 cmp al, '"' ; starting quote mark ? 0 000074F6 740E je .quoted ; yes --> 0 000074F8 AA stosb ; store character 4354 .unquote: 0 000074F9 AC lodsb ; load character 0 000074FA EBE7 jmp .unquoted_loop ; continue in not-quoted loop --> 4357 4358 .quoted_loop: 0 000074FC E8E8EA call iseol?.notsemicolon; EOL inside quoted part ? 0 000074FF 7424 je .quoted_eol ; if yes, error --> 0 00007501 3C22 cmp al, '"' ; ending quote mark ? 0 00007503 74F4 je .unquote ; yes --> 0 00007505 AA stosb ; store character 4364 .quoted: 0 00007506 AC lodsb ; load character 0 00007507 EBF3 jmp .quoted_loop ; continue in quoted loop --> 4367 4368 .empty: 0 00007509 E8E3EA call skipcomm0 0 0000750C 8936[0000] mov word [if_exists_then_address], si 0 00007510 F606[0300]08 testopt [internalflags3], dif3_in_if 0 00007515 7403E9[0000] jnz if_exists_not_found 0 0000751A B80603 mov ax, 0306h 0 0000751D E8[0000] call setrc 0 00007520 BA[0000] mov dx, msg.yy_filename_empty 0 00007523 EBAF jmp yy_disp_error_1 4377 4378 .quoted_eol: 0 00007525 B80703 mov ax, 0307h 0 00007528 E8[0000] call setrc 0 0000752B BA[0000] mov dx, msg.yy_filename_missing_unquote 0 0000752E EBA4 jmp yy_disp_error_1 4383 4384 .blank: 0 00007530 39FB cmp bx, di ; empty ? 0 00007532 74D5 je .empty ; yes --> 4387 ; done 0 00007534 50 push ax 0 00007535 B000 mov al, 0 0 00007537 8605 xchg al, byte [di] ; terminate after filename 0 00007539 893E[0000] mov word [terminator_in_line_in.offset], di 0 0000753D A2[0000] mov byte [terminator_in_line_in.value], al 0 00007540 58 pop ax 0 00007541 C3 retn 4395 4396 4397 ; INP: ds:bx -> filename 4398 ; OUT: File opened, 4399 ; ax = file handle 4400 ; STT: ds = es = ss = debugger data selector/segment 4401 yy_open_file: section_of_function 0 00007542 89DF mov di, bx 0 00007544 E85100 call .setup_opencreate ; ds:si -> pathname 0 00007547 B86C71 mov ax, 716Ch ; LFN open-create 0 0000754A 57 push di 0 0000754B 31FF xor di, di ; alias hint 0 0000754D F9 stc 4408 doscall 0 0000754E CD21 int 21h 0 00007550 5F pop di 0 00007551 734F jnc .got ; LFN call succeeded --> 4411 4412 ; Early case for no-LFN-interface available. 4413 ; cmp ax, 1 4414 ; je .try_sfn 0 00007553 3D0071 cmp ax, 7100h 0 00007556 7405 je .try_sfn 4417 0 00007558 E84800 call yy_check_lfn 0 0000755B 7320 jnc .error ; if LFN interface is available, actual error 4420 ; if LFN interface is not available, try SFN 4421 4422 .try_sfn: 0 0000755D E83800 call .setup_opencreate 0 00007560 B8006C mov ax, 6C00h ; Open-create 0 00007563 F9 stc 4426 doscall 0 00007564 CD21 int 21h 0 00007566 733A jnc .got 4428 0 00007568 83F801 cmp ax, 1 0 0000756B 7405 je .try_old_open 0 0000756D 3D006C cmp ax, 6C00h 0 00007570 750B jne .error 4433 4434 .try_old_open: 0 00007572 88D8 mov al, bl ; access and sharing modes 0 00007574 B43D mov ah, 3Dh ; Open 0 00007576 89F2 mov dx, si ; -> filename 0 00007578 F9 stc 4439 doscall 0 00007579 CD21 int 21h 0 0000757B 7325 jnc .got 4441 4442 .error: 4443 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4444 %if _CONFIG 0 0000757D E86D00 call retry_open_scriptspath 0 00007580 74C0 je yy_open_file 4447 %endif 0 00007582 F606[0300]08 testopt [internalflags3], dif3_in_if 0 00007587 7403E9[0000] jnz if_exists_not_found 4450 %endif 0 0000758C B80A03 mov ax, 030Ah 0 0000758F E8[0000] call setrc 0 00007592 BA[0000] mov dx, msg.yy_error_file_open 0 00007595 E93CFF jmp yy_disp_error_1 4455 4456 .setup_opencreate: 0 00007598 89FE mov si, di ; -> filename 0 0000759A BBA060 mov bx, 0110_0000_1010_0000b ; Auto-commit, no int 24h 4459 ; No inherit 4460 ; DENY WRITE, Read-only 0 0000759D 31C9 xor cx, cx ; create attribute 0 0000759F BA0100 mov dx, 0000_0000_0000_0001b ; no create / open, no truncate 4463 .got: 0 000075A2 C3 retn 4465 4466 4467 ; INP: ds:si -> pathname, possibly with drive letter 4468 ; OUT: NC if LFN services available 4469 ; CY if no LFN services available 4470 yy_check_lfn: section_of_function 4471 ; Only now, we check whether the used drive supports LFNs. 4472 ; If it does, then we treat the error received as an 4473 ; actual error and cancel here. If not, the SFN function 4474 ; is called next as a fallback. 4475 ; 4476 ; We cannot rely on specific error returns like the 4477 ; expected 7100h CY (or 7100h CF-unchanged) or the similar 4478 ; 0001h CY (Invalid function) because no one agrees on what 4479 ; error code to use. 4480 ; 4481 ; dosemu returns 0003h (Path not found) on FATFS and 4482 ; redirected-non-dosemu drives. But may be changed so as to 4483 ; return 0059h (Function not supported on network). 4484 ; MSWindows 98SE returns 0002h (File not found) on 4485 ; DOS-redirected drives. 4486 ; DOSLFN with Fallback mode enabled supports the call (albeit 4487 ; limited to SFNs). 4488 ; 4489 ; To suss out what the error means, check LFN availability. 4490 ; 4491 ; Refer to https://github.com/stsp/dosemu2/issues/770 0 000075A3 1E push ds 0 000075A4 06 push es 0 000075A5 57 push di 0 000075A6 50 push ax 4496 lframe 4497 lvar 34, fstype_buffer 4498 lvar 4, pathname_buffer 0 000075A7 5589E58D66DA lenter 4500 0 000075AD AD lodsw ; load first two bytes of pathname 4502 0 000075AE 16 push ss 0 000075AF 1F pop ds 0 000075B0 89E2 mov dx, sp ; ds:dx -> ?pathname_buffer 0 000075B2 16 push ss 0 000075B3 07 pop es 0 000075B4 89E7 mov di, sp ; es:di -> ?pathname_buffer 4509 0 000075B6 80FC3A cmp ah, ':' ; starts with drive specifier ? 0 000075B9 7408 je @F ; yes --> 4512 0 000075BB B419 mov ah, 19h 4514 doscall ; get current default drive 0 000075BD CD21 int 21h 0 000075BF 0441 add al, 'A' ; A: = 0, convert to drive letter 0 000075C1 B43A mov ah, ':' ; drive specifier 4517 @@: 0 000075C3 AB stosw 0 000075C4 B85C00 mov ax, '\' ; backslash and zero terminator 0 000075C7 AB stosw ; es:di -> ?fstype_buffer 4521 0 000075C8 31C0 xor ax, ax 0 000075CA B91100 mov cx, 34 >> 1 0 000075CD 57 push di 0 000075CE F3AB rep stosw ; initialise ?fstype_buffer to all zeros 0 000075D0 5F pop di ; -> ?fstype_buffer 4527 0 000075D1 B92000 mov cx, 32 ; size of ?fstype_buffer 0 000075D4 31DB xor bx, bx ; harden, initialise this 0 000075D6 B8A071 mov ax, 71A0h ; get volume information 0 000075D9 F9 stc 4532 doscall ; (depends on ds = es = ss) 0 000075DA CD21 int 21h 4533 0 000075DC 7207 jc @F ; if call not supported --> 4535 ; bx = FS flags 0 000075DE F6C740 test bh, 0100_0000b ; LFN interface available ? 0 000075E1 F9 stc ; if no 0 000075E2 7401 jz @F ; no --> 4539 0 000075E4 F8 clc ; is available 4541 @@: 4542 0 000075E5 89EC5D lleave 0 000075E8 58 pop ax ; (restore error code) 0 000075E9 5F pop di 0 000075EA 07 pop es 0 000075EB 1F pop ds 0 000075EC C3 retn 4549 4550 4551 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || _EXTENSIONS 4552 %if _CONFIG 4553 ; INP: di -> filepath tried 4554 ; word [yy_try_scriptspath] 4555 ; OUT: ZR if to retry, 4556 ; bx -> new filepath 4557 ; NZ if not 4558 ; STT: es = ds = ss 4559 retry_open_scriptspath: section_of_function 0 000075ED 833E[0000]FF cmp word [yy_try_scriptspath], -1 0 000075F2 751D jne @F ; --> NZ 0 000075F4 F616[0000] not byte [yy_try_scriptspath.didnotyettry] 0 000075F8 89FE mov si, di 0 000075FA B9FF00 mov cx, 255 0 000075FD B000 mov al, 0 0 000075FF F2AE repne scasb 0 00007601 89F9 mov cx, di 0 00007603 29F1 sub cx, si 0 00007605 8B3E[0000] mov di, word [scriptspath.dir_end] 0 00007609 F3A4 rep movsb 0 0000760B AA stosb 0 0000760C BB[0000] mov bx, scriptspath 0 0000760F 38C0 cmp al, al ; ZR 4574 @@: 0 00007611 C3 retn 4576 %elif _EXTENSIONS 4577 retry_open_scriptspath: section_of_function 4578 test sp, sp ; NZ 4579 retn 4580 %endif 4581 %endif 4582 4583 %if _EXTENSIONS 4584 ext_finish: 0 00007612 A3[0000] mov word [ext_handle], ax 0 00007615 93 xchg bx, ax 4587 .boot: 0 00007616 8B3E[0000] mov di, word [terminator_in_line_in.offset] 0 0000761A A0[0000] mov al, byte [terminator_in_line_in.value] 0 0000761D 8805 mov byte [di], al 4591 4592 %if _RECLAIM 0 0000761F 53 push bx 4594 %if _PM 4595 call get_es_ext 4596 %else 0 00007620 8E06[0000] mov es, word [extseg] 4598 %endif 4599 4600 %define extcall nearcall 4601 %define extcallcall nearcall 4602 %imacro internalcoderelocation 0-*.nolist 4603 %endmacro 4604 %imacro internaldatarelocation 0-*.nolist 4605 %endmacro 4606 %imacro linkdatarelocation 0-*.nolist 4607 %endmacro 4608 %define relocated(address) address 4609 %assign ELD 0 4610 %include "reclaims.asm" 1 <1> 2 <1> ; Public Domain 3 <1> 4 <1> loop_free_data: 5 <1> .outer: 0 00007624 31F6 xor si, si 7 <1> .inner: 0 00007626 8B1E[0000] mov bx, [relocated(extdata_used)] 9 <1> linkdatarelocation extdata_used 0 0000762A 031E[0000] add bx, [relocated(extdata)] 11 <1> linkdatarelocation extdata 0 0000762E 3B36[0000] cmp si, [relocated(extseg_used)] 13 <1> linkdatarelocation extseg_used ; behind last instance ? 0 00007632 735A jae .end ; yes --> 0 00007634 263934 cmp word [es:si + eldiStartCode], si 0 00007637 7403E94F03 jne .error ; start matches itself ? 0 0000763C 26F6441001 testopt [es:si + eldiFlags], eldifResident 0 00007641 7539 jnz .next ; is free ? 0 00007643 268B5406 mov dx, word [es:si + eldiEndData] 0 00007647 89D0 mov ax, dx 0 00007649 262B4404 sub ax, word [es:si + eldiStartData] 22 <1> ; = length of block 0 0000764D 7303E93903 jc .error ; block must not be negative size --> 24 <1> ; ZR if empty range 0 00007652 7506 jnz @F ; not empty --> 26 <1> ; special zeroing handling 0 00007654 85D2 test dx, dx ; is it already zero ? 0 00007656 7424 jz .next ; yes --> 0 00007658 EB09 jmp @FF ; zero it and re-loop outer --> 30 <1> @@: 0 0000765A 39DA cmp dx, bx ; end > last data ? 0 0000765C 7603E92A03 ja .error ; yes, error --> 0 00007661 7519 jne .next ; end == last data ? 34 <1> @@: ; yes, free it 0 00007663 3B06[0000] cmp ax, word [relocated(extdata_used)] 36 <1> linkdatarelocation extdata_used 0 00007667 7603E91F03 ja .error 0 0000766C 2906[0000] sub word [relocated(extdata_used)], ax 39 <1> linkdatarelocation extdata_used ; subtract size of block (or 0) 0 00007670 31C0 xor ax, ax 0 00007672 26894404 mov word [es:si + eldiStartData], ax 0 00007676 26894406 mov word [es:si + eldiEndData], ax 43 <1> ; reset the block data 0 0000767A EBA8 jmp .outer ; restart search for trailing data 45 <1> 46 <1> .next: 0 0000767C 89F2 mov dx, si 0 0000767E 83C220 add dx, ELD_INSTANCE_size 0 00007681 268B7402 mov si, word [es:si + eldiEndCode] 0 00007685 39D6 cmp si, dx 0 00007687 7303E9FF02 jb .error 0 0000768C EB98 jmp .inner 53 <1> 54 <1> .end: 55 <1> 56 <1> 57 <1> loop_free_code: 58 <1> .outer: 0 0000768E BAFFFF mov dx, -1 ; remember no candidate 0 00007691 31F6 xor si, si ; -> start of ext seg 61 <1> .inner: 0 00007693 3B36[0000] cmp si, [relocated(extseg_used)] 63 <1> linkdatarelocation extseg_used ; behind last instance ? 0 00007697 733D jae .end_inner ; yes --> 0 00007699 263934 cmp word [es:si + eldiStartCode], si 0 0000769C 7403E9EA02 jne .error ; start matches itself ? 0 000076A1 26F6441001 testopt [es:si + eldiFlags], eldifResident 0 000076A6 7519 jnz .next_not_free ; is free ? 0 000076A8 89F2 mov dx, si ; -> candidate free block 0 000076AA 26807C0400 cmp byte [es:si + eldiStartData], 0 0 000076AF 750B jne .next_data_used ; is free ? 0 000076B1 26807C0600 cmp byte [es:si + eldiEndData], 0 0 000076B6 7504 jne .next_data_used ; is free ? 0 000076B8 31C9 xor cx, cx ; remember candidate has no data 0 000076BA EB08 jmp .next 76 <1> 77 <1> .next_data_used: 0 000076BC B90100 mov cx, 1 ; remember candidate has data 0 000076BF EB03 jmp .next 80 <1> 81 <1> .next_not_free: 0 000076C1 BAFFFF mov dx, -1 ; remember no candidate (used block) 83 <1> .next: 0 000076C4 89F0 mov ax, si 0 000076C6 83C020 add ax, ELD_INSTANCE_size 0 000076C9 268B7402 mov si, word [es:si + eldiEndCode] 0 000076CD 39C6 cmp si, ax 0 000076CF 7303E9B702 jb .error 0 000076D4 EBBD jmp .inner 90 <1> 91 <1> .end_inner: 0 000076D6 83FAFF cmp dx, -1 ; last ELD instance is free ? 0 000076D9 742A je .end ; no --> 0 000076DB 31DB xor bx, bx ; if to not keep ELD instance, = 0 0 000076DD E302 jcxz .free ; no data ? then use bx = 0 --> 0 000076DF B320 mov bl, 32 ; need to keep ELD instance, = 32 97 <1> .free: 0 000076E1 89D6 mov si, dx ; -> instance to free/resize 0 000076E3 268B4402 mov ax, word [es:si + eldiEndCode] 0 000076E7 3B06[0000] cmp ax, [relocated(extseg_used)] ; validity check 101 <1> linkdatarelocation extseg_used 0 000076EB 7403E99B02 jne .error 0 000076F0 268B14 mov dx, word [es:si + eldiStartCode] 0 000076F3 29D0 sub ax, dx ; size of entire instance 0 000076F5 01DA add dx, bx ; start of instance + how much to keep 0 000076F7 26895402 mov word [es:si + eldiEndCode], dx 107 <1> ; enter into instance's end 0 000076FB 29D8 sub ax, bx ; size to discard 0 000076FD 2906[0000] sub word [relocated(extseg_used)], ax ; do discard it 110 <1> linkdatarelocation extseg_used 0 00007701 85DB test bx, bx ; only resized ? 0 00007703 7489 jz .outer ; no, go back try to free new last block 113 <1> 114 <1> .end: 4611 4612 %undef extcall 4613 %undef extcallcall 4614 %unimacro internalcoderelocation 0-*.nolist 4615 %unimacro internaldatarelocation 0-*.nolist 4616 %unimacro linkdatarelocation 0-*.nolist 4617 %undef relocated 4618 0 00007705 5B pop bx 0 00007706 16 push ss 0 00007707 07 pop es 4622 ext_finish_reclaimed: 4623 4624 loop_free_data.error equ .error_internal 4625 loop_free_code.error equ .error_internal 4626 4627 %endif 4628 4629 4630 %define extcall nearcall 4631 %define extcallcall nearcall 4632 %imacro internalcoderelocation 0-*.nolist 4633 %endmacro 4634 %imacro internaldatarelocation 0-*.nolist 4635 %endmacro 4636 %imacro linkdatarelocation 0-*.nolist 4637 %endmacro 4638 %define relocated(address) address 4639 %assign ELD 0 4640 4641 %include "loadeld.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug load Extensions for lDebug 5 <1> 6 <1> Copyright (C) 2008-2025 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> %if ELD 17 <1> %assign _ELDTRAILER 0 18 <1> numdef DOSORBOOTIO, 0 19 <1> numdef ELDCOMPRESSED, 0 20 <1> %else 21 <1> %assign _DOSORBOOTIO 0 22 <1> %assign _ELDCOMPRESSED 0 0 00007708 55 push bp 24 <1> %endif 25 <1> 26 <1> %if _ELDTRAILER 0 00007709 31C0 xor ax, ax 0 0000770B A3[0000] mov word [eldheader], ax 29 <1> internaldatarelocation 0 0000770E A3[0200] mov word [eldheader + 2], ax 31 <1> internaldatarelocation 32 <1> 0 00007711 91 xchg cx, ax 0 00007712 B80242 mov ax, 4202h 0 00007715 31D2 xor dx, dx 36 <1> %if _BOOTLDR 37 <1> %if _APPLICATION || _DEVICE 0 00007717 F606[0100]40 testopt [relocated(internalflags)], nodosloaded 39 <1> linkdatarelocation internalflags, -3 0 0000771C 7417 jz @F 41 <1> %endif 0 0000771E E8[0000] extcallcall yy_boot_seek_start.bx 0 00007721 8B0E[F6FF] mov cx, word [load_data - LOADDATA2 + ldFileSize + 2] 44 <1> internaldatarelocation 0 00007725 8B16[F4FF] mov dx, word [load_data - LOADDATA2 + ldFileSize] 46 <1> internaldatarelocation 0 00007729 E8[0000] extcallcall yy_boot_seek_current.bx 0 0000772C 8B16[FEFF] mov dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 49 <1> internaldatarelocation 0 00007730 A1[FCFF] mov ax, word [load_data - LOADDATA2 + ldCurrentSeek] 51 <1> internaldatarelocation 52 <1> %if _APPLICATION || _DEVICE 0 00007733 EB02 jmp @FF 54 <1> %endif 55 <1> %endif 56 <1> 57 <1> @@: 58 <1> %if _APPLICATION || _DEVICE 59 <1> doscall 0 00007735 CD21 int 21h 60 <1> %endif 61 <1> @@: 0 00007737 7303E95702 jc .io_error 63 <1> 0 0000773C 85D2 test dx, dx 0 0000773E 7508 jnz @F 0 00007740 83F830 cmp ax, ELD_HEADER_size + ELD_TRAILER_HEADER_size 0 00007743 7303E98500 jb .no_trailer 68 <1> @@: 69 <1> 0 00007748 B80142 mov ax, 4201h 0 0000774B B9FFFF mov cx, -1 0 0000774E BAF0FF mov dx, - ELD_TRAILER_HEADER_size 73 <1> %if _BOOTLDR 74 <1> %if _APPLICATION || _DEVICE 0 00007751 F606[0100]40 testopt [relocated(internalflags)], nodosloaded 76 <1> linkdatarelocation internalflags, -3 0 00007756 740C jz @F 78 <1> %endif 0 00007758 E8[0000] extcallcall yy_boot_seek_current.bx 0 0000775B 8B16[FEFF] mov dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 81 <1> internaldatarelocation 0 0000775F A1[FCFF] mov ax, word [load_data - LOADDATA2 + ldCurrentSeek] 83 <1> internaldatarelocation 84 <1> %if _APPLICATION || _DEVICE 0 00007762 EB02 jmp @FF 86 <1> %endif 87 <1> %endif 88 <1> 89 <1> @@: 90 <1> %if _APPLICATION || _DEVICE 91 <1> doscall 0 00007764 CD21 int 21h 92 <1> %endif 93 <1> @@: 0 00007766 7303E92802 jc .io_error 95 <1> 0 0000776B 52 push dx 0 0000776C 50 push ax 98 <1> 0 0000776D B91000 mov cx, fromwords(ELD_TRAILER_HEADER_size_w) 0 00007770 29CC sub sp, cx 0 00007772 89E2 mov dx, sp 102 <1> 0 00007774 B43F mov ah, 3Fh 104 <1> %if _BOOTLDR 105 <1> %if _APPLICATION || _DEVICE 0 00007776 F606[0100]40 testopt [relocated(internalflags)], nodosloaded 107 <1> linkdatarelocation internalflags, -3 0 0000777B 7405 jz @F 109 <1> %endif 0 0000777D E8[0000] extcallcall yy_boot_read.bx 111 <1> %if _APPLICATION || _DEVICE 0 00007780 EB02 jmp @FF 113 <1> %endif 114 <1> %endif 115 <1> 116 <1> @@: 117 <1> %if _APPLICATION || _DEVICE 118 <1> doscall 0 00007782 CD21 int 21h 119 <1> %endif 120 <1> @@: 0 00007784 7303E90A02 jc .io_error 0 00007789 89E7 mov di, sp 0 0000778B 89E6 mov si, sp 124 <1> 0 0000778D 39C8 cmp ax, cx 0 0000778F 7539 jne .no_trailer_pop 127 <1> 0 00007791 31D2 xor dx, dx 0 00007793 D1E9 shr cx, 1 130 <1> @@: 0 00007795 AD lodsw 0 00007796 01C2 add dx, ax 0 00007798 E2FB loop @B 0 0000779A 752E jnz .no_trailer_pop 135 <1> 0 0000779C 58 pop ax 0 0000779D 3D454C cmp ax, "EL" 0 000077A0 7528 jne .no_trailer_pop 0 000077A2 58 pop ax 0 000077A3 3D4431 cmp ax, "D1" 0 000077A6 7522 jne .no_trailer_pop 0 000077A8 58 pop ax 0 000077A9 3D5441 cmp ax, "TA" 0 000077AC 751C jne .no_trailer_pop 0 000077AE 58 pop ax 0 000077AF 3D494C cmp ax, "IL" 0 000077B2 7516 jne .no_trailer_pop 148 <1> 0 000077B4 5E pop si 0 000077B5 59 pop cx ; cx:si = displacement to subtract 0 000077B6 58 pop ax ; reserved 0 000077B7 58 pop ax ; checksum 153 <1> 0 000077B8 58 pop ax 0 000077B9 5A pop dx ; dx:ax = offset of trailer header 0 000077BA 01F0 add ax, si 0 000077BC 11CA adc dx, cx ; dx:ax = offset of header 0 000077BE 7203E9D001 jnc .io_error 159 <1> 0 000077C3 A3[0000] mov word [eldheader], ax 161 <1> internaldatarelocation 0 000077C6 8916[0200] mov word [eldheader + 2], dx 163 <1> internaldatarelocation 164 <1> 165 <1> .no_trailer_pop: 0 000077CA 8D6514 lea sp, [di + fromwords(ELD_TRAILER_HEADER_size_w) + 4] 167 <1> 168 <1> .no_trailer: 0 000077CD B80042 mov ax, 4200h 0 000077D0 8B16[0000] mov dx, word [eldheader] 171 <1> internaldatarelocation 0 000077D4 8B0E[0200] mov cx, word [eldheader + 2] 173 <1> internaldatarelocation 174 <1> 175 <1> %if _BOOTLDR 176 <1> %if _APPLICATION || _DEVICE 0 000077D8 F606[0100]40 testopt [relocated(internalflags)], nodosloaded 178 <1> linkdatarelocation internalflags, -3 0 000077DD 7408 jz @F 180 <1> %endif 0 000077DF E8[0000] extcallcall yy_boot_seek_start.bx 0 000077E2 E8[0000] extcallcall yy_boot_seek_current.bx 183 <1> %if _APPLICATION || _DEVICE 0 000077E5 EB02 jmp @FF 185 <1> %endif 186 <1> %endif 187 <1> 188 <1> @@: 189 <1> %if _APPLICATION || _DEVICE 190 <1> doscall 0 000077E7 CD21 int 21h 191 <1> %endif 192 <1> @@: 0 000077E9 7303E9A501 jc .io_error 194 <1> %endif 195 <1> 0 000077EE B92000 mov cx, fromwords(ELD_HEADER_size_w) 0 000077F1 29CC sub sp, cx 0 000077F3 89E2 mov dx, sp ; es:dx and ds:dx 199 <1> %if _ELDCOMPRESSED 200 <1> push word [eldheader + 2] 201 <1> internaldatarelocation 202 <1> push word [eldheader] 203 <1> internaldatarelocation 204 <1> pop word [depackskip] 205 <1> internaldatarelocation 206 <1> pop word [depackskip + 2] 207 <1> internaldatarelocation 208 <1> 209 <1> call read_and_depack 210 <1> %elif _DOSORBOOTIO 211 <1> mov ax, 3F00h 212 <1> call dos_or_boot_io 213 <1> %else 0 000077F5 B43F mov ah, 3Fh 215 <1> %if _BOOTLDR 216 <1> %if _APPLICATION || _DEVICE 0 000077F7 F606[0100]40 testopt [relocated(internalflags)], nodosloaded 218 <1> linkdatarelocation internalflags, -3 0 000077FC 7405 jz @F 220 <1> %endif 0 000077FE E8[0000] extcallcall yy_boot_read.bx 222 <1> %if _APPLICATION || _DEVICE 0 00007801 EB02 jmp @FF 224 <1> %endif 225 <1> %endif 226 <1> 227 <1> @@: 228 <1> %if _APPLICATION || _DEVICE 229 <1> doscall 0 00007803 CD21 int 21h 230 <1> %endif 231 <1> @@: 232 <1> %endif 0 00007805 7303E98901 jc .io_error 0 0000780A 39C8 cmp ax, cx 0 0000780C 7403E98A01 jne .invalid 236 <1> 0 00007811 89E7 mov di, sp 238 <1> 0 00007813 58 pop ax 0 00007814 3D454C cmp ax, "EL" 0 00007817 7403E97F01 jne .invalid 0 0000781C 58 pop ax 0 0000781D 3D4431 cmp ax, "D1" 0 00007820 7403E97601 jne .invalid 0 00007825 58 pop ax 0 00007826 58 pop ax 0 00007827 80FC1A cmp ah, 26 0 0000782A 7403E96C01 jne .invalid 249 <1> 250 <1> %ifn ELD 0 0000782F F606[0300]08 testopt [internalflags3], dif3_in_if 0 00007834 7403E9[0000] jnz if_exists_found_ext_open 253 <1> %endif 254 <1> 0 00007839 A1[0000] mov ax, word [relocated(extseg_size)] 256 <1> linkdatarelocation extseg_size 0 0000783C 2B06[0000] sub ax, word [relocated(extseg_used)] 258 <1> linkdatarelocation extseg_used 0 00007840 7303E94601 jc .error_internal 260 <1> %if ELD 261 <1> sub ax, fromparas(relocator_size_p) 262 <1> jc .error_internal 263 <1> %endif 264 <1> 0 00007845 8B4D0C mov cx, word [di + eldhCodeImageLength] 266 <1> %if ELD 267 <1> cmp ax, cx 268 <1> jb .oom 269 <1> %endif 0 00007848 034D0E add cx, word [di + eldhCodeAllocLength] 0 0000784B 7227 jc .invalid_CY 0 0000784D 83C10F add cx, 15 0 00007850 7222 jc .invalid_CY 0 00007852 80E1F0 and cl, ~ 15 275 <1> 276 <1> %if ELD 277 <1> add ax, word [cs:code + eldiEndCode] 278 <1> internalcoderelocation 279 <1> sub ax, word [cs:code + eldiStartCode] 280 <1> internalcoderelocation 281 <1> %endif 0 00007855 39C8 cmp ax, cx 0 00007857 7303E95101 jb .oom 284 <1> 0 0000785C 8B16[0000] mov dx, word [relocated(extdata_size)] 286 <1> linkdatarelocation extdata_size 0 00007860 2B16[0000] sub dx, word [relocated(extdata_used)] 288 <1> linkdatarelocation extdata_used 0 00007864 7303E92201 jc .error_internal 290 <1> 0 00007869 8B7514 mov si, word [di + eldhDataImageLength] 292 <1> %if ELD 293 <1> cmp dx, si 294 <1> jb .oom 295 <1> %endif 0 0000786C 037516 add si, word [di + eldhDataAllocLength] 0 0000786F 7203 jc .invalid_CY 0 00007871 83C60F add si, 15 299 <1> .invalid_CY: 0 00007874 7303E92201 jc .invalid 0 00007879 83E6F0 and si, ~ 15 302 <1> 303 <1> %if ELD 304 <1> add dx, word [cs:code + eldiEndData] 305 <1> internalcoderelocation 306 <1> sub dx, word [cs:code + eldiStartData] 307 <1> internalcoderelocation 308 <1> %endif 0 0000787C 39F2 cmp dx, si 0 0000787E 7303E92A01 jb .oom 311 <1> 0 00007883 56 push si 0 00007884 51 push cx 314 <1> 0 00007885 B80042 mov ax, 4200h 0 00007888 8B4D0A mov cx, word [di + eldhCodeOffset + 2] 0 0000788B 8B5508 mov dx, word [di + eldhCodeOffset] 318 <1> %if ELD || _ELDTRAILER 0 0000788E 0316[0000] add dx, word [eldheader] 320 <1> internaldatarelocation 0 00007892 130E[0200] adc cx, word [eldheader + 2] 322 <1> internaldatarelocation 323 <1> %else 324 <1> ; ELD header is at seek 0 325 <1> %endif 326 <1> %if _ELDCOMPRESSED 327 <1> mov word [depackskip], dx 328 <1> internaldatarelocation 329 <1> mov word [depackskip + 2], cx 330 <1> internaldatarelocation 331 <1> %elif _DOSORBOOTIO 332 <1> call dos_or_boot_io 333 <1> %else 334 <1> %if _BOOTLDR 335 <1> %if _APPLICATION || _DEVICE 0 00007896 F606[0100]40 testopt [relocated(internalflags)], nodosloaded 337 <1> linkdatarelocation internalflags, -3 0 0000789B 7408 jz @F 339 <1> %endif 0 0000789D E8[0000] extcallcall yy_boot_seek_start.bx 0 000078A0 E8[0000] extcallcall yy_boot_seek_current.bx 342 <1> %if _APPLICATION || _DEVICE 0 000078A3 EB02 jmp @FF 344 <1> %endif 345 <1> %endif 346 <1> 347 <1> @@: 348 <1> %if _APPLICATION || _DEVICE 349 <1> doscall 0 000078A5 CD21 int 21h 350 <1> %endif 351 <1> @@: 352 <1> %endif 0 000078A7 7303E9E700 jc .io_error 354 <1> 0 000078AC 8B16[0000] mov dx, word [relocated(extseg_used)] 356 <1> linkdatarelocation extseg_used 357 <1> %if _PM 358 <1> extcallcall ispm 359 <1> jnz @F 360 <1> mov ds, word [relocated(extdssel)] 361 <1> linkdatarelocation extdssel 362 <1> jmp @FF 363 <1> 364 <1> @@: 365 <1> %endif 0 000078B0 8E1E[0000] mov ds, word [relocated(extseg)] 367 <1> linkdatarelocation extseg 368 <1> @@: 0 000078B4 368B4D0C mov cx, word [ss:di + eldhCodeImageLength] 370 <1> %if _ELDCOMPRESSED 371 <1> push ds 372 <1> pop es 373 <1> push ss 374 <1> pop ds 375 <1> call read_and_depack 376 <1> push ss 377 <1> pop es 378 <1> %elif _DOSORBOOTIO 379 <1> mov ax, 3FFFh 380 <1> call dos_or_boot_io 381 <1> %else 0 000078B8 B43F mov ah, 3Fh 383 <1> %if _BOOTLDR 384 <1> %if _APPLICATION || _DEVICE 0 000078BA 36F606[0100]40 testopt [ss:relocated(internalflags)], nodosloaded 386 <1> linkdatarelocation internalflags, -3 0 000078C0 740B jz @F 388 <1> %endif 0 000078C2 1E push ds 0 000078C3 07 pop es 0 000078C4 16 push ss 0 000078C5 1F pop ds 0 000078C6 E8[0000] extcallcall yy_boot_read.bx 0 000078C9 16 push ss 0 000078CA 07 pop es 396 <1> %if _APPLICATION || _DEVICE 0 000078CB EB02 jmp @FF 398 <1> %endif 399 <1> %endif 400 <1> 401 <1> @@: 402 <1> %if _APPLICATION || _DEVICE 403 <1> %if _PM 404 <1> extcallcall doscall_extseg 405 <1> %else 406 <1> doscall 0 000078CD CD21 int 21h 407 <1> %endif 408 <1> %endif 409 <1> @@: 410 <1> %endif 0 000078CF 16 push ss 0 000078D0 1F pop ds 0 000078D1 7303E9BD00 jc .io_error 0 000078D6 39C1 cmp cx, ax 0 000078D8 7403E9B600 jne .io_error 416 <1> 0 000078DD B80042 mov ax, 4200h 0 000078E0 8B4D12 mov cx, word [di + eldhDataOffset + 2] 0 000078E3 8B5510 mov dx, word [di + eldhDataOffset] 420 <1> %if ELD || _ELDTRAILER 0 000078E6 0316[0000] add dx, word [eldheader] 422 <1> internaldatarelocation 0 000078EA 130E[0200] adc cx, word [eldheader + 2] 424 <1> internaldatarelocation 425 <1> %else 426 <1> ; ELD header is at seek 0 427 <1> %endif 428 <1> 429 <1> %if _ELDCOMPRESSED 430 <1> mov word [depackskip], dx 431 <1> internaldatarelocation 432 <1> mov word [depackskip + 2], cx 433 <1> internaldatarelocation 434 <1> %elif _DOSORBOOTIO 435 <1> call dos_or_boot_io 436 <1> %else 437 <1> %if _BOOTLDR 438 <1> %if _APPLICATION || _DEVICE 0 000078EE F606[0100]40 testopt [relocated(internalflags)], nodosloaded 440 <1> linkdatarelocation internalflags, -3 0 000078F3 7408 jz @F 442 <1> %endif 0 000078F5 E8[0000] extcallcall yy_boot_seek_start.bx 0 000078F8 E8[0000] extcallcall yy_boot_seek_current.bx 445 <1> %if _APPLICATION || _DEVICE 0 000078FB EB02 jmp @FF 447 <1> %endif 448 <1> %endif 449 <1> 450 <1> @@: 451 <1> %if _APPLICATION || _DEVICE 452 <1> doscall 0 000078FD CD21 int 21h 453 <1> %endif 454 <1> @@: 455 <1> %endif 0 000078FF 7303E98F00 jc .io_error 457 <1> 458 <1> %if ELD 459 <1> mov dx, word [relocateddata] 460 <1> linkdatarelocation extdata 461 <1> %else 0 00007904 BA[0000] mov dx, ext_data_area 463 <1> %endif 0 00007907 0316[0000] add dx, word [relocated(extdata_used)] 465 <1> linkdatarelocation extdata_used 0 0000790B 8B4D14 mov cx, word [di + eldhDataImageLength] 467 <1> %if _ELDCOMPRESSED 468 <1> call read_and_depack 469 <1> %elif _DOSORBOOTIO 470 <1> mov ax, 3F00h 471 <1> call dos_or_boot_io 472 <1> %else 0 0000790E B43F mov ah, 3Fh 474 <1> %if _BOOTLDR 475 <1> %if _APPLICATION || _DEVICE 0 00007910 F606[0100]40 testopt [relocated(internalflags)], nodosloaded 477 <1> linkdatarelocation internalflags, -3 0 00007915 7405 jz @F 479 <1> %endif 0 00007917 E8[0000] extcallcall yy_boot_read.bx 481 <1> %if _APPLICATION || _DEVICE 0 0000791A EB02 jmp @FF 483 <1> %endif 484 <1> %endif 485 <1> 486 <1> @@: 487 <1> %if _APPLICATION || _DEVICE 488 <1> doscall 0 0000791C CD21 int 21h 489 <1> %endif 490 <1> @@: 491 <1> %endif 0 0000791E 7273 jc .io_error 0 00007920 39C1 cmp cx, ax 0 00007922 756F jne .io_error 495 <1> ; seek now -> behind data image. 496 <1> ; this is expected by library ELDs to find their 497 <1> ; library images within the file, even if the 498 <1> ; library ELD was appended using eldapend. 499 <1> 500 <1> %if _PM 501 <1> call get_es_ext 502 <1> %else 0 00007924 8E06[0000] mov es, word [extseg] 504 <1> %endif 505 <1> 506 <1> %if ELD 507 <1> mov bx, word [relocateddata] 508 <1> linkdatarelocation extseg_used ; es:bx -> where we loaded code 509 <1> 510 <1> mov ax, [di + eldhCodeEntrypoint] 511 <1> add ax, strict word code ; -> entry destination 512 <1> internalcoderelocation 513 <1> mov word [es:relocator.entry], ax 514 <1> internalcoderelocation 515 <1> 516 <1> mov ax, word [di + eldhCodeImageLength] 517 <1> mov word [es:relocator.codelength], ax 518 <1> internalcoderelocation 519 <1> 520 <1> mov ax, word [di + eldhDataImageLength] 521 <1> mov word [es:relocator.datalength], ax 522 <1> internalcoderelocation 523 <1> 524 <1> pop ax 525 <1> 526 <1> mov word [es:bx + eldiStartCode], code 527 <1> internalcoderelocation ; fix its start 528 <1> 529 <1> mov di, ax 530 <1> add di, word [relocateddata] 531 <1> linkdatarelocation extseg_used ; di -> relocator destination 532 <1> push ax 533 <1> add ax, fromparas(relocator_size_p) 534 <1> add word [es:code + eldiEndCode], ax 535 <1> internalcoderelocation ; grow our allocation 536 <1> add word [relocateddata], ax 537 <1> linkdatarelocation extseg_used ; ditto 538 <1> pop ax 539 <1> 540 <1> mov word [es:relocator.codesource], bx 541 <1> internalcoderelocation ; -> start 542 <1> add ax, strict word code 543 <1> internalcoderelocation 544 <1> mov word [es:bx + eldiEndCode], ax 545 <1> ; -> past destination 546 <1> mov word [es:relocator.extseg_used], ax 547 <1> internalcoderelocation ; new extseg_used 548 <1> 549 <1> pop ax 550 <1> 551 <1> mov dx, word [relocateddata] 552 <1> linkdatarelocation extdata_used 553 <1> add dx, word [relocateddata] 554 <1> linkdatarelocation extdata 555 <1> 556 <1> mov word [es:relocator.datasource], dx 557 <1> internalcoderelocation 558 <1> 559 <1> houdini 560 <1> mov dx, datastart 561 <1> internaldatarelocation 562 <1> mov word [es:bx + eldiStartData], dx 563 <1> add ax, dx 564 <1> mov word [es:bx + eldiEndData], ax 565 <1> 566 <1> sub ax, word [relocateddata] 567 <1> linkdatarelocation extdata 568 <1> mov word [es:relocator.extdata_used], ax 569 <1> internalcoderelocation ; new extdata_used 570 <1> 571 <1> mov dx, code 572 <1> internalcoderelocation ; es:dx -> ELD code instance (dest) 573 <1> mov bx, datastart 574 <1> internaldatarelocation 575 <1> 576 <1> mov si, relocator 577 <1> internalcoderelocation 578 <1> mov cx, relocator_size_w 579 <1> push es 580 <1> pop ds 581 <1> push di 582 <1> rep movsw 583 <1> pop cx ; -> relocator entry 584 <1> push ss 585 <1> pop ds 586 <1> %else 0 00007928 58 pop ax ; allocated code size 0 00007929 8B16[0000] mov dx, word [extseg_used] 0 0000792D 89D5 mov bp, dx 0 0000792F 26895600 mov word [es:bp+eldiStartCode], dx 591 <1> ; -> loaded code 0 00007933 0306[0000] add ax, word [extseg_used] 0 00007937 A3[0000] mov word [extseg_used], ax ; -> behind 0 0000793A 26894602 mov word [es:bp+eldiEndCode], ax; -> behind 595 <1> 0 0000793E 58 pop ax ; allocated data size 0 0000793F 8B1E[0000] mov bx, word [extdata_used] 0 00007943 81C3[0000] add bx, ext_data_area ; -> loaded data 0 00007947 26895E04 mov word [es:bp+eldiStartData], bx 0 0000794B 0106[0000] add word [extdata_used], ax ; = amount new used 0 0000794F 01D8 add ax, bx ; -> behind 0 00007951 26894606 mov word [es:bp+eldiEndData], ax 603 <1> 0 00007955 8B4D18 mov cx, [di + eldhCodeEntrypoint] 0 00007958 01D1 add cx, dx 606 <1> %endif 0 0000795A 83C418 add sp, ELD_HEADER_size - 8 608 <1> 609 <1> %if ELD 610 <1> pop si 611 <1> mov ax, word [relocateddata] 612 <1> linkdatarelocation linksel 613 <1> extcallcall ispm 614 <1> jz @F 615 <1> mov ax, word [relocateddata] 616 <1> linkdatarelocation linkseg 617 <1> @@: 618 <1> 619 <1> mov di, relocateddata 620 <1> linkdatarelocation linkinfoaddress 621 <1> mov di, [di] 622 <1> mov ds, ax 623 <1> 624 <1> jmp cx 625 <1> ; INP: es:dx -> loaded initial ELD image 626 <1> ; ELD instance structure filled 627 <1> ; es => ELD code area 628 <1> ; ds:di -> link info 629 <1> ; ss:bx -> loaded initial data 630 <1> ; ss:si -> command line tail 631 <1> ; cs:ip -> entrypoint 632 <1> ; ss:sp -> far return address for current mode 633 <1> ; STT: UP, EI 634 <1> ; REM: if loaded as an ELD by an uncompressed library ELD, 635 <1> ; file seek -> behind data image just loaded 636 <1> ; file seek is not meaningful when loaded as an ELD 637 <1> ; by a compressed library ELD 638 <1> %else 639 <1> ext_finish.bp_is_set equ $ 0 0000795D 5D pop bp 641 <1> 0 0000795E 8B36[0000] mov si, word [ext_cmdline] 643 <1> 644 <1> %if _MESSAGESEGMENT 645 <1> %if _PM 646 <1> call get_messagesegsel 647 <1> %else 0 00007962 368E1E[0000] mov ds, word [ss:messageseg] 649 <1> %endif 650 <1> %endif 0 00007967 BF[0000] mov di, linkinfo 652 <1> 0 0000796A 0E push cs 0 0000796B E85100 call .transfer 655 <1> ; INP: es:dx -> loaded initial ELD image 656 <1> ; ELD instance structure filled 657 <1> ; es => ELD code area 658 <1> ; ds:di -> link info 659 <1> ; ss:bx -> loaded initial data 660 <1> ; ss:si -> command line tail 661 <1> ; cs:ip -> entrypoint 662 <1> ; ss:sp -> far return address for current mode 663 <1> ; STT: UP, EI 664 <1> ; REM: file seek -> behind data image just loaded 665 <1> %endif 4642 4643 %undef extcall 4644 %undef extcallcall 4645 %unimacro internalcoderelocation 0-*.nolist 4646 %unimacro internaldatarelocation 0-*.nolist 4647 %unimacro linkdatarelocation 0-*.nolist 4648 %undef relocated 4649 4650 0 0000796E 3D00FF cmp ax, 0FF00h 0 00007971 7215 jb @F 0 00007973 16 push ss 0 00007974 07 pop es 0 00007975 16 push ss 0 00007976 1F pop ds 0 00007977 BF[0000] mov di, msg.eld_error_code 0 0000797A E866E7 call hexword 0 0000797D B40F mov ah, 0Fh 0 0000797F E8[0000] call setrc 0 00007982 BA[0000] mov dx, msg.eld_load_error 0 00007985 E8ABEC call putsz_error 4663 @@: 0 00007988 E9[0000] jmp cmd3 4665 4666 4667 .error_internal: 0 0000798B BA[0000] mov dx, msg.ext_error_internal 0 0000798E B82C01 mov ax, 012Ch 0 00007991 EB20 jmp .specificerror 4671 4672 .io_error: 0 00007993 BA[0000] mov dx, msg.ext_error_io 0 00007996 B82D01 mov ax, 012Dh 0 00007999 EB06 jmp .specificerror_or_if 4676 4677 .invalid: 0 0000799B BA[0000] mov dx, msg.ext_error_invalid 0 0000799E B82E01 mov ax, 012Eh 4680 .specificerror_or_if: 0 000079A1 F606[0300]08 testopt [internalflags3], dif3_in_if 0 000079A6 7403E9[0000] jnz if_exists_not_found 0 000079AB EB06 jmp .specificerror 4684 4685 .oom: 0 000079AD BA[0000] mov dx, msg.ext_error_oom 0 000079B0 B82F01 mov ax, 012Fh 4688 4689 .specificerror: 0 000079B3 16 push ss 0 000079B4 1F pop ds 0 000079B5 E8[0000] call setrc 0 000079B8 E878EC call putsz_error 0 000079BB FF26[0000] jmp [errret] 4695 4696 4697 .transfer: 4698 transfer_ext_cx_NC: 0 000079BF F8 clc 4700 4701 transfer_ext_cx: 4702 %if _PM 4703 push di 4704 mov di, word [ss:pm_2_86m_0] 4705 jmp near word [ss:.table + di] 4706 4707 .pm: 4708 pop di 4709 push word [ss:extcssel] ; => code 4710 push cx ; -> entrypoint 4711 retf 4712 4713 .86m: 4714 pop di 4715 %endif 0 000079C0 36FF36[0000] push word [ss:extseg] ; => code 0 000079C5 51 push cx ; -> entrypoint 0 000079C6 CB retf 4719 4720 %if _PM 4721 usesection lDEBUG_DATA_ENTRY 4722 ; REM: Dispatch table in section lDEBUG_CODE 4723 align 2, db 0 4724 .table: 4725 dw .86m 4726 dw .pm 4727 4728 4729 usesection lDEBUG_CODE 4730 get_es_ext: 4731 mov es, word [extdssel] 4732 call ispm 4733 jz .ret 4734 mov es, word [extseg] 4735 .ret: 4736 retn 4737 %endif 4738 %endif 4739 4740 ; INP: word [bufnext], word [bufend] 4741 ; CHG: - 4742 ; 4743 ; Note: When reading from a file, we buffer some of the input 4744 ; in line_in. When switching to a non-file, or starting 4745 ; to read from another file, we have to reset the seek 4746 ; position of the (prior) file to avoid losing the data. 4747 ; This cropped up during yy development, but actually 4748 ; affects serial and InDOS input, too. Therefore, 4749 ; this function is not below the conditional for yy. 4750 yy_reset_buf: section_of_function 0 000079C7 51 push cx 4752 %if _NEWFULLHANDLING 0 000079C8 B9[0300] mov cx, line_in + 3 4754 %else 4755 mov cx, line_in + 2 4756 %endif 0 000079CB 870E[0000] xchg cx, word [bufnext] 0 000079CF F7D9 neg cx 0 000079D1 030E[0000] add cx, word [bufend] ; cx = how much remaining in buffer 4760 %if _NEWFULLHANDLING 0 000079D5 C706[0000][0300] mov word [bufend], line_in + 3 4762 %else 4763 mov word [bufend], line_in + 2 4764 %endif 4765 0 000079DB F606[0200]40 testopt [internalflags2], dif2_did_getline_file 0 000079E0 7469 jz .not_used 4768 0 000079E2 50 push ax 0 000079E3 52 push dx 0 000079E4 53 push bx 0 000079E5 89CA mov dx, cx 0 000079E7 31C9 xor cx, cx 0 000079E9 F7DA neg dx ; dx = minus how much remaining 0 000079EB 7456 jz .done ; if zero, do not seek at all --> 0 000079ED 49 dec cx ; sign extension into cx:dx 4777 4778 %if !_LOADER 0 000079EE F606[0300]01 testopt [internalflags3], dif3_input_re 0 000079F3 7406 jz @F 0 000079F5 0116[0000] add word [re_buffer.position], dx 0 000079F9 EB48 jmp .done 4783 @@: 4784 %endif 4785 4786 %if _INPUT_FILE_BOOT 0 000079FB F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00007A00 741E jz @F 0 00007A02 F606[0300]30 testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 0 00007A07 7412 jz .do_boot_seek 4791 0 00007A09 FF36[0000] push word [load_input_file.active] 0 00007A0D 8F06[0000] pop word [boot_remember_seek_handle] 0 00007A11 890E[0200] mov word [boot_remember_seek_offset + 2], cx 0 00007A15 8916[0000] mov word [boot_remember_seek_offset], dx 0 00007A19 EB28 jmp .done 4797 4798 .do_boot_seek: 0 00007A1B E8[0000] call yy_boot_seek_current 0 00007A1E EB23 jmp .done 4801 @@: 4802 %endif 4803 4804 %if _INPUT_FILE_HANDLES 0 00007A20 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00007A25 7407 jz @F ; if not input file --> 0 00007A27 57 push di 0 00007A28 E85DEE call yy_get_handle ; bx = handle 0 00007A2B 5F pop di 0 00007A2C EB0F jmp .filehandle 4811 @@: 4812 %endif 4813 0 00007A2E F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00007A33 7406 jz @F 0 00007A35 0116[0000] add word [cmdline_buffer.position], dx 0 00007A39 EB08 jmp .done 4818 @@: 4819 0 00007A3B 31DB xor bx, bx ; bx = handle (0 is STDIN) 4821 .filehandle: 0 00007A3D B80142 mov ax, 4201h ; lseek, from current file position 0 00007A40 E80A00 call handle_seek_or_remember 4824 4825 .done: 0 00007A43 5B pop bx 0 00007A44 5A pop dx 0 00007A45 58 pop ax 4829 0 00007A46 8026[0200]BF clropt [internalflags2], dif2_did_getline_file 4831 4832 .not_used: 0 00007A4B 59 pop cx 0 00007A4C C3 retn 4835 4836 4837 handle_seek_or_remember: 0 00007A4D E8[0000] call InDOS 0 00007A50 7411 jz @F 4840 0 00007A52 A3[0000] mov word [indos_remember_seek_function], ax 0 00007A55 891E[0000] mov word [indos_remember_seek_handle], bx 0 00007A59 890E[0200] mov word [indos_remember_seek_offset + 2], cx 0 00007A5D 8916[0000] mov word [indos_remember_seek_offset], dx 0 00007A61 EB02 jmp .done 4846 4847 @@: 4848 doscall ; call DOS 0 00007A63 CD21 int 21h 4849 .done: 0 00007A65 C3 retn 4851 4852 4853 yy_reset_buf_and_seek_start: 0 00007A66 51 push cx 0 00007A67 50 push ax 0 00007A68 52 push dx 0 00007A69 53 push bx 4858 %if _NEWFULLHANDLING 0 00007A6A B8[0300] mov ax, line_in + 3 4860 %else 4861 mov ax, line_in + 2 4862 %endif 0 00007A6D A3[0000] mov word [bufnext], ax 0 00007A70 A3[0000] mov word [bufend], ax 4865 0 00007A73 31D2 xor dx, dx 0 00007A75 31C9 xor cx, cx 4868 4869 %if !_LOADER 0 00007A77 F606[0300]01 testopt [internalflags3], dif3_input_re 0 00007A7C 7408 jz @F 0 00007A7E C706[0000][0000] mov word [re_buffer.position], re_buffer 0 00007A84 EB37 jmp .done 4874 @@: 4875 %endif 4876 4877 %if _INPUT_FILE_BOOT 0 00007A86 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00007A8B 7408 jz @F 0 00007A8D E8[0000] call yy_boot_clear_remember_seek 0 00007A90 E8[0000] call yy_boot_seek_start 0 00007A93 EB28 jmp .done 4883 @@: 4884 %endif 4885 4886 %if _INPUT_FILE_HANDLES 0 00007A95 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00007A9A 7407 jz @F ; if not input file --> 0 00007A9C 57 push di 0 00007A9D E8E8ED call yy_get_handle ; bx = handle 0 00007AA0 5F pop di 0 00007AA1 EB11 jmp .filehandle 4893 @@: 4894 %endif 4895 0 00007AA3 F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00007AA8 7408 jz @F 0 00007AAA C706[0000][0000] mov word [cmdline_buffer.position], cmdline_buffer 0 00007AB0 EB0B jmp .done 4900 @@: 4901 0 00007AB2 31DB xor bx, bx ; bx = handle (0 is STDIN) 4903 4904 .filehandle: 0 00007AB4 E80B00 call yy_clear_remember_seek 0 00007AB7 B80042 mov ax, 4200h ; seek from start 0 00007ABA E890FF call handle_seek_or_remember 4908 .done: 0 00007ABD 5B pop bx 0 00007ABE 5A pop dx 0 00007ABF 58 pop ax 0 00007AC0 59 pop cx 0 00007AC1 C3 retn 4914 4915 4916 yy_clear_remember_seek: 0 00007AC2 391E[0000] cmp word [indos_remember_seek_handle], bx 0 00007AC6 7515 jne .ret 4919 .clear: 0 00007AC8 C706[0000]0142 mov word [indos_remember_seek_function], 4201h 0 00007ACE 830E[0000]FF or word [indos_remember_seek_handle], -1 0 00007AD3 8326[0200]00 and word [indos_remember_seek_offset + 2], 0 0 00007AD8 8326[0000]00 and word [indos_remember_seek_offset], 0 4924 .ret: 0 00007ADD C3 retn 4926 4927 4928 yy_remember_seek: 0 00007ADE 391E[0000] cmp word [indos_remember_seek_handle], bx 0 00007AE2 75F9 jne yy_clear_remember_seek.ret 4931 0 00007AE4 50 push ax 0 00007AE5 51 push cx 0 00007AE6 52 push dx 0 00007AE7 8B0E[0200] mov cx, word [indos_remember_seek_offset + 2] 0 00007AEB 8B16[0000] mov dx, word [indos_remember_seek_offset] 0 00007AEF A1[0000] mov ax, word [indos_remember_seek_function] 4938 doscall ; call DOS 0 00007AF2 CD21 int 21h 0 00007AF4 5A pop dx 0 00007AF5 59 pop cx 0 00007AF6 58 pop ax 0 00007AF7 EBCF jmp yy_clear_remember_seek.clear 4943 4944 4945 cmd_goto: 0 00007AF9 E821E5 call skipwhite 0 00007AFC 3C3A cmp al, ':' 0 00007AFE 7503 jne @F 0 00007B00 E81AE5 call skipwhite 4950 @@: 4951 0 00007B03 E8FAF0 call getline_is_input_file? 0 00007B06 7312 jnc @F 0 00007B08 BA[0000] mov dx, msg.goto_not_file 0 00007B0B B80003 mov ax, 0300h 0 00007B0E E8[0000] call setrc 4957 .error: 0 00007B11 B8FF03 mov ax, 03FFh 0 00007B14 E8[0000] call setrc 0 00007B17 E919EB jmp putsz_error 4961 4962 @@: 0 00007B1A 4E dec si 4964 .yy_entry: ; si -> destination label 0 00007B1B BA[0000] mov dx, msg.sof 0 00007B1E E857E4 call isstring? 0 00007B21 751B jne @F 0 00007B23 E8C8E4 call skipcomma 4969 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00007B26 8936[0000] mov word [if_exists_then_address], si 4971 %endif 0 00007B2A E8FBE4 call chkeol_or_then 0 00007B2D E8D700 call resetrc 0 00007B30 E833FF call yy_reset_buf_and_seek_start 4975 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00007B33 F606[0300]08 testopt [internalflags3], dif3_in_if 0 00007B38 7403E9[0000] jnz if_exists_found_open 4978 %endif 0 00007B3D C3 retn 4980 4981 @@: 0 00007B3E BA[0000] mov dx, msg.eof 0 00007B41 E834E4 call isstring? 0 00007B44 751B jne @F 0 00007B46 E8A5E4 call skipcomma 4986 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00007B49 8936[0000] mov word [if_exists_then_address], si 4988 %endif 0 00007B4D E8D8E4 call chkeol_or_then 0 00007B50 E8B400 call resetrc 0 00007B53 E8E3F0 call getline_close_file 4992 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00007B56 F606[0300]08 testopt [internalflags3], dif3_in_if 0 00007B5B 7403E9[0000] jnz if_exists_found_closed 4995 %endif 0 00007B60 C3 retn 4997 4998 @@: 0 00007B61 89F3 mov bx, si 0 00007B63 B9FFFF mov cx, -1 5001 .loop: 0 00007B66 41 inc cx 0 00007B67 AC lodsb 0 00007B68 3C20 cmp al, 32 0 00007B6A 7409 je .end 0 00007B6C 3C09 cmp al, 9 0 00007B6E 7405 je .end 0 00007B70 E870E4 call iseol? 0 00007B73 75F1 jne .loop 5010 .end: 0 00007B75 C644FF00 mov byte [si - 1], 0 ; terminate 0 00007B79 E873E4 call skipcomm0 5013 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00007B7C 8936[0000] mov word [if_exists_then_address], si 5015 %endif 0 00007B80 E8A5E4 call chkeol_or_then 0 00007B83 E376 jcxz .empty 0 00007B85 41 inc cx ; space for zero terminator 0 00007B86 41 inc cx ; round up 0 00007B87 80E1FE and cl, ~1 ; align to word 0 00007B8A 89E5 mov bp, sp 0 00007B8C 29CC sub sp, cx ; allocate stack space 0 00007B8E 89DE mov si, bx ; -> label in line_in 0 00007B90 89E7 mov di, sp ; -> buffer on stack 0 00007B92 57 push di 5026 @@: 0 00007B93 AC lodsb 0 00007B94 E830E4 call capitalise ; normalise the name in buffer 0 00007B97 AA stosb 0 00007B98 E2F9 loop @B ; copy all or all+1 5031 0 00007B9A E8C9FE call yy_reset_buf_and_seek_start 5033 5034 .next_line: 0 00007B9D 800E[0100]88 setopt [internalflags3], dif3_quiet_input_single | dif3_return_eof 0 00007BA2 31C9 xor cx, cx 0 00007BA4 E82CEE call getline.use_dif3_flags 0 00007BA7 7228 jc .notfound 0 00007BA9 89F3 mov bx, si 0 00007BAB 3C3A cmp al, ':' 0 00007BAD 75EE jne .next_line 0 00007BAF E86BE4 call skipwhite 0 00007BB2 5A pop dx 0 00007BB3 52 push dx 0 00007BB4 4E dec si 0 00007BB5 E8C0E3 call isstring? 0 00007BB8 75E3 jne .next_line 0 00007BBA 8D77FF lea si, [bx - 1] 0 00007BBD AC lodsb 0 00007BBE 89EC mov sp, bp 0 00007BC0 E84400 call resetrc 5052 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00007BC3 F606[0300]08 testopt [internalflags3], dif3_in_if 0 00007BC8 7403E9[0000] jnz if_exists_found_open 5055 %endif 0 00007BCD 5A pop dx ; return address to cmd3 0 00007BCE E9[0000] jmp cmd3_injected 5058 5059 .notfound: 5060 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00007BD1 F606[0300]08 testopt [internalflags3], dif3_in_if 0 00007BD6 751B jnz @F 5063 %endif 0 00007BD8 B80103 mov ax, 0301h 0 00007BDB E8[0000] call setrc 0 00007BDE BA[0000] mov dx, msg.goto_not_found.1 0 00007BE1 E84FEA call putsz_error 0 00007BE4 5A pop dx 0 00007BE5 E84BEA call putsz_error 0 00007BE8 BA[0000] mov dx, msg.goto_not_found.2 0 00007BEB E845EA call putsz_error 0 00007BEE 89EC mov sp, bp 0 00007BF0 E946F0 jmp getline_close_file 5074 5075 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 5076 @@: 0 00007BF3 89EC mov sp, bp 0 00007BF5 E841F0 call getline_close_file 0 00007BF8 E9[0000] jmp if_exists_not_found 5080 %endif 5081 5082 .empty: 0 00007BFB B80203 mov ax, 0302h 0 00007BFE E8[0000] call setrc 0 00007C01 BA[0000] mov dx, msg.goto_empty 0 00007C04 E90AFF jmp .error 5087 5088 5089 resetrc: 0 00007C07 FF36[0000] push word [priorrc] 0 00007C0B 8F06[0000] pop word [rc] 0 00007C0F C3 retn 5093 5094 5095 %ifn _LINK || _LINK_COMPAT 5096 %include "serialp.asm" 5097 %endif === Trace listing source: ../lst/debug.obj/ll.lst 1 2 %if 0 3 4 lDebug L commands (load sector, load program) 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 "ll.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00002486 ???????? eldhSignature: resb 4 ; "ELD1" 0 0000248A ?????? resb 3 ; reserved 0 0000248D ?? resb 1 ; 26 (Ctrl-Z) 0 0000248E ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00002492 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002494 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002496 ???????? eldhDataOffset: resd 1 0 0000249A ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000249C ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000249E ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000024A0 ???????? eldhReserved: resb 4 ; reserved 0 000024A4 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 000024A6 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000024AA ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000024AE ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000024B2 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002486 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000248E ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00002492 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002494 ???? 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 0 00002486 ???? 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 0 00002488 ???? eldltAmount: resw 1 0 0000248A ???????? 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 0 00002486 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00002488 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 0000248A ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000248C ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000248E ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002496 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00002486 ???? eldlSignature: resw 1 ; 0E1D1h 0 00002488 ???????? eldlReserved: resw 2 0 0000248C ???? eldlUseLinkHash: resw 1 0 0000248E ???? eldlDataAmount: resw 1 0 00002490 ???? eldlDataPrefixes: resw 1 0 00002492 ???? eldlDataEntries: resw 1 0 00002494 ???? eldlDataAddresses: resw 1 0 00002496 ???? eldlCodeAmount: resw 1 0 00002498 ???? eldlCodePrefixes: resw 1 0 0000249A ???? eldlCodeEntries: resw 1 0 0000249C ???? 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 0 00002486 ???? ifKeyword: resw 1 0 00002488 ???? ifDescription: resw 1 0 0000248A ???? ifOptions: resw 1 0 0000248C ???? ifValue: resw 1 0 0000248E ???? ifTrying: resw 1 0 00002490 ???? 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 0 00002486 ???????? saOffset: resd 1 0 0000248A ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00002486 ???? so16aOffset: resw 1 0 00002488 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00002486 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00002486 ?????? bsJump: resb 3 0 00002489 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00002486 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00002488 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00002489 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 0000248B ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 0000248C ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000248E ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 00002490 ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 00002491 ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00002493 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00002495 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00002497 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 0000249B ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 0000249F ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 000024A3 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 000024A5 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 000024A7 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 000024AB ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 000024AD ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00002486 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00002487 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00002488 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00002489 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00002498 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00002486 ???????????????? deName: resb 8 0 0000248E ?????? deExt: resb 3 0 00002491 ?? deAttrib: resb 1 0 00002492 ?? dePlusSize: resb 1 0 00002493 ?????????????? resb 7 0 0000249A ???? deClusterHigh: resw 1 0 0000249C ???? deTime: resw 1 0 0000249E ???? deDate: resw 1 0 000024A0 ???? deClusterLow: resw 1 0 000024A2 ???????? 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 0 100002476 ???????? lsvFirstCluster: resd 1 0 10000247A ???????? lsvFATSector: resd 1 0 10000247E ???? lsvFATSeg: resw 1 0 100002480 ???? lsvLoadSeg: resw 1 0 100002482 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100002466 ???? ldMemoryTop: resw 1 0 100002468 ???? ldLoadTop: resw 1 0 10000246A ???? ldSectorSeg: resw 1 0 10000246C ?? ldFATType: resb 1 92 <2> ldFlags: 0 10000246D ?? ldHasLBA: resb 1 0 10000246E ???? ldClusterSize: resw 1 0 100002470 ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100002472 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100002474 ?? .partition: resb 1 ; byte 0 100002475 ?? .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 <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 0 100002456 ???????? ldRootSector: resd 1 0 10000245A ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 10000245C ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 10000245E ???? ldParasLeft: resw 1 0 100002460 ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 100002446 ???????? ldMaxCluster: resd 1 0 10000244A ???????? ldFileSize: resd 1 0 10000244E ???????? ldCurrentCluster: resd 1 0 100002452 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00002486 ???????? liiSignature: resb 4 ; "NLDR" 0 0000248A ???? liiVersion: resb 2 ; "00" 0 0000248C ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000248E ???? liiAmountParagraphs: resw 1 0 00002490 ???????????? liiReserved: resw 3 0 00002496 ???? 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 0 00002498 ???? 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 0 0000249A ???? 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 0 0000249C ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00002486 ???? lpSize: resw 1 0 00002488 ???? lpCount: resw 1 0 0000248A ???????? lpBuffer: resd 1 0 0000248E ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00002486 ?? piBoot: resb 1 0 00002487 ?????? piStartCHS: resb 3 0 0000248A ?? piType: resb 1 0 0000248B ?????? piEndCHS: resb 3 0 0000248E ???????? piStart: resd 1 0 00002492 ???????? 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 0 00002486 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00002488 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 0000248A ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 0000248C ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000248E ???? lsOptions: resw 1 ; option flags 0 00002490 ???? lsSegment: resw 1 ; => where to load file 0 00002492 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00002496 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 0000249A ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 0000249C ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 0000249E ???????????????? 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 0 00002486 ???? exact_struc_at 00h, exeSignature: resw 1 0 00002488 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 0000248A ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 0000248C ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000248E ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 00002490 ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00002492 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00002494 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00002496 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00002498 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 0000249A ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 0000249C ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 0000249E ???? 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. 0 000024A0 ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00002486 ???? ifhHandle: resw 1 0 00002488 ???? ifhFlags: resw 1 0 0000248A ???????? 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 <1> areastrucEntry: resb 24 0 0000249E ???????? areastrucNext: resd 1 0 000024A2 ???????? areastrucPrev: resd 1 0 000024A6 ???? areastrucSubAmount: resw 1 0 000024A8 ???? areastrucSubOffset: resw 1 0 000024AA ???? areastrucFunAmount: resw 1 0 000024AC ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00002486 ???????? areastrucsubLinear: resd 1 0 0000248A ???????? areastrucsubLinearEnd: resd 1 0 0000248E ???? areastrucsubListOffset: resw 1 0 00002490 ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00002486 ???????? areastrucfunLinear: resd 1 0 0000248A ???????? areastrucfunLinearEnd: resd 1 0 0000248E ???? areastrucfunListOffset: resw 1 0 00002490 ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00002486 ???? areastart: resw 1 0 00002488 ???? areaend: resw 1 0 0000248A ???? areamessage: resw 1 0 0000248C ???? 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 0 00002486 ???? 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.) 0 00002488 ???? ivFlags: resw 1 0 0000248A ???? 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. 0 0000248C ???? 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 0 0000248E ?? 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. 0 0000248F ?? 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 0 00002486 ???????? mrLinear: resd 1 0 0000248A ???????? mrOffset: resd 1 0 0000248E ???? mrSegmentSelector: resw 1 0 00002490 ???? mrFlags: resw 1 0 00002492 ???????? 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 0 00002486 ???????? .size_: resd 1 0 0000248A ???? .srchdl: resw 1 0 0000248C ???????? .srcadr: resd 1 0 00002490 ???? .dsthdl: resw 1 0 00002492 ???????? .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 %endif 21 22 23 %if !_LINK || !_LOADER 24 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 24 ------------------ note: usesection lDEBUG_CODE 25 26 ; L command - read a program, or disk sectors, from disk. 27 ll: 28 %if _BOOTLDR 29 %if _APPLICATION || _DEVICE 0 00007C10 F606[0100]40 testopt [internalflags], nodosloaded 0 00007C15 740C jz @F 32 %endif 0 00007C17 BA[0000] mov dx, msg.nobootsupp 0 00007C1A B81801 mov ax, 0118h 0 00007C1D E8[0000] call setrc 0 00007C20 E9[0000] jmp putsz 37 @@: 38 %endif 39 40 %if _APPLICATION || _DEVICE 0 00007C23 E8[0000] call parselw ; parse L and W argument format 0 00007C26 7433 jz ll1 ; if request to read program 43 %if _PM && _NOEXTENDER 44 call ispm 45 jnz .rm 46 call isextenderavailable 47 jc nodosextinst 48 .rm: 49 %endif 0 00007C28 36F606[0000]06 testopt [ss:internalflags], newpacket| ntpacket 0 00007C2E 7423 jz .oldint 0 00007C30 88C2 mov dl, al ; zero-based drive 0 00007C32 BE0060 mov si, 6000h ; read, assume "file data" 54 %if _VDD 0 00007C35 F606[0000]04 testopt [internalflags], ntpacket 0 00007C3A 750A jnz .vdd 57 %endif 0 00007C3C FEC2 inc dl ; one-based drive 0 00007C3E B80573 mov ax, 7305h ; ds:(e)bx-> packet 0 00007C41 F9 stc 0 00007C42 CD21 int 21h ; use int 21h here, not doscall 0 00007C44 EB0F jmp short .done 63 %if _VDD 64 .vdd: 0 00007C46 A1[0000] mov ax, word [hVdd] 0 00007C49 B90500 mov cx, 5 67 %if _PM 68 add cl, byte [dpmi32] 69 %endif 0 00007C4C C4C4580290 DispatchCall 0 00007C51 EB02 jmp short .done 72 %endif 73 .oldint: 0 00007C53 CD25 int 25h 75 .done: 0 00007C55 BA[0000] mov dx, reading 0 00007C58 E9[0000] jmp ww1 78 79 ; For .COM or .EXE files, we can only load at cs:100. Check that first. 80 ll1: 0 00007C5B E8[0000] call InDOS 0 00007C5E 7520 jnz not_while_indos 0 00007C60 E8[0000] call guard_re 0 00007C63 F606[0100]04 testopt [options6], opt6_flat_binary 0 00007C68 7532 jnz ll4 0 00007C6A F606[0000]06 test byte [fileext], EXT_COM| EXT_EXE 0 00007C6F 742B jz ll4 ; if not .COM or .EXE file 0 00007C71 3B1E[0000] cmp bx, word [reg_cs] 0 00007C75 7506 jne ll2 ; if segment is wrong 0 00007C77 81FA0001 cmp dx, 100h 0 00007C7B 741F je ll4 ; if address is OK (or not given) 92 ll2: 0 00007C7D E9[0000] jmp error ; can only load .COM or .EXE at cs:100 94 95 not_while_indos: 0 00007C80 B84701 mov ax, 0147h 0 00007C83 BA[0000] mov dx, msg.not_while_indos 98 @@: 0 00007C86 E8[0000] call setrc 0 00007C89 E9[0000] jmp putsz_error 101 102 %if _TSR 103 ll_no_tsr_ll: 0 00007C8C B84801 mov ax, 0148h 0 00007C8F BA[0000] mov dx, msg.tsr_cannot_ll 0 00007C92 EBF2 jmp @B 107 %endif 108 109 ; load (any) file (if not .EXE or .COM, load at BX:DX) 110 ll3: 0 00007C94 803E[0000]00 cmp byte [fileext], 0 0 00007C99 7501 jne ll4 0 00007C9B C3 retn 114 115 ; open file and get length 116 ll4: 117 %if _TSR && (_APPLICATION || _DEVICE) 0 00007C9C F606[0200]40 testopt [internalflags], tsrmode 0 00007CA1 7407 jz @F 0 00007CA3 F606[0100]20 testopt [options7], opt7_no_tsr_ll 0 00007CA8 75E2 jnz ll_no_tsr_ll 122 @@: 123 %endif 124 0 00007CAA 89DE mov si, bx ; save destination address, segment 0 00007CAC 89D7 mov di, dx ; and offset 0 00007CAE B8003D mov ax, 3D00h ; open file for reading 0 00007CB1 BA8000 mov dx, DTA 129 doscall 0 00007CB4 CD21 int 21h 0 00007CB6 7303E9FA02 jc ll16 ; error 0 00007CBB 93 xchg ax, bx ; mov bx, ax 0 00007CBC B80242 mov ax, 4202h ; lseek 0 00007CBF 31C9 xor cx, cx 0 00007CC1 31D2 xor dx, dx 0 00007CC3 CD21 int 21h 136 137 ; Split off file types 138 ; At this point: 139 ; bx file handle 140 ; dx:ax file length 141 ; si:di load address (CS:100h for .EXE or .COM) 142 0 00007CC5 F606[0100]04 testopt [options6], opt6_flat_binary 0 00007CCA 750A jnz @F 0 00007CCC F606[0000]06 test byte [fileext], EXT_COM | EXT_EXE 0 00007CD1 7403E9E301 jnz ll13 ; if .COM or .EXE file 147 @@: 148 149 %if _PM 150 ;--- dont load a file in protected mode, 151 ;--- the read loop makes some segment register arithmetic 152 call ispm 153 jnz .rm 154 mov ax, 013Eh 155 call setrc 156 mov dx, nopmsupp 157 call putsz 158 jmp ll12 159 .rm: 160 %endif 161 162 ; Load it ourselves. 163 ; For non-.com/.exe files, we just do a read, and set BX:CX to the 164 ; number of bytes read. 165 ; 166 ; si:di = address where to load 167 0 00007CD6 F606[0100]04 testopt [options6], opt6_flat_binary 0 00007CDB 750A jnz @F 0 00007CDD F606[0000]08 test byte [fileext], EXT_HEX 0 00007CE2 7403E9BF00 jnz ll_hex ; if .HEX file --> 172 @@: 173 0 00007CE7 E8[0000] call ensuredebuggeeloaded ; make sure a debuggee is loaded 0 00007CEA 7531 jnz ll9.common ; if have no process --> 176 ; si:di = preserved if had a process, 177 ; else si:di = cs:ip (psp:100h) 178 ; ? Can we ever get NC, ZR return here ? 179 0 00007CEC 8E06[0000] mov es, word [pspdbe] 181 182 ; Check the size against available space. 0 00007CF0 56 push si 0 00007CF1 53 push bx 185 0 00007CF2 263B360200 cmp si, word [es:ALASAP] 0 00007CF7 9C pushf 0 00007CF8 F7DE neg si 0 00007CFA 9D popf 0 00007CFB 7305 jae ll6 ; if loading past end of mem, allow through ffff 0 00007CFD 2603360200 add si, word [es:ALASAP] ; si = number of paragraphs available 192 ll6: 0 00007D02 B90400 mov cx, 4 0 00007D05 31DB xor bx, bx ; bx:si = amount of paragraphs 195 ll7: 0 00007D07 D1E6 shl si, 1 0 00007D09 D1D3 rcl bx, 1 0 00007D0B E2FA loop ll7 ; bx:si = amount of bytes from paragraphs 0 00007D0D 29FE sub si, di 0 00007D0F 19CB sbb bx, cx ; bx:si = amount of bytes left 0 00007D11 7208 jb ll9 ; if already we're out of space --> 0 00007D13 39D3 cmp bx, dx ; cmp bx:si, dx:ax (compare high word) 0 00007D15 7502 jne @F ; if high word differs --> 0 00007D17 39C6 cmp si, ax ; compare low word 205 @@: 0 00007D19 7310 jae ll10 ; if not out of space --> 207 ll9: 0 00007D1B 5B pop bx ; out of space 0 00007D1C 5E pop si 210 .common: 0 00007D1D B83F01 mov ax, 013Fh 0 00007D20 E8[0000] call setrc 0 00007D23 BA[0000] mov dx, doserr8 ; not enough memory 0 00007D26 E8[0000] call putsz ; print string 0 00007D29 EB5D jmp short ll12 ; finally close file --> 216 217 ll10: 0 00007D2B 5B pop bx 0 00007D2C 5E pop si 220 221 ; Store length in registers 222 223 ; seems a bit unwise to modify registers if a debuggee is running 224 ; but MS DEBUG does it as well 225 226 %if 0 227 mov cx,[reg_cs] 228 cmp cx,[pspdbe] 229 jnz .noregmodify 230 cmp word [reg_eip], 100h 231 jnz .noregmodify 232 %endif 0 00007D2D 8916[0000] mov word [reg_ebx], dx 0 00007D31 A3[0000] mov word [reg_ecx], ax 235 .noregmodify: 236 0 00007D34 E80200 call ll_bin_hex_common 0 00007D37 EB33 jmp ll10_5 239 240 241 ll_bin_hex_common: 0 00007D39 F606[0100]08 testopt [options6], opt6_big_stack 0 00007D3E 7422 jz .nostacksetup 0 00007D40 A1[0000] mov ax, word [pspdbe] 0 00007D43 48 dec ax 0 00007D44 8ED8 mov ds, ax ; => MCB 0 00007D46 8B160300 mov dx, word [3] ; size in paragraphs 0 00007D4A 83EA1F sub dx, 20h - 1 0 00007D4D 01C2 add dx, ax 0 00007D4F 8EDA mov ds, dx ; => our stack 0 00007D51 8326FE0100 and word [200h - 2], 0 ; put a zero on top 0 00007D56 16 push ss 0 00007D57 1F pop ds ; restore debugger segment 0 00007D58 8916[0000] mov word [reg_ss], dx 0 00007D5C C706[0000]FE01 mov word [reg_esp], 200h - 2 256 ; -> at the zero 257 258 .nostacksetup: 259 260 ; Rewind the file 0 00007D62 B80042 mov ax, 4200h ; lseek 0 00007D65 31C9 xor cx, cx 0 00007D67 31D2 xor dx, dx 0 00007D69 CD21 int 21h 0 00007D6B C3 retn 266 267 268 ll10_5: 0 00007D6C BA0F00 mov dx, 0Fh 0 00007D6F 21FA and dx, di 0 00007D71 B104 mov cl, 4 0 00007D73 D3EF shr di, cl 0 00007D75 01FE add si, di ; si:dx -> address to read to 274 275 ; Loop over chunks to read 276 ll11: 0 00007D77 B43F mov ah, 3Fh ; read from file into DS:(E)DX 0 00007D79 B900FE mov cx, 0FE00h ; read up to this many bytes 0 00007D7C 8EDE mov ds, si 0 00007D7E CD21 int 21h ; ax = how many bytes read 281 0 00007D80 81C6E00F add si, 0FE0h ; (won't work in protected mode!) 0 00007D84 39C8 cmp ax, cx ; read a full chunk ? 0 00007D86 74EF je ll11 ; yes, end of file maybe not yet reached --> 285 286 ; Close the file and finish up. 287 ll12: 0 00007D88 B43E mov ah, 3Eh ; close file 0 00007D8A CD21 int 21h 0 00007D8C 16 push ss ; restore ds 0 00007D8D 1F pop ds 292 293 ; INP: execblk.cmdline 294 ; es => PSP to populate 295 ; CHG: si, di, cx 296 ; STT: ds = ss 297 ll_copy_cmdline_and_fcbs: 298 %if _MS_N_COMPAT 0 00007D8E B98000 mov cx, 128 ; counter = 128 bytes 300 301 ; INP: cx = length to copy 302 .have_cx: 303 %endif 0 00007D91 C536[0000] lds si, [execblk.cmdline] 0 00007D95 BF8000 mov di, 80h ; es:di -> PSP command line field 306 %ifn _MS_N_COMPAT 307 mov cx, di ; counter = 128 bytes 308 %endif 0 00007D98 F3A4 rep movsb ; copy over 0 00007D9A BF5C00 mov di, 5Ch 311 ; lds si, [ss:execblk.fcb1] 0 00007D9D 89FE mov si, di 0 00007D9F B110 mov cl, 16 ; 32 bytes 0 00007DA1 F3A5 rep movsw 0 00007DA3 16 push ss 0 00007DA4 1F pop ds 0 00007DA5 C3 retn ; done 318 319 320 ll_hex: 0 00007DA6 E8[0000] call ensuredebuggeeloaded ; make sure a debuggee is loaded 0 00007DA9 7403E96FFF jnz ll9.common ; if have no process --> 323 ; si:di = preserved if had a process, 324 ; else si:di = cs:ip (psp:100h) 325 ; ? Can we ever get NC, ZR return here ? 0 00007DAE 7202 jc @F 0 00007DB0 31FF xor di, di ; created process, reset di (100h) to 0 328 @@: 329 0 00007DB2 8EC6 mov es, si ; => segment to write to 331 0 00007DB4 E882FF call ll_bin_hex_common 333 lframe none 334 lvar word, high_effective_offset 0 00007DB7 5589E550 lenter 0 00007DBB 31C0 xor ax, ax 337 lvar dword, highest 0 00007DBD 50 push ax 0 00007DBE 50 push ax 340 lvar word, highoffset 0 00007DBF 50 push ax 342 lvar dword, base 0 00007DC0 06 push es 0 00007DC1 57 push di ; -> base address for write 0 00007DC2 BE[0001] mov si, line_out + 256 346 .find_line_start: 0 00007DC5 E8C800 call ll_hex_read ; scan for colon 0 00007DC8 3C3A cmp al, ':' 0 00007DCA 75F9 jne .find_line_start 350 0 00007DCC E8A400 call ll_hex_read_byte ; amount of data bytes 0 00007DCF B400 mov ah, 0 0 00007DD1 91 xchg ax, cx 0 00007DD2 E378 jcxz ll_hex_done 0 00007DD4 E89C00 call ll_hex_read_byte ; MSByte of offset 0 00007DD7 88C6 mov dh, al 0 00007DD9 E89700 call ll_hex_read_byte ; LSByte of offset 0 00007DDC 88C2 mov dl, al 0 00007DDE E89200 call ll_hex_read_byte ; type 0 00007DE1 3C04 cmp al, 4 ; new high offset ? 0 00007DE3 7457 je .change_high_offset 0 00007DE5 3C00 cmp al, 0 ; data ? 0 00007DE7 75DC jne .find_line_start ; no --> 364 0 00007DE9 8B46F8 mov ax, word [bp + ?highoffset] 0 00007DEC 8946FE mov word [bp + ?high_effective_offset], ax 0 00007DEF 83F810 cmp ax, 10h 0 00007DF2 7372 jae ll_hex_error 0 00007DF4 51 push cx 0 00007DF5 B10C mov cl, 12 0 00007DF7 D3E0 shl ax, cl ; high offset * 1000h = segment adjust 0 00007DF9 59 pop cx 0 00007DFA 0346F6 add ax, word [bp + ?base + 2] 374 ; => target 0 00007DFD 7267 jc ll_hex_error 0 00007DFF 0356F4 add dx, [bp + ?base] ; -> target. except if CY 0 00007E02 7306 jnc @F 0 00007E04 FF46FE inc word [bp + ?high_effective_offset] 0 00007E07 050010 add ax, 1000h ; => next 64 KiB 380 @@: 0 00007E0A 8EC0 mov es, ax 0 00007E0C 89D7 mov di, dx ; es:di -> destination 383 .loop: 0 00007E0E E86200 call ll_hex_read_byte ; data byte 0 00007E11 AA stosb ; write it 0 00007E12 85FF test di, di ; past end of 64 KiB segment ? 0 00007E14 750F jnz @F 0 00007E16 8CC7 mov di, es 0 00007E18 81C70010 add di, 1000h ; => next 64 KiB 0 00007E1C 7248 jc ll_hex_error 0 00007E1E 8EC7 mov es, di 0 00007E20 FF46FE inc word [bp + ?high_effective_offset] 393 ; next 64 KiB 0 00007E23 31FF xor di, di ; reset offset 395 @@: 0 00007E25 8B46FE mov ax, word [bp + ?high_effective_offset] 397 0 00007E28 3B46FC cmp ax, word [bp + ?highest + 2] 0 00007E2B 7503 jne @F 0 00007E2D 3B7EFA cmp di, word [bp + ?highest] 401 @@: 0 00007E30 7606 jbe @F 0 00007E32 8946FC mov word [bp + ?highest + 2], ax 0 00007E35 897EFA mov word [bp + ?highest], di 405 ; remember the highest offset after 406 @@: 0 00007E38 E2D4 loop .loop 408 ; after the last data byte there is a checksum 409 ; (which we ignore) 410 ; then a linebreak is expected (ignored too) 0 00007E3A EB89 jmp .find_line_start 412 413 414 .change_high_offset: 0 00007E3C E83400 call ll_hex_read_byte ; MSByte of offset 0 00007E3F 88C6 mov dh, al 0 00007E41 E82F00 call ll_hex_read_byte ; LSByte of offset 0 00007E44 88C2 mov dl, al 0 00007E46 8956F8 mov word [bp + ?highoffset], dx 0 00007E49 E979FF jmp .find_line_start 421 422 423 ll_hex_done: 0 00007E4C B43E mov ah, 3Eh 0 00007E4E CD21 int 21h 0 00007E50 8B46FC mov ax, word [bp + ?highest + 2] 0 00007E53 A3[0000] mov word [reg_ebx], ax 0 00007E56 8B46FA mov ax, word [bp + ?highest] 0 00007E59 A3[0000] mov word [reg_ecx], ax 0 00007E5C 89EC5D lleave , forcerestoresp 0 00007E5F 8E06[0000] mov es, word [pspdbe] 0 00007E63 E928FF jmp ll_copy_cmdline_and_fcbs 433 434 435 ll_hex_error: 0 00007E66 B43E mov ah, 3Eh 0 00007E68 CD21 int 21h 0 00007E6A BA[0000] mov dx, msg.hexerror 0 00007E6D E8[0000] call putsz 0 00007E70 E9[0000] jmp cmd3 441 442 443 ; INP: si -> at next buffered byte, line_out + 1 .. + 256 444 ; bx = file handle 445 ; OUT: al = byte read from two hexits 446 ; si updated 447 ; may jump to ll_hex_error or ll_hex_done instead 448 ; CHG: ah 449 ll_hex_read_byte: 0 00007E73 51 push cx 0 00007E74 52 push dx 0 00007E75 E81800 call ll_hex_read 0 00007E78 E8[0000] nearcall getnyb 0 00007E7B 72E9 jc ll_hex_error 0 00007E7D 88C4 mov ah, al 0 00007E7F E80E00 call ll_hex_read 0 00007E82 E8[0000] nearcall getnyb 0 00007E85 72DF jc ll_hex_error 0 00007E87 B104 mov cl, 4 0 00007E89 D2E4 shl ah, cl 0 00007E8B 08E0 or al, ah 0 00007E8D 5A pop dx 0 00007E8E 59 pop cx 0 00007E8F C3 retn 465 466 467 ; INP: si -> at next buffered byte, line_out + 1 .. + 256 468 ; bx = file handle 469 ; OUT: al = text 470 ; si updated 471 ; may jump to ll_hex_error or ll_hex_done instead 472 ; CHG: cx, dx 473 ll_hex_read: 0 00007E90 50 push ax 0 00007E91 81FE[0001] cmp si, line_out + 256 ; at end of buffer ? 0 00007E95 7517 jne .simple ; not yet --> 477 0 00007E97 B90001 mov cx, 256 ; buffer size 0 00007E9A BA[0000] mov dx, line_out ; -> buffer 0 00007E9D B43F mov ah, 3Fh 0 00007E9F CD21 int 21h 0 00007EA1 72C3 jc ll_hex_error 0 00007EA3 89D6 mov si, dx ; reset -> buffer 0 00007EA5 39C1 cmp cx, ax ; full buffer read ? 0 00007EA7 7405 je .simple ; yes --> 0 00007EA9 93 xchg ax, bx 0 00007EAA C6001A mov byte [si + bx], 1Ah ; insert an EOF after read data 0 00007EAD 93 xchg ax, bx 489 490 .simple: 0 00007EAE 58 pop ax ; preserve ah 0 00007EAF AC lodsb ; al = next text 0 00007EB0 84C0 test al, al ; 0 ? 0 00007EB2 7498 jz ll_hex_done 0 00007EB4 3C1A cmp al, 1Ah ; EOF ? 0 00007EB6 7494 je ll_hex_done ; yes --> 0 00007EB8 C3 retn 498 499 500 ll13: 501 ; file is .EXE or .COM 502 503 ; Previously: adjust .exe size by 200h (who knows why) 504 ; ecm: this is wrong. It needs to be adjusted by the header size, 505 ; which is stored (as number of paragraphs) in the .EXE header. 506 ; The header size is often 200h, but not always. 0 00007EB9 52 push dx 0 00007EBA 50 push ax 509 0 00007EBB B80042 mov ax, 4200h ; lseek set 0 00007EBE 31C9 xor cx, cx 0 00007EC0 31D2 xor dx, dx 0 00007EC2 CD21 int 21h 0 00007EC4 16 push ss 0 00007EC5 1F pop ds 516 0 00007EC6 89E5 mov bp, sp 0 00007EC8 B91C00 mov cx, EXEHEADER_size 0 00007ECB 29CC sub sp, cx 0 00007ECD 89E2 mov dx, sp 0 00007ECF 89E6 mov si, sp 0 00007ED1 B43F mov ah, 3Fh 0 00007ED3 CD21 int 21h 524 525 ; Close the file 0 00007ED5 50 push ax 0 00007ED6 B43E mov ah, 3Eh ; close file 0 00007ED8 CD21 int 21h 0 00007EDA 58 pop ax 530 0 00007EDB 39C8 cmp ax, cx 0 00007EDD 7526 jne .no_exe ; (ax = 0 if empty file) 0 00007EDF 813C4D5A cmp word [si + exeSignature], "MZ" 0 00007EE3 7406 je @F 0 00007EE5 813C5A4D cmp word [si + exeSignature], "ZM" 0 00007EE9 751A jne .no_exe 537 @@: 538 539 ; This possibly should honour the size of the image in pages 540 ; as indicated by the header, instead of the file size. 541 ; Oh well, for now we use the file size (on stack). 0 00007EEB 8B4408 mov ax, [si + exeHeaderSize] 0 00007EEE 31F6 xor si, si 0 00007EF0 B90400 mov cx, 4 545 @@: 0 00007EF3 D1E0 shl ax, 1 0 00007EF5 D1D6 rcl si, 1 0 00007EF7 E2FA loop @B ; si:ax <<= 4 549 0 00007EF9 89EC mov sp, bp 0 00007EFB 5B pop bx 0 00007EFC 5A pop dx 553 0 00007EFD 29C3 sub bx, ax 0 00007EFF 19F2 sbb dx, si ; file size minus header size 556 0 00007F01 B001 mov al, 1 ; indicate nonzero filesize 0 00007F03 EB04 jmp @F 559 560 .no_exe: 0 00007F05 89EC mov sp, bp 0 00007F07 5B pop bx 0 00007F08 5A pop dx ; full file size 564 @@: 565 566 ; Clear registers 567 568 ll14: 0 00007F09 50 push ax ; zero if empty file 0 00007F0A 53 push bx 0 00007F0B 52 push dx 572 ; mov word [reg_ebx], dx 573 ; mov word [reg_ecx], bx 574 575 ;--- cancel current process (unless there is none) 576 ;--- this will also put cpu back in real-mode!!! 577 0 00007F0C E8[0000] call terminate_attached_process 0 00007F0F 7503E9A400 jz ll_attached_unterminated 580 %if _PM 581 call ispm 582 jz ll_still_pm 583 %endif 584 0 00007F14 E8[0000] call zeroregs 586 0 00007F17 8F06[0000] pop word [reg_ebx] 0 00007F1B 8F06[0000] pop word [reg_ecx] 589 590 ; Fix up interrupt vectors in PSP 0 00007F1F BE0E00 mov si, CCIV ; address of original INT 23 and 24 (in PSP) 0 00007F22 BF[0000] mov di, run2324 0 00007F25 A5 movsw 0 00007F26 A5 movsw 0 00007F27 A5 movsw 0 00007F28 A5 movsw 597 598 ; Prior to our report in 2022 May, the FreeDOS kernel 599 ; incorrectly returned NC without loading a process 600 ; when passed a file that is empty (0 byte). Refer 601 ; to https://github.com/FDOS/kernel/issues/70 0 00007F29 58 pop ax ; zero if empty file 0 00007F2A 85C0 test ax, ax 0 00007F2C B00B mov al, 0Bh ; ax = 000Bh (Invalid format) 0 00007F2E 7503E98200 jz ll16 606 607 ; Actual program loading. Use the DOS interrupt. 0 00007F33 B8014B mov ax, 4B01h ; load program 0 00007F36 BA8000 mov dx, DTA ; offset of file to load 0 00007F39 BB[0000] mov bx, execblk ; parameter block 0 00007F3C CD21 int 21h ; load it 0 00007F3E 7275 jc ll16 ; if error 0 00007F40 89E0 mov ax, sp 0 00007F42 2B062E00 sub ax, [SPSAV] 0 00007F46 3D8000 cmp ax, 80h 0 00007F49 7203 jb ll15 ; if in range 0 00007F4B B88000 mov ax, 80h 618 ll15: 0 00007F4E A3[0000] mov word [spadjust], ax 0 00007F51 C436[0000] les si, [execblk.sssp] 0 00007F55 26AD es lodsw ; recover ax 0 00007F57 A3[0000] mov word [reg_eax], ax 0 00007F5A 8936[0000] mov word [reg_esp], si 0 00007F5E 8C06[0000] mov word [reg_ss], es 0 00007F62 C436[0000] les si, [execblk.csip] 0 00007F66 8936[0000] mov word [reg_eip], si 0 00007F6A 8C06[0000] mov word [reg_cs], es 0 00007F6E 16 push ss 0 00007F6F 07 pop es 0 00007F70 E8[0000] call getpsp 0 00007F73 93 xchg ax, bx ; ax = PSP, clobber bx 0 00007F74 A3[0000] mov word [pspdbe], ax 0 00007F77 8026[0200]7F clropt [internalflags], attachedterm 0 00007F7C BF[0000] mov di, reg_ds 0 00007F7F AB stosw 0 00007F80 AF scasw 0 00007F81 AB stosw ; reg_es 0 00007F82 50 push ax 0 00007F83 E8[0000] call setpspdbg 640 641 ; Finish up. Set termination address. 0 00007F86 B82225 mov ax, 2522h ; set interrupt vector 22h 0 00007F89 BA[0000] mov dx, int22 ; ds => lDEBUG_DATA_ENTRY 0 00007F8C CD21 int 21h 0 00007F8E 1F pop ds 0 00007F8F 89160A00 mov word [TPIV], dx 0 00007F93 8C160C00 mov word [TPIV+2], ss ; => lDEBUG_DATA_ENTRY 0 00007F97 16 push ss 0 00007F98 1F pop ds 650 %endif 651 652 ; Set up initial addresses for 'a', 'd', and 'u' commands. 653 adusetup: 0 00007F99 A1[0000] mov ax, word [reg_eip] 0 00007F9C 8B0E[0200] mov cx, word [reg_eip+2] 0 00007FA0 8B1E[0000] mov bx, word [reg_cs] 0 00007FA4 BA[0000] mov dx, var_addr_entries.amount 0 00007FA7 BF[0000] mov di, var_addr_entries 659 660 .loop: 0 00007FAA AB stosw ; IP 662 %if saSegSel == 4 0 00007FAB 890D mov word [di], cx 0 00007FAD AF scasw ; skip this word 665 %endif 0 00007FAE 93 xchg ax, bx 0 00007FAF AB stosw ; CS 668 %if _PM 669 %if SEGADR_size != 10 670 %error Unexpected SEGADR size 671 %endif 672 call ispm 673 jnz .86m 674 .pm: 675 scasw ; skip saSegment 676 stosw ; store saSelector 677 jmp @F 678 .86m: 679 stosw ; store saSegment 680 scasw ; skip saSelector 681 @@: 682 %else 683 %if SEGADR_size == 10 684 %error Unexpected SEGADR size 685 %endif 686 %endif 0 00007FB0 93 xchg ax, bx ; d_addr 688 0 00007FB1 4A dec dx 0 00007FB2 75F6 jnz .loop 0 00007FB4 C3 retn 692 693 %if _APPLICATION || _DEVICE 694 ; Error messages. Print and quit. 695 ll16: 0 00007FB5 E9[0000] jmp ww15 ; print error message 697 698 699 ll_attached_unterminated: 0 00007FB8 E8[0000] call putrunint 0 00007FBB BA[0000] mov dx, msg.ll_unterm 0 00007FBE B81601 mov ax, 0116h 703 %if _PM 704 jmp @F 705 706 ll_still_pm: 707 mov dx, msg.cannotpmload 708 mov ax, 0117h 709 %endif 710 @@: 0 00007FC1 E8[0000] call setrc 0 00007FC4 E8[0000] call putsz 0 00007FC7 E9[0000] jmp cmd3 714 %endif 715 %endif === Trace listing source: ../lst/debug.obj/mm.lst 1 2 %if 0 3 4 lDebug M commands (move, machine type) 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 "mm.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00002486 ???????? eldhSignature: resb 4 ; "ELD1" 0 0000248A ?????? resb 3 ; reserved 0 0000248D ?? resb 1 ; 26 (Ctrl-Z) 0 0000248E ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00002492 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002494 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002496 ???????? eldhDataOffset: resd 1 0 0000249A ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000249C ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000249E ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000024A0 ???????? eldhReserved: resb 4 ; reserved 0 000024A4 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 000024A6 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000024AA ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000024AE ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000024B2 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002486 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000248E ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00002492 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002494 ???? 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 0 00002486 ???? 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 0 00002488 ???? eldltAmount: resw 1 0 0000248A ???????? 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 0 00002486 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00002488 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 0000248A ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000248C ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000248E ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002496 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00002486 ???? eldlSignature: resw 1 ; 0E1D1h 0 00002488 ???????? eldlReserved: resw 2 0 0000248C ???? eldlUseLinkHash: resw 1 0 0000248E ???? eldlDataAmount: resw 1 0 00002490 ???? eldlDataPrefixes: resw 1 0 00002492 ???? eldlDataEntries: resw 1 0 00002494 ???? eldlDataAddresses: resw 1 0 00002496 ???? eldlCodeAmount: resw 1 0 00002498 ???? eldlCodePrefixes: resw 1 0 0000249A ???? eldlCodeEntries: resw 1 0 0000249C ???? 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 0 00002486 ???? ifKeyword: resw 1 0 00002488 ???? ifDescription: resw 1 0 0000248A ???? ifOptions: resw 1 0 0000248C ???? ifValue: resw 1 0 0000248E ???? ifTrying: resw 1 0 00002490 ???? 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 0 00002486 ???????? saOffset: resd 1 0 0000248A ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00002486 ???? so16aOffset: resw 1 0 00002488 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00002486 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00002486 ?????? bsJump: resb 3 0 00002489 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00002486 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00002488 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00002489 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 0000248B ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 0000248C ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000248E ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 00002490 ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 00002491 ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00002493 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00002495 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00002497 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 0000249B ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 0000249F ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 000024A3 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 000024A5 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 000024A7 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 000024AB ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 000024AD ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00002486 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00002487 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00002488 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00002489 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00002498 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00002486 ???????????????? deName: resb 8 0 0000248E ?????? deExt: resb 3 0 00002491 ?? deAttrib: resb 1 0 00002492 ?? dePlusSize: resb 1 0 00002493 ?????????????? resb 7 0 0000249A ???? deClusterHigh: resw 1 0 0000249C ???? deTime: resw 1 0 0000249E ???? deDate: resw 1 0 000024A0 ???? deClusterLow: resw 1 0 000024A2 ???????? 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 0 100002476 ???????? lsvFirstCluster: resd 1 0 10000247A ???????? lsvFATSector: resd 1 0 10000247E ???? lsvFATSeg: resw 1 0 100002480 ???? lsvLoadSeg: resw 1 0 100002482 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100002466 ???? ldMemoryTop: resw 1 0 100002468 ???? ldLoadTop: resw 1 0 10000246A ???? ldSectorSeg: resw 1 0 10000246C ?? ldFATType: resb 1 92 <2> ldFlags: 0 10000246D ?? ldHasLBA: resb 1 0 10000246E ???? ldClusterSize: resw 1 0 100002470 ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100002472 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100002474 ?? .partition: resb 1 ; byte 0 100002475 ?? .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 <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 0 100002456 ???????? ldRootSector: resd 1 0 10000245A ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 10000245C ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 10000245E ???? ldParasLeft: resw 1 0 100002460 ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 100002446 ???????? ldMaxCluster: resd 1 0 10000244A ???????? ldFileSize: resd 1 0 10000244E ???????? ldCurrentCluster: resd 1 0 100002452 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00002486 ???????? liiSignature: resb 4 ; "NLDR" 0 0000248A ???? liiVersion: resb 2 ; "00" 0 0000248C ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000248E ???? liiAmountParagraphs: resw 1 0 00002490 ???????????? liiReserved: resw 3 0 00002496 ???? 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 0 00002498 ???? 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 0 0000249A ???? 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 0 0000249C ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00002486 ???? lpSize: resw 1 0 00002488 ???? lpCount: resw 1 0 0000248A ???????? lpBuffer: resd 1 0 0000248E ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00002486 ?? piBoot: resb 1 0 00002487 ?????? piStartCHS: resb 3 0 0000248A ?? piType: resb 1 0 0000248B ?????? piEndCHS: resb 3 0 0000248E ???????? piStart: resd 1 0 00002492 ???????? 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 0 00002486 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00002488 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 0000248A ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 0000248C ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000248E ???? lsOptions: resw 1 ; option flags 0 00002490 ???? lsSegment: resw 1 ; => where to load file 0 00002492 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00002496 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 0000249A ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 0000249C ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 0000249E ???????????????? 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 0 00002486 ???? exact_struc_at 00h, exeSignature: resw 1 0 00002488 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 0000248A ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 0000248C ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000248E ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 00002490 ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00002492 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00002494 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00002496 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00002498 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 0000249A ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 0000249C ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 0000249E ???? 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. 0 000024A0 ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00002486 ???? ifhHandle: resw 1 0 00002488 ???? ifhFlags: resw 1 0 0000248A ???????? 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 <1> areastrucEntry: resb 24 0 0000249E ???????? areastrucNext: resd 1 0 000024A2 ???????? areastrucPrev: resd 1 0 000024A6 ???? areastrucSubAmount: resw 1 0 000024A8 ???? areastrucSubOffset: resw 1 0 000024AA ???? areastrucFunAmount: resw 1 0 000024AC ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00002486 ???????? areastrucsubLinear: resd 1 0 0000248A ???????? areastrucsubLinearEnd: resd 1 0 0000248E ???? areastrucsubListOffset: resw 1 0 00002490 ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00002486 ???????? areastrucfunLinear: resd 1 0 0000248A ???????? areastrucfunLinearEnd: resd 1 0 0000248E ???? areastrucfunListOffset: resw 1 0 00002490 ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00002486 ???? areastart: resw 1 0 00002488 ???? areaend: resw 1 0 0000248A ???? areamessage: resw 1 0 0000248C ???? 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 0 00002486 ???? 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.) 0 00002488 ???? ivFlags: resw 1 0 0000248A ???? 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. 0 0000248C ???? 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 0 0000248E ?? 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. 0 0000248F ?? 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 0 00002486 ???????? mrLinear: resd 1 0 0000248A ???????? mrOffset: resd 1 0 0000248E ???? mrSegmentSelector: resw 1 0 00002490 ???? mrFlags: resw 1 0 00002492 ???????? 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 0 00002486 ???????? .size_: resd 1 0 0000248A ???? .srchdl: resw 1 0 0000248C ???????? .srcadr: resd 1 0 00002490 ???? .dsthdl: resw 1 0 00002492 ???????? .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 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 23 ------------------ note: usesection lDEBUG_CODE 24 25 %if _LOADER 26 ; INP: bx = how many paragraphs wanted (including image ident) 27 ; OUT: CY if error, 28 ; ax = error code 29 ; ss:dx -> error message (ASCIZ) 30 ; NC if success, 31 ; ax = 0 if no EBDA 32 ; ax = 1 if EBDA present 33 ; dx => image ident address 34 ; bx = rounded up amount paragraphs 35 ; cx = EBDA size in paragraphs 36 ; dx - cx => EBDA destination if ax = 1 37 ; CHG: ax, bx, cx, dx 38 loader_get_resident_address: section_of_function 39 push ds 40 push si 41 push di 42 43 cmp byte [ss:currentposition], 0 44 jne .error_must_be_bottom 45 46 test bx, bx 47 jz .error_empty 48 mov ax, paras(1024) - 1 49 add bx, ax 50 jc .error_oom 51 not ax 52 and bx, ax ; = size in KiB 53 call bootgetmemorysize 54 int 12h 55 mov cl, 6 56 shl ax, cl 57 cmp ax, dx 58 %if _LINK_COMPAT 59 je @F 60 jmp .error_rpl 61 @@: 62 %else 63 jne .error_rpl 64 %endif 65 66 xor cx, cx 67 mov ds, cx 68 cmp word [40Eh], 400h ; have an EBDA ? 69 jb @F 70 cmp word [40Eh], dx 71 jne .error_ebdanottop 72 mov ds, dx 73 xor ax, ax ; ah = 0 74 mov al, byte [0] ; EBDA size in KiB 75 mov cl, 6 76 shl ax, cl 77 mov cx, ax ; cx = EBDA size in paras 78 add dx, ax ; => behind EBDA 79 jc .error_toolargeebda 80 .sub: 81 sub dx, bx 82 jc .error_oom ; if not branching: NC 83 mov ax, 1 84 jmp .done_j1 85 86 @@: 87 sub dx, bx 88 jc .error_oom 89 xor ax, ax ; NC 90 .done_j1: 91 jmp .done 92 93 .error_ebdanottop: 94 mov dx, msg.move_ebdanottop 95 mov ax, 0284h 96 jmp .specificerror 97 98 .error_toolargeebda: 99 mov dx, msg.move_toolargeebda 100 mov ax, 0285h 101 jmp .specificerror 102 103 .error_empty: 104 mov dx, msg.move_empty 105 mov ax, 0291h 106 jmp .specificerror 107 108 .error_must_be_bottom: 109 mov dx, msg.move_must_be_bottom 110 mov ax, 0292h 111 jmp .specificerror 112 113 .error_rpl: 114 mov dx, msg.move_rpl 115 mov ax, 0281h 116 jmp .specificerror 117 118 .error_oom: 119 mov dx, msg.move_oom 120 mov ax, 0283h 121 .specificerror: 122 stc 123 .done: 124 pop di 125 pop si 126 pop ds 127 retn 128 129 130 131 ; INP: bx = how many paragraphs wanted (including image ident) 132 ; OUT: CY if error, 133 ; ax = error code 134 ; ss:dx -> error message (ASCIZ) 135 ; NC if success, 136 ; ax = 0 if no EBDA 137 ; ax = 1 if EBDA present 138 ; dx => image ident address, 139 ; image ident initialised (NEXT00), remainder zeroed 140 ; bx = rounded up amount paragraphs 141 ; cx = EBDA size in paragraphs, 0 if ax = 0 142 ; dx - cx => EBDA destination if ax = 1 143 ; CHG: ax, bx, cx, dx 144 loader_prepare_resident: section_of_function 145 push ds 146 push es 147 push si 148 push di 149 150 call loader_get_resident_address 151 jc .done 152 xor si, si 153 mov ds, si ; ds => IVT, BDA 154 push ax 155 test ax, ax 156 jz .no_ebda 157 push dx 158 mov ax, word [40Eh] ; => EBDA source 159 sub dx, cx ; => EBDA destination 160 call movp ; move EBDA 161 mov word [40Eh], dx ; relocate 162 call .set_memsize ; set mem size to point to EBDA 163 pop dx 164 jmp @F 165 166 .no_ebda: 167 call .set_memsize ; set mem size to point to NEXT image ident 168 @@: 169 push cx 170 push dx 171 172 mov si, bx ; = how many paragraphs to init 173 .loop_init: 174 mov cx, paras(64 * 1024) 175 cmp si, cx ; > 64 KiB left ? 176 jae @F ; yes --> 177 mov cx, si ; no, do remainder only 178 @@: 179 sub si, cx ; si = remainder after this round 180 mov es, dx ; => current chunk 181 add dx, cx ; => next chunk 182 xchg ax, cx ; ax = paragraphs this round 183 mov cl, 3 184 shl ax, cl ; ax = words this round 185 xchg ax, cx ; cx = words this round 186 xor di, di ; es:di -> current chunk 187 xor ax, ax ; ax = 0 188 rep stosw ; init to all-zeroes 189 test si, si ; another round needed ? 190 jnz .loop_init ; yes --> 191 192 pop dx 193 194 mov ds, dx ; => image ident 195 xor si, si 196 mov word [si + liiSignature + 0], "NE" 197 mov word [si + liiSignature + 2], "XT" 198 mov word [si + liiVersion], "00" 199 ; write "NEXT00" 200 mov word [si + liiAmountParagraphs], bx 201 ; write size 202 mov cx, words(16) 203 xor di, di 204 @@: 205 lodsw 206 add di, ax ; add all words (liiChecksum == 0) 207 loop @B 208 neg di ; get checksum 209 mov word [liiChecksum], di 210 ; finish the header 211 pop cx 212 pop ax 213 clc 214 .done: 215 pop di 216 pop si 217 pop es 218 pop ds 219 retn 220 221 .set_memsize: 222 push dx 223 push cx 224 mov cl, 6 225 shr dx, cl 226 mov word [413h], dx 227 pop cx 228 pop dx 229 retn 230 231 232 usesection lDEBUG_DATA_ENTRY 233 234 ; INP: cs => NLDR image ident 235 ; ip = this word field content 236 ; ax = 60h 237 ; OUT: ax => behind memory requested (should be >= 60h) 238 ; CHG: es, ds, di, si, bx, cx, dx 239 ; STT: far called, UP, EI 240 loader_query: 241 cmp ax, 60h 242 jne loader_error 243 add ax, word [cs:liiAmountParagraphs] 244 retf 245 246 247 ; INP: cs => NLDR image ident 248 ; ip = this word field content 249 ; ax = 60h 250 ; OUT: ax => relocated NLDR segment (usually 60h) 251 ; CHG: es, ds, di, si, bx, cx, dx 252 ; STT: far called, UP, EI 253 loader_transfer_relocate: 254 cmp ax, 60h 255 jne loader_error 256 257 push ax 258 push bp 259 mov dx, ss 260 mov bx, sp 261 cli 262 push cs 263 pop ss 264 mov sp, stack_end ; have to run on our stack 265 sti 266 push dx 267 push bx 268 times 1 - (($ - $$) & 1) nop ; align in-code parameter 269 call entry_to_code_seg 270 dw .code 271 272 usesection lDEBUG_CODE 273 .code: 274 push ss 275 pop ds 276 push ss 277 pop es 278 mov bx, movetable.bottom 279 call moveloader.change_no_line 280 281 pop bx 282 pop dx ; -> caller's stack 283 cli 284 mov ss, dx 285 mov sp, bx ; restore caller's stack 286 sti 287 pop bp 288 pop ax ; ax, bp preserved 289 retf 290 291 292 usesection lDEBUG_DATA_ENTRY 293 294 loader_error: 295 mov bx, cs 296 cli 297 mov ss, bx 298 mov sp, stack_end 299 sti 300 mov ds, bx 301 mov es, bx 302 times 1 - (($ - $$) & 1) nop ; align in-code parameter 303 call entry_to_code_seg 304 dw .code 305 306 usesection lDEBUG_CODE 307 .code: 308 mov dx, msg.loader_error 309 mov ax, 011Eh 310 call setrc 311 loader_error_msg: 312 call putsz 313 jmp cmd3 314 315 316 usesection lDEBUG_DATA_ENTRY 317 318 ; INP: es = ds = cs = ss => relocated NLDR 319 ; ip = this word field content 320 ; sp = next word field content 321 ; STT: running as debuggee, UP, EI 322 loader_transfer_cmd3: 323 times 1 - (($ - $$) & 1) nop ; align in-code parameter 324 call entry_to_code_seg 325 dw cmd3 326 327 328 iispentry intr_loader_18, 80h, mm_sharedentry 329 mov dx, int18msg 330 jmp @F 331 mm_sharedentry.hwreset: 332 retf 333 334 iispentry intr_loader_19, 80h, mm_sharedentry 335 mov dx, int19msg 336 @@: 337 mov ax, cs 338 cli 339 mov ss, ax 340 mov sp, stack_end 341 sti 342 mov ds, ax 343 mov es, ax 344 times 1 - (($ - $$) & 1) nop ; align in-code parameter 345 call entry_to_code_seg 346 dw loader_error_msg 347 348 349 usesection lDEBUG_CODE 350 351 moveloader_hook_ints: 352 cmp byte [currentposition], 2 353 jne .ret 354 355 push bx 356 357 mov al, 18h ; interrupt number 358 mov si, intr_loader_18 ; -> IISP entry header 359 mov dx, opt4_int_18_force >> 16 360 %if (opt4_int_18_force >> 16) == dif4_int_18_hooked 361 call cmd3_int_enable.set_bx_to_dx 362 %else 363 mov bx, dif4_int_18_hooked 364 call cmd3_int_enable 365 %endif 366 367 mov al, 19h ; interrupt number 368 mov si, intr_loader_19 ; -> IISP entry header 369 mov dx, opt4_int_19_force >> 16 370 %if (opt4_int_19_force >> 16) == dif4_int_19_hooked 371 call cmd3_int_enable.set_bx_to_dx 372 %else 373 mov bx, dif4_int_19_hooked 374 call cmd3_int_enable 375 %endif 376 377 pop bx 378 379 .ret: 380 retn 381 382 383 ; INP: bx => destination for auxbuff 384 ; OUT: ZR if this destination for auxbuff doesn't cross 385 ; a 64 KiB boundary 386 ; NZ else 387 ; CHG: si, di 388 moveloader_check_auxbuff: 389 mov si, bx ; => auxbuff 390 %if _AUXBUFFSIZE < 8192 391 %error Expected full sector length auxbuff 392 %endif 393 lea di, [si + (8192 >> 4)]; => behind auxbuff (at additional paragraph) 394 and si, 0F000h ; => 64 KiB chunk of first paragraph of auxbuff 395 and di, 0F000h ; => 64 KiB chunk of additional paragraph 396 cmp di, si ; same ? 397 ; ZR if they are the same 398 retn 399 400 401 ; INP: dx => destination 402 ; ax => old source 403 ; cs => old code segment 404 ; cx = delta 405 ; CHG: ax, cx, dx, si, di 406 ; STT: ds = es = ss => source 407 moveloader_auxup: 408 mov ds, dx 409 lframe near 410 lenter 411 lvar word, source 412 push ax 413 lvar word, delta 414 push cx 415 lvar word, destination 416 push dx 417 mov dx, word [auxbuff_current_size] 418 mov cl, 4 419 shr dx, cl 420 lvar word, auxsize 421 push dx 422 %ifn _LINK 423 mov cx, paras(ldebug_code_size + ldebug_code2_size) ; untruncated 424 %else 425 mov cx, relocatedzero + 0 ; untruncated 426 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code, equ $ - 2 427 %endif 428 mov dx, word [auxbuff_segorsel] ; => destination 429 mov ax, word [code_seg] ; => source 430 call movp 431 mov word [code_seg], dx ; update 432 mov es, word [bp + ?source] 433 add dx, cx ; => behind code1+2 434 mov ax, word [es:auxbuff_segorsel] 435 ; => unrelocated auxbuff 436 mov cx, word [bp + ?auxsize] 437 call movp 438 mov word [auxbuff_segorsel], dx 439 push ss 440 pop ds 441 push ss 442 pop es 443 lleave 444 mov dx, msg.move_auxup 445 jmp putsz 446 447 448 moveloader_auxdown: 449 mov ds, dx 450 lframe near 451 lenter 452 lvar word, source 453 push ax 454 lvar word, delta 455 push cx 456 lvar word, destination 457 push dx 458 mov dx, word [auxbuff_current_size] 459 mov cl, 4 460 shr dx, cl 461 lvar word, auxsize 462 push dx 463 mov cx, dx 464 mov dx, word [code_seg] ; => destination 465 mov ax, word [auxbuff_segorsel] ; => source 466 call movp 467 mov word [auxbuff_segorsel], dx ; update 468 mov es, word [bp + ?source] 469 add dx, cx ; => behind aux 470 mov ax, word [es:code_seg] 471 ; => unrelocated code1+2 472 %ifn _LINK 473 mov cx, paras(ldebug_code_size + ldebug_code2_size) ; untruncated 474 %else 475 mov cx, relocatedzero + 0 ; untruncated 476 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code, equ $ - 2 477 %endif 478 call movp 479 mov word [code_seg], dx 480 push ss 481 pop ds 482 push ss 483 pop es 484 lleave 485 mov dx, msg.move_auxdown 486 jmp putsz 487 488 489 moveloader_auxnop: 490 retn 491 492 493 ; INP: ss = ax => old data/entry segment 494 ; dx => new segment (stack and code is usable) 495 ; CHG: si, di, es 496 ; OUT: ds => old segment 497 ; doesn't return if error 498 moveloader_rehook_serial: 499 push bx 500 push cx 501 push ax 502 push dx 503 504 mov ds, ax ; ! => old segment 505 testopt [internalflags4], dif4_int_serial_hooked 506 jz .done_serial 507 call serial_uninstall_interrupt_handler ; CHG si, ax, dx, di, es 508 ; ! es = ss 509 jnc .rehook_serial ; if it succeeded --> 510 511 mov di, msg.serial_cannot_unhook.int 512 mov al, byte [serial_installed_intnum] 513 call hexbyte 514 mov dx, msg.serial_cannot_unhook.nowarn 515 call putsz_error 516 mov dx, msg.move_int_panic 517 call putsz_error 518 mov ax, 011Ch 519 call setrc 520 call near [moveloader_undo] 521 jmp cmd3 522 523 .rehook_serial: 524 ; old segment will be discarded soon, so do not reset these 525 ; setopt [internalflags4], dif4_int_serial_hooked 526 ; call update_inttab_optional 527 528 pop dx ; dx => new segment 529 push dx 530 mov ss, dx ; ! need to run on new stack 531 nop 532 push ds ; => old segment 533 mov ds, dx ; ss = ds => new segment 534 mov es, dx ; harden 535 mov al, byte [serial_installed_intnum] 536 mov si, serial_interrupt_handler 537 call install_86m_interrupt_handler ; CHG: ax, bx, cx, dx 538 pop dx ; => old segment 539 mov ss, dx ; ! careful, return stack frame is on old stack 540 nop 541 mov ds, dx 542 mov es, dx 543 544 .done_serial: 545 546 %if _CATCHINT2D 547 ; ! ds => old segment 548 testopt [internalflags4], dif4_int_2D_hooked 549 jz .done_2D 550 ; call serial_uninstall_interrupt_handler ; CHG si, ax, dx, di, es 551 mov si, int2D 552 mov al, 2Dh 553 mov dx, opt4_int_2D_force >> 16 554 call UnhookInterruptForce 555 jc @F 556 clropt [internalflags4], dif4_int_2D_hooked 557 call update_inttab_optional 558 ; (NC) 559 @@: 560 ; ! es = ss 561 jnc .rehook_2D ; if it succeeded --> 562 563 pop dx 564 push dx ; => new segment 565 mov ds, dx 566 mov es, dx 567 mov ss, dx 568 nop 569 570 testopt [internalflags4], dif4_int_serial_hooked 571 jz .2D_panic_done_serial 572 call serial_uninstall_interrupt_handler ; CHG si, ax, dx, di, es 573 ; ! es = ss 574 jnc .2D_panic_rehook_serial ; if it succeeded --> 575 jmp moveloader.haltmsg ; panic if this happens 576 577 .2D_panic_rehook_serial: 578 pop dx 579 pop ax 580 push ax 581 push dx 582 mov ds, ax 583 mov es, ax 584 mov ss, ax ; => old segment 585 nop 586 587 mov al, byte [serial_installed_intnum] 588 mov si, serial_interrupt_handler 589 call install_86m_interrupt_handler ; CHG: ax, bx, cx, dx 590 ; new segment will be discarded soon, so do not reset these 591 ; there. but do reset them in old segment now ! 592 setopt [internalflags4], dif4_int_serial_hooked 593 call update_inttab_optional 594 .2D_panic_done_serial: 595 596 mov di, msg.serial_cannot_unhook.int 597 mov al, 2Dh 598 call hexbyte 599 mov dx, msg.serial_cannot_unhook.nowarn 600 call putsz_error 601 mov dx, msg.move_int_panic 602 call putsz_error 603 mov ax, 011Dh 604 call setrc 605 call near [moveloader_undo] 606 jmp cmd3 607 608 .rehook_2D: 609 ; old segment will be discarded soon, so do not reset these 610 ; setopt [internalflags4], dif4_int_2D_hooked 611 ; call update_inttab_optional 612 613 pop dx ; dx => new segment 614 push dx 615 mov ss, dx ; ! need to run on new stack 616 nop 617 push ds ; => old segment 618 mov ds, dx ; ss = ds => new segment 619 mov es, dx ; harden 620 mov al, 2Dh 621 mov si, int2D 622 call install_86m_interrupt_handler ; CHG: ax, bx, cx, dx 623 pop dx ; => old segment 624 mov ss, dx ; ! careful, return stack frame is on old stack 625 nop 626 mov ds, dx 627 mov es, dx 628 629 .done_2D: 630 %endif 631 632 pop dx 633 pop ax 634 pop cx 635 pop bx 636 retn 637 638 639 moveloader_check_serial: 640 mov al, byte [serial_installed_intnum] 641 mov si, serial_interrupt_handler 642 push cx ; (make space) 643 mov di, sp ; es:di -> word on stack 644 call hexbyte ; write byte value as text 645 pop cx ; cx = what to write into error message 646 mov dx, opt4_int_serial_force >> 16 647 %if (opt4_int_serial_force >> 16) == dif4_int_serial_hooked 648 call qq_int_unhook_sim.set_bx_to_dx 649 %else 650 mov bx, dif4_int_serial_hooked 651 call qq_int_unhook_sim 652 %endif 653 654 %if _CATCHINT2D 655 mov al, 2Dh 656 mov si, int2D 657 mov cx, "2D" 658 mov dx, opt4_int_2D_force >> 16 659 %if (opt4_int_2D_force >> 16) == dif4_int_2D_hooked 660 call qq_int_unhook_sim.set_bx_to_dx 661 %else 662 mov bx, dif4_int_2D_hooked 663 call qq_int_unhook_sim 664 %endif 665 %endif 666 retn 667 668 669 ; INP: ss => source 670 ; dx => destination 671 ; CHG: ax, cx, si, di, ds, es 672 ; OUT: doesn't return if error 673 ; cx -> code to handle auxbuffer (after entire movp) 674 moveloader_check_dx_destination: 675 push bp 676 push bx 677 push dx 678 679 push ss 680 pop ds 681 push ss 682 pop es 683 xor bp, bp 684 .serial: 685 call moveloader_check_serial 686 687 mov dx, msg.move_int_error 688 mov ax, 0287h 689 test bp, bp 690 jnz .specificerror 691 692 pop dx 693 push dx 694 695 mov ax, ss 696 mov cx, dx 697 sub cx, ax ; cx = dx - ax 698 ; cx + ax = dx 699 mov bx, word [auxbuff_segorsel] ; bx => auxbuff 700 add bx, cx 701 call moveloader_check_auxbuff 702 jz .ret_nop 703 mov dx, word [code_seg] 704 add dx, cx 705 706 cmp dx, bx 707 je .error 708 jb .auxdown ; if cs < aux, put aux to cs 709 .auxup: ; if cs > aux, put aux to aux + cs size 710 %ifn _LINK 711 add bx, paras(ldebug_code_size + ldebug_code2_size) ; untruncated 712 %else 713 add bx, strict word relocatedzero + 0 ; untruncated 714 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code, equ $ - 2 715 %endif 716 call moveloader_check_auxbuff 717 mov cx, moveloader_auxup 718 jz .ret 719 jmp .error 720 721 .auxdown: 722 mov bx, dx 723 call moveloader_check_auxbuff 724 mov cx, moveloader_auxdown 725 jz .ret 726 727 .error: 728 mov dx, msg.move_auxbuff_error 729 mov ax, 0286h 730 .specificerror: 731 jmp moveloader.specificerror 732 733 .ret_nop: 734 mov cx, moveloader_auxnop 735 .ret: 736 pop dx 737 pop bx 738 pop bp 739 retn 740 741 usesection lDEBUG_DATA_ENTRY 742 align 2, db 0 743 moveloader_undo: dw moveloader_undo_noop 744 usesection lDEBUG_CODE 745 746 747 moveloader_undo_ebda_move: 748 xor ax, ax 749 mov ds, ax 750 mov dx, word [40Eh] 751 mov es, dx 752 mov al, byte [es:0] ; EBDA size in KiB 753 mov cl, 6 754 shl ax, cl 755 mov cx, ax ; cx = EBDA size in paras 756 mov ax, dx ; => EBDA source (moved here previously) 757 add dx, [ss:liiAmountParagraphs] 758 ; => EBDA destination 759 call movp ; move EBDA 760 xor ax, ax 761 mov ds, ax 762 mov word [40Eh], dx ; relocate EBDA segment pointer 763 mov cl, 6 764 shr dx, cl 765 mov word [413h], dx ; relocate memory size in KiB 766 push ss 767 pop es 768 push ss 769 pop ds 770 mov word [moveloader_undo], moveloader_undo_noop 771 moveloader_undo_noop: 772 retn 773 774 775 moveloader: 776 call skipcomma 777 call iseol? 778 je .query 779 dec si 780 mov bx, movetable 781 .loop: 782 mov dx, word [bx + mteIdentifier] 783 test dx, dx 784 jz .error 785 call isstring? 786 je .change 787 add bx, MOVETABLEENTRY_size 788 jmp .loop 789 790 .error: 791 jmp error 792 793 .query: 794 mov al, [currentposition] 795 cmp al, 2 796 ja .error 797 mov ah, MOVETABLEENTRY_size 798 mul ah 799 xchg bx, ax 800 mov dx, word [movetable + bx + mteStatusMessage] 801 jmp putsz 802 803 .change: 804 call skipwhite 805 call chkeol 806 .change_no_line: 807 xor ax, ax 808 mov al, [currentposition] 809 cmp al, 2 810 ja .error 811 add ax, ax 812 xchg si, ax 813 mov word [moveloader_undo], moveloader_undo_noop 814 jmp word [bx + mteFromArray + si] 815 816 .already: 817 mov dx, msg.isalready 818 .statusplus: 819 push ss 820 pop ds 821 call putsz 822 mov dx, [bx + mteStatusMessage] 823 inc dx 824 jmp putsz 825 826 827 ; INP: dx => destination 828 ; ss => source 829 ; ss => DATA ENTRY STACK segment 830 ; OUT: es = ds = ss => destination 831 ; cs => destination code segment 832 ; CHG: ax, cx, dx, si, di, es 833 .mov: 834 call moveloader_check_dx_destination 835 push cx 836 mov ax, ss 837 push ax 838 mov cx, [ss:liiAmountParagraphs] 839 call movp ; move entire program (including stack !) 840 mov cx, dx 841 sub cx, ax ; cx = dx - ax 842 ; cx + ax = dx 843 mov ds, dx ; => destination segment 844 mov si, movesegrefstable 845 @@: 846 lodsw 847 test ax, ax ; end of table ? 848 jz @F 849 xchg di, ax ; ds:di -> segment reference 850 add word [di], cx ; fixup 851 jmp @B 852 853 @@: 854 pop ax ; => old position 855 pop di ; -> function to swap auxbuff/code if needed 856 push dx 857 push ax 858 mov ds, ax 859 mov es, ax 860 call di 861 ; INP: dx => destination 862 ; ax = ds = ss = es => old source 863 ; cs => old code segment 864 ; cx = delta 865 ; CHG: ax, cx, dx, si, di 866 pop ax 867 pop dx 868 call moveloader_rehook_serial 869 870 cmp byte [currentposition], 2 871 jne @F 872 push bx 873 push dx 874 875 mov al, 18h ; interrupt number 876 mov si, intr_loader_18 ; -> IISP entry header 877 mov dx, opt4_int_18_force >> 16 878 %if (opt4_int_18_force >> 16) == dif4_int_18_hooked 879 call cmd3_int_disable.set_bx_to_dx 880 %else 881 mov bx, dif4_int_18_hooked 882 call cmd3_int_disable 883 %endif 884 jnc .18done 885 jz .18done 886 887 .haltmsg: 888 mov dx, msg.move_int_panic 889 call putsz 890 .halt: 891 int3 892 sti 893 hlt 894 jmp .halt 895 896 .18done: 897 mov al, 19h ; interrupt number 898 mov si, intr_loader_19 ; -> IISP entry header 899 mov dx, opt4_int_19_force >> 16 900 %if (opt4_int_19_force >> 16) == dif4_int_19_hooked 901 call cmd3_int_disable.set_bx_to_dx 902 %else 903 mov bx, dif4_int_19_hooked 904 call cmd3_int_disable 905 %endif 906 jnc .19done 907 jz .19done 908 jmp .haltmsg 909 910 .19done: 911 pop dx 912 pop bx 913 914 @@: 915 mov ds, dx 916 mov es, dx 917 mov ss, dx ; => new data entry stack segment 918 nop ; ! near return address must be on new stack 919 clropt [internalflags4], dif4_int_18_hooked | dif4_int_19_hooked 920 ; fix the flags in new segment 921 call update_inttab_optional 922 923 push word [code_seg] 924 call .retf 925 mov al, [bx + mteArrayIndex] 926 mov byte [currentposition], al 927 call moveloader_hook_ints 928 retn 929 930 .retf: 931 retf 932 933 .top_to_bottom: 934 mov dx, 60h 935 call .mov 936 mov dx, msg.isnow 937 call .statusplus 938 retn 939 940 .hidden_to_bottom: 941 xor bp, bp 942 943 push bx 944 ; redundant call to find inability early 945 call moveloader_check_serial 946 947 mov al, 18h 948 mov si, intr_loader_18 949 mov cx, "18" 950 mov dx, opt4_int_18_force >> 16 951 %if (opt4_int_18_force >> 16) == dif4_int_18_hooked 952 call qq_int_unhook_sim.set_bx_to_dx 953 %else 954 mov bx, dif4_int_18_hooked 955 call qq_int_unhook_sim 956 %endif 957 958 mov al, 19h 959 mov si, intr_loader_19 960 mov cx, "19" 961 mov dx, opt4_int_19_force >> 16 962 %if (opt4_int_19_force >> 16) == dif4_int_19_hooked 963 call qq_int_unhook_sim.set_bx_to_dx 964 %else 965 mov bx, dif4_int_19_hooked 966 call qq_int_unhook_sim 967 %endif 968 969 mov dx, msg.move_int_error 970 mov ax, 0290h 971 test bp, bp 972 jnz .specificerror 973 pop bx 974 975 call bootgetmemorysize 976 int 12h 977 mov cl, 6 978 shl ax, cl 979 cmp ax, dx 980 %if _LINK_COMPAT 981 je @F 982 jmp .error_rpl 983 @@: 984 %else 985 jne .error_rpl 986 %endif 987 mov cx, ss 988 cmp cx, dx 989 je @F 990 xor ax, ax 991 mov ds, ax ; ! ah = 0 992 cmp word [40Eh], dx 993 jne .error_nottop 994 mov ds, dx 995 mov al, byte [0] ; EBDA size in KiB 996 mov cl, 6 997 shl ax, cl 998 mov cx, ax ; cx = EBDA size in paras 999 add ax, dx 1000 jc .error_oom 1001 push cx 1002 push dx 1003 mov cx, ss 1004 cmp ax, cx 1005 jne .error_nottop 1006 mov dx, 60h 1007 call .mov 1008 pop dx 1009 pop cx 1010 mov ax, dx ; => EBDA 1011 add dx, [liiAmountParagraphs] 1012 call movp 1013 xor ax, ax 1014 mov ds, ax 1015 mov word [40Eh], dx 1016 mov cl, 6 1017 shr dx, cl 1018 mov word [413h], dx 1019 mov dx, msg.isnow 1020 call .statusplus 1021 retn 1022 1023 @@: 1024 mov dx, 60h 1025 call .mov 1026 mov dx, word [liiAmountParagraphs] 1027 mov cl, 6 1028 shr dx, cl 1029 xor ax, ax 1030 mov ds, ax 1031 add word [413h], dx 1032 mov dx, msg.isnow 1033 call .statusplus 1034 retn 1035 1036 .bottom_to_top: 1037 call bootgetmemorysize 1038 sub dx, word [liiAmountParagraphs] 1039 call .mov 1040 mov dx, msg.isnow 1041 call .statusplus 1042 retn 1043 1044 .error_rpl: 1045 mov dx, msg.move_rpl 1046 mov ax, 0281h 1047 jmp .specificerror 1048 1049 .error_nottop: 1050 mov dx, msg.move_nottop 1051 mov ax, 0282h 1052 jmp .specificerror 1053 1054 .error_oom: 1055 mov dx, msg.move_oom 1056 mov ax, 0283h 1057 jmp .specificerror 1058 1059 .error_ebdanottop: 1060 mov dx, msg.move_ebdanottop 1061 mov ax, 0284h 1062 jmp .specificerror 1063 1064 .error_toolargeebda: 1065 mov dx, msg.move_toolargeebda 1066 mov ax, 0285h 1067 jmp .specificerror 1068 1069 .hidden_to_top: 1070 .top_to_hidden: 1071 mov dx, msg.unsupportedmove 1072 mov ax, 0280h 1073 .specificerror: 1074 push ss 1075 pop ds 1076 call setrc 1077 call putsz_error 1078 jmp cmd3 1079 1080 .bottom_to_hidden: 1081 call bootgetmemorysize 1082 int 12h 1083 mov cl, 6 1084 shl ax, cl 1085 cmp ax, dx 1086 %if _LINK_COMPAT 1087 je @F 1088 jmp .error_rpl 1089 @@: 1090 %else 1091 jne .error_rpl 1092 %endif 1093 xor ax, ax 1094 mov ds, ax 1095 cmp word [40Eh], 400h ; have an EBDA ? 1096 jb @F 1097 cmp word [40Eh], dx 1098 jne .error_ebdanottop 1099 mov ds, dx 1100 mov al, byte [0] ; EBDA size in KiB 1101 mov cl, 6 1102 shl ax, cl 1103 mov cx, ax ; cx = EBDA size in paras 1104 add ax, dx ; => behind EBDA 1105 jc .error_toolargeebda 1106 sub ax, [ss:liiAmountParagraphs] 1107 ; => NLDR destination 1108 jc .error_oom 1109 push ax 1110 push cx 1111 push dx 1112 xchg dx, ax 1113 call moveloader_check_dx_destination 1114 pop dx 1115 pop cx 1116 mov ax, dx ; => EBDA source 1117 sub dx, [ss:liiAmountParagraphs] 1118 ; => EBDA destination 1119 jc .error_oom 1120 call movp ; move EBDA 1121 xor ax, ax 1122 mov ds, ax 1123 mov word [40Eh], dx ; relocate EBDA segment pointer 1124 mov cl, 6 1125 shr dx, cl 1126 mov word [413h], dx ; relocate memory size in KiB 1127 pop dx 1128 mov word [ss:moveloader_undo], moveloader_undo_ebda_move 1129 call .mov ; relocate us 1130 mov dx, msg.isnow 1131 call .statusplus 1132 retn 1133 1134 @@: 1135 sub dx, [ss:liiAmountParagraphs] 1136 ; => NLDR destination 1137 jc .error_oom 1138 push dx 1139 call .mov 1140 pop dx 1141 xor ax, ax 1142 mov ds, ax 1143 mov cl, 6 1144 shr dx, cl 1145 mov word [413h], dx ; relocate memory size in KiB 1146 mov dx, msg.isnow 1147 call .statusplus 1148 retn 1149 %endif 1150 1151 1152 ; M command - move from place to place. 1153 ; 1154 ; First check for machine-related M commands. 1155 ; Those are: M, MNC, M?, MC, MC2, MC3, M [one expression] 1156 ; Move M command has more than one expression. 1157 mm: 1158 %if _LOADER 1159 dec si 1160 dec si 1161 mov dx, msg.move 1162 call isstring? 1163 je moveloader 1164 inc si 1165 lodsb 1166 %endif 0 00007FCA 89F1 mov cx, si ; - 1 -> input 0 00007FCC 56 push si 0 00007FCD E8[0000] call iseol? 0 00007FD0 7503E98200 je mc ; no argument, CPU-related M command 0 00007FD5 8A24 mov ah, byte [ si ] 0 00007FD7 50 push ax 0 00007FD8 25DFDF and ax, ~(2020h) 0 00007FDB 3D4E43 cmp ax, "NC" 0 00007FDE 58 pop ax 0 00007FDF 7506 jne @F 0 00007FE1 B9[0100] mov cx, msg.c0 + 1 ; - 1 -> C0 string 0 00007FE4 46 inc si ; skip 'N' 0 00007FE5 EB07 jmp .checkend 1180 1181 @@: 0 00007FE7 3C3F cmp al, '?' 0 00007FE9 7511 jne @F 0 00007FEB B9[0100] mov cx, msg.cr + 1 ; - 1 -> empty string 1185 .checkend: 0 00007FEE E8[0000] call skipwhite ; skip '?' or 'C' (in "NC") 0 00007FF1 E8[0000] call iseol? 0 00007FF4 7461 je mc 0 00007FF6 5E pop si 0 00007FF7 56 push si 0 00007FF8 4E dec si 0 00007FF9 E8[0000] call skipwhite 1193 @@: 0 00007FFC 56 push si 0 00007FFD E8[0000] call prephack 0 00008000 8B1E[0000] mov bx, word [reg_ds] ; get source range 0 00008004 E8[0000] nearcall getaddrX ; just parse an address first 1198 ; Note that valid MC commands allow at most C3h 1199 ; in the expression read here. This must be 1200 ; allowed by this getaddrX call regardless the 1201 ; D/B bit and limit of the ds segment. 1202 ; By using getaddrX here instead of getexpression 1203 ; as previously, we get support for all special 1204 ; cases of address parameters for free. This now 1205 ; includes the single or double dollar sign prefix 1206 ; and also the taken keywords (not previously 1207 ; allowed here). 0 00008007 59 pop cx ; - 1 -> input 0 00008008 E8[0000] call iseol? 0 0000800B 744A je mc ; one argument, CPU-related 1211 1212 ; bx:(e)dx, si, al are already initialised here. 1213 .mm: 0 0000800D 5F pop di ; discard si on stack 1215 1216 ; It is a normal M command (Move) 1217 %if _PM 1218 mov di, getaddr ; second parameter must be writable 1219 %endif 0 0000800E E8[0000] call parsecm_have_address 1221 ; parse arguments (DS:ESI, ES:EDI, ECX) 0 00008011 51 push cx 1223 %if _PM 1224 call ispm 1225 jnz .rm 1226 mov ax, ds 1227 mov cx, es 1228 cmp ax, cx 1229 je .pmsimple ; same selector, simple --> 1230 1231 mov ax, 0006h 1232 mov bx, ds 1233 int 31h ; get selector's base 1234 jc error 1235 push cx 1236 push dx 1237 mov ax, 0006h 1238 mov bx, es 1239 int 31h ; get selector's base 1240 jc error ; throw 1241 cmp byte [ss:bAddr32], 0 1242 je .pm16 1243 [cpu 386] 1244 pop eax 1245 push cx 1246 push dx 1247 pop edx ; mov edx, cxdx 1248 add eax, esi ; add offset to source selector's base 1249 jc error 1250 add edx, edi ; add offset to destination selector's base 1251 jc error ; if overflow (> 4 GiB) --> 1252 cmp eax, edx ; compare linear source to linear destination 1253 jmp short m3 ; and decide whether to move up or down --> 1254 __CPU__ 1255 1256 .rm: 1257 mov ax, ds 1258 mov bx, ds 1259 mov dx, es 1260 mov cl, 12 1261 shr bx, cl 1262 shr dx, cl 1263 push dx 1264 mov dx, es 1265 mov cl, 4 1266 shl ax, cl 1267 shl dx, cl 1268 pop cx 1269 db __TEST_IMM16 ; (skip 2 pop instructions) 1270 1271 .pm16: 1272 pop ax 1273 pop bx 1274 add ax, si 1275 adc bx, byte 0 ; add offset to source selector's base 1276 jc error 1277 add dx, di 1278 adc cx, byte 0 ; add offset to destination selector's base 1279 jc error ; if overflow (> 4 GiB) --> 1280 cmp bx, cx ; compare linear source to linear destination 1281 jne m3 1282 cmp ax, dx 1283 jmp short m3 ; and decide whether to move up or down --> 1284 1285 .pmsimple: 1286 _386_o32 ; cmp esi, edi 1287 cmp si, di 1288 %else 0 00008012 89FA mov dx, di 0 00008014 8CC3 mov bx, es 0 00008016 B104 mov cl, 4 0 00008018 D3EA shr dx, cl 0 0000801A 01DA add dx, bx ; upper 16 bits of destination 0 0000801C 89F0 mov ax, si 0 0000801E D3E8 shr ax, cl 0 00008020 8CDB mov bx, ds 0 00008022 01D8 add ax, bx 0 00008024 39D0 cmp ax, dx 0 00008026 750B jne m3 ; if we know which is larger 0 00008028 89F0 mov ax, si 0 0000802A 240F and al, 0Fh 0 0000802C 89FB mov bx, di 0 0000802E 80E30F and bl, 0Fh 0 00008031 38D8 cmp al, bl 1305 %endif 0 00008033 59 m3: pop cx 0 00008034 9F lahf 0 00008035 1E push ds 0 00008036 06 push es 0 00008037 16 push ss ; ds := cs 0 00008038 1F pop ds 0 00008039 E8[0000] call dohack ; do the interrupt pointer hack 0 0000803C 07 pop es 0 0000803D 1F pop ds 0 0000803E 9E sahf 0 0000803F 730F jae .forward ; if forward copy is OK 1317 _386_PM_o32 0 00008041 01CE add si, cx 1319 _386_PM_o32 0 00008043 01CF add di, cx ; point both behind data 0 00008045 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 1322 1323 1324 numdef AMD_ERRATUM_109_WORKAROUND, 1 1325 ; Refer to comment in init.asm init_movp. 1326 1327 %if _AMD_ERRATUM_109_WORKAROUND 1328 _386_PM_a32 0 00008046 E308 jcxz @FF 1330 _386_PM_o32 0 00008048 83F914 cmp cx, strict byte 20 0 0000804B 7703 ja @FF 1333 @@: 1334 _386_PM_a32 0 0000804D A4 movsb 1336 _386_PM_a32 0 0000804E E2FD loop @B 1338 @@: 1339 %endif 1340 .forward: 1341 _386_PM_a32 0 00008050 F3A4 rep movsb ; do the move 1343 _386_PM_a32 0 00008052 A4 movsb ; one more byte (length of zero means 64 KiB. or 4 GiB..) 1345 .was32: 0 00008053 FC cld ; restore flag 0 00008054 E9[0000] jmp ee0a ; restore segments and undo the interrupt pointer hack 1348 1349 1350 ; Other M command: set machine type. 1351 ; 1352 ; INP: cx -> numeric input (expression 0..6, C, C0, C2, C3) 1353 ; or cx -> EOL 1354 ; word [ss:sp] = to discard 1355 mc: 0 00008057 89CE mov si, cx 0 00008059 5A pop dx ; discard 0 0000805A 4E dec si 0 0000805B E8[0000] call skipwhite ; reload 0 0000805E E8[0000] call iseol? 0 00008061 7460 je mquery ; if just an M or M? (query machine type) --> 0 00008063 E8[0000] nearcall getbyte ; get numeric input 0 00008066 E8[0000] call chkeol ; insure valid 0 00008069 92 xchg ax, dx 0 0000806A 3C06 cmp al, 6 0 0000806C 7725 ja mc_fpu 1367 1368 mc_cpu: 0 0000806E A2[0000] mov byte [machine], al ; set machine type 0 00008071 A2[0000] mov byte [mach_87], al ; coprocessor type, too 1371 1372 mc_encode: 0 00008074 803E[0000]00 cmp byte [has_87], 0 0 00008079 B0C0 mov al, 0C0h 0 0000807B 7412 je .done 0 0000807D 803E[0000]03 cmp byte [machine], 3 0 00008082 B00C mov al, 0Ch 0 00008084 7509 jne .done 0 00008086 803E[0000]02 cmp byte [mach_87], 2 0 0000808B 7502 jne .done 0 0000808D B0C2 mov al, 0C2h 1382 .done: 0 0000808F A2[0000] mov byte [encodedmach87], al 0 00008092 C3 retn 1385 1386 mc_fpu: 0 00008093 8A26[0000] mov ah, byte [machine] 0 00008097 3C0C cmp al, 0Ch ; MC command ? 0 00008099 741D je mcc_ah 0 0000809B 3CC0 cmp al, 0C0h ; MC0 command or MNC command ? 0 0000809D 7410 je mnc 0 0000809F 80FC03 cmp ah, 3 ; MC2 or MC3 only valid for machine 386 0 000080A2 7508 jne .error 0 000080A4 3CC2 cmp al, 0C2h ; MC2 command ? 0 000080A6 740E je mcc_2 0 000080A8 3CC3 cmp al, 0C3h ; MC3 command ? 0 000080AA 740C je mcc_3 ; (ah = 3) 1398 .error: ; invalid input 0 000080AC E9[0000] jmp error 1400 1401 mnc: 0 000080AF C606[0000]00 mov byte [has_87], 0 ; clear coprocessor flag 0 000080B4 EBBE jmp mc_encode ; done 1404 1405 mcc_2: 0 000080B6 B402 mov ah, 2 ; set type to 287 1407 mcc_3: ; (if jumping here ah = 3) set type to 387 1408 mcc_ah: 0 000080B8 C606[0000]01 mov byte [has_87], 1 ; set coprocessor flag 0 000080BD 8826[0000] mov byte [mach_87], ah ; set coprocessor type 0 000080C1 EBB1 jmp mc_encode ; done 1412 1413 1414 ; Display machine type. 1415 mquery: 0 000080C3 BE[0000] mov si, msg8088 0 000080C6 A0[0000] mov al, byte [machine] 0 000080C9 3C00 cmp al, 0 0 000080CB 7407 je .88or86 ; if 8088 0 000080CD BE[0000] mov si, msgx86 0 000080D0 0430 add al, '0' 0 000080D2 8804 mov byte [si], al 1423 .88or86: 0 000080D4 E8[0000] call showstring 0 000080D7 BE[0000] mov si, no_copr 0 000080DA 803E[0000]00 cmp byte [has_87], 0 0 000080DF 740F je .m12 ; if no coprocessor 0 000080E1 BE[0000] mov si, has_copr 0 000080E4 A0[0000] mov al, byte [mach_87] 0 000080E7 3A06[0000] cmp al, byte [machine] 0 000080EB 7403 je .m12 ; if has coprocessor same as processor 0 000080ED BE[0000] mov si, has_287 1433 .m12: 0 000080F0 E8[0000] call showstring ; show string 0 000080F3 E9[0000] jmp putsline_crlf ; call puts and quit === Trace listing source: ../lst/debug.obj/msg.lst 1 %if 0 2 3 lDebug messages 4 5 Copyright (C) 1995-2003 Paul Vojta 6 Copyright (C) 2008-2026 E. C. Masloch 7 8 Usage of the works is permitted provided that this 9 instrument is retained with the works, so that any entity 10 that uses the works is notified of this instrument. 11 12 DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 14 %endif 15 16 %define SOURCEFILENAME "msg.asm" 17 %ifidni __OUTPUT_FORMAT__, obj 18 %include "debug.mac" 1 <1> [list -] 14 <3> [list -] 14 <2> [list -] 86 <1> [list -] 86 ------------------ <1> note: Disable usesection detection === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00002488 ???????? eldhSignature: resb 4 ; "ELD1" 0 0000248C ?????? resb 3 ; reserved 0 0000248F ?? resb 1 ; 26 (Ctrl-Z) 0 00002490 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00002494 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002496 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002498 ???????? eldhDataOffset: resd 1 0 0000249C ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000249E ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000024A0 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000024A2 ???????? eldhReserved: resb 4 ; reserved 0 000024A6 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 000024A8 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000024AC ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000024B0 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000024B4 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002488 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00002490 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00002494 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002496 ???? 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 0 00002488 ???? 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 0 0000248A ???? eldltAmount: resw 1 0 0000248C ???????? 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 0 00002488 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 0000248A ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 0000248C ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000248E ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00002490 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002498 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00002488 ???? eldlSignature: resw 1 ; 0E1D1h 0 0000248A ???????? eldlReserved: resw 2 0 0000248E ???? eldlUseLinkHash: resw 1 0 00002490 ???? eldlDataAmount: resw 1 0 00002492 ???? eldlDataPrefixes: resw 1 0 00002494 ???? eldlDataEntries: resw 1 0 00002496 ???? eldlDataAddresses: resw 1 0 00002498 ???? eldlCodeAmount: resw 1 0 0000249A ???? eldlCodePrefixes: resw 1 0 0000249C ???? eldlCodeEntries: resw 1 0 0000249E ???? 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 0 00002488 ???? ifKeyword: resw 1 0 0000248A ???? ifDescription: resw 1 0 0000248C ???? ifOptions: resw 1 0 0000248E ???? ifValue: resw 1 0 00002490 ???? ifTrying: resw 1 0 00002492 ???? 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 0 00002488 ???????? saOffset: resd 1 0 0000248C ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00002488 ???? so16aOffset: resw 1 0 0000248A ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00002488 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00002488 ?????? bsJump: resb 3 0 0000248B ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00002488 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 0000248A ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 0000248B ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 0000248D ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 0000248E ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 00002490 ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 00002492 ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 00002493 ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00002495 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00002497 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00002499 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 0000249D ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 000024A1 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 000024A5 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 000024A7 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 000024A9 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 000024AD ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 000024AF ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00002488 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00002489 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 0000248A ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 0000248B ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 0000249A ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00002488 ???????????????? deName: resb 8 0 00002490 ?????? deExt: resb 3 0 00002493 ?? deAttrib: resb 1 0 00002494 ?? dePlusSize: resb 1 0 00002495 ?????????????? resb 7 0 0000249C ???? deClusterHigh: resw 1 0 0000249E ???? deTime: resw 1 0 000024A0 ???? deDate: resw 1 0 000024A2 ???? deClusterLow: resw 1 0 000024A4 ???????? 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 0 100002478 ???????? lsvFirstCluster: resd 1 0 10000247C ???????? lsvFATSector: resd 1 0 100002480 ???? lsvFATSeg: resw 1 0 100002482 ???? lsvLoadSeg: resw 1 0 100002484 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100002468 ???? ldMemoryTop: resw 1 0 10000246A ???? ldLoadTop: resw 1 0 10000246C ???? ldSectorSeg: resw 1 0 10000246E ?? ldFATType: resb 1 92 <2> ldFlags: 0 10000246F ?? ldHasLBA: resb 1 0 100002470 ???? ldClusterSize: resw 1 0 100002472 ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100002474 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100002476 ?? .partition: resb 1 ; byte 0 100002477 ?? .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 <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 0 100002458 ???????? ldRootSector: resd 1 0 10000245C ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 10000245E ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 100002460 ???? ldParasLeft: resw 1 0 100002462 ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 100002448 ???????? ldMaxCluster: resd 1 0 10000244C ???????? ldFileSize: resd 1 0 100002450 ???????? ldCurrentCluster: resd 1 0 100002454 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00002488 ???????? liiSignature: resb 4 ; "NLDR" 0 0000248C ???? liiVersion: resb 2 ; "00" 0 0000248E ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 00002490 ???? liiAmountParagraphs: resw 1 0 00002492 ???????????? liiReserved: resw 3 0 00002498 ???? 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 0 0000249A ???? 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 0 0000249C ???? 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 0 0000249E ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00002488 ???? lpSize: resw 1 0 0000248A ???? lpCount: resw 1 0 0000248C ???????? lpBuffer: resd 1 0 00002490 ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00002488 ?? piBoot: resb 1 0 00002489 ?????? piStartCHS: resb 3 0 0000248C ?? piType: resb 1 0 0000248D ?????? piEndCHS: resb 3 0 00002490 ???????? piStart: resd 1 0 00002494 ???????? 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 0 00002488 ???? lsKernelName: resw 1 ; -> kernel file default name 0 0000248A ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 0000248C ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 0000248E ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 00002490 ???? lsOptions: resw 1 ; option flags 0 00002492 ???? lsSegment: resw 1 ; => where to load file 0 00002494 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00002498 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 0000249C ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 0000249E ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 000024A0 ???????????????? 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 0 00002488 ???? exact_struc_at 00h, exeSignature: resw 1 0 0000248A ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 0000248C ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 0000248E ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 00002490 ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 00002492 ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00002494 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00002496 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00002498 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 0000249A ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 0000249C ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 0000249E ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 000024A0 ???? 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. 0 000024A2 ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00002488 ???? ifhHandle: resw 1 0 0000248A ???? ifhFlags: resw 1 0 0000248C ???????? 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 <1> areastrucEntry: resb 24 0 000024A0 ???????? areastrucNext: resd 1 0 000024A4 ???????? areastrucPrev: resd 1 0 000024A8 ???? areastrucSubAmount: resw 1 0 000024AA ???? areastrucSubOffset: resw 1 0 000024AC ???? areastrucFunAmount: resw 1 0 000024AE ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00002488 ???????? areastrucsubLinear: resd 1 0 0000248C ???????? areastrucsubLinearEnd: resd 1 0 00002490 ???? areastrucsubListOffset: resw 1 0 00002492 ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00002488 ???????? areastrucfunLinear: resd 1 0 0000248C ???????? areastrucfunLinearEnd: resd 1 0 00002490 ???? areastrucfunListOffset: resw 1 0 00002492 ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00002488 ???? areastart: resw 1 0 0000248A ???? areaend: resw 1 0 0000248C ???? areamessage: resw 1 0 0000248E ???? 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 0 00002488 ???? 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.) 0 0000248A ???? ivFlags: resw 1 0 0000248C ???? 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. 0 0000248E ???? 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 0 00002490 ?? 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. 0 00002491 ?? 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 0 00002488 ???????? mrLinear: resd 1 0 0000248C ???????? mrOffset: resd 1 0 00002490 ???? mrSegmentSelector: resw 1 0 00002492 ???? mrFlags: resw 1 0 00002494 ???????? 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 0 00002488 ???????? .size_: resd 1 0 0000248C ???? .srchdl: resw 1 0 0000248E ???????? .srcadr: resd 1 0 00002492 ???? .dsthdl: resw 1 0 00002494 ???????? .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 19 %endif 20 21 22 numdef LZEXEDAT, 0 23 24 %if _MESSAGESEGMENT 25 %define usemessagesegment hiddenusesection MESSAGESEGMENT 26 %else 27 %define usemessagesegment hiddenusesection lDEBUG_DATA_ENTRY 28 %endif 29 30 %define MESSAGE_INLINE 1 31 32 %if _HELP_EXTERNAL && _HELP_COMPRESSED 33 %imacro helppage 1-2 34 %defstr %%basename %1 35 %if _LZEXEDAT 36 %strcat %%includename %%basename, ".hlz" 37 %else 38 %strcat %%includename %%basename, ".hhs" 39 %endif 40 align 2, db 0 41 %00: 42 dw %%end - %%start 43 %%start: 44 incbin %%includename 45 %%end: 46 %endmacro 47 %elif _HELP_EXTERNAL 48 %imacro helppage 1-2 0 49 %defstr %%basename %1 50 %strcat %%includename %%basename, ".txt" 51 %00: 52 incbin %%includename 53 %ifn %2 54 asciz 55 %endif 56 %endmacro 57 %else 58 %imacro helppage 1-2 0 59 %defstr %%basename %1 60 %strcat %%includename "help/", %%basename, ".asm" 61 %00: 62 %include %%includename 63 %ifn %2 64 asciz 65 %endif 66 %endmacro 67 %endif 68 69 70 %if _ELDLINKINFO 71 usemessagesegment === Switch to base=008120h -> "MESSAGESEGMENT" 71 ------------------ note: usesection MESSAGESEGMENT 72 %include "linkinfo.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> Extensions for lDebug link info 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> 17 <1> %if _LINKHASH 18 <1> %include "nasmhash.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Hashing macros 5 <2> by E. C. Masloch, 2019 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 __NASMHASH_MAC__ 16 <2> %assign __NASMHASH_MAC__ 1 17 <2> 18 <2> 19 <2> %macro hashdef 2+.nolist 20 <2> %ifempty %2 21 <2> %assign _%1 1 22 <2> %else 23 <2> %ifstr %2 24 <2> %define %%string %2 25 <2> %elifid %2 26 <2> %defstr %%string %2 27 <2> %elifnum %2 28 <2> %defstr %%string %2 29 <2> %eliftok %2 30 <2> %defstr %%string %2 31 <2> %else 32 <2> %error Unknown input 33 <2> %endif 34 <2> %strlen %%length %%string 35 <2> %assign %%hash 1 36 <2> %assign %%index 1 37 <2> %rep %%length 38 <2> %substr %%char %%string %%index 39 <2> %assign %%hash (%%hash * 31 + %%char) & 0FFFFh 40 <2> %assign %%index %%index + 1 41 <2> %endrep 42 <2> %assign _%1 %%hash 43 <2> %endif 44 <2> %endmacro 45 <2> 46 <2> 47 <2> %endif 19 <1> %endif 20 <1> 21 <1> %define LINKINFO_DATA_PREFIXES "" 22 <1> %define LINKINFO_DATA_ENTRIES "" 23 <1> %define LINKINFO_DATA_ADDRESSES "" 24 <1> %define LINKINFO_DATA_MESSAGES db "" 25 <1> %assign LINKINFO_DATA_AMOUNT 0 26 <1> 27 <1> %imacro linkinfo_data 1-*.nolist 28 <1> %rep %0 29 <1> linkinfo_data_as %1, %1 30 <1> %rotate 1 31 <1> %endrep 32 <1> %endmacro 33 <1> 34 <1> %imacro linkinfo_data_as 2.nolist 35 <1> %push 36 <1> %ifstr %1 37 <1> %xdefine %$string %1 38 <1> %define %$token %%token 39 <1> %else 40 <1> %defstr %$string %1 41 <1> %xdefine %$token %1 42 <1> %endif 43 <1> %ifn _LINKHASH 44 <1> %substr %$prefix %$string 1, 2 45 <1> %substr %$suffix %$string 3, -1 46 <1> %strlen %$length %$string 47 <1> %if %$length < 2 48 <1> %fatal Too short link info data name 49 <1> %endif 50 <1> %if %$length > 63 + 2 51 <1> %fatal Too long link info data name 52 <1> %endif 53 <1> %xdefine LINKINFO_DATA_PREFIXES LINKINFO_DATA_PREFIXES, %$prefix 54 <1> %xdefine LINKINFO_DATA_ENTRIES LINKINFO_DATA_ENTRIES, %%message_%[%$token] 55 <1> %xdefine LINKINFO_DATA_ADDRESSES LINKINFO_DATA_ADDRESSES, %2 56 <1> %xdefine LINKINFO_DATA_MESSAGES LINKINFO_DATA_MESSAGES, %%message_%[%$token]:, {counted %$suffix} 57 <1> %else 58 <1> %xdefine %$suffix %$string 59 <1> hashdef HASH, %$string 60 <1> %strlen %$length %$string 61 <1> %if %$length > 63 + 2 62 <1> %fatal Too long link info data name 63 <1> %endif 64 <1> %xdefine LINKINFO_DATA_PREFIXES LINKINFO_DATA_PREFIXES, _HASH 65 <1> %xdefine LINKINFO_DATA_ENTRIES LINKINFO_DATA_ENTRIES, %%message_%[%$token] 66 <1> %xdefine LINKINFO_DATA_ADDRESSES LINKINFO_DATA_ADDRESSES, %2 67 <1> %xdefine LINKINFO_DATA_MESSAGES LINKINFO_DATA_MESSAGES, %%message_%[%$token]:, {counted %$suffix} 68 <1> %endif 69 <1> %assign LINKINFO_DATA_AMOUNT LINKINFO_DATA_AMOUNT + 1 70 <1> %rotate 1 71 <1> %pop 72 <1> %endmacro 73 <1> 74 <1> 75 <1> %define LINKINFO_CODE_PREFIXES "" 76 <1> %define LINKINFO_CODE_ENTRIES "" 77 <1> %define LINKINFO_CODE_ADDRESSES "" 78 <1> %define LINKINFO_CODE_MESSAGES db "" 79 <1> %assign LINKINFO_CODE_AMOUNT 0 80 <1> 81 <1> %imacro linkinfo_code 1-*.nolist 82 <1> %rep %0 83 <1> linkinfo_code_as %1, %1 84 <1> %rotate 1 85 <1> %endrep 86 <1> %endmacro 87 <1> 88 <1> %imacro linkinfo_code_as 2.nolist 89 <1> %push 90 <1> %if LINKINFO_CODE_SEGMENT == 0 91 <1> %define %$section lDEBUG_CODE 92 <1> %elif LINKINFO_CODE_SEGMENT == 1 93 <1> %define %$section lDEBUG_CODE2 94 <1> %elif LINKINFO_CODE_SEGMENT == 2 95 <1> %define %$section lDEBUG_DATA_ENTRY 96 <1> %else 97 <1> %fatal Unknown link info code section 98 <1> %endif 99 <1> %ifndef SECTION_OF_%2 100 <1> %error No section specified for link symbol %1 101 <1> %elifnidni SECTION_OF_%2, %$section 102 <1> %error Wrong section for link symbol %1: section_of=SECTION_OF_%1, current=%$section 103 <1> %endif 104 <1> %ifstr %1 105 <1> %xdefine %$string %1 106 <1> %define %$token %%token 107 <1> %else 108 <1> %defstr %$string %1 109 <1> %xdefine %$token %1 110 <1> %endif 111 <1> %ifn _LINKHASH 112 <1> %substr %$prefix %$string 1, 2 113 <1> %substr %$suffix %$string 3, -1 114 <1> %strlen %$length %$string 115 <1> %if %$length < 2 116 <1> %fatal Too short link info code name 117 <1> %endif 118 <1> %if %$length > 63 + 2 119 <1> %fatal Too long link info code name 120 <1> %endif 121 <1> %xdefine LINKINFO_CODE_PREFIXES LINKINFO_CODE_PREFIXES, %$prefix 122 <1> %xdefine LINKINFO_CODE_ENTRIES LINKINFO_CODE_ENTRIES, %%message_%[%$token] 123 <1> %xdefine LINKINFO_CODE_ADDRESSES LINKINFO_CODE_ADDRESSES, %2, LINKINFO_CODE_SEGMENT 124 <1> %xdefine LINKINFO_CODE_MESSAGES LINKINFO_CODE_MESSAGES, %%message_%[%$token]:, {counted %$suffix} 125 <1> %else 126 <1> %xdefine %$suffix %$string 127 <1> hashdef HASH, %$string 128 <1> %strlen %$length %$string 129 <1> %if %$length > 63 + 2 130 <1> %fatal Too long link info code name 131 <1> %endif 132 <1> %xdefine LINKINFO_CODE_PREFIXES LINKINFO_CODE_PREFIXES, _HASH 133 <1> %xdefine LINKINFO_CODE_ENTRIES LINKINFO_CODE_ENTRIES, %%message_%[%$token] 134 <1> %xdefine LINKINFO_CODE_ADDRESSES LINKINFO_CODE_ADDRESSES, %2, LINKINFO_CODE_SEGMENT 135 <1> %xdefine LINKINFO_CODE_MESSAGES LINKINFO_CODE_MESSAGES, %%message_%[%$token]:, {counted %$suffix} 136 <1> %endif 137 <1> %assign LINKINFO_CODE_AMOUNT LINKINFO_CODE_AMOUNT + 1 138 <1> %pop 139 <1> %endmacro 140 <1> 141 <1> 142 <1> %imacro dump_linkinfo_messages 1-*.nolist 143 <1> %rep %0 144 <1> %1 145 <1> %rotate 1 146 <1> %endrep 147 <1> %endmacro 148 <1> 149 <1> 150 <1> %if _MESSAGESEGMENT 151 <1> %if _PM 152 <1> linksel equ messagesel 153 <1> %else 154 <1> linksel equ linkseg 155 <1> %endif 156 <1> linkseg equ messageseg 157 <1> %else 158 <1> %if _PM 159 <1> linksel equ dssel 160 <1> %else 161 <1> linksel equ linkseg 162 <1> %endif 163 <1> linkseg equ pspdbg 164 <1> %endif 165 <1> 166 <1> linkinfo_data linksel 167 <1> linkinfo_data linkseg 168 <1> linkinfo_data linkinfoaddress 169 <1> linkinfo_data linkcall_table 170 <1> linkinfo_data extseg, extcssel, extdssel, extseg_size, extseg_used 171 <1> linkinfo_data extdata, extdata_size, extdata_used 172 <1> linkinfo_data pspdbg 173 <1> %if !_LOADER 174 <1> linkinfo_data pspdbe 175 <1> %endif 176 <1> %ifn _LINK 177 <1> %ifn _PM 178 <1> dssel equ pspdbg 179 <1> %endif 180 <1> %endif 181 <1> linkinfo_data dssel 182 <1> %if _PM 183 <1> linkinfo_data cssel 184 <1> %if !_LOADER 185 <1> linkinfo_data code_sel 186 <1> %if _DUALCODE 187 <1> linkinfo_data code2_sel 188 <1> %endif 189 <1> %else 190 <1> linkinfo_data_as code_movable_sel, code_sel 191 <1> %if _DUALCODE 192 <1> linkinfo_data_as code2_movable_sel, code2_sel 193 <1> %endif 194 <1> %endif 195 <1> %if _MESSAGESEGMENT 196 <1> linkinfo_data messagesel 197 <1> %endif 198 <1> %endif 199 <1> linkinfo_data internalflags 200 <1> linkinfo_data internalflags2 201 <1> linkinfo_data internalflags3 202 <1> linkinfo_data internalflags4 203 <1> linkinfo_data internalflags5 204 <1> linkinfo_data internalflags6 205 <1> linkinfo_data internalflags7 206 <1> linkinfo_data options 207 <1> linkinfo_data options2 208 <1> linkinfo_data options3 209 <1> linkinfo_data options4 210 <1> linkinfo_data options5 211 <1> linkinfo_data options6 212 <1> linkinfo_data options7 213 <1> linkinfo_data lastcmd 214 <1> linkinfo_data line_in, line_in.end, line_out, line_out_end 215 <1> %if !_LOADER 216 <1> linkinfo_data auxbuff_segorsel 217 <1> linkinfo_data auxbuff_current_size, auxbuff_current_size_minus_24 218 <1> %else 219 <1> linkinfo_data_as auxbuff_movable_segorsel, auxbuff_segorsel 220 <1> linkinfo_data_as auxbuff_movable_current_size, auxbuff_current_size 221 <1> linkinfo_data_as auxbuff_movable_current_size_minus_24, auxbuff_current_size_minus_24 222 <1> %endif 223 <1> %if !_LOADER 224 <1> linkinfo_data firstmcb, firstumcb 225 <1> %endif 226 <1> linkinfo_data msg.install, msg.uninstall, msg.run 227 <1> linkinfo_data entryseg_size, messageseg, messageseg_size 228 <1> %if !_LOADER 229 <1> linkinfo_data code_seg, code_size 230 <1> %if _DUALCODE 231 <1> linkinfo_data code2_seg, code2_size 232 <1> %endif 233 <1> %else 234 <1> linkinfo_data_as code_movable_seg, code_seg 235 <1> linkinfo_data_as code_movable_size, code_size 236 <1> %if _DUALCODE 237 <1> linkinfo_data_as code2_movable_seg, code2_seg 238 <1> linkinfo_data_as code2_movable_size, code2_size 239 <1> %endif 240 <1> %endif 241 <1> %if !_LOADER 242 <1> linkinfo_data auxbuff_segment, auxbuff_current_size 243 <1> %else 244 <1> linkinfo_data_as auxbuff_movable_segment, auxbuff_segment 245 <1> linkinfo_data_as auxbuff_movable_current_size, auxbuff_current_size 246 <1> %endif 247 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 248 <1> linkinfo_data history_segment, historyseg_size 249 <1> %endif 250 <1> %if _PM 251 <1> auxbuff_segment equ auxbuff_segorsel + soaSegment 252 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 253 <1> history_segment equ history.segorsel + soaSegment 254 <1> %endif 255 <1> %else 256 <1> auxbuff_segment equ auxbuff_segorsel 257 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 258 <1> history_segment equ history.segorsel 259 <1> %endif 260 <1> %endif 261 <1> %if _APP_ENV_SIZE || _DEV_ENV_SIZE || _BOOT_ENV_SIZE 262 <1> linkinfo_data envseg, env_size 263 <1> %endif 264 <1> linkinfo_data alloc_seg, alloc_size 265 <1> %if !_LOADER 266 <1> linkinfo_data next_reserved_segment, alloc_size_not_reserved, reserved_address 267 <1> %endif 268 <1> %if _HISTORY 269 <1> %if _HISTORY_SEPARATE_FIXED 270 <1> historyformat equ 2 271 <1> linkinfo_data history.segorsel 272 <1> %else 273 <1> historyformat equ 1 274 <1> linkinfo_data historybuffer 275 <1> linkinfo_data historybuffer.end 276 <1> %endif 277 <1> linkinfo_data history.first 278 <1> linkinfo_data history.last 279 <1> %else 280 <1> historyformat equ 0 281 <1> %endif 282 <1> linkinfo_data historyformat 283 <1> linkinfo_data stack, stack_end 284 <1> linkinfo_data ext_command_handler, ext_inject_handler, savesp, throwsp 285 <1> linkinfo_data ext_preprocess_handler, ext_puts_handler 286 <1> linkinfo_data ext_puts_copyoutput_handler 287 <1> %if _EXT_PUTS_GETLINE 288 <1> linkinfo_data ext_puts_getline_handler 289 <1> %endif 290 <1> %if !_LOADER 291 <1> linkinfo_data ext_aa_before_getline_handler 292 <1> linkinfo_data ext_aa_inject_handler 293 <1> linkinfo_data ext_aa_after_getline_handler 294 <1> %endif 295 <1> %if _CATCHINT2D 296 <1> linkinfo_data ext_amis_handler 297 <1> linkinfo_data amis_multiplex_number 298 <1> %endif 299 <1> linkinfo_data try_debugger_amis_multiplex_number 300 <1> linkinfo_data msg.in, lastcmd 301 <1> %if !_LOADER 302 <1> linkinfo_data firstmcb, firstumcb 303 <1> %endif 304 <1> linkinfo_data dpmi32 305 <1> linkinfo_data lastcmd_transfer_ext_address 306 <1> linkinfo_data lastcmd_transfer_ext_entry ; (not actually data but need it) 307 <1> linkinfo_data dmycmd ; (not actually data but need it) 308 <1> linkinfo_data has_87 309 <1> %if _MMXSUPP 310 <1> linkinfo_data has_mmx 311 <1> %endif 312 <1> linkinfo_data installflags, installformat 313 <1> linkinfo_data reg_eax, reg_ecx, reg_edx, reg_ebx, reg_esp, reg_ebp 314 <1> linkinfo_data reg_esi, reg_edi, reg_efl, reg_eip, reg_cs, reg_ds 315 <1> linkinfo_data reg_ss, reg_es, reg_fs, reg_gs 316 <1> linkinfo_data msg.not, msg.then 317 <1> %if _EXTENSIONS && _EXT_VARIABLES 318 <1> linkinfo_data ext_var, ext_var_amount, ext_var_format, ext_var_size 319 <1> linkinfo_data isvariable_morebyte_nameheaders.ext 320 <1> linkinfo_data var_ext_setup ; (not actually data) 321 <1> %endif 322 <1> linkinfo_data ext_handle 323 <1> linkinfo_data near_transfer_ext_entry ; not actually data 324 <1> linkinfo_data near_transfer_ext_address 325 <1> %if _BOOTLDR 326 <1> linkinfo_data load_data_lowest, load_data 327 <1> linkinfo_data load_yyname_input 328 <1> linkinfo_data handle_scan_dir_entry, handle_scan_dir_not_found 329 <1> linkinfo_data ..@boot_scan_dir_return_filenotfound ; not actually data 330 <1> linkinfo_data ..@boot_scan_dir_return_subdir_or_fat32_entry ; not actually data 331 <1> linkinfo_data ..@boot_scan_dir_return_fat16_root_entry ; not actually data 332 <1> linkinfo_data scan_dir_entry ; not actually data 333 <1> linkinfo_data load_check_dir_attr 334 <1> linkinfo_data load_yyname_next 335 <1> linkinfo_data load_yy_direntry 336 <1> linkinfo_data load_kernel_name 337 <1> linkinfo_data load_adr_dirbuf_segment 338 <1> %endif 339 <1> %if !_LOADER 340 <1> linkinfo_data execblk.cmdline 341 <1> %endif 342 <1> %if _CONFIG 343 <1> linkinfo_data configpath, configpath.dir_end 344 <1> linkinfo_data scriptspath, scriptspath.dir_end 345 <1> %endif 346 <1> build_option_PM equ !!_PM 347 <1> linkinfo_data build_option_PM 348 <1> linkinfo_data cmd3, cmd3_not_ext, puts_ext_done, puts_ext_next 349 <1> linkinfo_data puts_copyoutput_ext_done 350 <1> %if _EXT_PUTS_GETLINE 351 <1> linkinfo_data puts_getline_ext_done 352 <1> linkinfo_data in_getinput 353 <1> %endif 354 <1> linkinfo_data cmd3_preprocessed, cmd3_not_inject, cmd3_injected 355 <1> %if !_LOADER 356 <1> linkinfo_data aa_not_inject, aa_injected 357 <1> linkinfo_data aa_before_getline, aa_after_getline 358 <1> %endif 359 <1> linkinfo_data while_buffer, while_buffer.end, swch1 360 <1> linkinfo_data_as internalflags_with_tt_while, internalflags 361 <1> linkinfo_data yy_is_script 362 <1> linkinfo_data terminator_in_line_in.offset 363 <1> linkinfo_data terminator_in_line_in.value 364 <1> linkinfo_data ext_finish.bp_is_set 365 <1> linkinfo_data vregs, vregs.amount 366 <1> %if _DT 367 <1> linkinfo_data asciitablenames 368 <1> %endif 369 <1> linkinfo_data pm_2_86m_0 370 <1> %if _BOOTLDR 371 <1> linkinfo_data load_unit_flags 372 <1> %endif 373 <1> %if !_LOADER 374 <1> linkinfo_data sss_silent_count_used, sss_silent_count, search_results, sscounter 375 <1> linkinfo_data search_results_amount 376 <1> %endif 377 <1> linkinfo_data patcharea_run, patcharea_run.size, patcharea_run.segment 378 <1> %if !_LOADER 379 <1> linkinfo_data patcharea_intrtn, patcharea_intrtn.size, patcharea_intrtn.segment 380 <1> %endif 381 <1> %if _PM 382 <1> linkinfo_data patcharea_pm_exc, patcharea_pm_exc.size, patcharea_pm_exc.segment 383 <1> %endif 384 <1> linkinfo_data promptlen 385 <1> linkinfo_data indirect_array_errfix 386 <1> linkinfo_data priorrc, rc 387 <1> %if _BOOTLDR 388 <1> linkinfo_data boot_init_foundname 389 <1> %endif 390 <1> %if _DEVICE 391 <1> linkinfo_data device_quittable_regs, device_header_address 392 <1> %endif 393 <1> %if _EXECUTABLE 394 <1> linkinfo_data init_executable_pathname, init_executable_pathname.end 395 <1> %endif 396 <1> ;linkinfo_data 397 <1> 398 <1> 399 <1> %assign LINKINFO_CODE_SEGMENT 0 ; CODE1 400 <1> linkinfo_code puts, putsz, putc, putsline, putsline_crlf, trimputs 401 <1> linkinfo_code skipcomma, skipcomm0, skipwhite, skipwh0 402 <1> linkinfo_code isstring?, capitalise, chkeol, iseol?, iseol?.notsemicolon 403 <1> linkinfo_code_as "uppercase", capitalise 404 <1> linkinfo_code guard_auxbuff, guard_re, prephack, dohack, unhack 405 <1> linkinfo_code handle_serial_flags_ctrl_c 406 <1> linkinfo_code hexnyb, hexbyte, hexword, hexword_high, decword, decdword 407 <1> linkinfo_code dec_dword_minwidth 408 <1> linkinfo_code ispm, setes2dx, call_int2D 409 <1> linkinfo_code copy_single_counted_string 410 <1> linkinfo_code intchk 411 <1> linkinfo_code IsIISPEntry? 412 <1> linkinfo_code disp_dxax_times_cx_width_bx_size.store 413 <1> linkinfo_code cmd3, cmd3_not_ext, puts_ext_done, puts_ext_next 414 <1> linkinfo_code puts_copyoutput_ext_done 415 <1> %if _EXT_PUTS_GETLINE 416 <1> linkinfo_code puts_getline_ext_done 417 <1> %endif 418 <1> linkinfo_code cmd3_preprocessed, cmd3_not_inject, cmd3_injected 419 <1> linkinfo_code error 420 <1> linkinfo_code setds2si, setds2bx 421 <1> %if _PM 422 <1> linkinfo_code intcall_ext_return_es 423 <1> %endif 424 <1> linkinfo_code dd_store 425 <1> linkinfo_code InDOS, _doscall 426 <1> %if !_LOADER 427 <1> linkinfo_code yy_dos_parse_name 428 <1> %endif 429 <1> linkinfo_code yy_open_file, yy_check_lfn 430 <1> linkinfo_code yy_common_parse_name 431 <1> linkinfo_code yy_common_parse_name_bx_buffer 432 <1> linkinfo_code retry_open_scriptspath 433 <1> linkinfo_code near_transfer_ext_return 434 <1> %if _BOOTLDR 435 <1> linkinfo_code yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 436 <1> linkinfo_code_as yy_boot_parse_name2, yy_boot_parse_name 437 <1> linkinfo_code yy_boot_parse_name_bx_buffer 438 <1> linkinfo_code_as yy_boot_open_file2, yy_boot_open_file 439 <1> linkinfo_code scan_dir_aux, read_sector 440 <1> linkinfo_code_as yy_boot_init_dir2, yy_boot_init_dir 441 <1> linkinfo_code got_yyentry, scan_dir_entry 442 <1> linkinfo_code ..@yy_filename_empty 443 <1> linkinfo_code boot_parse_fn 444 <1> linkinfo_code init_bootcmd 445 <1> %endif 446 <1> linkinfo_code close_ext 447 <1> linkinfo_code yy_reset_buf 448 <1> %if !_LOADER 449 <1> linkinfo_code aa_not_inject, aa_injected 450 <1> linkinfo_code aa_before_getline, aa_after_getline 451 <1> %endif 452 <1> linkinfo_code doscall_extseg 453 <1> linkinfo_code test_d_b_bit, test_high_limit 454 <1> linkinfo_code setrc 455 <1> linkinfo_code skipequals 456 <1> %if !_LOADER 457 <1> %if _COUNT || _SCOUNT 458 <1> linkinfo_code count_store 459 <1> %endif 460 <1> %endif 461 <1> linkinfo_code hexdword 462 <1> %if _LOADER 463 <1> linkinfo_code loader_get_resident_address, loader_prepare_resident 464 <1> %endif 465 <1> linkinfo_code verifysegm_or_error, verifysegm 466 <1> ;linkinfo_code 467 <1> 468 <1> %if _DUALCODE && _EXPRDUALCODE 469 <1> %assign LINKINFO_CODE_SEGMENT 1 ; CODE2 470 <1> %else 471 <1> %assign LINKINFO_CODE_SEGMENT 0 ; CODE1 472 <1> %endif 473 <1> linkinfo_code isvariable?, isseparator?, get_value_range 474 <1> linkinfo_code getexpression, getdword, getword, getbyte 475 <1> linkinfo_code getaddr, getaddrX, getrange, getrangeX 476 <1> linkinfo_code get_length_keyword, getnyb 477 <1> linkinfo_code isoperator?, ..@call_operator_dispatchers 478 <1> %if _EXTENSIONS && _EXT_VARIABLES 479 <1> linkinfo_code var_ext_setup_done 480 <1> %endif 481 <1> linkinfo_code getstr 482 <1> ;linkinfo_code 483 <1> 484 <1> 485 <1> %assign LINKINFO_CODE_SEGMENT 2 ; ENTRY 486 <1> linkinfo_code entry_retn 487 <1> ;linkinfo_code 488 <1> 489 <1> 490 <1> align 4, db 0 491 <1> linkinfo: 492 <1> istruc ELD_LINKINFO 0 00000000 D1E1 at eldlSignature, dw 0E1D1h 0 00000002 00000000 at eldlReserved, dw 0, 0 0 00000006 0100 at eldlUseLinkHash, dw !!_LINKHASH 0 00000008 B800 at eldlDataAmount, dw LINKINFO_DATA_AMOUNT 0 0000000A [1800] at eldlDataPrefixes, dw linkinfo_data_table_prefixes 0 0000000C [8801] at eldlDataEntries, dw linkinfo_data_table_entries 0 0000000E [F802] at eldlDataAddresses, dw linkinfo_data_table_addresses 0 00000010 6900 at eldlCodeAmount, dw LINKINFO_CODE_AMOUNT 0 00000012 [6804] at eldlCodePrefixes, dw linkinfo_code_table_prefixes 0 00000014 [3A05] at eldlCodeEntries, dw linkinfo_code_table_entries 0 00000016 [0C06] at eldlCodeAddresses, dw linkinfo_code_table_addresses 504 <1> iend 505 <1> 506 <1> 507 <1> align 2, db 0 508 <1> linkinfo_data_table_prefixes: 0 00000018 FF7EFA7E2B856844D5 .: repeatdw LINKINFO_DATA_PREFIXES 0 00000021 2D6A2BEB422BC8E7D3 0 0000002A 2AAEF634B240FDFCFB 0 00000033 FC0A0A899FC951CA51 0 0000003C CB51CC51CD51CE517D 0 00000045 B355BC56BC57BC58BC 0 0000004E 59BC5ABCC30B2F7A9C 0 00000057 3C84E3A0398B00B0B2 0 00000060 2071DD03C6408D7154 0 00000069 407DCFBC89AF9D9130 0 00000072 044A3208EAE5B0B267 0 0000007B 341E38892B140B6A5D 0 00000084 8C61879FE77ADE037D 0 0000008D 4275AE31AA2AE7279B 0 00000096 C36797B63B26DB9FA2 0 0000009F C09648AE24DD30B9E1 0 000000A8 95559C6CF235C00168 0 000000B1 8CF09EF391C30BDD03 0 000000BA C640C83E7EC07CC76B 0 000000C3 5D05D692B84D18F106 0 000000CC 10324E326D322F3236 0 000000D5 3427322F345E329F32 0 000000DE 00333C3B5B3B2C3D7A 0 000000E7 3B993BB83BC5BF6BD7 0 000000F0 E8B48FC32E6BF8B4C4 0 000000F9 E26651C71CD6ED58B8 0 00000102 0F0882740EB594C038 0 0000010B D274B9384B9F213F85 0 00000114 92AA2F756C5275DD22 0 0000011D 7F4F71282963BF8C8E 0 00000126 C7805503BABD30CD1A 0 0000012F B78B1ECF3F6F9D6DB1 0 00000138 702A2258D5DA9BF78E 0 00000141 04A81B09B98F03FC15 0 0000014A 2700D569A225F466F0 0 00000153 3E2229740812432A28 0 0000015C 5265E47A8AF25235A0 0 00000165 8ABBCCD78EC0CD6FE3 0 0000016E 05BDC88C67490DF450 0 00000177 8F26EB5A63F211EA53 0 00000180 67A7EA1BD73B44EA 510 <1> .amount equ ($ - .) / 2 511 <1> %if .amount != LINKINFO_DATA_AMOUNT 512 <1> %error Unexpected table size 513 <1> %endif 514 <1> 515 <1> align 2, db 0 516 <1> linkinfo_data_table_entries: 0 00000188 [B007][B807][C007] .: repeatdw LINKINFO_DATA_ENTRIES 0 0000018E [D007][DF07][E607] 0 00000194 [EF07][F807][0408] 0 0000019A [1008][1808][2508] 0 000001A0 [3208][3908][4008] 0 000001A6 [4608][5408][6308] 0 000001AC [7208][8108][9008] 0 000001B2 [9F08][AE08][B608] 0 000001B8 [BF08][C808][D108] 0 000001BE [DA08][E308][EC08] 0 000001C4 [F408][FC08][0809] 0 000001CA [1109][1E09][2F09] 0 000001D0 [4409][6209][6B09] 0 000001D6 [7509][8109][8F09] 0 000001DC [9709][A509][B009] 0 000001E2 [C009][C909][D309] 0 000001E8 [E309][F809][080A] 0 000001EE [180A][1F0A][280A] 0 000001F4 [320A][3D0A][530A] 0 000001FA [6B0A][7C0A][8D0A] 0 00000200 [9B0A][A80A][B60A] 0 00000206 [BC0A][C60A][DA0A] 0 0000020C [ED0A][F40A][FC0A] 0 00000212 [130B][240B][400B] 0 00000218 [590B][770B][8D0B] 0 0000021E [AA0B][BB0B][D10B] 0 00000224 [F40B][FB0B][030C] 0 0000022A [0C0C][160C][1D0C] 0 00000230 [3A0C][550C][5C0C] 0 00000236 [630C][6B0C][780C] 0 0000023C [860C][8E0C][960C] 0 00000242 [9E0C][A60C][AE0C] 0 00000248 [B60C][BE0C][C60C] 0 0000024E [CE0C][D60C][DD0C] 0 00000254 [E40C][EB0C][F20C] 0 0000025A [F90C][000D][080D] 0 00000260 [110D][190D][280D] 0 00000266 [370D][440D][680D] 0 0000026C [760D][810D][990D] 0 00000272 [B30D][C40D][CE0D] 0 00000278 [E00D][F60D][100E] 0 0000027E [350E][630E][8C0E] 0 00000284 [9B0E][AF0E][C00E] 0 0000028A [D10E][E20E][FA0E] 0 00000290 [0A0F][150F][280F] 0 00000296 [340F][480F][580F] 0 0000029C [5D0F][6A0F][780F] 0 000002A2 [860F][9F0F][B50F] 0 000002A8 [C10F][D30F][E30F] 0 000002AE [F10F][FF0F][0B10] 0 000002B4 [1D10][2E10][3B10] 0 000002BA [4C10][5210][6E10] 0 000002C0 [7B10][9810][B410] 0 000002C6 [C910][CF10][DC10] 0 000002CC [EC10][F710][0711] 0 000002D2 [1D11][2E11][3D11] 0 000002D8 [4711][5D11][6B11] 0 000002DE [7E11][9411][A511] 0 000002E4 [BB11][D411][DE11] 0 000002EA [F411][FC11][FF11] 0 000002F0 [1312][2912][3F12] 0 000002F6 [5812] 518 <1> .amount equ ($ - .) / 2 519 <1> %if .amount != LINKINFO_DATA_AMOUNT 520 <1> %error Unexpected table size 521 <1> %endif 522 <1> 523 <1> align 2, db 0 524 <1> linkinfo_data_table_addresses: 0 000002F8 [0000][0000][0000] .: repeatdw LINKINFO_DATA_ADDRESSES 0 000002FE [0000][0000][0000] 0 00000304 [0000][0000][0000] 0 0000030A [0000][0000][0000] 0 00000310 [0000][0000][0000] 0 00000316 [0000][0000][0000] 0 0000031C [0000][0000][0000] 0 00000322 [0000][0000][0000] 0 00000328 [0000][0000][0000] 0 0000032E [0000][0000][0000] 0 00000334 [0000][0000][0000] 0 0000033A [0000][0000][0000] 0 00000340 [0000][0000][0000] 0 00000346 [7D08][7B08][1000] 0 0000034C [0000][0000][0000] 0 00000352 [0000][0000][0000] 0 00000358 [0000][0000][0000] 0 0000035E [0000][0000][0000] 0 00000364 [0000][0000][0000] 0 0000036A [0000][0000][0000] 0 00000370 [0000]0200[0000] 0 00000376 [0000][0000][0000] 0 0000037C [0000][0000][0000] 0 00000382 [0000][0000][0000] 0 00000388 [0000][0000][0000] 0 0000038E [0000][0000][0000] 0 00000394 [F10E][0000][0000] 0 0000039A [0000][0000][0000] 0 000003A0 [0000][0000][0000] 0 000003A6 [0000][EC1C]0100 0 000003AC [0000][0000][0000] 0 000003B2 [0000][0000][0000] 0 000003B8 [0000][0000][0000] 0 000003BE [0000][0000][0000] 0 000003C4 [0000][0000][0000] 0 000003CA [0000][ED08][E808] 0 000003D0 [0000][0000][0000] 0 000003D6 [0000][0000][0000] 0 000003DC [0000][0000][0000] 0 000003E2 [0000][0000][0000] 0 000003E8 [0000][0000][0000] 0 000003EE [0000][0000][0000] 0 000003F4 [0000][0000][0000] 0 000003FA [0000][0000][0000] 0 00000400 [0000][0000][0000] 0 00000406 [0000]0000[0000] 0 0000040C [0000][0000][0000] 0 00000412 [0000][0000][0000] 0 00000418 [0000][0000][0000] 0 0000041E [0000][0000][0000] 0 00000424 [0000][0000][0000] 0 0000042A [0000][0000][0000] 0 00000430 [0000][0000][0000] 0 00000436 [0000][0000][0000] 0 0000043C [0000][0000][0000] 0 00000442 [0000][0000][0000] 0 00000448 1000[0000][0000] 0 0000044E [0000][0000][0000] 0 00000454 [0000][0000][0000] 0 0000045A [0000][0000][0000] 0 00000460 [0000][0000][0000] 0 00000466 [0000] 526 <1> .amount equ ($ - .) / 2 527 <1> %if .amount != LINKINFO_DATA_AMOUNT 528 <1> %error Unexpected table size 529 <1> %endif 530 <1> 531 <1> 532 <1> align 2, db 0 533 <1> linkinfo_code_table_prefixes: 0 00000468 C5C65512B5C6398C6F .: repeatdw LINKINFO_CODE_PREFIXES 0 00000471 A267B1D555A45529EF 0 0000047A 7FAE03C3D430DDB9E8 0 00000483 3A8490F1231CE30E05 0 0000048C CFF16DC97B14DCF83D 0 00000495 BA821B84817D67EBA6 0 0000049E AD1103AA2890B77421 0 000004A7 30D0BB98693567ABFF 0 000004B0 BABD30CD1AB78B1ECF 0 000004B9 3F6F9D702A2258D5DA 0 000004C2 A7AAF85EF85C637762 0 000004CB 9668310C21738E9F9A 0 000004D4 8D9117D8B0CC4C04FF 0 000004DD 8BDA8663E44C4EF001 0 000004E6 109AD1C68ECB25D7FE 0 000004EF FD3F85152720665A0B 0 000004F8 794CA5339BF78E04A8 0 00000501 1B09B98EF7E9738A0A 0 0000050A B212BFBC100B348AD9 0 00000513 187225B84425A1650F 0 0000051C 0D38D9FA3FE83D8226 0 00000525 BDF2E7A83EB0965AA3 0 0000052E 221090B3D354BB7A5C 0 00000537 225B36 535 <1> .amount equ ($ - .) / 2 536 <1> %if .amount != LINKINFO_CODE_AMOUNT 537 <1> %error Unexpected table size 538 <1> %endif 539 <1> 540 <1> align 2, db 0 541 <1> linkinfo_code_table_entries: 0 0000053A [7512][7A12][8012] .: repeatdw LINKINFO_CODE_ENTRIES 0 00000540 [8512][8E12][9C12] 0 00000546 [A512][AF12][B912] 0 0000054C [C312][CB12][D512] 0 00000552 [E012][E712][EE12] 0 00000558 [0213][0C13][1A13] 0 0000055E [2313][2C13][3313] 0 00000564 [3A13][5513][5C13] 0 0000056A [6413][6C13][7913] 0 00000570 [8113][8A13][9D13] 0 00000576 [A213][AB13][B613] 0 0000057C [D113][D813][E513] 0 00000582 [0C14][1114][1E14] 0 00000588 [2C14][3A14][5314] 0 0000058E [6914][7B14][8B14] 0 00000594 [9914][9F14][A814] 0 0000059A [B114][BA14][C014] 0 000005A0 [C914][DB14][E814] 0 000005A6 [F514][0A15][2915] 0 000005AC [4015][5915][6915] 0 000005B2 [7F15][9715][AB15] 0 000005B8 [C815][DB15][E815] 0 000005BE [F415][0616][1216] 0 000005C4 [2116][3616][4416] 0 000005CA [5116][5B16][6816] 0 000005D0 [7616][8216][9416] 0 000005D6 [A516][B416][C116] 0 000005DC [D116][D716][E216] 0 000005E2 [EE16][F716][0B17] 0 000005E8 [1617][2217][2F17] 0 000005EE [3F17][4D17][5617] 0 000005F4 [5E17][6617][6E17] 0 000005FA [7717][8017][8A17] 0 00000600 [9D17][A417][B017] 0 00000606 [CD17][E017][E717] 543 <1> .amount equ ($ - .) / 2 544 <1> %if .amount != LINKINFO_CODE_AMOUNT 545 <1> %error Unexpected table size 546 <1> %endif 547 <1> 548 <1> align 2, db 0 549 <1> linkinfo_code_table_addresses: 0 0000060C [0000]0000[0000]00 .: repeatdw LINKINFO_CODE_ADDRESSES 0 00000613 00[0000]0000[0000] 0 0000061A 0000[0000]0000 0 00000620 [0000]0000[0000]00 0 00000627 00[0000]0000[0000] 0 0000062E 0000[0000]0000 0 00000634 [0000]0000[0000]00 0 0000063B 00[0000]0000[0000] 0 00000642 0000[0000]0000 0 00000648 [0000]0000[0000]00 0 0000064F 00[0000]0000[0000] 0 00000656 0000[0000]0000 0 0000065C [0000]0000[0000]00 0 00000663 00[0000]0000[0000] 0 0000066A 0000[0000]0000 0 00000670 [0000]0000[0000]00 0 00000677 00[0000]0000[0000] 0 0000067E 0000[0000]0000 0 00000684 [0000]0000[0000]00 0 0000068B 00[0000]0000[0000] 0 00000692 0000[0000]0000 0 00000698 [0000]0000[0000]00 0 0000069F 00[0000]0000[0000] 0 000006A6 0000[0000]0000 0 000006AC [0000]0000[0000]00 0 000006B3 00[0000]0000[0000] 0 000006BA 0000[0000]0000 0 000006C0 [0000]0000[0000]00 0 000006C7 00[0000]0000[0000] 0 000006CE 0000[0000]0000 0 000006D4 [0000]0000[0000]00 0 000006DB 00[0000]0000[0000] 0 000006E2 0000[0000]0000 0 000006E8 [0000]0000[0000]00 0 000006EF 00[0000]0000[0000] 0 000006F6 0000[0000]0000 0 000006FC [0000]0000[0000]00 0 00000703 00[0000]0000[0000] 0 0000070A 0000[0000]0000 0 00000710 [0000]0000[0000]00 0 00000717 00[0000]0000[0000] 0 0000071E 0000[0000]0000 0 00000724 [0000]0000[0000]00 0 0000072B 00[0000]0000[0000] 0 00000732 0000[0000]0000 0 00000738 [0000]0000[0000]00 0 0000073F 00[0000]0000[0000] 0 00000746 0000[0000]0000 0 0000074C [0000]0000[0000]00 0 00000753 00[0000]0000[0000] 0 0000075A 0000[0000]0000 0 00000760 [0000]0000[0000]00 0 00000767 00[0000]0000[0000] 0 0000076E 0000[0000]0000 0 00000774 [0000]0000[0000]00 0 0000077B 00[0000]0000[0000] 0 00000782 0000[0000]0000 0 00000788 [0000]0000[0000]00 0 0000078F 00[0000]0000[0000] 0 00000796 0000[0000]0000 0 0000079C [0000]0000[0000]00 0 000007A3 00[0000]0000[0000] 0 000007AA 0000[0000]0200 551 <1> .amount equ ($ - .) / 4 552 <1> %if .amount != LINKINFO_CODE_AMOUNT 553 <1> %error Unexpected table size 554 <1> %endif 555 <1> 556 <1> 0 000007B0 076C696E6B73656C07 dump_linkinfo_messages LINKINFO_DATA_MESSAGES, LINKINFO_CODE_MESSAGES 0 000007B9 6C696E6B7365670F6C 0 000007C2 696E6B696E666F6164 0 000007CB 64726573730E6C696E 0 000007D4 6B63616C6C5F746162 0 000007DD 6C6506657874736567 0 000007E6 08657874637373656C 0 000007EF 08657874647373656C 0 000007F8 0B6578747365675F73 0 00000801 697A650B6578747365 0 0000080A 675F75736564076578 0 00000813 74646174610C657874 0 0000081C 646174615F73697A65 0 00000825 0C657874646174615F 0 0000082E 757365640670737064 0 00000837 626706707370646265 0 00000840 05647373656C0D696E 0 00000849 7465726E616C666C61 0 00000852 67730E696E7465726E 0 0000085B 616C666C616773320E 0 00000864 696E7465726E616C66 0 0000086D 6C616773330E696E74 0 00000876 65726E616C666C6167 0 0000087F 73340E696E7465726E 0 00000888 616C666C616773350E 0 00000891 696E7465726E616C66 0 0000089A 6C616773360E696E74 0 000008A3 65726E616C666C6167 0 000008AC 7337076F7074696F6E 0 000008B5 73086F7074696F6E73 0 000008BE 32086F7074696F6E73 0 000008C7 33086F7074696F6E73 0 000008D0 34086F7074696F6E73 0 000008D9 35086F7074696F6E73 0 000008E2 36086F7074696F6E73 0 000008EB 37076C617374636D64 0 000008F4 076C696E655F696E0B 0 000008FD 6C696E655F696E2E65 0 00000906 6E64086C696E655F6F 0 0000090F 75740C6C696E655F6F 0 00000918 75745F656E64106175 0 00000921 78627566665F736567 0 0000092A 6F7273656C14617578 0 00000933 627566665F63757272 0 0000093C 656E745F73697A651D 0 00000945 617578627566665F63 0 0000094E 757272656E745F7369 0 00000957 7A655F6D696E75735F 0 00000960 32340866697273746D 0 00000969 636209666972737475 0 00000972 6D63620B6D73672E69 0 0000097B 6E7374616C6C0D6D73 0 00000984 672E756E696E737461 0 0000098D 6C6C076D73672E7275 0 00000996 6E0D656E7472797365 0 0000099F 675F73697A650A6D65 0 000009A8 73736167657365670F 0 000009B1 6D6573736167657365 0 000009BA 675F73697A6508636F 0 000009C3 64655F73656709636F 0 000009CC 64655F73697A650F61 0 000009D5 7578627566665F7365 0 000009DE 676D656E7414617578 0 000009E7 627566665F63757272 0 000009F0 656E745F73697A650F 0 000009F9 686973746F72795F73 0 00000A02 65676D656E740F6869 0 00000A0B 73746F72797365675F 0 00000A14 73697A6506656E7673 0 00000A1D 656708656E765F7369 0 00000A26 7A6509616C6C6F635F 0 00000A2F 7365670A616C6C6F63 0 00000A38 5F73697A65156E6578 0 00000A41 745F72657365727665 0 00000A4A 645F7365676D656E74 0 00000A53 17616C6C6F635F7369 0 00000A5C 7A655F6E6F745F7265 0 00000A65 736572766564107265 0 00000A6E 7365727665645F6164 0 00000A77 647265737310686973 0 00000A80 746F72792E7365676F 0 00000A89 7273656C0D68697374 0 00000A92 6F72792E6669727374 0 00000A9B 0C686973746F72792E 0 00000AA4 6C6173740D68697374 0 00000AAD 6F7279666F726D6174 0 00000AB6 05737461636B097374 0 00000ABF 61636B5F656E641365 0 00000AC8 78745F636F6D6D616E 0 00000AD1 645F68616E646C6572 0 00000ADA 126578745F696E6A65 0 00000AE3 63745F68616E646C65 0 00000AEC 720673617665737007 0 00000AF5 7468726F7773701665 0 00000AFE 78745F70726570726F 0 00000B07 636573735F68616E64 0 00000B10 6C6572106578745F70 0 00000B19 7574735F68616E646C 0 00000B22 65721B6578745F7075 0 00000B2B 74735F636F70796F75 0 00000B34 747075745F68616E64 0 00000B3D 6C6572186578745F70 0 00000B46 7574735F6765746C69 0 00000B4F 6E655F68616E646C65 0 00000B58 721D6578745F61615F 0 00000B61 6265666F72655F6765 0 00000B6A 746C696E655F68616E 0 00000B73 646C6572156578745F 0 00000B7C 61615F696E6A656374 0 00000B85 5F68616E646C65721C 0 00000B8E 6578745F61615F6166 0 00000B97 7465725F6765746C69 0 00000BA0 6E655F68616E646C65 0 00000BA9 72106578745F616D69 0 00000BB2 735F68616E646C6572 0 00000BBB 15616D69735F6D756C 0 00000BC4 7469706C65785F6E75 0 00000BCD 6D626572227472795F 0 00000BD6 64656275676765725F 0 00000BDF 616D69735F6D756C74 0 00000BE8 69706C65785F6E756D 0 00000BF1 626572066D73672E69 0 00000BFA 6E076C617374636D64 0 00000C03 0866697273746D6362 0 00000C0C 096669727374756D63 0 00000C15 620664706D6933321C 0 00000C1E 6C617374636D645F74 0 00000C27 72616E736665725F65 0 00000C30 78745F616464726573 0 00000C39 731A6C617374636D64 0 00000C42 5F7472616E73666572 0 00000C4B 5F6578745F656E7472 0 00000C54 7906646D79636D6406 0 00000C5D 6861735F3837076861 0 00000C66 735F6D6D780C696E73 0 00000C6F 74616C6C666C616773 0 00000C78 0D696E7374616C6C66 0 00000C81 6F726D617407726567 0 00000C8A 5F656178077265675F 0 00000C93 656378077265675F65 0 00000C9C 6478077265675F6562 0 00000CA5 78077265675F657370 0 00000CAE 077265675F65627007 0 00000CB7 7265675F6573690772 0 00000CC0 65675F656469077265 0 00000CC9 675F65666C07726567 0 00000CD2 5F656970067265675F 0 00000CDB 6373067265675F6473 0 00000CE4 067265675F73730672 0 00000CED 65675F657306726567 0 00000CF6 5F6673067265675F67 0 00000CFF 73076D73672E6E6F74 0 00000D08 086D73672E7468656E 0 00000D11 076578745F7661720E 0 00000D1A 6578745F7661725F61 0 00000D23 6D6F756E740E657874 0 00000D2C 5F7661725F666F726D 0 00000D35 61740C6578745F7661 0 00000D3E 725F73697A65236973 0 00000D47 7661726961626C655F 0 00000D50 6D6F7265627974655F 0 00000D59 6E616D656865616465 0 00000D62 72732E6578740D7661 0 00000D6B 725F6578745F736574 0 00000D74 75700A6578745F6861 0 00000D7D 6E646C65176E656172 0 00000D86 5F7472616E73666572 0 00000D8F 5F6578745F656E7472 0 00000D98 79196E6561725F7472 0 00000DA1 616E736665725F6578 0 00000DAA 745F61646472657373 0 00000DB3 106C6F61645F646174 0 00000DBC 615F6C6F7765737409 0 00000DC5 6C6F61645F64617461 0 00000DCE 116C6F61645F79796E 0 00000DD7 616D655F696E707574 0 00000DE0 1568616E646C655F73 0 00000DE9 63616E5F6469725F65 0 00000DF2 6E7472791968616E64 0 00000DFB 6C655F7363616E5F64 0 00000E04 69725F6E6F745F666F 0 00000E0D 756E64242E2E40626F 0 00000E16 6F745F7363616E5F64 0 00000E1F 69725F72657475726E 0 00000E28 5F66696C656E6F7466 0 00000E31 6F756E642D2E2E4062 0 00000E3A 6F6F745F7363616E5F 0 00000E43 6469725F7265747572 0 00000E4C 6E5F7375626469725F 0 00000E55 6F725F66617433325F 0 00000E5E 656E747279282E2E40 0 00000E67 626F6F745F7363616E 0 00000E70 5F6469725F72657475 0 00000E79 726E5F66617431365F 0 00000E82 726F6F745F656E7472 0 00000E8B 790E7363616E5F6469 0 00000E94 725F656E747279136C 0 00000E9D 6F61645F636865636B 0 00000EA6 5F6469725F61747472 0 00000EAF 106C6F61645F79796E 0 00000EB8 616D655F6E65787410 0 00000EC1 6C6F61645F79795F64 0 00000ECA 6972656E747279106C 0 00000ED3 6F61645F6B65726E65 0 00000EDC 6C5F6E616D65176C6F 0 00000EE5 61645F6164725F6469 0 00000EEE 726275665F7365676D 0 00000EF7 656E740F6578656362 0 00000F00 6C6B2E636D646C696E 0 00000F09 650A636F6E66696770 0 00000F12 61746812636F6E6669 0 00000F1B 67706174682E646972 0 00000F24 5F656E640B73637269 0 00000F2D 707473706174681373 0 00000F36 637269707473706174 0 00000F3F 682E6469725F656E64 0 00000F48 0F6275696C645F6F70 0 00000F51 74696F6E5F504D0463 0 00000F5A 6D64330C636D64335F 0 00000F63 6E6F745F6578740D70 0 00000F6C 7574735F6578745F64 0 00000F75 6F6E650D707574735F 0 00000F7E 6578745F6E65787418 0 00000F87 707574735F636F7079 0 00000F90 6F75747075745F6578 0 00000F99 745F646F6E65157075 0 00000FA2 74735F6765746C696E 0 00000FAB 655F6578745F646F6E 0 00000FB4 650B696E5F67657469 0 00000FBD 6E70757411636D6433 0 00000FC6 5F70726570726F6365 0 00000FCF 737365640F636D6433 0 00000FD8 5F6E6F745F696E6A65 0 00000FE1 63740D636D64335F69 0 00000FEA 6E6A65637465640D61 0 00000FF3 615F6E6F745F696E6A 0 00000FFC 6563740B61615F696E 0 00001005 6A6563746564116161 0 0000100E 5F6265666F72655F67 0 00001017 65746C696E65106161 0 00001020 5F61667465725F6765 0 00001029 746C696E650C776869 0 00001032 6C655F627566666572 0 0000103B 107768696C655F6275 0 00001044 666665722E656E6405 0 0000104D 73776368311B696E74 0 00001056 65726E616C666C6167 0 0000105F 735F776974685F7474 0 00001068 5F7768696C650C7979 0 00001071 5F69735F7363726970 0 0000107A 741C7465726D696E61 0 00001083 746F725F696E5F6C69 0 0000108C 6E655F696E2E6F6666 0 00001095 7365741B7465726D69 0 0000109E 6E61746F725F696E5F 0 000010A7 6C696E655F696E2E76 0 000010B0 616C7565146578745F 0 000010B9 66696E6973682E6270 0 000010C2 5F69735F7365740576 0 000010CB 726567730C76726567 0 000010D4 732E616D6F756E740F 0 000010DD 61736369697461626C 0 000010E6 656E616D65730A706D 0 000010EF 5F325F38366D5F300F 0 000010F8 6C6F61645F756E6974 0 00001101 5F666C616773157373 0 0000110A 735F73696C656E745F 0 00001113 636F756E745F757365 0 0000111C 64107373735F73696C 0 00001125 656E745F636F756E74 0 0000112E 0E7365617263685F72 0 00001137 6573756C7473097373 0 00001140 636F756E7465721573 0 00001149 65617263685F726573 0 00001152 756C74735F616D6F75 0 0000115B 6E740D706174636861 0 00001164 7265615F72756E1270 0 0000116D 61746368617265615F 0 00001176 72756E2E73697A6515 0 0000117F 706174636861726561 0 00001188 5F72756E2E7365676D 0 00001191 656E74107061746368 0 0000119A 617265615F696E7472 0 000011A3 746E15706174636861 0 000011AC 7265615F696E747274 0 000011B5 6E2E73697A65187061 0 000011BE 746368617265615F69 0 000011C7 6E7472746E2E736567 0 000011D0 6D656E740970726F6D 0 000011D9 70746C656E15696E64 0 000011E2 69726563745F617272 0 000011EB 61795F657272666978 0 000011F4 077072696F72726302 0 000011FD 726313626F6F745F69 0 00001206 6E69745F666F756E64 0 0000120F 6E616D651564657669 0 00001218 63655F717569747461 0 00001221 626C655F7265677315 0 0000122A 6465766963655F6865 0 00001233 616465725F61646472 0 0000123C 65737318696E69745F 0 00001245 65786563757461626C 0 0000124E 655F706174686E616D 0 00001257 651C696E69745F6578 0 00001260 6563757461626C655F 0 00001269 706174686E616D652E 0 00001272 656E64047075747305 0 0000127B 707574737A04707574 0 00001284 6308707574736C696E 0 0000128D 650D707574736C696E 0 00001296 655F63726C66087472 0 0000129F 696D7075747309736B 0 000012A8 6970636F6D6D610973 0 000012B1 6B6970636F6D6D3009 0 000012BA 736B69707768697465 0 000012C3 07736B697077683009 0 000012CC 6973737472696E673F 0 000012D5 0A6361706974616C69 0 000012DE 73650663686B656F6C 0 000012E7 066973656F6C3F1369 0 000012F0 73656F6C3F2E6E6F74 0 000012F9 73656D69636F6C6F6E 0 00001302 097570706572636173 0 0000130B 650D67756172645F61 0 00001314 757862756666086775 0 0000131D 6172645F7265087072 0 00001326 65706861636B06646F 0 0000132F 6861636B06756E6861 0 00001338 636B1A68616E646C65 0 00001341 5F73657269616C5F66 0 0000134A 6C6167735F6374726C 0 00001353 5F63066865786E7962 0 0000135C 076865786279746507 0 00001365 686578776F72640C68 0 0000136E 6578776F72645F6869 0 00001377 676807646563776F72 0 00001380 640864656364776F72 0 00001389 64126465635F64776F 0 00001392 72645F6D696E776964 0 0000139B 7468046973706D0873 0 000013A4 657465733264780A63 0 000013AD 616C6C5F696E743244 0 000013B6 1A636F70795F73696E 0 000013BF 676C655F636F756E74 0 000013C8 65645F737472696E67 0 000013D1 06696E7463686B0C49 0 000013DA 7349495350456E7472 0 000013E3 793F26646973705F64 0 000013EC 7861785F74696D6573 0 000013F5 5F63785F7769647468 0 000013FE 5F62785F73697A652E 0 00001407 73746F726504636D64 0 00001410 330C636D64335F6E6F 0 00001419 745F6578740D707574 0 00001422 735F6578745F646F6E 0 0000142B 650D707574735F6578 0 00001434 745F6E657874187075 0 0000143D 74735F636F70796F75 0 00001446 747075745F6578745F 0 0000144F 646F6E651570757473 0 00001458 5F6765746C696E655F 0 00001461 6578745F646F6E6511 0 0000146A 636D64335F70726570 0 00001473 726F6365737365640F 0 0000147C 636D64335F6E6F745F 0 00001485 696E6A6563740D636D 0 0000148E 64335F696E6A656374 0 00001497 6564056572726F7208 0 000014A0 736574647332736908 0 000014A9 736574647332627808 0 000014B2 64645F73746F726505 0 000014BB 496E444F53085F646F 0 000014C4 7363616C6C1179795F 0 000014CD 646F735F7061727365 0 000014D6 5F6E616D650C79795F 0 000014DF 6F70656E5F66696C65 0 000014E8 0C79795F636865636B 0 000014F1 5F6C666E1479795F63 0 000014FA 6F6D6D6F6E5F706172 0 00001503 73655F6E616D651E79 0 0000150C 795F636F6D6D6F6E5F 0 00001515 70617273655F6E616D 0 0000151E 655F62785F62756666 0 00001527 65721672657472795F 0 00001530 6F70656E5F73637269 0 00001539 70747370617468186E 0 00001542 6561725F7472616E73 0 0000154B 6665725F6578745F72 0 00001554 657475726E0F79795F 0 0000155D 626F6F745F72656164 0 00001566 2E62781579795F626F 0 0000156F 6F745F7365656B5F73 0 00001578 746172742E62781779 0 00001581 795F626F6F745F7365 0 0000158A 656B5F63757272656E 0 00001593 742E62781379795F62 0 0000159C 6F6F745F7061727365 0 000015A5 5F6E616D65321C7979 0 000015AE 5F626F6F745F706172 0 000015B7 73655F6E616D655F62 0 000015C0 785F62756666657212 0 000015C9 79795F626F6F745F6F 0 000015D2 70656E5F66696C6532 0 000015DB 0C7363616E5F646972 0 000015E4 5F6175780B72656164 0 000015ED 5F736563746F721179 0 000015F6 795F626F6F745F696E 0 000015FF 69745F646972320B67 0 00001608 6F745F7979656E7472 0 00001611 790E7363616E5F6469 0 0000161A 725F656E747279142E 0 00001623 2E4079795F66696C65 0 0000162C 6E616D655F656D7074 0 00001635 790D626F6F745F7061 0 0000163E 7273655F666E0C696E 0 00001647 69745F626F6F74636D 0 00001650 6409636C6F73655F65 0 00001659 78740C79795F726573 0 00001662 65745F6275660D6161 0 0000166B 5F6E6F745F696E6A65 0 00001674 63740B61615F696E6A 0 0000167D 65637465641161615F 0 00001686 6265666F72655F6765 0 0000168F 746C696E651061615F 0 00001698 61667465725F676574 0 000016A1 6C696E650E646F7363 0 000016AA 616C6C5F6578747365 0 000016B3 670C746573745F645F 0 000016BC 625F6269740F746573 0 000016C5 745F686967685F6C69 0 000016CE 6D6974057365747263 0 000016D7 0A736B697065717561 0 000016E0 6C730B636F756E745F 0 000016E9 73746F726508686578 0 000016F2 64776F726413766572 0 000016FB 6966797365676D5F6F 0 00001704 725F6572726F720A76 0 0000170D 65726966797365676D 0 00001716 0B6973766172696162 0 0000171F 6C653F0C6973736570 0 00001728 617261746F723F0F67 0 00001731 65745F76616C75655F 0 0000173A 72616E67650D676574 0 00001743 65787072657373696F 0 0000174C 6E0867657464776F72 0 00001755 6407676574776F7264 0 0000175E 076765746279746507 0 00001767 676574616464720867 0 00001770 657461646472580867 0 00001779 657472616E67650967 0 00001782 657472616E67655812 0 0000178B 6765745F6C656E6774 0 00001794 685F6B6579776F7264 0 0000179D 066765746E79620B69 0 000017A6 736F70657261746F72 0 000017AF 3F1C2E2E4063616C6C 0 000017B8 5F6F70657261746F72 0 000017C1 5F6469737061746368 0 000017CA 657273127661725F65 0 000017D3 78745F73657475705F 0 000017DC 646F6E650667657473 0 000017E5 74720A656E7472795F 0 000017EE 7265746E 73 %endif 74 75 76 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 76 ------------------ note: usesection lDEBUG_DATA_ENTRY 77 %if _LINK_COMPAT 78 align 4, db 0 79 %endif 80 81 msg: 82 83 align 2, db 0 84 .help_array: 0 00002488 [542D] dw .build_nameversion + NONCOMPRESSEDFLAG 0 0000248A [F217] dw .help_header + NONCOMPRESSEDFLAG 0 0000248C [0118] dw .help_contents 88 .help_array_amount: equ ($ - .help_array) / 2 89 90 usemessagesegment === Switch to base=008120h -> "MESSAGESEGMENT" 90 ------------------ note: usesection MESSAGESEGMENT 91 align 2, db 0 92 .help_header: 0 000017F2 2068656C7020736372 asciz " help screen",13,10 0 000017FB 65656E0D0A00 94 .help_contents: helppage main 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %endif 19 <2> 20 <2> %if !_LOADER 0 00001801 617373656D626C6509 db "assemble",9, "A [address]",13,10 0 0000180A 41205B616464726573 0 00001813 735D0D0A 22 <2> %endif 23 <2> %if _ATTACH 0 00001817 617474616368207072 db "attach process",9, "ATTACH psp",13,10 0 00001820 6F6365737309415454 0 00001829 414348207073700D0A 25 <2> %endif 26 <2> %if _BREAKPOINTS 0 00001832 73657420627265616B db "set breakpoint",9, "BP index|AT|NEW address [[NUMBER=]number] [WHEN=cond] [ID=id]",13,10 0 0000183B 706F696E7409425020 0 00001844 696E6465787C41547C 0 0000184D 4E4557206164647265 0 00001856 7373205B5B4E554D42 0 0000185F 45523D5D6E756D6265 0 00001868 725D205B5748454E3D 0 00001871 636F6E645D205B4944 0 0000187A 3D69645D0D0A 0 00001880 207365742049440909 db " set ID",9,9, "BI index|AT address [ID=]id",13,10 0 00001889 424920696E6465787C 0 00001892 415420616464726573 0 0000189B 73205B49443D5D6964 0 000018A4 0D0A 0 000018A6 2073657420636F6E64 db " set condition",9, "BW index|AT address [WHEN=]cond",13,10 0 000018AF 6974696F6E09425720 0 000018B8 696E6465787C415420 0 000018C1 61646472657373205B 0 000018CA 5748454E3D5D636F6E 0 000018D3 640D0A 0 000018D6 20736574206F666673 db " set offset",9, "BO index|AT address [OFFSET=]number",13,10 0 000018DF 657409424F20696E64 0 000018E8 65787C415420616464 0 000018F1 72657373205B4F4646 0 000018FA 5345543D5D6E756D62 0 00001903 65720D0A 0 00001907 20736574206E756D62 db " set number",9, "BN index|AT address|ALL number",13,10 0 00001910 657209424E20696E64 0 00001919 65787C415420616464 0 00001922 726573737C414C4C20 0 0000192B 6E756D6265720D0A 0 00001933 20636C656172090942 db " clear",9,9, "BC index|AT address|ALL",13,10 0 0000193C 4320696E6465787C41 0 00001945 542061646472657373 0 0000194E 7C414C4C0D0A 0 00001954 2064697361626C6509 db " disable",9, "BD index|AT address|ALL",13,10 0 0000195D 424420696E6465787C 0 00001966 415420616464726573 0 0000196F 737C414C4C0D0A 0 00001976 20656E61626C650909 db " enable",9,9, "BE index|AT address|ALL",13,10 0 0000197F 424520696E6465787C 0 00001988 415420616464726573 0 00001991 737C414C4C0D0A 0 00001998 20746F67676C650909 db " toggle",9,9, "BT index|AT address|ALL",13,10 0 000019A1 425420696E6465787C 0 000019AA 415420616464726573 0 000019B3 737C414C4C0D0A 0 000019BA 207377617009094253 db " swap",9,9, "BS index1 index2",13,10 0 000019C3 20696E646578312069 0 000019CC 6E646578320D0A 0 000019D3 206C6973740909424C db " list",9,9, "BL [index|AT address|ALL]",13,10 0 000019DC 205B696E6465787C41 0 000019E5 542061646472657373 0 000019EE 7C414C4C5D0D0A 38 <2> %endif 39 <2> %if _DEBUG || _LOADER 40 <2> db "break upwards",9, "BU",13,10 41 <2> %endif 42 <2> %if !_LOADER 0 000019F5 636F6D706172650909 db "compare",9,9, "C range address",13,10 0 000019FE 432072616E67652061 0 00001A07 6464726573730D0A 44 <2> %endif 0 00001A0F 64756D70090944205B db "dump",9,9, "D [range]",13,10 0 00001A18 72616E67655D0D0A 0 00001A20 64756D702062797465 db "dump bytes",9, "DB [range]",13,10 0 00001A29 73094442205B72616E 0 00001A32 67655D0D0A 0 00001A37 64756D7020776F7264 db "dump words",9, "DW [range]",13,10 0 00001A40 73094457205B72616E 0 00001A49 67655D0D0A 0 00001A4E 64756D702064776F72 db "dump dwords",9, "DD [range]",13,10 0 00001A57 6473094444205B7261 0 00001A60 6E67655D0D0A 49 <2> %if _INT 0 00001A66 64756D7020696E7465 db "dump interrupts",9, "DI[R][M][L] interrupt [count]",13,10 0 00001A6F 727275707473094449 0 00001A78 5B525D5B4D5D5B4C5D 0 00001A81 20696E746572727570 0 00001A8A 74205B636F756E745D 0 00001A93 0D0A 51 <2> %endif 52 <2> %if _PM 53 <2> db "dump LDT",9, "DL selector [count]",13,10 54 <2> %endif 55 <2> %if _MCB 0 00001A95 64756D70204D434220 db "dump MCB chain",9, "DM [segment]",13,10 0 00001A9E 636861696E09444D20 0 00001AA7 5B7365676D656E745D 0 00001AB0 0D0A 57 <2> ;db "dump S/SD MCBs",9, "DS",13,10 58 <2> %endif 59 <2> %if _DSTRINGS 0 00001AB2 646973706C61792073 db "display strings",9, "DZ/D$/D[W]# [address]",13,10 0 00001ABB 7472696E677309445A 0 00001AC4 2F44242F445B575D23 0 00001ACD 205B61646472657373 0 00001AD6 5D0D0A 61 <2> %endif 62 <2> %if _PM 63 <2> db "dump ext memory",9, "DX physical_address",13,10 64 <2> db "descriptor mod",9, "D.A/D.D/D.B/D.L/D.T, D.? for help",13,10 65 <2> %endif 66 <2> %if _DT 0 00001AD9 64756D702074657874 db "dump text table",9, "DT [T] [number]",13,10 0 00001AE2 207461626C65094454 0 00001AEB 205B545D205B6E756D 0 00001AF4 6265725D0D0A 68 <2> %endif 0 00001AFA 656E74657209094520 db "enter",9,9, "E [address [list]]",13,10 0 00001B03 5B6164647265737320 0 00001B0C 5B6C6973745D5D0D0A 70 <2> %if _EXTENSIONS 0 00001B15 72756E20657874656E db "run extension",9, "EXT [partition/][extensionfile] [parameters]",13,10 0 00001B1E 73696F6E0945585420 0 00001B27 5B706172746974696F 0 00001B30 6E2F5D5B657874656E 0 00001B39 73696F6E66696C655D 0 00001B42 205B706172616D6574 0 00001B4B 6572735D0D0A 72 <2> %endif 0 00001B51 66696C6C0909462072 db "fill",9,9, "F range [RANGE range|list]",13,10 0 00001B5A 616E6765205B52414E 0 00001B63 47452072616E67657C 0 00001B6C 6C6973745D0D0A 74 <2> %if !_LOADER 0 00001B73 676F090947205B3D61 db "go",9,9, "G [=address] [breakpts]",13,10 0 00001B7C 6464726573735D205B 0 00001B85 627265616B7074735D 0 00001B8E 0D0A 76 <2> %else 77 <2> ; db "go",9,9, "",13,10 78 <2> %endif 0 00001B90 676F746F0909474F54 db "goto",9,9, "GOTO :label",13,10 0 00001B99 4F203A6C6162656C0D 0 00001BA2 0A 0 00001BA3 686578206164642F73 db "hex add/sub",9, "H value1 [value2 [...]]",13,10 0 00001BAC 756209482076616C75 0 00001BB5 6531205B76616C7565 0 00001BBE 32205B2E2E2E5D5D0D 0 00001BC7 0A 0 00001BC8 626173652064697370 db "base display",9, "H BASE=number [GROUP=number] [WIDTH=number] value",13,10 0 00001BD1 6C6179094820424153 0 00001BDA 453D6E756D62657220 0 00001BE3 5B47524F55503D6E75 0 00001BEC 6D6265725D205B5749 0 00001BF5 4454483D6E756D6265 0 00001BFE 725D2076616C75650D 0 00001C07 0A 0 00001C08 696E7075740909495B db "input",9,9, "I[W|D] port",13,10 0 00001C11 577C445D20706F7274 0 00001C1A 0D0A 0 00001C1C 6966206E756D657269 db "if numeric",9, "IF [NOT] (cond) THEN cmd",13,10 0 00001C25 63094946205B4E4F54 0 00001C2E 5D2028636F6E642920 0 00001C37 5448454E20636D640D 0 00001C40 0A 0 00001C41 696620736372697074 db "if script file",9, "IF [NOT] EXISTS Y file [:label] THEN cmd",13,10 0 00001C4A 2066696C6509494620 0 00001C53 5B4E4F545D20455849 0 00001C5C 53545320592066696C 0 00001C65 65205B3A6C6162656C 0 00001C6E 5D205448454E20636D 0 00001C77 640D0A 85 <2> %if !_LOADER 0 00001C7A 6C6F61642070726F67 db "load program",9, "L [address]",13,10 0 00001C83 72616D094C205B6164 0 00001C8C 64726573735D0D0A 0 00001C94 6C6F61642073656374 db "load sectors",9, "L address drive sector count",13,10 0 00001C9D 6F7273094C20616464 0 00001CA6 726573732064726976 0 00001CAF 6520736563746F7220 0 00001CB8 636F756E740D0A 88 <2> %endif 0 00001CBF 6D6F766509094D2072 db "move",9,9, "M range address",13,10 0 00001CC8 616E67652061646472 0 00001CD1 6573730D0A 90 <2> %if !_LOADER 0 00001CD6 38307838362F783837 db "80x86/x87 mode",9, "M [0..6|C|NC|C2|?]",13,10 0 00001CDF 206D6F6465094D205B 0 00001CE8 302E2E367C437C4E43 0 00001CF1 7C43327C3F5D0D0A 0 00001CF9 736574206E616D6509 db "set name",9, "N [[drive:][path]progname.ext [parameters]]",13,10 0 00001D02 4E205B5B6472697665 0 00001D0B 3A5D5B706174685D70 0 00001D14 726F676E616D652E65 0 00001D1D 7874205B706172616D 0 00001D26 65746572735D5D0D0A 0 00001D2F 73657420636F6D6D61 db "set command",9, "K [[drive:][path]progname.ext [parameters]]",13,10 0 00001D38 6E64094B205B5B6472 0 00001D41 6976653A5D5B706174 0 00001D4A 685D70726F676E616D 0 00001D53 652E657874205B7061 0 00001D5C 72616D65746572735D 0 00001D65 5D0D0A 94 <2> %endif 0 00001D68 6F757470757409094F db "output",9,9, "O[W|D] port value",13,10 0 00001D71 5B577C445D20706F72 0 00001D7A 742076616C75650D0A 96 <2> %if !_LOADER 0 00001D83 70726F636565640909 db "proceed",9,9, "P [=address] [count [WHILE cond] [SILENT [count]]]",13,10 0 00001D8C 50205B3D6164647265 0 00001D95 73735D205B636F756E 0 00001D9E 74205B5748494C4520 0 00001DA7 636F6E645D205B5349 0 00001DB0 4C454E54205B636F75 0 00001DB9 6E745D5D5D0D0A 0 00001DC0 717569740909510D0A db "quit",9,9, "Q",13,10 0 00001DC9 717569742070726F63 db "quit process",9, "QA",13,10 0 00001DD2 6573730951410D0A 0 00001DDA 7175697420616E6420 db "quit and break",9, "QB",13,10 0 00001DE3 627265616B0951420D 0 00001DEC 0A 101 <2> %endif 0 00001DED 726567697374657209 db "register",9, "R [register [value]]",13,10 0 00001DF6 52205B726567697374 0 00001DFF 6572205B76616C7565 0 00001E08 5D5D0D0A 103 <2> %if !_LOADER 0 00001E0C 52756E205220657874 db "Run R extended",9, "RE",13,10 0 00001E15 656E6465640952450D 0 00001E1E 0A 0 00001E1F 524520636F6D6D616E db "RE commands",9, "RE.LIST|APPEND|REPLACE [commands]",13,10 0 00001E28 64730952452E4C4953 0 00001E31 547C415050454E447C 0 00001E3A 5245504C414345205B 0 00001E43 636F6D6D616E64735D 0 00001E4C 0D0A 106 <2> %endif 0 00001E4E 52756E20436F6D6D61 db "Run Commandline",9, "RC",13,10 0 00001E57 6E646C696E65095243 0 00001E60 0D0A 0 00001E62 524320636F6D6D616E db "RC commands",9, "RC.LIST|APPEND|REPLACE [commands]",13,10 0 00001E6B 64730952432E4C4953 0 00001E74 547C415050454E447C 0 00001E7D 5245504C414345205B 0 00001E86 636F6D6D616E64735D 0 00001E8F 0D0A 109 <2> %if _MMXSUPP && _RM 110 <2> db "MMX register",9, "RM [BYTES|WORDS|DWORDS|QWORDS]",13,10 111 <2> %endif 112 <2> %if _RN 113 <2> db "FPU register",9, "RN",13,10 114 <2> %endif 0 00001E91 746F67676C65203338 db "toggle 386 regs",9, "RX",13,10 0 00001E9A 362072656773095258 0 00001EA3 0D0A 116 <2> %if !_LOADER 0 00001EA5 736561726368090953 db "search",9,9, "S range [REVERSE] [SILENT number] [RANGE range|list]",13,10 0 00001EAE 2072616E6765205B52 0 00001EB7 4556455253455D205B 0 00001EC0 53494C454E54206E75 0 00001EC9 6D6265725D205B5241 0 00001ED2 4E47452072616E6765 0 00001EDB 7C6C6973745D0D0A 0 00001EE3 736C6565700909534C db "sleep",9,9, "SLEEP count [SECONDS|TICKS]",13,10 0 00001EEC 45455020636F756E74 0 00001EF5 205B5345434F4E4453 0 00001EFE 7C5449434B535D0D0A 0 00001F07 747261636509095420 db "trace",9,9, "T [=address] [count [WHILE cond] [SILENT [count]]]",13,10 0 00001F10 5B3D61646472657373 0 00001F19 5D205B636F756E7420 0 00001F22 5B5748494C4520636F 0 00001F2B 6E645D205B53494C45 0 00001F34 4E54205B636F756E74 0 00001F3D 5D5D5D0D0A 0 00001F42 747261636520286578 db "trace (exc str)",9 0 00001F4B 63207374722909 0 00001F52 5450205B3D61646472 db "TP [=address] [count [WHILE cond] [SILENT [count]]]",13,10 0 00001F5B 6573735D205B636F75 0 00001F64 6E74205B5748494C45 0 00001F6D 20636F6E645D205B53 0 00001F76 494C454E54205B636F 0 00001F7F 756E745D5D5D0D0A 0 00001F87 7472616365206D6F64 db "trace mode",9, "TM [0|1]",13,10 0 00001F90 6509544D205B307C31 0 00001F99 5D0D0A 123 <2> %if _TSR 0 00001F9C 656E74657220545352 db "enter TSR mode",9, "TSR",13,10 0 00001FA5 206D6F646509545352 0 00001FAE 0D0A 125 <2> %endif 0 00001FB0 756E617373656D626C db "unassemble",9, "U [range]",13,10 0 00001FB9 650955205B72616E67 0 00001FC2 655D0D0A 127 <2> %if _VXCHG 0 00001FC6 766965772073637265 db "view screen",9, "V [ON|OFF [KEEP|NOKEEP]]",13,10 0 00001FCF 656E0956205B4F4E7C 0 00001FD8 4F4646205B4B454550 0 00001FE1 7C4E4F4B4545505D5D 0 00001FEA 0D0A 129 <2> %endif 0 00001FEC 77726974652070726F db "write program",9, "W [address]",13,10 0 00001FF5 6772616D0957205B61 0 00001FFE 6464726573735D0D0A 0 00002007 777269746520736563 db "write sectors",9, "W address drive sector count",13,10 0 00002010 746F72730957206164 0 00002019 647265737320647269 0 00002022 766520736563746F72 0 0000202B 20636F756E740D0A 132 <2> %if _EMS 133 <2> db "expanded mem",9, "XA/XD/XM/XR/XS, X? for help",13,10 134 <2> %endif 135 <2> %endif 0 00002033 72756E207363726970 db "run script",9, "Y [partition/][scriptfile] [:label]",13,10 0 0000203C 740959205B70617274 0 00002045 6974696F6E2F5D5B73 0 0000204E 637269707466696C65 0 00002057 5D205B3A6C6162656C 0 00002060 5D0D0A 0 00002063 0D0A db 13,10 0 00002065 4164646974696F6E61 db "Additional help topics:",13,10 0 0000206E 6C2068656C7020746F 0 00002077 706963733A0D0A 139 <2> %if _EXTHELP 0 0000207E 205265676973746572 db " Registers",9, "?R",13,10 0 00002087 73093F520D0A 0 0000208D 20466C61677309093F db " Flags",9,9, "?F",13,10 0 00002096 460D0A 142 <2> %if _COND 0 00002099 20436F6E646974696F db " Conditionals",9, "?C",13,10 0 000020A2 6E616C73093F430D0A 144 <2> %endif 145 <2> %if _EXPRESSIONS 0 000020AB 204578707265737369 db " Expressions",9, "?E",13,10 0 000020B4 6F6E73093F450D0A 147 <2> %endif 148 <2> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 0 000020BC 205661726961626C65 db " Variables",9, "?V",13,10 0 000020C5 73093F560D0A 150 <2> %endif 0 000020CB 205220457874656E64 db " R Extended",9, "?RE",13,10 0 000020D4 6564093F52450D0A 0 000020DC 2052756E206B657977 db " Run keywords",9, "?RUN",13,10 0 000020E5 6F726473093F52554E 0 000020EE 0D0A 153 <2> %if _OPTIONS 0 000020F0 204F7074696F6E7320 db " Options pages",9, "?OPTIONS",13,10 0 000020F9 7061676573093F4F50 0 00002102 54494F4E530D0A 0 00002109 204F7074696F6E7309 db " Options",9, "?O",13,10 0 00002112 3F4F0D0A 156 <2> %endif 157 <2> %endif 158 <2> %if _EXTHELPBOOT 159 <2> %if _BOOTLDR 0 00002116 20426F6F74206C6F61 db " Boot loading",9, "?BOOT",13,10 0 0000211F 64696E67093F424F4F 0 00002128 540D0A 161 <2> %endif 162 <2> %endif 0 0000212B 206C44656275672062 db " lDebug build",9, "?BUILD",13,10 0 00002134 75696C64093F425549 0 0000213D 4C440D0A 0 00002141 206C44656275672062 db " lDebug build",9, "?B",13,10 0 0000214A 75696C64093F420D0A 165 <2> %if _EXTHELP 0 00002153 206C44656275672073 db " lDebug sources",9, "?SOURCE",13,10 0 0000215C 6F7572636573093F53 0 00002165 4F555243450D0A 0 0000216C 206C4465627567206C db " lDebug license",9, "?L",13,10 0 00002175 6963656E7365093F4C 0 0000217E 0D0A 168 <2> %endif 169 <2> %if _PM 170 <2> db 13,10 171 <2> db "Prompts: '-' = real or V86 mode; '#' = protected mode",13,10 172 <2> %endif 63 <1> %ifn %2 0 00002180 00 asciz 65 <1> %endif 95 96 %if _EXTHELP 97 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 97 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 0000248E 534F5552434500 .source:asciz "SOURCE" 99 100 usemessagesegment === Switch to base=008120h -> "MESSAGESEGMENT" 100 ------------------ note: usesection MESSAGESEGMENT 101 .help_source: helppage source 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %endif 19 <2> 0 00002181 546865206F72696769 db "The original lDebug sources can be obtained from the repo located at",13,10 0 0000218A 6E616C206C44656275 0 00002193 6720736F7572636573 0 0000219C 2063616E206265206F 0 000021A5 627461696E65642066 0 000021AE 726F6D207468652072 0 000021B7 65706F206C6F636174 0 000021C0 65642061740D0A 0 000021C7 68747470733A2F2F68 db "https://hg.pushbx.org/ecm/ldebug (E. C. Masloch's repo)",13,10 0 000021D0 672E7075736862782E 0 000021D9 6F72672F65636D2F6C 0 000021E2 64656275672028452E 0 000021EB 20432E204D61736C6F 0 000021F4 63682773207265706F 0 000021FD 290D0A 0 00002200 0D0A db 13,10 0 00002202 52656C656173657320 db "Releases of lDebug are available via the website at",13,10 0 0000220B 6F66206C4465627567 0 00002214 206172652061766169 0 0000221D 6C61626C6520766961 0 00002226 207468652077656273 0 0000222F 6974652061740D0A 0 00002237 68747470733A2F2F70 db "https://pushbx.org/ecm/web/#projects-ldebug",13,10 0 00002240 75736862782E6F7267 0 00002249 2F65636D2F7765622F 0 00002252 2370726F6A65637473 0 0000225B 2D6C64656275670D0A 0 00002264 0D0A db 13,10 0 00002266 546865206D6F737420 db "The most recent manual is hosted at https://pushbx.org/ecm/doc/ in the",13,10 0 0000226F 726563656E74206D61 0 00002278 6E75616C2069732068 0 00002281 6F7374656420617420 0 0000228A 68747470733A2F2F70 0 00002293 75736862782E6F7267 0 0000229C 2F65636D2F646F632F 0 000022A5 20696E207468650D0A 0 000022AE 66696C6573206C6465 db "files ldebug.htm, ldebug.txt, and ldebug.pdf",13,10 0 000022B7 6275672E68746D2C20 0 000022C0 6C64656275672E7478 0 000022C9 742C20616E64206C64 0 000022D2 656275672E7064660D 0 000022DB 0A 63 <1> %ifn %2 0 000022DC 00 asciz 65 <1> %endif 102 %endif 103 104 %if !_LOADER 105 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 105 ------------------ note: usesection lDEBUG_DATA_ENTRY 106 .re: 0 00002495 524500 asciz "RE" 108 109 usemessagesegment === Switch to base=008120h -> "MESSAGESEGMENT" 109 ------------------ note: usesection MESSAGESEGMENT 110 .help_re: helppage re 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %endif 19 <2> 0 000022DD 5468652052554E2063 db "The RUN commands (T, TP, P, G) and the RE command use the RE command",13,10 0 000022E6 6F6D6D616E64732028 0 000022EF 542C2054502C20502C 0 000022F8 20472920616E642074 0 00002301 686520524520636F6D 0 0000230A 6D616E642075736520 0 00002313 74686520524520636F 0 0000231C 6D6D616E640D0A 0 00002323 62756666657220746F db "buffer to run commands. Most commands are allowed to be run from the",13,10 0 0000232C 2072756E20636F6D6D 0 00002335 616E64732E204D6F73 0 0000233E 7420636F6D6D616E64 0 00002347 732061726520616C6C 0 00002350 6F77656420746F2062 0 00002359 652072756E2066726F 0 00002362 6D207468650D0A 0 00002369 524520627566666572 db "RE buffer. Disallowed commands include program-loading L, A, E that",13,10 0 00002372 2E20446973616C6C6F 0 0000237B 77656420636F6D6D61 0 00002384 6E647320696E636C75 0 0000238D 64652070726F677261 0 00002396 6D2D6C6F6164696E67 0 0000239F 204C2C20412C204520 0 000023A8 746861740D0A 0 000023AE 737769746368657320 db "switches the line input mode, TSR, Q, Y, RE, and further RUN commands.",13,10 0 000023B7 746865206C696E6520 0 000023C0 696E707574206D6F64 0 000023C9 652C205453522C2051 0 000023D2 2C20592C2052452C20 0 000023DB 616E64206675727468 0 000023E4 65722052554E20636F 0 000023ED 6D6D616E64732E0D0A 0 000023F6 5768656E2074686520 db "When the RE buffer is used as input during T, TP, or P with the",13,10 0 000023FF 524520627566666572 0 00002408 206973207573656420 0 00002411 617320696E70757420 0 0000241A 647572696E6720542C 0 00002423 2054502C206F722050 0 0000242C 207769746820746865 0 00002435 0D0A 0 00002437 53494C454E54206B65 db "SILENT keyword, commands that use the auxbuff are also disallowed and",13,10 0 00002440 79776F72642C20636F 0 00002449 6D6D616E6473207468 0 00002452 617420757365207468 0 0000245B 652061757862756666 0 00002464 2061726520616C736F 0 0000246D 20646973616C6C6F77 0 00002476 656420616E640D0A 0 0000247E 77696C6C20656D6974 db "will emit an error noting the conflict.",13,10 0 00002487 20616E206572726F72 0 00002490 206E6F74696E672074 0 00002499 686520636F6E666C69 0 000024A2 63742E0D0A 0 000024A7 0D0A db 13,10 0 000024A9 52452E4C4953542073 db "RE.LIST shows the current RE buffer contents in a format usable by",13,10 0 000024B2 686F77732074686520 0 000024BB 63757272656E742052 0 000024C4 452062756666657220 0 000024CD 636F6E74656E747320 0 000024D6 696E206120666F726D 0 000024DF 617420757361626C65 0 000024E8 2062790D0A 0 000024ED 746865206F74686572 db "the other RE commands. RE.APPEND appends the following commands to",13,10 0 000024F6 20524520636F6D6D61 0 000024FF 6E64732E2052452E41 0 00002508 5050454E4420617070 0 00002511 656E64732074686520 0 0000251A 666F6C6C6F77696E67 0 00002523 20636F6D6D616E6473 0 0000252C 20746F0D0A 0 00002531 746865206275666665 db "the buffer, if they fit. RE.REPLACE appends to the start of the",13,10 0 0000253A 722C20696620746865 0 00002543 79206669742E205245 0 0000254C 2E5245504C41434520 0 00002555 617070656E64732074 0 0000255E 6F2074686520737461 0 00002567 7274206F6620746865 0 00002570 0D0A 0 00002572 6275666665722E2057 db "buffer. When specifying commands, an unescaped semicolon is parsed",13,10 0 0000257B 68656E207370656369 0 00002584 6679696E6720636F6D 0 0000258D 6D616E64732C20616E 0 00002596 20756E657363617065 0 0000259F 642073656D69636F6C 0 000025A8 6F6E20697320706172 0 000025B1 7365640D0A 0 000025B6 61732061206C696E65 db "as a linebreak to break apart individual commands. Backslashes can",13,10 0 000025BF 627265616B20746F20 0 000025C8 627265616B20617061 0 000025D1 727420696E64697669 0 000025DA 6475616C20636F6D6D 0 000025E3 616E64732E20426163 0 000025EC 6B736C617368657320 0 000025F5 63616E0D0A 0 000025FA 626520757365642074 db "be used to escape semicolons and backslashes themselves.",13,10 0 00002603 6F2065736361706520 0 0000260C 73656D69636F6C6F6E 0 00002615 7320616E6420626163 0 0000261E 6B736C617368657320 0 00002627 7468656D73656C7665 0 00002630 732E0D0A 0 00002634 0D0A db 13,10 0 00002636 507265666978696E67 db "Prefixing a line with an @ (AT sign) causes the command not to be",13,10 0 0000263F 2061206C696E652077 0 00002648 69746820616E204020 0 00002651 284154207369676E29 0 0000265A 206361757365732074 0 00002663 686520636F6D6D616E 0 0000266C 64206E6F7420746F20 0 00002675 62650D0A 0 00002679 73686F776E20746F20 db "shown to the standard output of the debugger when run. Otherwise,",13,10 0 00002682 746865207374616E64 0 0000268B 617264206F75747075 0 00002694 74206F662074686520 0 0000269D 646562756767657220 0 000026A6 7768656E2072756E2E 0 000026AF 204F74686572776973 0 000026B8 652C0D0A 0 000026BC 74686520636F6D6D61 db "the command will be shown with a percent sign % or ~% prompt.",13,10 0 000026C5 6E642077696C6C2062 0 000026CE 652073686F776E2077 0 000026D7 697468206120706572 0 000026E0 63656E74207369676E 0 000026E9 2025206F72207E2520 0 000026F2 70726F6D70742E0D0A 0 000026FB 0D0A db 13,10 0 000026FD 546865206465666175 db "The default RE buffer content is @R. This content is also",13,10 0 00002706 6C7420524520627566 0 0000270F 66657220636F6E7465 0 00002718 6E742069732040522E 0 00002721 205468697320636F6E 0 0000272A 74656E742069732061 0 00002733 6C736F0D0A 0 00002738 646574656374656420 db "detected and handled specifically; if found as the only command",13,10 0 00002741 616E642068616E646C 0 0000274A 656420737065636966 0 00002753 6963616C6C793B2069 0 0000275C 6620666F756E642061 0 00002765 7320746865206F6E6C 0 0000276E 7920636F6D6D616E64 0 00002777 0D0A 0 00002779 7468652068616E646C db "the handler directly calls the register dump implementation",13,10 0 00002782 657220646972656374 0 0000278B 6C792063616C6C7320 0 00002794 746865207265676973 0 0000279D 7465722064756D7020 0 000027A6 696D706C656D656E74 0 000027AF 6174696F6E0D0A 0 000027B6 776974686F75742073 db "without setting up and tearing down the special execution",13,10 0 000027BF 657474696E67207570 0 000027C8 20616E642074656172 0 000027D1 696E6720646F776E20 0 000027DA 746865207370656369 0 000027E3 616C20657865637574 0 000027EC 696F6E0D0A 0 000027F1 656E7669726F6E6D65 db "environment used to run arbitrary commands from the RE buffer.",13,10 0 000027FA 6E7420757365642074 0 00002803 6F2072756E20617262 0 0000280C 69747261727920636F 0 00002815 6D6D616E6473206672 0 0000281E 6F6D20746865205245 0 00002827 206275666665722E0D 0 00002830 0A 63 <1> %ifn %2 0 00002831 00 asciz 65 <1> %endif 111 %endif 112 113 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 113 ------------------ note: usesection lDEBUG_DATA_ENTRY 114 .run: 0 00002498 52554E00 asciz "RUN" 116 117 %if !_LOADER 118 usemessagesegment === Switch to base=008120h -> "MESSAGESEGMENT" 118 ------------------ note: usesection MESSAGESEGMENT 119 .help_run: helppage run 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %endif 19 <2> 0 00002832 542028747261636529 db "T (trace), TP (trace except proceed past string operations), and P (proceed)",13,10 0 0000283B 2C2054502028747261 0 00002844 636520657863657074 0 0000284D 2070726F6365656420 0 00002856 706173742073747269 0 0000285F 6E67206F7065726174 0 00002868 696F6E73292C20616E 0 00002871 642050202870726F63 0 0000287A 656564290D0A 0 00002880 63616E20626520666F db "can be followed by a number of repetitions and then the keyword WHILE,",13,10 0 00002889 6C6C6F776564206279 0 00002892 2061206E756D626572 0 0000289B 206F66207265706574 0 000028A4 6974696F6E7320616E 0 000028AD 64207468656E207468 0 000028B6 65206B6579776F7264 0 000028BF 205748494C452C0D0A 0 000028C8 7768696368206D7573 db "which must be followed by a conditional expression.",13,10 0 000028D1 7420626520666F6C6C 0 000028DA 6F7765642062792061 0 000028E3 20636F6E646974696F 0 000028EC 6E616C206578707265 0 000028F5 7373696F6E2E0D0A 0 000028FD 0D0A db 13,10 0 000028FF 5468652073656C6563 db "The selected run command is repeated as many times as specified by the",13,10 0 00002908 7465642072756E2063 0 00002911 6F6D6D616E64206973 0 0000291A 207265706561746564 0 00002923 206173206D616E7920 0 0000292C 74696D657320617320 0 00002935 737065636966696564 0 0000293E 206279207468650D0A 0 00002947 6E756D6265722C206F db "number, or until the WHILE condition evaluates no longer to true.",13,10 0 00002950 7220756E74696C2074 0 00002959 6865205748494C4520 0 00002962 636F6E646974696F6E 0 0000296B 206576616C75617465 0 00002974 73206E6F206C6F6E67 0 0000297D 657220746F20747275 0 00002986 652E0D0A 0 0000298A 0D0A db 13,10 0 0000298C 416674657220746865 db "After the number of repetitions or (if present) after the WHILE condition",13,10 0 00002995 206E756D626572206F 0 0000299E 662072657065746974 0 000029A7 696F6E73206F722028 0 000029B0 69662070726573656E 0 000029B9 742920616674657220 0 000029C2 746865205748494C45 0 000029CB 20636F6E646974696F 0 000029D4 6E0D0A 0 000029D7 746865206B6579776F db "the keyword SILENT may follow. If that is the case, all register dumps",13,10 0 000029E0 72642053494C454E54 0 000029E9 206D617920666F6C6C 0 000029F2 6F772E204966207468 0 000029FB 617420697320746865 0 00002A04 20636173652C20616C 0 00002A0D 6C2072656769737465 0 00002A16 722064756D70730D0A 0 00002A1F 646F6E652064757269 db "done during the run are buffered by the debugger and the run remains",13,10 0 00002A28 6E6720746865207275 0 00002A31 6E2061726520627566 0 00002A3A 666572656420627920 0 00002A43 746865206465627567 0 00002A4C 67657220616E642074 0 00002A55 68652072756E207265 0 00002A5E 6D61696E730D0A 0 00002A65 73696C656E742E2041 db "silent. After the run, the last dumps are replayed from the buffer",13,10 0 00002A6E 667465722074686520 0 00002A77 72756E2C2074686520 0 00002A80 6C6173742064756D70 0 00002A89 732061726520726570 0 00002A92 6C617965642066726F 0 00002A9B 6D2074686520627566 0 00002AA4 6665720D0A 0 00002AA9 616E6420646973706C db "and displayed. At most as many dumps as fit into the buffer are",13,10 0 00002AB2 617965642E20417420 0 00002ABB 6D6F7374206173206D 0 00002AC4 616E792064756D7073 0 00002ACD 206173206669742069 0 00002AD6 6E746F207468652062 0 00002ADF 756666657220617265 0 00002AE8 0D0A 0 00002AEA 646973706C61796564 db "displayed. (The buffer is currently 8 KiB sized by default, though the",13,10 0 00002AF3 2E2028546865206275 0 00002AFC 666665722069732063 0 00002B05 757272656E746C7920 0 00002B0E 38204B69422073697A 0 00002B17 656420627920646566 0 00002B20 61756C742C2074686F 0 00002B29 756768207468650D0A 0 00002B32 2F4120737769746368 db "/A switch can be specified to init to grow it up to 24 KiB.)",13,10 0 00002B3B 2063616E2062652073 0 00002B44 706563696669656420 0 00002B4D 746F20696E69742074 0 00002B56 6F2067726F77206974 0 00002B5F 20757020746F203234 0 00002B68 204B69422E290D0A 0 00002B70 0D0A db 13,10 0 00002B72 49662061206E756D62 db "If a number follows behind the SILENT keyword, only at most that many",13,10 0 00002B7B 657220666F6C6C6F77 0 00002B84 7320626568696E6420 0 00002B8D 7468652053494C454E 0 00002B96 54206B6579776F7264 0 00002B9F 2C206F6E6C79206174 0 00002BA8 206D6F737420746861 0 00002BB1 74206D616E790D0A 0 00002BB9 64756D707320617265 db "dumps are displayed from the buffer. The dumps that are displayed",13,10 0 00002BC2 20646973706C617965 0 00002BCB 642066726F6D207468 0 00002BD4 65206275666665722E 0 00002BDD 205468652064756D70 0 00002BE6 732074686174206172 0 00002BEF 6520646973706C6179 0 00002BF8 65640D0A 0 00002BFC 61726520616C776179 db "are always those last written into the buffer, thus last occurred.",13,10 0 00002C05 732074686F7365206C 0 00002C0E 617374207772697474 0 00002C17 656E20696E746F2074 0 00002C20 686520627566666572 0 00002C29 2C2074687573206C61 0 00002C32 7374206F6363757272 0 00002C3B 65642E0D0A 63 <1> %ifn %2 0 00002C40 00 asciz 65 <1> %endif 120 %endif 121 122 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 122 ------------------ note: usesection lDEBUG_DATA_ENTRY 123 124 align 2, db 0 125 .build_array: 0 0000249C [542D] dw .build_nameversion + NONCOMPRESSEDFLAG 0 0000249E [682D] dw .build_linebreak + NONCOMPRESSEDFLAG 128 .build_version_amount: equ ($ - .build_array) / 2 0 000024A0 [A42D] dw .build_ldebug + NONCOMPRESSEDFLAG 0 000024A2 [E42D] dw .build_lmacros + NONCOMPRESSEDFLAG 131 %if _SYMBOLIC 132 dw .build_symsnip + NONCOMPRESSEDFLAG 133 %endif 134 %if _BOOTLDR 0 000024A4 [242E] dw .build_scanptab + NONCOMPRESSEDFLAG 136 %endif 0 000024A6 [642E] dw .build_inicomp + NONCOMPRESSEDFLAG 138 %if (_BOOTLDR && _CHECKSUM) || _CHECKSUM_NEW 139 dw .build_inicheck + NONCOMPRESSEDFLAG 140 %endif 141 %if _BOOTLDR 0 000024A8 [A42E] dw .build_ldosboot + NONCOMPRESSEDFLAG 143 %endif 144 .build_short_amount: equ ($ - .build_array) / 2 145 %if _EXTHELP 0 000024AA [E42E] dw .build_long 147 %endif 148 .build_long_amount: equ ($ - .build_array) / 2 149 150 %if _OPTIONS && _EXTHELP 151 align 2, db 0 152 .options_array: 0 000024AC [9D45] dw .options_1 0 000024AE [E74A] dw .options_2 0 000024B0 [2C4E] dw .options_3 0 000024B2 [E151] dw .options_4 0 000024B4 [3254] dw .options_5 0 000024B6 [3354] dw .options_6 159 .options_array_option_amount: equ ($ - .options_array) / 2 0 000024B8 [7F57] dw .flags_1 0 000024BA [2B5B] dw .asmoptions_1 162 .options_array_amount: equ ($ - .options_array) / 2 163 164 .options_scan: 0 000024BC 313233343536 db "123456" 166 .options_scan_amount: equ ($ - .options_scan) 167 %if .options_array_option_amount != .options_scan_amount 168 %error Array size mismatch 169 %endif 170 171 .string_options: 0 000024C2 4F5054494F4E5300 asciz "OPTIONS" 173 174 usemessagesegment === Switch to base=008120h -> "MESSAGESEGMENT" 174 ------------------ note: usesection MESSAGESEGMENT 175 .options_pages: helppage options 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %endif 19 <2> 0 00002C41 456E746572206F6E65 db "Enter one of the following commands to get a corresponding help page:",13,10 0 00002C4A 206F66207468652066 0 00002C53 6F6C6C6F77696E6720 0 00002C5C 636F6D6D616E647320 0 00002C65 746F20676574206120 0 00002C6E 636F72726573706F6E 0 00002C77 64696E672068656C70 0 00002C80 20706167653A0D0A 0 00002C88 0D0A db 13,10 0 00002C8A 3F4F310944434F3120 db "?O1",9,"DCO1 - Options",13,10 0 00002C93 2D204F7074696F6E73 0 00002C9C 0D0A 0 00002C9E 3F4F320944434F3220 db "?O2",9,"DCO2 - More Options",13,10 0 00002CA7 2D204D6F7265204F70 0 00002CB0 74696F6E730D0A 0 00002CB7 3F4F330944434F3320 db "?O3",9,"DCO3 - More Options",13,10 0 00002CC0 2D204D6F7265204F70 0 00002CC9 74696F6E730D0A 0 00002CD0 3F4F340944434F3420 db "?O4",9,"DCO4 - Interrupt Hooking Options",13,10 0 00002CD9 2D20496E7465727275 0 00002CE2 707420486F6F6B696E 0 00002CEB 67204F7074696F6E73 0 00002CF4 0D0A 0 00002CF6 3F4F360944434F3620 db "?O6",9,"DCO6 - More Options",13,10 0 00002CFF 2D204D6F7265204F70 0 00002D08 74696F6E730D0A 0 00002D0F 3F4F4909444946202D db "?OI",9,"DIF - Internal Flags",13,10 0 00002D18 20496E7465726E616C 0 00002D21 20466C6167730D0A 0 00002D29 3F4F410944414F202D db "?OA",9,"DAO - Assembler/Disassembler Options",13,10 0 00002D32 20417373656D626C65 0 00002D3B 722F44697361737365 0 00002D44 6D626C6572204F7074 0 00002D4D 696F6E730D0A 63 <1> %ifn %2 0 00002D53 00 asciz 65 <1> %endif 176 %endif 177 178 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 178 ------------------ note: usesection lDEBUG_DATA_ENTRY 179 .string_build: 0 000024CA 4255494C4400 asciz "BUILD" 181 .string_version: 0 000024D0 56455253494F4E00 asciz "VERSION" 183 184 usemessagesegment === Switch to base=008120h -> "MESSAGESEGMENT" 184 ------------------ note: usesection MESSAGESEGMENT 185 align 2, db 0 186 .build_nameversion: 0 00002D54 6C4465627567202832 asciz _PROGNAME,_VERSION 0 00002D5D 3032362D30332D3133 0 00002D66 2900 188 189 align 2, db 0 190 .build_linebreak: 0 00002D68 0D0A00 asciz 13,10 0 00002D6B 00 _fill_at_least 80, 0, .build_nameversion 193 194 align 2, db 0 195 .build_ldebug: 196 %ifnidn _REVISIONID,"" 197 db "Source Control Revision ID: ",_REVISIONID,13,10 198 %endif 0 00002DA4 00 asciz 0 00002DA5 00 _fill_at_least 64, 0, .build_ldebug 201 202 align 2, db 0 203 .build_lmacros: 0 00002DE4 0000 fill_at_least 64, 0, asciz _REVISIONID_LMACROS 205 206 %if _SYMBOLIC 207 align 2, db 0 208 .build_symsnip: 209 fill_at_least 64, 0, asciz _REVISIONID_SYMSNIP 210 %endif 211 212 %if _BOOTLDR 213 align 2, db 0 214 .build_scanptab: 0 00002E24 0000 fill_at_least 64, 0, asciz _REVISIONID_SCANPTAB 216 %endif 217 218 align 2, db 0 219 .build_inicomp: 0 00002E64 0000 fill_at_least 64, 0, asciz _REVISIONID_INICOMP 221 222 %if (_BOOTLDR && _CHECKSUM) || _CHECKSUM_NEW 223 align 2, db 0 224 .build_inicheck: 225 fill_at_least 64, 0, asciz _REVISIONID_INICHECK 226 %endif 227 228 %if _BOOTLDR 229 align 2, db 0 230 .build_ldosboot: 0 00002EA4 0000 fill_at_least 64, 0, asciz _REVISIONID_LDOSBOOT 232 %endif 233 234 %if _EXTHELP 235 .build_long: helppage build 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %endif 19 <2> 0 00002EE4 0D0A db 13,10 21 <2> %if _PM 22 <2> db "DPMI-capable",13,10 23 <2> %if _NOEXTENDER 24 <2> db " DPMI host without extender",13,10 25 <2> %endif 26 <2> %if 0 27 <2> %if _WIN9XSUPP 28 <2> db " No Windows 4 DPMI hook",13,10 29 <2> %endif 30 <2> %if _PM && _DOSEMU 31 <2> db " No DOSEMU DPMI hook",13,10 32 <2> %endif 33 <2> %else 34 <2> db " Automatic DPMI entrypoint hook detection",13,10 35 <2> %endif 36 <2> %if _EXCCSIP 37 <2> db " Display exception address",13,10 38 <2> %endif 39 <2> %if _DISPHOOK 40 <2> db " Display hooking DPMI entry",13,10 41 <2> %endif 42 <2> %endif 43 <2> %if _DEBUG 44 <2> db "Debuggable",13,10 45 <2> %if _DEBUG_COND 46 <2> db "Conditionally Debuggable",13,10 47 <2> %endif 48 <2> %endif 49 <2> %if _INT 0 00002EE6 444920636F6D6D616E db "DI command",13,10 0 00002EEF 640D0A 51 <2> %endif 52 <2> %if _MCB 0 00002EF2 444D20636F6D6D616E db "DM command",13,10 0 00002EFB 640D0A 54 <2> %endif 55 <2> %if _DSTRINGS 0 00002EFE 4420737472696E6720 db "D string commands",13,10 0 00002F07 636F6D6D616E64730D 0 00002F10 0A 57 <2> %endif 58 <2> %if _SDUMP 0 00002F11 53206D617463682064 db "S match dumps line of following data",13,10 0 00002F1A 756D7073206C696E65 0 00002F23 206F6620666F6C6C6F 0 00002F2C 77696E672064617461 0 00002F35 0D0A 60 <2> %endif 61 <2> %if _RN 62 <2> db "RN command",13,10 63 <2> %endif 64 <2> %if _USESDA 0 00002F37 416363657373205344 db "Access SDA current PSP field",13,10 0 00002F40 412063757272656E74 0 00002F49 20505350206669656C 0 00002F52 640D0A 66 <2> %endif 67 <2> %if _VDD 0 00002F55 4C6F6164204E545644 db "Load NTVDM VDD for sector access",13,10 0 00002F5E 4D2056444420666F72 0 00002F67 20736563746F722061 0 00002F70 63636573730D0A 69 <2> %endif 70 <2> %if _EMS 71 <2> db "X commands for EMS access",13,10 72 <2> %endif 73 <2> %if _MMXSUPP 0 00002F77 524D20636F6D6D616E db "RM command and reading MMX registers as variables",13,10 0 00002F80 6420616E6420726561 0 00002F89 64696E67204D4D5820 0 00002F92 726567697374657273 0 00002F9B 206173207661726961 0 00002FA4 626C65730D0A 75 <2> %endif 76 <2> %if _EXPRESSIONS 0 00002FAA 45787072657373696F db "Expression evaluator",13,10 0 00002FB3 6E206576616C756174 0 00002FBC 6F720D0A 78 <2> %endif 79 <2> %if _INDIRECTION 0 00002FC0 20496E646972656374 db " Indirection in expressions",13,10 0 00002FC9 696F6E20696E206578 0 00002FD2 7072657373696F6E73 0 00002FDB 0D0A 81 <2> %endif 82 <2> %if _VARIABLES 0 00002FDD 5661726961626C6573 db "Variables with user-defined purpose",13,10 0 00002FE6 207769746820757365 0 00002FEF 722D646566696E6564 0 00002FF8 20707572706F73650D 0 00003001 0A 84 <2> %endif 85 <2> %if _OPTIONS 0 00003002 446562756767657220 db "Debugger option and status variables",13,10 0 0000300B 6F7074696F6E20616E 0 00003014 642073746174757320 0 0000301D 7661726961626C6573 0 00003026 0D0A 87 <2> %endif 88 <2> %if _PSPVARIABLES 0 00003028 505350207661726961 db "PSP variables",13,10 0 00003031 626C65730D0A 90 <2> %endif 91 <2> %if _COND 0 00003037 436F6E646974696F6E db "Conditional jump notice in register dump",13,10 0 00003040 616C206A756D70206E 0 00003049 6F7469636520696E20 0 00003052 726567697374657220 0 0000305B 64756D700D0A 93 <2> %endif 94 <2> %if _TSR 0 00003061 545352206D6F646520 db "TSR mode (Process detachment)",13,10 0 0000306A 2850726F6365737320 0 00003073 6465746163686D656E 0 0000307C 74290D0A 96 <2> %endif 97 <2> %if _DEVICE 0 00003080 4C6F616461626C6520 db "Loadable device driver",13,10 0 00003089 646576696365206472 0 00003092 697665720D0A 99 <2> %endif 100 <2> %if _BOOTLDR 0 00003098 426F6F74206C6F6164 db "Boot loader",13,10 0 000030A1 65720D0A 102 <2> %endif 103 <2> %if _BREAKPOINTS 0 000030A5 5065726D616E656E74 db "Permanent breakpoints",13,10 0 000030AE 20627265616B706F69 0 000030B7 6E74730D0A 105 <2> %endif 106 <2> %push 0 000030BC 496E74657263657074 db "Intercepted" 0 000030C5 6564 108 <2> %if _PM 109 <2> db " 86M" 110 <2> %endif 0 000030C7 20696E746572727570 db " interrupts:" 0 000030D0 74733A 112 <2> %define %$pref " " 113 <2> %macro dispint 2.nolist 114 <2> %if %1 115 <2> db %$pref, %2 116 <2> %define %$pref ", " 117 <2> %endif 118 <2> %endmacro 0 000030D3 203030 dispint _CATCHINT00, "00" 0 000030D6 2C203031 dispint _CATCHINT01, "01" 0 000030DA 2C203033 dispint _CATCHINT03, "03" 0 000030DE 2C203036 dispint _CATCHINT06, "06" 123 <2> dispint _CATCHINT07, "07" 0 000030E2 2C203043 dispint _CATCHINT0C, "0C" 0 000030E6 2C203044 dispint _CATCHINT0D, "0D" 0 000030EA 2C203138 dispint _CATCHINT18, "18" 0 000030EE 2C203139 dispint _CATCHINT19, "19" 128 <2> %ifidn %$pref," " 129 <2> db " none" 130 <2> %endif 0 000030F2 0D0A db 13,10 132 <2> %if _PM || _CATCHINT08 0 000030F4 50726F636573736564 db "Processed" 134 <2> %if _PM 135 <2> db " 86M" 136 <2> %endif 0 000030FD 20696E746572727570 db " interrupts:" 0 00003106 74733A 138 <2> %define %$pref " " 0 00003109 203038 dispint _CATCHINT08, "08" 140 <2> dispint _PM, "2F.1687" 141 <2> %ifidn %$pref," " 142 <2> db " none" 143 <2> %endif 0 0000310C 0D0A db 13,10 145 <2> %endif 146 <2> %if _PM 147 <2> db "Intercepted DPMI exceptions:" 148 <2> %define %$pref " " 149 <2> dispint _CATCHEXC00, "00" 150 <2> dispint _CATCHEXC01, "01" 151 <2> dispint _CATCHEXC03, "03" 152 <2> dispint _CATCHEXC06, "06" 153 <2> dispint _CATCHEXC0C, "0C" 154 <2> dispint _CATCHEXC0D, "0D" 155 <2> dispint _CATCHEXC0E, "0E" 156 <2> %ifidn %$pref," " 157 <2> db " none" 158 <2> %endif 159 <2> db 13,10 160 <2> %endif 161 <2> %if _PM && _CATCHPMINT41 162 <2> db "Intercepted DPMI interrupts:" 163 <2> %define %$pref " " 164 <2> dispint _CATCHPMINT41, "41.004F" 165 <2> %ifidn %$pref," " 166 <2> db " none" 167 <2> %endif 168 <2> db 13,10 169 <2> %endif 170 <2> %if _PM && _CATCHPMINT214C 171 <2> db "Processed DPMI interrupts:" 172 <2> %define %$pref " " 173 <2> dispint _CATCHPMINT214C, "21.4C" 174 <2> %ifidn %$pref," " 175 <2> db " none" 176 <2> %endif 177 <2> db 13,10 178 <2> %endif 179 <2> %unmacro dispint 2.nolist 180 <2> %pop 181 <2> %if _EXTHELP 0 0000310E 457874656E64656420 db "Extended built-in help pages",13,10 0 00003117 6275696C742D696E20 0 00003120 68656C702070616765 0 00003129 730D0A 183 <2> %endif 184 <2> %if _ONLYNON386 185 <2> db "Only supports non-386 operation",13,10 186 <2> %endif 187 <2> %if _ONLY386 188 <2> db "Only supports 386+ operation",13,10 189 <2> %endif 63 <1> %ifn %2 0 0000312C 00 asciz 65 <1> %endif 236 %endif 237 %if ! _EXTHELP || _HELP_COMPRESSED 238 %if _BOOTLDR 239 asciz 240 ; This message is used by mak.sh to detect that we 241 ; are building with boot load support. 242 db 13,10,"Boot loader",13,10 243 asciz 244 %endif 245 %endif 246 247 %if _EXTHELP 248 usemessagesegment 248 ------------------ note: usesection MESSAGESEGMENT 249 .license: helppage license 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 6 <2> Copyright (C) 2008-2024 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %endif 19 <2> 0 0000312D 6C4465627567202D20 db "lDebug - libre 86-DOS debugger",13,10 0 00003136 6C696272652038362D 0 0000313F 444F53206465627567 0 00003148 6765720D0A 0 0000314D 0D0A db 13,10 0 0000314F 436F70797269676874 db "Copyright (C) 1995-2003 Paul Vojta",13,10 0 00003158 202843292031393935 0 00003161 2D3230303320506175 0 0000316A 6C20566F6A74610D0A 0 00003173 436F70797269676874 db "Copyright (C) 2008-2024 E. C. Masloch",13,10 0 0000317C 202843292032303038 0 00003185 2D3230323420452E20 0 0000318E 432E204D61736C6F63 0 00003197 680D0A 0 0000319A 0D0A db 13,10 0 0000319C 5573616765206F6620 db "Usage of the works is permitted provided that this",13,10 0 000031A5 74686520776F726B73 0 000031AE 206973207065726D69 0 000031B7 747465642070726F76 0 000031C0 696465642074686174 0 000031C9 20746869730D0A 0 000031D0 696E737472756D656E db "instrument is retained with the works, so that any entity",13,10 0 000031D9 742069732072657461 0 000031E2 696E65642077697468 0 000031EB 2074686520776F726B 0 000031F4 732C20736F20746861 0 000031FD 7420616E7920656E74 0 00003206 6974790D0A 0 0000320B 746861742075736573 db "that uses the works is notified of this instrument.",13,10 0 00003214 2074686520776F726B 0 0000321D 73206973206E6F7469 0 00003226 66696564206F662074 0 0000322F 68697320696E737472 0 00003238 756D656E742E0D0A 0 00003240 0D0A db 13,10 0 00003242 444953434C41494D45 db "DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.",13,10 0 0000324B 523A2054484520574F 0 00003254 524B53204152452057 0 0000325D 4954484F5554205741 0 00003266 5252414E54592E0D0A 0 0000326F 0D0A db 13,10 0 00003271 0D0A db 13,10 0 00003273 416C6C20636F6E7472 db "All contributions by Paul Vojta or E. C. Masloch to the debugger are available",13,10 0 0000327C 69627574696F6E7320 0 00003285 6279205061756C2056 0 0000328E 6F6A7461206F722045 0 00003297 2E20432E204D61736C 0 000032A0 6F636820746F207468 0 000032A9 652064656275676765 0 000032B2 722061726520617661 0 000032BB 696C61626C650D0A 0 000032C3 756E64657220612063 db "under a choice of three different licenses. These are the Fair License, the",13,10 0 000032CC 686F696365206F6620 0 000032D5 746872656520646966 0 000032DE 666572656E74206C69 0 000032E7 63656E7365732E2054 0 000032F0 686573652061726520 0 000032F9 746865204661697220 0 00003302 4C6963656E73652C20 0 0000330B 7468650D0A 0 00003310 53696D706C69666965 db "Simplified 2-Clause BSD License, or the MIT License.",13,10 0 00003319 6420322D436C617573 0 00003322 6520425344204C6963 0 0000332B 656E73652C206F7220 0 00003334 746865204D4954204C 0 0000333D 6963656E73652E0D0A 0 00003346 0D0A db 13,10 0 00003348 546869732069732074 db "This is the license and copyright information that applies to lDebug; but note",13,10 0 00003351 6865206C6963656E73 0 0000335A 6520616E6420636F70 0 00003363 79726967687420696E 0 0000336C 666F726D6174696F6E 0 00003375 207468617420617070 0 0000337E 6C69657320746F206C 0 00003387 44656275673B206275 0 00003390 74206E6F74650D0A 0 00003398 746861742074686572 db "that there have been substantial contributions to the code base that are not",13,10 0 000033A1 652068617665206265 0 000033AA 656E20737562737461 0 000033B3 6E7469616C20636F6E 0 000033BC 747269627574696F6E 0 000033C5 7320746F2074686520 0 000033CE 636F64652062617365 0 000033D7 207468617420617265 0 000033E0 206E6F740D0A 0 000033E6 636F70797269676874 db "copyrighted (public domain).",13,10 0 000033EF 656420287075626C69 0 000033F8 6320646F6D61696E29 0 00003401 2E0D0A 63 <1> %ifn %2 0 00003404 00 asciz 65 <1> %endif 250 251 usemessagesegment 251 ------------------ note: usesection MESSAGESEGMENT 252 .reghelp: helppage regs 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %endif 19 <2> 0 00003405 417661696C61626C65 db "Available 16-bit registers:",9,9,"Available 32-bit registers: (386+)",13,10 0 0000340E 2031362D6269742072 0 00003417 65676973746572733A 0 00003420 0909417661696C6162 0 00003429 6C652033322D626974 0 00003432 207265676973746572 0 0000343B 733A20283338362B29 0 00003444 0D0A 0 00003446 415809416363756D75 db "AX",9,"Accumulator",9,9,9,"EAX",13,10 0 0000344F 6C61746F7209090945 0 00003458 41580D0A 0 0000345C 425809426173652072 db "BX",9,"Base register",9,9,9,"EBX",13,10 0 00003465 656769737465720909 0 0000346E 094542580D0A 0 00003474 435809436F756E7465 db "CX",9,"Counter",9,9,9,9,"ECX",13,10 0 0000347D 72090909094543580D 0 00003486 0A 0 00003487 445809446174612072 db "DX",9,"Data register",9,9,9,"EDX",13,10 0 00003490 656769737465720909 0 00003499 094544580D0A 0 0000349F 535009537461636B20 db "SP",9,"Stack pointer",9,9,9,"ESP",13,10 0 000034A8 706F696E7465720909 0 000034B1 094553500D0A 0 000034B7 425009426173652070 db "BP",9,"Base pointer",9,9,9,"EBP",13,10 0 000034C0 6F696E746572090909 0 000034C9 4542500D0A 0 000034CE 534909536F75726365 db "SI",9,"Source index",9,9,9,"ESI",13,10 0 000034D7 20696E646578090909 0 000034E0 4553490D0A 0 000034E5 44490944657374696E db "DI",9,"Destination index",9,9,"EDI",13,10 0 000034EE 6174696F6E20696E64 0 000034F7 657809094544490D0A 0 00003500 445309446174612073 db "DS",9,"Data segment",13,10 0 00003509 65676D656E740D0A 0 00003511 455309457874726120 db "ES",9,"Extra segment",13,10 0 0000351A 7365676D656E740D0A 0 00003523 535309537461636B20 db "SS",9,"Stack segment",13,10 0 0000352C 7365676D656E740D0A 0 00003535 435309436F64652073 db "CS",9,"Code segment",13,10 0 0000353E 65676D656E740D0A 0 00003546 465309457874726120 db "FS",9,"Extra segment 2 (386+)",13,10 0 0000354F 7365676D656E742032 0 00003558 20283338362B290D0A 0 00003561 475309457874726120 db "GS",9,"Extra segment 3 (386+)",13,10 0 0000356A 7365676D656E742033 0 00003573 20283338362B290D0A 0 0000357C 495009496E73747275 db "IP",9,"Instruction pointer",9,9,"EIP",13,10 0 00003585 6374696F6E20706F69 0 0000358E 6E7465720909454950 0 00003597 0D0A 0 00003599 464C09466C61677309 db "FL",9,"Flags",9,9,9,9,"EFL",13,10 0 000035A2 09090945464C0D0A 0 000035AA 0D0A db 13,10 38 <2> %if _MMXSUPP && 0 39 <2> db "Available 64-bit Matrix Math Extension (MMX) registers: (if supported)",13,10 40 <2> db "MMx",9,"MM(x)",9,"MMX register x, where x is 0 to 7",13,10 41 <2> db 13,10 42 <2> %endif 0 000035AC 456E746572203F4620 db "Enter ?F to display the recognized flags.",13,10 0 000035B5 746F20646973706C61 0 000035BE 792074686520726563 0 000035C7 6F676E697A65642066 0 000035D0 6C6167732E0D0A 63 <1> %ifn %2 0 000035D7 00 asciz 65 <1> %endif 253 254 usemessagesegment 254 ------------------ note: usesection MESSAGESEGMENT 255 .flaghelp: helppage flags 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %endif 19 <2> 0 000035D8 5265636F676E697A65 db "Recognized flags:",13,10 0 000035E1 6420666C6167733A0D 0 000035EA 0A 0 000035EB 56616C7565094E616D db "Value",9,"Name",9,9,9, " Set",9,9,9, " Clear",13,10 0 000035F4 650909092020536574 0 000035FD 0909092020436C6561 0 00003606 720D0A 0 00003609 3038303020204F4620 db "0800 OF Overflow Flag",9,9,"OV Overflow",9,9, "NV No overflow",13,10 0 00003612 204F766572666C6F77 0 0000361B 20466C616709094F56 0 00003624 20204F766572666C6F 0 0000362D 7709094E5620204E6F 0 00003636 206F766572666C6F77 0 0000363F 0D0A 0 00003641 303430302020444620 db "0400 DF Direction Flag",9,"DN Down",9,9, "UP Up",13,10 0 0000364A 20446972656374696F 0 00003653 6E20466C616709444E 0 0000365C 2020446F776E090955 0 00003665 50202055700D0A 0 0000366C 303230302020494620 db "0200 IF Interrupt Flag",9,"EI Enable interrupts",9,"DI Disable interrupts",13,10 0 00003675 20496E746572727570 0 0000367E 7420466C6167094549 0 00003687 2020456E61626C6520 0 00003690 696E74657272757074 0 00003699 730944492020446973 0 000036A2 61626C6520696E7465 0 000036AB 7272757074730D0A 0 000036B3 303038302020534620 db "0080 SF Sign Flag",9,9, "NG Negative",9,9, "PL Plus",13,10 0 000036BC 205369676E20466C61 0 000036C5 6709094E4720204E65 0 000036CE 676174697665090950 0 000036D7 4C2020506C75730D0A 0 000036E0 3030343020205A4620 db "0040 ZF Zero Flag",9,9, "ZR Zero",9,9, "NZ Not zero",13,10 0 000036E9 205A65726F20466C61 0 000036F2 6709095A5220205A65 0 000036FB 726F09094E5A20204E 0 00003704 6F74207A65726F0D0A 0 0000370D 303031302020414620 db "0010 AF Auxiliary Flag",9,"AC Auxiliary carry",9,"NA No auxiliary carry",13,10 0 00003716 20417578696C696172 0 0000371F 7920466C6167094143 0 00003728 2020417578696C6961 0 00003731 727920636172727909 0 0000373A 4E4120204E6F206175 0 00003743 78696C696172792063 0 0000374C 617272790D0A 0 00003752 303030342020504620 db "0004 PF Parity Flag",9,9, "PE Parity even",9,9, "PO Parity odd",13,10 0 0000375B 205061726974792046 0 00003764 6C6167090950452020 0 0000376D 506172697479206576 0 00003776 656E0909504F202050 0 0000377F 6172697479206F6464 0 00003788 0D0A 0 0000378A 303030312020434620 db "0001 CF Carry Flag",9,9, "CY Carry",9,9, "NC No carry",13,10 0 00003793 20436172727920466C 0 0000379C 616709094359202043 0 000037A5 6172727909094E4320 0 000037AE 204E6F206361727279 0 000037B7 0D0A 0 000037B9 0D0A db 13,10 0 000037BB 5468652073686F7274 db "The short names of the flag states are displayed when dumping registers",13,10 0 000037C4 206E616D6573206F66 0 000037CD 2074686520666C6167 0 000037D6 207374617465732061 0 000037DF 726520646973706C61 0 000037E8 796564207768656E20 0 000037F1 64756D70696E672072 0 000037FA 65676973746572730D 0 00003803 0A 0 00003804 616E642063616E2062 db "and can be entered to modify the symbolic F register with R. The short",13,10 0 0000380D 6520656E7465726564 0 00003816 20746F206D6F646966 0 0000381F 79207468652073796D 0 00003828 626F6C696320462072 0 00003831 656769737465722077 0 0000383A 69746820522E205468 0 00003843 652073686F72740D0A 0 0000384C 6E616D6573206F6620 db "names of the flags can be modified by R.",13,10 0 00003855 74686520666C616773 0 0000385E 2063616E206265206D 0 00003867 6F6469666965642062 0 00003870 7920522E0D0A 63 <1> %ifn %2 0 00003876 00 asciz 65 <1> %endif 256 257 %if _COND 258 usemessagesegment 258 ------------------ note: usesection MESSAGESEGMENT 259 .condhelp: helppage cond 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %endif 19 <2> 0 00003877 496E20746865207265 db "In the register dump displayed by the R, T, P and G commands, conditional",13,10 0 00003880 676973746572206475 0 00003889 6D7020646973706C61 0 00003892 796564206279207468 0 0000389B 6520522C20542C2050 0 000038A4 20616E64204720636F 0 000038AD 6D6D616E64732C2063 0 000038B6 6F6E646974696F6E61 0 000038BF 6C0D0A 0 000038C2 6A756D707320617265 db "jumps are displayed with a notice that shows whether the instruction will",13,10 0 000038CB 20646973706C617965 0 000038D4 642077697468206120 0 000038DD 6E6F74696365207468 0 000038E6 61742073686F777320 0 000038EF 776865746865722074 0 000038F8 686520696E73747275 0 00003901 6374696F6E2077696C 0 0000390A 6C0D0A 0 0000390D 63617573652061206A db "cause a jump depending on its condition and the current register and flag",13,10 0 00003916 756D7020646570656E 0 0000391F 64696E67206F6E2069 0 00003928 747320636F6E646974 0 00003931 696F6E20616E642074 0 0000393A 68652063757272656E 0 00003943 742072656769737465 0 0000394C 7220616E6420666C61 0 00003955 670D0A 0 00003958 636F6E74656E74732E db 'contents. This notice shows either "jumping" or "not jumping" as appropriate.',13,10 0 00003961 2054686973206E6F74 0 0000396A 6963652073686F7773 0 00003973 206569746865722022 0 0000397C 6A756D70696E672220 0 00003985 6F7220226E6F74206A 0 0000398E 756D70696E67222061 0 00003997 7320617070726F7072 0 000039A0 696174652E0D0A 0 000039A7 0D0A db 13,10 0 000039A9 54686520636F6E6469 db "The conditional jumps use these conditions: (second column negates)",13,10 0 000039B2 74696F6E616C206A75 0 000039BB 6D7073207573652074 0 000039C4 6865736520636F6E64 0 000039CD 6974696F6E733A2028 0 000039D6 7365636F6E6420636F 0 000039DF 6C756D6E206E656761 0 000039E8 746573290D0A 0 000039EE 206A6F09096A6E6F09 db " jo",9,9,"jno",9,9,"OF",13,10 0 000039F7 094F460D0A 0 000039FC 206A63206A62206A6E db " jc jb jnae",9,"jnc jnb jae",9,"CF",13,10 0 00003A05 6165096A6E63206A6E 0 00003A0E 62206A61650943460D 0 00003A17 0A 0 00003A18 206A7A206A6509096A db " jz je",9,9,"jnz jne",9,9,"ZF",13,10 0 00003A21 6E7A206A6E6509095A 0 00003A2A 460D0A 0 00003A2D 206A6265206A6E6109 db " jbe jna",9,"jnbe ja",9,9,"ZF||CF",13,10 0 00003A36 6A6E6265206A610909 0 00003A3F 5A467C7C43460D0A 0 00003A47 206A7309096A6E7309 db " js",9,9,"jns",9,9,"SF",13,10 0 00003A50 0953460D0A 0 00003A55 206A70206A70650909 db " jp jpe",9,9,"jnp jpo",9,9,"PF",13,10 0 00003A5E 6A6E70206A706F0909 0 00003A67 50460D0A 0 00003A6B 206A6C206A6E676509 db " jl jnge",9,"jnl jge",9,9,"OF^^SF",13,10 0 00003A74 6A6E6C206A67650909 0 00003A7D 4F465E5E53460D0A 0 00003A85 206A6C65206A6E6709 db " jle jng",9,"jnle jg",9,9,"OF^^SF || ZF",13,10 0 00003A8E 6A6E6C65206A670909 0 00003A97 4F465E5E5346207C7C 0 00003AA0 205A460D0A 0 00003AA5 206A28652963787A09 db " j(e)cxz",9,9,9,"(e)cx==0",13,10 0 00003AAE 090928652963783D3D 0 00003AB7 300D0A 0 00003ABA 206C6F6F7009090909 db " loop",9,9,9,9,"(e)cx!=1",13,10 0 00003AC3 2865296378213D310D 0 00003ACC 0A 0 00003ACD 206C6F6F707A206C6F db " loopz loope",9,9,9,"(e)cx!=1 && ZF",13,10 0 00003AD6 6F7065090909286529 0 00003ADF 6378213D3120262620 0 00003AE8 5A460D0A 0 00003AEC 206C6F6F706E7A206C db " loopnz loopne",9,9,9,"(e)cx!=1 && !ZF",13,10 0 00003AF5 6F6F706E6509090928 0 00003AFE 65296378213D312026 0 00003B07 2620215A460D0A 0 00003B0E 0D0A db 13,10 0 00003B10 456E746572203F4620 db "Enter ?F to display a description of the flag names.",13,10 0 00003B19 746F20646973706C61 0 00003B22 792061206465736372 0 00003B2B 697074696F6E206F66 0 00003B34 2074686520666C6167 0 00003B3D 206E616D65732E0D0A 63 <1> %ifn %2 0 00003B46 00 asciz 65 <1> %endif 260 %endif 261 262 %if _EXPRESSIONS 263 usemessagesegment 263 ------------------ note: usesection MESSAGESEGMENT 264 .expressionhelp: helppage expr 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %endif 19 <2> 0 00003B47 5265636F676E697A65 db "Recognized operators in expressions:",13,10 0 00003B50 64206F70657261746F 0 00003B59 727320696E20657870 0 00003B62 72657373696F6E733A 0 00003B6B 0D0A 0 00003B6D 7C0962697477697365 db "|",9, "bitwise OR",9,9, "||",9, "boolean OR",13,10 0 00003B76 204F5209097C7C0962 0 00003B7F 6F6F6C65616E204F52 0 00003B88 0D0A 0 00003B8A 5E0962697477697365 db "^",9, "bitwise XOR",9,9, "^^",9, "boolean XOR",13,10 0 00003B93 20584F5209095E5E09 0 00003B9C 626F6F6C65616E2058 0 00003BA5 4F520D0A 0 00003BA9 260962697477697365 db "&",9, "bitwise AND",9,9, "&&",9, "boolean AND",13,10 0 00003BB2 20414E440909262609 0 00003BBB 626F6F6C65616E2041 0 00003BC4 4E440D0A 0 00003BC8 3E3E096269742D7368 db ">>",9, "bit-shift right",9,9, ">",9,"test if above",13,10 0 00003BD1 696674207269676874 0 00003BDA 09093E097465737420 0 00003BE3 69662061626F76650D 0 00003BEC 0A 0 00003BED 3E3E3E097369676E65 db ">>>",9, "signed bit-shift right",9, "<",9,"test if below",13,10 0 00003BF6 64206269742D736869 0 00003BFF 667420726967687409 0 00003C08 3C0974657374206966 0 00003C11 2062656C6F770D0A 0 00003C19 3C3C096269742D7368 db "<<",9, "bit-shift left",9,9, ">=",9,"test if above-or-equal",13,10 0 00003C22 696674206C65667409 0 00003C2B 093E3D097465737420 0 00003C34 69662061626F76652D 0 00003C3D 6F722D657175616C0D 0 00003C46 0A 0 00003C47 3E3C096269742D6D69 db "><",9, "bit-mirror",9,9, "<=",9,"test if below-or-equal",13,10 0 00003C50 72726F7209093C3D09 0 00003C59 746573742069662062 0 00003C62 656C6F772D6F722D65 0 00003C6B 7175616C0D0A 0 00003C71 2B096164646974696F db "+",9, "addition",9,9, "==",9,"test if equal",13,10 0 00003C7A 6E09093D3D09746573 0 00003C83 742069662065717561 0 00003C8C 6C0D0A 0 00003C8F 2D0973756274726163 db "-",9, "subtraction",9,9, "!=",9,"test if not equal",13,10 0 00003C98 74696F6E0909213D09 0 00003CA1 74657374206966206E 0 00003CAA 6F7420657175616C0D 0 00003CB3 0A 0 00003CB4 2A096D756C7469706C db "*",9, "multiplication",9,9, "=>",9,"same as >=",13,10 0 00003CBD 69636174696F6E0909 0 00003CC6 3D3E0973616D652061 0 00003CCF 73203E3D0D0A 0 00003CD5 2F096469766973696F db "/",9, "division",9,9, "=<",9,"same as <=",13,10 0 00003CDE 6E09093D3C0973616D 0 00003CE7 65206173203C3D0D0A 0 00003CF0 25096D6F64756C6F20 db "%",9, "modulo (A-(A/B*B))",9, "<>",9,"same as !=",13,10 0 00003CF9 28412D28412F422A42 0 00003D02 2929093C3E0973616D 0 00003D0B 6520617320213D0D0A 0 00003D14 2A2A09706F7765720D db "**",9, "power",13,10 0 00003D1D 0A 0 00003D1E 0D0A db 13,10 0 00003D20 496D706C6963697420 db "Implicit operater precedence is handled in the listed order, with increasing",13,10 0 00003D29 6F7065726174657220 0 00003D32 707265636564656E63 0 00003D3B 652069732068616E64 0 00003D44 6C656420696E207468 0 00003D4D 65206C697374656420 0 00003D56 6F726465722C207769 0 00003D5F 746820696E63726561 0 00003D68 73696E670D0A 0 00003D6E 707265636564656E63 db "precedence: (Brackets specify explicit precedence of an expression.)",13,10 0 00003D77 653A2028427261636B 0 00003D80 657473207370656369 0 00003D89 6679206578706C6963 0 00003D92 697420707265636564 0 00003D9B 656E6365206F662061 0 00003DA4 6E2065787072657373 0 00003DAD 696F6E2E290D0A 0 00003DB4 20626F6F6C65616E20 db " boolean operators OR, XOR, AND (each has a different precedence)",13,10 0 00003DBD 6F70657261746F7273 0 00003DC6 204F522C20584F522C 0 00003DCF 20414E442028656163 0 00003DD8 682068617320612064 0 00003DE1 6966666572656E7420 0 00003DEA 707265636564656E63 0 00003DF3 65290D0A 0 00003DF7 20636F6D7061726973 db " comparison operators",13,10 0 00003E00 6F6E206F7065726174 0 00003E09 6F72730D0A 0 00003E0E 206269747769736520 db " bitwise operators OR, XOR, AND (each has a different precedence)",13,10 0 00003E17 6F70657261746F7273 0 00003E20 204F522C20584F522C 0 00003E29 20414E442028656163 0 00003E32 682068617320612064 0 00003E3B 6966666572656E7420 0 00003E44 707265636564656E63 0 00003E4D 65290D0A 0 00003E51 20736869667420616E db " shift and bit-mirror operators",13,10 0 00003E5A 64206269742D6D6972 0 00003E63 726F72206F70657261 0 00003E6C 746F72730D0A 0 00003E72 206164646974696F6E db " addition and subtraction operators",13,10 0 00003E7B 20616E642073756274 0 00003E84 72616374696F6E206F 0 00003E8D 70657261746F72730D 0 00003E96 0A 0 00003E97 206D756C7469706C69 db " multiplication, division and modulo operators",13,10 0 00003EA0 636174696F6E2C2064 0 00003EA9 69766973696F6E2061 0 00003EB2 6E64206D6F64756C6F 0 00003EBB 206F70657261746F72 0 00003EC4 730D0A 0 00003EC7 20706F776572206F70 db " power operator",13,10 0 00003ED0 657261746F720D0A 0 00003ED8 0D0A db 13,10 0 00003EDA 5265636F676E697A65 db "Recognized unary operators: (modifying the next number)",13,10 0 00003EE3 6420756E617279206F 0 00003EEC 70657261746F72733A 0 00003EF5 20286D6F6469667969 0 00003EFE 6E6720746865206E65 0 00003F07 7874206E756D626572 0 00003F10 290D0A 0 00003F13 2B09706F7369746976 db "+",9, "positive (does nothing)",13,10 0 00003F1C 652028646F6573206E 0 00003F25 6F7468696E67290D0A 0 00003F2E 2D096E656761746976 db "-",9, "negative",13,10 0 00003F37 650D0A 0 00003F3A 7E0962697477697365 db "~",9, "bitwise NOT",13,10 0 00003F43 204E4F540D0A 0 00003F49 2109626F6F6C65616E db "!",9, "boolean NOT",13,10 0 00003F52 204E4F540D0A 0 00003F58 3F096162736F6C7574 db "?",9, "absolute value",13,10 0 00003F61 652076616C75650D0A 0 00003F6A 212109636F6E766572 db "!!",9, "convert to boolean",13,10 0 00003F73 7420746F20626F6F6C 0 00003F7C 65616E0D0A 0 00003F81 0D0A db 13,10 0 00003F83 4E6F74652074686174 db "Note that the power operator does not affect unary operator handling.",13,10 0 00003F8C 2074686520706F7765 0 00003F95 72206F70657261746F 0 00003F9E 7220646F6573206E6F 0 00003FA7 742061666665637420 0 00003FB0 756E617279206F7065 0 00003FB9 7261746F722068616E 0 00003FC2 646C696E672E0D0A 0 00003FCA 466F7220696E737461 db 'For instance, "- 2 ** 2" is parsed as "(-2) ** 2" and evaluates to 4.',13,10 0 00003FD3 6E63652C20222D2032 0 00003FDC 202A2A203222206973 0 00003FE5 207061727365642061 0 00003FEE 732022282D3229202A 0 00003FF7 2A20322220616E6420 0 00004000 6576616C7561746573 0 00004009 20746F20342E0D0A 0 00004011 0D0A db 13,10 0 00004013 416C74686F75676820 db "Although a negative unary and signed bit-shift right operator are provided",13,10 0 0000401C 61206E656761746976 0 00004025 6520756E6172792061 0 0000402E 6E64207369676E6564 0 00004037 206269742D73686966 0 00004040 74207269676874206F 0 00004049 70657261746F722061 0 00004052 72652070726F766964 0 0000405B 65640D0A 0 0000405F 746865206578707265 db "the expression evaluator is intrinsically unsigned. Particularly the division,",13,10 0 00004068 7373696F6E20657661 0 00004071 6C7561746F72206973 0 0000407A 20696E7472696E7369 0 00004083 63616C6C7920756E73 0 0000408C 69676E65642E205061 0 00004095 72746963756C61726C 0 0000409E 792074686520646976 0 000040A7 6973696F6E2C0D0A 0 000040AF 6D756C7469706C6963 db "multiplication, modulo and all comparison operators operate unsigned. Due to",13,10 0 000040B8 6174696F6E2C206D6F 0 000040C1 64756C6F20616E6420 0 000040CA 616C6C20636F6D7061 0 000040D3 7269736F6E206F7065 0 000040DC 7261746F7273206F70 0 000040E5 657261746520756E73 0 000040EE 69676E65642E204475 0 000040F7 6520746F0D0A 0 000040FD 746869732C20746865 db 'this, the expression "-1 < 0" evaluates to zero.',13,10 0 00004106 206578707265737369 0 0000410F 6F6E20222D31203C20 0 00004118 3022206576616C7561 0 00004121 74657320746F207A65 0 0000412A 726F2E0D0A 0 0000412F 0D0A db 13,10 0 00004131 5265636F676E697A65 db "Recognized terms in an expression:",13,10 0 0000413A 64207465726D732069 0 00004143 6E20616E2065787072 0 0000414C 657373696F6E3A0D0A 0 00004155 2033322D6269742069 db " 32-bit immediates",13,10 0 0000415E 6D6D65646961746573 0 00004167 0D0A 0 00004169 20382D626974207265 db " 8-bit registers",13,10 0 00004172 676973746572730D0A 0 0000417B 2031362D6269742072 db " 16-bit registers including segment registers (except FS, GS)",13,10 0 00004184 656769737465727320 0 0000418D 696E636C7564696E67 0 00004196 207365676D656E7420 0 0000419F 726567697374657273 0 000041A8 202865786365707420 0 000041B1 46532C204753290D0A 0 000041BA 2033322D6269742063 db " 32-bit compound registers made of two 16-bit registers (eg DXAX)",13,10 0 000041C3 6F6D706F756E642072 0 000041CC 656769737465727320 0 000041D5 6D616465206F662074 0 000041DE 776F2031362D626974 0 000041E7 207265676973746572 0 000041F0 732028656720445841 0 000041F9 58290D0A 0 000041FD 2033322D6269742072 db " 32-bit registers and FS, GS only if running on a 386+",13,10 0 00004206 656769737465727320 0 0000420F 616E642046532C2047 0 00004218 53206F6E6C79206966 0 00004221 2072756E6E696E6720 0 0000422A 6F6E2061203338362B 0 00004233 0D0A 67 <2> %if _MMXSUPP 0 00004235 2036342D626974204D db " 64-bit MMX registers only if running on a CPU with MMX",13,10 0 0000423E 4D5820726567697374 0 00004247 657273206F6E6C7920 0 00004250 69662072756E6E696E 0 00004259 67206F6E2061204350 0 00004262 552077697468204D4D 0 0000426B 580D0A 0 0000426E 20204D4D304C206163 db " MM0L accesses the low 32 bits of the register",13,10 0 00004277 636573736573207468 0 00004280 65206C6F7720333220 0 00004289 62697473206F662074 0 00004292 686520726567697374 0 0000429B 65720D0A 0 0000429F 20204D4D3048206163 db " MM0H accesses the high 32 bits of the register",13,10 0 000042A8 636573736573207468 0 000042B1 652068696768203332 0 000042BA 2062697473206F6620 0 000042C3 746865207265676973 0 000042CC 7465720D0A 0 000042D1 20204D4D305A207265 db " MM0Z reads the low 32 bits; writes the full register (zero-extend)",13,10 0 000042DA 61647320746865206C 0 000042E3 6F7720333220626974 0 000042EC 733B20777269746573 0 000042F5 207468652066756C6C 0 000042FE 207265676973746572 0 00004307 20287A65726F2D6578 0 00004310 74656E64290D0A 0 00004317 20204D4D3053207265 db " MM0S reads the low 32 bits; writes the full register (sign-extend)",13,10 0 00004320 61647320746865206C 0 00004329 6F7720333220626974 0 00004332 733B20777269746573 0 0000433B 207468652066756C6C 0 00004344 207265676973746572 0 0000434D 20287369676E2D6578 0 00004356 74656E64290D0A 0 0000435D 20204D4D3020697320 db " MM0 is an alias for the MM0Z syntax",13,10 0 00004366 616E20616C69617320 0 0000436F 666F7220746865204D 0 00004378 4D305A2073796E7461 0 00004381 780D0A 74 <2> %endif 75 <2> %if _VARIABLES 0 00004384 2033322D6269742076 db " 32-bit variables V00..VFF",13,10 0 0000438D 61726961626C657320 0 00004396 5630302E2E5646460D 0 0000439F 0A 77 <2> %endif 78 <2> %if _OPTIONS || _PSPVARIABLES 0 000043A0 2033322D6269742073 db " 32-bit special variable" 0 000043A9 70656369616C207661 0 000043B2 726961626C65 80 <2> %if _OPTIONS 0 000043B8 732044434F2C204443 db "s DCO, DCS, DAO, DAS, DIF, DPI" 0 000043C1 532C2044414F2C2044 0 000043CA 41532C204449462C20 0 000043D3 445049 82 <2> %if _PSPVARIABLES 0 000043D6 2C db "," 84 <2> %endif 85 <2> %endif 86 <2> %if _PSPVARIABLES 0 000043D7 20505049 db " PPI" 88 <2> %endif 0 000043DB 0D0A db 13,10 0 000043DD 2031362D6269742073 db " 16-bit special variables" 0 000043E6 70656369616C207661 0 000043EF 726961626C6573 91 <2> %if _OPTIONS 0 000043F6 204450522C20445050 db " DPR, DPP" 93 <2> %if _PM 94 <2> db ", DPS" 95 <2> %endif 96 <2> %if _PSPVARIABLES 0 000043FF 2C db "," 98 <2> %endif 99 <2> %endif 100 <2> %if _PSPVARIABLES 0 00004400 205053502C20505052 db " PSP, PPR" 102 <2> %endif 0 00004409 0D0A db 13,10 0 0000440B 20202866756C6C6572 db " (fuller variable reference in the manual)",13,10 0 00004414 207661726961626C65 0 0000441D 207265666572656E63 0 00004426 6520696E2074686520 0 0000442F 6D616E75616C290D0A 105 <2> %endif 106 <2> %if _INDIRECTION 0 00004438 20627974652F776F72 db " byte/word/3byte/dword memory content (eg byte [seg:ofs], where both the",13,10 0 00004441 642F33627974652F64 0 0000444A 776F7264206D656D6F 0 00004453 727920636F6E74656E 0 0000445C 742028656720627974 0 00004465 65205B7365673A6F66 0 0000446E 735D2C207768657265 0 00004477 20626F746820746865 0 00004480 0D0A 0 00004482 20206F7074696F6E61 db " optional segment as well as the offset are expressions too)",13,10 0 0000448B 6C207365676D656E74 0 00004494 2061732077656C6C20 0 0000449D 617320746865206F66 0 000044A6 667365742061726520 0 000044AF 65787072657373696F 0 000044B8 6E7320746F6F290D0A 109 <2> %endif 0 000044C1 546865206578707265 db "The expression evaluator case-insensitively checks for names of variables",13,10 0 000044CA 7373696F6E20657661 0 000044D3 6C7561746F72206361 0 000044DC 73652D696E73656E73 0 000044E5 69746976656C792063 0 000044EE 6865636B7320666F72 0 000044F7 206E616D6573206F66 0 00004500 207661726961626C65 0 00004509 730D0A 0 0000450C 616E64207265676973 db "and registers" 0 00004515 74657273 112 <2> %if _INDIRECTION 0 00004519 2061732077656C6C20 db " as well as size specifiers" 0 00004522 61732073697A652073 0 0000452B 706563696669657273 114 <2> %endif 0 00004534 2E0D0A db '.',13,10 0 00004537 0D0A db 13,10 0 00004539 456E746572203F5220 db "Enter ?R to display the recognized register names.",13,10 0 00004542 746F20646973706C61 0 0000454B 792074686520726563 0 00004554 6F676E697A65642072 0 0000455D 65676973746572206E 0 00004566 616D65732E0D0A 118 <2> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 0 0000456D 456E746572203F5620 db "Enter ?V to display the recognized variables.",13,10 0 00004576 746F20646973706C61 0 0000457F 792074686520726563 0 00004588 6F676E697A65642076 0 00004591 61726961626C65732E 0 0000459A 0D0A 120 <2> %endif 63 <1> %ifn %2 0 0000459C 00 asciz 65 <1> %endif 265 %endif 266 267 %if _OPTIONS 268 usemessagesegment 268 ------------------ note: usesection MESSAGESEGMENT 269 .options_1: helppage options1 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %include "options.mac" 19 <2> %endif 20 <2> 0 0000459D 417661696C61626C65 db "Available options: (read/write DCO, read DCS)",13,10 0 000045A6 206F7074696F6E733A 0 000045AF 2028726561642F7772 0 000045B8 6974652044434F2C20 0 000045C1 726561642044435329 0 000045CA 0D0A 0 000045CC 303030312052583A20 db _4digitshex(dispregs32), " RX: 32-bit register display",13,10 0 000045D5 33322D626974207265 0 000045DE 676973746572206469 0 000045E7 73706C61790D0A 0 000045EE 3030303220544D3A20 db _4digitshex(traceints), " TM: trace into interrupts",13,10 0 000045F7 747261636520696E74 0 00004600 6F20696E7465727275 0 00004609 7074730D0A 0 0000460E 3030303420616C6C6F db _4digitshex(cpdepchars), " allow dumping of CP-dependent characters",13,10 0 00004617 772064756D70696E67 0 00004620 206F662043502D6465 0 00004629 70656E64656E742063 0 00004632 686172616374657273 0 0000463B 0D0A 0 0000463D 3030303820616C7761 db _4digitshex(fakeindos), " always assume InDOS flag non-zero, to debug DOS or TSRs",13,10 0 00004646 797320617373756D65 0 0000464F 20496E444F5320666C 0 00004658 6167206E6F6E2D7A65 0 00004661 726F2C20746F206465 0 0000466A 62756720444F53206F 0 00004673 7220545352730D0A 0 0000467B 303031302064697361 db _4digitshex(nonpagingdevice)," disallow paged output to StdOut",13,10 0 00004684 6C6C6F772070616765 0 0000468D 64206F757470757420 0 00004696 746F205374644F7574 0 0000469F 0D0A 27 <2> ; db _4digitshex(pagingdevice), " allow paged output to non-StdOut",13,10 0 000046A1 303034302064697370 db _4digitshex(hexrn), " display raw hexadecimal content of FPU registers",13,10 0 000046AA 6C6179207261772068 0 000046B3 657861646563696D61 0 000046BC 6C20636F6E74656E74 0 000046C5 206F66204650552072 0 000046CE 65676973746572730D 0 000046D7 0A 0 000046D8 30313030207768656E db _4digitshex(nondospaging), " when prompting during paging, do not use DOS for input",13,10 0 000046E1 2070726F6D7074696E 0 000046EA 6720647572696E6720 0 000046F3 706167696E672C2064 0 000046FC 6F206E6F7420757365 0 00004705 20444F5320666F7220 0 0000470E 696E7075740D0A 30 <2> %ifn _PM 0 00004715 3032303020646F206E db _4digitshex(opt1_86mnohlt), " do not execute HLT instruction to idle",13,10 0 0000471E 6F7420657865637574 0 00004727 6520484C5420696E73 0 00004730 7472756374696F6E20 0 00004739 746F2069646C650D0A 32 <2> %else 33 <2> db _4digitshex(opt1_86mnohlt), " (in 86 Mode) do not execute HLT instruction to idle",13,10 34 <2> %endif 0 00004742 3034303020646F206E db _4digitshex(biosidles), " do not idle, the keyboard BIOS idles itself",13,10 0 0000474B 6F742069646C652C20 0 00004754 746865206B6579626F 0 0000475D 6172642042494F5320 0 00004766 69646C657320697473 0 0000476F 656C660D0A 0 00004774 303830302075736520 db _4digitshex(opt_usegetinput)," use getinput function for int 21h interactive input",13,10 0 0000477D 676574696E70757420 0 00004786 66756E6374696F6E20 0 0000478F 666F7220696E742032 0 00004798 316820696E74657261 0 000047A1 637469766520696E70 0 000047AA 75740D0A 0 000047AE 3130303020696E2064 db _4digitshex(use_si_units), " in disp_*_size use SI units (kB = 1000, etc)." 0 000047B7 6973705F2A5F73697A 0 000047C0 652075736520534920 0 000047C9 756E69747320286B42 0 000047D2 203D20313030302C20 0 000047DB 657463292E 0 000047E0 206F76657272696465 db " overrides ",_4digitshex(use_jedec_units),"!",13,10 0 000047E9 732032303030210D0A 0 000047F2 3230303020696E2064 db _4digitshex(use_jedec_units)," in disp_*_size use JEDEC units (KB = 1024)",13,10 0 000047FB 6973705F2A5F73697A 0 00004804 6520757365204A4544 0 0000480D 454320756E69747320 0 00004816 284B42203D20313032 0 0000481F 34290D0A 0 00004823 3430303020656E6162 db _4digitshex(enable_serial), " enable serial I/O (port ",_4digitshex(_UART_BASE),"h interrupt ",_2digitshex(_INTNUM),"h)",13,10 0 0000482C 6C652073657269616C 0 00004835 20492F4F2028706F72 0 0000483E 742030324638682069 0 00004847 6E7465727275707420 0 00004850 304268290D0A 0 00004856 383030302064697361 db _4digitshex(int8_disable_serial), " disable serial I/O when breaking after Ctrl pressed for a while",13,10 0 0000485F 626C65207365726961 0 00004868 6C20492F4F20776865 0 00004871 6E20627265616B696E 0 0000487A 672061667465722043 0 00004883 74726C207072657373 0 0000488C 656420666F72206120 0 00004895 7768696C650D0A 0 0000489C 303030315F30303030 db _8digitssephex(gg_do_not_skip_bp), " gg: do not skip a breakpoint (bb or gg)",13,10 0 000048A5 2067673A20646F206E 0 000048AE 6F7420736B69702061 0 000048B7 20627265616B706F69 0 000048C0 6E7420286262206F72 0 000048C9 206767290D0A 0 000048CF 303030325F30303030 db _8digitssephex(gg_no_autorepeat), " gg: do not auto-repeat",13,10 0 000048D8 2067673A20646F206E 0 000048E1 6F74206175746F2D72 0 000048EA 65706561740D0A 0 000048F1 303030345F30303030 db _8digitssephex(tp_do_not_skip_bp), " T/TP/P: do not skip a (bb) breakpoint",13,10 0 000048FA 20542F54502F503A20 0 00004903 646F206E6F7420736B 0 0000490C 697020612028626229 0 00004915 20627265616B706F69 0 0000491E 6E740D0A 0 00004922 303030385F30303030 db _8digitssephex(gg_bb_hit_no_repeat), " gg: do not auto-repeat after bb hit",13,10 0 0000492B 2067673A20646F206E 0 00004934 6F74206175746F2D72 0 0000493D 657065617420616674 0 00004946 657220626220686974 0 0000494F 0D0A 0 00004951 303031305F30303030 db _8digitssephex(tp_bb_hit_no_repeat), " T/TP/P: do not auto-repeat after bb hit",13,10 0 0000495A 20542F54502F503A20 0 00004963 646F206E6F74206175 0 0000496C 746F2D726570656174 0 00004975 206166746572206262 0 0000497E 206869740D0A 0 00004984 303032305F30303030 db _8digitssephex(gg_unexpected_no_repeat)," gg: do not auto-repeat after unexpectedinterrupt",13,10 0 0000498D 2067673A20646F206E 0 00004996 6F74206175746F2D72 0 0000499F 657065617420616674 0 000049A8 657220756E65787065 0 000049B1 63746564696E746572 0 000049BA 727570740D0A 0 000049C0 303034305F30303030 db _8digitssephex(tp_unexpected_no_repeat)," T/TP/P: do not auto-repeat after unexpectedinterrupt",13,10 0 000049C9 20542F54502F503A20 0 000049D2 646F206E6F74206175 0 000049DB 746F2D726570656174 0 000049E4 20616674657220756E 0 000049ED 657870656374656469 0 000049F6 6E746572727570740D 0 000049FF 0A 0 00004A00 303038305F30303030 db _8digitssephex(ss_no_dump), " S: do not dump data after matches",13,10 0 00004A09 20533A20646F206E6F 0 00004A12 742064756D70206461 0 00004A1B 746120616674657220 0 00004A24 6D6174636865730D0A 0 00004A2D 313030305F30303030 db _8digitssephex(rr_disasm_no_rept), " R: do not repeat disassembly",13,10 0 00004A36 20523A20646F206E6F 0 00004A3F 742072657065617420 0 00004A48 646973617373656D62 0 00004A51 6C790D0A 0 00004A55 323030305F30303030 db _8digitssephex(rr_disasm_no_show), " R: do not show memory reference in disassembly",13,10 0 00004A5E 20523A20646F206E6F 0 00004A67 742073686F77206D65 0 00004A70 6D6F72792072656665 0 00004A79 72656E636520696E20 0 00004A82 646973617373656D62 0 00004A8B 6C790D0A 0 00004A8F 343030305F30303030 db _8digitssephex(opt_cmdline_quiet_input)," quiet command line buffer input",13,10 0 00004A98 20717569657420636F 0 00004AA1 6D6D616E64206C696E 0 00004AAA 652062756666657220 0 00004AB3 696E7075740D0A 0 00004ABA 383030305F30303030 db _8digitssephex(opt_cmdline_quiet_output)," quiet command line buffer output",13,10 0 00004AC3 20717569657420636F 0 00004ACC 6D6D616E64206C696E 0 00004AD5 652062756666657220 0 00004ADE 6F75747075740D0A 63 <1> %ifn %2 0 00004AE6 00 asciz 65 <1> %endif 270 271 usemessagesegment 271 ------------------ note: usesection MESSAGESEGMENT 272 .options_2: helppage options2 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %include "options.mac" 19 <2> %endif 20 <2> 0 00004AE7 4D6F7265206F707469 db "More options: (read/write DCO2, read DCS2)",13,10 0 00004AF0 6F6E733A2028726561 0 00004AF9 642F77726974652044 0 00004B02 434F322C2072656164 0 00004B0B 2044435332290D0A 0 00004B13 303030312044423A20 db _4digitshex(opt2_db_header), " DB: show header",13,10 0 00004B1C 73686F772068656164 0 00004B25 65720D0A 0 00004B29 303030322044423A20 db _4digitshex(opt2_db_trailer)," DB: show trailer",13,10 0 00004B32 73686F772074726169 0 00004B3B 6C65720D0A 0 00004B40 303031302044573A20 db _4digitshex(opt2_dw_header), " DW: show header",13,10 0 00004B49 73686F772068656164 0 00004B52 65720D0A 0 00004B56 303032302044573A20 db _4digitshex(opt2_dw_trailer)," DW: show trailer",13,10 0 00004B5F 73686F772074726169 0 00004B68 6C65720D0A 0 00004B6D 303130302044443A20 db _4digitshex(opt2_dd_header), " DD: show header",13,10 0 00004B76 73686F772068656164 0 00004B7F 65720D0A 0 00004B83 303230302044443A20 db _4digitshex(opt2_dd_trailer)," DD: show trailer",13,10 0 00004B8C 73686F772074726169 0 00004B95 6C65720D0A 0 00004B9A 303830302075736520 db _4digitshex(opt2_getinput_dpmi)," use getinput function for int 21h interactive input in DPMI",13,10 0 00004BA3 676574696E70757420 0 00004BAC 66756E6374696F6E20 0 00004BB5 666F7220696E742032 0 00004BBE 316820696E74657261 0 00004BC7 637469766520696E70 0 00004BD0 757420696E2044504D 0 00004BD9 490D0A 0 00004BDC 3130303020483A2073 db _4digitshex(opt2_hh_compat), " H: stay compatible to MS-DOS Debug",13,10 0 00004BE5 74617920636F6D7061 0 00004BEE 7469626C6520746F20 0 00004BF7 4D532D444F53204465 0 00004C00 6275670D0A 0 00004C05 323030302069646C65 db _4digitshex(opt2_getc_idle), " idle and check for Ctrl-C in getc",13,10 0 00004C0E 20616E642063686563 0 00004C17 6B20666F7220437472 0 00004C20 6C2D4320696E206765 0 00004C29 74630D0A 0 00004C2D 343030302069646C65 db _4digitshex(opt2_getc_idle_dpmi)," idle and check for Ctrl-C in getc in DPMI",13,10 0 00004C36 20616E642063686563 0 00004C3F 6B20666F7220437472 0 00004C48 6C2D4320696E206765 0 00004C51 746320696E2044504D 0 00004C5A 490D0A 0 00004C5D 3830303020542F5450 db _4digitshex(opt2_re_cancel_tpg)," T/TP/P/G: cancel run after RE command buffer execution",13,10 0 00004C66 2F502F473A2063616E 0 00004C6F 63656C2072756E2061 0 00004C78 667465722052452063 0 00004C81 6F6D6D616E64206275 0 00004C8A 666665722065786563 0 00004C93 7574696F6E0D0A 33 <2> %if _MS_N_COMPAT 0 00004C9A 30315F30303030204E db _6digitssephex(opt2_nn_compat)," N: operate in MS Debug style instead of K command alike",13,10 0 00004CA3 3A206F706572617465 0 00004CAC 20696E204D53204465 0 00004CB5 627567207374796C65 0 00004CBE 20696E737465616420 0 00004CC7 6F66204B20636F6D6D 0 00004CD0 616E6420616C696B65 0 00004CD9 0D0A 35 <2> %endif 0 00004CDB 30325F30303030204E db _6digitssephex(opt2_nn_capitalise)," N: capitalise command line tail",13,10 0 00004CE4 3A206361706974616C 0 00004CED 69736520636F6D6D61 0 00004CF6 6E64206C696E652074 0 00004CFF 61696C0D0A 37 <2> %if _MS_0RANGE_COMPAT 0 00004D04 30345F303030302065 db _6digitssephex(opt2_0range_compat)," explicit 0-length ranges operate in partial MS Debug style",13,10 0 00004D0D 78706C696369742030 0 00004D16 2D6C656E6774682072 0 00004D1F 616E676573206F7065 0 00004D28 7261746520696E2070 0 00004D31 61727469616C204D53 0 00004D3A 204465627567207374 0 00004D43 796C650D0A 39 <2> %endif 0 00004D48 30385F303030302052 db _6digitssephex(opt2_rr16_compat)," R: 16-bit 80-column register dump in MS Debug style",13,10 0 00004D51 3A2031362D62697420 0 00004D5A 38302D636F6C756D6E 0 00004D63 207265676973746572 0 00004D6C 2064756D7020696E20 0 00004D75 4D5320446562756720 0 00004D7E 7374796C650D0A 41 <2> %if _MS_PROMPT_COMPAT 0 00004D85 31305F303030302052 db _6digitssephex(opt2_r_prompt_compat)," R: do variable prompts in MS Debug style",13,10 0 00004D8E 3A20646F2076617269 0 00004D97 61626C652070726F6D 0 00004DA0 70747320696E204D53 0 00004DA9 204465627567207374 0 00004DB2 796C650D0A 43 <2> %endif 44 <2> %if _RSEPARATE 0 00004DB7 32305F303030302052 db _6digitssephex(opt2_r_separate)," R: do variable prompts with underscore separator",13,10 0 00004DC0 3A20646F2076617269 0 00004DC9 61626C652070726F6D 0 00004DD2 707473207769746820 0 00004DDB 756E64657273636F72 0 00004DE4 652073657061726174 0 00004DED 6F720D0A 46 <2> %endif 47 <2> %if _REGSLINEBREAK 0 00004DF1 34305F303030302064 db _6digitssephex(opt2_r_linebreak_always)," display linebreak before R command register dump",13,10 0 00004DFA 6973706C6179206C69 0 00004E03 6E65627265616B2062 0 00004E0C 65666F726520522063 0 00004E15 6F6D6D616E64207265 0 00004E1E 676973746572206475 0 00004E27 6D700D0A 49 <2> %endif 50 <2> %if _PM 51 <2> db _8digitssephex(opt2_dpminohlt)," do not execute HLT to idle in PM",13,10 52 <2> %endif 63 <1> %ifn %2 0 00004E2B 00 asciz 65 <1> %endif 273 274 usemessagesegment 274 ------------------ note: usesection MESSAGESEGMENT 275 .options_3: helppage options3 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %include "options.mac" 19 <2> %endif 20 <2> 0 00004E2C 4D6F7265206F707469 db "More options: (read/write DCO3, read DCS3)",13,10 0 00004E35 6F6E733A2028726561 0 00004E3E 642F77726974652044 0 00004E47 434F332C2072656164 0 00004E50 2044435333290D0A 0 00004E58 3030303120543A2064 db _4digitshex(opt3_tt_no_paging)," T: do not page output",13,10 0 00004E61 6F206E6F7420706167 0 00004E6A 65206F75747075740D 0 00004E73 0A 0 00004E74 303030322054503A20 db _4digitshex(opt3_tp_no_paging)," TP: do not page output",13,10 0 00004E7D 646F206E6F74207061 0 00004E86 6765206F7574707574 0 00004E8F 0D0A 0 00004E91 3030303420503A2064 db _4digitshex(opt3_pp_no_paging)," P: do not page output",13,10 0 00004E9A 6F206E6F7420706167 0 00004EA3 65206F75747075740D 0 00004EAC 0A 0 00004EAD 3030303820473A2064 db _4digitshex(opt3_gg_no_paging)," G: do not page output",13,10 0 00004EB6 6F206E6F7420706167 0 00004EBF 65206F75747075740D 0 00004EC8 0A 0 00004EC9 3031303020542F5450 db _4digitshex(opt3_silence_paging_set), " T/TP/P: modify paging for silent dump",13,10 0 00004ED2 2F503A206D6F646966 0 00004EDB 7920706167696E6720 0 00004EE4 666F722073696C656E 0 00004EED 742064756D700D0A 0 00004EF5 3032303020542F5450 db _4digitshex(opt3_silence_paging_on), " T/TP/P: if ",_4digitshex(opt3_silence_paging_set)," set: turn paging on, else off",13,10 0 00004EFE 2F503A206966203031 0 00004F07 3030207365743A2074 0 00004F10 75726E20706167696E 0 00004F19 67206F6E2C20656C73 0 00004F22 65206F66660D0A 28 <2> %if _REGSHIGHLIGHT 0 00004F29 30315F303030302052 db _6digitssephex(opt3_r_highlight_diff), " R: highlight changed digits (needs ANSI for DOS output)",13,10 0 00004F32 3A20686967686C6967 0 00004F3B 6874206368616E6765 0 00004F44 642064696769747320 0 00004F4D 286E6565647320414E 0 00004F56 534920666F7220444F 0 00004F5F 53206F757470757429 0 00004F68 0D0A 0 00004F6A 30325F303030302052 db _6digitssephex(opt3_r_highlight_dumb), " R: highlight escape sequences to int 10h, else video attributes",13,10 0 00004F73 3A20686967686C6967 0 00004F7C 687420657363617065 0 00004F85 2073657175656E6365 0 00004F8E 7320746F20696E7420 0 00004F97 3130682C20656C7365 0 00004FA0 20766964656F206174 0 00004FA9 74726962757465730D 0 00004FB2 0A 0 00004FB3 30345F303030302052 db _6digitssephex(opt3_r_highlight_full), " R: highlight changed registers (overrides ",_6digitssephex(opt3_r_highlight_diff),")",13,10 0 00004FBC 3A20686967686C6967 0 00004FC5 6874206368616E6765 0 00004FCE 642072656769737465 0 00004FD7 727320286F76657272 0 00004FE0 696465732030315F30 0 00004FE9 303030290D0A 0 00004FEF 30385F303030302052 db _6digitssephex(opt3_r_highlight_eip), " R: include highlighting of EIP",13,10 0 00004FF8 3A20696E636C756465 0 00005001 20686967686C696768 0 0000500A 74696E67206F662045 0 00005013 49500D0A 33 <2> %endif 34 <2> %if _PM 35 <2> db _6digitssephex(opt3_ss_b_bit_set), " set PM ss B bit",13,10 36 <2> %if _BREAK_INSTALLDPMI 37 <2> db _6digitssephex(opt3_break_installdpmi), " break on entering Protected Mode",13,10 38 <2> %endif 39 <2> %endif 40 <2> %if _GETLINEHIGHLIGHT 0 00005017 303130305F30303030 db _8digitssephex(opt3_getline_highlight), " highlight prefix/suffix in getinput if text parts are not visible",13,10 0 00005020 20686967686C696768 0 00005029 74207072656669782F 0 00005032 73756666697820696E 0 0000503B 20676574696E707574 0 00005044 206966207465787420 0 0000504D 706172747320617265 0 00005056 206E6F742076697369 0 0000505F 626C650D0A 42 <2> %endif 43 <2> 0 00005064 303230305F30303030 db _8digitssephex(opt3_no_idle_2F), " do not call int 2F.1680 for idling",13,10 0 0000506D 20646F206E6F742063 0 00005076 616C6C20696E742032 0 0000507F 462E3136383020666F 0 00005088 722069646C696E670D 0 00005091 0A 45 <2> %if _DELAY_BEFORE_BP 0 00005092 303430305F30303030 db _8digitssephex(opt3_delay_before_bp), " delay for a tick before writing breakpoints",13,10 0 0000509B 2064656C617920666F 0 000050A4 722061207469636B20 0 000050AD 6265666F7265207772 0 000050B6 6974696E6720627265 0 000050BF 616B706F696E74730D 0 000050C8 0A 47 <2> %endif 0 000050C9 303830305F30303030 db _8digitssephex(opt3_no_call_amis), " do not call other lDebug instance's AMIS services",13,10 0 000050D2 20646F206E6F742063 0 000050DB 616C6C206F74686572 0 000050E4 206C44656275672069 0 000050ED 6E7374616E63652773 0 000050F6 20414D495320736572 0 000050FF 76696365730D0A 0 00005106 313030305F30303030 db _8digitssephex(opt3_disable_autorepeat), " disable auto-repeat",13,10 0 0000510F 2064697361626C6520 0 00005118 6175746F2D72657065 0 00005121 61740D0A 0 00005125 323030305F30303030 db _8digitssephex(opt3_check_ctrlc_keyb), " check int 16h buffer for Control-C if inputting from int 16h",13,10 0 0000512E 20636865636B20696E 0 00005137 742031366820627566 0 00005140 66657220666F722043 0 00005149 6F6E74726F6C2D4320 0 00005152 696620696E70757474 0 0000515B 696E672066726F6D20 0 00005164 696E74203136680D0A 0 0000516D 343030305F30303030 db _8digitssephex(opt3_check_ctrlc_0bh), " call DOS service 0Bh to check for Control-C",13,10 0 00005176 2063616C6C20444F53 0 0000517F 207365727669636520 0 00005188 30426820746F206368 0 00005191 65636B20666F722043 0 0000519A 6F6E74726F6C2D430D 0 000051A3 0A 0 000051A4 383030305F30303030 db _8digitssephex(opt3_tsr_quit_leave_tf), " when Q command is used while TSR, leave TF as is",13,10 0 000051AD 207768656E20512063 0 000051B6 6F6D6D616E64206973 0 000051BF 207573656420776869 0 000051C8 6C65205453522C206C 0 000051D1 656176652054462061 0 000051DA 732069730D0A 63 <1> %ifn %2 0 000051E0 00 asciz 65 <1> %endif 276 277 usemessagesegment 277 ------------------ note: usesection MESSAGESEGMENT 278 .options_4: helppage options4, 1 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %include "options.mac" 19 <2> %endif 20 <2> 0 000051E1 4D6F7265206F707469 db "More options: (read/write DCO4, read DCS4)",13,10 0 000051EA 6F6E733A2028726561 0 000051F3 642F77726974652044 0 000051FC 434F342C2072656164 0 00005205 2044435334290D0A 22 <2> %if _PM 23 <2> db _4digitshex(opt4_int_2F_hook)," enable interrupt 2Fh hook while in 86 Mode",13,10 24 <2> %endif 25 <2> %if _CATCHINT08 0 0000520D 3030303420656E6162 db _4digitshex(opt4_int_08_hook)," enable interrupt 8 hook",13,10 0 00005216 6C6520696E74657272 0 0000521F 757074203820686F6F 0 00005228 6B0D0A 27 <2> %endif 28 <2> %if _CATCHINT2D 0 0000522B 3030303820656E6162 db _4digitshex(opt4_int_2D_hook)," enable interrupt 2Dh hook",13,10 0 00005234 6C6520696E74657272 0 0000523D 757074203244682068 0 00005246 6F6F6B0D0A 30 <2> %endif 31 <2> %if _CATCHINTFAULTCOND && (_CATCHINT0D || _CATCHINT0C) 0 0000524B 3030313020656E6162 db _4digitshex(opt4_int_fault_hook)," enable 86 Mode fault interrupt hooks",13,10 0 00005254 6C65203836204D6F64 0 0000525D 65206661756C742069 0 00005266 6E7465727275707420 0 0000526F 686F6F6B730D0A 33 <2> %endif 0 00005276 303030315F30303030 db _8digitssephex(opt4_int_serial_force)," force serial interrupt unhooking",13,10 0 0000527F 20666F726365207365 0 00005288 7269616C20696E7465 0 00005291 727275707420756E68 0 0000529A 6F6F6B696E670D0A 35 <2> %if _PM 36 <2> db _8digitssephex(opt4_int_2F_force)," force interrupt 2Fh unhooking",13,10 37 <2> %endif 38 <2> %if _CATCHINT08 0 000052A2 303030345F30303030 db _8digitssephex(opt4_int_08_force)," force interrupt 8 unhooking",13,10 0 000052AB 20666F72636520696E 0 000052B4 746572727570742038 0 000052BD 20756E686F6F6B696E 0 000052C6 670D0A 40 <2> %endif 41 <2> %if _CATCHINT2D 0 000052C9 303030385F30303030 db _8digitssephex(opt4_int_2D_force)," force interrupt 2Dh unhooking",13,10 0 000052D2 20666F72636520696E 0 000052DB 746572727570742032 0 000052E4 446820756E686F6F6B 0 000052ED 696E670D0A 43 <2> %endif 44 <2> %if _CATCHINT0D 0 000052F2 303031305F30303030 db _8digitssephex(opt4_int_0D_force)," force interrupt 0Dh unhooking",13,10 0 000052FB 20666F72636520696E 0 00005304 746572727570742030 0 0000530D 446820756E686F6F6B 0 00005316 696E670D0A 46 <2> %endif 47 <2> %if _CATCHINT0C 0 0000531B 303032305F30303030 db _8digitssephex(opt4_int_0C_force)," force interrupt 0Ch unhooking",13,10 0 00005324 20666F72636520696E 0 0000532D 746572727570742030 0 00005336 436820756E686F6F6B 0 0000533F 696E670D0A 49 <2> %endif 50 <2> %if _CATCHINT00 0 00005344 303130305F30303030 db _8digitssephex(opt4_int_00_force)," force interrupt 0 unhooking",13,10 0 0000534D 20666F72636520696E 0 00005356 746572727570742030 0 0000535F 20756E686F6F6B696E 0 00005368 670D0A 52 <2> %endif 53 <2> %if _CATCHINT01 0 0000536B 303230305F30303030 db _8digitssephex(opt4_int_01_force)," force interrupt 1 unhooking",13,10 0 00005374 20666F72636520696E 0 0000537D 746572727570742031 0 00005386 20756E686F6F6B696E 0 0000538F 670D0A 55 <2> %endif 56 <2> %if _CATCHINT03 0 00005392 303430305F30303030 db _8digitssephex(opt4_int_03_force)," force interrupt 3 unhooking",13,10 0 0000539B 20666F72636520696E 0 000053A4 746572727570742033 0 000053AD 20756E686F6F6B696E 0 000053B6 670D0A 58 <2> %endif 59 <2> %if _CATCHINT06 0 000053B9 303830305F30303030 db _8digitssephex(opt4_int_06_force)," force interrupt 6 unhooking",13,10 0 000053C2 20666F72636520696E 0 000053CB 746572727570742036 0 000053D4 20756E686F6F6B696E 0 000053DD 670D0A 61 <2> %endif 62 <2> %if _CATCHINT18 0 000053E0 313030305F30303030 db _8digitssephex(opt4_int_18_force)," force interrupt 18h unhooking",13,10 0 000053E9 20666F72636520696E 0 000053F2 746572727570742031 0 000053FB 386820756E686F6F6B 0 00005404 696E670D0A 64 <2> %endif 65 <2> %if _CATCHINT19 0 00005409 323030305F30303030 db _8digitssephex(opt4_int_19_force)," force interrupt 19h unhooking",13,10 0 00005412 20666F72636520696E 0 0000541B 746572727570742031 0 00005424 396820756E686F6F6B 0 0000542D 696E670D0A 67 <2> %endif 68 <2> %if _CATCHSYSREQ 69 <2> %if _SYSREQINT == 09h 70 <2> db _8digitssephex(opt4_int_09_force)," force interrupt 9 unhooking",13,10 71 <2> %elif _SYSREQINT == 15h 72 <2> db _8digitssephex(opt4_int_15_force)," force interrupt 15h unhooking",13,10 73 <2> %else 74 <2> %error Unknown SysReq interrupt 75 <2> %endif 76 <2> %endif 77 <2> %if _CATCHINT07 78 <2> db _8digitssephex(opt4_int_07_force)," force interrupt 7 unhooking",13,10 79 <2> %endif 63 <1> %ifn %2 64 <1> asciz 65 <1> %endif 279 ; terminator is in .options_5 280 281 usemessagesegment 281 ------------------ note: usesection MESSAGESEGMENT 282 align 2, db 0 283 .options_5: 284 %if _HELP_COMPRESSED 285 %if _LZEXEDAT ; lzexedat: 286 countedw 2, 0, 0, 0, 0 287 ; tag 0002h 288 ; combined 0000h 289 ; escaped 00h 290 %else ; heatshrink: 291 dw 2 ; length of compressed data (excluding itself) 292 db 10, 4 ; parameters expected by depack, -w then -l 293 %endif 294 %else 0 00005432 00 asciz 296 %endif 297 298 usemessagesegment 298 ------------------ note: usesection MESSAGESEGMENT 299 .options_6: helppage options6 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %include "options.mac" 19 <2> %endif 20 <2> 0 00005433 4D6F7265206F707469 db "More options: (read/write DCO6, read DCS6)",13,10 0 0000543C 6F6E733A2028726561 0 00005445 642F77726974652044 0 0000544E 434F362C2072656164 0 00005457 2044435336290D0A 22 <2> %if _VXCHG 0 0000545F 3030303120656E6162 db _4digitshex(opt6_vv_mode)," enable video screen swapping",13,10 0 00005468 6C6520766964656F20 0 00005471 73637265656E207377 0 0000547A 617070696E670D0A 0 00005482 30303032206B656570 db _4digitshex(opt6_vv_keep)," keep video screen when disabling swapping",13,10 0 0000548B 20766964656F207363 0 00005494 7265656E207768656E 0 0000549D 2064697361626C696E 0 000054A6 67207377617070696E 0 000054AF 670D0A 0 000054B2 303031302072656164 db _4digitshex(opt6_vv_int16)," read key from interrupt 16h when swapping (V command)",13,10 0 000054BB 206B65792066726F6D 0 000054C4 20696E746572727570 0 000054CD 742031366820776865 0 000054D6 6E207377617070696E 0 000054DF 6720285620636F6D6D 0 000054E8 616E64290D0A 26 <2> %endif 27 <2> %if _DEBUG 28 <2> db _4digitshex(opt6_debug_exception_late)," run breakpoint late in debugger exception",13,10 29 <2> db _4digitshex(opt6_debug_exception_early)," run breakpoint early in debugger exception",13,10 30 <2> %if _DEBUG_COND 31 <2> db _4digitshex(opt6_debug_exception)," enable debug mode when debugger exception occurs",13,10 32 <2> db _4digitshex(opt6_debug_mode)," enable debug mode (and BU command)",13,10 33 <2> %endif 34 <2> %endif 0 000054EE 303230302075736520 db _4digitshex(opt6_bios_output)," use ROM-BIOS output even when DOS available",13,10 0 000054F7 524F4D2D42494F5320 0 00005500 6F7574707574206576 0 00005509 656E207768656E2044 0 00005512 4F5320617661696C61 0 0000551B 626C650D0A 0 00005520 30343030206C6F6164 db _4digitshex(opt6_flat_binary)," load and write .EXE and .COM files like flat .BIN files (/F+)",13,10 0 00005529 20616E642077726974 0 00005532 65202E45584520616E 0 0000553B 64202E434F4D206669 0 00005544 6C6573206C696B6520 0 0000554D 666C6174202E42494E 0 00005556 2066696C657320282F 0 0000555F 462B290D0A 0 00005564 3038303020666F7220 db _4digitshex(opt6_big_stack)," for loading flat .BIN files set up Stack Segment != PSP (/E+)",13,10 0 0000556D 6C6F6164696E672066 0 00005576 6C6174202E42494E20 0 0000557F 66696C657320736574 0 00005588 20757020537461636B 0 00005591 205365676D656E7420 0 0000559A 213D2050535020282F 0 000055A3 452B290D0A 38 <2> %if _40COLUMNS 0 000055A8 3130303020656E6162 db _4digitshex(opt6_40_columns)," enable 40-column friendly mode",13,10 0 000055B1 6C652034302D636F6C 0 000055BA 756D6E20667269656E 0 000055C3 646C79206D6F64650D 0 000055CC 0A 0 000055CD 3230303020696E2034 db _4digitshex(opt6_40_indent_odd)," in 40-column mode indent odd D lines more",13,10 0 000055D6 302D636F6C756D6E20 0 000055DF 6D6F646520696E6465 0 000055E8 6E74206F6464204420 0 000055F1 6C696E6573206D6F72 0 000055FA 650D0A 0 000055FD 3430303020696E2034 db _4digitshex(opt6_40_dash)," in 40-column mode display dashes at half of D length",13,10 0 00005606 302D636F6C756D6E20 0 0000560F 6D6F64652064697370 0 00005618 6C6179206461736865 0 00005621 732061742068616C66 0 0000562A 206F662044206C656E 0 00005633 6774680D0A 42 <2> %endif 0 00005638 30315F303030302061 db _6digitssephex(opt6_share_serial_irq)," allow to share serial IRQ handler",13,10 0 00005641 6C6C6F7720746F2073 0 0000564A 686172652073657269 0 00005653 616C20495251206861 0 0000565C 6E646C65720D0A 44 <2> %if _DEBUG 45 <2> db _6digitssephex(opt6_debug_putrunint_early)," run breakpoint early in putrunint",13,10 46 <2> %if _DEBUG_COND 47 <2> db _6digitssephex(opt6_debug_putrunint)," enable debug mode when putrunint called",13,10 48 <2> %endif 49 <2> %endif 0 00005663 303130305F30303030 db _8digitssephex(opt6_bios_io)," use ROM-BIOS I/O even when DOS available (disables script file read)",13,10 0 0000566C 2075736520524F4D2D 0 00005675 42494F5320492F4F20 0 0000567E 6576656E207768656E 0 00005687 20444F532061766169 0 00005690 6C61626C6520286469 0 00005699 7361626C6573207363 0 000056A2 726970742066696C65 0 000056AB 2072656164290D0A 51 <2> %if _REGSREADABLEFLAGS 0 000056B3 323030305F30303030 db _8digitssephex(opt6_r_flags_style2)," display flags in style 2 for R command register dump",13,10 0 000056BC 20646973706C617920 0 000056C5 666C61677320696E20 0 000056CE 7374796C6520322066 0 000056D7 6F72205220636F6D6D 0 000056E0 616E64207265676973 0 000056E9 7465722064756D700D 0 000056F2 0A 0 000056F3 343030305F30303030 db _8digitssephex(opt6_r_flags_style3)," display flags in style 3 for R command register dump",13,10 0 000056FC 20646973706C617920 0 00005705 666C61677320696E20 0 0000570E 7374796C6520332066 0 00005717 6F72205220636F6D6D 0 00005720 616E64207265676973 0 00005729 7465722064756D700D 0 00005732 0A 54 <2> %endif 55 <2> %if _REGSLINEBREAK 0 00005733 383030305F30303030 db _8digitssephex(opt6_r_linebreak_conditional)," linebreak before R register dump if not column 0 (int 10h only)",13,10 0 0000573C 206C696E6562726561 0 00005745 6B206265666F726520 0 0000574E 522072656769737465 0 00005757 722064756D70206966 0 00005760 206E6F7420636F6C75 0 00005769 6D6E20302028696E74 0 00005772 20313068206F6E6C79 0 0000577B 290D0A 57 <2> %endif 63 <1> %ifn %2 0 0000577E 00 asciz 65 <1> %endif 300 301 usemessagesegment 301 ------------------ note: usesection MESSAGESEGMENT 302 .flags_1: helppage optionsi 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %include "options.mac" 19 <2> %endif 20 <2> 0 0000577F 496E7465726E616C20 db "Internal flags: (read DIF)",13,10 0 00005788 666C6167733A202872 0 00005791 65616420444946290D 0 0000579A 0A 0 0000579B 30305F303030312049 db _6digitssephex(oldpacket), " Int25/Int26 packet method available",13,10 0 000057A4 6E7432352F496E7432 0 000057AD 36207061636B657420 0 000057B6 6D6574686F64206176 0 000057BF 61696C61626C650D0A 0 000057C8 30305F303030322049 db _6digitssephex(newpacket), " Int21.7305 packet method available",13,10 0 000057D1 6E7432312E37333035 0 000057DA 207061636B6574206D 0 000057E3 6574686F6420617661 0 000057EC 696C61626C650D0A 24 <2> %if _VDD 0 000057F4 30305F303030342056 db _6digitssephex(ntpacket), " VDD registered and usable",13,10 0 000057FD 444420726567697374 0 00005806 6572656420616E6420 0 0000580F 757361626C650D0A 26 <2> %endif 0 00005817 30305F303030382069 db _6digitssephex(pagedcommand), " internal flag for paged output",13,10 0 00005820 6E7465726E616C2066 0 00005829 6C616720666F722070 0 00005832 61676564206F757470 0 0000583B 75740D0A 0 0000583F 30305F303031302044 db _6digitssephex(notstdinput), " DEBUG's input isn't StdIn",13,10 0 00005848 45425547277320696E 0 00005851 7075742069736E2774 0 0000585A 20537464496E0D0A 0 00005862 30305F303032302044 db _6digitssephex(inputfile), " DEBUG's input is a file",13,10 0 0000586B 45425547277320696E 0 00005874 707574206973206120 0 0000587D 66696C650D0A 0 00005883 30305F303034302044 db _6digitssephex(notstdoutput), " DEBUG's output isn't StdOut",13,10 0 0000588C 454255472773206F75 0 00005895 747075742069736E27 0 0000589E 74205374644F75740D 0 000058A7 0A 0 000058A8 30305F303038302044 db _6digitssephex(outputfile), " DEBUG's output is a file",13,10 0 000058B1 454255472773206F75 0 000058BA 747075742069732061 0 000058C3 2066696C650D0A 32 <2> %if _PM 33 <2> db _6digitssephex(hooked2F), " Int2F.1687 hooked",13,10 34 <2> db _6digitssephex(nohook2F), " Int2F.1687 won't be hooked",13,10 35 <2> db _6digitssephex(protectedmode), " in protected mode",13,10 36 <2> %endif 0 000058CA 30305F313030302073 db _6digitssephex(debuggeeA20), " state of debuggee's A20",13,10 0 000058D3 74617465206F662064 0 000058DC 656275676765652773 0 000058E5 204132300D0A 0 000058EB 30305F323030302073 db _6digitssephex(debuggerA20), " state of debugger's A20 (not implemented: same as previous)",13,10 0 000058F4 74617465206F662064 0 000058FD 656275676765722773 0 00005906 2041323020286E6F74 0 0000590F 20696D706C656D656E 0 00005918 7465643A2073616D65 0 00005921 206173207072657669 0 0000592A 6F7573290D0A 39 <2> %if _BOOTLDR 0 00005930 30305F343030302064 db _6digitssephex(nodosloaded), " debugger booted independent of a DOS",13,10 0 00005939 656275676765722062 0 00005942 6F6F74656420696E64 0 0000594B 6570656E64656E7420 0 00005954 6F66206120444F530D 0 0000595D 0A 41 <2> %endif 0 0000595E 30305F383030302043 db _6digitssephex(has386), " CPU is at least a 386 (32-bit CPU)",13,10 0 00005967 505520697320617420 0 00005970 6C6561737420612033 0 00005979 3836202833322D6269 0 00005982 7420435055290D0A 0 0000598A 30315F303030302069 db _6digitssephex(usecharcounter), " internal flag for tab output processing",13,10 0 00005993 6E7465726E616C2066 0 0000599C 6C616720666F722074 0 000059A5 6162206F7574707574 0 000059AE 2070726F6365737369 0 000059B7 6E670D0A 44 <2> %if _VDD 0 000059BB 30325F303030302072 db _6digitssephex(runningnt), " running inside NTVDM",13,10 0 000059C4 756E6E696E6720696E 0 000059CD 73696465204E545644 0 000059D6 4D0D0A 46 <2> %endif 47 <2> %if _PM 48 <2> db _6digitssephex(canswitchmode), " DPMI raw mode switch usable to set breakpoints",13,10 49 <2> db _6digitssephex(modeswitched), " internal flag for mode switching",13,10 50 <2> %endif 0 000059D9 31305F303030302069 db _6digitssephex(promptwaiting), " internal flag for paged output",13,10 0 000059E2 6E7465726E616C2066 0 000059EB 6C616720666F722070 0 000059F4 61676564206F757470 0 000059FD 75740D0A 52 <2> %if _PM 53 <2> db _6digitssephex(switchbuffer), " internal flag for mode switching",13,10 54 <2> %endif 55 <2> %if _TSR 0 00005A01 34305F303030302069 db _6digitssephex(tsrmode), " in TSR mode (detached debugger process)",13,10 0 00005A0A 6E20545352206D6F64 0 00005A13 652028646574616368 0 00005A1C 656420646562756767 0 00005A25 65722070726F636573 0 00005A2E 73290D0A 57 <2> %endif 58 <2> %if _DOSEMU 0 00005A32 303130305F30303030 db _8digitssephex(runningdosemu), " running inside dosemu",13,10 0 00005A3B 2072756E6E696E6720 0 00005A44 696E7369646520646F 0 00005A4D 73656D750D0A 60 <2> %endif 0 00005A53 303430305F30303030 db _8digitssephex(tt_while) 0 00005A5C 20542F54502F503A20 db " T/TP/P: while condition specified",13,10 0 00005A65 7768696C6520636F6E 0 00005A6E 646974696F6E207370 0 00005A77 656369666965640D0A 0 00005A80 303830305F30303030 db _8digitssephex(tt_p) 0 00005A89 2054503A2050207370 db " TP: P specified (proceed past string ops)",13,10 0 00005A92 656369666965642028 0 00005A9B 70726F636565642070 0 00005AA4 61737420737472696E 0 00005AAD 67206F7073290D0A 0 00005AB5 313030305F30303030 db _8digitssephex(tt_silent_mode) 0 00005ABE 20542F54502F503A20 db " T/TP/P: silent mode (SILENT specified)",13,10 0 00005AC7 73696C656E74206D6F 0 00005AD0 6465202853494C454E 0 00005AD9 542073706563696669 0 00005AE2 6564290D0A 0 00005AE7 323030305F30303030 db _8digitssephex(tt_silence) 0 00005AF0 20542F54502F503A20 db " T/TP/P: silent mode is active, writing to silent buffer",13,10 0 00005AF9 73696C656E74206D6F 0 00005B02 646520697320616374 0 00005B0B 6976652C2077726974 0 00005B14 696E6720746F207369 0 00005B1D 6C656E742062756666 0 00005B26 65720D0A 63 <1> %ifn %2 0 00005B2A 00 asciz 65 <1> %endif 303 304 usemessagesegment 304 ------------------ note: usesection MESSAGESEGMENT 305 .asmoptions_1: helppage optionsa 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %include "options.mac" 19 <2> %endif 20 <2> 0 00005B2B 417661696C61626C65 db "Available assembler/disassembler options: (read/write DAO, read DAS)",13,10 0 00005B34 20617373656D626C65 0 00005B3D 722F64697361737365 0 00005B46 6D626C6572206F7074 0 00005B4F 696F6E733A20287265 0 00005B58 61642F777269746520 0 00005B61 44414F2C2072656164 0 00005B6A 20444153290D0A 0 00005B71 303120446973617373 db _2digitshex(disasm_lowercase), " Disassembler: lowercase output",13,10 0 00005B7A 656D626C65723A206C 0 00005B83 6F7765726361736520 0 00005B8C 6F75747075740D0A 0 00005B94 303220446973617373 db _2digitshex(disasm_commablank)," Disassembler: output blank behind comma",13,10 0 00005B9D 656D626C65723A206F 0 00005BA6 757470757420626C61 0 00005BAF 6E6B20626568696E64 0 00005BB8 20636F6D6D610D0A 0 00005BC0 303420446973617373 db _2digitshex(disasm_nasm), " Disassembler: output addresses in NASM syntax",13,10 0 00005BC9 656D626C65723A206F 0 00005BD2 757470757420616464 0 00005BDB 72657373657320696E 0 00005BE4 204E41534D2073796E 0 00005BED 7461780D0A 0 00005BF2 3038 db _2digitshex(disasm_lowercase_refmem) 0 00005BF4 20446973617373656D db " Disassembler: lowercase referenced memory location segreg",13,10 0 00005BFD 626C65723A206C6F77 0 00005C06 657263617365207265 0 00005C0F 666572656E63656420 0 00005C18 6D656D6F7279206C6F 0 00005C21 636174696F6E207365 0 00005C2A 677265670D0A 0 00005C30 313020446973617373 db _2digitshex(disasm_show_short)," Disassembler: always show SHORT keyword",13,10 0 00005C39 656D626C65723A2061 0 00005C42 6C776179732073686F 0 00005C4B 772053484F5254206B 0 00005C54 6579776F72640D0A 0 00005C5C 323020446973617373 db _2digitshex(disasm_show_near), " Disassembler: always show NEAR keyword",13,10 0 00005C65 656D626C65723A2061 0 00005C6E 6C776179732073686F 0 00005C77 77204E454152206B65 0 00005C80 79776F72640D0A 0 00005C87 343020446973617373 db _2digitshex(disasm_show_far), " Disassembler: always show FAR keyword",13,10 0 00005C90 656D626C65723A2061 0 00005C99 6C776179732073686F 0 00005CA2 7720464152206B6579 0 00005CAB 776F72640D0A 0 00005CB1 383020446973617373 db _2digitshex(disasm_nec), " Disassembler: NEC V20 repeat rules (for segregs)",13,10 0 00005CBA 656D626C65723A204E 0 00005CC3 454320563230207265 0 00005CCC 706561742072756C65 0 00005CD5 732028666F72207365 0 00005CDE 6772656773290D0A 31 <2> %if _40COLUMNS 0 00005CE6 303130302044697361 db _4digitshex(disasm_40_columns)," Disassembler: 40-column friendly mode (only 4 bytes machine code per line)",13,10 0 00005CEF 7373656D626C65723A 0 00005CF8 2034302D636F6C756D 0 00005D01 6E20667269656E646C 0 00005D0A 79206D6F646520286F 0 00005D13 6E6C79203420627974 0 00005D1C 6573206D616368696E 0 00005D25 6520636F6465207065 0 00005D2E 72206C696E65290D0A 0 00005D37 303230302044697361 db _4digitshex(disasm_no_indent), " Disassembler: do not indent disassembly operands",13,10 0 00005D40 7373656D626C65723A 0 00005D49 20646F206E6F742069 0 00005D52 6E64656E7420646973 0 00005D5B 617373656D626C7920 0 00005D64 6F706572616E64730D 0 00005D6D 0A 34 <2> %if _MS_MNEMON_COMPAT 0 00005D6E 303430302044697361 db _4digitshex(disasm_msdebug_mnemonofs), " Disassembler: MS Debug style opcode field width",13,10 0 00005D77 7373656D626C65723A 0 00005D80 204D53204465627567 0 00005D89 207374796C65206F70 0 00005D92 636F6465206669656C 0 00005D9B 642077696474680D0A 36 <2> %endif 37 <2> %endif 0 00005DA4 313030302044697361 db _4digitshex(disasm_a16_memref)," Disassembler: access data in a16 referenced memory operand",13,10 0 00005DAD 7373656D626C65723A 0 00005DB6 206163636573732064 0 00005DBF 61746120696E206131 0 00005DC8 36207265666572656E 0 00005DD1 636564206D656D6F72 0 00005DDA 79206F706572616E64 0 00005DE3 0D0A 0 00005DE5 323030302044697361 db _4digitshex(disasm_a32_memref)," Disassembler: access data in a32 referenced memory operand",13,10 0 00005DEE 7373656D626C65723A 0 00005DF7 206163636573732064 0 00005E00 61746120696E206133 0 00005E09 32207265666572656E 0 00005E12 636564206D656D6F72 0 00005E1B 79206F706572616E64 0 00005E24 0D0A 0 00005E26 343030302044697361 db _4digitshex(disasm_a16_string)," Disassembler: simulate repeated a16 scas/cmps string operation",13,10 0 00005E2F 7373656D626C65723A 0 00005E38 2073696D756C617465 0 00005E41 207265706561746564 0 00005E4A 206131362073636173 0 00005E53 2F636D707320737472 0 00005E5C 696E67206F70657261 0 00005E65 74696F6E0D0A 0 00005E6B 383030302044697361 db _4digitshex(disasm_a32_string)," Disassembler: simulate repeated a32 scas/cmps string operation",13,10 0 00005E74 7373656D626C65723A 0 00005E7D 2073696D756C617465 0 00005E86 207265706561746564 0 00005E8F 206133322073636173 0 00005E98 2F636D707320737472 0 00005EA1 696E67206F70657261 0 00005EAA 74696F6E0D0A 0 00005EB0 30315F303030302044 db _6digitssephex(disasm_hide_modrm)," Disassembler: hide needed MODRM keywords",13,10 0 00005EB9 6973617373656D626C 0 00005EC2 65723A206869646520 0 00005ECB 6E6565646564204D4F 0 00005ED4 44524D206B6579776F 0 00005EDD 7264730D0A 0 00005EE2 30325F303030302044 db _6digitssephex(disasm_asize_loop_nasm)," Disassembler: use LOOP rel, (E)CX rather than LOOPW/LOOPD",13,10 0 00005EEB 6973617373656D626C 0 00005EF4 65723A20757365204C 0 00005EFD 4F4F502072656C2C20 0 00005F06 284529435820726174 0 00005F0F 686572207468616E20 0 00005F18 4C4F4F50572F4C4F4F 0 00005F21 50440D0A 0 00005F25 30345F303030302044 db _6digitssephex(disasm_modrm_always)," Disassembler: always display MODRM keyword even if not needed",13,10 0 00005F2E 6973617373656D626C 0 00005F37 65723A20616C776179 0 00005F40 7320646973706C6179 0 00005F49 204D4F44524D206B65 0 00005F52 79776F726420657665 0 00005F5B 6E206966206E6F7420 0 00005F64 6E65656465640D0A 63 <1> %ifn %2 0 00005F6C 00 asciz 65 <1> %endif 306 %endif 307 308 %if _VARIABLES || _OPTIONS || _PSPVARIABLES 309 usemessagesegment 309 ------------------ note: usesection MESSAGESEGMENT 310 .varhelp: helppage vars 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %endif 19 <2> 0 00005F6D 417661696C61626C65 db "Available " 0 00005F76 20 21 <2> %if _PSPVARIABLES && !(_VARIABLES || _OPTIONS) 22 <2> db "read-only " 23 <2> %endif 0 00005F77 6C4465627567207661 db "lDebug variables:",13,10 0 00005F80 726961626C65733A0D 0 00005F89 0A 25 <2> %if _VARIABLES 0 00005F8A 56302E2E5646095573 db "V0..VF",9,"User-specified usage",13,10 0 00005F93 65722D737065636966 0 00005F9C 696564207573616765 0 00005FA5 0D0A 27 <2> %endif 28 <2> %if _OPTIONS 0 00005FA7 44434F094465627567 db "DCO",9,"Debugger Common Options",13,10 0 00005FB0 67657220436F6D6D6F 0 00005FB9 6E204F7074696F6E73 0 00005FC2 0D0A 0 00005FC4 44414F094465627567 db "DAO",9,"Debugger Assembler/disassembler Options",13,10 0 00005FCD 67657220417373656D 0 00005FD6 626C65722F64697361 0 00005FDF 7373656D626C657220 0 00005FE8 4F7074696F6E730D0A 31 <2> %endif 32 <2> %if _OPTIONS || _PSPVARIABLES && (_OPTIONS || _VARIABLES) 0 00005FF1 2054686520666F6C6C db " The following variables cannot be written:",13,10 0 00005FFA 6F77696E6720766172 0 00006003 6961626C6573206361 0 0000600C 6E6E6F742062652077 0 00006015 72697474656E3A0D0A 34 <2> %endif 35 <2> %if _PSPVARIABLES 0 0000601E 505350094465627567 db "PSP",9,"Debuggee Process" 0 00006027 6765652050726F6365 0 00006030 7373 37 <2> %if _PM 38 <2> db " (as real mode segment)" 39 <2> %endif 0 00006032 0D0A db 13,10 0 00006034 505052094465627567 db "PPR",9,"Debuggee's Parent Process",13,10 0 0000603D 676565277320506172 0 00006046 656E742050726F6365 0 0000604F 73730D0A 0 00006053 505049094465627567 db "PPI",9,"Debuggee's Parent Process Interrupt 22h",13,10 0 0000605C 676565277320506172 0 00006065 656E742050726F6365 0 0000606E 737320496E74657272 0 00006077 757074203232680D0A 43 <2> %endif 44 <2> %if _OPTIONS 0 00006080 444946094465627567 db "DIF",9,"Debugger Internal Flags",13,10 0 00006089 67657220496E746572 0 00006092 6E616C20466C616773 0 0000609B 0D0A 0 0000609D 444353094465627567 db "DCS",9,"Debugger Common Startup options",13,10 0 000060A6 67657220436F6D6D6F 0 000060AF 6E2053746172747570 0 000060B8 206F7074696F6E730D 0 000060C1 0A 0 000060C2 444153094465627567 db "DAS",9,"Debugger Assembler/disassembler Startup options",13,10 0 000060CB 67657220417373656D 0 000060D4 626C65722F64697361 0 000060DD 7373656D626C657220 0 000060E6 53746172747570206F 0 000060EF 7074696F6E730D0A 0 000060F7 445052094465627567 db "DPR",9,"Debugger Process" 0 00006100 6765722050726F6365 0 00006109 7373 49 <2> %if _PM 50 <2> db " (as Real mode segment)",13,10 51 <2> db "DPS",9,"Debugger Process Selector (zero in real mode)" 52 <2> %endif 0 0000610B 0D0A db 13,10 0 0000610D 445050094465627567 db "DPP",9,"Debugger's Parent Process" 0 00006116 676572277320506172 0 0000611F 656E742050726F6365 0 00006128 7373 55 <2> %if _TSR 0 0000612A 20287A65726F20696E db " (zero in TSR mode)" 0 00006133 20545352206D6F6465 0 0000613C 29 57 <2> %endif 0 0000613D 0D0A db 13,10 0 0000613F 445049094465627567 db "DPI",9,"Debugger's Parent process Interrupt 22h" 0 00006148 676572277320506172 0 00006151 656E742070726F6365 0 0000615A 737320496E74657272 0 00006163 75707420323268 60 <2> %if _TSR 0 0000616A 20287A65726F20696E db " (zero in TSR mode)" 0 00006173 20545352206D6F6465 0 0000617C 29 62 <2> %endif 0 0000617D 0D0A db 13,10 0 0000617F 0D0A db 13,10 0 00006181 456E746572203F4F20 db "Enter ?O to display the options and internal flags.",13,10 0 0000618A 746F20646973706C61 0 00006193 7920746865206F7074 0 0000619C 696F6E7320616E6420 0 000061A5 696E7465726E616C20 0 000061AE 666C6167732E0D0A 66 <2> %endif 63 <1> %ifn %2 0 000061B6 00 asciz 65 <1> %endif 311 %endif 312 %endif 313 314 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 314 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 000024D8 54686973206C446562 .readonly: asciz "This lDebug variable cannot be written to. See ?V.",13,10 0 000024E1 756720766172696162 0 000024EA 6C652063616E6E6F74 0 000024F3 206265207772697474 0 000024FC 656E20746F2E205365 0 00002505 65203F562E0D0A00 0 0000250D 54686973206D656D6F .readonly_mem: asciz "This memory variable cannot be written to.",13,10 0 00002516 727920766172696162 0 0000251F 6C652063616E6E6F74 0 00002528 206265207772697474 0 00002531 656E20746F2E0D0A00 317 %if _MMXSUPP 318 .internal_error_no_mmx: 0 0000253A 496E7465726E616C20 asciz "Internal error, MMX variables not supported.",13,10 0 00002543 6572726F722C204D4D 0 0000254C 58207661726961626C 0 00002555 6573206E6F74207375 0 0000255E 70706F727465642E0D 0 00002567 0A00 320 %endif 321 %if _PM 322 .readonly_verifysegm: 323 db "Memory using selector " 324 .readonly_verifysegm.selector: 325 asciz "---- is inaccessible for writing.",13,10 326 %endif 0 00002569 5B6D6F72655D .more: db "[more]" 328 .more_size equ $-.more 0 0000256F 0D .more_over: db 13 0 00002570 20 times .more_size db 32 0 00002576 0D db 13 ; to overwrite previous prompt 332 .more_over_size equ $-.more_over 0 00002577 5E430D0A .ctrlc: db "^C",13,10 334 .ctrlc_size equ $-.ctrlc 0 0000257B 00 asciz 336 .freedos_ctrlc_workaround: 0 0000257C 20284F6C6420467265 asciz " (Old FreeDOS kernel Ctrl-C work around happened)",13,10 0 00002585 65444F53206B65726E 0 0000258E 656C204374726C2D43 0 00002597 20776F726B2061726F 0 000025A0 756E64206861707065 0 000025A9 6E6564290D0A00 338 .not_while_indos: 0 000025B0 436F6D6D616E64206E asciz "Command not supported while in InDOS mode.",13,10 0 000025B9 6F7420737570706F72 0 000025C2 746564207768696C65 0 000025CB 20696E20496E444F53 0 000025D4 206D6F64652E0D0A00 0 000025DD 43757272656E74206D .rv_mode.before: asciz "Current mode: " 0 000025E6 6F64653A2000 341 %if _PM 342 .rv_mode_dpmi_16: asciz "DPMI 16-bit CS",13,10 343 .rv_mode_dpmi_32: asciz "DPMI 32-bit CS",13,10 344 %endif 0 000025EC 5265616C203836204D .rv_mode_r86m: asciz "Real 86 Mode",13,10 0 000025F5 6F64650D0A00 0 000025FB 5669727475616C2038 .rv_mode_v86m: asciz "Virtual 86 Mode",13,10 0 00002604 36204D6F64650D0A00 347 0 0000260D 333836207265676973 .regs386: asciz "386 registers are " 0 00002616 746572732061726520 0 0000261F 00 0 00002620 6E6F7420 .regs386_off:db "not " 0 00002624 646973706C61796564 .regs386_on: asciz "displayed",13,10 0 0000262D 0D0A00 351 352 %if _EMS 353 usemessagesegment 354 .xhelp: helppage ems 355 %endif 356 357 %if _PM 358 usesection lDEBUG_DATA_ENTRY 359 .desc: asciz "DESC" 360 usemessagesegment 361 .deschelp: helppage desc 362 %endif 363 364 %ifn _LINK 365 %if !_BOOTLDR_DISCARD_HELP && _MESSAGESEGMENT 366 messagesegment_truncated_size equ messagesegment_size 367 endarea messagesegment_truncated, 1 368 messagesegment_nobits_truncated_size equ messagesegment_nobits_size 369 endarea messagesegment_nobits_truncated, 1 370 %endif 371 %if _EXTHELPBOOT 372 %if _BOOTLDR 373 usemessagesegment 374 %if _BOOTLDR_DISCARD_HELP 375 align 2, db 0 376 messagesegment_truncated_size equ fromparas(paras($ - messagesegment_start + fromwords(imsg.boothelp_replacement_size_w))) 377 endarea messagesegment_truncated, 1 378 %endif 379 .boothelp: helppage boot 380 %if _BOOTLDR_DISCARD_HELP 381 382 truncated_message_last equ .boothelp + fromwords(imsg.boothelp_replacement_size_w) 383 absolute truncated_message_last 384 %if _HELP_COMPRESSED 385 alignb 16 386 truncated_hshrink_message_buffer: equ $ 387 resb hshrink_message_buffer_size 388 %endif 389 390 alignb 16 391 messagesegment_nobits_truncated_size equ $ - $$ 392 endarea messagesegment_nobits_truncated, 1 393 %endif 394 %endif 395 %endif 396 397 %else ; _LINK 398 399 global behind_messagesegment_truncated 400 401 %if !_BOOTLDR_DISCARD_HELP && _MESSAGESEGMENT 402 behind_messagesegment_truncated equ behind_messagesegment 403 behind_messagesegment_nobits_truncated equ behind_messagesegment_nobits 404 %endif 405 %if _EXTHELPBOOT 406 %if _BOOTLDR 407 usemessagesegment === Switch to base=008120h -> "MESSAGESEGMENT" 407 ------------------ note: usesection MESSAGESEGMENT 408 %if _BOOTLDR_DISCARD_HELP 0 000061B7 00 align 2, db 0 410 %push 411 %define GET_MESSAGE_LENGTH 412 %include "help/bootdisc.asm" 1 <1> %if 0 2 <1> 3 <1> lDebug help message pages 4 <1> 5 <1> Copyright (C) 1995-2003 Paul Vojta 6 <1> Copyright (C) 2008-2023 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> %define MESSAGE "This help page is only available in boot loaded mode.",13,10 17 <1> 18 <1> %ifndef GET_MESSAGE_LENGTH 19 <1> %ifndef MESSAGE_INLINE 20 <1> %include "debug.mac" 21 <1> %endif 22 <1> 23 <1> db MESSAGE 24 <1> %else 25 <1> _strlen MESSAGE,0 26 <1> %endif 413 %undef GET_MESSAGE_LENGTH 414 bootldr_discard_help_page_length equ fromwords(words(%$len)) 415 %pop 416 absolute $ 417 alignb 2 418 000061B8 resb bootldr_discard_help_page_length 419 alignb 16 420 behind_messagesegment_truncated: equ $ 421 usemessagesegment 421 ------------------ note: usesection MESSAGESEGMENT 422 %endif 423 .boothelp: helppage boot 59 <1> %defstr %%basename %1 60 <1> %strcat %%includename "help/", %%basename, ".asm" 61 <1> %00: 62 <1> %include %%includename 1 <2> %if 0 2 <2> 3 <2> lDebug help message pages 4 <2> 5 <2> Copyright (C) 1995-2003 Paul Vojta 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> %ifndef MESSAGE_INLINE 17 <2> %include "debug.mac" 18 <2> %endif 19 <2> 0 000061B8 426F6F74206C6F6164 db "Boot loading commands:",13,10 0 000061C1 696E6720636F6D6D61 0 000061CA 6E64733A0D0A 0 000061D0 424F4F54204C495354 db "BOOT LIST HDA",13,10 0 000061D9 204844410D0A 0 000061DF 424F4F542044495220 db "BOOT DIR [partition] [dirname]",13,10 0 000061E8 5B706172746974696F 0 000061F1 6E5D205B6469726E61 0 000061FA 6D655D0D0A 0 000061FF 424F4F542052454144 db "BOOT READ|WRITE [partition] segment [[HIDDEN=sector] sector] [count]",13,10 0 00006208 7C5752495445205B70 0 00006211 6172746974696F6E5D 0 0000621A 207365676D656E7420 0 00006223 5B5B48494444454E3D 0 0000622C 736563746F725D2073 0 00006235 6563746F725D205B63 0 0000623E 6F756E745D0D0A 24 <2> %if _DOSEMU 0 00006245 424F4F542051554954 db "BOOT QUIT",9,"[exits dosemu or shuts down using APM]",13,10 0 0000624E 095B65786974732064 0 00006257 6F73656D75206F7220 0 00006260 736875747320646F77 0 00006269 6E207573696E672041 0 00006272 504D5D0D0A 26 <2> %else 27 <2> db "BOOT QUIT",9,"[shuts down using APM]",13,10 28 <2> %endif 0 00006277 424F4F54205B50524F db "BOOT [PROTOCOL=SECTOR] partition",13,10 0 00006280 544F434F4C3D534543 0 00006289 544F525D2070617274 0 00006292 6974696F6E0D0A 0 00006299 424F4F542050524F54 db "BOOT PROTOCOL=proto [opt] [partition] [filename1] [filename2] [cmdline]",13,10 0 000062A2 4F434F4C3D70726F74 0 000062AB 6F205B6F70745D205B 0 000062B4 706172746974696F6E 0 000062BD 5D205B66696C656E61 0 000062C6 6D65315D205B66696C 0 000062CF 656E616D65325D205B 0 000062D8 636D646C696E655D0D 0 000062E1 0A 0 000062E2 0974686520666F6C6C db 9,"the following partitions may be specified:",13,10 0 000062EB 6F77696E6720706172 0 000062F4 746974696F6E73206D 0 000062FD 617920626520737065 0 00006306 6369666965643A0D0A 0 0000630F 09204844416E756D09 db 9," HDAnum",9,"first hard disk, num = partition (1-4 primary, 5+ logical)",13,10 0 00006318 666972737420686172 0 00006321 64206469736B2C206E 0 0000632A 756D203D2070617274 0 00006333 6974696F6E2028312D 0 0000633C 34207072696D617279 0 00006345 2C20352B206C6F6769 0 0000634E 63616C290D0A 0 00006354 09204844426E756D09 db 9," HDBnum",9,"second hard disk (etc), num = partition",13,10 0 0000635D 7365636F6E64206861 0 00006366 7264206469736B2028 0 0000636F 657463292C206E756D 0 00006378 203D20706172746974 0 00006381 696F6E0D0A 0 00006386 092048444109666972 db 9," HDA",9,"first hard disk (only valid for READ|WRITE|PROTOCOL=SECTOR)",13,10 0 0000638F 737420686172642064 0 00006398 69736B20286F6E6C79 0 000063A1 2076616C696420666F 0 000063AA 7220524541447C5752 0 000063B3 4954457C50524F544F 0 000063BC 434F4C3D534543544F 0 000063C5 52290D0A 0 000063C9 092046444109666972 db 9," FDA",9,"first floppy disk",13,10 0 000063D2 737420666C6F707079 0 000063DB 206469736B0D0A 0 000063E2 092046444209736563 db 9," FDB",9,"second floppy disk (etc)",13,10 0 000063EB 6F6E6420666C6F7070 0 000063F4 79206469736B202865 0 000063FD 7463290D0A 0 00006402 09204C445009706172 db 9," LDP",9,"partition the debugger loaded from",13,10 0 0000640B 746974696F6E207468 0 00006414 652064656275676765 0 0000641D 72206C6F6164656420 0 00006426 66726F6D0D0A 0 0000642C 092059445009706172 db 9," YDP",9,"partition the most recent Y command loaded from",13,10 0 00006435 746974696F6E207468 0 0000643E 65206D6F7374207265 0 00006447 63656E74205920636F 0 00006450 6D6D616E64206C6F61 0 00006459 6465642066726F6D0D 0 00006462 0A 0 00006463 0920534450096C6173 db 9," SDP",9,"last used partition (default if no partition specified)",13,10 0 0000646C 742075736564207061 0 00006475 72746974696F6E2028 0 0000647E 64656661756C742069 0 00006487 66206E6F2070617274 0 00006490 6974696F6E20737065 0 00006499 636966696564290D0A 0 000064A2 0966696C656E616D65 db 9,"filename2 may be double-slash // for none",13,10 0 000064AB 32206D617920626520 0 000064B4 646F75626C652D736C 0 000064BD 617368202F2F20666F 0 000064C6 72206E6F6E650D0A 0 000064CE 09636D646C696E6520 db 9,"cmdline is only valid for lDOS, RxDOS.2, RxDOS.3 protocols",13,10 0 000064D7 6973206F6E6C792076 0 000064E0 616C696420666F7220 0 000064E9 6C444F532C20527844 0 000064F2 4F532E322C20527844 0 000064FB 4F532E332070726F74 0 00006504 6F636F6C730D0A 0 0000650B 0966696C6573272064 db 9,"files' directory entries are loaded to 500h and 520h",13,10 0 00006514 69726563746F727920 0 0000651D 656E74726965732061 0 00006526 7265206C6F61646564 0 0000652F 20746F203530306820 0 00006538 616E6420353230680D 0 00006541 0A 0 00006542 0D0A db 13,10 0 00006544 417661696C61626C65 db "Available protocols: (default filenames, load segment, then entrypoint)",13,10 0 0000654D 2070726F746F636F6C 0 00006556 733A20286465666175 0 0000655F 6C742066696C656E61 0 00006568 6D65732C206C6F6164 0 00006571 207365676D656E742C 0 0000657A 207468656E20656E74 0 00006583 7279706F696E74290D 0 0000658C 0A 0 0000658D 204C444F5309094C44 db " LDOS",9,9, "LDOS.COM or L[D]DEBUG.COM at 200h, 0:400h",13,10 0 00006596 4F532E434F4D206F72 0 0000659F 204C5B445D44454255 0 000065A8 472E434F4D20617420 0 000065B1 323030682C20303A34 0 000065BA 3030680D0A 0 000065BF 2046524545444F5309 db " FREEDOS",9,"KERNEL.SYS or METAKERN.SYS at 60h, 0:0",13,10 0 000065C8 4B45524E454C2E5359 0 000065D1 53206F72204D455441 0 000065DA 4B45524E2E53595320 0 000065E3 6174203630682C2030 0 000065EC 3A300D0A 0 000065F0 20444F534309094950 db " DOSC",9,9, "IPL.SYS at 2000h, 0:0",13,10 0 000065F9 4C2E53595320617420 0 00006602 32303030682C20303A 0 0000660B 300D0A 0 0000660E 20454452444F530909 db " EDRDOS",9,9,"DRBIO.SYS at 70h, 0:0",13,10 0 00006617 445242494F2E535953 0 00006620 206174203730682C20 0 00006629 303A300D0A 0 0000662E 204D53444F53360909 db " MSDOS6",9,9, "IO.SYS + MSDOS.SYS at 70h, 0:0",13,10 0 00006637 494F2E535953202B20 0 00006640 4D53444F532E535953 0 00006649 206174203730682C20 0 00006652 303A300D0A 0 00006657 204D53444F53370909 db " MSDOS7",9,9, "IO.SYS at 70h, 0:200h",13,10 0 00006660 494F2E535953206174 0 00006669 203730682C20303A32 0 00006672 3030680D0A 0 00006677 2049424D444F530909 db " IBMDOS",9,9, "IBMBIO.COM + IBMDOS.COM at 70h, 0:0",13,10 0 00006680 49424D42494F2E434F 0 00006689 4D202B2049424D444F 0 00006692 532E434F4D20617420 0 0000669B 3730682C20303A300D 0 000066A4 0A 0 000066A5 204452444F53090949 db " DRDOS",9,9, "IBMBIO.COM + IBMDOS.COM at 70h, 0:0",13,10 0 000066AE 424D42494F2E434F4D 0 000066B7 202B2049424D444F53 0 000066C0 2E434F4D2061742037 0 000066C9 30682C20303A300D0A 0 000066D2 204E544C445209094E db " NTLDR",9,9, "NTLDR at 2000h, 0:0",13,10 0 000066DB 544C44522061742032 0 000066E4 303030682C20303A30 0 000066ED 0D0A 0 000066EF 20424F4F544D475209 db " BOOTMGR",9, "BOOTMGR at 2000h, 0:0",13,10 0 000066F8 424F4F544D47522061 0 00006701 742032303030682C20 0 0000670A 303A300D0A 0 0000670F 205258444F532E3009 db " RXDOS.0",9,"RXDOSBIO.SYS + RXDOS.SYS at 70h, 0:0",13,10 0 00006718 5258444F5342494F2E 0 00006721 535953202B20525844 0 0000672A 4F532E535953206174 0 00006733 203730682C20303A30 0 0000673C 0D0A 0 0000673E 205258444F532E3109 db " RXDOS.1",9,"RXBIO.SYS + RXDOS.SYS at 70h, 0:0",13,10 0 00006747 525842494F2E535953 0 00006750 202B205258444F532E 0 00006759 535953206174203730 0 00006762 682C20303A300D0A 0 0000676A 205258444F532E3209 db " RXDOS.2",9,"RXDOS.COM at 70h, 0:400h",13,10 0 00006773 5258444F532E434F4D 0 0000677C 206174203730682C20 0 00006785 303A343030680D0A 0 0000678D 205258444F532E3309 db " RXDOS.3",9,"RXDOS.COM at 200h, 0:400h",13,10 0 00006796 5258444F532E434F4D 0 0000679F 20617420323030682C 0 000067A8 20303A343030680D0A 0 000067B1 20434841494E090942 db " CHAIN",9,9,"BOOTSECT.DOS at 7C0h, -7C0h:7C00h",13,10 0 000067BA 4F4F54534543542E44 0 000067C3 4F5320617420374330 0 000067CC 682C202D374330683A 0 000067D5 37433030680D0A 0 000067DC 20534543544F520909 db " SECTOR",9,9,"(default) load partition boot sector or MBR",13,10 0 000067E5 2864656661756C7429 0 000067EE 206C6F616420706172 0 000067F7 746974696F6E20626F 0 00006800 6F7420736563746F72 0 00006809 206F72204D42520D0A 0 00006812 20534543544F52414C db " SECTORALT",9,"as SECTOR, but entry at 07C0h:0",13,10 0 0000681B 540961732053454354 0 00006824 4F522C206275742065 0 0000682D 6E7472792061742030 0 00006836 374330683A300D0A 0 0000683E 0D0A db 13,10 0 00006840 417661696C61626C65 db "Available options:",13,10 0 00006849 206F7074696F6E733A 0 00006852 0D0A 0 00006854 204D494E504152413D db " MINPARA=num",9,9, "load at least that many paragraphs",13,10 0 0000685D 6E756D09096C6F6164 0 00006866 206174206C65617374 0 0000686F 2074686174206D616E 0 00006878 792070617261677261 0 00006881 7068730D0A 0 00006886 204D4158504152413D db " MAXPARA=num",9,9, "load at most that many paragraphs (0 = as many as fit)",13,10 0 0000688F 6E756D09096C6F6164 0 00006898 206174206D6F737420 0 000068A1 74686174206D616E79 0 000068AA 207061726167726170 0 000068B3 6873202830203D2061 0 000068BC 73206D616E79206173 0 000068C5 20666974290D0A 0 000068CC 205345474D454E543D db " SEGMENT=num",9,9, "change segment at that the kernel loads",13,10 0 000068D5 6E756D09096368616E 0 000068DE 6765207365676D656E 0 000068E7 742061742074686174 0 000068F0 20746865206B65726E 0 000068F9 656C206C6F6164730D 0 00006902 0A 0 00006903 20454E5452593D5B6E db " ENTRY=[num:]num",9,"change entrypoint (CS (relative) : IP)",13,10 0 0000690C 756D3A5D6E756D0963 0 00006915 68616E676520656E74 0 0000691E 7279706F696E742028 0 00006927 4353202872656C6174 0 00006930 69766529203A204950 0 00006939 290D0A 0 0000693C 204250423D5B6E756D db " BPB=[num:]num",9,9, "change BPB load address (segment -1 = auto-BPB)",13,10 0 00006945 3A5D6E756D09096368 0 0000694E 616E67652042504220 0 00006957 6C6F61642061646472 0 00006960 65737320287365676D 0 00006969 656E74202D31203D20 0 00006972 6175746F2D42504229 0 0000697B 0D0A 0 0000697D 20434845434B4F4646 db " CHECKOFFSET=num",9,"set address of word to check, must be even",13,10 0 00006986 5345543D6E756D0973 0 0000698F 657420616464726573 0 00006998 73206F6620776F7264 0 000069A1 20746F20636865636B 0 000069AA 2C206D757374206265 0 000069B3 206576656E0D0A 0 000069BA 20434845434B56414C db " CHECKVALUE=num",9,9,"set value of word to check (0 = no check)",13,10 0 000069C3 55453D6E756D090973 0 000069CC 65742076616C756520 0 000069D5 6F6620776F72642074 0 000069DE 6F20636865636B2028 0 000069E7 30203D206E6F206368 0 000069F0 65636B290D0A 0 000069F6 426F6F6C65616E206F db "Boolean options: [opt=bool]",13,10 0 000069FF 7074696F6E733A205B 0 00006A08 6F70743D626F6F6C5D 0 00006A11 0D0A 0 00006A13 205345545F444C5F55 db " SET_DL_UNIT",9,9,"set dl to load unit",13,10 0 00006A1C 4E4954090973657420 0 00006A25 646C20746F206C6F61 0 00006A2E 6420756E69740D0A 0 00006A36 205345545F424C5F55 db " SET_BL_UNIT",9,9,"set bl to load unit",13,10 0 00006A3F 4E4954090973657420 0 00006A48 626C20746F206C6F61 0 00006A51 6420756E69740D0A 0 00006A59 205345545F53494449 db " SET_SIDI_CLUSTER",9,"set si:di to first cluster",13,10 0 00006A62 5F434C555354455209 0 00006A6B 7365742073693A6469 0 00006A74 20746F206669727374 0 00006A7D 20636C75737465720D 0 00006A86 0A 0 00006A87 205345545F44535349 db " SET_DSSI_DPT",9,9,"set ds:si to DPT address",13,10 0 00006A90 5F4450540909736574 0 00006A99 2064733A736920746F 0 00006AA2 204450542061646472 0 00006AAB 6573730D0A 0 00006AB0 20505553485F445054 db " PUSH_DPT",9,9,"push DPT address and DPT entry address",13,10 0 00006AB9 090970757368204450 0 00006AC2 542061646472657373 0 00006ACB 20616E642044505420 0 00006AD4 656E74727920616464 0 00006ADD 726573730D0A 0 00006AE3 204441544153544152 db " DATASTART_HIDDEN",9,"add hidden sectors to datastart var",13,10 0 00006AEC 545F48494444454E09 0 00006AF5 616464206869646465 0 00006AFE 6E20736563746F7273 0 00006B07 20746F206461746173 0 00006B10 74617274207661720D 0 00006B19 0A 0 00006B1A 205345545F41584258 db " SET_AXBX_DATASTART",9,"set ax:bx to datastart var",13,10 0 00006B23 5F4441544153544152 0 00006B2C 54097365742061783A 0 00006B35 627820746F20646174 0 00006B3E 617374617274207661 0 00006B47 720D0A 0 00006B4A 205345545F44534250 db " SET_DSBP_BPB",9,9,"set ds:bp to BPB address",13,10 0 00006B53 5F4250420909736574 0 00006B5C 2064733A627020746F 0 00006B65 204250422061646472 0 00006B6E 6573730D0A 0 00006B73 204C42415F5345545F db " LBA_SET_TYPE",9,9,"set LBA partition type in BPB",13,10 0 00006B7C 545950450909736574 0 00006B85 204C42412070617274 0 00006B8E 6974696F6E20747970 0 00006B97 6520696E204250420D 0 00006BA0 0A 0 00006BA1 204D4553534147455F db " MESSAGE_TABLE",9,9, "provide message table pointed to at 1EEh",13,10 0 00006BAA 5441424C4509097072 0 00006BB3 6F76696465206D6573 0 00006BBC 73616765207461626C 0 00006BC5 6520706F696E746564 0 00006BCE 20746F206174203145 0 00006BD7 45680D0A 0 00006BDB 205345545F41584258 db " SET_AXBX_ROOT_HIDDEN",9, "set ax:bx to root start with hidden sectors",13,10 0 00006BE4 5F524F4F545F484944 0 00006BED 44454E097365742061 0 00006BF6 783A627820746F2072 0 00006BFF 6F6F74207374617274 0 00006C08 207769746820686964 0 00006C11 64656E20736563746F 0 00006C1A 72730D0A 0 00006C1E 204E4F5F4250420909 db " NO_BPB",9,9,9, "do not load BPB",13,10 0 00006C27 09646F206E6F74206C 0 00006C30 6F6164204250420D0A 0 00006C39 205345545F44535349 db " SET_DSSI_PARTINFO",9, "load part table to 600h, point ds:si + ds:bp to it",13,10 0 00006C42 5F50415254494E464F 0 00006C4B 096C6F616420706172 0 00006C54 74207461626C652074 0 00006C5D 6F20363030682C2070 0 00006C66 6F696E742064733A73 0 00006C6F 69202B2064733A6270 0 00006C78 20746F2069740D0A 0 00006C80 20434D444C494E4509 db " CMDLINE",9,9, "pass a kernel command line (recent FreeDOS extension)",13,10 0 00006C89 09706173732061206B 0 00006C92 65726E656C20636F6D 0 00006C9B 6D616E64206C696E65 0 00006CA4 2028726563656E7420 0 00006CAD 46726565444F532065 0 00006CB6 7874656E73696F6E29 0 00006CBF 0D0A 63 <1> %ifn %2 0 00006CC1 00 asciz 65 <1> %endif 424 %if _BOOTLDR_DISCARD_HELP 425 426 truncated_message_last equ .boothelp + bootldr_discard_help_page_length 427 absolute truncated_message_last 428 %if _HELP_COMPRESSED 429 alignb 16 430 truncated_hshrink_message_buffer: equ $ 431 resb hshrink_message_buffer_size 432 %endif 433 434 alignb 16 435 behind_messagesegment_nobits_truncated: equ $ 436 %endif 437 %endif 438 %endif 439 440 usesection MESSAGESEGMENT 440 ------------------ note: usesection MESSAGESEGMENT 0 00006CC2 90 align 16 442 behind_messagesegment: equ $ 443 absolute $ 444 %if _HELP_COMPRESSED 445 alignb 16 446 hshrink_message_buffer: equ $ 447 resb hshrink_message_buffer_size 448 %endif 449 alignb 16 450 behind_messagesegment_nobits: equ $ 451 %endif ; _LINK 452 453 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 453 ------------------ note: usesection lDEBUG_DATA_ENTRY 454 %if _TSR 0 00002630 43616E6E6F7420676F .pspnotfound: asciz "Cannot go resident, child PSP not found.",13,10 0 00002639 207265736964656E74 0 00002642 2C206368696C642050 0 0000264B 5350206E6F7420666F 0 00002654 756E642E0D0A00 0 0000265B 43616E6E6F7420676F .psphooked: asciz "Cannot go resident, child PSP parent return address hooked.",13,10 0 00002664 207265736964656E74 0 0000266D 2C206368696C642050 0 00002676 535020706172656E74 0 0000267F 2072657475726E2061 0 00002688 64647265737320686F 0 00002691 6F6B65642E0D0A00 0 00002699 506174636865642050 .nowtsr1: asciz "Patched PSP at " 0 000026A2 53502061742000 0 000026A9 2C206E6F7720726573 .nowtsr2: asciz ", now resident.",13,10 0 000026B2 6964656E742E0D0A00 0 000026BB 416C72656164792072 .alreadytsr: asciz "Already resident.",13,10 0 000026C4 65736964656E742E0D 0 000026CD 0A00 460 .tsr_cannot_terminate_attached: 0 000026CF 43616E6E6F74207465 asciz "Cannot terminate attached while resident.",13,10 0 000026D8 726D696E6174652061 0 000026E1 747461636865642077 0 000026EA 68696C652072657369 0 000026F3 64656E742E0D0A00 462 .tsr_cannot_ll: 0 000026FB 43616E6E6F74206C6F asciz "Cannot load process while resident. Use R DCO7 CLR= ",_4digitshex(opt7_no_tsr_ll)," to override.",13,10 0 00002704 61642070726F636573 0 0000270D 73207768696C652072 0 00002716 65736964656E742E20 0 0000271F 55736520522044434F 0 00002728 3720434C523D203230 0 00002731 303020746F206F7665 0 0000273A 72726964652E0D0A00 464 %endif 465 %if _ATTACH 0 00002743 4E6F74207965742072 .notyettsr: asciz "Not yet resident. Cannot attach.",13,10 0 0000274C 65736964656E742E20 0 00002755 43616E6E6F74206174 0 0000275E 746163682E0D0A00 0 00002766 496E76616C69642050 .invalidpsp: asciz "Invalid PSP specified. Cannot attach.",13,10 0 0000276F 535020737065636966 0 00002778 6965642E2043616E6E 0 00002781 6F7420617474616368 0 0000278A 2E0D0A00 0 0000278E 53656C662D6F776E65 .selfownedpsp: asciz "Self-owned PSP specified. Cannot attach.",13,10 0 00002797 642050535020737065 0 000027A0 6369666965642E2043 0 000027A9 616E6E6F7420617474 0 000027B2 6163682E0D0A00 0 000027B9 506174636865642050 .nowattached: asciz "Patched PSP, now attached.",13,10 0 000027C2 53502C206E6F772061 0 000027CB 747461636865642E0D 0 000027D4 0A00 0 000027D6 41545441434800 .attach: asciz "ATTACH" 471 %endif 472 %if _PM && (_TSR || _BOOTLDR) 473 .cannotpmquit: asciz "Cannot quit, still in protected mode.",13,10 474 %endif 475 %if _PM 476 .cannotpmload: asciz "Process loading aborted: Still in protected mode.",13,10 477 %endif 478 %if _BOOTLDR 0 000027DD 436F6D6D616E64206E .nobootsupp: asciz "Command not supported in boot loaded mode.",13,10 0 000027E6 6F7420737570706F72 0 000027EF 74656420696E20626F 0 000027F8 6F74206C6F61646564 0 00002801 206D6F64652E0D0A00 0 0000280A 53687574646F776E20 .boot_quit_fail:asciz "Shutdown not supported.",13,10 0 00002813 6E6F7420737570706F 0 0000281C 727465642E0D0A00 0 00002824 426F6F74206661696C .bootfail: asciz "Boot failure: " 0 0000282D 7572653A2000 0 00002833 52656164696E672073 .bootfail_read: db "Reading sector failed (error " 0 0000283C 6563746F7220666169 0 00002845 6C656420286572726F 0 0000284E 7220 0 00002850 5F5F68292E0D0A00 .bootfail_read_errorcode: asciz "__h).",13,10 0 00002858 426F6F742073656374 .bootfail_sig: asciz "Boot sector signature missing (is not AA55h).",13,10 0 00002861 6F72207369676E6174 0 0000286A 757265206D69737369 0 00002873 6E6720286973206E6F 0 0000287C 74204141353568292E 0 00002885 0D0A00 0 00002888 506172746974696F6E .bootfail_sig_parttable: ascii "Partition table signature missing" 0 00002891 207461626C65207369 0 0000289A 676E6174757265206D 0 000028A3 697373696E67 0 000028A9 20286973206E6F7420 asciz " (is not AA55h).",13,10 0 000028B2 4141353568292E0D0A 0 000028BB 00 0 000028BC 426F6F742073656374 .bootfail_code: asciz "Boot sector code invalid (is 0000h).",13,10 0 000028C5 6F7220636F64652069 0 000028CE 6E76616C6964202869 0 000028D7 73203030303068292E 0 000028E0 0D0A00 488 .bootfail_secsizediffer: 0 000028E3 425042204270532064 asciz "BPB BpS differs from actual sector size.",13,10 0 000028EC 696666657273206672 0 000028F5 6F6D2061637475616C 0 000028FE 20736563746F722073 0 00002907 697A652E0D0A00 490 .bootfail_stack_underflow: 0 0000290E 426F6F742073746163 asciz "Boot stack underflowed.",13,10 0 00002917 6B20756E646572666C 0 00002920 6F7765642E0D0A00 492 .bootfail_check_mismatch: 0 00002928 436865636B206D6973 db "Check mismatch, expected " 0 00002931 6D617463682C206578 0 0000293A 70656374656420 494 .bootfail_check_mismatch.check_value: 0 00002941 5F5F5F5F6820617420 db "____h at offset " 0 0000294A 6F666673657420 496 .bootfail_check_mismatch.check_offset: 0 00002951 5F5F5F5F6820627574 db "____h but has " 0 0000295A 2068617320 498 .bootfail_check_mismatch.check_got: 0 0000295F 5F5F5F5F682E0D0A00 asciz "____h.",13,10 0 00002968 4F7574206F66206D65 .boot_out_of_memory_error: asciz "Out of memory.", 13,10 0 00002971 6D6F72792E0D0A00 0 00002979 546F6F206D616E7920 .boot_too_many_partitions_error:asciz "Too many partitions (or a loop).",13,10 0 00002982 706172746974696F6E 0 0000298B 7320286F722061206C 0 00002994 6F6F70292E0D0A00 0 0000299C 506172746974696F6E .boot_partition_cycle_error: asciz "Partition table cycle detected.",13,10 0 000029A5 207461626C65206379 0 000029AE 636C65206465746563 0 000029B7 7465642E0D0A00 0 000029BE 506172746974696F6E .boot_partition_not_found: asciz "Partition not found.",13,10 0 000029C7 206E6F7420666F756E 0 000029D0 642E0D0A00 0 000029D5 52656164206572726F .boot_access_error: asciz "Read error.", 13,10 0 000029DE 722E0D0A00 0 000029E3 536563746F72207369 .boot_sector_too_large: asciz "Sector size too small (< 32 bytes).", 13,10 0 000029EC 7A6520746F6F20736D 0 000029F5 616C6C20283C203332 0 000029FE 206279746573292E0D 0 00002A07 0A00 0 00002A09 536563746F72207369 .boot_sector_too_small: asciz "Sector size too large (> 8192 bytes).", 13,10 0 00002A12 7A6520746F6F206C61 0 00002A1B 72676520283E203831 0 00002A24 393220627974657329 0 00002A2D 2E0D0A00 0 00002A31 536563746F72207369 .boot_sector_not_power: asciz "Sector size not a power of two.", 13,10 0 00002A3A 7A65206E6F74206120 0 00002A43 706F776572206F6620 0 00002A4C 74776F2E0D0A00 0 00002A53 496E76616C69642067 .boot_invalid_sectors: asciz "Invalid geometry sectors.", 13,10 0 00002A5C 656F6D657472792073 0 00002A65 6563746F72732E0D0A 0 00002A6E 00 0 00002A6F 496E76616C69642067 .boot_invalid_heads: asciz "Invalid geometry heads.", 13,10 0 00002A78 656F6D657472792068 0 00002A81 656164732E0D0A00 0 00002A89 46696C65206E6F7420 .boot_file_not_found: asciz "File not found.",13,10 0 00002A92 666F756E642E0D0A00 0 00002A9B 46696C6520746F6F20 .boot_file_too_big_error: asciz "File too big.",13,10 0 00002AA4 6269672E0D0A00 0 00002AAB 46696C6520746F6F20 .boot_file_too_small_error: asciz "File too small.",13,10 0 00002AB4 736D616C6C2E0D0A00 0 00002ABD 42616420616D6F756E .boot_badclusters: asciz "Bad amount of clusters.",13,10 0 00002AC6 74206F6620636C7573 0 00002ACF 746572732E0D0A00 0 00002AD7 42616420636C757374 .boot_badchain: asciz "Bad cluster chain.",13,10 0 00002AE0 657220636861696E2E 0 00002AE9 0D0A00 0 00002AEC 4261642046696C6520 .boot_badfat: asciz "Bad File Allocation Table.",13,10 0 00002AF5 416C6C6F636174696F 0 00002AFE 6E205461626C652E0D 0 00002B07 0A00 0 00002B09 496E76616C69642066 .boot_invalid_filename: asciz "Invalid filename.",13,10 0 00002B12 696C656E616D652E0D 0 00002B1B 0A00 0 00002B1D 43616E6E6F74207365 .boot_cannot_set_both: asciz "Cannot set both " 0 00002B26 7420626F74682000 0 00002B2E 20616E642000 .boot_and: asciz " and " 0 00002B34 2E0D0A00 .boot_dot_crlf: asciz ".",13,10 0 00002B38 2120496E7465726E61 .boot_internal_error: asciz "! Internal error !",13,10 0 00002B41 6C206572726F722021 0 00002B4A 0D0A00 0 00002B4D 42504220616E64206C .boot_bpb_load_overlap: asciz "BPB and load area overlap.",13,10 0 00002B56 6F6164206172656120 0 00002B5F 6F7665726C61702E0D 0 00002B68 0A00 0 00002B6A 5365676D656E742074 .boot_segment_too_low: asciz "Segment too low.",13,10 0 00002B73 6F6F206C6F772E0D0A 0 00002B7C 00 0 00002B7D 42504220746F6F206C .boot_bpb_too_low: asciz "BPB too low.",13,10 0 00002B86 6F772E0D0A00 0 00002B8C 2120496E7465726E61 .boot_auxbuff_crossing: db "! Internal error !, " 0 00002B95 6C206572726F722021 0 00002B9E 2C20 0 00002BA0 617578627566662063 asciz "auxbuff crosses 64 KiB boundary.",13,10 0 00002BA9 726F73736573203634 0 00002BB2 204B694220626F756E 0 00002BBB 646172792E0D0A00 0 00002BC3 5245414400 .read: asciz "READ" 0 00002BC8 575249544500 .write: asciz "WRITE" 0 00002BCE 48494444454E00 .hidden: asciz "HIDDEN" 0 00002BD5 48494444454E414444 .hiddenadd: asciz "HIDDENADD" 0 00002BDE 00 0 00002BDF 44495200 .dir: asciz "DIR" 0 00002BE3 082020205B4449525D .dirinsteadsize:countedb " [DIR]" 0 00002BEC 2F00 .emptydirname: asciz "/" 0 00002BEE 424F4F5400 .boot: asciz "BOOT" 0 00002BF3 5155495400 .quit: asciz "QUIT" 0 00002BF8 50524F544F434F4C00 .protocol: asciz "PROTOCOL" 0 00002C01 5345474D454E5400 .segment: asciz "SEGMENT" 0 00002C09 454E54525900 .entry: asciz "ENTRY" 0 00002C0F 42504200 .bpb: asciz "BPB" 0 00002C13 4D494E5041524100 .minpara: asciz "MINPARA" 0 00002C1B 4D41585041524100 .maxpara: asciz "MAXPARA" 0 00002C23 434845434B4F464653 .checkoffset: asciz "CHECKOFFSET" 0 00002C2C 455400 0 00002C2F 434845434B56414C55 .checkvalue: asciz "CHECKVALUE" 0 00002C38 4500 0 00002C3A 534543544F5200 .sector: asciz "SECTOR" 0 00002C41 534543544F52414C54 .sector_alt: asciz "SECTORALT" 0 00002C4A 00 0 00002C4B 4B45524E454C2E5359 .freedos_kernel_name: asciz "KERNEL.SYS" 0 00002C54 5300 0 00002C56 49504C2E53595300 .dosc_kernel_name: asciz "IPL.SYS" 0 00002C5E 445242494F2E535953 .edrdos_kernel_name: asciz "DRBIO.SYS" 0 00002C67 00 0 00002C68 4C444F532E434F4D00 .ldos_kernel_name: asciz "LDOS.COM" 549 .msdos7_kernel_name: 0 00002C71 494F2E53595300 .msdos6_kernel_name: asciz "IO.SYS" 0 00002C78 4D53444F532E535953 .msdos6_add_name: asciz "MSDOS.SYS" 0 00002C81 00 0 00002C82 49424D42494F2E434F .ibmdos_kernel_name: asciz "IBMBIO.COM" 0 00002C8B 4D00 0 00002C8D 49424D444F532E434F .ibmdos_add_name: asciz "IBMDOS.COM" 0 00002C96 4D00 0 00002C98 4E544C445200 .ntldr_kernel_name: asciz "NTLDR" 0 00002C9E 424F4F544D475200 .bootmgr_kernel_name: asciz "BOOTMGR" 0 00002CA6 424F4F54534543542E .chain_kernel_name: asciz "BOOTSECT.DOS" 0 00002CAF 444F5300 0 00002CB3 5258444F5342494F2E .rxdos.0_kernel_name: asciz "RXDOSBIO.SYS" 0 00002CBC 53595300 0 00002CC0 525842494F2E535953 .rxdos.1_kernel_name: asciz "RXBIO.SYS" 0 00002CC9 00 559 .rxdos.0_add_name: 0 00002CCA 5258444F532E535953 .rxdos.1_add_name: asciz "RXDOS.SYS" 0 00002CD3 00 0 00002CD4 5258444F532E434F4D .rxdos.2_kernel_name: asciz "RXDOS.COM" 0 00002CDD 00 0 00002CDE 00 .addname_empty: asciz 0 00002CDF 43616E6E6F74207175 .cannotbootquit_memsizes: asciz "Cannot quit, memory size changed.",13,10 0 00002CE8 69742C206D656D6F72 0 00002CF1 792073697A65206368 0 00002CFA 616E6765642E0D0A00 564 %endif 0 00002D03 554E .uninstall: db "UN" 0 00002D05 494E5354414C4C00 .install: asciz "INSTALL" 0 00002D0D 544F47474C4500 .toggle: asciz "TOGGLE" 0 00002D14 20697320616C726561 .alreadyenabled:asciz " is already enabled.",13,10 0 00002D1D 647920656E61626C65 0 00002D26 642E0D0A00 0 00002D2B 20697320616C726561 .alreadydisabled:asciz " is already disabled.",13,10 0 00002D34 64792064697361626C 0 00002D3D 65642E0D0A00 0 00002D43 3A20547279696E6720 .tryenable: asciz ": Trying to enable.",13,10 0 00002D4C 746F20656E61626C65 0 00002D55 2E0D0A00 0 00002D59 3A20547279696E6720 .trydisable: asciz ": Trying to disable.",13,10 0 00002D62 746F2064697361626C 0 00002D6B 652E0D0A00 572 %if _LOADER 573 .move: asciz "MOVE" 574 .bottom: asciz "BOTTOM" 575 .isnow: asciz "Now i" 576 .isalready: asciz "Already i" 577 .isbottom: asciz "Is resident at bottom.",13,10 578 .istop: asciz "Is resident at top.",13,10 579 .ishidden: asciz "Is resident beyond top (hidden).",13,10 580 .move_empty: asciz "Error: Empty N extension query!",13,10 581 .move_must_be_bottom: asciz "Error: Must be at bottom to install N extension!",13,10 582 .move_rpl: asciz "Error: RPL present!",13,10 583 .move_nottop: asciz "Error: NLDR not hidden at top!",13,10 584 .move_oom: asciz "Error: Out of memory!",13,10 585 .move_ebdanottop: asciz "Error: EBDA not at top of memory!",13,10 586 .move_toolargeebda: asciz "Error: EBDA too large!",13,10 587 .unsupportedmove: asciz "Error: This movement is not supported!",13,10 588 .move_auxbuff_error: asciz "Error: Auxiliary buffer cannot be placed!",13,10 589 .move_auxup: asciz "Auxiliary buffer moved up.",13,10 590 .move_auxdown: asciz "Auxiliary buffer moved down.",13,10 591 .move_int_panic: db "Critical " 592 .move_int_error: asciz "Error: An interrupt hook cannot be unhooked!",13,10 593 .loader_bottom_not_allowed: 594 asciz "Error: Boot sector load disallowed while resident at bottom!",13,10 595 .loader_too_low_load: 596 asciz "Error: Load segment intersects loader resident at bottom!",13,10 597 .loader_error: 598 asciz "Error: Debugger load invariant broken, not supported!",13,10 599 .godebug: asciz "GODEBUG" 600 .loader_must_be_hidden: 601 asciz "Error: Go Debug command must be run from hidden.",13,10 602 .loader_extra: 603 asciz "Error: Extended lsvExtra entry not found.",13,10 604 .loader_stack: 605 asciz "Error: Load Stack Variables allocation too small!",13,10 606 .loader_loadseg_low: 607 asciz "Error: Load end segment in LSV too low.",13,10 608 .loader_sign: 609 asciz "Error: Loader support signature not found.",13,10 610 .loader_flag: 611 asciz "Error: Loader support unknown flag set.",13,10 612 align 4, db 0 613 dw 0 ; make sure this is word-aligned but not para-aligned 614 .loadsupportsignature: 615 db "LOAD","ERSU","PPOR","T00" ; signature and version 616 .loadsupportsignature.size equ $ - .loadsupportsignature 617 %endif 618 %if _AREAS_HOOK_SERVER || (_AREAS && _AREAS_HOOK_CLIENT) 619 .qqlate_areas_error: 620 asciz "Internal error in Q command uninstalling areas.",13,10 621 %endif 622 %if _AREAS && _AREAS_HOOK_CLIENT 623 .areasinstalled: asciz "Areas installed.",13,10 624 .areasalreadyinstalled: asciz "Areas already installed.",13,10 625 .areasnodebuggerfound: asciz "Areas not installed, no debugger AMIS interface found!",13,10 626 .areasnotsupported: asciz "Areas not installed, debugger AMIS interface does not support function!",13,10 627 .areasnotinstalled: db "Areas not installed, debugger returned code " 628 .areasnotinstalled.code:asciz "--h.",13,10 629 .areasalreadyuninstalled: asciz "Areas already uninstalled.",13,10 630 .areasuninstalled: db "Areas uninstalled, debugger returned code " 631 .areasuninstalled.code: asciz "--h.",13,10 632 %endif 0 00002D70 5448454E00 .then: asciz "THEN" 0 00002D75 4E4F5400 .not: asciz "NOT" 0 00002D79 52565600 .rvv: asciz "RVV" 0 00002D7D 52564D00 .rvm: asciz "RVM" 0 00002D81 52565000 .rvp: asciz "RVP" 0 00002D85 52564400 .rvd: asciz "RVD" 639 %if _MMXSUPP && _RM 640 .rm: asciz "RM" 641 %endif 642 %if _BOOTLDR 0 00002D89 4D6F64653A20426F6F .rvp_boot: ascizline "Mode: Boot loaded" 0 00002D92 74206C6F616465640D 0 00002D9B 0A00 644 %endif 645 %if _DEVICE 646 %if _ATTACH 0 00002D9D 4D6F64653A20446576 .rvp_device_attached: ascizline "Mode: Device driver attached" 0 00002DA6 696365206472697665 0 00002DAF 722061747461636865 0 00002DB8 640D0A00 648 %endif 0 00002DBC 4D6F64653A20446576 .rvp_device: ascizline "Mode: Device driver" 0 00002DC5 696365206472697665 0 00002DCE 720D0A00 650 %endif 651 %if _APPLICATION 652 %if _TSR 0 00002DD2 4D6F64653A20417070 .rvp_tsr: ascizline "Mode: Application installed as TSR" 0 00002DDB 6C69636174696F6E20 0 00002DE4 696E7374616C6C6564 0 00002DED 206173205453520D0A 0 00002DF6 00 654 %endif 0 00002DF7 4D6F64653A20417070 .rvp_application: ascizline "Mode: Application" 0 00002E00 6C69636174696F6E0D 0 00002E09 0A00 656 %endif 0 00002E0B 0D436F646520736567 .vm_codeseg: counted "Code segment=" 0 00002E14 6D656E743D 658 %if _DUALCODE 659 .vm_code2seg: counted "Code2 segment=" 660 %endif 0 00002E19 0D4461746120736567 .vm_dataseg: counted "Data segment=" 0 00002E22 6D656E743D 0 00002E27 0E456E747279207365 .vm_entryseg: counted "Entry segment=" 0 00002E30 676D656E743D 663 %if _MESSAGESEGMENT 0 00002E36 104D65737361676520 .vm_messageseg: counted "Message segment=" 0 00002E3F 7365676D656E743D 665 %endif 0 00002E47 104175786275666620 .vm_auxseg: counted "Auxbuff segment=" 0 00002E50 7365676D656E743D 667 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00002E58 10486973746F727920 .vm_hisseg: counted "History segment=" 0 00002E61 7365676D656E743D 669 %endif 670 %if _PM 671 .vm_selector: counted " selector=" 672 %endif 0 00002E69 0D436C69656E742020 .vp_pspsegment: counted "Client PSP=" 0 00002E72 205053503D 0 00002E77 0D4465627567676572 .vp_dpspsegment: counted "Debugger PSP=" 0 00002E80 205053503D 675 .vp_dparent: 0 00002E85 0820506172656E743D .vp_parent: counted " Parent=" 677 .vp_dpra: 0 00002E8E 1720506172656E7420 .vp_pra: counted " Parent Return Address=" 0 00002E97 52657475726E204164 0 00002EA0 64726573733D 679 %if _PM 680 .vp_dpspsel: 681 .vp_pspsel: counted " PSP Selector=" 682 %endif 0 00002EA6 4E6F74206C6F616465 .rvd_not_device: asciz "Not loaded in device mode.",13,10 0 00002EAF 6420696E2064657669 0 00002EB8 6365206D6F64652E0D 0 00002EC1 0A00 684 %if _DEVICE 0 00002EC3 114465766963652068 .rvd_deviceheader: counted "Device header at " 0 00002ECC 656164657220617420 0 00002ED5 212E20416D6F756E74 .rvd_size: counted ". Amount paragraphs allocated is " 0 00002EDE 207061726167726170 0 00002EE7 687320616C6C6F6361 0 00002EF0 74656420697320 687 %endif 0 00002EF7 546F6F206C6F6E6720 .n_toolongtail: asciz "Too long N command tail!",13,10 0 00002F00 4E20636F6D6D616E64 0 00002F09 207461696C210D0A00 0 00002F12 546F6F206C6F6E6720 .n_toolongname: asciz "Too long N command name!",13,10 0 00002F1B 4E20636F6D6D616E64 0 00002F24 206E616D65210D0A00 0 00002F2D 4E554D42455200 .number: asciz "NUMBER" 0 00002F34 434F554E54455200 .counter: asciz "COUNTER" 0 00002F3C 494400 .id: asciz "ID" 0 00002F3F 5748454E00 .when: asciz "WHEN" 0 00002F44 4F464653455400 .offset: asciz "OFFSET" 0 00002F4B 3F00 .questionmark: asciz "?" 0 00002F4D 4F .or: db "O" 0 00002F4E 5200 .r: asciz "R" 0 00002F50 4E4400 .nd: asciz "ND" 0 00002F53 4C5200 .lr: asciz "LR" 0 00002F56 52454D454D42455200 .remember: asciz "REMEMBER" 0 00002F5F 474F544F00 .goto: asciz "GOTO" 0 00002F64 534F4600 .sof: asciz "SOF" 0 00002F68 454F4600 .eof: asciz "EOF" 0 00002F6C 4572726F723A20474F .goto_not_file: asciz "Error: GOTO command not supported when not reading a script.",13,10 0 00002F75 544F20636F6D6D616E 0 00002F7E 64206E6F7420737570 0 00002F87 706F72746564207768 0 00002F90 656E206E6F74207265 0 00002F99 6164696E6720612073 0 00002FA2 63726970742E0D0A00 0 00002FAB 4572726F723A20474F .goto_empty: asciz "Error: GOTO needs a destination label.",13,10 0 00002FB4 544F206E6565647320 0 00002FBD 612064657374696E61 0 00002FC6 74696F6E206C616265 0 00002FCF 6C2E0D0A00 0 00002FD4 4572726F723A20474F .goto_not_found.1: asciz "Error: GOTO destination label ",'"' 0 00002FDD 544F2064657374696E 0 00002FE6 6174696F6E206C6162 0 00002FEF 656C202200 0 00002FF4 22206E6F7420666F75 .goto_not_found.2: asciz '"'," not found.",13,10 0 00002FFD 6E642E0D0A00 0 00003003 4572726F723A206175 .guard_auxbuff_error: asciz "Error: auxbuff already guarded!",13,10 0 0000300C 786275666620616C72 0 00003015 656164792067756172 0 0000301E 646564210D0A00 0 00003025 4572726F723A20436F .guard_re_error: asciz "Error: Command not supported while reading from RE buffer.",13,10 0 0000302E 6D6D616E64206E6F74 0 00003037 20737570706F727465 0 00003040 64207768696C652072 0 00003049 656164696E67206672 0 00003052 6F6D20524520627566 0 0000305B 6665722E0D0A00 0 00003062 4572726F723A20436F .guard_rc_error: asciz "Error: Command not supported while reading from RC buffer.",13,10 0 0000306B 6D6D616E64206E6F74 0 00003074 20737570706F727465 0 0000307D 64207768696C652072 0 00003086 656164696E67206672 0 0000308F 6F6D20524320627566 0 00003098 6665722E0D0A00 0 0000309F 4572726F723A20556E .unexpected_auxbuff_guard: asciz "Error: Unexpected auxbuff guard!",13,10 0 000030A8 657870656374656420 0 000030B1 617578627566662067 0 000030BA 75617264210D0A00 712 %if _SYMBOLIC 713 .unexpected_nosymbols: asciz "Error: Unexpected no symbols flag!",13,10 714 %endif 0 000030C2 4572726F723A20556E .unexpected_noneol_re: asciz "Error: Unexpected non-EOL in RE processing!",13,10 0 000030CB 657870656374656420 0 000030D4 6E6F6E2D454F4C2069 0 000030DD 6E2052452070726F63 0 000030E6 657373696E67210D0A 0 000030EF 00 0 000030F0 4572726F723A20556E .unexpected_noneol_rc: asciz "Error: Unexpected non-EOL in RC processing!",13,10 0 000030F9 657870656374656420 0 00003102 6E6F6E2D454F4C2069 0 0000310B 6E2052432070726F63 0 00003114 657373696E67210D0A 0 0000311D 00 0 0000311E 5245504C41434500 .replace: asciz "REPLACE" 0 00003126 415050454E4400 .append: asciz "APPEND" 0 0000312D 44 .dword: db "D" 0 0000312E 574F524400 .word: asciz "WORD" 0 00003133 33 .3byte: db "3" 0 00003134 4259544500 .byte: asciz "BYTE" 0 00003139 4C494E455300 .lines: asciz "LINES" 724 %if _RH 0 0000313F 524800 .rh: asciz "RH" 0 00003142 526567697374657220 .rh_enabled: asciz "Register dump history enabled.",13,10 0 0000314B 64756D702068697374 0 00003154 6F727920656E61626C 0 0000315D 65642E0D0A00 0 00003163 526567697374657220 .rh_disabled: asciz "Register dump history disabled.",13,10 0 0000316C 64756D702068697374 0 00003175 6F7279206469736162 0 0000317E 6C65642E0D0A00 0 00003185 0A2020524820737465 .rh_step.1: counted " RH step=" 0 0000318E 703D 0 00003190 0B2020646563696D61 .rh_step.2: counted " decimal: " 0 00003199 6C3A20 730 %endif 731 %if _HELP_COMPRESSED 732 .hshrink_error: asciz "Internal error: Depack failure!",13,10 733 %endif 734 %if _TEST_HELP_FILE 735 .testhelp: asciz "TESTHELP" 736 %endif 737 %if 1 || _STRNUM 0 0000319C 415300 .as: asciz "AS" 739 %endif 740 %if _DTOP || _LOADER 0 0000319F 544F5000 .top: asciz "TOP" 742 %endif 743 %if _COUNT || _RH 0 000031A3 434F554E5400 .count: asciz "COUNT" 745 %endif 746 %if _CLEAR 0 000031A9 434C45415200 .clear: asciz "CLEAR" 0 000031AF 1B631B5B324A0D0A00 .clear_sequence:asciz 27,"c",27,"[2J",13,10 749 ; Note that the first sequence will not have an effect 750 ; when writing to int 10h in non-dumb mode. Therefore, 751 ; it will advance the cursor to a nonzero column. 752 ; This is required by the dumb mode detection code. 753 %endif 754 %if _HHDIVREMAIN 755 .hh_div_remainder: 0 000031B8 0D72656D61696E6465 counted "remainder is " 0 000031C1 7220697320 757 %endif 758 %if _CONFIG 0 000031C6 3A3A434F4E4649473A .configkeyword: asciz "::CONFIG:" 0 000031CF 00 0 000031D0 3A3A53435249505453 .scriptskeyword:asciz "::SCRIPTS:" 0 000031D9 3A00 0 000031DB 3A3A454D5054593A00 .emptykeyword: asciz "::EMPTY:" 762 %endif 763 %if _EXECUTABLE 0 000031E4 3A3A45584543555441 .executablekeyword: asciz "::EXECUTABLE:" 0 000031ED 424C453A00 765 %endif 766 %if _EXTENSIONS 0 000031F2 496E7465726E616C20 .ext_error_internal: asciz "Internal error in EXT command.",13,10 0 000031FB 6572726F7220696E20 0 00003204 45585420636F6D6D61 0 0000320D 6E642E0D0A00 0 00003213 45585420636F6D6D61 .ext_error_io: asciz "EXT command got I/O error.",13,10 0 0000321C 6E6420676F7420492F 0 00003225 4F206572726F722E0D 0 0000322E 0A00 0 00003230 4E6F206F7220696E76 .ext_error_invalid: asciz "No or invalid Extension for lDebug header.",13,10 0 00003239 616C69642045787465 0 00003242 6E73696F6E20666F72 0 0000324B 206C44656275672068 0 00003254 65616465722E0D0A00 0 0000325D 4F7574206F66206D65 .ext_error_oom: asciz "Out of memory in EXT command.",13,10 0 00003266 6D6F727920696E2045 0 0000326F 585420636F6D6D616E 0 00003278 642E0D0A00 0 0000327D 45585400 .ext: asciz "EXT" 0 00003281 457874656E73696F6E .eld_load_error:db "Extension for lDebug had an error during loading. Code: " 0 0000328A 20666F72206C446562 0 00003293 75672068616420616E 0 0000329C 206572726F72206475 0 000032A5 72696E67206C6F6164 0 000032AE 696E672E20436F6465 0 000032B7 3A20 0 000032B9 2D2D2D2D2E0D0A00 .eld_error_code:asciz "----.",13,10 774 %endif 0 000032C1 47494200 .gib: asciz "GIB" 0 000032C5 4D494200 .mib: asciz "MIB" 0 000032C9 4B494200 .kib: asciz "KIB" 0 000032CD 504147455300 .pages: asciz "PAGES" 0 000032D3 504152414752415048 .paragraphs: asciz "PARAGRAPHS" 0 000032DC 5300 0 000032DE 504152415300 .paras: asciz "PARAS" 0 000032E4 51574F52445300 .qwords: asciz "QWORDS" 0 000032EB 44 .dwords: db "D" 0 000032EC 574F52445300 .words: asciz "WORDS" 0 000032F2 425954455300 .bytes: asciz "BYTES" 0 000032F8 4C454E47544800 .length: asciz "LENGTH" 0 000032FF 454E4400 .end: asciz "END" 0 00003303 52414E474500 .range: asciz "RANGE" 788 %if _VXCHG 0 00003309 4F4E00 .on: asciz "ON" 0 0000330C 4F464600 .off: asciz "OFF" 791 .vv_enable_failure: 0 00003310 556E61626C6520746F asciz "Unable to enable video swapping.",13,10 0 00003319 20656E61626C652076 0 00003322 6964656F2073776170 0 0000332B 70696E672E0D0A00 0 00003333 566964656F20737761 .vv_disabled: asciz "Video swapping is disabled, use V ON to switch it on.",13,10 0 0000333C 7070696E6720697320 0 00003345 64697361626C65642C 0 0000334E 207573652056204F4E 0 00003357 20746F207377697463 0 00003360 68206974206F6E2E0D 0 00003369 0A00 794 %endif 0 0000336B 5245564552534500 .reverse: asciz "REVERSE" 0 00003373 56414C554500 .value: asciz "VALUE" 0 00003379 494E00 .in: asciz "IN" 0 0000337C 4558495354494E4700 .existing: asciz "EXISTING" 0 00003385 46524F4D00 .from: asciz "FROM" 0 0000338A 544F00 .to: asciz "TO" 0 0000338D 455845435554494E47 .executing: asciz "EXECUTING" 0 00003396 00 0 00003397 46524F4D204C494E45 .executing_value_range: asciz "FROM LINEAR cs:cip LENGTH abo - cip" 0 000033A0 41522063733A636970 0 000033A9 204C454E4754482061 0 000033B2 626F202D2063697000 0 000033BB 4C494E45415200 .linear: asciz "LINEAR" 804 %if _IMMASM 805 .immasm_error_eip: 0 000033C2 4572726F722C206272 asciz "Error, branch targets EIP beyond 64 KiB.",13,10 0 000033CB 616E63682074617267 0 000033D4 657473204549502062 0 000033DD 65796F6E6420363420 0 000033E6 4B69422E0D0A00 807 %endif 808 %if _PM 809 .desctype: asciz "DESCTYPE" 810 %endif 0 000033ED 4E4F54 .nottaken: db "NOT" 0 000033F0 54414B454E00 .taken: asciz "TAKEN" 0 000033F6 4E .nt: db "N" 0 000033F7 5400 .t: asciz "T" 0 000033F9 4241534500 .base: asciz "BASE" 0 000033FE 47524F555000 .group: asciz "GROUP" 0 00003404 574944544800 .width: asciz "WIDTH" 818 %if _HISTORY 819 .history_internal_error: 0 0000340A 0D0A496E7465726E61 asciz 13,10,"Internal error in history handling!",13,10 0 00003413 6C206572726F722069 0 0000341C 6E20686973746F7279 0 00003425 2068616E646C696E67 0 0000342E 210D0A00 821 %endif 822 %if _INT 823 %include "dimsg.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug DI command messages 5 <1> 6 <1> Copyright (C) 2008-2023 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> 0 00003432 07204572726F7221 .di_error: counted " Error!" 0 0000343A 0768696464656E20 .di_hidden: counted "hidden " 0 00003442 0720284949535029 .di_iisp: counted " (IISP)" 0 0000344A 1320286E6F6E737461 .di_nonstd_iisp:counted " (nonstandard IISP)" 0 00003453 6E6461726420494953 0 0000345C 5029 0 0000345E 132028756E696E7374 .di_uninst_iisp:counted " (uninstalled IISP)" 0 00003467 616C6C656420494953 0 00003470 5029 21 <1> .di_freedos_reloc: 0 00003472 1220284644206B6572 counted " (FD kernel reloc)" 0 0000347B 6E656C2072656C6F63 0 00003484 29 0 00003485 0E2028666172206A6D .di_jmpfar: counted " (far jmp imm)" 0 0000348E 7020696D6D29 24 <1> .di_jmpfarindirect: 0 00003494 132028666172206A6D counted " (far jmp indirect)" 0 0000349D 7020696E6469726563 0 000034A6 7429 0 000034A8 0C2028746573742068 .di_testhook: counted " (test hook)" 0 000034B1 6F6F6B29 0 000034B5 1C2028746F6F206D61 .di_toomany: counted " (too many chained handlers)" 0 000034BE 6E7920636861696E65 0 000034C7 642068616E646C6572 0 000034D0 7329 0 000034D2 0F20656D707479204D .di_empty: counted " empty MCB name" 0 000034DB 4342206E616D65 0 000034E2 0B2073797374656D20 .di_system_mcb: counted " system MCB" 0 000034EB 4D4342 30 <1> .di_system_upper: 0 000034EE 0E2073797374656D20 counted " system in UMA" 0 000034F7 696E20554D41 0 000034FD 0E2073797374656D20 .di_system_low: counted " system in LMA" 0 00003506 696E204C4D41 0 0000350C 112068696768206D65 .di_hma: counted " high memory area" 0 00003515 6D6F72792061726561 0 0000351E 06205B6D70783A .di_multiplex.1:counted " [mpx:" 0 00003525 0768206C6973743A .di_multiplex.2:counted "h list:" 0 0000352D 02685D .di_multiplex.3:counted "h]" 37 <1> 38 <1> %if _PM 39 <1> gatewrong: equ $ 40 <1> asciz "gate not accessible",13,10 41 <1> %endif 824 %endif 0 00003530 68656164657200 .header: asciz "header" 826 .header.length: equ $ - 1 - .header 0 00003537 747261696C657200 .trailer: asciz "trailer" 828 .trailer.length:equ $ - 1 - .trailer 0 0000353F 415400 .at: asciz "AT" 0 00003542 5748494C4500 .while: asciz "WHILE" 0 00003548 53494C454E5400 .silent: asciz "SILENT" 0 0000354F 534C45455000 .sleep: asciz "SLEEP" 0 00003555 5345434F4E445300 .seconds: asciz "SECONDS" 0 0000355D 5449434B5300 .ticks: asciz "TICKS" 0 00003563 52452070726F636573 .re_limit_reached: asciz "RE processing reached RELIMIT, aborting.",13,10 0 0000356C 73696E672072656163 0 00003575 6865642052454C494D 0 0000357E 49542C2061626F7274 0 00003587 696E672E0D0A00 0 0000358E 52432070726F636573 .rc_limit_reached: asciz "RC processing reached RCLIMIT, aborting.",13,10 0 00003597 73696E672072656163 0 000035A0 6865642052434C494D 0 000035A9 49542C2061626F7274 0 000035B2 696E672E0D0A00 0 000035B9 2120496E7465726E61 .silent_error: asciz "! Internal error during silent buffer handling !",13,10 0 000035C2 6C206572726F722064 0 000035CB 7572696E672073696C 0 000035D4 656E74206275666665 0 000035DD 722068616E646C696E 0 000035E6 6720210D0A00 0 000035EC 5768696C6520636F6E .while_not_true:asciz "While condition not true, returning.",13,10 0 000035F5 646974696F6E206E6F 0 000035FE 7420747275652C2072 0 00003607 657475726E696E672E 0 00003610 0D0A00 0 00003613 5768696C6520636F6E .while_terminated_before: asciz "While condition ",'"' 0 0000361C 646974696F6E202200 0 00003625 22206E6F206C6F6E67 .while_terminated_after: asciz '"'," no longer true.",13,10 0 0000362E 657220747275652E0D 0 00003637 0A00 0 00003639 4E6F2073657269616C .no_progress: asciz "No serial comm progress after 5 seconds, giving up. (Keyboard enabled.)",13,10 0 00003642 20636F6D6D2070726F 0 0000364B 677265737320616674 0 00003654 65722035207365636F 0 0000365D 6E64732C2067697669 0 00003666 6E672075702E20284B 0 0000366F 6579626F6172642065 0 00003678 6E61626C65642E290D 0 00003681 0A00 0 00003683 0D0A6C446562756720 .serial_request_keep: asciz 13,10,_PROGNAME," connected to serial port. Enter KEEP to confirm.",13,10 0 0000368C 636F6E6E6563746564 0 00003695 20746F207365726961 0 0000369E 6C20706F72742E2045 0 000036A7 6E746572204B454550 0 000036B0 20746F20636F6E6669 0 000036B9 726D2E0D0A00 0 000036BF 4E6F204B454550206B .serial_no_keep_timer: asciz "No KEEP keyword confirmation after timeout, giving up. (Keyboard enabled.)",13,10 0 000036C8 6579776F726420636F 0 000036D1 6E6669726D6174696F 0 000036DA 6E2061667465722074 0 000036E3 696D656F75742C2067 0 000036EC 6976696E672075702E 0 000036F5 20284B6579626F6172 0 000036FE 6420656E61626C6564 0 00003707 2E290D0A00 0 0000370C 4E6F204B454550206B .serial_no_keep_enter: asciz "No KEEP keyword confirmation, enabling keyboard.",13,10 0 00003715 6579776F726420636F 0 0000371E 6E6669726D6174696F 0 00003727 6E2C20656E61626C69 0 00003730 6E67206B6579626F61 0 00003739 72642E0D0A00 845 %if _VXCHG 0 0000373F 4E4F .nokeep: db "NO" 847 %endif 0 00003741 4B45455000 .keep: asciz "KEEP" 0 00003746 4572726F723A20556E .cannot_hook_2D.invalid: asciz "Error: Unable to hook interrupt 2Dh due to invalid handler.",13,10 0 0000374F 61626C6520746F2068 0 00003758 6F6F6B20696E746572 0 00003761 727570742032446820 0 0000376A 64756520746F20696E 0 00003773 76616C69642068616E 0 0000377C 646C65722E0D0A00 0 00003784 4572726F723A20556E .cannot_hook_2D.nofree: asciz "Error: Unable to hook interrupt 2Dh, no free multiplex number.",13,10 0 0000378D 61626C6520746F2068 0 00003796 6F6F6B20696E746572 0 0000379F 72757074203244682C 0 000037A8 206E6F206672656520 0 000037B1 6D756C7469706C6578 0 000037BA 206E756D6265722E0D 0 000037C3 0A00 0 000037C5 5761726E696E673A20 .serial_cannot_unhook: db "Warning: " 0 000037CE 556E61626C6520746F .serial_cannot_unhook.nowarn: db "Unable to unhook interrupt " 0 000037D7 20756E686F6F6B2069 0 000037E0 6E7465727275707420 0 000037E9 2D2D682E0D0A00 .serial_cannot_unhook.int: asciz "--h.",13,10 0 000037F0 4572726F723A20556E .serial_cannot_hook: db "Error: Unable to hook interrupt " 0 000037F9 61626C6520746F2068 0 00003802 6F6F6B20696E746572 0 0000380B 7275707420 0 00003810 2D2D68206265636175 .serial_cannot_hook.new_int: db "--h because interrupt " 0 00003819 736520696E74657272 0 00003822 75707420 0 00003826 2D2D68207374696C6C .serial_cannot_hook.old_int: asciz "--h still hooked.",13,10 0 0000382F 20686F6F6B65642E0D 0 00003838 0A00 0 0000383A 537563636565646564 .serial_late_unhook: db "Succeeded in unhooking interrupt " 0 00003843 20696E20756E686F6F 0 0000384C 6B696E6720696E7465 0 00003855 727275707420 0 0000385B 2D2D682E0D0A00 .serial_late_unhook.int: asciz "--h.",13,10 0 00003862 496E7465726E616C20 .line_out_overflow: asciz "Internal error, line_out buffer overflowed!",13,10 0 0000386B 6572726F722C206C69 0 00003874 6E655F6F7574206275 0 0000387D 66666572206F766572 0 00003886 666C6F776564210D0A 0 0000388F 00 860 %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 0 00003890 041B5B376D .highlight: counted 27,"[7m" 862 %if _GETLINEHIGHLIGHT || _DHIGHLIGHT 0 00003895 00 db 0 864 %endif 0 00003896 031B5B6D .unhighlight: counted 27,"[m" 866 %if _GETLINEHIGHLIGHT || _DHIGHLIGHT 0 0000389A 00 db 0 868 %endif 869 %endif 0 0000389B 206B4D475400 .prefixes: asciz " kMGT" 0 000038A1 50726F63657373206C .ll_unterm: ascizline "Process loading aborted: Attached process didn't terminate!" 0 000038AA 6F6164696E67206162 0 000038B3 6F727465643A204174 0 000038BC 746163686564207072 0 000038C5 6F6365737320646964 0 000038CE 6E2774207465726D69 0 000038D7 6E617465210D0A00 0 000038DF 43616E6E6F74207175 .qq_unterm: ascizline "Cannot quit, attached process didn't terminate!" 0 000038E8 69742C206174746163 0 000038F1 6865642070726F6365 0 000038FA 7373206469646E2774 0 00003903 207465726D696E6174 0 0000390C 65210D0A00 873 %if _PM 874 .qq_still_pm: ascizline "Cannot quit, still in PM after attached process terminated!" 875 %endif 0 00003911 417474616368656420 .qq_a_unterminated: ascizline "Attached process didn't terminate." 0 0000391A 70726F636573732064 0 00003923 69646E277420746572 0 0000392C 6D696E6174652E0D0A 0 00003935 00 0 00003936 417474616368656420 .qq_a_terminated: ascizline "Attached process did terminate." 0 0000393F 70726F636573732064 0 00003948 6964207465726D696E 0 00003951 6174652E0D0A00 0 00003958 43616E6E6F74206372 .ensure_no_memory: ascizline "Cannot create empty attached process, out of memory!" 0 00003961 6561746520656D7074 0 0000396A 792061747461636865 0 00003973 642070726F63657373 0 0000397C 2C206F7574206F6620 0 00003985 6D656D6F7279210D0A 0 0000398E 00 879 %if _DEVICE 880 .qq_device_none_selected: 0 0000398F 43616E6E6F74207175 ascizline "Cannot quit normally when loaded as device driver! Try QC or QD command." 0 00003998 6974206E6F726D616C 0 000039A1 6C79207768656E206C 0 000039AA 6F6164656420617320 0 000039B3 646576696365206472 0 000039BC 697665722120547279 0 000039C5 205143206F72205144 0 000039CE 20636F6D6D616E642E 0 000039D7 0D0A00 882 .qq_device_no_d: 0 000039DA 43616E6E6F74207175 ascizline "Cannot quit to device driver initialisation, state modified!" 0 000039E3 697420746F20646576 0 000039EC 696365206472697665 0 000039F5 7220696E697469616C 0 000039FE 69736174696F6E2C20 0 00003A07 7374617465206D6F64 0 00003A10 6966696564210D0A00 884 .qq_device_no_c: 0 00003A19 43616E6E6F74207175 ascizline "Cannot quit from device driver container, not found!" 0 00003A22 69742066726F6D2064 0 00003A2B 657669636520647269 0 00003A34 76657220636F6E7461 0 00003A3D 696E65722C206E6F74 0 00003A46 20666F756E64210D0A 0 00003A4F 00 886 %if _PM 887 .qq_device_pm: ascizline "Cannot quit device driver in PM!" 888 %endif 889 align 2, db 0 0 00003A50 4E554C20 .NULblank: fill 8, 32, db "NUL" 891 %endif 0 00003A58 4330 .c0: db "C0" 0 00003A5A 0D .cr: db 13 894 0 00003A5B 41424F525400 .abort: asciz "ABORT" 896 %if _EXTENSIONS || _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00003A61 45584953545300 .exists: asciz "EXISTS" 0 00003A68 5900 .y: asciz "Y" 0 00003A6A 20636F6D6D616E6420 .yy_requires_filename: asciz " command requires a filename.",13,10 0 00003A73 726571756972657320 0 00003A7C 612066696C656E616D 0 00003A85 652E0D0A00 0 00003A8A 20636F6D6D616E6420 .yy_filename_empty: asciz " command filename is empty.",13,10 0 00003A93 66696C656E616D6520 0 00003A9C 697320656D7074792E 0 00003AA5 0D0A00 0 00003AA8 20636F6D6D616E6420 .yy_too_many_handles: asciz " command has too many open files.",13,10 0 00003AB1 68617320746F6F206D 0 00003ABA 616E79206F70656E20 0 00003AC3 66696C65732E0D0A00 0 00003ACC 20636F6D6D616E6420 .yy_error_file_open: asciz " command failed to open file.",13,10 0 00003AD5 6661696C656420746F 0 00003ADE 206F70656E2066696C 0 00003AE7 652E0D0A00 0 00003AEC 20636F6D6D616E6420 .yy_no_file: asciz " command limited to label only valid in script file.",13,10 0 00003AF5 6C696D697465642074 0 00003AFE 6F206C6162656C206F 0 00003B07 6E6C792076616C6964 0 00003B10 20696E207363726970 0 00003B19 742066696C652E0D0A 0 00003B22 00 904 %endif 905 %if _INPUT_FILE_HANDLES || _EXTENSIONS 0 00003B23 20636F6D6D616E6420 .yy_no_dos: asciz " command requires DOS to be available.",13,10 0 00003B2C 726571756972657320 0 00003B35 444F5320746F206265 0 00003B3E 20617661696C61626C 0 00003B47 652E0D0A00 907 .yy_filename_missing_unquote: 0 00003B4C 20636F6D6D616E6420 asciz " command filename missing ending quote.",13,10 0 00003B55 66696C656E616D6520 0 00003B5E 6D697373696E672065 0 00003B67 6E64696E672071756F 0 00003B70 74652E0D0A00 909 %endif 910 %if _INPUT_FILE_BOOT || _EXTENSIONS 0 00003B76 20636F6D6D616E6420 .yy_too_large: asciz " command file too large.",13,10 0 00003B7F 66696C6520746F6F20 0 00003B88 6C617267652E0D0A00 0 00003B91 20636F6D6D616E6420 .yy_empty: asciz " command file empty.",13,10 0 00003B9A 66696C6520656D7074 0 00003BA3 792E0D0A00 913 %endif 914 915 %if _SYMBOLIC 916 .zz_switch_s_received: asciz "Allocating symbol table buffer of " 917 .zz_switch_s_received_xms: 918 asciz "Allocating XMS symbol table buffer (including transfer buffer) of " 919 .zz_switch_s_freeing: asciz "Freeing symbol table buffer.",13,10 920 .zz_switch_s_indos: db "Can't change symbol table buffer allocation" 921 asciz " while in DOS!",13,10 922 %if _BOOTLDR 923 .zz_switch_s_internal_error: 924 asciz "Internal error in Z /S switch handling!",13,10 925 .zz_switch_s_boot_memsize_differ: 926 asciz "Cannot change symbol table buffer allocation, memory size changed!",13,10 927 .zz_switch_s_boot_transfer_too_low: 928 asciz "Cannot enlarge symbol table buffer that much, transfer buffer too low!",13,10 929 .zz_switch_s_boot_loaded_kernel: 930 asciz "Cannot change symbol table buffer allocation, kernel has been loaded!",13,10 931 .zz_switch_s_boot_rpl: 932 asciz "Cannot change symbol table buffer allocation, RPL has been loaded!",13,10 933 %endif 934 .zz_s_cannot_alloc_transfer: asciz "Cannot allocate transfer buffer!",13,10 935 .zz_s_cannot_alloc_target: asciz "Cannot allocate target buffer!",13,10 936 .zz_too_full: asciz "Symbol tables are too full for this reallocation.",13,10 937 .zz_xms_not_freed_1: asciz "Unable to free symbol table XMS handle = " 938 .zz_xms_not_freed_2: asciz "h.",13,10 939 .invaliddata: asciz "Invalid symbol table data!",13,10 940 %if _SECOND_SLICE && (_XMS_SYMBOL_TABLE || _BUFFER_86MM_SLICE) 941 .error_second_slice: asciz "Invalid symbol table access slice usage!",13,10 942 %endif 943 .main_too_full: asciz "Symbol main array is too full!",13,10 944 .main_too_full_crit1: asciz "Symbol main array is too full! Critical error. (Earlier check succeeded.)",13,10 945 .hash_too_full_crit1: asciz "Symbol hash array is too full! Critical error. (Earlier check succeeded.)",13,10 946 .hash_too_full_crit2: asciz "Symbol hash array is too full! Critical error. (Main has space.)",13,10 947 .str_too_full: asciz "Symbol string heap is too full!",13,10 948 .str_too_long: asciz "Symbol string is too long!",13,10 949 .liststore.main.end.first: asciz 13,10,"Main total:",9 950 .liststore.main.free.first: asciz "Main free:",9 951 .liststore.main.used.first: asciz "Main used:",9 952 .liststore.hash.end.first: asciz 13,10,"Hash total:",9 953 .liststore.hash.free.first: asciz "Hash free:",9 954 .liststore.hash.used.first: asciz "Hash used:",9 955 .liststore.str.end.first: asciz 13,10,"String total:",9 956 .liststore.str.free.first: asciz "String free:",9 957 .liststore.str.used.first: asciz "String used:",9 958 .liststore.second: asciz " in " 959 .liststore.third.singular: asciz " unit",13,10 960 .liststore.third.plural: asciz " units",13,10 961 .liststore.str.first: asciz "Strings size is " 962 .liststore.str.unref.first: asciz "Unreferenced strings size is " 963 .liststore.str.unref.second: 964 .liststore.str.second: asciz " in " 965 .liststore.str.unref.third.singular: 966 .liststore.str.third.singular: asciz " string.",13,10 967 .liststore.str.unref.third.plural: 968 .liststore.str.third.plural: asciz " strings.",13,10 969 .liststore.str.fourth: asciz "Average string structure length is <= " 970 .liststore.str.invalid: asciz "Error: Average string structure length too large" 971 .liststore.str.nofourth:asciz "Cannot calculate average string structure length, number of strings is zero" 972 .liststore.str.last: asciz ".",13,10 973 .symhint: 974 .symhint_store_string: db "..@symhint_" 975 .symhint_size: equ $ - .symhint 976 db "store_string_" 977 .symhint_store_string_size equ $ - .symhint_store_string 978 .trace_caller: db "trace_caller" 979 .trace_caller_size: equ $ - .trace_caller 980 .trace_here: db "trace_here" 981 .trace_here_size: equ $ - .trace_here 982 .skip_caller: db "skip_caller_" 983 .skip_caller_size: equ $ - .skip_caller 984 .skip_here: db "skip_here_" 985 .skip_here_size: equ $ - .skip_here 986 .asciz: asciz "ASCIZ" 987 .zz_list_range_first: asciz "Range: " 988 .zz_list_range_second: asciz "h--" 989 .zz_list_range_third: asciz "h" 990 .zz_list_add_none: db "" 991 .zz_list_none: asciz " No symbols found",13,10 992 .zz_list_start: asciz 13,10 993 .zz_list_between: asciz 994 .zz_list_first: asciz " Linear=" 995 .zz_list_second: asciz " Offset=" 996 .zz_list_middle: asciz "h = ",'"' 997 .zz_list_last: asciz '"',13,10 998 .zz_list_end: asciz 999 .zz_list_add_range: asciz "; " 1000 .zz_list_add_first: asciz "z add linear=(" 1001 .zz_list_base: asciz " + v1" 1002 .zz_list_base_symbol: asciz " + sl." 1003 .zz_list_add_second: asciz ") offset=" 1004 .zz_list_add_middle: asciz " symbol='" 1005 .zz_list_add_last: asciz "'",13,10 1006 .zz_match_add_none: db ";" 1007 .zz_match_none: asciz " No symbols found",13,10 1008 .existing_block: asciz "Symbol already exists and is being blocked.",13,10 1009 .poison_block: asciz "Symbol definition is poisoned and is being blocked.",13,10 1010 .stat: asciz "STAT" 1011 .match: asciz "MATCH" 1012 .add: asciz "ADD" 1013 .commit: asciz "COMMIT" 1014 .del: asciz "DEL" 1015 .delete: asciz "DELETE" 1016 .unrefstring: asciz "UNREFSTRING" 1017 .reloc: asciz "RELOC" 1018 .relocate: asciz "RELOCATE" 1019 .symbol: asciz "SYMBOL" 1020 .flags: asciz "FLAGS" 1021 .sl: asciz "SL" 1022 .max: asciz "MAX" 1023 %if _XMS_SYMBOL_TABLE 1024 .zz_no_xms: asciz "No XMS driver detected!",13,10 1025 .zz_fail_xms_alloc: asciz "Failed to allocate XMS block!",13,10 1026 .zz_fail_xms_access: asciz "Failed to access XMS block!",13,10 1027 %endif 1028 .zz_main_hash_mismatch: asciz "Compaction/expansion failed, differing amounts of hash and main entries.",13,10 1029 .zz_main_not_first: asciz "Compaction/expansion failed, main array is not first.",13,10 1030 .zz_hash_not_second: asciz "Compaction/expansion failed, hash array is not second.",13,10 1031 .zz_str_not_third: asciz "Compaction/expansion failed, string heap is not third.",13,10 1032 .zz_table_not_full: asciz "Compaction/expansion failed, table is not full.",13,10 1033 .zz_too_much: asciz "Symbol table size is too large. Internal error!",13,10 1034 .zz_too_short: asciz "Symbol table size is too short. Internal error!",13,10 1035 .zz_str_overflow: asciz "String symbol table got too large. Internal error!",13,10 1036 .zz_length_mismatch: asciz "Symbol table table size mismatch. Internal error!",13,10 1037 .zz_too_small_str: asciz "String symbol table target is too small.",13,10 1038 .zz_too_small_hash: 1039 .zz_too_small_mainhash: asciz "Main/hash symbol table target is too small.",13,10 1040 .zz_internal_error_expand: 1041 asciz "Internal error during symbol table expansion!",13,10 1042 .zz_reloc_amount_none: asciz "No symbols found in given source range.",13,10 1043 .zz_del_amount_none: asciz "Symbol not found!",13,10 1044 .zz_reloc_amount_1: asciz "Relocated " 1045 .zz_del_amount_1: asciz "Deleted " 1046 .zz_reloc_amount_2.plural: 1047 .zz_del_amount_2.plural: asciz " symbols.",13,10 1048 .zz_reloc_amount_2.singular: 1049 .zz_del_amount_2.singular: asciz " symbol.",13,10 1050 .zz_reloc_overflow: asciz "Cannot relocate, length of source range overflows!",13,10 1051 .bb_sym_too_many: asciz "Too many symbol breakpoints!",13,10 1052 .bb_sym_beyond_linear: asciz "Symbol breakpoint linear is beyond reach!",13,10 1053 .bb_sym_beyond_offset: asciz "Symbol breakpoint offset is beyond reach!",13,10 1054 %endif 1055 1056 %if _BREAKPOINTS 0 00003BA8 414C4C00 .all: asciz "ALL" 0 00003BAC 4E455700 .new: asciz "NEW" 0 00003BB0 4E6F20756E75736564 .bb_no_new: asciz "No unused breakpoint left!",13,10 0 00003BB9 20627265616B706F69 0 00003BC2 6E74206C656674210D 0 00003BCB 0A00 0 00003BCD 19486974207065726D .bb_hit.1: counted "Hit permanent breakpoint " 0 00003BD6 616E656E7420627265 0 00003BDF 616B706F696E7420 1061 .bb_hit.2.nocounter: 0 00003BE7 020D0A counted 13,10 1063 %if _SYMBOLIC 1064 .bb_sym_hit.1: counted "Hit symbol breakpoint " 1065 .bb_sym_hit.2.nocounter: 1066 counted 13,10 1067 %endif 0 00003BEA 1C5061737365642070 .bb_pass.1: counted "Passed permanent breakpoint " 0 00003BF3 65726D616E656E7420 0 00003BFC 627265616B706F696E 0 00003C05 7420 1069 .bb_hit.2.counter: 0 00003C07 0A2C20636F756E7465 .bb_pass.2: counted ", counter=" 0 00003C10 723D 1071 .bb_hit.3.counter.no_id: 1072 .bb_pass.3.no_id: 1073 .bb_hitpass_id.after: 0 00003C12 020D0A counted 13,10 1075 .bb_hitpass_id.long: 0 00003C15 070D0A2049443A20 counted 13,10," ID: " 1077 .bb_hitpass_id.short: 0 00003C1D 062C2049443A20 counted ", ID: " 0 00003C24 205748454E2000 .bb_when: asciz " WHEN " 1080 0 00003C2B 42502000 .bp: asciz "BP " 0 00003C2F 202B00 .bpenabled: asciz " +" 0 00003C32 202D00 .bpdisabled: asciz " -" 0 00003C35 20556E7573656400 .bpunused: asciz " Unused" 0 00003C3D 204C696E3D00 .bpaddress: asciz " Lin=" 0 00003C43 202800 .bpcontent: asciz " (" 0 00003C46 2920436F756E746572 .bpcounter: asciz ") Counter=" 0 00003C4F 3D00 1088 %if 0 1089 BP 00 Unused 1090 BP 00 + Lin=12345678 (CC) Counter=8000 1091 1234567890123456789012345678901234567890 1092 %endif 0 00003C51 4E6F20627265616B70 .bpnone: asciz "No breakpoints set currently.",13,10 0 00003C5A 6F696E747320736574 0 00003C63 2063757272656E746C 0 00003C6C 792E0D0A00 0 00003C71 4E6F20627265616B70 .bpnone_at: asciz "No breakpoint set at given address currently.",13,10 0 00003C7A 6F696E742073657420 0 00003C83 617420676976656E20 0 00003C8C 616464726573732063 0 00003C95 757272656E746C792E 0 00003C9E 0D0A00 1095 %endif 0 00003CA1 5468652000 .cant_bp_the: asciz "The " 0 00003CA6 70726F636565642062 .cant_bp_type_proceed: asciz "proceed breakpoint" 0 00003CAF 7265616B706F696E74 0 00003CB8 00 0 00003CB9 7065726D616E656E74 .cant_bp_type_permanent: db "permanent breakpoint " 0 00003CC2 20627265616B706F69 0 00003CCB 6E7420 0 00003CCE 5F5F00 .cant_bp_type_permanent.index: asciz "__" 1100 %if _SYMBOLIC 1101 .cant_bp_type_symbol: db "symbol breakpoint " 1102 .cant_bp_type_symbol.index: asciz "__" 1103 %endif 0 00003CD1 204720627265616B70 .cant_bp_type_gg: asciz " G breakpoint" 0 00003CDA 6F696E7400 0 00003CDF 20286C696E65617220 .cant_bp_linear: db " (linear " 0 00003CE8 2D2D2D2D5F .cant_bp_linear.address1: db "----_" 0 00003CED 2D2D2D2D292000 .cant_bp_linear.address2: asciz "----) " 0 00003CF4 63616E6E6F74206265 .cant_bp_write: asciz "cannot be written." 0 00003CFD 207772697474656E2E 0 00003D06 00 0 00003D07 63616E6E6F74206265 .cant_bp_restore: db "cannot be restored to " 0 00003D10 20726573746F726564 0 00003D19 20746F20 0 00003D1D 5F5F2E00 .cant_bp_restore.value: asciz "__." 1111 %if 0 1112 The 15th G breakpoint (linear 0010_FFFF) cannot be written. 1113 The proceed breakpoint (linear 0010_FFFF) cannot be written. 1114 The permanent breakpoint 0F (linear 0010_FFFF) cannot be written. 1115 The permanent breakpoint 0F (linear 0010_FFFF) cannot be restored to __. 1116 12345678901234567890123456789012345678901234567890123456789012345678901234567890 1117 %endif 0 00003D21 0D0A20526561736F6E .cant_bp_reason: asciz 13,10," Reason: " 0 00003D2A 3A2000 0 00003D2D 4E6F206572726F722E .cant_bp_reason0: asciz "No error. (Internal error, report!)",13,10 0 00003D36 2028496E7465726E61 0 00003D3F 6C206572726F722C20 0 00003D48 7265706F727421290D 0 00003D51 0A00 0 00003D53 497420697320726561 .cant_bp_reason1: asciz "It is read-only.",13,10 0 00003D5C 642D6F6E6C792E0D0A 0 00003D65 00 0 00003D66 497420697320756E72 .cant_bp_reason2: asciz "It is unreachable.",13,10 0 00003D6F 6561636861626C652E 0 00003D78 0D0A00 0 00003D7B 497420686173206265 .cant_bp_reason3: db "It has been overwritten with " 0 00003D84 656E206F7665727772 0 00003D8D 697474656E20776974 0 00003D96 6820 0 00003D98 5F5F2E0D0A00 .cant_bp_reason3.value: asciz "__.",13,10 0 00003D9E 556E6B6E6F776E2065 .cant_bp_reasonu: asciz "Unknown error. (Internal error, report!)",13,10 0 00003DA7 72726F722E2028496E 0 00003DB0 7465726E616C206572 0 00003DB9 726F722C207265706F 0 00003DC2 727421290D0A00 1125 0 00003DC9 20202000 .list_bp.first: asciz " " 0 00003DCD 204720627265616B70 .list_bp.second:db " G breakpoint, linear " 0 00003DD6 6F696E742C206C696E 0 00003DDF 65617220 1128 .list_bp.address1: 0 00003DE3 2D2D2D2D5F db "----_" 1130 .list_bp.address2: 0 00003DE8 2D2D2D2D00 asciz "----" 0 00003DED 2C20636F6E74656E74 .list_bp.third: db ", content " 0 00003DF6 20 1133 .list_bp.value: 0 00003DF7 5F5F00 asciz "__" 1135 .list_bp_not_cseip: equ crlf 1136 %if _PM 1137 .list_bp_cseip_32: 1138 asciz " (is at CS:EIP)",13,10 1139 %endif 1140 .list_bp_csip_16: 0 00003DFA 202869732061742043 asciz " (is at CS:IP)",13,10 0 00003E03 533A4950290D0A00 1142 .list_bp_none: 0 00003E0B 546865204720627265 asciz "The G breakpoint list is empty.",13,10 0 00003E14 616B706F696E74206C 0 00003E1D 69737420697320656D 0 00003E26 7074792E0D0A00 1144 %if 0 1145 2nd G breakpoint, linear 0003_28D3 $3600:12345678, content CC (is at CS:EIP) 1146 12345678901234567890123456789012345678901234567890123456789012345678901234567890 1147 %endif 0 00003E2D 00 .empty_message: asciz 0 00003E2E 4C49535400 .list: asciz "LIST" 0 00003E33 414741494E00 .again: asciz "AGAIN" 1151 %if _SYMBOLIC 1152 .wrt: asciz "WRT" 1153 %endif 0 00003E39 52656163686564206C .uu_too_many_repeat: asciz "Reached limit of repeating disassembly.",13,10 0 00003E42 696D6974206F662072 0 00003E4B 6570656174696E6720 0 00003E54 646973617373656D62 0 00003E5D 6C792E0D0A00 0 00003E63 496E7465726E616C20 .uu_internal_error: asciz "Internal error in disassembler!",13,10 0 00003E6C 6572726F7220696E20 0 00003E75 646973617373656D62 0 00003E7E 6C6572210D0A00 0 00003E85 496E7465726E616C20 .aa_internal_error: asciz "Internal error in assembler!",13,10 0 00003E8E 6572726F7220696E20 0 00003E97 617373656D626C6572 0 00003EA0 210D0A00 0 00003EA4 537461636B206F7665 .stack_overflow: db "Stack overflow occurred, IP=" 0 00003EAD 72666C6F77206F6363 0 00003EB6 75727265642C204950 0 00003EBF 3D 0 00003EC0 5F5F5F5F682C206475 .stack_overflow.caller: asciz "____h, due to " 0 00003EC9 6520746F2000 0 00003ECF 65787072657373696F .stack_overflow.indirection: asciz "expression indirection.",13,10 0 00003ED8 6E20696E6469726563 0 00003EE1 74696F6E2E0D0A00 0 00003EE9 65787072657373696F .stack_overflow.parens: asciz "expression parentheses.",13,10 0 00003EF2 6E20706172656E7468 0 00003EFB 657365732E0D0A00 0 00003F03 65787072657373696F .stack_overflow.precedence: asciz "expression precedence.",13,10 0 00003F0C 6E2070726563656465 0 00003F15 6E63652E0D0A00 0 00003F1C 65787072657373696F .stack_overflow.value_in: asciz "expression VALUE x IN y.",13,10 0 00003F25 6E2056414C55452078 0 00003F2E 20494E20792E0D0A00 0 00003F37 65787072657373696F .stack_overflow.linear: asciz "expression LINEAR.",13,10 0 00003F40 6E204C494E4541522E 0 00003F49 0D0A00 1164 %if _PM 1165 .stack_overflow.desctype: asciz "expression DESCTYPE.",13,10 1166 %endif 0 00003F4C 65787072657373696F .stack_overflow.cond: asciz "expression conditional ?? x :: y.",13,10 0 00003F55 6E20636F6E64697469 0 00003F5E 6F6E616C203F3F2078 0 00003F67 203A3A20792E0D0A00 1168 %if _SYMBOLIC 1169 .dd_after_symbol.non_wrt: 1170 .uu_after_symbol.non_wrt: db ":" 1171 .dd_after_symbol.2_wrt: 1172 .memref_after_symbol.non_wrt: 1173 .uu_after_symbol.wrt: 1174 .memref_after_symbol.wrt: asciz 13,10 1175 .dd_after_symbol.1_wrt: 1176 .uu_after_symbol_between_1.wrt: 1177 .uu_between_symbol.wrt: db ":" 1178 .memref_between_symbol.wrt: asciz " wrt " 1179 .uu_after_symbol_between_1.non_wrt: db ":" 1180 .uu_after_symbol_between_2.wrt: asciz " + " 1181 .uu_after_symbol_between_3: asciz 13,10 1182 %endif 1183 %if _MEMREF_AMOUNT 1184 %if _DEBUG2 || _SYMBOLIC 1185 .memrefs_branchdirect: asciz 9, "direct branch target = " 1186 .memrefs_stringsource: asciz 9, "string source = " 1187 .memrefs_stringdest: asciz 9, "string destination = " 1188 .memrefs_memsource: asciz 9, "memory source = " 1189 .memrefs_memdest: asciz 9, "memory destination = " 1190 .memrefs_memsourcedest: asciz 9, "memory source/dest = " 1191 .memrefs_mem_unknown: asciz 9, "memory (unknown) = " 1192 .memrefs_unknown: asciz 9, "unknown mem ref type = " 1193 .memrefs_length: counted " length=" 1194 %endif 1195 .memrefs_invalid_internal: 0 00003F70 496E7465726E616C20 asciz "Internal error, invalid use of too many memrefs!",13,10 0 00003F79 6572726F722C20696E 0 00003F82 76616C696420757365 0 00003F8B 206F6620746F6F206D 0 00003F94 616E79206D656D7265 0 00003F9D 6673210D0A00 1197 %endif 1198 1199 %if 0 1200 align 2, db 0 1201 .optiontable: dw dispregs32, .r32off, .r32on 1202 dw traceints, .traceoff, .traceon 1203 dw cpdepchars, .cpoff, .cpon 1204 dw fakeindos, .dosoff, .doson 1205 dw nonpagingdevice, .nonpageoff, .nonpageon 1206 dw pagingdevice, .pageoff, .pageon 1207 dw hexrn, .readrnoff, .readrnon 1208 dw 0 1209 1210 .r32off: asciz "Dump 16-bit register set" 1211 .r32on: asciz "Dump 32-bit register set" 1212 .traceoff: asciz "Interrupts are traced" 1213 .traceon: asciz "Interrupts are processed" 1214 .cpoff: asciz "Extended ASCII characters replaced" 1215 .cpon: asciz "Extended ASCII characters displayed" 1216 .dosoff: asciz "InDOS is checked" 1217 .doson: asciz "InDOS assumed on" 1218 ;asciz "InDOS assumed off" 1219 .nonpageoff: asciz 1220 .nonpageon: asciz "Paging disabled" 1221 .pageoff: asciz 1222 .pageon: asciz "Paging enabled" 1223 .readrnoff: asciz "Readable RN enabled" 1224 .readrnon: asciz "Readable RN disabled" 1225 %endif 1226 0 00003FA3 5761726E696E673A20 .warnprefix: asciz "Warning: Prefixes in excess of 14, using trace flag.",13,10 0 00003FAC 507265666978657320 0 00003FB5 696E20657863657373 0 00003FBE 206F662031342C2075 0 00003FC7 73696E672074726163 0 00003FD0 6520666C61672E0D0A 0 00003FD9 00 1228 1229 %if _DEBUG || _LOADER 1230 .bu: asciz "Breaking to next instance.",13,10 1231 %if _DEBUG_COND 1232 .bu_disabled: db "Debuggable mode is disabled.",13,10 1233 asciz "Enable with this command: r DCO6 or= ",_4digitshex(opt6_debug_mode),13,10 1234 %endif 1235 %else 0 00003FDA 416C72656164792069 .notbu: asciz "Already in topmost instance. (This is no debugging build of lDebug.)",13,10 0 00003FE3 6E20746F706D6F7374 0 00003FEC 20696E7374616E6365 0 00003FF5 2E2028546869732069 0 00003FFE 73206E6F2064656275 0 00004007 6767696E6720627569 0 00004010 6C64206F66206C4465 0 00004019 6275672E290D0A00 1237 %endif 1238 %if _DUALCODE 1239 .bu_relocated: db "Inter-segment calls work. Sign=" 1240 .bu_relocated.sign: 1241 asciz "----h.",13,10 1242 %endif 1243 %if _DT 0 00004021 4E .tableheader: db .tableheader.end - .tableheader.start 1245 .tableheader.start: 1246 %assign ITERATION 0 1247 %rep 8 1248 %if ITERATION == 0 1249 %elif ITERATION == 1 || ITERATION == 2 1250 times 4 db 32 1251 %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1252 times 2 db 32 1253 %else 1254 times 3 db 32 1255 %endif 1256 db "Dec Hex" 1257 %assign ITERATION ITERATION + 1 1258 %endrep 1248 <1> %if ITERATION == 0 1249 <1> %elif ITERATION == 1 || ITERATION == 2 1250 <1> times 4 db 32 1251 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1252 <1> times 2 db 32 1253 <1> %else 1254 <1> times 3 db 32 1255 <1> %endif 0 00004022 44656320486578 db "Dec Hex" 1257 <1> %assign ITERATION ITERATION + 1 1248 <1> %if ITERATION == 0 1249 <1> %elif ITERATION == 1 || ITERATION == 2 0 00004029 20 times 4 db 32 1251 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1252 <1> times 2 db 32 1253 <1> %else 1254 <1> times 3 db 32 1255 <1> %endif 0 0000402D 44656320486578 db "Dec Hex" 1257 <1> %assign ITERATION ITERATION + 1 1248 <1> %if ITERATION == 0 1249 <1> %elif ITERATION == 1 || ITERATION == 2 0 00004034 20 times 4 db 32 1251 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1252 <1> times 2 db 32 1253 <1> %else 1254 <1> times 3 db 32 1255 <1> %endif 0 00004038 44656320486578 db "Dec Hex" 1257 <1> %assign ITERATION ITERATION + 1 1248 <1> %if ITERATION == 0 1249 <1> %elif ITERATION == 1 || ITERATION == 2 1250 <1> times 4 db 32 1251 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 0 0000403F 20 times 2 db 32 1253 <1> %else 1254 <1> times 3 db 32 1255 <1> %endif 0 00004041 44656320486578 db "Dec Hex" 1257 <1> %assign ITERATION ITERATION + 1 1248 <1> %if ITERATION == 0 1249 <1> %elif ITERATION == 1 || ITERATION == 2 1250 <1> times 4 db 32 1251 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 0 00004048 20 times 2 db 32 1253 <1> %else 1254 <1> times 3 db 32 1255 <1> %endif 0 0000404A 44656320486578 db "Dec Hex" 1257 <1> %assign ITERATION ITERATION + 1 1248 <1> %if ITERATION == 0 1249 <1> %elif ITERATION == 1 || ITERATION == 2 1250 <1> times 4 db 32 1251 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 0 00004051 20 times 2 db 32 1253 <1> %else 1254 <1> times 3 db 32 1255 <1> %endif 0 00004053 44656320486578 db "Dec Hex" 1257 <1> %assign ITERATION ITERATION + 1 1248 <1> %if ITERATION == 0 1249 <1> %elif ITERATION == 1 || ITERATION == 2 1250 <1> times 4 db 32 1251 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1252 <1> times 2 db 32 1253 <1> %else 0 0000405A 20 times 3 db 32 1255 <1> %endif 0 0000405D 44656320486578 db "Dec Hex" 1257 <1> %assign ITERATION ITERATION + 1 1248 <1> %if ITERATION == 0 1249 <1> %elif ITERATION == 1 || ITERATION == 2 1250 <1> times 4 db 32 1251 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1252 <1> times 2 db 32 1253 <1> %else 0 00004064 20 times 3 db 32 1255 <1> %endif 0 00004067 44656320486578 db "Dec Hex" 1257 <1> %assign ITERATION ITERATION + 1 0 0000406E 0D0A db 13,10 1260 .tableheader.end: 0 00004070 4F .tableheadertop:db .tableheadertop.end - .tableheadertop.start 1262 .tableheadertop.start: 1263 %assign ITERATION 0 1264 %rep 8 1265 %if ITERATION == 0 1266 %else 1267 times 3 db 32 1268 %endif 1269 db "Dec Hex" 1270 %assign ITERATION ITERATION + 1 1271 %endrep 1265 <1> %if ITERATION == 0 1266 <1> %else 1267 <1> times 3 db 32 1268 <1> %endif 0 00004071 44656320486578 db "Dec Hex" 1270 <1> %assign ITERATION ITERATION + 1 1265 <1> %if ITERATION == 0 1266 <1> %else 0 00004078 20 times 3 db 32 1268 <1> %endif 0 0000407B 44656320486578 db "Dec Hex" 1270 <1> %assign ITERATION ITERATION + 1 1265 <1> %if ITERATION == 0 1266 <1> %else 0 00004082 20 times 3 db 32 1268 <1> %endif 0 00004085 44656320486578 db "Dec Hex" 1270 <1> %assign ITERATION ITERATION + 1 1265 <1> %if ITERATION == 0 1266 <1> %else 0 0000408C 20 times 3 db 32 1268 <1> %endif 0 0000408F 44656320486578 db "Dec Hex" 1270 <1> %assign ITERATION ITERATION + 1 1265 <1> %if ITERATION == 0 1266 <1> %else 0 00004096 20 times 3 db 32 1268 <1> %endif 0 00004099 44656320486578 db "Dec Hex" 1270 <1> %assign ITERATION ITERATION + 1 1265 <1> %if ITERATION == 0 1266 <1> %else 0 000040A0 20 times 3 db 32 1268 <1> %endif 0 000040A3 44656320486578 db "Dec Hex" 1270 <1> %assign ITERATION ITERATION + 1 1265 <1> %if ITERATION == 0 1266 <1> %else 0 000040AA 20 times 3 db 32 1268 <1> %endif 0 000040AD 44656320486578 db "Dec Hex" 1270 <1> %assign ITERATION ITERATION + 1 1265 <1> %if ITERATION == 0 1266 <1> %else 0 000040B4 20 times 3 db 32 1268 <1> %endif 0 000040B7 44656320486578 db "Dec Hex" 1270 <1> %assign ITERATION ITERATION + 1 0 000040BE 0D0A db 13,10 1273 .tableheadertop.end: 1274 %endif 1275 %if _PM 1276 .ofs32: asciz "Cannot access 16-bit segment with 32-bit offset.",13,10 1277 .d.a_success: db "Allocated descriptor with selector " 1278 .d.a_success_sel: 1279 asciz "----",13,10 1280 .d.d_success: asciz "Deallocated descriptor",13,10 1281 .d.b_success: asciz "Set descriptor base",13,10 1282 .d.l_success: asciz "Set descriptor limit",13,10 1283 .d.t_success: asciz "Set descriptor type",13,10 1284 .d.a_error: db "Error " 1285 .d.a_error_code: 1286 asciz "----",13,10 1287 .d.d_error equ .d.a_error 1288 .d.d_error_code equ .d.a_error_code 1289 .d.b_error equ .d.a_error 1290 .d.b_error_code equ .d.a_error_code 1291 .d.l_error equ .d.a_error 1292 .d.l_error_code equ .d.a_error_code 1293 .d.t_error equ .d.a_error 1294 .d.t_error_code equ .d.a_error_code 1295 %endif 1296 1297 %if _MCB 1298 %if _MCBPOSITION 1299 .keyword_position: asciz "POSITION" 1300 %endif 1301 %if _MCBLIMIT 1302 .keyword_limit: asciz "LIMIT" 1303 %endif 1304 %if _SDSUB 1305 .keyword_skipsd: asciz "SKIPSD" 1306 %endif 1307 %assign ELD 0 1308 %include "dmmsg.asm" 1 <1> %if 0 2 <1> 3 <1> lDebug DM command messages 4 <1> 5 <1> Copyright (C) 2008-2026 E. C. Masloch 6 <1> 7 <1> Usage of the works is permitted provided that this 8 <1> instrument is retained with the works, so that any entity 9 <1> that uses the works is notified of this instrument. 10 <1> 11 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 12 <1> 13 <1> %endif 14 <1> 0 000040C0 456E64206F66206368 .invmcbadr: asciz "End of chain: invalid MCB address.",13,10 0 000040C9 61696E3A20696E7661 0 000040D2 6C6964204D43422061 0 000040DB 6464726573732E0D0A 0 000040E4 00 16 <1> 17 <1> %define smcb_messages ..@notype,"" 18 <1> 19 <1> %imacro smcbtype 2.nolist 20 <1> dw %2, %%label 21 <1> %if ELD 22 <1> internaldatarelocation 23 <1> %endif 24 <1> %defstr %%str %1 25 <1> %xdefine smcb_messages smcb_messages,%%label,%%str 26 <1> %endmacro 27 <1> 28 <1> %imacro smcbmsg 2-*.nolist 29 <1> %if %0 & 1 30 <1> %error Expected even number of parameters 31 <1> %endif 32 <1> %rotate 2 33 <1> %rep (%0 - 2) / 2 34 <1> %1: asciz %2 35 <1> %rotate 2 36 <1> %endrep 37 <1> %endmacro 38 <1> 0 000040E5 00 align 4, db 0 40 <1> smcbtypes: 0 000040E8 0000[B722] smcbtype S_OTHER, 00h 0 000040EC 0100[BF22] smcbtype S_DOSENTRY, 01h 0 000040F0 0200[CA22] smcbtype S_DOSCODE, 02h 0 000040F4 0300[D422] smcbtype S_DOSDATA, 03h 0 000040F8 0400[DE22] smcbtype S_IRQSCODE, 04h 0 000040FC 0500[E922] smcbtype S_IRQSDATA, 05h 0 00004100 0600[F422] smcbtype S_CDS, 06h 0 00004104 0700[FA22] smcbtype S_LFNCDS, 07h 0 00004108 0800[0323] smcbtype S_DPB, 08h 0 0000410C 0900[0923] smcbtype S_UPB, 09h 0 00004110 0A00[0F23] smcbtype S_SFT, 0Ah 0 00004114 0B00[1523] smcbtype S_FCBSFT, 0Bh 0 00004118 0C00[1E23] smcbtype S_CCB, 0Ch 0 0000411C 0D00[2423] smcbtype S_IRT, 0Dh 0 00004120 0E00[2A23] smcbtype S_SECTOR, 0Eh 0 00004124 0F00[3323] smcbtype S_NLS, 0Fh 0 00004128 1000[3923] smcbtype S_EBDA, 10h 0 0000412C 1600[4023] smcbtype S_INITFCBSFT, 16h 0 00004130 1700[4D23] smcbtype S_INITSTACK, 17h 0 00004134 1800[5923] smcbtype S_INITCDS, 18h 0 00004138 1900[6323] smcbtype S_INITCONFIG, 19h 0 0000413C 1A00[7023] smcbtype S_INITFATSEG, 1Ah 0 00004140 1B00[7D23] smcbtype S_INITSECTORSEG, 1Bh 0 00004144 1C00[8D23] smcbtype S_INITSTACKBPB,1Ch 0 00004148 1D00[9C23] smcbtype S_INITPSP, 1Dh 0 0000414C 1E00[A623] smcbtype S_ENVIRONMENT, 1Eh 0 00004150 1F00[B423] smcbtype S_INITIALISE, 1Fh 0 00004154 2000[C123] smcbtype S_DEVICE, 20h ; Device 0 00004158 2100[CA23] smcbtype S_DEVICEMEMORY,21h ; Allocated by device 0 0000415C 3000[D923] smcbtype S_EXCLDUMA, 30h ; Excluded UMA 0 00004160 3100[E423] smcbtype S_EXCLDUMASUB, 31h ; Excluded UMA with sub-chain of used MCBs 0 00004164 3200[F223] smcbtype S_EXCLDLH, 32h ; Excluded by LH 0 00004168 3300[FC23] smcbtype S_EXCLDDOS, 33h 0 0000416C 3400[0724] smcbtype S_EXCLDALTAH, 34h 0 00004170 FFFFFFFF dw -1, -1 76 <1> 77 <1> %if _SDSUB 78 <1> sdsubmcbtypes: 79 <1> smcbtype DEVICE=, 'D' 80 <1> smcbtype DEVICE= appendage, 'E' 81 <1> smcbtype IFS or UPB, 'I' 82 <1> smcbtype FILES=, 'F' 83 <1> smcbtype FCBS=, 'X' 84 <1> smcbtype BUFFERS= EMS workspace, 'C' 85 <1> smcbtype BUFFERS=, 'B' 86 <1> smcbtype LASTDRIVE=, 'L' 87 <1> smcbtype STACKS=, 'S' 88 <1> smcbtype INSTALL= transient, 'T' 89 <1> smcbtype invalid, 0 90 <1> dw -1, -1 91 <1> %endif 1309 %endif 1310 1311 1312 %define INSTALLMESSAGES db "" 1313 1314 %imacro installflag 6-*.nolist 1315 %xdefine %%one %1 1316 %xdefine %%two %2 1317 %xdefine %%three %3 1318 %ifempty %3 1319 %define %%three install_trying 1320 %endif 1321 %xdefine %%four %4 1322 %ifempty %4 1323 %define %%four 0 1324 %endif 1325 %xdefine %%five %5 1326 %ifnidn %%one, 0 1327 %if ((%%two - 1) & %%two) == 0 1328 %if %%two > 0FFFFh 1329 %if %%two & 0FFFFh 1330 %error Flag set in both upper and lower word 1331 %endif 1332 %assign %%two %%two >> 16 1333 %xdefine %%one %%one + 2 1334 %endif 1335 %else 1336 %if (%%two & 0FFFF_0000h) != 0FFFF_0000h 1337 %if (%%two & 0FFFFh) != 0FFFFh 1338 %error Flag clear in both upper and lower word 1339 %endif 1340 %assign %%two (%%two >> 16) & 0FFFFh 1341 %xdefine %%one %%one + 2 1342 %endif 1343 %endif 1344 %endif 1345 %xdefine INSTALLMESSAGES INSTALLMESSAGES, %%message_five:, {asciz %%five} 1346 %assign %%step 0 1347 %rep %0 - 5 1348 %xdefine INSTALLMESSAGES INSTALLMESSAGES, %%message_%[%%step]:, {asciz %6} 1349 dw %%message_%[%%step] 1350 dw %%message_five 1351 dw %%one, %%two, %%three, %%four 1352 %rotate 1 1353 %assign %%step %%step + 1 1354 %endrep 1355 %endmacro 1356 1357 %imacro installmessages 0-*.nolist 1358 %rep %0 1359 %1 1360 %rotate 1 1361 %endrep 1362 %endmacro 1363 1364 installformat equ 1 1365 1366 1367 align 4, db 0 1368 installflags: 1369 %if _PM 1370 installflag options4, opt4_int_2F_hook,,, "Interrupt 2Fh DPMI hook", "INT2F", "DPMIHOOK" 1372 %endif 1373 %if _CATCHINTFAULTCOND && (_CATCHINT0D || _CATCHINT0C) 0 00004174 [3F1F][241F][0000] installflag options4, opt4_int_fault_hook,,, "R86M fault interrupts hook", "FAULTS", "FAULT", "INTFAULTS", "INTFAULT" 0 0000417A 1000[0000]0000 0 00004180 [461F][241F][0000] 0 00004186 1000[0000]0000 0 0000418C [4C1F][241F][0000] 0 00004192 1000[0000]0000 0 00004198 [561F][241F][0000] 0 0000419E 1000[0000]0000 1376 %endif 1377 %if _CATCHINT08 0 000041A4 [761F][5F1F][0000] installflag options4, opt4_int_08_hook,,, "Interrupt 8 timer hook", "INT08", "INT8", "TIMER" 0 000041AA 0400[0000]0000 0 000041B0 [7C1F][5F1F][0000] 0 000041B6 0400[0000]0000 0 000041BC [811F][5F1F][0000] 0 000041C2 0400[0000]0000 1380 %endif 1381 %if _CATCHINT2D 0 000041C8 [9F1F][871F][0000] installflag options4, opt4_int_2D_hook,,, "Interrupt 2Dh AMIS hook", "INT2D", "AMIS" 0 000041CE 0800[0000]0000 0 000041D4 [A51F][871F][0000] 0 000041DA 0800[0000]0000 1384 %endif 1385 %if _AREAS && _AREAS_HOOK_CLIENT 1386 installflag 0, install_areas,,, "Areas", "AREAS" 1388 %endif 0 000041E0 [B51F][AA1F][0000] installflag options, enable_serial, dmycmd,, "Serial I/O", "SERIAL" 0 000041E6 0040[0000]0000 0 000041EC [CD1F][BC1F][0000] installflag options, fakeindos, dmycmd,, "Force InDOS mode", "INDOS" 0 000041F2 0800[0000]0000 0 000041F8 [E91F][D31F][0000] installflag options, opt_usegetinput, dmycmd,, "Use DOS getinput mode", "GETINPUT" 0 000041FE 0008[0000]0000 0 00004204 [1120][F21F][0200] installflag options3, opt3_r_highlight_full, dmycmd,, "R register change highlighting", "RHIGHLIGHT" 0 0000420A 0400[0000]0000 0 00004210 [2720][1C20][0200] installflag options3, ~ opt3_disable_autorepeat, dmycmd,, "Autorepeat", "AUTOREPEAT" 0 00004216 FFEF[0000]0000 0 0000421C [3920][3220][0000] installflag options, ~ nonpagingdevice, dmycmd,, "Paging", "PAGING" 0 00004222 EFFF[0000]0000 0 00004228 [5020][4020][0000] installflag options6, opt6_bios_output, dmycmd,, "ROM-BIOS output", "BIOSOUT", "BIOSOUTPUT", "INT10OUT", "INT10OUTPUT" 0 0000422E 0002[0000]0000 0 00004234 [5820][4020][0000] 0 0000423A 0002[0000]0000 0 00004240 [6320][4020][0000] 0 00004246 0002[0000]0000 0 0000424C [6C20][4020][0000] 0 00004252 0002[0000]0000 0 00004258 [8E20][7820][0000] installflag options6, opt6_flat_binary, dmycmd,, "Flat binary read mode", "FLAT", "FLATBIN", "FLATBINARY", "FSWITCH" 0 0000425E 0004[0000]0000 0 00004264 [9320][7820][0000] 0 0000426A 0004[0000]0000 0 00004270 [9B20][7820][0000] 0 00004276 0004[0000]0000 0 0000427C [A620][7820][0000] 0 00004282 0004[0000]0000 0 00004288 [C420][AE20][0000] installflag options6, opt6_big_stack, dmycmd,, ".BIG style stack mode", "BIG", "BIGSTACK", "ESWITCH" 0 0000428E 0008[0000]0000 0 00004294 [C820][AE20][0000] 0 0000429A 0008[0000]0000 0 000042A0 [D120][AE20][0000] 0 000042A6 0008[0000]0000 1408 %if _RH 0 000042AC [EF20][D920][0200] installflag options6, opt6_rh_mode, dmycmd,, "Register dump history", "RH", "RHISTORY", "REGHISTORY" 0 000042B2 1000[0000]0000 0 000042B8 [F220][D920][0200] 0 000042BE 1000[0000]0000 0 000042C4 [FB20][D920][0200] 0 000042CA 1000[0000]0000 1411 %endif 1412 %if _DEBUG && _DEBUG_COND 1413 installflag options6, opt6_debug_mode,,, "Debuggable mode", "DEBUG" 1415 %endif 0 000042D0 [1E21][0621][0000] installflag options3, opt3_paging_rc, dmycmd,, "Paging RC commands mode", "PAGINGRC" 0 000042D6 0010[0000]0000 0 000042DC [3F21][2721][0000] installflag options3, opt3_paging_re, dmycmd,, "Paging RE commands mode", "PAGINGRE" 0 000042E2 0040[0000]0000 0 000042E8 [6621][4821][0000] installflag options3, opt3_paging_yy, dmycmd,, "Paging Script for lDebug mode", "PAGINGY", "PAGINGYY", "PAGINGSCRIPT" 0 000042EE 0020[0000]0000 0 000042F4 [6E21][4821][0000] 0 000042FA 0020[0000]0000 0 00004300 [7721][4821][0000] 0 00004306 0020[0000]0000 1422 %ifn _ONLYNON386 0 0000430C [9B21][8421][0000] installflag options, dispregs32, dmycmd,, "386 register dump mode", "RX", "REGS386", "REGS32" 0 00004312 0100[0000]0000 0 00004318 [9E21][8421][0000] 0 0000431E 0100[0000]0000 0 00004324 [A621][8421][0000] 0 0000432A 0100[0000]0000 1425 %endif 0 00004330 [C321][AD21][0000] installflag options, traceints, dmycmd,, "Trace interrupts Mode", "TM", "TRACEINTS", "TRACEINTERRUPTS" 0 00004336 0200[0000]0000 0 0000433C [C621][AD21][0000] 0 00004342 0200[0000]0000 0 00004348 [D021][AD21][0000] 0 0000434E 0200[0000]0000 0 00004354 [ED21][E021][0000] installflag options7, opt7_houdini, dmycmd,, "Houdini Mode", "HOUDINI" 0 0000435A 0001[0000]0000 0 00004360 [0F22][F521][0000] installflag options7, opt7_no_free_oneshot_eld, dmycmd,, "No free oneshot ELDs mode", "NOFREEONESHOT" 0 00004366 0100[0000]0000 0 0000436C [2F22][1D22][0000] installflag options7, opt7_quiet_install, dmycmd,, "Quiet ELD install", "QUIETINSTALL" 0 00004372 0400[0000]0000 0 00004378 [5922][3C22][0000] installflag options7, opt7_debug_optional_link, dmycmd,, "Debug ELD optional link mode", "DEBUGOPTLINK" 0 0000437E 0200[0000]0000 0 00004384 [7422][6622][0000] installflag options7, opt7_quick_run, dmycmd,, "Quick ELD run", "QUICKRUN" 0 0000438A 0800[0000]0000 0 00004390 [8B22][7D22][0000] installflag options7, opt7_debug_run, dmycmd,, "Debug ELD run", "DEBUGRUN" 0 00004396 0002[0000]0000 0 0000439C [AE22][9422][0000] installflag options7, opt7_no_ensure, dmycmd,, "No ensure debuggee loaded", "NOENSURE" 0 000043A2 0010[0000]0000 0 000043A8 00000000 dw 0, 0 1443 0 000043AC 5238364D206661756C installmessages INSTALLMESSAGES 0 000043B5 7420696E7465727275 0 000043BE 70747320686F6F6B00 0 000043C7 4641554C5453004641 0 000043D0 554C5400494E544641 0 000043D9 554C545300494E5446 0 000043E2 41554C5400496E7465 0 000043EB 727275707420382074 0 000043F4 696D657220686F6F6B 0 000043FD 00494E54303800494E 0 00004406 54380054494D455200 0 0000440F 496E74657272757074 0 00004418 2032446820414D4953 0 00004421 20686F6F6B00494E54 0 0000442A 324400414D49530053 0 00004433 657269616C20492F4F 0 0000443C 0053455249414C0046 0 00004445 6F72636520496E444F 0 0000444E 53206D6F646500494E 0 00004457 444F53005573652044 0 00004460 4F5320676574696E70 0 00004469 7574206D6F64650047 0 00004472 4554494E5055540052 0 0000447B 207265676973746572 0 00004484 206368616E67652068 0 0000448D 6967686C6967687469 0 00004496 6E670052484947484C 0 0000449F 49474854004175746F 0 000044A8 726570656174004155 0 000044B1 544F52455045415400 0 000044BA 506167696E67005041 0 000044C3 47494E4700524F4D2D 0 000044CC 42494F53206F757470 0 000044D5 75740042494F534F55 0 000044DE 540042494F534F5554 0 000044E7 50555400494E543130 0 000044F0 4F555400494E543130 0 000044F9 4F555450555400466C 0 00004502 61742062696E617279 0 0000450B 2072656164206D6F64 0 00004514 6500464C415400464C 0 0000451D 415442494E00464C41 0 00004526 5442494E4152590046 0 0000452F 535749544348002E42 0 00004538 4947207374796C6520 0 00004541 737461636B206D6F64 0 0000454A 650042494700424947 0 00004553 535441434B00455357 0 0000455C 495443480052656769 0 00004565 737465722064756D70 0 0000456E 20686973746F727900 0 00004577 52480052484953544F 0 00004580 525900524547484953 0 00004589 544F52590050616769 0 00004592 6E6720524320636F6D 0 0000459B 6D616E6473206D6F64 0 000045A4 6500504147494E4752 0 000045AD 4300506167696E6720 0 000045B6 524520636F6D6D616E 0 000045BF 6473206D6F64650050 0 000045C8 4147494E4752450050 0 000045D1 6167696E6720536372 0 000045DA 69707420666F72206C 0 000045E3 4465627567206D6F64 0 000045EC 6500504147494E4759 0 000045F5 00504147494E475959 0 000045FE 00504147494E475343 0 00004607 524950540033383620 0 00004610 726567697374657220 0 00004619 64756D70206D6F6465 0 00004622 005258005245475333 0 0000462B 383600524547533332 0 00004634 00547261636520696E 0 0000463D 746572727570747320 0 00004646 4D6F646500544D0054 0 0000464F 52414345494E545300 0 00004658 5452414345494E5445 0 00004661 52525550545300486F 0 0000466A 7564696E69204D6F64 0 00004673 6500484F5544494E49 0 0000467C 004E6F206672656520 0 00004685 6F6E6573686F742045 0 0000468E 4C4473206D6F646500 0 00004697 4E4F465245454F4E45 0 000046A0 53484F540051756965 0 000046A9 7420454C4420696E73 0 000046B2 74616C6C0051554945 0 000046BB 54494E5354414C4C00 0 000046C4 446562756720454C44 0 000046CD 206F7074696F6E616C 0 000046D6 206C696E6B206D6F64 0 000046DF 650044454255474F50 0 000046E8 544C494E4B00517569 0 000046F1 636B20454C44207275 0 000046FA 6E00515549434B5255 0 00004703 4E0044656275672045 0 0000470C 4C442072756E004445 0 00004715 42554752554E004E6F 0 0000471E 20656E737572652064 0 00004727 65627567676565206C 0 00004730 6F61646564004E4F45 0 00004739 4E5355524500 1445 1446 1447 %if _MCB 0 0000473F 535F4F544845520053 smcbmsg smcb_messages 0 00004748 5F444F53454E545259 0 00004751 00535F444F53434F44 0 0000475A 4500535F444F534441 0 00004763 544100535F49525153 0 0000476C 434F444500535F4952 0 00004775 51534441544100535F 0 0000477E 43445300535F4C464E 0 00004787 43445300535F445042 0 00004790 00535F55504200535F 0 00004799 53465400535F464342 0 000047A2 53465400535F434342 0 000047AB 00535F49525400535F 0 000047B4 534543544F5200535F 0 000047BD 4E4C5300535F454244 0 000047C6 4100535F494E495446 0 000047CF 434253465400535F49 0 000047D8 4E4954535441434B00 0 000047E1 535F494E4954434453 0 000047EA 00535F494E4954434F 0 000047F3 4E46494700535F494E 0 000047FC 495446415453454700 0 00004805 535F494E4954534543 0 0000480E 544F5253454700535F 0 00004817 494E4954535441434B 0 00004820 42504200535F494E49 0 00004829 5450535000535F454E 0 00004832 5649524F4E4D454E54 0 0000483B 00535F494E49544941 0 00004844 4C49534500535F4445 0 0000484D 5649434500535F4445 0 00004856 564943454D454D4F52 0 0000485F 5900535F4558434C44 0 00004868 554D4100535F455843 0 00004871 4C44554D4153554200 0 0000487A 535F4558434C444C48 0 00004883 00535F4558434C4444 0 0000488C 4F5300535F4558434C 0 00004895 44414C54414800 1449 0 0000489C 756E6B6E6F776E00 smcbmsg_unknown: asciz "unknown" 1451 1452 %undef smcb_messages 1453 %unimacro smcbtype 2.nolist 1454 %unimacro smcbmsg 2-*.nolist 1455 %endif 1456 1457 0 000048A4 5E204572726F7207 errcarat: db "^ Error",7 0 000048AC 0D0A00 crlf: asciz 13,10 1460 1461 %if _SYMBOLIC 1462 pre_str_list: 1463 db -1, "", 0 1464 .end: 1465 %endif 1466 1467 0 000048AF 00 align 4, db 0 1469 msgtable_value_range: 0 000048B0 [050F][0F0F] dw msg.executing, msg.executing_value_range 1471 %if _ACCESS_VARIABLES_AMOUNT 0 000048B4 [3E24][4624] dw .reading, .reading_range 0 000048B8 [C124][C924] dw .writing, .writing_range 0 000048BC [4425][4F25] dw .memoperand, .memoperand_range 0 000048C0 [6025][6A25] dw .accessing, .accessing_range 1476 %endif 0 000048C4 0000 dw 0 1478 1479 %if _ACCESS_VARIABLES_AMOUNT 0 000048C6 52454144494E4700 .reading: asciz "READING" 1481 .reading_range: 1482 %assign iicounter 0 1483 %define iiprefix "" 1484 %rep _ACCESS_VARIABLES_AMOUNT 1485 _autohexitsstrdef IIDEF, iicounter 1486 db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 1487 %assign iicounter iicounter + 1 1488 %define iiprefix ", " 1489 %endrep 1485 <1> _autohexitsstrdef IIDEF, iicounter 0 000048CE 46524F4D2072656164 db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 0 000048D7 61647230204C454E47 0 000048E0 544820726561646C65 0 000048E9 6E30 1487 <1> %assign iicounter iicounter + 1 1488 <1> %define iiprefix ", " 1485 <1> _autohexitsstrdef IIDEF, iicounter 0 000048EB 2C2046524F4D207265 db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 0 000048F4 616461647231204C45 0 000048FD 4E4754482072656164 0 00004906 6C656E31 1487 <1> %assign iicounter iicounter + 1 1488 <1> %define iiprefix ", " 1485 <1> _autohexitsstrdef IIDEF, iicounter 0 0000490A 2C2046524F4D207265 db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 0 00004913 616461647232204C45 0 0000491C 4E4754482072656164 0 00004925 6C656E32 1487 <1> %assign iicounter iicounter + 1 1488 <1> %define iiprefix ", " 1485 <1> _autohexitsstrdef IIDEF, iicounter 0 00004929 2C2046524F4D207265 db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 0 00004932 616461647233204C45 0 0000493B 4E4754482072656164 0 00004944 6C656E33 1487 <1> %assign iicounter iicounter + 1 1488 <1> %define iiprefix ", " 0 00004948 00 asciz 0 00004949 57524954494E4700 .writing: asciz "WRITING" 1492 .writing_range: 1493 %assign iicounter 0 1494 %define iiprefix "" 1495 %rep _ACCESS_VARIABLES_AMOUNT 1496 _autohexitsstrdef IIDEF, iicounter 1497 db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 1498 %assign iicounter iicounter + 1 1499 %define iiprefix ", " 1500 %endrep 1496 <1> _autohexitsstrdef IIDEF, iicounter 0 00004951 46524F4D2077726974 db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 0 0000495A 61647230204C454E47 0 00004963 544820777269746C65 0 0000496C 6E30 1498 <1> %assign iicounter iicounter + 1 1499 <1> %define iiprefix ", " 1496 <1> _autohexitsstrdef IIDEF, iicounter 0 0000496E 2C2046524F4D207772 db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 0 00004977 697461647231204C45 0 00004980 4E4754482077726974 0 00004989 6C656E31 1498 <1> %assign iicounter iicounter + 1 1499 <1> %define iiprefix ", " 1496 <1> _autohexitsstrdef IIDEF, iicounter 0 0000498D 2C2046524F4D207772 db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 0 00004996 697461647232204C45 0 0000499F 4E4754482077726974 0 000049A8 6C656E32 1498 <1> %assign iicounter iicounter + 1 1499 <1> %define iiprefix ", " 1496 <1> _autohexitsstrdef IIDEF, iicounter 0 000049AC 2C2046524F4D207772 db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 0 000049B5 697461647233204C45 0 000049BE 4E4754482077726974 0 000049C7 6C656E33 1498 <1> %assign iicounter iicounter + 1 1499 <1> %define iiprefix ", " 0 000049CB 00 asciz 1502 0 000049CC 4D454D4F504552414E .memoperand: asciz "MEMOPERAND" 0 000049D5 4400 0 000049D7 52454144494E472C20 .memoperand_range: asciz "READING, WRITING" 0 000049E0 57524954494E4700 0 000049E8 414343455353494E47 .accessing: asciz "ACCESSING" 0 000049F1 00 0 000049F2 52454144494E472C20 .accessing_range: asciz "READING, WRITING, EXECUTING" 0 000049FB 57524954494E472C20 0 00004A04 455845435554494E47 0 00004A0D 00 1507 %endif 1508 1509 1510 %if _BOOTLDR 1511 %define lot_list 1512 %define lot_comma 1513 %macro lot_entry 2.nolist 1514 %ifn _LINK 1515 LOAD_%2 equ %1 1516 %endif 1517 dw LOAD_%2, .%2 1518 %defstr %%string %2 1519 %xdefine lot_list lot_list lot_comma .%2:, db %%string, db 0 1520 %define lot_comma , 1521 %endmacro 1522 1523 %macro lot_messages 0-*.nolist 1524 %rep (%0 / 3) 1525 %1 1526 %2 1527 %3 1528 %rotate 3 1529 %endrep 1530 %endmacro 1531 0 00004A0E 00 align 4, db 0 1533 loadoptiontable: 0 00004A10 0100[F425] lot_entry 1, SET_DL_UNIT 0 00004A14 0200[0026] lot_entry 2, SET_BL_UNIT 0 00004A18 0400[0C26] lot_entry 4, SET_SIDI_CLUSTER 0 00004A1C 1000[1D26] lot_entry 10h, SET_DSSI_DPT 0 00004A20 2000[2A26] lot_entry 20h, PUSH_DPT 0 00004A24 4000[3326] lot_entry 40h, DATASTART_HIDDEN 0 00004A28 8000[4426] lot_entry 80h, SET_AXBX_DATASTART 0 00004A2C 0001[5726] lot_entry 100h, SET_DSBP_BPB 0 00004A30 0002[6426] lot_entry 200h, LBA_SET_TYPE 0 00004A34 0004[7126] lot_entry 400h, MESSAGE_TABLE 0 00004A38 0008[7F26] lot_entry 800h, SET_AXBX_ROOT_HIDDEN 0 00004A3C 0010[9426] lot_entry 1000h, CMDLINE 0 00004A40 0020[9C26] lot_entry 2000h, NO_BPB 0 00004A44 0040[A326] lot_entry 4000h, SET_DSSI_PARTINFO 0 00004A48 00000000 dw 0, 0 1549 1550 .incompatible: 0 00004A4C 02008000 dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_DATASTART 0 00004A50 02000008 dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_ROOT_HIDDEN 0 00004A54 80000008 dw LOAD_SET_AXBX_DATASTART, LOAD_SET_AXBX_ROOT_HIDDEN 0 00004A58 04001000 dw LOAD_SET_SIDI_CLUSTER, LOAD_SET_DSSI_DPT 0 00004A5C 00011000 dw LOAD_SET_DSBP_BPB, LOAD_SET_DSSI_DPT 0 00004A60 00200001 dw LOAD_NO_BPB, LOAD_SET_DSBP_BPB 0 00004A64 00200002 dw LOAD_NO_BPB, LOAD_LBA_SET_TYPE 0 00004A68 00200004 dw LOAD_NO_BPB, LOAD_MESSAGE_TABLE 0 00004A6C 00400400 dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_SIDI_CLUSTER 0 00004A70 00401000 dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSSI_DPT 0 00004A74 00400001 dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSBP_BPB 0 00004A78 00000000 dw 0, 0 1563 0 00004A7C 5345545F444C5F554E lot_messages lot_list 0 00004A85 4954005345545F424C 0 00004A8E 5F554E495400534554 0 00004A97 5F534944495F434C55 0 00004AA0 53544552005345545F 0 00004AA9 445353495F44505400 0 00004AB2 505553485F44505400 0 00004ABB 444154415354415254 0 00004AC4 5F48494444454E0053 0 00004ACD 45545F415842585F44 0 00004AD6 415441535441525400 0 00004ADF 5345545F445342505F 0 00004AE8 425042004C42415F53 0 00004AF1 45545F54595045004D 0 00004AFA 4553534147455F5441 0 00004B03 424C45005345545F41 0 00004B0C 5842585F524F4F545F 0 00004B15 48494444454E00434D 0 00004B1E 444C494E45004E4F5F 0 00004B27 425042005345545F44 0 00004B30 5353495F5041525449 0 00004B39 4E464F00 1565 1566 %unmacro lot_entry 2.nolist 1567 %unmacro lot_messages 0-*.nolist 1568 1569 1570 msdos7_message_table: 1571 ; the first four bytes give displacements to the various 1572 ; messages. an ASCIZ message indicates that this was the 1573 ; last message. a message terminated by 0FFh indicates 1574 ; that the last message (displacement at table + 3) is 1575 ; to follow after this message. 1576 ; the maximum allowed displacement is 7Fh. the minimum 1577 ; allowed displacement is 1, to avoid a zero displacement. 1578 ; only the last message is terminated by a zero byte, 1579 ; as that zero byte indicates the end of the message table. 1580 ; (the entire table is treated as one ASCIZ string.) 1581 ; MS-DOS 7.10 from MSW 98 SE seems to have at least 167h (359) 1582 ; bytes allocated to its buffer for these. 1583 ; 1584 ; this message table was discussed in a dosemu2 repo at 1585 ; https://github.com/stsp/dosemu2/issues/681 0 00004B3D 03 .: db .msg_invalid_system - ($ + 1) 0 00004B3E 13 db .msg_io_error - ($ + 1) 0 00004B3F 01 db .msg_invalid_system - ($ + 1) 0 00004B40 1D db .msg_press_any_key - ($ + 1) 1590 1591 .msg_invalid_system: 0 00004B41 0D0A496E76616C6964 db 13,10,"Invalid system", -1 0 00004B4A 2073797374656DFF 1593 1594 .msg_io_error: 0 00004B52 0D0A492F4F20657272 db 13,10,"I/O error", -1 0 00004B5B 6F72FF 1596 1597 .msg_press_any_key: 0 00004B5E 0D0A4368616E676520 db 13,10,"Change disk and press any key",13,10,0 0 00004B67 6469736B20616E6420 0 00004B70 707265737320616E79 0 00004B79 206B65790D0A00 1599 .end: 1600 .size: equ .end - . 1601 1602 %if .size > 150h 1603 %error Message table too large! 1604 %endif 1605 1606 1607 1608 align 4, db 0 1609 loadsettings: 1610 istruc LOADSETTINGS 0 00004B80 [E007] at lsKernelName, dw msg.ldos_kernel_name 0 00004B82 [5608] at lsAddName, dw msg.addname_empty 0 00004B84 6000 at lsMinPara, dw 60h 0 00004B86 0000 at lsMaxPara, dw 0 0 00004B88 0010 at lsOptions, dw LOAD_CMDLINE 0 00004B8A 0002 at lsSegment, dw 200h 0 00004B8C 00040000 at lsEntry, dd 400h 0 00004B90 007CFFFF at lsBPB, dw 7C00h, -1 0 00004B94 FC03 at lsCheckOffset, dw 1020 0 00004B96 6C44 at lsCheckValue, db "lD" 0 00004B98 4C444F5300 at lsName, asciz "LDOS" 0 00004B9D 00 iend 1623 istruc LOADSETTINGS 0 00004BA0 [C307] at lsKernelName, dw msg.freedos_kernel_name 0 00004BA2 [5608] at lsAddName, dw msg.addname_empty 0 00004BA4 2000 at lsMinPara, dw 20h 0 00004BA6 FFFF at lsMaxPara, dw -1 0 00004BA8 0300 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 0 00004BAA 6000 at lsSegment, dw 60h 0 00004BAC 00000000 at lsEntry, dd 0 0 00004BB0 007CFFFF at lsBPB, dw 7C00h, -1 0 00004BB4 0046524545 at lsName, asciz "FREEDOS" 0 00004BBC 444F5300 1633 iend 1634 istruc LOADSETTINGS 0 00004BC0 [CE07] at lsKernelName, dw msg.dosc_kernel_name 0 00004BC2 [5608] at lsAddName, dw msg.addname_empty 0 00004BC4 2000 at lsMinPara, dw 20h 0 00004BC6 FFFF at lsMaxPara, dw -1 0 00004BC8 0300 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 0 00004BCA 0020 at lsSegment, dw 2000h 0 00004BCC 00000000 at lsEntry, dd 0 0 00004BD0 007C0000 at lsBPB, dw 7C00h, 0 0 00004BD4 00444F5343 at lsName, asciz "DOSC" 0 00004BDC 00 0 00004BDD 00 iend 1645 istruc LOADSETTINGS 0 00004BE0 [D607] at lsKernelName, dw msg.edrdos_kernel_name 0 00004BE2 [5608] at lsAddName, dw msg.addname_empty 0 00004BE4 2000 at lsMinPara, dw 20h 0 00004BE6 FFFF at lsMaxPara, dw -1 0 00004BE8 0301 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT | LOAD_SET_DSBP_BPB 0 00004BEA 7000 at lsSegment, dw 70h 0 00004BEC 00000000 at lsEntry, dd 0 0 00004BF0 007CFFFF at lsBPB, dw 7C00h, -1 0 00004BF4 0045445244 at lsName, asciz "EDRDOS" 0 00004BFC 4F5300 0 00004BFF 00 iend 1657 istruc LOADSETTINGS 0 00004C00 [E907] at lsKernelName, dw msg.msdos6_kernel_name 0 00004C02 [F007] at lsAddName, dw msg.msdos6_add_name 0 00004C04 2000 at lsMinPara, dw 20h 0 00004C06 6000 at lsMaxPara, dw 60h 0 00004C08 F100 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 0 00004C0A 7000 at lsSegment, dw 70h 0 00004C0C 00000000 at lsEntry, dd 0 0 00004C10 007C0000 at lsBPB, dw 7C00h, 0 0 00004C14 004D53444F at lsName, asciz "MSDOS6" 0 00004C1C 533600 0 00004C1F 00 iend 1670 istruc LOADSETTINGS 0 00004C20 [2B08] at lsKernelName, dw msg.rxdos.0_kernel_name 0 00004C22 [4208] at lsAddName, dw msg.rxdos.0_add_name 0 00004C24 2000 at lsMinPara, dw 20h 0 00004C26 6000 at lsMaxPara, dw 60h 0 00004C28 3108 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 0 00004C2A 7000 at lsSegment, dw 70h 0 00004C2C 00000000 at lsEntry, dd 0 0 00004C30 007C0000 at lsBPB, dw 7C00h, 0 0 00004C34 005258444F at lsName, asciz "RXDOS.0" 0 00004C3C 532E3000 1681 iend 1682 istruc LOADSETTINGS 0 00004C40 [3808] at lsKernelName, dw msg.rxdos.1_kernel_name 0 00004C42 [4208] at lsAddName, dw msg.rxdos.1_add_name 0 00004C44 2000 at lsMinPara, dw 20h 0 00004C46 6000 at lsMaxPara, dw 60h 0 00004C48 3108 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 0 00004C4A 7000 at lsSegment, dw 70h 0 00004C4C 00000000 at lsEntry, dd 0 0 00004C50 007C0000 at lsBPB, dw 7C00h, 0 0 00004C54 005258444F at lsName, asciz "RXDOS.1" 0 00004C5C 532E3100 1693 iend 1694 istruc LOADSETTINGS 0 00004C60 [4C08] at lsKernelName, dw msg.rxdos.2_kernel_name 0 00004C62 [5608] at lsAddName, dw msg.addname_empty 0 00004C64 6000 at lsMinPara, dw 60h 0 00004C66 0000 at lsMaxPara, dw 0 0 00004C68 0010 at lsOptions, dw LOAD_CMDLINE 0 00004C6A 7000 at lsSegment, dw 70h 0 00004C6C 00040000 at lsEntry, dd 400h 0 00004C70 007CFFFF at lsBPB, dw 7C00h, -1 0 00004C74 005258444F at lsName, asciz "RXDOS.2" 0 00004C7C 532E3200 1704 iend 1705 istruc LOADSETTINGS 0 00004C80 [4C08] at lsKernelName, dw msg.rxdos.2_kernel_name 0 00004C82 [5608] at lsAddName, dw msg.addname_empty 0 00004C84 6000 at lsMinPara, dw 60h 0 00004C86 0000 at lsMaxPara, dw 0 0 00004C88 0010 at lsOptions, dw LOAD_CMDLINE 0 00004C8A 0002 at lsSegment, dw 200h 0 00004C8C 00040000 at lsEntry, dd 400h 0 00004C90 007CFFFF at lsBPB, dw 7C00h, -1 0 00004C94 FC03 at lsCheckOffset, dw 1020 0 00004C96 6C44 at lsCheckValue, db "lD" 0 00004C98 5258444F532E3300 at lsName, asciz "RXDOS.3" 1717 iend 1718 istruc LOADSETTINGS 0 00004CA0 [FA07] at lsKernelName, dw msg.ibmdos_kernel_name 0 00004CA2 [0508] at lsAddName, dw msg.ibmdos_add_name 0 00004CA4 2000 at lsMinPara, dw 20h 0 00004CA6 8000 at lsMaxPara, dw 80h 0 00004CA8 F100 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 0 00004CAA 7000 at lsSegment, dw 70h 0 00004CAC 00000000 at lsEntry, dd 0 0 00004CB0 007C0000 at lsBPB, dw 7C00h, 0 0 00004CB4 0049424D44 at lsName, asciz "IBMDOS" 0 00004CBC 4F5300 0 00004CBF 00 iend 1731 istruc LOADSETTINGS 0 00004CC0 [FA07] at lsKernelName, dw msg.ibmdos_kernel_name 0 00004CC2 [0508] at lsAddName, dw msg.ibmdos_add_name 0 00004CC4 2000 at lsMinPara, dw 20h 0 00004CC6 FFFF at lsMaxPara, dw -1 0 00004CC8 F100 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 0 00004CCA 7000 at lsSegment, dw 70h 0 00004CCC 00000000 at lsEntry, dd 0 0 00004CD0 007C0000 at lsBPB, dw 7C00h, 0 0 00004CD4 004452444F at lsName, asciz "DRDOS" 0 00004CDC 5300 0 00004CDE 00 iend 1744 istruc LOADSETTINGS 0 00004CE0 [E907] at lsKernelName, dw msg.msdos7_kernel_name 0 00004CE2 [5608] at lsAddName, dw msg.addname_empty 0 00004CE4 4000 at lsMinPara, dw 40h 0 00004CE6 8000 at lsMaxPara, dw 80h 0 00004CE8 6506 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_SIDI_CLUSTER | LOAD_DATASTART_HIDDEN | LOAD_PUSH_DPT | LOAD_LBA_SET_TYPE | LOAD_MESSAGE_TABLE 0 00004CEA 7000 at lsSegment, dw 70h 0 00004CEC 00020000 at lsEntry, dd 200h 0 00004CF0 007CFFFF at lsBPB, dw 7C00h, -1 0 00004CF4 0002 at lsCheckOffset, dw 200h 0 00004CF6 424A at lsCheckValue, db "BJ" 0 00004CF8 4D53444F533700 at lsName, asciz "MSDOS7" 0 00004CFF 00 iend 1759 istruc LOADSETTINGS 0 00004D00 [1008] at lsKernelName, dw msg.ntldr_kernel_name 0 00004D02 [5608] at lsAddName, dw msg.addname_empty 0 00004D04 2000 at lsMinPara, dw 20h 0 00004D06 FFFF at lsMaxPara, dw -1 0 00004D08 4100 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 0 00004D0A 0020 at lsSegment, dw 2000h 0 00004D0C 00000000 at lsEntry, dd 0 0 00004D10 007C0000 at lsBPB, dw 7C00h, 0 0 00004D14 004E544C44 at lsName, asciz "NTLDR" 0 00004D1C 5200 0 00004D1E 00 iend 1771 istruc LOADSETTINGS 0 00004D20 [1608] at lsKernelName, dw msg.bootmgr_kernel_name 0 00004D22 [5608] at lsAddName, dw msg.addname_empty 0 00004D24 2000 at lsMinPara, dw 20h 0 00004D26 FFFF at lsMaxPara, dw -1 0 00004D28 4100 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 0 00004D2A 0020 at lsSegment, dw 2000h 0 00004D2C 00000000 at lsEntry, dd 0 0 00004D30 007C0000 at lsBPB, dw 7C00h, 0 0 00004D34 00424F4F54 at lsName, asciz "BOOTMGR" 0 00004D3C 4D475200 1782 iend 1783 istruc LOADSETTINGS 0 00004D40 [1E08] at lsKernelName, dw msg.chain_kernel_name 0 00004D42 [5608] at lsAddName, dw msg.addname_empty 0 00004D44 2000 at lsMinPara, dw paras(512) 0 00004D46 0002 at lsMaxPara, dw paras(8192) 0 00004D48 0160 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_DSSI_PARTINFO | LOAD_NO_BPB 0 00004D4A C007 at lsSegment, dw 7C0h 0 00004D4C 007C40F8 at lsEntry, dw 7C00h, -7C0h 0 00004D50 007C0000 at lsBPB, dw 7C00h, 0 0 00004D54 FE01 at lsCheckOffset, dw 510 0 00004D56 55AA at lsCheckValue, dw 0AA55h 0 00004D58 434841494E00 at lsName, asciz "CHAIN" 0 00004D5E 00 iend 0 00004D60 0000 dw 0 1798 %endif 1799 1800 1801 %if _APPLICATION || _DEVICE 0 00004D62 0D21 dskerrs: db dskerr0-dskerrs,dskerr1-dskerrs 0 00004D64 3444 db dskerr2-dskerrs,dskerr3-dskerrs 0 00004D66 5494 db dskerr4-dskerrs,dskerr9-dskerrs 0 00004D68 6570 db dskerr6-dskerrs,dskerr7-dskerrs 0 00004D6A 8394 db dskerr8-dskerrs,dskerr9-dskerrs 0 00004D6C A2AE db dskerra-dskerrs,dskerrb-dskerrs 0 00004D6E B9 db dskerrc-dskerrs 0 00004D6F 57726974652070726F dskerr0: asciz "Write protect error" 0 00004D78 74656374206572726F 0 00004D81 7200 0 00004D83 556E6B6E6F776E2075 dskerr1: asciz "Unknown unit error" 0 00004D8C 6E6974206572726F72 0 00004D95 00 0 00004D96 4472697665206E6F74 dskerr2: asciz "Drive not ready" 0 00004D9F 20726561647900 0 00004DA6 556E6B6E6F776E2063 dskerr3: asciz "Unknown command" 0 00004DAF 6F6D6D616E6400 0 00004DB6 44617461206572726F dskerr4: asciz "Data error (CRC)" 0 00004DBF 7220284352432900 0 00004DC7 5365656B206572726F dskerr6: asciz "Seek error" 0 00004DD0 7200 0 00004DD2 556E6B6E6F776E206D dskerr7: asciz "Unknown media type" 0 00004DDB 656469612074797065 0 00004DE4 00 0 00004DE5 536563746F72206E6F dskerr8: asciz "Sector not found" 0 00004DEE 7420666F756E6400 0 00004DF6 556E6B6E6F776E2065 dskerr9: asciz "Unknown error" 0 00004DFF 72726F7200 0 00004E04 577269746520666175 dskerra: asciz "Write fault" 0 00004E0D 6C7400 0 00004E10 52656164206661756C dskerrb: asciz "Read fault" 0 00004E19 7400 0 00004E1B 47656E6572616C2066 dskerrc: asciz "General failure" 0 00004E24 61696C75726500 0 00004E2B 207265616400 reading: asciz " read" 0 00004E31 207772697400 writing: asciz " writ" 0 00004E37 696E67206472697665 drive: db "ing drive " 0 00004E40 20 0 00004E41 5F00 driveno: asciz "_" 1825 %endif 0 00004E43 383038362F383800 msg8088: asciz "8086/88" 0 00004E4B 78383600 msgx86: asciz "x86" 0 00004E4F 20776974686F757420 no_copr: asciz " without coprocessor" 0 00004E58 636F70726F63657373 0 00004E61 6F7200 0 00004E64 207769746820636F70 has_copr: asciz " with coprocessor" 0 00004E6D 726F636573736F7200 0 00004E76 207769746820323837 has_287: asciz " with 287" 0 00004E7F 00 0 00004E80 7472616365206D6F64 tmodes: db "trace mode is " 0 00004E89 6520697320 0 00004E8E 5F202D20696E746572 tmodev: asciz "_ - interrupts are " 0 00004E97 727570747320617265 0 00004EA0 2000 0 00004EA2 74726163656400 tmode1: asciz "traced" 0 00004EA9 70726F636573736564 tmode0: asciz "processed" 0 00004EB2 00 0 00004EB3 2028756E7573656429 unused: asciz " (unused)" 0 00004EBC 00 1836 needsmsg: 0 00004EBD 5B6E6565647320 .: db "[needs " 1838 .digit_x_ofs: equ $ - . 0 00004EC4 7838 db "x8" 1840 .digit_6_ofs: equ $ - . 0 00004EC6 365D db "6]" 1842 needsmsg_L: equ $-needsmsg 0 00004EC8 5B6E65656473206D61 needsmath: db "[needs math coprocessor]" 0 00004ED1 746820636F70726F63 0 00004EDA 6573736F725D 1844 needsmath_L: equ $-needsmath 0 00004EE0 5B6F62736F6C657465 obsolete: db "[obsolete]" 0 00004EE9 5D 1846 obsolete_L: equ $-obsolete 0 00004EEA 446976696465206572 int0msg: asciz "Divide error",13,10 0 00004EF3 726F720D0A00 0 00004EF9 556E65787065637465 int1msg: asciz "Unexpected single-step interrupt",13,10 0 00004F02 642073696E676C652D 0 00004F0B 7374657020696E7465 0 00004F14 72727570740D0A00 0 00004F1C 556E65787065637465 int3msg: asciz "Unexpected breakpoint interrupt",13,10 0 00004F25 6420627265616B706F 0 00004F2E 696E7420696E746572 0 00004F37 727570740D0A00 1850 %if _CATCHINT06 0 00004F3E 496E76616C6964206F int6msg: asciz "Invalid opcode",13,10 0 00004F47 70636F64650D0A00 1852 %endif 1853 %if _CATCHINT08 0 00004F4F 446574656374656420 int8msg: asciz "Detected Control pressed for a while",13,10 0 00004F58 436F6E74726F6C2070 0 00004F61 72657373656420666F 0 00004F6A 722061207768696C65 0 00004F73 0D0A00 0 00004F76 446574656374656420 int8_kbd_msg: asciz "Detected Control pressed for a while (Keyboard enabled)",13,10 0 00004F7F 436F6E74726F6C2070 0 00004F88 72657373656420666F 0 00004F91 722061207768696C65 0 00004F9A 20284B6579626F6172 0 00004FA3 6420656E61626C6564 0 00004FAC 290D0A00 1856 runint_ctrlc_msg: 0 00004FB0 446574656374656420 asciz "Detected double Control-C via serial",13,10 0 00004FB9 646F75626C6520436F 0 00004FC2 6E74726F6C2D432076 0 00004FCB 69612073657269616C 0 00004FD4 0D0A00 1858 %endif 1859 %if _CATCHINT07 1860 int7msg: asciz "No x87 present",13,10 1861 %endif 1862 %if _CATCHINT0C 0 00004FD7 537461636B20666175 int0Cmsg: asciz "Stack fault (in R86M)",13,10 0 00004FE0 6C742028696E205238 0 00004FE9 364D290D0A00 1864 %endif 1865 %if _CATCHINT0D 0 00004FEF 47656E6572616C2070 int0Dmsg: asciz "General protection fault (in R86M)",13,10 0 00004FF8 726F74656374696F6E 0 00005001 206661756C74202869 0 0000500A 6E205238364D290D0A 0 00005013 00 1867 %endif 1868 %if _CATCHINT18 || _LOADER 0 00005014 4469736B6C65737320 int18msg: asciz "Diskless boot hook called",13,10 0 0000501D 626F6F7420686F6F6B 0 00005026 2063616C6C65640D0A 0 0000502F 00 1870 %endif 1871 %if _CATCHINT19 || _LOADER 0 00005030 426F6F74206C6F6164 int19msg: asciz "Boot load called",13,10 0 00005039 2063616C6C65640D0A 0 00005042 00 1873 %endif 1874 %if _CATCHSYSREQ 1875 sysreqmsg: asciz "SysReq detected",13,10 1876 %endif 1877 %if _PM 1878 %if _CATCHEXC06 1879 exc6msg: asciz "Invalid opcode fault",13,10 1880 %endif 1881 %if _CATCHEXC0C 1882 excCmsg: asciz "Stack fault",13,10 1883 %endif 1884 excDmsg: asciz "General protection fault",13,10 1885 %endif 1886 %if _PM || _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 1887 %if _EXCCSIP 0 00005043 43533A49503D excloc: db "CS:IP=" 0 00005049 202020203A20202020 exccsip: asciz " : ",13,10 0 00005052 0D0A00 1890 %endif 1891 %if _AREAS 1892 msg.area_hh_indirection_memory_access: 0 00005055 45787072657373696F asciz "Expression indirection fault: " 0 0000505E 6E20696E6469726563 0 00005067 74696F6E206661756C 0 00005070 743A2000 1894 msg.area_rr_variable_read_access: 0 00005074 4D656D6F7279207661 asciz "Memory variable read access fault: " 0 0000507D 726961626C65207265 0 00005086 616420616363657373 0 0000508F 206661756C743A2000 1896 msg.area_rr_variable_write_access: 0 00005098 4D656D6F7279207661 asciz "Memory variable write access fault: " 0 000050A1 726961626C65207772 0 000050AA 697465206163636573 0 000050B3 73206661756C743A20 0 000050BC 00 1898 msg.area_uu_referenced_memory_access: 0 000050BD 0D0A44697361737365 asciz 13,10,"Disassembly referenced memory fault: " 0 000050C6 6D626C792072656665 0 000050CF 72656E636564206D65 0 000050D8 6D6F7279206661756C 0 000050E1 743A2000 1900 msg.area_uu_simulate_scas: 0 000050E5 446973617373656D62 asciz "Disassembly SCAS simulation fault: " 0 000050EE 6C7920534341532073 0 000050F7 696D756C6174696F6E 0 00005100 206661756C743A2000 1902 msg.area_uu_simulate_cmps: 0 00005109 446973617373656D62 asciz "Disassembly CMPS simulation fault: " 0 00005112 6C7920434D50532073 0 0000511B 696D756C6174696F6E 0 00005124 206661756C743A2000 1904 msg.area_aa_access: 0 0000512D 417373656D626C7920 asciz "Assembly fault: " 0 00005136 6661756C743A2000 1906 msg.area_dd_access: 0 0000513E 44756D702064617461 asciz "Dump data fault: " 0 00005147 206661756C743A2000 1908 msg.area_ee_interactive_access: 0 00005150 0D0A db 13,10 1910 msg.area_ee_access: 0 00005152 456E74657220646174 asciz "Enter data fault: " 0 0000515B 61206661756C743A20 0 00005164 00 1912 msg.area_rr_access: 0 00005165 526567697374657220 asciz "Register command fault: " 0 0000516E 636F6D6D616E642066 0 00005177 61756C743A2000 1914 msg.area_sss_access: 0 0000517E 53656172636820636F asciz "Search command fault: " 0 00005187 6D6D616E6420666175 0 00005190 6C743A2000 1916 msg.area_run_access: 0 00005195 52756E20636F6D6D61 asciz "Run command fault: " 0 0000519E 6E64206661756C743A 0 000051A7 2000 1918 msg.area_uu_access: 0 000051A9 446973617373656D62 asciz "Disassembly fault: " 0 000051B2 6C79206661756C743A 0 000051BB 2000 1920 %endif 1921 %endif 1922 %if _PM 1923 excEmsg: asciz "Page fault",13,10 1924 %if _BREAK_INSTALLDPMI 1925 installdpmimsg: asciz "Entered Protected Mode",13,10 1926 %endif 1927 nodosext: asciz "Command not supported in protected mode without a DOS extender",13,10 1928 nopmsupp: asciz "Command not supported in protected mode",13,10 1929 %if _DISPHOOK 1930 dpmihook: db "DPMI entry hooked, new entry=" 1931 dpmihookcs: db "____:" 1932 %ifn _LINK 1933 db _4digitshex(mydpmientry+DATASECTIONFIXUP) 1934 %else 1935 wlcalc dword_itoa_2_00_10h 1936 dd mydpmientry 1937 %endif 1938 asciz 13,10 1939 %if _DEBUG 1940 dpmihookamis: asciz "DPMI entry hooked by other debugger with AMIS callout",13,10 1941 %endif 1942 %endif 1943 msg.dpmi_no_hook: asciz "DPMI entry cannot be hooked!",13,10 1944 nodesc: asciz "resource not accessible in real mode",13,10 1945 ;descwrong: asciz "descriptor not accessible",13,10 1946 msg.msdos: asciz "MS-DOS" 1947 descriptor: db "---- base=" 1948 .base: db "-------- limit=" 1949 .limit: db "-------- attr=" 1950 .attrib: db "----",13,10 1951 asciz 1952 %endif ; _PM 0 000051BD 4572726F7220696E20 ph_msg: asciz "Error in sequence of calls to hack.",13,10 0 000051C6 73657175656E636520 0 000051CF 6F662063616C6C7320 0 000051D8 746F206861636B2E0D 0 000051E1 0A00 1954 0 000051E3 0D0A50726F6772616D progtrm: db 13,10,"Program terminated normally (" 0 000051EC 207465726D696E6174 0 000051F5 6564206E6F726D616C 0 000051FE 6C792028 0 00005202 5F5F5F5F290D0A00 progexit: asciz "____)",13,10 1957 %if _APPLICATION || _DEVICE 0 0000520A 45584520616E642048 nowhexe: asciz "EXE and HEX files cannot be written",13,10 0 00005213 45582066696C657320 0 0000521C 63616E6E6F74206265 0 00005225 207772697474656E0D 0 0000522E 0A00 0 00005230 43616E6E6F74207772 nownull: asciz "Cannot write: no file name given",13,10 0 00005239 6974653A206E6F2066 0 00005242 696C65206E616D6520 0 0000524B 676976656E0D0A00 0 00005253 4572726F7220696E20 msg.hexerror: asciz "Error in HEX file",13,10 0 0000525C 4845582066696C650D 0 00005265 0A00 0 00005267 57726974696E672000 wwmsg1: asciz "Writing " 0 00005270 2062797465730D0A00 wwmsg2: asciz " bytes",13,10 0 00005279 4469736B2066756C6C diskful: asciz "Disk full",13,10 0 00005282 0D0A00 0 00005285 4572726F7220 openerr: db "Error " 0 0000528B 5F5F5F5F206F70656E openerr1: asciz "____ opening file",13,10 0 00005294 696E672066696C650D 0 0000529D 0A00 0 0000529F 46696C65206E6F7420 doserr2: asciz "File not found",13,10 0 000052A8 666F756E640D0A00 0 000052B0 50617468206E6F7420 doserr3: asciz "Path not found",13,10 0 000052B9 666F756E640D0A00 0 000052C1 416363657373206465 doserr5: asciz "Access denied",13,10 0 000052CA 6E6965640D0A00 0 000052D1 496E73756666696369 doserr8: asciz "Insufficient memory",13,10 0 000052DA 656E74206D656D6F72 0 000052E3 790D0A00 0 000052E7 496E76616C69642066 doserr11: asciz "Invalid format",13,10 0 000052F0 6F726D61740D0A00 1971 %endif 1972 1973 %if _EMS 1974 %define dw_emserr dw 1975 %include "xxmsg.asm" 1976 %endif 1977 1978 align 4, db 0 1979 flagbits: 0 000052F8 000800040002800040 .: dw 800h,400h,200h, 80h,040h,010h,004h,001h 0 00005301 00100004000100 1981 .amount: equ ($ - .) / 2 0 00005308 4F56444E45494E475A flagson: dw "OV","DN","EI","NG","ZR","AC","PE","CY" 0 00005311 52414350454359 0 00005318 4E5655504449504C4E flagsoff: dw "NV","UP","DI","PL","NZ","NA","PO","NC" 0 00005321 5A4E41504F4E43 0 00005328 4F464446494653465A flagnames: dw "OF","DF","IF","SF","ZF","AF","PF","CF" 0 00005331 46414650464346 1985 %if _REGSREADABLEFLAGS 0 00005338 4F314431493153315A flagson_style23:dw "O1","D1","I1","S1","Z1","A1","P1","C1" 0 00005341 31413150314331 0 00005348 4F304430493053305A flagsoff_style2:dw "O0","D0","I0","S0","Z0","A0","P0","C0" 0 00005351 30413050304330 0 00005358 4F5F445F495F535F5A flagsoff_style3:dw "O_","D_","I_","S_","Z_","A_","P_","C_" 0 00005361 5F415F505F435F 1989 %endif 1990 %if _40COLUMNS 1991 flagbits_for_40: equ 1____0____0____1____1____0____0____1b 1992 flagbits_for_80: equ 1____1____1____1____1____1____1____1b 1993 flagbits_for_shl: equ 16 - flagbits.amount 1994 1995 align 2, db 0 1996 shortflagbits: 0 00005368 00040002 .: dw 400h, 200h 1998 .amount: equ ($ - .) / 2 0 0000536C 44204520 shortflagson: dw "D ", "E " 0 00005370 55204420 shortflagsoff: dw "U ", "D " 2001 %endif 2002 2003 align 4, db 0 2004 table_length_keywords: 0 00005374 1E00[390E] dw 30, msg.gib 0 00005378 1400[3D0E] dw 20, msg.mib 0 0000537C 0A00[410E] dw 10, msg.kib 0 00005380 0900[450E] dw 9, msg.pages 0 00005384 0400[4B0E] dw 4, msg.paragraphs 0 00005388 0400[560E] dw 4, msg.paras 0 0000538C 0300[5C0E] dw 3, msg.qwords 0 00005390 0200[630E] dw 2, msg.dwords 0 00005394 0100[640E] dw 1, msg.words 0 00005398 0000[6A0E] dw 0, msg.bytes ; end of table, shift count zero 2015 0 0000539C 01 flagvaron: db 1 0 0000539D 00 flagvaroff: db 0 ; must be directly behind flagvaron 2018 2019 %if _COND 0 0000539E 6E6F7420 msg.condnotjump:db "not " 0 000053A2 6A756D70696E6700 msg.condjump: asciz "jumping" 2022 %endif 2023 0 000053AA 206D6174636865730D msg.matches: asciz " matches",13,10 0 000053B3 0A00 2025 0 000053B5 00 align 4, db 0 0 000053B8 414C4148424C424843 reg8names: dw "AL","AH","BL","BH","CL","CH","DL","DH" 0 000053C1 4C4348444C4448 2028 ; Even entries are xL registers, odd ones the xH ones. 2029 ; Order matches that of the first four regs entries. 2030 0 000053C8 415842584358445853 reg16names: dw "AX","BX","CX","DX","SP","BP","SI","DI" 0 000053D1 50425053494449 0 000053D8 445345535353435346 dw "DS","ES","SS","CS","FS","GS","IP","FL" 0 000053E1 5347534950464C 2033 ; 32-bit registers are the first eight and last two entries of 2034 ; reg16names with 'E', which are all non-segment registers. 2035 ; Segment registers can be detected by the 'S' as second letter. 2036 ; FS and GS are the fourth- and third-to-last entries. 2037 ; Order matches that of the sixteen regs entries. 2038 2039 %if _LOADER 2040 ; struc MOVETABLEENTRY moved to debug.mac 2041 2042 align 2, db 0 2043 movetable: ; used both as a table and as an array 2044 .bottom: 2045 dw msg.bottom 2046 dw 0 2047 dw msg.isbottom 2048 dw moveloader.already 2049 dw moveloader.top_to_bottom 2050 dw moveloader.hidden_to_bottom 2051 2052 dw msg.top 2053 dw 1 2054 dw msg.istop 2055 dw moveloader.bottom_to_top 2056 dw moveloader.already 2057 dw moveloader.hidden_to_top 2058 2059 dw msg.hidden 2060 dw 2 2061 dw msg.ishidden 2062 dw moveloader.bottom_to_hidden 2063 dw moveloader.top_to_hidden 2064 dw moveloader.already 2065 2066 dw 0 2067 2068 align 2, db 0 2069 movesegrefstable: 2070 dw code_seg 2071 %if _MESSAGESEGMENT 2072 dw messageseg 2073 %endif 2074 %if _EXTENSIONS 2075 dw extseg 2076 %endif 2077 %if _APP_ENV_SIZE || _DEV_ENV_SIZE || _BOOT_ENV_SIZE 2078 dw envseg 2079 %endif 2080 dw alloc_seg 2081 dw auxbuff_segorsel 2082 dw pspdbg 2083 %if _HISTORY && _HISTORY_SEPARATE_FIXED 2084 dw history.segorsel 2085 %endif 2086 %if _HELP_COMPRESSED && ! _PM && _MESSAGESEGMENT 2087 dw hshrink_memory_source.segment 2088 %endif 2089 dw 0 2090 %endif ; !_LOADER 2091 2092 2093 ; Table of recognised default (unsigned) types. 2094 ; 2095 ; If any number of characters match, use the type. 2096 ; If an additional "S" is found in front of a valid 2097 ; type, the type is set to signed. (Word and byte 2098 ; types are sign-extended to a dword value.) 2099 ; 2100 ; Each odd entry is an alternative name for the even 2101 ; entry preceding it. 2102 types: 0 000053E8 0442595445 countedb "BYTE" ; ("B" is hexadecimal) 0 000053ED 0443484152 countedb "CHAR" ; ("C" is hexadecimal, "CH" is a register) 0 000053F2 04574F5244 countedb "WORD" 0 000053F7 0553484F5254 countedb "SHORT" ; (signed "SS" is a register) 0 000053FD 053342595445 countedb "3BYTE" ; ("3" and "3B" are numeric) 0 00005403 053342595445 countedb "3BYTE" 0 00005409 0544574F5244 countedb "DWORD" ; ("D" is hexadecimal) 0 0000540F 044C4F4E47 countedb "LONG" 2111 .addresses: 0 00005414 07504F494E544552 countedb "POINTER" 0 0000541C 03505452 countedb "PTR" 0 00005420 064F4646534554 countedb "OFFSET" 0 00005427 034F4653 countedb "OFS" 0 0000542B 075345474D454E54 countedb "SEGMENT" 2117 .end: 2118 .addresses_minus_end equ (.addresses - .end) & 0FFFFh 2119 2120 ;maxtypesize equ 7 ; size of "SEGMENT" and "POINTER" 2121 ; moved to debug.mac === Trace listing source: ../lst/debug.obj/pmdata.lst 1 2 %if 0 3 4 lDebugX PM data 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 "pmdata.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00005433 ???????? eldhSignature: resb 4 ; "ELD1" 0 00005437 ?????? resb 3 ; reserved 0 0000543A ?? resb 1 ; 26 (Ctrl-Z) 0 0000543B ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000543F ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00005441 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00005443 ???????? eldhDataOffset: resd 1 0 00005447 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00005449 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000544B ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000544D ???????? eldhReserved: resb 4 ; reserved 0 00005451 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00005453 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00005457 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000545B ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000545F ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00005433 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000543B ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000543F ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00005441 ???? 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 0 00005433 ???? 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 0 00005435 ???? eldltAmount: resw 1 0 00005437 ???????? 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 0 00005433 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00005435 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00005437 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00005439 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000543B ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00005443 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00005433 ???? eldlSignature: resw 1 ; 0E1D1h 0 00005435 ???????? eldlReserved: resw 2 0 00005439 ???? eldlUseLinkHash: resw 1 0 0000543B ???? eldlDataAmount: resw 1 0 0000543D ???? eldlDataPrefixes: resw 1 0 0000543F ???? eldlDataEntries: resw 1 0 00005441 ???? eldlDataAddresses: resw 1 0 00005443 ???? eldlCodeAmount: resw 1 0 00005445 ???? eldlCodePrefixes: resw 1 0 00005447 ???? eldlCodeEntries: resw 1 0 00005449 ???? 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 0 00005433 ???? ifKeyword: resw 1 0 00005435 ???? ifDescription: resw 1 0 00005437 ???? ifOptions: resw 1 0 00005439 ???? ifValue: resw 1 0 0000543B ???? ifTrying: resw 1 0 0000543D ???? 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 0 00005433 ???????? saOffset: resd 1 0 00005437 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00005433 ???? so16aOffset: resw 1 0 00005435 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00005433 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00005433 ?????? bsJump: resb 3 0 00005436 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00005433 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00005435 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00005436 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00005438 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00005439 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000543B ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000543D ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000543E ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00005440 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00005442 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00005444 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00005448 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 0000544C ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00005450 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00005452 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00005454 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00005458 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 0000545A ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00005433 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00005434 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00005435 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00005436 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00005445 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00005433 ???????????????? deName: resb 8 0 0000543B ?????? deExt: resb 3 0 0000543E ?? deAttrib: resb 1 0 0000543F ?? dePlusSize: resb 1 0 00005440 ?????????????? resb 7 0 00005447 ???? deClusterHigh: resw 1 0 00005449 ???? deTime: resw 1 0 0000544B ???? deDate: resw 1 0 0000544D ???? deClusterLow: resw 1 0 0000544F ???????? 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 0 100005423 ???????? lsvFirstCluster: resd 1 0 100005427 ???????? lsvFATSector: resd 1 0 10000542B ???? lsvFATSeg: resw 1 0 10000542D ???? lsvLoadSeg: resw 1 0 10000542F ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100005413 ???? ldMemoryTop: resw 1 0 100005415 ???? ldLoadTop: resw 1 0 100005417 ???? ldSectorSeg: resw 1 0 100005419 ?? ldFATType: resb 1 92 <2> ldFlags: 0 10000541A ?? ldHasLBA: resb 1 0 10000541B ???? ldClusterSize: resw 1 0 10000541D ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 10000541F ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100005421 ?? .partition: resb 1 ; byte 0 100005422 ?? .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 <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 0 100005403 ???????? ldRootSector: resd 1 0 100005407 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 100005409 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 10000540B ???? ldParasLeft: resw 1 0 10000540D ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000053F3 ???????? ldMaxCluster: resd 1 0 1000053F7 ???????? ldFileSize: resd 1 0 1000053FB ???????? ldCurrentCluster: resd 1 0 1000053FF ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00005433 ???????? liiSignature: resb 4 ; "NLDR" 0 00005437 ???? liiVersion: resb 2 ; "00" 0 00005439 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000543B ???? liiAmountParagraphs: resw 1 0 0000543D ???????????? liiReserved: resw 3 0 00005443 ???? 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 0 00005445 ???? 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 0 00005447 ???? 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 0 00005449 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00005433 ???? lpSize: resw 1 0 00005435 ???? lpCount: resw 1 0 00005437 ???????? lpBuffer: resd 1 0 0000543B ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00005433 ?? piBoot: resb 1 0 00005434 ?????? piStartCHS: resb 3 0 00005437 ?? piType: resb 1 0 00005438 ?????? piEndCHS: resb 3 0 0000543B ???????? piStart: resd 1 0 0000543F ???????? 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 0 00005433 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00005435 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00005437 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00005439 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000543B ???? lsOptions: resw 1 ; option flags 0 0000543D ???? lsSegment: resw 1 ; => where to load file 0 0000543F ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00005443 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00005447 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00005449 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 0000544B ???????????????? 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 0 00005433 ???? exact_struc_at 00h, exeSignature: resw 1 0 00005435 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00005437 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00005439 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000543B ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 0000543D ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 0000543F ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00005441 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00005443 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00005445 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00005447 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00005449 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 0000544B ???? 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. 0 0000544D ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00005433 ???? ifhHandle: resw 1 0 00005435 ???? ifhFlags: resw 1 0 00005437 ???????? 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 <1> areastrucEntry: resb 24 0 0000544B ???????? areastrucNext: resd 1 0 0000544F ???????? areastrucPrev: resd 1 0 00005453 ???? areastrucSubAmount: resw 1 0 00005455 ???? areastrucSubOffset: resw 1 0 00005457 ???? areastrucFunAmount: resw 1 0 00005459 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00005433 ???????? areastrucsubLinear: resd 1 0 00005437 ???????? areastrucsubLinearEnd: resd 1 0 0000543B ???? areastrucsubListOffset: resw 1 0 0000543D ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00005433 ???????? areastrucfunLinear: resd 1 0 00005437 ???????? areastrucfunLinearEnd: resd 1 0 0000543B ???? areastrucfunListOffset: resw 1 0 0000543D ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00005433 ???? areastart: resw 1 0 00005435 ???? areaend: resw 1 0 00005437 ???? areamessage: resw 1 0 00005439 ???? 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 0 00005433 ???? 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.) 0 00005435 ???? ivFlags: resw 1 0 00005437 ???? 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. 0 00005439 ???? 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 0 0000543B ?? 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. 0 0000543C ?? 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 0 00005433 ???????? mrLinear: resd 1 0 00005437 ???????? mrOffset: resd 1 0 0000543B ???? mrSegmentSelector: resw 1 0 0000543D ???? mrFlags: resw 1 0 0000543F ???????? 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 0 00005433 ???????? .size_: resd 1 0 00005437 ???? .srchdl: resw 1 0 00005439 ???????? .srcadr: resd 1 0 0000543D ???? .dsthdl: resw 1 0 0000543F ???????? .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 %endif 21 22 23 %if !_LINK || _PM 24 usesection lDEBUG_DATA_ENTRY 25 %if _LINK_COMPAT 26 align 16, db 0 27 %endif 28 29 align 4, db 0 30 dpmientry: dd 0 ; DPMI entry point returned by DPMI host 31 dpmiwatch: dd 0 32 dpmi_rm2pm: dd 0 33 dpmi_rmsav: dd 0 34 dpmi_pm2rm: dw 0,0,0 35 dpmi_pmsav: dw 0,0,0 36 align 2, db 0 37 dssel: dw 0 ; debugger's (16-bit RW) data selector 38 cssel: dw 0 ; debugger's (16-bit RE) code selector 39 scratchsel: dw 0 ; scratch selector used for various purposes, limit -1 40 %if _SYMBOLIC 41 symsel1: dw 0 ; selector used to access symbol table access slices 42 symsel2: dw 0 ; another selector used to access symbol table 43 %endif 44 %if _IMMASM 45 immsel: dw 0 ; selector for immasm 46 %endif 47 dpmi32: db 0 ; 32-bit client if true 48 bCSAttr: db 0 ; current code attribute (D bit) 49 align 2, db 0 50 bAddr32: db 0 ; Address attribute. if 1, hiword(edx) is valid 51 db 0 ; read/written when bAddr32 is pushed/popped 52 53 54 align 2, db 0 55 convsegs: 56 .: 57 dw pInDOS + so16aSegSel 58 %if _USESDA 59 dw pSDA + so16aSegSel 60 %endif 61 dw auxbuff_segorsel + soaSegSel 62 %if _HISTORY_SEPARATE_FIXED && _HISTORY 63 dw history.segorsel + soaSegSel 64 %endif 65 .end_fixed: 66 .amount_fixed: equ (.end_fixed - .) / 2 67 dw a_addr + saSegSel 68 dw d_addr + saSegSel 69 dw e_addr + saSegSel 70 .end: 71 .amount: equ (.end - .) / 2 72 73 exctab: 74 %if _CATCHEXC00 75 db 00h 76 %endif 77 %if _CATCHEXC01 78 db 01h 79 %endif 80 %if _CATCHEXC03 81 db 03h 82 %endif 83 %if _CATCHEXC06 84 db 06h 85 %endif 86 %if _CATCHEXC0C 87 db 0Ch 88 %endif 89 %if _CATCHEXC0D 90 db 0Dh 91 %endif 92 %if _CATCHEXC0E 93 db 0Eh 94 %endif 95 endexctab: 96 97 %if _CATCHPMINT214C || _DEBUG || _TSR || _DEVICE 98 align 8, db 0 99 excsave: 100 .: 101 %if _CATCHEXC00 102 dw -1,-1,-1,0 ; 0 103 %endif 104 %if _CATCHEXC01 105 dw -1,-1,-1,0 ; 1 106 %endif 107 %if _CATCHEXC03 108 dw -1,-1,-1,0 ; 3 109 %endif 110 %if _CATCHEXC06 111 dw -1,-1,-1,0 ; 6 112 %endif 113 %if _CATCHEXC0C 114 dw -1,-1,-1,0 ; 0C 115 %endif 116 %if _CATCHEXC0D 117 dw -1,-1,-1,0 ; 0D 118 %endif 119 %if _CATCHEXC0E 120 dw -1,-1,-1,0 ; 0E 121 %endif 122 .end: 123 .amount: equ (.end - .) / 8 124 125 %if .amount != (endexctab - exctab) 126 %error Wrong excsave length 127 %endif 128 %endif 129 130 %if CATCHPMINTAMOUNT 131 pminttab: 132 .: 133 %if _CATCHPMINT214C 134 db 21h 135 dw pmint21 136 %endif 137 %if _CATCHPMINT41 138 db 41h 139 dw pmint41 140 %endif 141 .end: 142 .amount: equ (.end - .) / 3 143 144 align 8, db 0 145 pmintsave: 146 .: 147 %if _CATCHPMINT214C 148 .int21: dw -1,-1,-1,0 149 %endif 150 %if _CATCHPMINT41 151 .int41: dw -1,-1,-1,0 152 %endif 153 .end: 154 .amount: equ (.end - .) / 8 155 %endif 156 %endif === Trace listing source: ../lst/debug.obj/pmentry.lst 1 2 %if 0 3 4 lDebugX PM entrypoints 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 "pmentry.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00005433 ???????? eldhSignature: resb 4 ; "ELD1" 0 00005437 ?????? resb 3 ; reserved 0 0000543A ?? resb 1 ; 26 (Ctrl-Z) 0 0000543B ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000543F ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00005441 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00005443 ???????? eldhDataOffset: resd 1 0 00005447 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00005449 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000544B ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000544D ???????? eldhReserved: resb 4 ; reserved 0 00005451 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00005453 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00005457 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000545B ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000545F ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00005433 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000543B ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000543F ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00005441 ???? 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 0 00005433 ???? 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 0 00005435 ???? eldltAmount: resw 1 0 00005437 ???????? 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 0 00005433 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00005435 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00005437 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00005439 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000543B ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00005443 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00005433 ???? eldlSignature: resw 1 ; 0E1D1h 0 00005435 ???????? eldlReserved: resw 2 0 00005439 ???? eldlUseLinkHash: resw 1 0 0000543B ???? eldlDataAmount: resw 1 0 0000543D ???? eldlDataPrefixes: resw 1 0 0000543F ???? eldlDataEntries: resw 1 0 00005441 ???? eldlDataAddresses: resw 1 0 00005443 ???? eldlCodeAmount: resw 1 0 00005445 ???? eldlCodePrefixes: resw 1 0 00005447 ???? eldlCodeEntries: resw 1 0 00005449 ???? 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 0 00005433 ???? ifKeyword: resw 1 0 00005435 ???? ifDescription: resw 1 0 00005437 ???? ifOptions: resw 1 0 00005439 ???? ifValue: resw 1 0 0000543B ???? ifTrying: resw 1 0 0000543D ???? 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 0 00005433 ???????? saOffset: resd 1 0 00005437 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00005433 ???? so16aOffset: resw 1 0 00005435 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00005433 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00005433 ?????? bsJump: resb 3 0 00005436 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00005433 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00005435 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00005436 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00005438 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00005439 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000543B ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000543D ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000543E ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00005440 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00005442 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00005444 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00005448 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 0000544C ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00005450 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00005452 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00005454 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00005458 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 0000545A ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00005433 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00005434 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00005435 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00005436 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00005445 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00005433 ???????????????? deName: resb 8 0 0000543B ?????? deExt: resb 3 0 0000543E ?? deAttrib: resb 1 0 0000543F ?? dePlusSize: resb 1 0 00005440 ?????????????? resb 7 0 00005447 ???? deClusterHigh: resw 1 0 00005449 ???? deTime: resw 1 0 0000544B ???? deDate: resw 1 0 0000544D ???? deClusterLow: resw 1 0 0000544F ???????? 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 0 100005423 ???????? lsvFirstCluster: resd 1 0 100005427 ???????? lsvFATSector: resd 1 0 10000542B ???? lsvFATSeg: resw 1 0 10000542D ???? lsvLoadSeg: resw 1 0 10000542F ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100005413 ???? ldMemoryTop: resw 1 0 100005415 ???? ldLoadTop: resw 1 0 100005417 ???? ldSectorSeg: resw 1 0 100005419 ?? ldFATType: resb 1 92 <2> ldFlags: 0 10000541A ?? ldHasLBA: resb 1 0 10000541B ???? ldClusterSize: resw 1 0 10000541D ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 10000541F ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100005421 ?? .partition: resb 1 ; byte 0 100005422 ?? .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 <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 0 100005403 ???????? ldRootSector: resd 1 0 100005407 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 100005409 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 10000540B ???? ldParasLeft: resw 1 0 10000540D ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000053F3 ???????? ldMaxCluster: resd 1 0 1000053F7 ???????? ldFileSize: resd 1 0 1000053FB ???????? ldCurrentCluster: resd 1 0 1000053FF ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00005433 ???????? liiSignature: resb 4 ; "NLDR" 0 00005437 ???? liiVersion: resb 2 ; "00" 0 00005439 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000543B ???? liiAmountParagraphs: resw 1 0 0000543D ???????????? liiReserved: resw 3 0 00005443 ???? 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 0 00005445 ???? 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 0 00005447 ???? 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 0 00005449 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00005433 ???? lpSize: resw 1 0 00005435 ???? lpCount: resw 1 0 00005437 ???????? lpBuffer: resd 1 0 0000543B ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00005433 ?? piBoot: resb 1 0 00005434 ?????? piStartCHS: resb 3 0 00005437 ?? piType: resb 1 0 00005438 ?????? piEndCHS: resb 3 0 0000543B ???????? piStart: resd 1 0 0000543F ???????? 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 0 00005433 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00005435 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00005437 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00005439 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000543B ???? lsOptions: resw 1 ; option flags 0 0000543D ???? lsSegment: resw 1 ; => where to load file 0 0000543F ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00005443 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00005447 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00005449 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 0000544B ???????????????? 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 0 00005433 ???? exact_struc_at 00h, exeSignature: resw 1 0 00005435 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00005437 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00005439 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000543B ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 0000543D ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 0000543F ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00005441 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00005443 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00005445 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00005447 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00005449 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 0000544B ???? 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. 0 0000544D ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00005433 ???? ifhHandle: resw 1 0 00005435 ???? ifhFlags: resw 1 0 00005437 ???????? 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 <1> areastrucEntry: resb 24 0 0000544B ???????? areastrucNext: resd 1 0 0000544F ???????? areastrucPrev: resd 1 0 00005453 ???? areastrucSubAmount: resw 1 0 00005455 ???? areastrucSubOffset: resw 1 0 00005457 ???? areastrucFunAmount: resw 1 0 00005459 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00005433 ???????? areastrucsubLinear: resd 1 0 00005437 ???????? areastrucsubLinearEnd: resd 1 0 0000543B ???? areastrucsubListOffset: resw 1 0 0000543D ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00005433 ???????? areastrucfunLinear: resd 1 0 00005437 ???????? areastrucfunLinearEnd: resd 1 0 0000543B ???? areastrucfunListOffset: resw 1 0 0000543D ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00005433 ???? areastart: resw 1 0 00005435 ???? areaend: resw 1 0 00005437 ???? areamessage: resw 1 0 00005439 ???? 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 0 00005433 ???? 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.) 0 00005435 ???? ivFlags: resw 1 0 00005437 ???? 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. 0 00005439 ???? 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 0 0000543B ?? 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. 0 0000543C ?? 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 0 00005433 ???????? mrLinear: resd 1 0 00005437 ???????? mrOffset: resd 1 0 0000543B ???? mrSegmentSelector: resw 1 0 0000543D ???? mrFlags: resw 1 0 0000543F ???????? 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 0 00005433 ???????? .size_: resd 1 0 00005437 ???? .srchdl: resw 1 0 00005439 ???????? .srcadr: resd 1 0 0000543D ???? .dsthdl: resw 1 0 0000543F ???????? .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 %endif 21 22 23 %if !_LINK || _PM 24 usesection lDEBUG_DATA_ENTRY 25 %if _LINK_COMPAT 26 align 4, db 0 27 %endif 28 29 subcpu 286 30 31 %if _CATCHPMINT214C 32 pmint21: 33 cmp ah, 4Ch 34 jne .next 35 push ds 36 mov ds, word [cs:dssel] 37 38 _386_o32 39 pusha 40 push es 41 42 ; Some code (particularly d4message) may expect us to 43 ; run on the debugger's stack, to access the data 44 ; segment. Therefore, switch stacks. 45 mov dx, ds ; dx = ds = debugger data selector 46 mov ax, ss 47 _386_o32 ; mov ebx, esp 48 mov bx, sp ; ax:(e)bx = stack to restore 49 50 cmp dx, ax ; special case: already on our stack ? 51 je @F ; yes, avoid stack switch --> 52 53 _386_o32 ; mov ecx, dword [run_sp] 54 mov cx, word [run_sp] ; dx:(e)cx = our stack 55 mov ss, dx 56 %ifn _ONLYNON386 57 ..@patch_no386_ds_entry_pmint21_1: ; (as for the other case in run.asm 58 ; insure to set sp directly after ss) 59 o32 ; mov esp, ecx 60 %endif 61 mov sp, cx ; switch to our stack 62 63 @@: 64 push ax 65 _386_o32 ; push ebx 66 push bx ; save original stack, far pointer 67 68 push cs 69 call .transfer ; ! this function assumes a 16-bit stack 70 71 .back: 72 _386_o32 73 pop bx 74 pop ax ; ax:(e)bx = original stack 75 mov ss, ax 76 %ifn _ONLYNON386 77 ..@patch_no386_ds_entry_pmint21_2: ; (as for the other case above 78 ; insure to set sp directly after ss) 79 o32 ; mov esp, ebx 80 %endif 81 mov sp, bx ; return to user stack 82 83 pop es 84 _386_o32 85 popa 86 87 pop ds 88 .next: 89 _386_o32 90 jmp far [cs:pmintsave.int21] 91 92 .transfer: 93 call entry_to_code_sel ; ! this function assumes a 16-bit stack 94 dw pmint21_4C_code 95 96 97 usesection lDEBUG_CODE 98 99 code_insure_low_byte_not_0CCh 100 pmint21_4C_code: 101 mov byte [pm_2_86m_0], 2 102 setopt [internalflags], protectedmode 103 104 105 ; remember that we cannot access Protected Mode any longer 106 ; (also clear modeswitched flag so resetmode is a no-op) 107 clropt [internalflags], canswitchmode | switchbuffer | modeswitched 108 109 mov cx, word [auxbuff_switchbuffer_size] 110 jcxz .no_switchbuffer_size_change 111 mov es, word [auxbuff_segorsel + soaSelector] 112 xor di, di ; es:di -> auxbuff switchbuffer 113 mov al, 32 114 rep stosb ; fill with blanks (for WHILE) 115 ; The auxbuff is no longer used for WHILE 116 ; conditions but fill this space anyway. 117 .no_switchbuffer_size_change: 118 and word [auxbuff_switchbuffer_size], 0 119 120 push ss 121 pop es 122 123 call pm_reset_handlers 124 125 retf ; jump to cssel:pmint21.next 126 %endif 127 128 129 usesection lDEBUG_DATA_ENTRY 130 131 %if _CATCHPMINT41 132 pmint41: 133 cmp ax, 4Fh 134 je .is4F 135 _386_o32 136 jmp far [cs:pmintsave.int41] 137 138 .is4F: 139 mov ax, 0F386h 140 cmp byte [cs:dpmi32], 0 141 je .iret16 142 o32 143 .iret16: 144 iret 145 %endif 146 147 148 struc exceptionframe16 149 resw 8 ; pusha 150 fr16_ds: resw 1 ; push ds 151 resw 2 ; 16-bit return address to DPMI host 152 resw 1 ; error code 153 fr16_ip: resw 1 154 fr16_cs: resw 1 155 fr16_fl: resw 1 156 fr16_sp: resw 1 157 fr16_ss: resw 1 158 endstruc 159 160 struc exceptionframe32 161 resd 8 ; pushad 162 resw 1 ; stack alignment 163 fr32_ds: resw 1 ; push ds 164 resd 2 ; 32-bit return address to DPMI host 165 resd 1 ; error code 166 fr32_eip: resd 1 167 fr32_cs: resd 1 168 fr32_efl: resd 1 169 fr32_esp: resd 1 170 fr32_ss: resd 1 171 endstruc 172 173 %assign EXC_ENTRY_FIRST 1 174 %macro exc_entry 2.nolist 175 %ifn EXC_ENTRY_FIRST 176 jmp strict short exc 177 %endif 178 exc %+ %1 %+ : 179 push ds 180 push %2 181 %if EXC_ENTRY_FIRST 182 exc_second: equ $ + 2 ; + 2 for short jump 183 %endif 184 %assign EXC_ENTRY_FIRST 0 185 %endmacro 186 187 align 2, db 0 188 ; Exception handlers. 189 ; These are the entry into the debugger in protected mode. 190 ; The address difference between exc_first and exc_second 191 ; is assumed to be the same for all the entries. This is 192 ; above, in installdpmi, as well as in run.asm run. These 193 ; are where the exception handlers are installed. 194 195 exc_first: 196 %if _CATCHEXC00 197 exc_entry 00, int0msg 198 %endif 199 %if _CATCHEXC01 200 exc_entry 01, int1msg 201 %endif 202 %if _CATCHEXC03 203 exc_entry 03, int3msg 204 %endif 205 %if _CATCHEXC06 206 exc_entry 06, exc6msg 207 %endif 208 %if _CATCHEXC0C 209 exc_entry 0C, excCmsg 210 %endif 211 %if _CATCHEXC0D 212 exc_entry 0D, excDmsg 213 %endif 214 %if _CATCHEXC0E 215 exc_entry 0E, excEmsg 216 %endif 217 exc: 218 mov ds, word [cs:dssel] 219 220 align 4, nop 221 patcharea_pm_exc: 222 .: times 32 nop 223 .end: 224 .size equ .end - . 225 .segment equ pspdbg 226 227 pop word [run_int] 228 ; done after patch area so stack is aligned to dword boundary. 229 230 %ifn _PM_ENTRY_SECTION 231 times 1 - (($ - $$) & 1) nop ; align in-code parameter 232 call entry_to_code_sel 233 dw exc_code 234 235 numdef OVERRIDE_BUILD_PM_ENTRY_STACK, 0 236 %if ! _OVERRIDE_BUILD_PM_ENTRY_STACK 237 %fatal Cannot build DEBUGX: exception handler assumes 16-bit stack 238 %endif 239 240 241 usesection lDEBUG_CODE 242 243 code_insure_low_byte_not_0CCh 244 exc_code: 245 %else 246 exc_entry_section: 247 %endif 248 cmp byte [dpmi32], 0 249 jz exc16 250 251 [cpu 386] 252 exc32: 253 push ax ; stack alignment 254 pushad 255 %if _DEBUG_PM_ENTRY 256 inc dword [ debug_pm_entry_total ] 257 mov eax, esp 258 shr eax, 16 259 test ax, ax 260 jz @F 261 inc dword [ debug_pm_entry_esph ] 262 @@: 263 mov ebx, ss 264 xor eax, eax ; use rights = 0 if inaccessible 265 lar eax, ebx ; access rights 266 ; eax is unchanged if the access rights are inaccessible 267 ; (and NZ is set in that case) 268 test eax, 400000h ; test bit (NC) 269 jz @F 270 inc dword [ debug_pm_entry_b ] 271 @@: 272 %endif 273 mov ebp, esp 274 mov eax, dword [ ebp + fr32_eip ] 275 mov bx, word [ ebp + fr32_cs ] 276 mov ecx, dword [ ebp + fr32_efl ] 277 mov edx, dword [ ebp + fr32_esp ] 278 mov si, word [ ebp + fr32_ss ] 279 %if _PM_ENTRY_SECTION 280 push word [code_sel] 281 pop word [ ebp + fr32_cs ] 282 %else 283 mov word [ ebp + fr32_cs ], cs 284 %endif 285 mov word [ ebp + fr32_ss ], ds 286 cmp byte [ bInDbg ], 0 ; did the exception occur inside DEBUG? 287 je @F ; no --> 288 289 ; inside debugger 290 %if _EXCCSIP || _AREAS 291 mov word [exception_csip], ax 292 mov word [exception_csip + 2], bx 293 ; render CS:IP if internal GPF 294 %if _AREAS 295 push es 296 push ds 297 pop es 298 cld 299 xchg si, dx ; si -> stack 300 mov di, exception_stack 301 mov cx, 8 302 rep movsb ; preserve 4 words 303 pop es 304 %endif 305 %endif 306 mov dword [ ebp + fr32_eip ], debuggerexception 307 movzx eax, word [ savesp ] 308 mov dword [ ebp + fr32_esp ], eax 309 clropt [ ebp + fr32_efl ], 100h ; reset TF 310 jmp short @FF 311 312 @@: ; inside debuggee 313 mov byte [pm_2_86m_0], 2 314 setopt [internalflags], protectedmode 315 %if _PM_ENTRY_SECTION && _RUN_ENTRY_SECTION 316 mov dword [ ebp + fr32_eip ], intrtn2_entry 317 mov word [ ebp + fr32_cs ], cs 318 %elif !_PM_ENTRY_SECTION && _RUN_ENTRY_SECTION 319 mov dword [ ebp + fr32_eip ], intrtn2_entry 320 push word [cssel] 321 pop word [ ebp + fr32_cs ] 322 %elif _PM_ENTRY_SECTION && !_RUN_ENTRY_SECTION 323 mov dword [ ebp + fr32_eip ], intrtn2_code 324 %elif !_PM_ENTRY_SECTION && !_RUN_ENTRY_SECTION 325 mov dword [ ebp + fr32_eip ], intrtn2_code 326 %endif 327 328 clropt [ ebp + fr32_efl ], 300h ; reset IF + TF 329 mov dword [ ebp + fr32_esp ], reg_ss 330 mov dword [ reg_eip ], eax 331 mov word [ reg_cs ], bx 332 ; mov dword [ reg_efl ], ecx ; (eflh is saved in intrtn2_code) 333 mov word [ reg_efl ], cx 334 mov dword [ reg_esp ], edx 335 mov word [ reg_ss ], si 336 push word [ ebp + fr32_ds ] 337 pop word [ reg_ds ] 338 339 @@: 340 popad 341 pop ax ; stack alignment 342 pop ds 343 o32 retf 344 345 __CPU__ 346 exc16: 347 pusha 348 mov bp, sp 349 mov ax, word [ bp + fr16_ip ] 350 mov bx, word [ bp + fr16_cs ] 351 mov cx, word [ bp + fr16_fl ] 352 mov dx, word [ bp + fr16_sp ] 353 mov si, word [ bp + fr16_ss ] 354 %if _PM_ENTRY_SECTION 355 push word [code_sel] 356 pop word [ bp + fr16_cs ] 357 %else 358 mov word [ bp + fr16_cs ], cs 359 %endif 360 mov word [ bp + fr16_ss ], ds 361 cmp byte [ bInDbg ], 0 ; did the exception occur inside DEBUG? 362 je isdebuggee16 363 %if _EXCCSIP || _AREAS 364 mov word [exception_csip], ax 365 mov word [exception_csip + 2], bx 366 ; render CS:IP if internal GPF 367 %if _AREAS 368 push es 369 push ds 370 pop es 371 cld 372 xchg si, dx ; si -> stack 373 mov di, exception_stack 374 mov cx, 8 375 rep movsb ; preserve 4 words 376 pop es 377 %endif 378 %endif 379 mov word [ bp + fr16_ip ], debuggerexception 380 mov ax, word [ savesp ] 381 mov word [ bp + fr16_sp ], ax 382 clropt [ bp + fr16_fl ], 100h ; reset TF 383 jmp short isdebugger16 384 isdebuggee16: 385 mov byte [pm_2_86m_0], 2 386 setopt [internalflags], protectedmode 387 %if _PM_ENTRY_SECTION && _RUN_ENTRY_SECTION 388 mov word [ bp + fr16_ip ], intrtn2_entry 389 mov word [ bp + fr16_cs ], cs 390 %elif !_PM_ENTRY_SECTION && _RUN_ENTRY_SECTION 391 mov word [ bp + fr16_ip ], intrtn2_entry 392 push word [cssel] 393 pop word [ bp + fr16_cs ] 394 %elif _PM_ENTRY_SECTION && !_RUN_ENTRY_SECTION 395 mov word [ bp + fr16_ip ], intrtn2_code 396 %elif !_PM_ENTRY_SECTION && !_RUN_ENTRY_SECTION 397 mov word [ bp + fr16_ip ], intrtn2_code 398 %endif 399 clropt [ bp + fr16_fl ], 300h ; reset IF + TF 400 mov word [ bp + fr16_sp ], reg_ss 401 mov word [ reg_eip ], ax 402 mov word [ reg_cs ], bx 403 mov word [ reg_efl ], cx 404 mov word [ reg_esp ], dx 405 mov word [ reg_ss ], si 406 push word [ bp + fr16_ds ] 407 pop word [ reg_ds ] 408 isdebugger16: 409 popa 410 pop ds 411 retf 412 413 414 usesection lDEBUG_DATA_ENTRY 415 416 i23pm: 417 %if 1 418 push ds 419 mov ds, word [cs:dssel] 420 setopt [serial_flags], sf_ctrl_c 421 pop ds 422 %endif 423 cmp byte [ cs:dpmi32 ], 0 ; ! always NC 424 je .retfw_2 425 [cpu 386] 426 retfd 4 ; (NC) 427 __CPU__ 428 .retfw_2: 429 retfw 2 ; (NC) 430 431 i24pm: 432 mov al, 03h ; fail 433 cmp byte [ cs:dpmi32 ], 0 434 je .iret16 435 o32 ; iretd 436 .iret16: 437 iret 438 439 subcpureset 440 %endif === Trace listing source: ../lst/debug.obj/pminit.lst 1 2 %if 0 3 4 lDebugX PM initialisation 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 "pminit.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00005433 ???????? eldhSignature: resb 4 ; "ELD1" 0 00005437 ?????? resb 3 ; reserved 0 0000543A ?? resb 1 ; 26 (Ctrl-Z) 0 0000543B ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000543F ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00005441 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00005443 ???????? eldhDataOffset: resd 1 0 00005447 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00005449 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000544B ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000544D ???????? eldhReserved: resb 4 ; reserved 0 00005451 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00005453 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00005457 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000545B ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000545F ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00005433 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000543B ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000543F ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00005441 ???? 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 0 00005433 ???? 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 0 00005435 ???? eldltAmount: resw 1 0 00005437 ???????? 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 0 00005433 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00005435 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00005437 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00005439 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000543B ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00005443 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00005433 ???? eldlSignature: resw 1 ; 0E1D1h 0 00005435 ???????? eldlReserved: resw 2 0 00005439 ???? eldlUseLinkHash: resw 1 0 0000543B ???? eldlDataAmount: resw 1 0 0000543D ???? eldlDataPrefixes: resw 1 0 0000543F ???? eldlDataEntries: resw 1 0 00005441 ???? eldlDataAddresses: resw 1 0 00005443 ???? eldlCodeAmount: resw 1 0 00005445 ???? eldlCodePrefixes: resw 1 0 00005447 ???? eldlCodeEntries: resw 1 0 00005449 ???? 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 0 00005433 ???? ifKeyword: resw 1 0 00005435 ???? ifDescription: resw 1 0 00005437 ???? ifOptions: resw 1 0 00005439 ???? ifValue: resw 1 0 0000543B ???? ifTrying: resw 1 0 0000543D ???? 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 0 00005433 ???????? saOffset: resd 1 0 00005437 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00005433 ???? so16aOffset: resw 1 0 00005435 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00005433 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00005433 ?????? bsJump: resb 3 0 00005436 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00005433 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00005435 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00005436 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00005438 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00005439 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000543B ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000543D ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000543E ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00005440 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00005442 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00005444 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00005448 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 0000544C ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00005450 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00005452 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00005454 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00005458 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 0000545A ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00005433 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00005434 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00005435 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00005436 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00005445 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00005433 ???????????????? deName: resb 8 0 0000543B ?????? deExt: resb 3 0 0000543E ?? deAttrib: resb 1 0 0000543F ?? dePlusSize: resb 1 0 00005440 ?????????????? resb 7 0 00005447 ???? deClusterHigh: resw 1 0 00005449 ???? deTime: resw 1 0 0000544B ???? deDate: resw 1 0 0000544D ???? deClusterLow: resw 1 0 0000544F ???????? 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 0 100005423 ???????? lsvFirstCluster: resd 1 0 100005427 ???????? lsvFATSector: resd 1 0 10000542B ???? lsvFATSeg: resw 1 0 10000542D ???? lsvLoadSeg: resw 1 0 10000542F ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100005413 ???? ldMemoryTop: resw 1 0 100005415 ???? ldLoadTop: resw 1 0 100005417 ???? ldSectorSeg: resw 1 0 100005419 ?? ldFATType: resb 1 92 <2> ldFlags: 0 10000541A ?? ldHasLBA: resb 1 0 10000541B ???? ldClusterSize: resw 1 0 10000541D ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 10000541F ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100005421 ?? .partition: resb 1 ; byte 0 100005422 ?? .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 <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 0 100005403 ???????? ldRootSector: resd 1 0 100005407 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 100005409 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 10000540B ???? ldParasLeft: resw 1 0 10000540D ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000053F3 ???????? ldMaxCluster: resd 1 0 1000053F7 ???????? ldFileSize: resd 1 0 1000053FB ???????? ldCurrentCluster: resd 1 0 1000053FF ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00005433 ???????? liiSignature: resb 4 ; "NLDR" 0 00005437 ???? liiVersion: resb 2 ; "00" 0 00005439 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000543B ???? liiAmountParagraphs: resw 1 0 0000543D ???????????? liiReserved: resw 3 0 00005443 ???? 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 0 00005445 ???? 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 0 00005447 ???? 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 0 00005449 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00005433 ???? lpSize: resw 1 0 00005435 ???? lpCount: resw 1 0 00005437 ???????? lpBuffer: resd 1 0 0000543B ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00005433 ?? piBoot: resb 1 0 00005434 ?????? piStartCHS: resb 3 0 00005437 ?? piType: resb 1 0 00005438 ?????? piEndCHS: resb 3 0 0000543B ???????? piStart: resd 1 0 0000543F ???????? 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 0 00005433 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00005435 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00005437 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00005439 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000543B ???? lsOptions: resw 1 ; option flags 0 0000543D ???? lsSegment: resw 1 ; => where to load file 0 0000543F ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00005443 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00005447 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00005449 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 0000544B ???????????????? 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 0 00005433 ???? exact_struc_at 00h, exeSignature: resw 1 0 00005435 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00005437 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00005439 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000543B ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 0000543D ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 0000543F ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00005441 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00005443 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00005445 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00005447 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00005449 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 0000544B ???? 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. 0 0000544D ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00005433 ???? ifhHandle: resw 1 0 00005435 ???? ifhFlags: resw 1 0 00005437 ???????? 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 <1> areastrucEntry: resb 24 0 0000544B ???????? areastrucNext: resd 1 0 0000544F ???????? areastrucPrev: resd 1 0 00005453 ???? areastrucSubAmount: resw 1 0 00005455 ???? areastrucSubOffset: resw 1 0 00005457 ???? areastrucFunAmount: resw 1 0 00005459 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00005433 ???????? areastrucsubLinear: resd 1 0 00005437 ???????? areastrucsubLinearEnd: resd 1 0 0000543B ???? areastrucsubListOffset: resw 1 0 0000543D ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00005433 ???????? areastrucfunLinear: resd 1 0 00005437 ???????? areastrucfunLinearEnd: resd 1 0 0000543B ???? areastrucfunListOffset: resw 1 0 0000543D ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00005433 ???? areastart: resw 1 0 00005435 ???? areaend: resw 1 0 00005437 ???? areamessage: resw 1 0 00005439 ???? 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 0 00005433 ???? 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.) 0 00005435 ???? ivFlags: resw 1 0 00005437 ???? 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. 0 00005439 ???? 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 0 0000543B ?? 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. 0 0000543C ?? 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 0 00005433 ???????? mrLinear: resd 1 0 00005437 ???????? mrOffset: resd 1 0 0000543B ???? mrSegmentSelector: resw 1 0 0000543D ???? mrFlags: resw 1 0 0000543F ???????? 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 0 00005433 ???????? .size_: resd 1 0 00005437 ???? .srchdl: resw 1 0 00005439 ???????? .srcadr: resd 1 0 0000543D ???? .dsthdl: resw 1 0 0000543F ???????? .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 %endif 21 22 23 %if !_LINK || _PM 24 usesection lDEBUG_DATA_ENTRY 25 26 ; Int2F handler. Starts with an IISP header. 27 align 2, db 0 28 iispentry debug2F, 0, debug2F 29 oldi2F: equ debug2F.next 30 pushf 31 cmp ax, 1687h 32 dpmidisable: ; set this byte to __TEST_IMM8 to disable new DPMI entry 33 je short dpmiquery 34 popf 35 jumpoldi2F: 36 jmp far [ cs:oldi2F ] 37 38 dpmiquery: 39 push cs 40 call jumpoldi2F 41 test ax, ax 42 jnz .nohost 43 44 mov word [ cs:dpmientry+0 ], di 45 mov word [ cs:dpmientry+2 ], es 46 mov di, mydpmientry 47 push cs 48 pop es 49 .nohost: 50 iret 51 52 mydpmientry: 53 mov byte [ cs:dpmi32 ], 0 54 test al, 1 55 jz .16 56 inc byte [ cs:dpmi32 ] 57 .16: 58 call far [ cs:dpmientry ] 59 jnc installdpmi 60 debug2F.hwreset: 61 retf 62 63 64 subcpu 286 65 installdpmi: 66 pusha 67 mov bp, sp ; [bp+16]=ip, [bp+18]=cs 68 pushf 69 push ds 70 push es 71 72 mov bx, cs 73 mov ax, 0006h 74 int 31h 75 jc .fataldpmierr ; get base address of cs 76 test dl, 15 77 jnz .fataldpmierr 78 test cx, 0FFF0h 79 jnz .fataldpmierr 80 shr dx, 4 81 shl cx, 12 82 or dx, cx 83 cmp word [cs:pspdbg], dx 84 jne .fataldpmierr 85 86 mov bx, cs 87 mov ax, 000Ah ; get a data descriptor for DEBUG's segment 88 int 31h 89 jc .fataldpmierr 90 mov ds, ax 91 mov word [ cssel ], cs 92 mov word [ dssel ], ax 93 94 clropt [internalflags3], dif3_ss_b_bit_set 95 mov bx, ax ; bx = debugger ss/ds selector 96 lar cx, bx ; ch = access rights 97 jnz .fataldpmierr 98 shr cx, 8 ; get format for 31.0009 call 99 testopt [options3], opt3_ss_b_bit_set 100 jz @F 101 setopt [internalflags3], dif3_ss_b_bit_set 102 mov ch, 40h ; set B bit if requested 103 @@: 104 mov ax, 0009h 105 int 31h ; set or clear B bit 106 jc .fataldpmierr 107 108 mov cx, 1 ; allocate code_sel selector 109 xor ax, ax 110 int 31h 111 jc .fataldpmierr 112 mov word [ code_sel ], ax 113 mov bx, ax 114 xor cx, cx 115 or dx, -1 ; cx:dx = 0FFFFh 116 mov ax, 0008h 117 int 31h ; set limit 64 KiB 118 jc .fataldpmierr 119 lar cx, word [ cssel ] ; get access rights/type of cs 120 jnz .fataldpmierr 121 shr cx, 8 ; proper format for 31.0009 122 ; high byte zero (16-bit and byte-granular selector) 123 mov ax, 0009h 124 int 31h ; set descriptor access rights/type 125 jc .fataldpmierr 126 127 mov dx, word [ code_seg ] 128 mov cx, dx 129 shl dx, 4 130 shr cx, 12 131 mov ax, 0007h 132 int 31h ; set selector base to code segment's base 133 134 %if _EXTENSIONS 135 mov cx, 1 ; allocate extcssel selector 136 xor ax, ax 137 int 31h 138 jc .fataldpmierr 139 mov word [ extcssel ], ax 140 mov bx, ax 141 xor cx, cx 142 or dx, -1 ; cx:dx = 0FFFFh 143 mov ax, 0008h 144 int 31h ; set limit 64 KiB 145 jc .fataldpmierr 146 lar cx, word [ cssel ] ; get access rights/type of cs 147 jnz .fataldpmierr 148 shr cx, 8 ; proper format for 31.0009 149 ; high byte zero (16-bit and byte-granular selector) 150 mov ax, 0009h 151 int 31h ; set descriptor access rights/type 152 jc .fataldpmierr 153 154 mov dx, word [ extseg ] 155 mov cx, dx 156 shl dx, 4 157 shr cx, 12 158 mov ax, 0007h 159 int 31h ; set selector base to ext segment's base 160 161 push cx 162 push dx 163 164 mov cx, 1 ; allocate extdssel selector 165 xor ax, ax 166 int 31h 167 jc .fataldpmierr 168 mov word [ extdssel ], ax 169 mov bx, ax 170 xor cx, cx 171 or dx, -1 ; cx:dx = 0FFFFh 172 mov ax, 0008h 173 int 31h ; set limit 64 KiB 174 jc .fataldpmierr 175 176 pop dx 177 pop cx 178 mov ax, 0007h 179 int 31h ; set selector base to ext segment's base 180 181 mov ax, ds ; bx = debugger ss/ds selector 182 lar cx, ax ; ch = access rights 183 jnz .fataldpmierr 184 shr cx, 8 ; get format for 31.0009 call 185 mov ax, 0009h 186 int 31h ; clear B bit 187 %endif 188 189 call entry_to_code_sel 190 dw installdpmi_code 191 192 .fataldpmierr: 193 mov ax, 4CFFh 194 int 21h 195 196 197 usesection lDEBUG_CODE 198 199 code_insure_low_byte_not_0CCh 200 installdpmi_code: 201 _386 push ebx 202 _386 push edx 203 ; Some code (particularly d4message) may expect us to 204 ; run on the debugger's stack, to access the data 205 ; segment. Therefore, switch stacks. 206 mov dx, ds ; dx = ds = debugger data selector 207 mov ax, ss 208 _386_o32 ; mov ebx, esp 209 mov bx, sp ; ax:bx = stack to restore 210 mov ss, dx 211 %ifn _ONLYNON386 212 ..@patch_no386_ds_4: ; (insure to set sp directly after ss) 213 o32 ; mov esp, dword [run_sp] 214 %endif 215 mov sp, [run_sp] ; switch to our stack 216 217 push ax 218 _386_o32 ; push ebx 219 push bx ; save original stack, far pointer 220 221 mov byte [pm_2_86m_0], 2 222 setopt [internalflags], protectedmode 223 224 d4 call d4message 225 d4 asciz "In installdpmi_code",13,10 226 227 mov cx, 2 + !!_DUALCODE + !!_IMMASM + 2 * !!_SYMBOLIC + !!_MESSAGESEGMENT 228 ; allocate some descriptors 229 xor ax, ax 230 int 31h 231 jc .fataldpmierr 232 233 d4 call d4message 234 d4 asciz "In installdpmi_code, allocated some descriptors",13,10 235 236 mov word [ scratchsel ], ax ; the first is used as scratch descriptor 237 mov bx, ax 238 xor cx, cx 239 %if 1 240 _386 dec cx ; set a limit of FFFFFFFFh if 386 241 %else 242 cmp byte [ dpmi32 ], 0 243 je .16 244 dec cx ; set a limit of FFFFFFFFh if 32-bit client 245 .16: 246 %endif 247 or dx, byte -1 248 mov ax, 0008h 249 int 31h 250 mov ax, 0003h 251 int 31h ; get selector increment 252 %if 0 253 jnc .03sup 254 mov ax, 8 255 .03sup: 256 %endif 257 xor cx, cx ; cx:dx = 0FFFFh 258 %if _SYMBOLIC 259 add bx, ax ; the second selector is used as symbol selector 260 mov word [symsel1], bx 261 push ax 262 mov ax, 0008h 263 int 31h ; set limit 0FFFFh (only used with di anyway) 264 pop ax 265 add bx, ax ; the third selector is used as another symbol selector 266 mov word [symsel2], bx 267 push ax 268 mov ax, 0008h 269 int 31h ; set limit 0FFFFh (only used with di anyway) 270 pop ax 271 %endif 272 %if _MESSAGESEGMENT 273 add bx, ax ; this is used as message selector 274 push dx 275 mov dx, word [messageseg] 276 call setrmaddr 277 pop dx 278 mov word [messagesel], bx 279 push ax 280 mov ax, 0008h 281 int 31h ; set limit 0FFFFh 282 pop ax 283 %endif 284 %if _DUALCODE 285 add bx, ax ; this selector is used as code2 sel 286 mov word [ code2_sel ], bx 287 push ax 288 mov ax, 0008h 289 int 31h ; set limit 64 KiB 290 jc .fataldpmierr 291 push cx 292 push dx ; preserve limit = 0FFFFh 293 lar cx, word [ cssel ] ; get access rights/type of cs 294 jnz .fataldpmierr 295 shr cx, 8 ; proper format for 31.0009 296 ; high byte zero (16-bit and byte-granular selector) 297 mov ax, 0009h 298 int 31h ; set descriptor access rights/type 299 jc .fataldpmierr 300 301 mov dx, word [ code2_seg ] 302 mov cx, dx 303 shl dx, 4 304 shr cx, 12 305 mov ax, 0007h 306 int 31h ; set selector base to code segment's base 307 pop dx 308 pop cx ; restore limit 309 pop ax 310 %endif 311 %if _IMMASM 312 add bx, ax 313 push ax 314 push cx 315 push dx 316 317 xor cx, cx 318 mov dx, immasm_length 319 mov ax, 0008h 320 int 31h 321 lar cx, word [ cssel ] 322 jnz .fataldpmierr 323 shr cx, 8 324 mov ax, 0009h 325 int 31h 326 327 mov dx, word [immseg] 328 call setrmaddr 329 mov word [immsel], bx 330 331 pop dx 332 pop cx 333 pop ax 334 %endif 335 add bx, ax ; the last selector is client's CS 336 ; (this limit is FFFFh even for 32-bits) 337 mov ax, 0008h 338 int 31h 339 340 _386_o32 341 pop dx ; pop preserved (e)sp 342 pop ax ; get client ss 343 mov es, ax 344 push ax ; preserve ss again 345 _386_o32 346 push dx ; preserve (e)sp again 347 348 mov dx, word [ es:bp+18 ] 349 ; get client's CS 350 call setrmaddr ; set base 351 lar cx, word [ cssel ] 352 jnz .fataldpmierr 353 shr cx, 8 ; CS remains 16-bit 354 mov ax, 0009h 355 int 31h 356 mov word [ es:bp+18 ], bx 357 358 cld 359 360 mov si, convsegs 361 mov cx, convsegs.amount_fixed 362 .loopseg: 363 d4 call d4message 364 d4 asciz "In installdpmi_code.loopseg",13,10 365 366 lodsw 367 mov di, ax 368 mov bx, word [di + soaSegment] 369 mov ax, 0002h 370 int 31h 371 jc .fataldpmierr 372 mov word [di + soaSelector], ax 373 loop .loopseg 374 375 d4 call d4message 376 d4 asciz "In installdpmi_code after .loopseg",13,10 377 378 _386 push edi 379 _386 xor edi, edi ; clear edih 380 clropt [internalflags], canswitchmode|switchbuffer 381 xor bp, bp 382 _386 inc bp 383 _386 inc bp 384 .save16: 385 mov ax, 0305h ; get raw mode-switch save state addresses 386 int 31h 387 jc .cannotswitch 388 %if _AUXBUFFSIZE == _AUXBUFFMAXSIZE 389 cmp ax, _AUXBUFFSIZE ; fits into auxbuff ? 390 %else 391 cmp ax, word [auxbuff_current_size] 392 %endif 393 ja .cannotswitch ; no --> 394 test ax, ax 395 jz .nobuffer 396 397 .switchbuffer_init: 398 push ax ; ax = target switchbuffer size 399 push bx 400 push cx 401 push si 402 push di ; preserve regs returned by fn 0305h 403 404 mov di, word [auxbuff_switchbuffer_size] 405 mov cx, di 406 sub cx, ax 407 je .no_switchbuffer_size_change 408 mov es, word [auxbuff_segorsel + soaSelector] 409 ja .fillblanks 410 411 neg cx ; = amount of bytes to move 412 413 .try_again: 414 mov si, word [auxbuff_behind_last_silent] 415 ; (auxbuff):di -> next buffer (if it fits) 416 %if _AUXBUFFSIZE == _AUXBUFFMAXSIZE 417 mov ax, _AUXBUFFSIZE 418 %else 419 mov ax, word [auxbuff_current_size] 420 %endif 421 sub ax, si ; number of bytes left free 422 cmp ax, cx ; fits ? 423 jae .simple ; yes --> 424 425 .delete: 426 call silence_delete_one_string.internal 427 jc .switchbuffer_error 428 jmp .try_again 429 430 .simple: 431 push ds 432 push si 433 ; -> behind used data minus start of auxbuff (0) 434 ; = how much to copy 435 dec si ; -> last used byte 436 mov di, si ; -> last used source byte 437 add di, cx ; -> destination of last byte 438 add word [auxbuff_behind_last_silent], cx 439 ; update silent pointer 440 %if _RH 441 add word [auxbuff_start_silent], cx 442 %endif 443 pop cx ; = how much to copy 444 std ; _AMD_ERRATUM_109_WORKAROUND as below 445 push es 446 pop ds 447 448 numdef AMD_ERRATUM_109_WORKAROUND, 1 449 ; Refer to comment in init.asm init_movp. 450 451 %if _AMD_ERRATUM_109_WORKAROUND 452 jcxz @FF 453 cmp cx, 20 454 ja @FF 455 @@: 456 movsb 457 loop @B 458 @@: 459 %endif 460 rep movsb ; copy up silent buffer 461 cld 462 463 pop ds 464 465 ; (fall through. cx is equal to zero here so the 466 ; rep stosb in .fillblanks is effectively a no-op.) 467 468 .fillblanks: 469 ; This isn't really supported but we'll do enough 470 ; to handle basic cases. WHILE conditions use the 471 ; switchbuffer size to find their stored condition. 472 ; So fill the additional space with blanks, which 473 ; WHILE condition parsing will happily eat up. 474 ; Update: No longer storing WHILE in auxbuff but 475 ; keep this around just in case. 476 mov al, 32 477 rep stosb 478 479 .no_switchbuffer_size_change: 480 db __TEST_IMM8 ; (skip stc, NC) 481 .switchbuffer_error: 482 stc 483 pop di 484 pop si 485 pop cx 486 pop bx ; restore returned registers 487 pop ax ; ax = target switchbuffer size 488 jc .cannotswitch 489 mov word [auxbuff_switchbuffer_size], ax 490 setopt [internalflags], switchbuffer 491 mov word [dpmi_rmsav+0], cx 492 mov word [dpmi_rmsav+2], bx 493 _386_o32 ; mov dword [dpmi_pmsav], edi 494 mov word [dpmi_pmsav], di 495 mov word [ds:bp+dpmi_pmsav+2], si 496 .nobuffer: 497 _386 xor edi, edi ; clear edih 498 mov ax, 0306h ; get raw mode-switch addresses 499 int 31h 500 jc .cannotswitch 501 setopt [internalflags], canswitchmode 502 mov word [dpmi_rm2pm+0], cx 503 mov word [dpmi_rm2pm+2], bx 504 _386_o32 ; mov dword [dpmi_pm2rm], edi 505 mov word [dpmi_pm2rm], di 506 mov word [ds:bp+dpmi_pm2rm+2], si 507 .cannotswitch: 508 _386 pop edi 509 510 _386 push eax 511 %if (_CATCHPMINT214C || _DEBUG) || 1 512 push es 513 push ds 514 pop es 515 %endif 516 517 %if CATCHEXCAMOUNT 518 mov si, exctab ; hook several exceptions 519 %if _CATCHPMINT214C || _DEBUG || _TSR || _DEVICE 520 mov di, excsave 521 %endif 522 _386 xor edx, edx ; clear edxh 523 mov dx, exc_first 524 .loopexc: 525 lodsb 526 d4 call d4message 527 d4 asciz "In installdpmi_code.loopexc, ax=" 528 d4 push ax 529 d4 call d4disp_stack_hex 530 d4 call d4message 531 d4 asciz 13,10 532 533 mov bl, al 534 %if _CATCHPMINT214C || _DEBUG || _TSR || _DEVICE 535 _386_o32 ; push edx 536 push dx ; preserve excXX pointer 537 mov ax, 0202h 538 ; (edxh is zero) 539 int 31h ; cx:(e)dx -> prior handler 540 _386_o32 ; xchg eax, edx 541 xchg ax, dx 542 _386_o32 ; stosd 543 stosw ; store offset (dword on 386+, else word) 544 xchg ax, cx 545 stosw ; store selector 546 mov ax, 4 547 sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 548 add di, ax ; -> next entry of excsave 549 _386_o32 ; pop edx 550 pop dx 551 %endif 552 mov cx, word [cssel] ; -> our handler for this exception 553 mov ax, 0203h 554 int 31h ; set our handler 555 %ifn _LINK 556 add dx, byte exc_second - exc_first 557 %else 558 add dx, strict byte 0 559 wlcalc byte_ext_exc_second, equ $ - 1 560 wlcalc byte_minusext_exc_first, equ $ - 1 561 %endif 562 ; -> next handler 563 cmp si, endexctab ; if another to go --> 564 jb .loopexc 565 %endif 566 567 %if CATCHPMINTAMOUNT 568 mov si, pminttab ; ds:si -> pminttab 569 mov di, pmintsave ; es:di -> pmintsave 570 .loopint: 571 lodsb ; get interrupt number 572 mov bl, al ; bl = interrupt number 573 _386 xor edx, edx ; clear edxh 574 mov ax, 0204h 575 int 31h ; cx:(e)dx -> prior handler 576 _386_o32 ; xchg eax, edx 577 xchg ax, dx ; (e)ax = offset 578 _386_o32 ; stosd 579 stosw ; store offset (dword on 386+, else word) 580 xchg ax, cx 581 stosw ; store selector 582 mov ax, 4 583 sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 584 add di, ax ; -> next entry of pmintsave 585 lodsw ; ax -> our handler 586 _386 xor edx, edx 587 xchg ax, dx ; (e)dx -> our handler 588 mov cx, word [cssel] ; cx:(e)dx -> our handler 589 mov ax, 0205h 590 int 31h 591 cmp si, pminttab.end 592 jb .loopint 593 %endif 594 595 %if (_CATCHPMINT214C || _DEBUG) || 1 596 pop es 597 %endif 598 _386 pop eax 599 600 mov si, convsegs 601 @@: 602 lodsw 603 xchg ax, di 604 push word [di + soaSelector] 605 pop word [di + soaSegSel] 606 cmp si, convsegs.end_fixed 607 jb @B 608 609 testopt [internalflags], hooked2F 610 jz .notours ; not currently hooked --> 611 612 mov al, 2Fh ; interrupt number 613 mov si, debug2F ; -> IISP entry header 614 mov dx, opt4_int_2F_force >> 16 615 call UnhookInterruptForce 616 ; try unhooking it 617 jnc .got2F 618 619 .not2F: 620 mov word [msg.serial_cannot_unhook.int], "2F" 621 mov dx, msg.serial_cannot_unhook 622 jmp @F 623 624 .got2F: 625 clropt [internalflags], hooked2F 626 clropt [internalflags4], dif4_int_2F_hooked 627 call update_inttab_optional 628 mov word [msg.serial_late_unhook.int], "2F" 629 mov dx, msg.serial_late_unhook 630 @@: 631 call putsz 632 .notours: 633 634 635 ; This is a bit silly: If we're never 636 ; entered in PM except for installdpmi 637 ; then the debugger thinks that the 638 ; SegSel fields should be segments. 639 ; It won't re-initialise them because 640 ; according to the flag used by run, 641 ; it was last running in 86 Mode. 642 ; So for now just hack them back. 643 mov si, convsegs 644 @@: 645 lodsw 646 xchg ax, di 647 push word [di + soaSegment] 648 pop word [di + soaSegSel] 649 cmp si, convsegs.end_fixed 650 jb @B 651 652 d4 call d4message 653 d4 asciz "In installdpmi_code end",13,10 654 655 _386_o32 ; pop ebx 656 pop bx 657 pop ax 658 mov ss, ax 659 %ifn _ONLYNON386 660 ..@patch_no386_ds_5: ; (insure to set sp directly after ss) 661 o32 ; mov esp, ebx 662 %endif 663 mov sp, bx ; return to user stack 664 665 _386 pop edx 666 _386 pop ebx 667 pop es 668 %if _BREAK_INSTALLDPMI 669 testopt [options3], opt3_break_installdpmi 670 jnz .break 671 %endif 672 pop ds 673 popf 674 popa 675 retf 676 677 %if _BREAK_INSTALLDPMI 678 .break: 679 cli 680 pop word [reg_ds] ; set client ds 681 pop word [reg_efl] ; set client fl 682 popa ; restore client GPRs 683 mov word [reg_eax], ax ; set client ax 684 mov ax, ds ; ax = entry/data selector 685 pop word [reg_eip] ; set client ip (intrtn_code clears eiph) 686 pop word [reg_cs] ; set client cs 687 mov word [run_int], installdpmimsg ; remember interrupt type 688 mov byte [pm_2_86m_0], 2 689 setopt [internalflags], protectedmode 690 %if _RUN_ENTRY_SECTION 691 push word [cssel] 692 push word intrtn_entry.from_installdpmi 693 o16 retf 694 %else 695 jmp intrtn_code.from_installdpmi 696 %endif 697 %endif 698 699 700 .fataldpmierr: 701 d4 call d4message 702 d4 asciz "In installdpmi_code.fataldpmierr",13,10 703 mov ax, 4CFFh 704 int 21h 705 706 subcpureset 707 %endif === Trace listing source: ../lst/debug.obj/rr.lst 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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00005434 ???????? eldhSignature: resb 4 ; "ELD1" 0 00005438 ?????? resb 3 ; reserved 0 0000543B ?? resb 1 ; 26 (Ctrl-Z) 0 0000543C ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00005440 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00005442 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00005444 ???????? eldhDataOffset: resd 1 0 00005448 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000544A ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000544C ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000544E ???????? eldhReserved: resb 4 ; reserved 0 00005452 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00005454 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00005458 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000545C ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00005460 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00005434 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000543C ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00005440 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00005442 ???? 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 0 00005434 ???? 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 0 00005436 ???? eldltAmount: resw 1 0 00005438 ???????? 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 0 00005434 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00005436 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00005438 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000543A ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000543C ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00005444 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00005434 ???? eldlSignature: resw 1 ; 0E1D1h 0 00005436 ???????? eldlReserved: resw 2 0 0000543A ???? eldlUseLinkHash: resw 1 0 0000543C ???? eldlDataAmount: resw 1 0 0000543E ???? eldlDataPrefixes: resw 1 0 00005440 ???? eldlDataEntries: resw 1 0 00005442 ???? eldlDataAddresses: resw 1 0 00005444 ???? eldlCodeAmount: resw 1 0 00005446 ???? eldlCodePrefixes: resw 1 0 00005448 ???? eldlCodeEntries: resw 1 0 0000544A ???? 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 0 00005434 ???? ifKeyword: resw 1 0 00005436 ???? ifDescription: resw 1 0 00005438 ???? ifOptions: resw 1 0 0000543A ???? ifValue: resw 1 0 0000543C ???? ifTrying: resw 1 0 0000543E ???? 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 0 00005434 ???????? saOffset: resd 1 0 00005438 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00005434 ???? so16aOffset: resw 1 0 00005436 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00005434 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00005434 ?????? bsJump: resb 3 0 00005437 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00005434 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00005436 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00005437 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00005439 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 0000543A ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000543C ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000543E ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000543F ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00005441 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00005443 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00005445 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00005449 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 0000544D ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00005451 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00005453 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00005455 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00005459 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 0000545B ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00005434 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00005435 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00005436 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00005437 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00005446 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00005434 ???????????????? deName: resb 8 0 0000543C ?????? deExt: resb 3 0 0000543F ?? deAttrib: resb 1 0 00005440 ?? dePlusSize: resb 1 0 00005441 ?????????????? resb 7 0 00005448 ???? deClusterHigh: resw 1 0 0000544A ???? deTime: resw 1 0 0000544C ???? deDate: resw 1 0 0000544E ???? deClusterLow: resw 1 0 00005450 ???????? 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 0 100005424 ???????? lsvFirstCluster: resd 1 0 100005428 ???????? lsvFATSector: resd 1 0 10000542C ???? lsvFATSeg: resw 1 0 10000542E ???? lsvLoadSeg: resw 1 0 100005430 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100005414 ???? ldMemoryTop: resw 1 0 100005416 ???? ldLoadTop: resw 1 0 100005418 ???? ldSectorSeg: resw 1 0 10000541A ?? ldFATType: resb 1 92 <2> ldFlags: 0 10000541B ?? ldHasLBA: resb 1 0 10000541C ???? ldClusterSize: resw 1 0 10000541E ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100005420 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100005422 ?? .partition: resb 1 ; byte 0 100005423 ?? .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 <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 0 100005404 ???????? ldRootSector: resd 1 0 100005408 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 10000540A ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 10000540C ???? ldParasLeft: resw 1 0 10000540E ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000053F4 ???????? ldMaxCluster: resd 1 0 1000053F8 ???????? ldFileSize: resd 1 0 1000053FC ???????? ldCurrentCluster: resd 1 0 100005400 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00005434 ???????? liiSignature: resb 4 ; "NLDR" 0 00005438 ???? liiVersion: resb 2 ; "00" 0 0000543A ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000543C ???? liiAmountParagraphs: resw 1 0 0000543E ???????????? liiReserved: resw 3 0 00005444 ???? 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 0 00005446 ???? 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 0 00005448 ???? 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 0 0000544A ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00005434 ???? lpSize: resw 1 0 00005436 ???? lpCount: resw 1 0 00005438 ???????? lpBuffer: resd 1 0 0000543C ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00005434 ?? piBoot: resb 1 0 00005435 ?????? piStartCHS: resb 3 0 00005438 ?? piType: resb 1 0 00005439 ?????? piEndCHS: resb 3 0 0000543C ???????? piStart: resd 1 0 00005440 ???????? 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 0 00005434 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00005436 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00005438 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 0000543A ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000543C ???? lsOptions: resw 1 ; option flags 0 0000543E ???? lsSegment: resw 1 ; => where to load file 0 00005440 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00005444 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00005448 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 0000544A ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 0000544C ???????????????? 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 0 00005434 ???? exact_struc_at 00h, exeSignature: resw 1 0 00005436 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00005438 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 0000543A ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000543C ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 0000543E ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00005440 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00005442 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00005444 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00005446 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00005448 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 0000544A ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 0000544C ???? 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. 0 0000544E ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00005434 ???? ifhHandle: resw 1 0 00005436 ???? ifhFlags: resw 1 0 00005438 ???????? 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 <1> areastrucEntry: resb 24 0 0000544C ???????? areastrucNext: resd 1 0 00005450 ???????? areastrucPrev: resd 1 0 00005454 ???? areastrucSubAmount: resw 1 0 00005456 ???? areastrucSubOffset: resw 1 0 00005458 ???? areastrucFunAmount: resw 1 0 0000545A ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00005434 ???????? areastrucsubLinear: resd 1 0 00005438 ???????? areastrucsubLinearEnd: resd 1 0 0000543C ???? areastrucsubListOffset: resw 1 0 0000543E ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00005434 ???????? areastrucfunLinear: resd 1 0 00005438 ???????? areastrucfunLinearEnd: resd 1 0 0000543C ???? areastrucfunListOffset: resw 1 0 0000543E ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00005434 ???? areastart: resw 1 0 00005436 ???? areaend: resw 1 0 00005438 ???? areamessage: resw 1 0 0000543A ???? 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 0 00005434 ???? 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.) 0 00005436 ???? ivFlags: resw 1 0 00005438 ???? 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. 0 0000543A ???? 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 0 0000543C ?? 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. 0 0000543D ?? 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 0 00005434 ???????? mrLinear: resd 1 0 00005438 ???????? mrOffset: resd 1 0 0000543C ???? mrSegmentSelector: resw 1 0 0000543E ???? mrFlags: resw 1 0 00005440 ???????? 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 0 00005434 ???????? .size_: resd 1 0 00005438 ???? .srchdl: resw 1 0 0000543A ???????? .srcadr: resd 1 0 0000543E ???? .dsthdl: resw 1 0 00005440 ???????? .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 0 00005434 ?? OPPREC_INVALID: resb 1 0 00005435 ?? OPPREC_COND: resb 1 0 00005436 ?? OPPREC_BOOL_OR: resb 1 0 00005437 ?? OPPREC_BOOL_XOR:resb 1 0 00005438 ?? OPPREC_BOOL_AND:resb 1 0 00005439 ?? OPPREC_COMPARE: resb 1 0 0000543A ?? OPPREC_BIT_OR: resb 1 0 0000543B ?? OPPREC_BIT_XOR: resb 1 0 0000543C ?? OPPREC_BIT_AND: resb 1 0 0000543D ?? OPPREC_BIT_CLR: resb 1 0 0000543E ?? OPPREC_SHIFT: resb 1 0 0000543F ?? OPPREC_ADDSUB: resb 1 0 00005440 ?? OPPREC_MULDIV: resb 1 0 00005441 ?? 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 0 00005434 ?? OPERATOR_INVALID: resb 1 ; 0 - invalid 0 00005435 ?? OPERATOR_PLUS: resb 1 ; + 0 00005436 ?? OPERATOR_MINUS: resb 1 ; - 0 00005437 ?? OPERATOR_MULTIPLY: resb 1 ; * 0 00005438 ?? OPERATOR_DIVIDE: resb 1 ; / 0 00005439 ?? OPERATOR_MODULO: resb 1 ; % 0 0000543A ?? OPERATOR_POWER: resb 1 ; ** 0 0000543B ?? OPERATOR_CMP_BELOW: resb 1 ; < 0 0000543C ?? OPERATOR_CMP_BELOW_EQUAL: resb 1 ; <= 0 0000543D ?? OPERATOR_CMP_ABOVE: resb 1 ; > 0 0000543E ?? OPERATOR_CMP_ABOVE_EQUAL: resb 1 ; >= 0 0000543F ?? OPERATOR_CMP_EQUAL: resb 1 ; == 0 00005440 ?? OPERATOR_CMP_NOT_EQUAL: resb 1 ; != 0 00005441 ?? OPERATOR_SHIFT_LEFT: resb 1 ; << 0 00005442 ?? OPERATOR_SHIFT_RIGHT: resb 1 ; >> 0 00005443 ?? OPERATOR_SHIFT_RIGHT_SIGNED: resb 1 ; >>> 0 00005444 ?? OPERATOR_BIT_MIRROR: resb 1 ; >< 0 00005445 ?? OPERATOR_BIT_CLR: resb 1 ; clr (bitwise AND with bitwise NOT) 0 00005446 ?? OPERATOR_BIT_OR: resb 1 ; | 0 00005447 ?? OPERATOR_BIT_XOR: resb 1 ; ^ 0 00005448 ?? OPERATOR_BIT_AND: resb 1 ; & 0 00005449 ?? OPERATOR_BOOL_OR: resb 1 ; || 0 0000544A ?? OPERATOR_BOOL_XOR: resb 1 ; ^^ 0 0000544B ?? OPERATOR_BOOL_AND: resb 1 ; && 0 0000544C ?? OPERATOR_COND: resb 1 ; ?? :: construct (special) 0 0000544D ?? 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 === Switch to base=00EDF0h -> "LDEBUG_CODE" 24 ------------------ note: usesection lDEBUG_CODE 25 26 ..@rr_access_start: 27 ; R command - dump and manipulate registers. 28 rr: 0 000080F6 E8[0000] call iseol? 30 %if _RH && !_LOADER 0 000080F9 750D jne @F 32 .r_and_terminate: 0 000080FB E83E08 call dumpregs 0 000080FE D006[0000] rol byte [in_re], 1 0 00008102 7203E9[0000] jnc terminate_silent_dump 0 00008107 C3 retn 37 @@: 38 %else 39 je dumpregs ; if no parameters --> 40 %endif 0 00008108 E8[0000] call capitalise 42 %if !_LOADER 0 0000810B 3C45 cmp al, 'E' 0 0000810D 7514 jne @F 45 0 0000810F 50 push ax 0 00008110 56 push si 0 00008111 AC lodsb 0 00008112 3C2E cmp al, '.' 0 00008114 7503E90506 je re_cmd 0 00008119 E8[0000] call iseol? 0 0000811C 5E pop si 0 0000811D 58 pop ax 0 0000811E 7503E95607 je dumpregs_extended 55 @@: 56 %endif 57 0 00008123 3C43 cmp al, 'C' 0 00008125 7514 jne @F 60 0 00008127 50 push ax 0 00008128 56 push si 0 00008129 AC lodsb 0 0000812A 3C2E cmp al, '.' 0 0000812C 7503E9E505 je rc_cmd 0 00008131 E8[0000] call iseol? 0 00008134 5E pop si 0 00008135 58 pop ax 0 00008136 7503E91F07 je rc_run 70 @@: 71 72 %if !_ONLYNON386 || (_OPTIONS || _VARIABLES) || (_MMXSUPP && _RM) || _RN 0 0000813B 4E dec si 0 0000813C 4E dec si 0 0000813D BA[0000] mov dx, msg.rvv 0 00008140 E8[0000] call isstring? 0 00008143 7503E9330C je dumpallvars 0 00008148 BA[0000] mov dx, msg.rvm 0 0000814B E8[0000] call isstring? 0 0000814E 7503E9700C je dumpmemory 0 00008153 BA[0000] mov dx, msg.rvp 0 00008156 E8[0000] call isstring? 0 00008159 7503E9A60C je dumpprocess 0 0000815E BA[0000] mov dx, msg.rvd 0 00008161 E8[0000] call isstring? 0 00008164 7503E92F0D je dumpdevice 87 %if _RH 0 00008169 BA[0000] mov dx, msg.rh 0 0000816C E8[0000] call isstring? 0 0000816F 7503E95A0D 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 0 00008174 46 inc si 0 00008175 AC lodsb 0 00008176 E8[0000] call capitalise 105 0 00008179 50 push ax 0 0000817A 56 push si 0 0000817B E8[0000] call skipwhite 0 0000817E E8[0000] call iseol? ; line ends after single character ? 0 00008181 5E pop si 0 00008182 58 pop ax 0 00008183 7534 jne short rr1 ; no, not other kinds of dumps --> 113 0 00008185 3C46 cmp al, 'F' ; only valid input to a later check 0 00008187 7503E9E103 je rr2.writeprompt ; so go there --> 116 ; (note that byte [si-1] must != '.') 117 %if _OPTIONS || _VARIABLES 0 0000818C 3C56 cmp al, 'V' 0 0000818E 7503E91C0B je dumpvars 120 %endif 0 00008193 3C58 _386 cmp al, 'X' 0 00008195 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 0 00008197 E9[0000] jmp error ; all other single characters are invalid 132 %endif 133 134 %ifn _ONLYNON386 135 rrx: 0 0000819A AC lodsb 0 0000819B E8[0000] call chkeol 0 0000819E 8036[0000]01 xoropt [options], dispregs32 0 000081A3 BA[0000] mov dx, msg.regs386 0 000081A6 E8[0000] call putsz 0 000081A9 BA[0000] mov dx, msg.regs386_on 0 000081AC F606[0000]01 testopt [options], dispregs32 0 000081B1 7503 jnz .on 0 000081B3 BA[0000] mov dx, msg.regs386_off 145 .on: 0 000081B6 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 0 000081B9 5589E58D66DE lenter 170 %if _MMXSUPP 0 000081BF 8366EE00 and word [bp + ?mmx_isvar_type], 0 172 %endif 0 000081C3 89E7 mov di, sp ; -> ?namebuffer 0 000081C5 E8[0000] nearcall isvariable?.return_name 0 000081C8 7203E91701 jnc rr1_variable 176 0 000081CD 4E dec si 0 000081CE BA[0000] mov dx, msg.byte 0 000081D1 BB0101 mov bx, 101h 0 000081D4 52 push dx 0 000081D5 E8[0000] call isstring? 0 000081D8 7428 je rr1_memory 0 000081DA 5A pop dx 0 000081DB BA[0000] mov dx, msg.word 0 000081DE 43 inc bx ; = 102h 0 000081DF 52 push dx 0 000081E0 E8[0000] call isstring? 0 000081E3 741D je rr1_memory 0 000081E5 5A pop dx 0 000081E6 BA[0000] mov dx, msg.3byte 0 000081E9 43 inc bx ; = 103h 0 000081EA 52 push dx 0 000081EB E8[0000] call isstring? 0 000081EE 7412 je rr1_memory 0 000081F0 5A pop dx 0 000081F1 BA[0000] mov dx, msg.dword 0 000081F4 43 inc bx ; = 104h 0 000081F5 52 push dx 0 000081F6 E8[0000] call isstring? 0 000081F9 7407 je rr1_memory 201 ; pop dx 0 000081FB 89EC5D lleave code 0 000081FE AC lodsb 0 000081FF E94903 jmp rr2 205 206 rr1_memory: 0 00008202 8F46F8 pop word [bp + ?memsizestring] 0 00008205 895EF6 mov word [bp + ?ismem_high_size_low], bx 209 0 00008208 31C0 xor ax, ax 0 0000820A 88D8 mov al, bl 0 0000820C F7D8 neg ax 0 0000820E 05[0400] add ax, masks + 4 ; 4 - size = offset into masks 0 00008211 8946F2 mov word [rrmask], ax ; -> mask 0 00008214 E8[0000] call skipcomma 0 00008217 3C5B cmp al, '[' 0 00008219 7403E9[0000] jne error 0 0000821E AC lodsb 0 0000821F 8B1E[0000] mov bx, word [reg_ds] 0 00008223 E8[0000] nearcall getaddrX 0 00008226 895EFA mov word [bp + ?segsel], bx 222 _386_PM_o32 0 00008229 8956FC mov word [bp + ?offset], dx 0 0000822C E8[0000] call skipcomm0 0 0000822F 3C5D cmp al, ']' 0 00008231 7403E9[0000] jne error 227 0 00008236 E8[0000] call skipcomma 0 00008239 3C2E cmp al, '.' ; special ? 0 0000823B 7405 je short .writeprompt ; yes --> 0 0000823D E8[0000] call iseol? 0 00008240 755F jne short .noprompt 233 .writeprompt: 234 ; si -> behind dot if any 0 00008242 BF[0000] mov di, line_out 0 00008245 56 push si 0 00008246 8B76F8 mov si, word [bp + ?memsizestring] 238 ; si -> size string (ASCIZ) 0 00008249 A8 db __TEST_IMM8 ; (skip stosb) 240 @@: 0 0000824A AA stosb ; store next byte 0 0000824B AC lodsb ; load next byte 0 0000824C 84C0 test al, al ; is zero ? 0 0000824E 75FA jnz @B ; not yet, loop --> 0 00008250 5E pop si ; (preserve si) 0 00008251 B8205B mov ax, " [" 0 00008254 AB stosw 0 00008255 8B46FA mov ax, word [bp + ?segsel] 0 00008258 89C3 mov bx, ax 0 0000825A E8[0000] call hexword 0 0000825D B03A mov al, ':' 0 0000825F AA stosb 253 _386_PM_o32 0 00008260 8B46FC mov ax, word [bp + ?offset] 255 %if _PM 256 call test_high_limit ; 32-bit segment ? 257 jz .16 258 call hexword_high 259 .16: 260 %endif 0 00008263 E8[0000] call hexword 0 00008266 B85D20 mov ax, "] " 0 00008269 AB stosw 264 0 0000826A E84800 call rr1_read_mem_dxax 266 0 0000826D 80F904 cmp cl, 4 0 00008270 7207 jb .pnohigh 0 00008272 92 xchg ax, dx 0 00008273 E8[0000] call hexword ; display high word 0 00008276 92 xchg ax, dx 0 00008277 EB0C jmp @F 273 .pnohigh: 0 00008279 80F903 cmp cl, 3 0 0000827C 720A jb @FF 0 0000827E 86C2 xchg al, dl 0 00008280 E8[0000] call hexbyte 0 00008283 86C2 xchg al, dl 279 @@: 280 %if _RSEPARATE 0 00008285 E82100 call rseparate 282 %endif 283 @@: 0 00008288 80F902 cmp cl, 2 0 0000828B 7207 jb .pnobyte 0 0000828D 86C4 xchg al, ah 0 0000828F E8[0000] call hexbyte ; display high byte 0 00008292 86C4 xchg al, ah 289 .pnobyte: 0 00008294 E8[0000] call hexbyte ; display low byte 291 292 %if _MS_PROMPT_COMPAT 0 00008297 B000 mov al, 0 294 %endif 0 00008299 E82F04 call dot_prompt 0 0000829C 7503E9C601 je .return 297 .noprompt: 0 000082A1 31C9 xor cx, cx 0 000082A3 8A4EF6 mov cl, byte [bp + ?size] 0 000082A6 E9AB00 jmp rr1_common 301 302 303 %if _RSEPARATE 304 rseparate: 0 000082A9 F606[0200]20 testopt [options2], opt2_r_separate 0 000082AE 7404 jz @F 0 000082B0 C6055F mov byte [di], '_' 0 000082B3 47 inc di 309 @@: 0 000082B4 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: 0 000082B5 E8[0000] call prephack 0 000082B8 E8[0000] call dohack 0 000082BB 31C0 xor ax, ax 0 000082BD 31D2 xor dx, dx 0 000082BF 8A4EF6 mov cl, byte [bp + ?size] 324 %if _PM 325 mov bx, word [bp + ?segsel] 326 call test_high_limit ; 32-bit segment ? 327 mov ds, bx 328 %else 0 000082C2 8E5EFA mov ds, word [bp + ?segsel] 330 %endif 331 _386_PM_o32 0 000082C5 8B5EFC mov bx, word [bp + ?offset] 333 %if _PM 334 jz .16 335 336 [cpu 386] 337 .32: 338 cmp cl, 2 339 jb .32_1 340 je .32_2 341 cmp cl, 4 342 jb .32_3 343 .32_4: 344 mov dh, byte [ebx + 3] 345 .32_3: 346 mov dl, byte [ebx + 2] 347 .32_2: 348 mov ah, byte [ebx + 1] 349 .32_1: 350 mov al, byte [ebx] 351 jmp .ret 352 __CPU__ 353 %endif 354 355 .16: 0 000082C8 80F902 cmp cl, 2 0 000082CB 7210 jb .16_1 0 000082CD 740B je .16_2 0 000082CF 80F904 cmp cl, 4 0 000082D2 7203 jb .16_3 361 .16_4: 0 000082D4 8A7703 mov dh, byte [bx + 3] 363 .16_3: 0 000082D7 8A5702 mov dl, byte [bx + 2] 365 .16_2: 0 000082DA 8A6701 mov ah, byte [bx + 1] 367 .16_1: 0 000082DD 8A07 mov al, byte [bx] 369 .ret: 0 000082DF 16 push ss 0 000082E0 1F pop ds 0 000082E1 E9[0000] jmp unhack 373 ..@rr_variable_read_access_end: 374 375 376 rr1_variable: 0 000082E4 897EF2 mov word [rrmask], di ; -> mask of read-only bits 0 000082E7 88C8 mov al, cl 0 000082E9 B100 mov cl, 0 0 000082EB 4E dec si ; (to reload al) 0 000082EC 50 push ax ; h = variable's field type, l = its size 0 000082ED B400 mov ah, 0 0 000082EF 8946F6 mov word [bp + ?ismem_high_size_low], ax 0 000082F2 86CD xchg cl, ch ; cx = variable's name's length 385 0 000082F4 E8[0000] call skipcomma 0 000082F7 3C2E cmp al, '.' ; special ? 0 000082F9 7405 je short .writeprompt ; yes --> 0 000082FB E8[0000] call iseol? 0 000082FE 7547 jne short .noprompt 391 .writeprompt: 0 00008300 56 push si ; -> behind dot if any 0 00008301 8D76DE lea si, [bp + ?namebuffer] 394 ; -> name 0 00008304 BF[0000] mov di, line_out 0 00008307 F3A4 rep movsb 0 00008309 5E pop si ; -> behind dot if any 0 0000830A B020 mov al, 32 0 0000830C AA stosb 0 0000830D 59 pop cx ; h = variable's field type, l = its size 0 0000830E 87DA xchg bx, dx 0 00008310 8B07 mov ax, word [bx] 0 00008312 87DA xchg bx, dx 0 00008314 51 push cx 0 00008315 80F904 cmp cl, 4 0 00008318 7205 jb .pnohigh 0 0000831A E8[0000] call hexword ; display high word 0 0000831D EB08 jmp @F 409 .pnohigh: 0 0000831F 80F903 cmp cl, 3 0 00008322 7206 jb @FF 0 00008324 E8[0000] call hexbyte 413 @@: 414 %if _RSEPARATE 0 00008327 E87FFF call rseparate 416 %endif 417 @@: 0 0000832A 8B07 mov ax, word [bx] 0 0000832C 80F902 cmp cl, 2 0 0000832F 7207 jb .pnobyte 0 00008331 86C4 xchg al, ah 0 00008333 E8[0000] call hexbyte ; display high byte 0 00008336 86C4 xchg al, ah 424 .pnobyte: 0 00008338 E8[0000] call hexbyte ; display low byte 426 %if _MS_PROMPT_COMPAT 0 0000833B B002 mov al, 2 428 %endif 0 0000833D E88B03 call dot_prompt 0 00008340 59 pop cx ; h = variable's field type, l = its size 0 00008341 7503E92101 je .return 0 00008346 A8 db __TEST_IMM8 ; (skip pop) 433 .noprompt: 0 00008347 59 pop cx ; h = variable's field type, l = its size 435 %if _MMXSUPP 0 00008348 894EEE mov word [bp + ?mmx_isvar_type], cx 437 %endif 0 0000834B 84ED test ch, ch 0 0000834D 7403E91901 jnz rr1_readonly_or_mmx 440 rr1_common_do_mmx: 0 00008352 53 push bx 0 00008353 52 push dx 443 rr1_common: 0 00008354 884EF4 mov byte [rrtype], cl 0 00008357 51 push cx 0 00008358 50 push ax 0 00008359 56 push si 0 0000835A E8[0000] nearcall isoperator? 0 0000835D 750D jne .nooperator 0 0000835F 89CB mov bx, cx 0 00008361 01DB add bx, bx ; bh = 0 ! 0 00008363 50 push ax 0 00008364 E8[0000] nearcall ..@call_operator_dispatchers 0 00008367 58 pop ax 0 00008368 85DB test bx, bx 0 0000836A 7504 jnz .gotoperator 457 .nooperator: 0 0000836C BB1900 mov bx, OPERATOR_RIGHTOP; set default computation function 0 0000836F A8 db __TEST_IMM8 460 .gotoperator: 0 00008370 AC lodsb 462 0 00008371 E88B03 call isassignmentoperator? 0 00008374 7317 jnc .assign_op_done ; found an assignment operator --> 0 00008376 83FB19 cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 0 00008379 7412 je .assign_op_done ; yes, assignment operator not required --> 0 0000837B 59 pop cx 0 0000837C 58 pop ax ; restore al, si in front of operator 0 0000837D 50 push ax 0 0000837E 51 push cx 0 0000837F 87F1 xchg si, cx 0 00008381 51 push cx 0 00008382 E8[0000] nearcall isunaryoperator?; is this a valid unary operator too ? 0 00008385 59 pop cx 0 00008386 74E4 je .nooperator ; yes --> 0 00008388 87F1 xchg si, cx 477 errorj9: equ $ 0 0000838A E9[0000] jmp error ; error where the assignment operator needs to be 479 .assign_op_done: 0 0000838D 59 pop cx 0 0000838E 59 pop cx 0 0000838F 59 pop cx 0 00008390 53 push bx 0 00008391 80FB18 cmp bl, OPERATOR_COND 0 00008394 7503E9[0000] je error 0 00008399 E8[0000] call skipcomm0 487 0 0000839C E8[0000] nearcall getexpression ; bx:dx = expression result 0 0000839F 8866F5 mov byte [bp + ?hhtype], ah 0 000083A2 8976F0 mov word [bp + ?hhoffset], si 0 000083A5 E8[0000] call chkeol 0 000083A8 59 pop cx ; operator computation function 493 0 000083A9 807EF700 cmp byte [bp + ?ismem], 0 0 000083AD 7419 je .var_hhvar 496 497 .mem_hhvar: 0 000083AF 89C7 mov di, ax 0 000083B1 89D6 mov si, dx 0 000083B3 53 push bx 0 000083B4 51 push cx 0 000083B5 E8FDFE call rr1_read_mem_dxax 0 000083B8 59 pop cx 0 000083B9 5B pop bx 0 000083BA 52 push dx 0 000083BB 50 push ax 0 000083BC 89F8 mov ax, di 0 000083BE 89F2 mov dx, si 0 000083C0 BF[0000] mov di, mask_4byte ; di -> zero 0 000083C3 BE[0200] mov si, mask_4byte + 2 ; si -> zero 511 0 000083C6 EB06 jmp .common_hhvar 513 514 .var_hhvar: 0 000083C8 5E pop si ; si-> high word 0 000083C9 5F pop di ; di-> low word 0 000083CA FF34 push word [si] 0 000083CC FF35 push word [di] 519 520 .common_hhvar: 0 000083CE 8F06[0000] pop word [hhvar] 0 000083D2 8F06[0200] pop word [hhvar+2] ; save variable's current value (as left operand) 523 0 000083D6 C606[0000]00 mov byte [hhtype], 0 ; type info signed=0 pointer=0 0 000083DB 807EF404 cmp byte [rrtype], 4 0 000083DF 7317 jae .cleardword 0 000083E1 807EF402 cmp byte [rrtype], 2 0 000083E5 770C ja .clearthreebyte 0 000083E7 7405 je .clearword 530 .clearbyte: 0 000083E9 C606[0100]00 mov byte [hhvar + 1], 0 ; clear second byte 532 .clearword: 0 000083EE C606[0200]00 mov byte [hhvar + 2], 0 ; clear third byte 534 .clearthreebyte: 0 000083F3 C606[0300]00 mov byte [hhvar + 3], 0 ; clear fourth byte 536 .cleardword: 0 000083F8 87CB xchg cx, bx 0 000083FA 01DB add bx, bx 0 000083FC 8B9F[0000] mov bx, word [bx + operatorfunctions] 0 00008400 87CB xchg cx, bx ; cx = operator function 0 00008402 8A66F5 mov ah, byte [bp + ?hhtype] 542 %if _DUALCODE && _EXPRDUALCODE 543 nearcall ..@rr_operatorfunctions 544 %else 0 00008405 FFD1 call cx ; compute 546 %endif 0 00008407 E8[0000] nearcall getexpression.countsignificantbits 0 0000840A 53 push bx 0 0000840B 56 push si 0 0000840C 31DB xor bx, bx 0 0000840E 8A5EF4 mov bl, byte [rrtype] 0 00008411 01DB add bx, bx 0 00008413 8B76F0 mov si, word [bp + ?hhoffset] 554 %if _DUALCODE && _EXPRDUALCODE 555 nearcall ..@rr_checksignificantbits 556 557 usesection lDEBUG_CODE2 558 ..@rr_checksignificantbits: section_of_function 559 jmp near word [checksignificantbits_table + bx] 560 561 usesection lDEBUG_CODE 562 %else 0 00008416 FF97[0000] call near word [checksignificantbits_table + bx] 564 %endif 0 0000841A 5E pop si 0 0000841B 5B pop bx 567 0 0000841C 97 xchg ax, di ; ax -> low word of variable 0 0000841D 8B7EF2 mov di, word [rrmask] ; di -> mask dword 0 00008420 53 push bx ; use bx as a scratch space 0 00008421 8B0D mov cx, word [di] ; = low word of mask 0 00008423 51 push cx ; preserve low word of mask 0 00008424 97 xchg ax, di ; di -> low word of variable 0 00008425 230D and cx, word [di] ; cx = low word value to preserve 0 00008427 5B pop bx ; = low word of mask 0 00008428 F7D3 not bx ; = bitmask of bits to use from result 0 0000842A 21DA and dx, bx ; dx = bits to use from result low word 0 0000842C 09CA or dx, cx ; dx = low word compound 0 0000842E 5B pop bx ; restore high word after scratch use 0 0000842F 97 xchg ax, di ; di -> mask dword 0 00008430 52 push dx ; use dx as a scratch space 0 00008431 8B4D02 mov cx, word [di + 2] ; = high word of mask 0 00008434 51 push cx ; preserve high word of mask 0 00008435 230C and cx, word [si] ; cx = high word value to preserve 0 00008437 5A pop dx ; = high word of mask 0 00008438 F7D2 not dx ; = bitmask of bits to use from result 0 0000843A 21D3 and bx, dx ; bx = bits to use from result high word 0 0000843C 09CB or bx, cx 0 0000843E 5A pop dx ; restore low word after scratch use 0 0000843F 97 xchg ax, di ; di -> low word of variable 591 592 %if _MMXSUPP 0 00008440 807EEF00 cmp byte [bp + ?mmx_isvar_type + 1], 0 0 00008444 7403E9A900 jne rr1_mmx_set 595 %endif 0 00008449 807EF700 cmp byte [bp + ?ismem], 0 0 0000844D 7544 jne rr1_mem_set 598 599 .var_set: 0 0000844F 807EF402 cmp byte [rrtype], 2 0 00008453 7210 jb .setbyte 0 00008455 740B je .setword 0 00008457 807EF404 cmp byte [rrtype], 4 0 0000845B 7203 jb .setthreebyte 605 .setdword: 0 0000845D 887C01 mov byte [si + 1], bh ; set fourth byte 607 .setthreebyte: 0 00008460 881C mov byte [si], bl ; set third byte 609 .setword: 0 00008462 887501 mov byte [di + 1], dh ; set second byte 611 .setbyte: 0 00008465 8815 mov byte [di], dl ; set first byte 613 .return: 614 rr1_memory.return: 615 rr1_variable.return: 0 00008467 89EC5D lleave code 617 rr1b: 0 0000846A C3 retn 619 620 621 rr1_readonly_or_mmx: 622 %if _MMXSUPP 0 0000846B 80FD01 cmp ch, 1 0 0000846E 7415 je rr1_readonly 0 00008470 803E[0000]00 cmp byte [has_mmx], 0 0 00008475 7403E9D8FE jne rr1_common_do_mmx 0 0000847A BA[0000] mov dx, msg.internal_error_no_mmx 0 0000847D B80C01 mov ax, 010Ch 0 00008480 E8[0000] call setrc 0 00008483 EB03 jmp rr1_readonly.error 631 %endif 632 633 rr1_readonly: 0 00008485 BA[0000] mov dx, msg.readonly 635 .error: 0 00008488 E8[0000] call putsz_error 0 0000848B B80A01 mov ax, 010Ah 0 0000848E E8[0000] call setrc 0 00008491 EBD4 jmp rr1_variable.return 640 641 642 ..@rr_variable_write_access_start: 643 rr1_mem_set: 0 00008493 89D0 mov ax, dx 0 00008495 89DA mov dx, bx 646 0 00008497 E8[0000] call prephack 0 0000849A E8[0000] call dohack 0 0000849D 8A4EF6 mov cl, byte [bp + ?size] 650 %if _PM 651 mov bx, word [bp + ?segsel] 652 call verifysegm 653 jc .ro 654 call test_high_limit ; 32-bit segment ? 655 mov ds, bx 656 %else 0 000084A0 8E5EFA mov ds, word [bp + ?segsel] 658 %endif 659 _386_PM_o32 0 000084A3 8B5EFC mov bx, word [bp + ?offset] 661 %if _PM 662 jz .16 663 664 [cpu 386] 665 .32: 666 cmp cl, 2 667 jb .32_1 668 je .32_2 669 cmp cl, 4 670 jb .32_3 671 .32_4: 672 mov byte [ebx + 3], dh 673 .32_3: 674 mov byte [ebx + 2], dl 675 .32_2: 676 mov byte [ebx + 1], ah 677 .32_1: 678 mov byte [ebx], al 679 680 .32_check: 681 cmp cl, 2 682 jb .32_check_1 683 je .32_check_2 684 cmp cl, 4 685 jb .32_check_3 686 .32_check_4: 687 cmp dh, byte [ebx + 3] 688 jne .ro 689 .32_check_3: 690 cmp dl, byte [ebx + 2] 691 jne .ro 692 .32_check_2: 693 cmp ah, byte [ebx + 1] 694 jne .ro 695 .32_check_1: 696 cmp al, byte [ebx] 697 jne .ro 698 jmp .ret 699 __CPU__ 700 %endif 701 702 .16: 0 000084A6 80F902 cmp cl, 2 0 000084A9 7210 jb .16_1 0 000084AB 740B je .16_2 0 000084AD 80F904 cmp cl, 4 0 000084B0 7203 jb .16_3 708 .16_4: 0 000084B2 887703 mov byte [bx + 3], dh 710 .16_3: 0 000084B5 885702 mov byte [bx + 2], dl 712 .16_2: 0 000084B8 886701 mov byte [bx + 1], ah 714 .16_1: 0 000084BB 8807 mov byte [bx], al 716 717 .16_check: 0 000084BD 80F902 cmp cl, 2 0 000084C0 7216 jb .16_check_1 0 000084C2 740F je .16_check_2 0 000084C4 80F904 cmp cl, 4 0 000084C7 7205 jb .16_check_3 723 .16_check_4: 0 000084C9 3A7703 cmp dh, byte [bx + 3] 0 000084CC 7513 jne .ro 726 .16_check_3: 0 000084CE 3A5702 cmp dl, byte [bx + 2] 0 000084D1 750E jne .ro 729 .16_check_2: 0 000084D3 3A6701 cmp ah, byte [bx + 1] 0 000084D6 7509 jne .ro 732 .16_check_1: 0 000084D8 3A07 cmp al, byte [bx] 0 000084DA 7505 jne .ro 735 .ret: 0 000084DC E8[0000] call ee0a ; calls unhack 737 rr1_memory.return_j1: equ $ 0 000084DF EB86 jmp rr1_memory.return 739 740 .ro: 0 000084E1 E8[0000] call ee0a 0 000084E4 BA[0000] mov dx, msg.readonly_mem 0 000084E7 E8[0000] call putsz_error 0 000084EA B80B01 mov ax, 010Bh 0 000084ED E8[0000] call setrc 0 000084F0 EBED 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 0 000084F2 8A46EF mov al, byte [bp + ?mmx_isvar_type + 1] 0 000084F5 48 dec ax 0 000084F6 48 dec ax ; undo encoding for isvar type return 0 000084F7 89D9 mov cx, bx ; cx:dx = number 0 000084F9 88C3 mov bl, al 0 000084FB 80E307 and bl, 7 ; = register number 0 000084FE 83E018 and ax, 11_000b ; = type of write 0 00008501 C1E802 shr ax, 2 ; = index into table 762 763 %if _PM 764 push dx 765 mov dx, word [code_seg] 766 call setes2dx ; es => lDEBUG_CODE (writable) 767 pop dx 768 %else 0 00008504 8E06[0000] mov es, word [code_seg] ; es => lDEBUG_CODE 770 %endif 0 00008508 C0E303 shl bl, 3 ; shift into reg field 0 0000850B 80CB07 or bl, 07h ; code to get our ModR/M byte (r/m = [bx]) 0 0000850E 26881E[2D04] mov byte [es:.getmmx_modrm], bl 774 ; SMC in section lDEBUG_CODE 0 00008513 26881E[3704] mov byte [es:.setmmx_modrm], bl 776 ; SMC in section lDEBUG_CODE 0 00008518 EB00 jmp @F ; try to invalidate prefetch 778 @@: 0 0000851A 16 push ss 0 0000851B 07 pop es 0 0000851C 83EC08 sub sp, 8 0 0000851F 89E3 mov bx, sp 783 .getmmx_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 0 00008521 0F7F07 movq qword [bx], mm0 785 0 00008524 97 xchg ax, di 0 00008525 31C0 xor ax, ax ; = 0 0 00008527 FF95[0A00] call near [mmx_set_table + di] 789 790 .setmmx_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 0 0000852B 0F6F07 movq mm0, qword [bx] 0 0000852E 83C408 add sp, 8 0 00008531 EBAC jmp short rr1_memory.return_j1 794 795 .signextend: 0 00008533 85C9 test cx, cx 0 00008535 7901 jns .zeroextend 0 00008537 48 dec ax ; = -1 799 800 .zeroextend: 0 00008538 894704 mov word [bx + 4], ax 0 0000853B 894706 mov word [bx + 6], ax 803 ;; jmp short .lowonly 804 ; fall through 805 806 .lowonly: 0 0000853E 8917 mov word [bx], dx 0 00008540 894F02 mov word [bx + 2], cx 0 00008543 C3 retn 810 811 .highonly: 0 00008544 895704 mov word [bx + 4], dx 0 00008547 894F06 mov word [bx + 6], cx 0 0000854A C3 retn 815 816 subcpureset 817 %endif 818 819 820 lleave ctx 821 822 823 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "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: 0 00005434 [0000] dw error_expr 0 00005436 [0000] dw getbyte.checksignificantbits 0 00005438 [0000] dw getword.checksignificantbits 0 0000543A [0000] dw get3byte.checksignificantbits 0 0000543C [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 0 0000543E [4204] dw rr1_mmx_set.zeroextend 0 00005440 [3D04] dw rr1_mmx_set.signextend 0 00005442 [4804] dw rr1_mmx_set.lowonly 0 00005444 [4E04] dw rr1_mmx_set.highonly 847 %endif 848 849 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 849 ------------------ note: usesection lDEBUG_CODE 850 851 852 ; Change flag register with mnemonics - F 853 rr2: 0 0000854B E8[0000] call capitalise 0 0000854E 3C46 cmp al, 'F' 0 00008550 7403E9A200 jne rr3 ; if not 'F' --> 0 00008555 50 push ax 0 00008556 8A04 mov al, byte [si] 0 00008558 E8[0000] nearcall isseparator? ; valid separator ? 0 0000855B 58 pop ax 0 0000855C 7403E99600 jne rr3 ; no --> 862 .ef: 0 00008561 E8[0000] call skipcomma 0 00008564 3C2E cmp al, '.' ; special ? 0 00008566 7405 je .writeprompt ; yes --> 0 00008568 E8[0000] call iseol? ; end of line ? 0 0000856B 7517 jne .noprompt ; no --> 868 .writeprompt: 0 0000856D BF[0000] mov di, line_out 870 %if _REGSHIGHLIGHT 0 00008570 800E[0200]02 setopt [internalflags3], dif3_do_not_highlight 872 %endif 0 00008575 56 push si 0 00008576 E88406 call dmpflags 0 00008579 5E pop si ; -> behind dot if any 876 %if _MS_PROMPT_COMPAT 0 0000857A B004 mov al, 4 878 %endif 0 0000857C E84C01 call dot_prompt 0 0000857F 7503E9E6FE je rr1b ; if no change 881 .noprompt: 882 0 00008584 E87801 call isassignmentoperator? 0 00008587 56 push si 0 00008588 7308 jnc .noteol ; at least one value is required --> 886 .check_loop: 0 0000858A E8[0000] call skipcomm0 0 0000858D E8[0000] call iseol? 0 00008590 7420 je .really ; return if done 890 .noteol: 0 00008592 E8[0000] call capitalise 0 00008595 86C4 xchg al, ah 0 00008597 AC lodsb 0 00008598 E8[0000] call capitalise 0 0000859B 86C4 xchg al, ah ; ax = mnemonic 0 0000859D BF[0000] mov di, flagson 0 000085A0 B91000 mov cx, 16 0 000085A3 F2AF repne scasw 0 000085A5 7507 jne short .errordec ; if no match 0 000085A7 AC lodsb 0 000085A8 E8[0000] nearcall isseparator? 0 000085AB 74DD je .check_loop 903 .errordec2: 0 000085AD 4E dec si 905 .errordec: 906 errordec: equ $ 0 000085AE 4E dec si ; back up one before flagging an error 0 000085AF E9[0000] jmp error 909 910 .really: 0 000085B2 5E pop si 0 000085B3 4E dec si 0 000085B4 AC lodsb 914 .loop: 0 000085B5 E8[0000] call iseol? 0 000085B8 7503E9ADFE je rr1b ; return if done 917 0 000085BD E8[0000] call capitalise 0 000085C0 86C4 xchg al, ah 0 000085C2 AC lodsb 0 000085C3 E8[0000] call capitalise 0 000085C6 86C4 xchg al, ah ; ax = mnemonic 923 0 000085C8 BF[0000] mov di, flagson 0 000085CB B91000 mov cx, 16 0 000085CE F2AF repne scasw 0 000085D0 75DC jne short .errordec ; if no match 0 000085D2 81FF[0000] cmp di, flagsoff 0 000085D6 770A ja .clear ; if we're clearing 930 %if _LINK 0 000085D8 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 0 000085DC 0906[0000] or word [reg_efl], ax ; set the bit 0 000085E0 EB0A jmp short .common 940 .clear: 941 %if _LINK 0 000085E2 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 0 000085E6 F7D0 not ax 0 000085E8 2106[0000] and word [reg_efl], ax ; clear the bit 951 .common: 0 000085EC AC lodsb 0 000085ED E8[0000] nearcall isseparator? 0 000085F0 75BB jne short .errordec2 0 000085F2 E8[0000] call skipcomm0 0 000085F5 EBBE jmp short .loop 957 958 ; Change flag register with mnemonics - EF 959 rr3: 0 000085F7 86C4 xchg al, ah 0 000085F9 AC lodsb 0 000085FA E8[0000] call capitalise 0 000085FD 86C4 xchg al, ah ; ax = next two characters 0 000085FF 3D4546 _386 cmp ax, "EF" 0 00008602 750B _386 jne rr4 ; if not "EF" --> 0 00008604 50 _386 push ax 0 00008605 8A04 _386 mov al, byte [si] 0 00008607 E8[0000] _386 nearcall isseparator? ; valid separator ? 0 0000860A 58 _386 pop ax 0 0000860B 0F8452FF _386 je rr2.ef 971 972 ; Change a single flag with mnemonic 973 rr4: 0 0000860F BF[0000] mov di, flagnames 0 00008612 B90800 mov cx, 8 0 00008615 F2AF repne scasw 0 00008617 7595 jne short rr2.errordec 0 00008619 89C2 mov dx, ax 0 0000861B AC lodsb 0 0000861C E8[0000] nearcall isseparator? 0 0000861F 758C jne rr2.errordec2 982 %if _LINK 0 00008621 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 0 00008625 E8[0000] call skipcomm0 0 00008628 3C2E cmp al, '.' ; special ? 0 0000862A 7405 je .writeprompt ; yes --> 0 0000862C E8[0000] call iseol? 0 0000862F 751B jne .noprompt 995 .writeprompt: 0 00008631 BF[0000] mov di, line_out 0 00008634 89D0 mov ax, dx 0 00008636 AB stosw 0 00008637 58 pop ax 0 00008638 50 push ax 0 00008639 8506[0000] test word [reg_efl], ax ; is it off ? 0 0000863D B82030 mov ax, " 0" ; assume so 0 00008640 7402 jz .off ; it is off --> 0 00008642 FEC4 inc ah ; is on, set to '1' 1005 .off: 0 00008644 AB stosw 1007 %if _MS_PROMPT_COMPAT 0 00008645 B000 mov al, 0 1009 %endif 0 00008647 E88100 call dot_prompt 0 0000864A 7403 je .ret_pop_j_ZR ; if no change --> 1012 .noprompt: 0 0000864C E8[0000] call iseol? ; end of line ? 1014 .ret_pop_j_ZR: 0 0000864F 7478 je .ret_pop ; yes, no change requested --> 0 00008651 51 push cx 0 00008652 50 push ax 0 00008653 56 push si 0 00008654 E8[0000] nearcall isoperator? 0 00008657 751F jne .nooperator 0 00008659 89CB mov bx, cx 0 0000865B 01DB add bx, bx ; bh = 0 ! 0 0000865D 50 push ax 0 0000865E E8[0000] nearcall ..@call_operator_dispatchers 0 00008661 58 pop ax 0 00008662 85DB test bx, bx 0 00008664 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 0 00008666 80FB17 cmp bl, OPERATOR_BOOL_AND 0 00008669 770D ja .nooperator 0 0000866B 80FB15 cmp bl, OPERATOR_BOOL_OR 0 0000866E 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 0 00008670 80C303 add bl, OPERATOR_BOOL_OR - OPERATOR_BIT_OR 0 00008673 80FB15 cmp bl, OPERATOR_BOOL_OR 0 00008676 7304 jae .gotoperator 1056 .nooperator: 0 00008678 BB1900 mov bx, OPERATOR_RIGHTOP; set default computation function 0 0000867B A8 db __TEST_IMM8 1059 .gotoperator: 0 0000867C AC lodsb 1061 0 0000867D E87F00 call isassignmentoperator? 0 00008680 7308 jnc .assign_op_done ; found an assignment operator --> 0 00008682 83FB19 cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 1065 %if 1 ; since | ^ & are never unary operators 0 00008685 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: 0 0000868A 59 pop cx 0 0000868B 59 pop cx 0 0000868C 59 pop cx 0 0000868D 53 push bx 0 0000868E E8[0000] nearcall getexpression 0 00008691 E8[0000] call chkeol 0 00008694 E8[0000] nearcall toboolean 0 00008697 59 pop cx ; operator index 0 00008698 31C0 xor ax, ax 0 0000869A A2[0000] mov byte [hhtype], al 0 0000869D A3[0200] mov word [hhvar+2], ax 0 000086A0 5E pop si 0 000086A1 56 push si ; flag 0 000086A2 8536[0000] test word [reg_efl], si 0 000086A6 7401 jz .notset 0 000086A8 40 inc ax 1098 .notset: 0 000086A9 A3[0000] mov word [hhvar], ax 0 000086AC 87CB xchg cx, bx 0 000086AE 01DB add bx, bx 0 000086B0 8B9F[0000] mov bx, word [bx+operatorfunctions] 0 000086B4 87CB xchg cx, bx ; cx = operator function 1104 %if _DUALCODE && _EXPRDUALCODE 1105 nearcall ..@rr_operatorfunctions 1106 1107 usesection lDEBUG_CODE2 1108 ..@rr_operatorfunctions: section_of_function 1109 jmp cx 1110 1111 usesection lDEBUG_CODE 1112 %else 0 000086B6 FFD1 call cx ; compute 1114 %endif 0 000086B8 58 pop ax 0 000086B9 85D2 test dx, dx 0 000086BB 7405 jz .clear 0 000086BD 0906[0000] or word [reg_efl], ax ; set the bit 0 000086C1 C3 retn 1120 .clear: 0 000086C2 F7D0 not ax 0 000086C4 2106[0000] and word [reg_efl], ax ; clear the bit 0 000086C8 C3 retn 1124 1125 .ret_pop: 0 000086C9 58 pop ax 0 000086CA 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: 0 000086CB 807CFF2E cmp byte [si-1], '.' ; syntax for display without prompt ? 0 000086CF 7425 je .onlydisplay ; yes --> 0 000086D1 53 push bx 0 000086D2 52 push dx 1146 %if _MS_PROMPT_COMPAT 0 000086D3 98 cbw ; ax = expand offset to word 0 000086D4 93 xchg bx, ax ; bx = offset 0 000086D5 BE[0000] mov si, table_getline_prepare_ms_debug 0 000086D8 F606[0200]10 testopt [options2], opt2_r_prompt_compat 0 000086DD 7503 jnz @F 0 000086DF BE[0000] mov si, table_getline_prepare_ldebug 1153 @@: 0 000086E2 FF10 call near [si + bx] ; call prefix/preparation function 0 000086E4 E8[0000] call getline00 1156 %else 1157 call getline0 1158 %endif 0 000086E7 5A pop dx 0 000086E8 5B pop bx 0 000086E9 E8[0000] call iseol? ; no change requested ? 0 000086EC 7410 je .ret ; yes --> (ZR) 0 000086EE 3C2E cmp al, '.' ; other syntax for no change ? 0 000086F0 750C jne .ret ; no --> (NZ) 1165 .chkeol1: 0 000086F2 AC lodsb 0 000086F3 E9[0000] jmp chkeol ; (ZR) 1168 1169 .onlydisplay: 0 000086F6 E8F9FF call .chkeol1 0 000086F9 E8[0000] call putsline_crlf 0 000086FC 38C0 cmp al, al ; ZR 1173 .ret: 0 000086FE 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?: 0 000086FF 3C3A cmp al, ':' 0 00008701 750A jne .checksingleequality 0 00008703 AC lodsb 0 00008704 3C3D cmp al, '=' 0 00008706 7409 je .skip ; long form assignment operator --> 1189 ; A single colon. Report "no assignment operator" here. 0 00008708 4E dec si 0 00008709 B03A mov al, ':' ; restore si, al 1192 .return_cy: 0 0000870B F9 stc 0 0000870C C3 retn 1195 1196 .checksingleequality: 0 0000870D 3C3D cmp al, '=' 0 0000870F 75FA jne .return_cy ; no assignment operator --> 1199 .skip: 0 00008711 E8[0000] call skipcomma 0 00008714 F8 clc 0 00008715 C3 retn 1203 1204 1205 rc_cmd: 0 00008716 BF[0000] mov di, cmdline_buffer 0 00008719 BD[0000] mov bp, cmdline_buffer.end 1208 %if !_LOADER 0 0000871C EB06 jmp @F 1210 1211 ; INP: al = '.' 1212 ; si -> next character 1213 re_cmd: 0 0000871E BF[0000] mov di, re_buffer 0 00008721 BD[0000] mov bp, re_buffer.end 1216 %else 1217 re_cmd: 1218 %endif 1219 @@: 0 00008724 5A pop dx 0 00008725 5A pop dx ; discard si and ax on stack 0 00008726 BA[0000] mov dx, msg.list 0 00008729 E8[0000] call isstring? 0 0000872C 7503E9B700 je .list 1225 1226 %if !_LOADER 0 00008731 81FF[0000] cmp di, re_buffer 0 00008735 741E je @F 1229 %endif 1230 0 00008737 BA[0000] mov dx, msg.abort 0 0000873A E8[0000] call isstring? 0 0000873D 7511 jne .guard_rc 1234 .abort_rc: 0 0000873F E8[0000] call yy_reset_buf 0 00008742 8026[0100]FE clropt [internalflags3], dif3_input_cmdline 0 00008747 800E[0100]02 setopt [internalflags3], dif3_input_cmdline_closed 0 0000874C E8[0000] call getline_reset_notatty 0 0000874F C3 retn 1240 1241 .guard_rc: 0 00008750 E8[0000] call guard_rc 1243 %if !_LOADER 0 00008753 EB03 jmp @FF 1245 1246 @@: 0 00008755 E8[0000] call guard_re 1248 @@: 1249 %endif 1250 0 00008758 BA[0000] mov dx, msg.append 0 0000875B E8[0000] call isstring? 0 0000875E 740D je .append 0 00008760 BA[0000] mov dx, msg.replace 0 00008763 E8[0000] call isstring? 0 00008766 740D je .common ; di -> at first byte (where to append) 0 00008768 B84501 mov ax, 0145h 0 0000876B EB75 jmp .error_common 1259 1260 .append: 0 0000876D 30C0 xor al, al 0 0000876F B9FFFF mov cx, -1 0 00008772 F2AE repne scasb ; di -> after zero byte 0 00008774 4F dec di ; -> at zero byte 1265 1266 .common: 0 00008775 E8[0000] call skipwhite 1268 1269 %if _RECMDWHILEBUFFER 1270 %if _WHILEBUFFSIZE < 256 1271 %error WHILE buffer not large enough for re_cmd 1272 %endif 0 00008778 BB[0000] mov bx, while_buffer 0 0000877B F606[0300]04 testopt [internalflags], tt_while 0 00008780 7409 jz .use_whilebuffer 1276 1277 .use_auxbuff: 1278 %endif 0 00008782 E8[0000] call guard_auxbuff 0 00008785 8E06[0000] mov es, word [auxbuff_segorsel] 0 00008789 31DB xor bx, bx ; es:bx -> buffer 1282 1283 .use_whilebuffer: 1284 %if _RECMDWHILEBUFFER 0 0000878B 89DA mov dx, bx ; es:dx -> start of buffer 1286 %endif 1287 0 0000878D 50 push ax 0 0000878E B00D mov al, 13 0 00008790 3845FF cmp byte [di - 1], al ; is there an EOL in front of us? 0 00008793 87DF xchg bx, di ; es:di -> auxbuff, bx -> at zero byte 0 00008795 7401 je @F ; yes --> 1293 0 00008797 AA stosb ; first store a CR 1295 @@: 0 00008798 58 pop ax 1297 .loop: 0 00008799 3C5C cmp al, '\' 0 0000879B 750A jne .literal 1300 0 0000879D AC lodsb ; load escaped character 0 0000879E E8[0000] call iseol?.notsemicolon; EOL ? 0 000087A1 7437 je .error_escaped_cr ; yes, error --> 0 000087A3 AA stosb ; store escaped literal 0 000087A4 AC lodsb ; load next 0 000087A5 EBF2 jmp .loop 1307 1308 .literal: 0 000087A7 E8[0000] call iseol?.notsemicolon; EOL ? 0 000087AA 7410 je .end ; got all --> 0 000087AC 3C3B cmp al, ';' ; semicolon ? 0 000087AE 7508 jne @F 0 000087B0 B00D mov al, 13 0 000087B2 AA stosb ; store linebreak 0 000087B3 E8[0000] call skipwhite ; skip leading blanks 0 000087B6 EBE1 jmp .loop 1317 1318 @@: 0 000087B8 AA stosb ; store character 0 000087B9 AC lodsb 0 000087BA EBDD jmp .loop 1322 1323 .end: 1324 ; di -> behind last character 0 000087BC 31C0 xor ax, ax 0 000087BE AA stosb 0 000087BF 89D8 mov ax, bx 1328 %if _RECMDWHILEBUFFER 0 000087C1 29D7 sub di, dx 1330 %endif 0 000087C3 01F8 add ax, di 0 000087C5 7218 jc .error_too_much 0 000087C7 39E8 cmp ax, bp 0 000087C9 7714 ja .error_too_much 1335 %if _RECMDWHILEBUFFER 0 000087CB 89D6 mov si, dx 1337 %else 1338 xor si, si 1339 %endif 0 000087CD 06 push es 0 000087CE 1F pop ds 0 000087CF 16 push ss 0 000087D0 07 pop es 0 000087D1 89F9 mov cx, di 0 000087D3 89DF mov di, bx 0 000087D5 F3A4 rep movsb 0 000087D7 16 push ss 0 000087D8 1F pop ds 0 000087D9 C3 retn 1350 1351 .error_escaped_cr: 0 000087DA B84601 mov ax, 0146h 0 000087DD EB03 jmp .error_common 1354 1355 .error_too_much: 0 000087DF B80601 mov ax, 0106h 1357 1358 .error_common: 0 000087E2 E8[0000] call setrc 0 000087E5 E9[0000] jmp error 1361 1362 re_cmd.list: 0 000087E8 AC lodsb 0 000087E9 E8[0000] call chkeol 1365 0 000087EC 89FE mov si, di 0 000087EE 31C0 xor ax, ax ; ah = 0 (flag to escape blanks) 1368 %if _40COLUMNS 1369 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 1369 ------------------ note: usesection lDEBUG_DATA_ENTRY 1370 align 2, db 0 1371 .lastfragmentlength: 0 00005446 0000 dw 0 1373 1374 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 1374 ------------------ note: usesection lDEBUG_CODE 0 000087F0 A3[1200] mov word [.lastfragmentlength], ax 1376 ; init to zero 1377 %endif 0 000087F3 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: 0 000087F6 AC lodsb 0 000087F7 84C0 test al, al 0 000087F9 7453 jz .end 0 000087FB 3C0D cmp al, 13 ; (intentionally not iseol?) 0 000087FD 7441 je .cr 0 000087FF 3C20 cmp al, 32 0 00008801 7430 je .escapeif 0 00008803 3C09 cmp al, 9 0 00008805 742C je .escapeif 0 00008807 B401 mov ah, 1 ; ah = 1 0 00008809 3C3B cmp al, ';' 0 0000880B 742C je .escape 0 0000880D 3C22 cmp al, '"' 0 0000880F 7428 je .escape 0 00008811 3C27 cmp al, "'" 0 00008813 7424 je .escape 0 00008815 3C5C cmp al, '\' 0 00008817 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. 0 00008819 81FF[FCFF] cmp di, line_out_end - 4 0 0000881D 7211 jb @F ; yes --> 1418 %if _40COLUMNS 0 0000881F 50 push ax 0 00008820 A1[1200] mov ax, word [.lastfragmentlength] 0 00008823 E8[0000] call putsline_break_line 0 00008826 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. 0 00008829 E8[0000] call puts_break_line_more 0 0000882C 58 pop ax 1428 %else 1429 call putsline 1430 %endif 0 0000882D BF[0000] mov di, line_out 1432 @@: 0 00008830 AA stosb 0 00008831 EBC3 jmp .loop 1435 1436 .escapeif: 0 00008833 84E4 test ah, ah 0 00008835 75E2 jnz .put 0 00008837 B401 mov ah, 1 ; ah = 1 1440 .escape: 0 00008839 50 push ax 0 0000883A B05C mov al, '\' 0 0000883C AA stosb ; (always have space) 0 0000883D 58 pop ax 0 0000883E EBD9 jmp .put ; checks for buffer space 1446 1447 .cr: 0 00008840 AC lodsb 0 00008841 84C0 test al, al 0 00008843 7409 jz .end 0 00008845 4E dec si 0 00008846 B03B mov al, ';' 0 00008848 AA stosb ; (always have space) 0 00008849 B82000 mov ax, 32 ; ah = 0 0 0000884C EBCB jmp .put ; checks for buffer space 1456 1457 .end: 1458 %if _40COLUMNS 0 0000884E A1[1200] mov ax, word [.lastfragmentlength] 0 00008851 E8[0000] call putsline_break_line 1461 %else 1462 call putsline 1463 %endif 0 00008854 BA[0000] mov dx, crlf 0 00008857 E9[0000] jmp putsz 1466 1467 1468 rc_run: 0 0000885A E8[0000] call guard_rc 1470 %if !_LOADER 0 0000885D E8[0000] call guard_re ; do not allow RE command to run RC 1472 ; (the RE buffer would drain first) 1473 %endif 1474 0 00008860 E8[0000] call yy_reset_buf 1476 0 00008863 C706[0000][0000] mov word [cmdline_buffer.position], cmdline_buffer 0 00008869 8326[0000]00 and word [rc_count], 0 0 0000886E 8326[0200]00 and word [rc_count + 2], 0 1480 0 00008873 800E[0100]01 setopt [internalflags3], dif3_input_cmdline 1482 0 00008878 C3 retn 1484 1485 1486 %if !_LOADER 1487 dumpregs_extended: 0 00008879 E8[0000] call guard_re 0 0000887C 813E[0000]4052 cmp word [re_buffer], "@R" 0 00008882 7408 je @F 0 00008884 813E[0000]4072 cmp word [re_buffer], "@r" 0 0000888A 750A jne .complex 1493 @@: 0 0000888C 803E[0200]00 cmp byte [re_buffer + 2], 0 0 00008891 7503E9A300 je .just_dumpregs 1496 1497 .complex: 1498 %if _RH || _SWHILEBUFFER || _RECMDWHILEBUFFER || _EXTENSIONS 0 00008896 C606[0000]FF mov byte [in_re], -1 1500 %endif 1501 %if _RH 0 0000889B E86002 call enable_rh_2 1503 %endif 1504 0 0000889E F606[0300]20 testopt [internalflags3], dif3_auxbuff_guarded_2 0 000088A3 740C jz @F 1507 0 000088A5 B80301 mov ax, 0103h 0 000088A8 E8[0000] call setrc 0 000088AB BA[0000] mov dx, msg.unexpected_auxbuff_guard 0 000088AE 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 0 000088B1 E8[0000] call yy_reset_buf 1526 0 000088B4 C706[0000][0000] mov word [re_buffer.position], re_buffer 0 000088BA 8326[0000]00 and word [re_count], 0 0 000088BF 8326[0200]00 and word [re_count + 2], 0 1530 0 000088C4 FF36[0000] push word [rc] 0 000088C8 FF36[0000] push word [savesp] 0 000088CC FF36[0000] push word [throwsp] 0 000088D0 FF36[0000] push word [lastcmd] 0 000088D4 55 push bp 0 000088D5 8926[0000] mov word [savesp], sp 0 000088D9 8926[0000] mov word [throwsp], sp 0 000088DD 8926[0000] mov word [re_sp], sp 1539 0 000088E1 800E[0300]01 setopt [internalflags3], dif3_input_re 1541 0 000088E6 F606[0300]10 testopt [internalflags3], dif3_auxbuff_guarded_1 0 000088EB 7405 jz @F 0 000088ED 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: 0 000088F2 E9[0000] jmp cmd3 1554 1555 .exit: 0 000088F5 8B26[0000] mov sp, word [re_sp] 0 000088F9 5D pop bp 0 000088FA 8F06[0000] pop word [lastcmd] 0 000088FE 8F06[0000] pop word [throwsp] 0 00008902 8F06[0000] pop word [savesp] 0 00008906 58 pop ax 0 00008907 85C0 test ax, ax 0 00008909 7403 jz @F 0 0000890B A3[0000] mov word [rc], ax 1565 @@: 0 0000890E 8026[0300]FE clropt [internalflags3], dif3_input_re 1567 0 00008913 F606[0300]20 testopt [internalflags3], dif3_auxbuff_guarded_2 0 00008918 7405 jz @F 0 0000891A 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 0 0000891F 8026[0200]DF clropt [internalflags6], dif6_rh_mode_2 0 00008924 E8CA01 call enable_rh 1581 0 00008927 E8[0000] call terminate_silent_dump.if_nonnull 1583 %endif 1584 %if _RH || _SWHILEBUFFER || _RECMDWHILEBUFFER || _EXTENSIONS 0 0000892A C606[0000]00 mov byte [in_re], 0 1586 %endif 1587 0 0000892F F606[0100]80 testopt [options2], opt2_re_cancel_tpg 0 00008934 7501 jnz @F 1590 0 00008936 C3 retn 1592 1593 @@: 1594 %ifn _RH 1595 call terminate_silent_dump.if_nonnull 1596 %endif 0 00008937 EBB9 jmp .cmd3 1598 1599 1600 .just_dumpregs: 1601 %if _RH 0 00008939 E9BFF7 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 0 0000893C E8B201 call enable_rh 1618 %endif 1619 1620 %if _IMMASM 0 0000893F E80300 call dumpregs_no_disasm 0 00008942 E9E600 jmp dumpregs_disasm 1623 1624 1625 dumpregs_no_disasm: section_of_function 1626 %endif 1627 %if _REGSLINEBREAK 0 00008945 F606[0200]40 testopt [options2], opt2_r_linebreak_always 0 0000894A 7521 jnz @F 0 0000894C F606[0300]80 testopt [options6], opt6_r_linebreak_conditional 0 00008951 7420 jz @FF 0 00008953 F606[0000]10 testopt [serial_flags], sf_use_serial 1633 ; serial ? 0 00008958 7519 jnz @FF ; yes --> 0 0000895A E8[0000] call InDOS_or_BIOS_output 0 0000895D 7414 jz @FF 0 0000895F B403 mov ah, 3 0 00008961 8A3E[0000] mov bh, byte [vpage] 0 00008965 31D2 xor dx, dx ; pre-initialise to zero 0 00008967 CD10 int 10h ; dl = column, dh = row 0 00008969 84D2 test dl, dl 0 0000896B 7406 jz @FF 1643 @@: 0 0000896D BA[0000] mov dx, crlf 0 00008970 E8[0000] call putsz 1646 @@: 1647 %endif 1648 %if _REGSHIGHLIGHT 0 00008973 F606[0200]08 testopt [options3], opt3_r_highlight_eip 0 00008978 7506 jnz @F 0 0000897A A1[0000] mov ax, word [reg_eip] 1652 %if _LINK 0 0000897D 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 mov ax, word [reg_eip + 2] 1658 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 0 00008980 BE[0000] mov si, reg16names 0 00008983 BF[0000] mov di, line_out 0 00008986 B90800 mov cx, 8 ; display all 8 standard regs (16-bit) 0 00008989 F606[0000]01 testopt [options], dispregs32 0 0000898E 7404 jz .firstrow16 0 00008990 B106 mov cl, 6 ; room for 6 standard regs (32-bit) only 1678 %if _40COLUMNS 0 00008992 EB4D jmp .firstrow_not40 1680 %endif 1681 .firstrow16: 1682 %if _40COLUMNS 0 00008994 F606[0100]10 testopt [options6], opt6_40_columns 0 00008999 7446 jz .firstrow_not40 0 0000899B B104 mov cl, 4 0 0000899D 57 push di 0 0000899E E86801 call dmpr1 ; ax, bx, cx, dx 0 000089A1 46 inc si 0 000089A2 46 inc si ; skip sp 0 000089A3 41 inc cx ; = 1 0 000089A4 E86201 call dmpr1 ; bp 0 000089A7 E8[0000] call trimputs 0 000089AA 5F pop di 0 000089AB 57 push di 0 000089AC BE[1600] mov si, reg16names + 11 * 2 ; cs 0 000089AF B90100 mov cx, 1 0 000089B2 E85401 call dmpr1 0 000089B5 BE[1000] mov si, reg16names + 8 * 2 ; ds, es, ss 0 000089B8 B103 mov cl, 3 0 000089BA E84C01 call dmpr1 0 000089BD BE[0800] mov si, reg16names + 4 * 2 ; sp 0 000089C0 41 inc cx 0 000089C1 E84501 call dmpr1 0 000089C4 E8[0000] call trimputs 0 000089C7 5F pop di 0 000089C8 BE[1C00] mov si, reg16names + 14 * 2 ; ip 0 000089CB B90100 mov cx, 1 0 000089CE E83801 call dmpr1 0 000089D1 BE[0C00] mov si, reg16names + 6 * 2 ; si, di 0 000089D4 B102 mov cl, 2 0 000089D6 E83001 call dmpr1 0 000089D9 E89102 call dmpshortflags 0 000089DC E82402 call dmpflags.40 0 000089DF EB3B jmp .lastrowdone 1715 1716 %endif 1717 .firstrow_not40: 0 000089E1 9C pushf 0 000089E2 57 push di 0 000089E3 E82301 call dmpr1 ; display first row 0 000089E6 E8[0000] call trimputs 0 000089E9 5F pop di ; (reset di) 0 000089EA 9D popf ; (reset ZF) 0 000089EB 7515 jnz .secondrow32 0 000089ED B90400 mov cx, 4 ; display 4 segment regs 0 000089F0 E81601 call dmpr1 0 000089F3 83C604 add si, byte 2*2 ; skip FS+GS 0 000089F6 41 inc cx ; (= 1) 0 000089F7 E80F01 call dmpr1 ; display IP 0 000089FA E87B01 call stosb_if_rr_compat ; third blank if MS Debug compat 0 000089FD E8FD01 call dmpflags ; display flags in 16-bit display 0 00008A00 EB1A jmp short .lastrowdone 1733 .secondrow32: 0 00008A02 57 push di 0 00008A03 B90200 mov cx, 2 ; display rest of 32-bit standard regs 0 00008A06 E80001 call dmpr1 0 00008A09 56 push si 0 00008A0A E8F001 call dmpflags ; display flags in 32-bit display 0 00008A0D E8[0000] call putsline_crlf 0 00008A10 5E pop si 0 00008A11 5F pop di ; (reset di) 0 00008A12 B90600 mov cx, 6 ; display all segment registers 0 00008A15 E8F100 call dmpr1 0 00008A18 41 inc cx ; (= 1) 0 00008A19 E8ED00 call dmpr1 ; display EIP 1746 .lastrowdone: 0 00008A1C E8[0000] call trimputs 1748 1749 %if _REGSHIGHLIGHT 0 00008A1F BE[0000] mov si, regs 0 00008A22 BF[0000] mov di, regs_prior 0 00008A25 B9[0000] mov cx, regs_prior.size_w 0 00008A28 F3A5 rep movsw ; update prior regs save area 1754 %endif 1755 %if _IMMASM 0 00008A2A C3 retn 1757 1758 1759 dumpregs_disasm: 1760 %endif 1761 %if !_LOADER 1762 ; Set U address to CS:(E)IP. 0 00008A2B BE[0000] mov si, reg_eip 0 00008A2E BF[0000] mov di, u_addr 0 00008A31 A5 movsw ; first word of saOffset 1766 %if saSegSel == 4 0 00008A32 A5 movsw ; second word of saOffset 1768 %endif 0 00008A33 A1[0000] mov ax, word [reg_cs] 0 00008A36 AB stosw ; saSegSel 1771 %if _PM 1772 call ispm 1773 jnz .86m 1774 .pm: 1775 scasw ; skip saSegment, sto to saSelector 1776 .86m: 1777 stosw ; (if jumped to .86m) saSegment 1778 @@: 1779 %endif 1780 0 00008A37 B80300 mov ax, DIS_F_REPT | DIS_F_SHOW 0 00008A3A F606[0300]10 testopt [options], rr_disasm_no_rept 0 00008A3F 7402 jz @F 0 00008A41 24FE and al, ~ DIS_F_REPT 1785 @@: 0 00008A43 F606[0300]20 testopt [options], rr_disasm_no_show 0 00008A48 7402 jz @F 0 00008A4A 24FD and al, ~ DIS_F_SHOW 1789 @@: 0 00008A4C A3[0000] mov word [disflags], ax 0 00008A4F E8[0000] call disasm 1792 1793 ; Set ABO to address after the dumpregs disassembly. 0 00008A52 BF[0000] mov di, behind_r_u_addr 0 00008A55 BE[0000] mov si, u_addr 0 00008A58 A5 movsw ; first word of saOffset 1797 %if saSegSel == 4 0 00008A59 A5 movsw ; second word of saOffset 1799 %endif 0 00008A5A A5 movsw ; saSegSel 1801 %if _PM 1802 movsw ; saSegment 1803 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. 0 00008A5B BE[0000] mov si, reg_eip 0 00008A5E A5 movsw ; first word of saOffset 1814 _386_PM movsw ; second word of saOffset 1815 1816 1817 %if _ACCESS_VARIABLES_AMOUNT 1818 dumpregs_set_access_variables: 0 00008A5F 31C0 xor ax, ax 0 00008A61 BF[1400] mov di, reading_access_variables 0 00008A64 B92000 mov cx, words(_ACCESS_VARIABLES_AMOUNT * 8 * 2) 0 00008A67 F3AB rep stosw 1823 0 00008A69 8B0E[0000] mov cx, [memrefs.free] 0 00008A6D E349 jcxz .none 0 00008A6F 31F6 xor si, si 1827 .loop: 0 00008A71 89F3 mov bx, si 0 00008A73 E8[0000] call get_memref_index_bx 0 00008A76 8B87[0A00] mov ax, word [memrefs + bx + mrFlags] 0 00008A7A A801 test al, mrfBranchDirect 0 00008A7C 7537 jnz .next 0 00008A7E 31D2 xor dx, dx ; 0 = reading 0 00008A80 A840 test al, mrfStringSource 0 00008A82 751C jnz .gotmsg 0 00008A84 42 inc dx ; 1 = writing 0 00008A85 A880 test al, mrfStringDest 0 00008A87 7517 jnz .gotmsg 0 00008A89 88C2 mov dl, al 0 00008A8B 80E20C and dl, mrfMemSource | mrfMemDest 0 00008A8E 80FA0C cmp dl, mrfMemSource | mrfMemDest 0 00008A91 B202 mov dl, 2 ; 2 = r/w 0 00008A93 740B je .gotmsg 0 00008A95 31D2 xor dx, dx ; 0 = reading 0 00008A97 A804 test al, mrfMemSource 0 00008A99 7505 jnz .gotmsg 0 00008A9B 42 inc dx ; 1 = writing 0 00008A9C A808 test al, mrfMemDest 1849 ; jnz .gotmsg 0 00008A9E 7415 jz .next 1851 .gotmsg: 1852 0 00008AA0 84D2 test dl, dl 0 00008AA2 740B jz .read 1855 1856 .write: 0 00008AA4 BF[3400] mov di, writing_access_variables 0 00008AA7 E80F00 call add_access_variable 0 00008AAA 80FA01 cmp dl, 1 0 00008AAD 7406 je .next 1861 1862 .read: 0 00008AAF BF[1400] mov di, reading_access_variables 0 00008AB2 E80400 call add_access_variable 1865 1866 .next: 0 00008AB5 46 inc si 0 00008AB6 E2B9 loop .loop 1869 .none: 1870 %endif 1871 %endif 0 00008AB8 C3 retn 1873 1874 1875 %if _ACCESS_VARIABLES_AMOUNT 1876 add_access_variable: 0 00008AB9 93 xchg ax, bx 0 00008ABA 31DB xor bx, bx 1879 .loop: 0 00008ABC 83790400 cmp word [di + bx + 4], 0 0 00008AC0 7525 jne .next 0 00008AC2 83790600 cmp word [di + bx + 4 + 2], 0 0 00008AC6 751F jne .next 0 00008AC8 93 xchg ax, bx 0 00008AC9 FFB7[0200] push word [memrefs + bx + mrLinear + 2] 0 00008ACD FFB7[0000] push word [memrefs + bx + mrLinear] 0 00008AD1 FFB7[0E00] push word [memrefs + bx + mrLength + 2] 0 00008AD5 FFB7[0C00] push word [memrefs + bx + mrLength] 0 00008AD9 93 xchg ax, bx 0 00008ADA 8F4104 pop word [di + bx + 4] 0 00008ADD 8F4106 pop word [di + bx + 4 + 2] 0 00008AE0 8F01 pop word [di + bx] 0 00008AE2 8F4102 pop word [di + bx + 2] 0 00008AE5 93 xchg ax, bx 0 00008AE6 C3 retn 1896 1897 .next: 0 00008AE7 83C308 add bx, 8 0 00008AEA 83FB20 cmp bx, _ACCESS_VARIABLES_AMOUNT * 8 0 00008AED 72CD jb .loop 0 00008AEF 93 xchg ax, bx 0 00008AF0 C3 retn 1903 1904 1905 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 1905 ------------------ note: usesection lDEBUG_DATA_ENTRY 1906 align 4, db 0 1907 reading_access_variables: 0 00005448 00 times _ACCESS_VARIABLES_AMOUNT * 8 db 0 1909 1910 writing_access_variables: 0 00005468 00 times _ACCESS_VARIABLES_AMOUNT * 8 db 0 1912 1913 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 1913 ------------------ note: usesection lDEBUG_CODE 1914 %endif 1915 1916 1917 %if _RH 1918 enable_rh: 0 00008AF1 F606[0200]10 testopt [options6], opt6_rh_mode 0 00008AF6 7405 jz @F 0 00008AF8 800E[0200]10 setopt [internalflags6], dif6_rh_mode ; NZ 1922 @@: 0 00008AFD C3 retn 1924 1925 enable_rh_2: 0 00008AFE E8F0FF call enable_rh 0 00008B01 74FA jz @B 0 00008B03 800E[0200]20 setopt [internalflags6], dif6_rh_mode_2 0 00008B08 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 0 00008B09 8D9C[0000] lea bx, [word si + reg16names] 1947 wlcalc word_subr_0, equ $ - 2 1948 %else 1949 lea bx, [si-(reg16names+DATASECTIONFIXUP)] 1950 %endif 0 00008B0D 01DB add bx, bx ; index * 4 0 00008B0F 807C0153 cmp byte [si+1], 'S' ; segment register ? 0 00008B13 740A je .no_e ; always 16-bit --> (ZR) 0 00008B15 F606[0000]01 testopt [options], dispregs32 ; display 32-bit register ? 0 00008B1A 7403 jz .no_e ; no --> (ZR) 0 00008B1C B045 mov al, 'E' 0 00008B1E AA stosb ; store E for Exx register name 1958 .no_e: 0 00008B1F A5 movsw ; store register name, increase pointer 0 00008B20 B03D mov al, '=' 0 00008B22 AA stosb ; store equality sign 0 00008B23 742E jz .no_high ; (ZF left from before) 1963 1964 %if _REGSHIGHLIGHT 0 00008B25 8026[0200]FE clropt [internalflags3], dif3_highlighting 0 00008B2A 8B87[0200] mov ax, word [regs + bx + 2] 0 00008B2E 8B97[0200] mov dx, word [regs_prior + bx + 2] 0 00008B32 F606[0200]04 testopt [options3], opt3_r_highlight_full 0 00008B37 7417 jz @F 0 00008B39 39C2 cmp dx, ax 0 00008B3B 7510 jne .highlighthigh 0 00008B3D 52 push dx 0 00008B3E 50 push ax 0 00008B3F 8B87[0000] mov ax, word [regs + bx] 0 00008B43 8B97[0000] mov dx, word [regs_prior + bx] 0 00008B47 39C2 cmp dx, ax 0 00008B49 58 pop ax 0 00008B4A 5A pop dx 0 00008B4B 7403 je @F 1980 .highlighthigh: 0 00008B4D E83F00 call highlight 1982 @@: 0 00008B50 E86A00 call hexword_diff ; store high word (only if 32-bit register) 1984 .no_high: 0 00008B53 8B87[0000] mov ax, word [regs + bx] 0 00008B57 8B97[0000] mov dx, word [regs_prior + bx] 0 00008B5B F606[0200]04 testopt [options3], opt3_r_highlight_full 0 00008B60 7407 jz @F 0 00008B62 39C2 cmp dx, ax 0 00008B64 7403 je @F 0 00008B66 E82600 call highlight 1992 @@: 0 00008B69 E85100 call hexword_diff ; store low word 1994 0 00008B6C 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 0 00008B6F B020 mov al, 32 0 00008B71 AA stosb ; store space 0 00008B72 E80300 call stosb_if_rr_compat ; another blank if MS Debug compat 0 00008B75 E292 loop . 0 00008B77 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: 0 00008B78 F606[0200]08 testopt [options2], opt2_rr16_compat 0 00008B7D 740F jz .ret 0 00008B7F F606[0000]01 testopt [options], dispregs32 0 00008B84 7508 jnz .ret 2031 %if _40COLUMNS 0 00008B86 F606[0100]10 testopt [options6], opt6_40_columns 0 00008B8B 7501 jnz .ret 2034 %endif 0 00008B8D AA stosb 2036 .ret: 0 00008B8E C3 retn 2038 2039 2040 %if _REGSHIGHLIGHT 2041 highlight: 0 00008B8F F606[0200]01 testopt [internalflags3], dif3_highlighting 0 00008B94 750F jnz @F 0 00008B96 800E[0200]01 setopt [internalflags3], dif3_highlighting 0 00008B9B 56 push si 0 00008B9C 51 push cx 0 00008B9D BE[0000] mov si, msg.highlight 0 00008BA0 E8[0000] call copy_single_counted_string 0 00008BA3 59 pop cx 0 00008BA4 5E pop si 2051 @@: 0 00008BA5 C3 retn 2053 2054 unhighlight: 0 00008BA6 F606[0200]01 testopt [internalflags3], dif3_highlighting 0 00008BAB 740F jz @F 0 00008BAD 8026[0200]FE clropt [internalflags3], dif3_highlighting 0 00008BB2 56 push si 0 00008BB3 51 push cx 0 00008BB4 BE[0000] mov si, msg.unhighlight 0 00008BB7 E8[0000] call copy_single_counted_string 0 00008BBA 59 pop cx 0 00008BBB 5E pop si 2064 @@: 0 00008BBC C3 retn 2066 2067 hexword_diff: 0 00008BBD F606[0200]01 testopt [options3], opt3_r_highlight_diff 0 00008BC2 7407 jz @F 0 00008BC4 F606[0200]04 testopt [options3], opt3_r_highlight_full 0 00008BC9 7403 jz @FF 2072 @@: 0 00008BCB E9[0000] jmp hexword 2074 2075 @@: 2076 .hexword: 0 00008BCE 86C4 xchg al, ah 0 00008BD0 86D6 xchg dl, dh 0 00008BD2 E80400 call .hexbyte 0 00008BD5 86C4 xchg al, ah 0 00008BD7 86D6 xchg dl, dh 2082 2083 .hexbyte: 0 00008BD9 51 push cx 0 00008BDA B104 mov cl, 4 0 00008BDC D2C0 rol al, cl 0 00008BDE D2C2 rol dl, cl 0 00008BE0 E80500 call .hexnyb 0 00008BE3 D2C0 rol al, cl 0 00008BE5 D2C2 rol dl, cl 0 00008BE7 59 pop cx 2092 2093 .hexnyb: 0 00008BE8 50 push ax 0 00008BE9 88D4 mov ah, dl 0 00008BEB 250F0F and ax, 0F0Fh 0 00008BEE 38E0 cmp al, ah 0 00008BF0 7405 je .unhighlight 2099 .highlight: 0 00008BF2 E89AFF call highlight 0 00008BF5 EB03 jmp .common 2102 2103 .unhighlight: 0 00008BF7 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 0 00008BFA 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 0 00008BFD 55 push bp 0 00008BFE BD[0000] mov bp, flagbits_for_80 2150 wlcalc word_opext_shl_flagbits_for_shl, equ $ - 2 0 00008C01 EB04 jmp @F 2152 .40: 0 00008C03 55 push bp 0 00008C04 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 0 00008C07 52 push dx 0 00008C08 53 push bx 2169 %endif 0 00008C09 BE[0000] mov si, flagbits 0 00008C0C B9[0000] mov cx, flagbits.amount 0 00008C0F AD .loop: lodsw 2173 %if _40COLUMNS 0 00008C10 D1E5 shl bp, 1 0 00008C12 7352 jnc .next 2176 %endif 2177 %if _REGSHIGHLIGHT 2178 %if _LINK 0 00008C14 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 0 00008C18 21C2 and dx, ax 0 00008C1A 8B1E[0000] mov bx, word [reg_efl] 0 00008C1E 21C3 and bx, ax 0 00008C20 39DA cmp dx, bx 0 00008C22 7411 je @F 0 00008C24 F606[0200]05 testopt [options3], opt3_r_highlight_diff | opt3_r_highlight_full 0 00008C29 740A jz @F 0 00008C2B F606[0200]02 testopt [internalflags3], dif3_do_not_highlight 0 00008C30 7503 jnz @F 0 00008C32 E85AFF call highlight 2195 @@: 0 00008C35 85DB test bx, bx 2197 %else 2198 test ax, word [reg_efl] 2199 %endif 2200 2201 2202 %if _LINK 0 00008C37 8B84[FEFF] mov ax, word [word si+(flagsoff)-2] 2204 wlcalc word_minusext_flagbits, equ $ - 2 2205 %if _REGSREADABLEFLAGS 0 00008C3B 8B9C[FEFF] mov bx, word [word si+(flagsoff_style2)-2] 2207 wlcalc word_minusext_flagbits, equ $ - 2 0 00008C3F 8B94[FEFF] mov dx, word [word si+(flagsoff_style3)-2] 2209 wlcalc word_minusext_flagbits, equ $ - 2 2210 %endif 0 00008C43 740A jz .off ; if not set 0 00008C45 8B84[FEFF] mov ax, word [word si+(flagson)-2] 2213 wlcalc word_minusext_flagbits, equ $ - 2 2214 %if _REGSREADABLEFLAGS 0 00008C49 8B9C[FEFF] mov bx, word [word si+(flagson_style23)-2] 2216 wlcalc word_minusext_flagbits, equ $ - 2 0 00008C4D 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 0 00008C4F F606[0300]20 testopt [options6], opt6_r_flags_style2 0 00008C54 7401 jz @F 0 00008C56 93 xchg ax, bx 2243 @@: 0 00008C57 F606[0300]40 testopt [options6], opt6_r_flags_style3 0 00008C5C 7401 jz @F 0 00008C5E 92 xchg ax, dx 2247 @@: 2248 %endif 0 00008C5F AB stosw 2250 %if _REGSHIGHLIGHT 0 00008C60 E843FF call unhighlight 2252 %endif 0 00008C63 B020 mov al, 32 0 00008C65 AA stosb 2255 .next: 0 00008C66 E2A7 loop .loop 0 00008C68 4F dec di ; -> last (unnecessary) blank 2258 %if _REGSHIGHLIGHT || _REGSREADABLEFLAGS 0 00008C69 5B pop bx 0 00008C6A 5A pop dx 2261 %endif 2262 %if _40COLUMNS 0 00008C6B 5D pop bp 2264 %endif 0 00008C6C C3 retn 2266 2267 2268 %if _40COLUMNS 2269 dmpshortflags: 2270 %if _REGSHIGHLIGHT 0 00008C6D 52 push dx 0 00008C6E 53 push bx 2273 %endif 0 00008C6F BE[0000] mov si, shortflagbits 0 00008C72 B9[0000] mov cx, shortflagbits.amount 0 00008C75 AD .loop: lodsw 2277 %if _REGSHIGHLIGHT 2278 %if _LINK 0 00008C76 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 0 00008C7A 21C2 and dx, ax 0 00008C7C 8B1E[0000] mov bx, word [reg_efl] 0 00008C80 21C3 and bx, ax 0 00008C82 39DA cmp dx, bx 0 00008C84 7411 je @F 0 00008C86 F606[0200]05 testopt [options3], opt3_r_highlight_diff | opt3_r_highlight_full 0 00008C8B 740A jz @F 0 00008C8D F606[0200]02 testopt [internalflags3], dif3_do_not_highlight 0 00008C92 7503 jnz @F 0 00008C94 E8F8FE call highlight 2295 @@: 0 00008C97 85DB test bx, bx 2297 %else 2298 test ax, word [reg_efl] 2299 %endif 2300 %if _LINK 0 00008C99 8B84[FEFF] mov ax, word [word si+(shortflagsoff)-2] 2302 wlcalc word_minusext_shortflagbits, equ $ - 2 0 00008C9D 7404 jz .off ; if not set 0 00008C9F 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 0 00008CA3 AA .off: stosb 2312 %if _REGSHIGHLIGHT 0 00008CA4 E8FFFE call unhighlight 2314 %endif 0 00008CA7 B020 mov al, 32 0 00008CA9 AA stosb 2317 .next: 0 00008CAA E2C9 loop .loop 2319 %if _REGSHIGHLIGHT 0 00008CAC 5B pop bx 0 00008CAD 5A pop dx 2322 %endif 0 00008CAE C3 retn 2324 %endif 2325 2326 2327 %if _OPTIONS || _VARIABLES 2328 dumpvars: 2329 %if _VARIABLES 0 00008CAF BE[0000] mov si, vregs 2331 %endif 0 00008CB2 31DB xor bx, bx 2333 .loop: 0 00008CB4 BF[0000] mov di, line_out 0 00008CB7 31D2 xor dx, dx 2336 %if _VARIABLES 0 00008CB9 B90400 mov cx, 4 0 00008CBC E88D00 call .dump ; display four variables 0 00008CBF 43 inc bx ; (would be one off here) 0 00008CC0 56 push si 2341 %else 2342 add bx, byte 4 ; (no motivation to optimize that) 2343 %endif 2344 %if _OPTIONS 2345 %if _VARIABLES 0 00008CC1 B020 mov al, 32 0 00008CC3 AA stosb ; more blanks inbetween 2348 %endif 0 00008CC4 80FB10 cmp bl, 16 0 00008CC7 7439 je .3 0 00008CC9 80FB08 cmp bl, 8 0 00008CCC 7721 ja .2 0 00008CCE 7411 je .1 2354 2355 ; First line, display DCO and DCS 2356 .0: 0 00008CD0 B8434F mov ax, "CO" 0 00008CD3 BE[0000] mov si, options 0 00008CD6 E86200 call .dump_option 0 00008CD9 B84353 mov ax, "CS" 0 00008CDC BE[0000] mov si, startoptions 0 00008CDF EB36 jmp short .next 2363 2364 ; Second line, DAO and DAS 2365 .1: 2366 %if !_LOADER 0 00008CE1 B8414F mov ax, "AO" 0 00008CE4 BE[0000] mov si, asm_options 0 00008CE7 E85100 call .dump_option 0 00008CEA B84153 mov ax, "AS" 2371 ; asm_startoptions follows directly behind asm_options 0 00008CED EB28 jmp short .next 2373 %else 2374 jmp short .nextskip 2375 %endif 2376 2377 ; Third line, DIF and DPI 2378 .2: 0 00008CEF B84946 mov ax, "IF" 0 00008CF2 BE[0000] mov si, internalflags 0 00008CF5 E84300 call .dump_option 0 00008CF8 B85049 mov ax, "PI" 2383 %if !_LOADER 0 00008CFB BE[0000] mov si, psp22 0 00008CFE 42 inc dx 0 00008CFF 42 inc dx 0 00008D00 EB15 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: 0 00008D02 42 inc dx 0 00008D03 B85052 mov ax, "PR" 0 00008D06 BE[0000] mov si, pspdbg 0 00008D09 E82F00 call .dump_option 2400 %if _PM 2401 xor ax, ax 2402 call ispm 2403 jnz .3_rm 2404 push ds 2405 db __TEST_IMM8 ; (skip push) 2406 .3_rm: 2407 push ax 2408 mov ax, "PS" 2409 mov si, sp 2410 call .dump_options 2411 pop ax 2412 %else 0 00008D0C B82020 mov ax, 32<<8|32 0 00008D0F AB stosw 0 00008D10 AB stosw 2416 %endif 2417 %if !_LOADER 0 00008D11 B85050 mov ax, "PP" 0 00008D14 BE[0000] mov si, parent 2420 %else 2421 jmp short .nextskip 2422 %endif 2423 2424 .next: 0 00008D17 E82100 call .dump_options 2426 .nextskip: 2427 %endif 0 00008D1A 53 push bx 0 00008D1B E8[0000] call putsline_crlf ; display line 0 00008D1E 5B pop bx ; (retain counter) 2431 %if _VARIABLES 0 00008D1F 5E pop si ; (retain pointer to next variable) 2433 %endif 0 00008D20 80FB10 cmp bl, 16 ; was end ? 0 00008D23 758F jne .loop ; no, loop --> 2436 2437 ; done 2438 .mode: 0 00008D25 BA[0000] mov dx, msg.rv_mode.before 0 00008D28 E8[0000] call putsz 2441 %if _PM 2442 call ispm 2443 jnz .mode_86m 2444 mov dx, msg.rv_mode_dpmi_16 2445 mov bx, word [reg_cs] 2446 call test_d_b_bit 2447 jz @F 2448 mov dx, msg.rv_mode_dpmi_32 2449 jmp @F 2450 2451 .mode_86m: 2452 %endif 0 00008D2B 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+.) 0 00008D2E 0F01E0 _386 smsw ax 0 00008D31 A801 _386 test al, 1 0 00008D33 7403 _386 jz @F 0 00008D35 BA[0000] _386 mov dx, msg.rv_mode_v86m 2461 @@: 0 00008D38 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: 0 00008D3B C7052044 mov word [di], " D" 0 00008D3F AF scasw 2475 %else 2476 mov byte [di], ' ' 2477 inc di 2478 .dump_option: 2479 mov byte [di], 'D' 2480 inc di 2481 %endif 0 00008D40 AB stosw 2483 %if _VARIABLES ; falls through otherwise, always count 1 0 00008D41 B90100 mov cx, 1 2485 %if _RSEPARATE 0 00008D44 B600 mov dh, 0 2487 %endif 0 00008D46 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: 0 00008D48 43 inc bx 0 00008D49 B020 mov al, 32 0 00008D4B AA stosb 2541 .dump: 0 00008D4C B056 mov al, 'V' 0 00008D4E AA stosb 0 00008D4F 88D8 mov al, bl 0 00008D51 E8[0000] call hexnyb 2546 %if _RSEPARATE 0 00008D54 B6FF mov dh, -1 2548 %endif 2549 %endif 2550 .dump_one: 0 00008D56 B03D mov al, '=' 0 00008D58 AA stosb 0 00008D59 AD lodsw 0 00008D5A 80FA01 cmp dl, 1 0 00008D5D 7416 je .dumpw 0 00008D5F 50 push ax 0 00008D60 AD lodsw 0 00008D61 9C pushf 0 00008D62 E8[0000] call hexword 0 00008D65 9D popf ; CF 0 00008D66 7205 jb .nocolon 0 00008D68 B03A mov al, ':' 0 00008D6A AA stosb 2564 %if _RSEPARATE 0 00008D6B EB07 jmp @F 2566 .nocolon: 0 00008D6D 84F6 test dh, dh 0 00008D6F 7903 jns @F 0 00008D71 E835F5 call rseparate 2570 @@: 2571 %else 2572 .nocolon: 2573 %endif 0 00008D74 58 pop ax 2575 .dumpw: 0 00008D75 E8[0000] call hexword 2577 %if _VARIABLES 0 00008D78 E2CE loop .dump_loop 2579 %endif 0 00008D7A C3 retn 2581 %endif 2582 2583 2584 dumpallvars: 0 00008D7B AC lodsb 0 00008D7C E8[0000] call chkeol 0 00008D7F BE[0000] mov si, vregs 0 00008D82 31DB xor bx, bx 2589 .loop: 0 00008D84 BF[0000] mov di, line_out 0 00008D87 B90400 mov cx, 4 0 00008D8A 31D2 xor dx, dx 0 00008D8C E81500 call .dump ; display four variables 0 00008D8F 43 inc bx ; (would be one off here) 0 00008D90 85D2 test dx, dx 0 00008D92 7407 jz @F 0 00008D94 56 push si 0 00008D95 53 push bx 0 00008D96 E8[0000] call putsline_crlf ; display line 0 00008D99 5B pop bx ; (retain counter) 0 00008D9A 5E pop si ; (retain pointer to next variable) 2602 @@: 0 00008D9B 84DB test bl, bl ; was end ? 0 00008D9D 75E5 jnz .loop ; no, loop --> 0 00008D9F C3 retn 2606 2607 .dump_loop: 0 00008DA0 43 inc bx 0 00008DA1 B020 mov al, 32 0 00008DA3 AA stosb 2611 .dump: 0 00008DA4 B056 mov al, 'V' 0 00008DA6 AA stosb 0 00008DA7 88D8 mov al, bl 0 00008DA9 E8[0000] call hexbyte 2616 .dump_one: 0 00008DAC B03D mov al, '=' 0 00008DAE AA stosb 0 00008DAF AD lodsw 0 00008DB0 09C2 or dx, ax 0 00008DB2 50 push ax 0 00008DB3 AD lodsw 0 00008DB4 09C2 or dx, ax 0 00008DB6 E8[0000] call hexword 2625 %if _RSEPARATE 0 00008DB9 E8EDF4 call rseparate 2627 %endif 0 00008DBC 58 pop ax 0 00008DBD E8[0000] call hexword 0 00008DC0 E2DE loop .dump_loop 0 00008DC2 C3 retn 2632 2633 2634 dumpmemory: 0 00008DC3 AC lodsb 0 00008DC4 E8[0000] call chkeol 2637 0 00008DC7 A1[0000] mov ax, word [code_seg] 2639 %if _PM 2640 mov dx, word [code_sel] 2641 %endif 0 00008DCA BE[0000] mov si, msg.vm_codeseg 0 00008DCD E82800 call .line 2644 2645 %if _DUALCODE 2646 mov ax, word [code2_seg] 2647 %if _PM 2648 mov dx, word [code2_sel] 2649 %endif 2650 mov si, msg.vm_code2seg 2651 call .line 2652 %endif 2653 2654 %if _PM 2655 mov ax, word [pspdbg] 2656 mov dx, ss 2657 %else 0 00008DD0 8CD0 mov ax, ss 2659 %endif 0 00008DD2 BE[0000] mov si, msg.vm_dataseg 0 00008DD5 E82000 call .line 2662 2663 %if _PM 2664 mov ax, word [pspdbg] 2665 mov dx, word [cssel] 2666 %else 0 00008DD8 8CD0 mov ax, ss 2668 %endif 0 00008DDA BE[0000] mov si, msg.vm_entryseg 0 00008DDD E81800 call .line 2671 2672 %if _MESSAGESEGMENT 0 00008DE0 A1[0000] mov ax, word [messageseg] 2674 %if _PM 2675 mov dx, word [messagesel] 2676 %endif 0 00008DE3 BE[0000] mov si, msg.vm_messageseg 0 00008DE6 E80F00 call .line 2679 %endif 2680 2681 %if _PM 2682 mov ax, word [auxbuff_segorsel + soaSegment] 2683 mov dx, word [auxbuff_segorsel + soaSelector] 2684 %else 0 00008DE9 A1[0000] mov ax, word [auxbuff_segorsel] 2686 %endif 0 00008DEC BE[0000] mov si, msg.vm_auxseg 2688 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00008DEF E80600 call .line 2690 2691 %if _PM 2692 mov ax, word [history.segorsel + soaSegment] 2693 mov dx, word [history.segorsel + soaSelector] 2694 %else 0 00008DF2 A1[0000] mov ax, word [history.segorsel] 2696 %endif 0 00008DF5 BE[0000] mov si, msg.vm_hisseg 2698 %endif 2699 2700 .line: 0 00008DF8 BF[0000] mov di, line_out 0 00008DFB E8[0000] call copy_single_counted_string 0 00008DFE E8[0000] call hexword 2704 %if _PM 2705 call ispm 2706 jnz @F 2707 mov si, msg.vm_selector 2708 call copy_single_counted_string 2709 xchg ax, dx 2710 call hexword 2711 @@: 2712 %endif 0 00008E01 E9[0000] jmp putsline_crlf 2714 2715 2716 dumpprocess: 0 00008E04 AC lodsb 0 00008E05 E8[0000] call chkeol 2719 2720 %if !_LOADER 2721 %if _PM 2722 nearcall var_psps_setup 2723 %endif 0 00008E08 E8[0000] nearcall var_ppr_setup 0 00008E0B E8[0000] nearcall var_ppi_setup 2726 %endif 2727 2728 %if _BOOTLDR 0 00008E0E BA[0000] mov dx, msg.rvp_boot 2730 %if _APPLICATION || _DEVICE 0 00008E11 F606[0100]40 testopt [internalflags], nodosloaded 0 00008E16 7523 jnz @F 2733 %else 2734 jmp @F 2735 %endif 2736 %endif 2737 2738 %if _DEVICE 2739 %if _APPLICATION 0 00008E18 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00008E1D 740F jz .notdevice 2742 %endif 2743 2744 %if _ATTACH 0 00008E1F BA[0000] mov dx, msg.rvp_device_attached 0 00008E22 F606[0200]40 testopt [internalflags], tsrmode 0 00008E27 7412 jz @F 2748 %endif 0 00008E29 BA[0000] mov dx, msg.rvp_device 2750 %if _APPLICATION 0 00008E2C EB0D jmp @F 2752 %endif 2753 %endif 2754 2755 %if _APPLICATION 2756 .notdevice: 2757 %if _TSR 0 00008E2E BA[0000] mov dx, msg.rvp_tsr 0 00008E31 F606[0200]40 testopt [internalflags], tsrmode 0 00008E36 7503 jnz @F 2761 %endif 0 00008E38 BA[0000] mov dx, msg.rvp_application 2763 %endif 2764 @@: 0 00008E3B E8[0000] call putsz 2766 0 00008E3E BF[0000] mov di, line_out 2768 2769 %if !_LOADER 0 00008E41 A1[0000] mov ax, word [pspdbe] 0 00008E44 BE[0000] mov si, msg.vp_pspsegment 0 00008E47 E84800 call .line 2773 0 00008E4A A1[0000] mov ax, word [psp_parent] 0 00008E4D BE[0000] mov si, msg.vp_parent 0 00008E50 E83F00 call .line 2777 0 00008E53 A1[0200] mov ax, word [psp_pra + 2] 0 00008E56 BE[0000] mov si, msg.vp_pra 0 00008E59 E83600 call .line 0 00008E5C B03A mov al, ':' 0 00008E5E AA stosb 0 00008E5F A1[0000] mov ax, word [psp_pra] 0 00008E62 E8[0000] call hexword 2785 2786 %if _PM 2787 mov ax, word [psp_selector] 2788 mov si, msg.vp_pspsel 2789 call .line 2790 %endif 0 00008E65 E8[0000] call putsline_crlf 2792 %endif 2793 0 00008E68 BF[0000] mov di, line_out 2795 0 00008E6B A1[0000] mov ax, word [pspdbg] 0 00008E6E BE[0000] mov si, msg.vp_dpspsegment 0 00008E71 E81E00 call .line 2799 2800 %if !_LOADER 0 00008E74 A1[0000] mov ax, word [parent] 0 00008E77 BE[0000] mov si, msg.vp_dparent 0 00008E7A E81500 call .line 2804 0 00008E7D A1[0200] mov ax, word [psp22 + 2] 0 00008E80 BE[0000] mov si, msg.vp_dpra 0 00008E83 E80C00 call .line 0 00008E86 B03A mov al, ':' 0 00008E88 AA stosb 0 00008E89 A1[0000] mov ax, word [psp22] 0 00008E8C E8[0000] call hexword 2812 %endif 2813 2814 %if _PM 2815 mov ax, ss 2816 mov si, msg.vp_dpspsel 2817 call .line 2818 %endif 0 00008E8F E9[0000] jmp putsline_crlf 2820 2821 .line: 0 00008E92 E8[0000] call copy_single_counted_string 0 00008E95 E9[0000] jmp hexword 2824 2825 2826 dumpdevice: 0 00008E98 AC lodsb 0 00008E99 E8[0000] call chkeol 2829 2830 %if _APPLICATION || _BOOTLDR 2831 %if _DEVICE 0 00008E9C F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00008EA1 7507 jnz @F 2834 %endif 0 00008EA3 BA[0000] mov dx, msg.rvd_not_device 0 00008EA6 E8[0000] call putsz 0 00008EA9 C3 retn 2838 %endif 2839 2840 %if _DEVICE 2841 @@: 0 00008EAA A1[0200] mov ax, word [device_header_address + 2] 0 00008EAD BE[0000] mov si, msg.rvd_deviceheader 0 00008EB0 E81500 call .line 0 00008EB3 B03A mov al, ':' 0 00008EB5 AA stosb 0 00008EB6 A1[0000] mov ax, word [device_header_address] 0 00008EB9 E8[0000] call hexword 2849 0 00008EBC A1[0000] mov ax, word [device_mcb_paragraphs] 0 00008EBF BE[0000] mov si, msg.rvd_size 0 00008EC2 E80300 call .line 0 00008EC5 E9[0000] jmp putsline_crlf 2854 2855 .line: 0 00008EC8 E8[0000] call copy_single_counted_string 0 00008ECB E9[0000] jmp hexword 2858 %endif 2859 2860 2861 %if _RH 2862 dumphistory: 0 00008ECE E8[0000] call guard_re 2864 %if _PM 2865 mov ax, word [auxbuff_switchbuffer_size] 2866 %else 0 00008ED1 31C0 xor ax, ax 2868 %endif 0 00008ED3 A3[0000] mov word [auxbuff_start_silent], ax 0 00008ED6 E8[0000] call skipcomma 2871 0 00008ED9 C606[0000]00 mov byte [rh_display_with_count], 0 0 00008EDE 4E dec si 0 00008EDF BA[0000] mov dx, msg.count 0 00008EE2 E8[0000] call isstring? 0 00008EE5 7508 jne .not_count 2877 0 00008EE7 F616[0000] not byte [rh_display_with_count] 0 00008EEB E8[0000] call skipcomma 0 00008EEE 4E dec si 2881 2882 .not_count: 0 00008EEF BA[0000] mov dx, msg.in 0 00008EF2 E8[0000] call isstring? 0 00008EF5 754F jne .not_in 2886 0 00008EF7 E8[0000] call skipcomma 0 00008EFA 4E dec si 0 00008EFB 56 push si 2890 2891 .in.loop: 0 00008EFC E8[0000] call skipwhite 0 00008EFF 4E dec si 2894 0 00008F00 E8[0000] nearcall get_value_range; OUT: cx:di = from, bx:dx = to 0 00008F03 7307 jnc @F 0 00008F05 7502 jnz .error 0 00008F07 E30B jcxz .in.next 2899 .error: 0 00008F09 E9[0000] jmp error 2901 2902 @@: 0 00008F0C E302 jcxz @F 0 00008F0E EBF9 jmp .error 2905 2906 @@: 0 00008F10 85DB test bx, bx 0 00008F12 75F5 jnz .error 2909 2910 .in.next: 2911 @@: 0 00008F14 E8[0000] call skipwh0 0 00008F17 3C2C cmp al, ',' 0 00008F19 74E1 je .in.loop 0 00008F1B E8[0000] call chkeol 0 00008F1E 5E pop si 2917 2918 .indo.loop: 0 00008F1F E8[0000] call skipwhite 0 00008F22 4E dec si 2921 0 00008F23 E8[0000] nearcall get_value_range; OUT: cx:di = from, bx:dx = to 0 00008F26 7213 jc .indo.next 2924 0 00008F28 89D3 mov bx, dx 0 00008F2A 89FA mov dx, di 0 00008F2C A8 db __TEST_IMM8 ; (skip dec) 2928 @@: 0 00008F2D 4B dec bx 0 00008F2E 52 push dx 0 00008F2F 53 push bx 0 00008F30 56 push si 0 00008F31 E84300 call .do 0 00008F34 5E pop si 0 00008F35 5B pop bx 0 00008F36 5A pop dx 0 00008F37 39D3 cmp bx, dx 0 00008F39 77F2 ja @B 2939 2940 .indo.next: 0 00008F3B 4E dec si 0 00008F3C E8[0000] call skipwhite 0 00008F3F 3C2C cmp al, ',' 0 00008F41 74DC je .indo.loop 2945 .ret: 0 00008F43 C3 retn 2947 2948 .ret_pop: 0 00008F44 58 pop ax 0 00008F45 C3 retn 2951 2952 2953 .not_in: 0 00008F46 AC lodsb 0 00008F47 E8[0000] call iseol? 0 00008F4A 7443 je .simple 0 00008F4C E8[0000] nearcall getword 0 00008F4F 89D3 mov bx, dx 0 00008F51 E8[0000] call iseol? 0 00008F54 7421 je .one 0 00008F56 E8[0000] nearcall getword 0 00008F59 E8[0000] call chkeol 0 00008F5C 53 push bx 0 00008F5D E8[0000] nearcall var_rhcount_setup 2965 ; mov ax, [bx] 0 00008F60 5B pop bx 0 00008F61 53 push bx 0 00008F62 29C3 sub bx, ax ; cmp bx, ax 0 00008F64 720D jb .several_below ; if bx below amount --> 0 00008F66 85D2 test dx, dx ; special: zero ? 0 00008F68 7405 jz .several_first_ax 0 00008F6A 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. 0 00008F6B 29DA sub dx, bx ; = how many remain 0 00008F6D 76D5 jbe .ret_pop ; <= 0 remain, do nothing 2978 ; if > 0 remain 2979 .several_first_ax: 0 00008F6F 5B pop bx 0 00008F70 93 xchg bx, ax 0 00008F71 4B dec bx 0 00008F72 A8 db __TEST_IMM8 ; (skip pop) 2984 2985 .several_below: 0 00008F73 5B pop bx 0 00008F74 92 xchg ax, dx 0 00008F75 EB0C jmp .several 2989 2990 .do: 2991 .one: 0 00008F77 53 push bx 0 00008F78 E8[0000] nearcall var_rhcount_setup 2994 ; mov ax, [bx] 0 00008F7B 5B pop bx 0 00008F7C 39C3 cmp bx, ax 0 00008F7E 73C3 jae .ret 2998 0 00008F80 B80100 mov ax, 1 3000 .several: 0 00008F83 891E[0000] mov word [rh_count_number], bx 0 00008F87 43 inc bx 0 00008F88 891E[0000] mov word [tt_silent_mode_number], bx 0 00008F8C E9[0000] jmp silence_dump.rh 3005 3006 .simple: 0 00008F8F E8[0000] nearcall var_rhcount_setup 3008 ; mov ax, [bx] 0 00008F92 48 dec ax 0 00008F93 A3[0000] mov word [rh_count_number], ax 0 00008F96 8326[0000]00 and word [tt_silent_mode_number], 0 0 00008F9B E9[0000] jmp silence_dump.rh.all 3013 %endif 3014 ..@rr_access_end: === Trace listing source: ../lst/debug.obj/run.lst 1 2 %if 0 3 4 lDebug code and commands (P, T, G) to run debuggee code 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 "run.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00005490 ???????? eldhSignature: resb 4 ; "ELD1" 0 00005494 ?????? resb 3 ; reserved 0 00005497 ?? resb 1 ; 26 (Ctrl-Z) 0 00005498 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000549C ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 0000549E ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 000054A0 ???????? eldhDataOffset: resd 1 0 000054A4 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 000054A6 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000054A8 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000054AA ???????? eldhReserved: resb 4 ; reserved 0 000054AE ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 000054B0 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000054B4 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000054B8 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000054BC ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00005490 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00005498 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000549C ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 0000549E ???? 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 0 00005490 ???? 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 0 00005492 ???? eldltAmount: resw 1 0 00005494 ???????? 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 0 00005490 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00005492 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00005494 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00005496 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00005498 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 000054A0 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00005490 ???? eldlSignature: resw 1 ; 0E1D1h 0 00005492 ???????? eldlReserved: resw 2 0 00005496 ???? eldlUseLinkHash: resw 1 0 00005498 ???? eldlDataAmount: resw 1 0 0000549A ???? eldlDataPrefixes: resw 1 0 0000549C ???? eldlDataEntries: resw 1 0 0000549E ???? eldlDataAddresses: resw 1 0 000054A0 ???? eldlCodeAmount: resw 1 0 000054A2 ???? eldlCodePrefixes: resw 1 0 000054A4 ???? eldlCodeEntries: resw 1 0 000054A6 ???? 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 0 00005490 ???? ifKeyword: resw 1 0 00005492 ???? ifDescription: resw 1 0 00005494 ???? ifOptions: resw 1 0 00005496 ???? ifValue: resw 1 0 00005498 ???? ifTrying: resw 1 0 0000549A ???? 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 0 00005490 ???????? saOffset: resd 1 0 00005494 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00005490 ???? so16aOffset: resw 1 0 00005492 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00005490 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00005490 ?????? bsJump: resb 3 0 00005493 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00005490 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00005492 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00005493 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00005495 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00005496 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 00005498 ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000549A ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000549B ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 0000549D ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 0000549F ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 000054A1 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 000054A5 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 000054A9 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 000054AD ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 000054AF ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 000054B1 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 000054B5 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 000054B7 ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00005490 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00005491 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00005492 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00005493 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 000054A2 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00005490 ???????????????? deName: resb 8 0 00005498 ?????? deExt: resb 3 0 0000549B ?? deAttrib: resb 1 0 0000549C ?? dePlusSize: resb 1 0 0000549D ?????????????? resb 7 0 000054A4 ???? deClusterHigh: resw 1 0 000054A6 ???? deTime: resw 1 0 000054A8 ???? deDate: resw 1 0 000054AA ???? deClusterLow: resw 1 0 000054AC ???????? 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 0 100005480 ???????? lsvFirstCluster: resd 1 0 100005484 ???????? lsvFATSector: resd 1 0 100005488 ???? lsvFATSeg: resw 1 0 10000548A ???? lsvLoadSeg: resw 1 0 10000548C ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100005470 ???? ldMemoryTop: resw 1 0 100005472 ???? ldLoadTop: resw 1 0 100005474 ???? ldSectorSeg: resw 1 0 100005476 ?? ldFATType: resb 1 92 <2> ldFlags: 0 100005477 ?? ldHasLBA: resb 1 0 100005478 ???? ldClusterSize: resw 1 0 10000547A ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 10000547C ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 10000547E ?? .partition: resb 1 ; byte 0 10000547F ?? .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 <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 0 100005460 ???????? ldRootSector: resd 1 0 100005464 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 100005466 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 100005468 ???? ldParasLeft: resw 1 0 10000546A ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 100005450 ???????? ldMaxCluster: resd 1 0 100005454 ???????? ldFileSize: resd 1 0 100005458 ???????? ldCurrentCluster: resd 1 0 10000545C ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00005490 ???????? liiSignature: resb 4 ; "NLDR" 0 00005494 ???? liiVersion: resb 2 ; "00" 0 00005496 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 00005498 ???? liiAmountParagraphs: resw 1 0 0000549A ???????????? liiReserved: resw 3 0 000054A0 ???? 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 0 000054A2 ???? 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 0 000054A4 ???? 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 0 000054A6 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00005490 ???? lpSize: resw 1 0 00005492 ???? lpCount: resw 1 0 00005494 ???????? lpBuffer: resd 1 0 00005498 ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00005490 ?? piBoot: resb 1 0 00005491 ?????? piStartCHS: resb 3 0 00005494 ?? piType: resb 1 0 00005495 ?????? piEndCHS: resb 3 0 00005498 ???????? piStart: resd 1 0 0000549C ???????? 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 0 00005490 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00005492 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00005494 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00005496 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 00005498 ???? lsOptions: resw 1 ; option flags 0 0000549A ???? lsSegment: resw 1 ; => where to load file 0 0000549C ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 000054A0 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 000054A4 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 000054A6 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 000054A8 ???????????????? 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 0 00005490 ???? exact_struc_at 00h, exeSignature: resw 1 0 00005492 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00005494 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00005496 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 00005498 ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 0000549A ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 0000549C ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 0000549E ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 000054A0 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 000054A2 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 000054A4 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 000054A6 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 000054A8 ???? 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. 0 000054AA ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00005490 ???? ifhHandle: resw 1 0 00005492 ???? ifhFlags: resw 1 0 00005494 ???????? 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 <1> areastrucEntry: resb 24 0 000054A8 ???????? areastrucNext: resd 1 0 000054AC ???????? areastrucPrev: resd 1 0 000054B0 ???? areastrucSubAmount: resw 1 0 000054B2 ???? areastrucSubOffset: resw 1 0 000054B4 ???? areastrucFunAmount: resw 1 0 000054B6 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00005490 ???????? areastrucsubLinear: resd 1 0 00005494 ???????? areastrucsubLinearEnd: resd 1 0 00005498 ???? areastrucsubListOffset: resw 1 0 0000549A ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00005490 ???????? areastrucfunLinear: resd 1 0 00005494 ???????? areastrucfunLinearEnd: resd 1 0 00005498 ???? areastrucfunListOffset: resw 1 0 0000549A ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00005490 ???? areastart: resw 1 0 00005492 ???? areaend: resw 1 0 00005494 ???? areamessage: resw 1 0 00005496 ???? 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 0 00005490 ???? 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.) 0 00005492 ???? ivFlags: resw 1 0 00005494 ???? 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. 0 00005496 ???? 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 0 00005498 ?? 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. 0 00005499 ?? 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 0 00005490 ???????? mrLinear: resd 1 0 00005494 ???????? mrOffset: resd 1 0 00005498 ???? mrSegmentSelector: resw 1 0 0000549A ???? mrFlags: resw 1 0 0000549C ???????? 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 0 00005490 ???????? .size_: resd 1 0 00005494 ???? .srchdl: resw 1 0 00005496 ???????? .srcadr: resd 1 0 0000549A ???? .dsthdl: resw 1 0 0000549C ???????? .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 %endif 21 22 23 %if _LINK_COMPAT && _LOADER 24 usesection lDEBUG_DATA_ENTRY 25 align 16, db 0 26 %endif 27 28 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 28 ------------------ note: usesection lDEBUG_CODE 29 30 ..@run_access_start: 31 32 %if _LOADER 33 gg: 34 dec si 35 dec si 36 mov dx, msg.goto 37 call isstring? 38 je cmd_goto 39 mov dx, msg.godebug 40 call isstring? 41 je godebug 42 inc si 43 lodsb 44 call chkeol 45 cmp byte [currentposition], 2 ; hidden ? 46 je .runjust ; keep hooks --> 47 xor bp, bp 48 call moveloader_check_serial ; check unhook int 2Dh, serial 49 50 mov dx, msg.move_int_error 51 mov ax, 0293h 52 test bp, bp 53 jnz .specificerror 54 55 testopt [serial_flags], sf_init_done ; uninit serial I/O 56 jz @F 57 call serial_clean_up ; unhook interrupt 58 clropt [serial_flags], sf_init_done | sf_use_serial 59 ; clear (in case return to cmd3) 60 ; clropt [options], enable_serial ; do not output to serial any longer 61 ; Leave DCO flag set so as to re-init serial I/O 62 ; if we're ever executed again. 63 @@: 64 testopt [internalflags4], dif4_int_serial_hooked 65 jz .done_serial 66 call serial_uninstall_interrupt_handler 67 jnc .done_serial ; if it succeeded --> 68 69 mov di, msg.serial_cannot_unhook.int 70 mov al, byte [serial_installed_intnum] 71 call hexbyte 72 mov dx, msg.serial_cannot_unhook.nowarn 73 mov byte [serial_interrupt_handler + ieEOI], 0 74 ; we do not issue EOI any longer 75 mov ax, 0294h 76 .specificerror: 77 jmp moveloader.specificerror 78 79 .done_serial: 80 testopt [internalflags4], dif4_int_2D_hooked 81 jz .done_2D 82 mov si, int2D 83 mov al, 2Dh 84 mov dx, opt4_int_2D_force >> 16 85 call UnhookInterruptForce 86 jnc @F 87 mov word [msg.serial_cannot_unhook.int], "2D" 88 mov dx, msg.serial_cannot_unhook.nowarn 89 mov ax, 0295h 90 jmp .specificerror 91 92 @@: 93 clropt [internalflags4], dif4_int_2D_hooked 94 call update_inttab_optional 95 ; (NC) 96 .done_2D: 97 98 .runjust: 99 jmp run 100 101 godebug: 102 call skipwhite 103 call chkeol 104 105 cmp byte [currentposition], 2 106 je @F 107 mov dx, msg.loader_must_be_hidden 108 mov ax, 028Ah 109 .specificerror: 110 push ss 111 pop ds 112 push ss 113 pop ds 114 call setrc 115 jmp putsz_error 116 117 @@: 118 mov es, word [reg_cs] 119 mov di, word [reg_eip] 120 push cs 121 pop ds 122 mov si, entrypattern 123 mov cx, entrypattern.size 124 repe cmpsb 125 je .foundentry 126 mov dx, msg.loader_extra 127 mov ax, 028Bh 128 jmp .specificerror 129 130 .foundentry: 131 push ss 132 pop ds 133 mov es, word [reg_ss] 134 mov di, word [reg_ebp] ; -> lsv 135 mov cx, word [es:di + lsvLoadSeg] 136 mov ax, word [reg_cs] 137 add ax, paras(4096) ; minimum expected 138 jc .overflow 139 cmp cx, ax 140 jae @F 141 .overflow: 142 mov dx, msg.loader_loadseg_low 143 mov ax, 028Dh 144 jmp .specificerror 145 @@: 146 mov ax, word [reg_cs] 147 add ax, paras(24 * 1024) ; clamp here 148 jc @F 149 cmp cx, ax 150 jbe @F 151 mov cx, ax 152 @@: 153 mov ax, word [reg_cs] 154 sub cx, ax ; = amount paragraphs 155 .scanloop: 156 mov es, ax 157 xor di, di 158 push cx 159 mov si, msg.loadsupportsignature 160 mov cx, msg.loadsupportsignature.size 161 repe cmpsb 162 pop cx 163 je .foundsignature 164 inc ax 165 loop .scanloop 166 mov dx, msg.loader_sign 167 mov ax, 028Eh 168 jmp .specificerror 169 170 .foundsignature: 171 test byte [es:di], -1 172 jz .noflag 173 mov dx, msg.loader_flag 174 mov ax, 028Fh 175 jmp .specificerror 176 177 .noflag: 178 xor ax, ax 179 mov word [reg_eax], ax ; pass ax as zero 180 mov di, word [reg_esp] 181 mov ax, word [reg_ebp] 182 mov es, word [reg_ss] 183 mov bx, ax 184 sub ax, di 185 ja @FF 186 @@: 187 mov dx, msg.loader_stack 188 mov ax, 028Ch 189 jmp .specificerror 190 @@: 191 cmp ax, - LOADSTACKVARS 192 jb @BB 193 cmp ax, - lsvCommandLine 194 jae @F 195 sub word [reg_esp], 4 196 and word [es:bx + lsvCommandLine], 0 197 and word [es:bx + lsvExtra], 0 198 @@: 199 200 setopt [es:bx + lsvExtra.flags], lsvefPreserveLoader 201 add word [reg_eip], entrypattern.size 202 clropt [reg_efl], 100h | 200h | 400h ; clear TF, IF and DF 203 push ss 204 pop es 205 jmp run 206 207 208 entrypattern: 209 .: ; Expected at 200h:400h to allow passing a 210 ; nonzero lsvExtra to the initial loader. 211 ; This code is skipped if found. 212 cli 213 cld 214 xor ax, ax 215 push ax 216 mov word [bp + lsvExtra], ax 217 push ax 218 .size equ $ - . 219 220 221 %endif 222 223 %if !_LOADER 224 gg_repeat: 0 00008F9E E8[0000] call guard_re 0 00008FA1 800E[0000]20 setopt [internalflags2], dif2_gg_again 0 00008FA6 EB17 jmp @F 228 229 ; G command - go. 230 gg: 0 00008FA8 4E dec si 0 00008FA9 4E dec si 0 00008FAA BA[0000] mov dx, msg.goto 0 00008FAD E8[0000] call isstring? 0 00008FB0 7503E9[0000] je cmd_goto 0 00008FB5 46 inc si 0 00008FB6 AC lodsb 238 0 00008FB7 E8[0000] call guard_re 240 0 00008FBA 8026[0000]DF clropt [internalflags2], dif2_gg_again 242 @@: 0 00008FBF C706[0000][0000] mov word [gg_deferred_message], msg.empty_message 0 00008FC5 8326[0000]00 and word [bb_deferred_message_in_lineout_behind], 0 245 0 00008FCA BB[0000] mov bx, dmycmd 0 00008FCD F606[0200]02 testopt [options], gg_no_autorepeat 0 00008FD2 7503 jnz @F 0 00008FD4 BB[0000] mov bx, gg_repeat 250 @@: 0 00008FD7 891E[0000] mov word [lastcmd], bx 252 0 00008FDB 800E[0000]08 setopt [internalflags2], dif2_gg_is_gg 0 00008FE0 8026[0000]E8 clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 257 0 00008FE5 FF36[0000] push word [reg_cs] ; save original CS 0 00008FE9 8F06[0400] pop word [eqladdr+4] 0 00008FED E84615 call parseql ; process =addr 261 0 00008FF0 F606[0200]01 testopt [options], gg_do_not_skip_bp 0 00008FF5 752A jnz .do_not_skip_cseip 0 00008FF7 800E[0000]01 setopt [internalflags2], dif2_gg_is_first 265 0 00008FFC 803E[0000]00 cmp byte [eqflag], 0 0 00009001 7507 jne .cseip_take_eql 268 269 _386_PM_o32 ; xor ecx, ecx 0 00009003 31C9 xor cx, cx 0 00009005 E8F907 call get_cseip_ecx_linear 0 00009008 EB0B jmp .got_cseip 273 274 .cseip_take_eql: 0 0000900A 8B1E[0400] mov bx, word [eqladdr + 4] 276 _386_PM_o32 ; mov edx, dword [eqladdr] 0 0000900E 8B16[0000] mov dx, word [eqladdr] 0 00009012 E8F607 call getlinear_d_b 279 .got_cseip: 0 00009015 7303E9[0000] jc error 0 0000901A A3[0000] mov word [gg_first_cseip_linear], ax 0 0000901D 8916[0200] mov word [gg_first_cseip_linear + 2], dx 283 .do_not_skip_cseip: 284 285 %ifn _NUM_G_BP 286 call chkeol 287 288 testopt [options3], opt3_gg_no_paging 289 jz @F 290 clropt [internalflags], pagedcommand 291 @@: 292 call tpg_initialise_empty_auxbuff 293 294 %if _BREAKPOINTS 295 call bb_writepoints_init_reset 296 %endif 297 298 %else 0 00009021 4E dec si 0 00009022 E8[0000] call skipcomma 0 00009025 4E dec si 0 00009026 BA[0000] mov dx, msg.again 0 00009029 E8[0000] call isstring? 0 0000902C 752B jne @F ; (after this, do not dec si!) 305 306 gg_again: 307 308 %if _WHILEBUFFSIZE < (BPSIZE * _NUM_G_BP + 1) 309 %error WHILE buffer not large enough for gg breakpoint list 310 %endif 311 0 0000902E 56 push si 0 0000902F BE[0000] mov si, g_bplist.used_count 0 00009032 31C0 xor ax, ax 0 00009034 AC lodsb ; ax = number of breakpoints set yet 0 00009035 4E dec si ; -> gg breakpoint list 0 00009036 89C1 mov cx, ax 0 00009038 01C9 add cx, cx 0 0000903A 01C9 add cx, cx ; * 4 320 %if BPSIZE == 4 321 %elif BPSIZE == 5 322 add cx, ax ; * 5 323 %elif BPSIZE == 6 0 0000903C 01C1 add cx, ax ; * 5 0 0000903E 01C1 add cx, ax ; * 6 326 %elif BPSIZE == 9 327 add cx, cx ; * 8 328 add cx, ax ; * 9 329 %else 330 %error Unexpected breakpoint size 331 %endif 0 00009040 41 inc cx ; include the count 0 00009041 BF[0000] mov di, while_buffer ; es:di -> WHILE buffer 0 00009044 F3A4 rep movsb ; initialise WHILE buffer list 335 0 00009046 5E pop si ; si -> separator after "AGAIN" keyword 0 00009047 BF[0100] mov di, while_buffer + 1 ; -> first point 0 0000904A 89C1 mov cx, ax 0 0000904C B0CC mov al, 0CCh 0 0000904E E306 jcxz .end 341 .loop: 0 00009050 83C705 add di, BPSIZE - 1 ; -> point content 0 00009053 AA stosb ; initialise breakpoint content 0 00009054 E2FA loop .loop 345 .end: 346 ; es:di -> after last breakpoint in array 0 00009056 E99000 jmp gg3 ; parse additional points (do not dec si!) 348 349 @@: 0 00009059 F606[0000]20 testopt [internalflags2], dif2_gg_again 0 0000905E 75CE jnz gg_again 352 353 354 gg_list: 0 00009060 BA[0000] mov dx, msg.list 0 00009063 E8[0000] call isstring? 0 00009066 757B jne .not 358 0 00009068 AC lodsb 0 00009069 E8[0000] call chkeol 361 0 0000906C 800E[0000]05 setopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip 363 0 00009071 BE[0000] mov si, g_bplist.bp 0 00009074 31C9 xor cx, cx 0 00009076 8A4CFF mov cl, byte [si - 1] 0 00009079 31DB xor bx, bx 0 0000907B E360 jcxz .none 369 .loop: 0 0000907D 43 inc bx 0 0000907E 51 push cx 0 0000907F 53 push bx 373 0 00009080 89D8 mov ax, bx ; 1-based index 0 00009082 BF[0000] mov di, line_out 0 00009085 E8E906 call ordinalbyte 377 0 00009088 57 push di 0 00009089 81EF[0300] sub di, line_out + 1 + 2 380 ; 1 = a digit, 2 = ordinal suffix, 381 ; result = how many additional digits are used 0 0000908D BA[0000] mov dx, msg.list_bp.first 0 00009090 01FA add dx, di 0 00009092 E8[0000] call putsz ; show blanks first 0 00009095 5F pop di 0 00009096 E8[0000] call putsline 387 0 00009099 E84704 call gg_bb_lods_bp_linear 389 ; BPSIZE implied 390 0 0000909C BF[0000] mov di, msg.list_bp.address1 0 0000909F 92 xchg ax, dx 0 000090A0 E8[0000] call hexword 0 000090A3 47 inc di 395 ; mov di, msg.list_bp.address2 0 000090A4 92 xchg ax, dx 0 000090A5 E8[0000] call hexword 398 0 000090A8 E88C06 call gg_bb_check_is_first 400 ; we set up the dif2_gg_skip_cseip flag, 0 000090AB B9[0000] mov cx, msg.list_bp_not_cseip 402 ; so if CY (do not skip), initialise this 0 000090AE 7203 jc .not_cseip 404 ; if NC (do skip), use other string 405 %if _PM 406 push bx 407 mov bx, word [reg_cs] 408 cmp byte [eqflag], 0 409 je @F 410 mov bx, word [eqladdr + 4] 411 @@: 412 call test_d_b_bit 413 pop bx 414 mov cx, msg.list_bp_cseip_32 415 jnz @F ; if 32-bit cs --> 416 %endif 0 000090B0 B9[0000] mov cx, msg.list_bp_csip_16 418 @@: 419 .not_cseip: 420 %if BPSIZE == 6 || BPSIZE == 9 421 ; INP: dx:ax = linear address 422 ; si -> (d)word offset 423 ; di -> where to store 424 ; OUT: cx = length displayed 425 ; si -> after offset 426 ; di -> after stored string 427 ; CHG: ax, dx 0 000090B3 51 push cx 0 000090B4 BF[0000] mov di, line_out 0 000090B7 E8[0000] call bp_display_offset ; BPSIZE implied 0 000090BA 57 push di 432 %endif 0 000090BB BF[0000] mov di, msg.list_bp.value 0 000090BE AC lodsb ; BPSIZE implied 0 000090BF E8[0000] call hexbyte 436 0 000090C2 BA[0000] mov dx, msg.list_bp.second 0 000090C5 E8[0000] call putsz 439 440 %if BPSIZE == 6 || BPSIZE == 9 0 000090C8 5F pop di 0 000090C9 E8[0000] call putsline 0 000090CC 59 pop cx 444 %endif 445 0 000090CD BA[0000] mov dx, msg.list_bp.third 0 000090D0 E8[0000] call putsz 448 0 000090D3 89CA mov dx, cx 0 000090D5 E8[0000] call putsz 451 0 000090D8 5B pop bx 0 000090D9 59 pop cx 0 000090DA E2A1 loop .loop 455 .end: 456 ; mov dx, msg.list_bp_first_detected 457 ; testopt [internalflags2], dif2_gg_first_detected 458 ; jnz .putsz 0 000090DC C3 retn 460 461 .none: 0 000090DD BA[0000] mov dx, msg.list_bp_none 463 .putsz: 0 000090E0 E9[0000] jmp putsz 465 466 .not: 467 468 ; Store the address of each breakpoint into the buffer. We also 469 ; make sure that there aren't too many breakpoints. (The user can 470 ; specify them with 2 byte per breakpoints which gives about 128 471 ; breakpoints with a full command line.) The breakpoints will only 472 ; be set later when we have verified that the line contains no 473 ; syntax errors and that there aren't too many breakpoints. 474 ; 475 ; Note: With "G AGAIN" (or the gg_repeat handler), the user 476 ; can actually specify an arbitrary amount of 477 ; breakpoints. However, we limit the amount. 478 %if _WHILEBUFFSIZE < (BPSIZE * _NUM_G_BP + 1) 479 %error WHILE buffer not large enough for gg breakpoint list 480 %endif 0 000090E3 BF[0000] mov di, while_buffer ; es:di -> WHILE buffer 0 000090E6 31C0 xor ax, ax 0 000090E8 AA stosb ; counter of saved breakpoints 484 gg3: 485 ; dec si ; don't use skipcomm0 instead - need to restore al 0 000090E9 E8[0000] call skipcomma 0 000090EC E8[0000] call iseol? 0 000090EF 7442 je gg4 ; if done --> 489 0 000090F1 4E dec si 0 000090F2 BA[0000] mov dx, msg.remember 0 000090F5 E8[0000] call isstring? 0 000090F8 AC lodsb 0 000090F9 7510 jne @F 495 0 000090FB E8[0000] call chkeol 0 000090FE 89F9 mov cx, di ; -> after last point 0 00009100 BE[0000] mov si, while_buffer ; ds:si -> WHILE buffer 0 00009103 29F1 sub cx, si ; = size of list 0 00009105 BF[0000] mov di, g_bplist.used_count 501 ; es:di -> gg breakpoint list 0 00009108 F3A4 rep movsb ; copy list over 0 0000910A C3 retn 504 505 @@: 0 0000910B 8B1E[0400] mov bx, word [eqladdr+4]; default segment 0 0000910F E81C07 call getlinearaddr ; get linear address into bx:dx (CHG edx) 0 00009112 7303E9[0000] jc error 0 00009117 803E[0000]10 cmp byte [while_buffer], _NUM_G_BP 0 0000911C 7203E9[0000] jae error ; can't store another breakpoint, g_bplist is full --> 0 00009121 92 xchg ax, dx ; ax = low word 0 00009122 AB stosw 0 00009123 93 xchg ax, bx ; to store high byte/word 514 %if _PM 515 stosw 516 %else 0 00009124 AA stosb ; bits 24-31 (dh) always zero in 21-bit addresses 518 %endif 519 ; BPSIZE implied 520 %if BPSIZE == 6 0 00009125 A1[0000] mov ax, word [bp_offset] 0 00009128 AB stosw ; write offset (R86M-only 16-bit) 523 %elif BPSIZE == 9 524 mov ax, word [bp_offset] 525 stosw 526 mov ax, word [bp_offset + 2] 527 stosw ; write offset (PM 32-bit) 528 %endif 0 00009129 B0CC mov al, 0CCh 0 0000912B AA stosb ; later filled with the byte read from this address 0 0000912C FE06[0000] inc byte [while_buffer] ; increment count 0 00009130 4E dec si 0 00009131 EBB6 jmp short gg3 534 535 gg4: 0 00009133 89F9 mov cx, di ; -> after last point 0 00009135 BE[0000] mov si, while_buffer ; ds:si -> WHILE buffer 0 00009138 29F1 sub cx, si ; = size of list 0 0000913A BF[0000] mov di, g_bplist.used_count 540 ; es:di -> gg breakpoint list 0 0000913D F3A4 rep movsb ; copy list over 542 543 %if _RH 0 0000913F E8[0000] call enable_rh 545 %endif 546 0 00009142 F606[0000]08 testopt [options3], opt3_gg_no_paging 0 00009147 7405 jz @F 0 00009149 8026[0000]F7 clropt [internalflags], pagedcommand 550 @@: 551 552 gg5: 0 0000914E E8CF13 call tpg_initialise_empty_auxbuff 554 %if _BREAKPOINTS 0 00009151 E81104 call bb_writepoints_init_reset 556 ; try to write bb points 557 ; (detect and write to cseip point too) 558 ; If this fails, it handles the errors and tries to restore 559 ; all its own points, then aborts the command. 560 561 ; This call might return modeswitched. 562 %endif 0 00009154 BE[0000] mov si, g_bplist.used_count 0 00009157 31C0 xor ax, ax 0 00009159 AC lodsb ; si-> first point 0 0000915A 89C1 mov cx, ax ; cx = number of saved breakpoints 0 0000915C 51 push cx 0 0000915D E87B05 call gg_writepoints ; Store breakpoint bytes in the given locations. 0 00009160 5A pop dx 570 ; dx = number of points tried to write 571 ; cx = number of points not written 0 00009161 7342 jnc .points_set ; successful --> 573 574 575 ; Failure to write to a gg breakpoint. Now the fun starts! 0 00009163 29CA sub dx, cx ; = number of points written 0 00009165 89D1 mov cx, dx 578 ; We now first have to try restoring all the points we 579 ; already set because they might be inside the DOS or 580 ; BIOS handlers we would otherwise call. So instead of 581 ; displaying errors as we detect them, all the intel is 582 ; stored first until all points have been taken care of 583 ; (if possible). We then display error messages. 584 %if _BREAKPOINTS 0 00009167 83EC20 sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 586 ; reserve space for bb error info 587 %endif 0 0000916A 89E5 mov bp, sp ; -> behind gg error info, -> bb error info 0 0000916C 01D2 add dx, dx 0 0000916E 29D4 sub sp, dx ; reserve space for gg error info 0 00009170 50 push ax ; store error info on point that failed to be written 592 593 ; The gg points were written last, so restore them first. 0 00009171 E86F04 call gg_restorepoints_and_init_error_info 595 %if _BREAKPOINTS 0 00009174 51 push cx 597 ; Next, restore the bb points. 0 00009175 B91000 mov cx, _NUM_B_BP + _NUM_SYM_BP 599 ; = index above last one to restore 0 00009178 E8B804 call bb_restorepoints_and_init_error_info 0 0000917B 59 pop cx ; (preserve index of failed gg point) 602 %endif 0 0000917C 58 pop ax 604 0 0000917D E88F01 call put_deferred_message_silent 606 ; CHG: dx 607 608 ; ax = info on initially failed point 609 ; cx = 0-based index of initially failed point 610 ; = number of points tried to restore 0 00009180 89CE mov si, cx 0 00009182 01F6 add si, si 0 00009184 01F6 add si, si ; *4 614 %if BPSIZE == 4 615 %elif BPSIZE == 5 616 add si, cx ; * 5 617 %elif BPSIZE == 6 0 00009186 01CE add si, cx ; * 5 0 00009188 01CE add si, cx ; * 6 620 %elif BPSIZE == 9 621 add si, si ; * 8 622 add si, cx ; * 9 623 %else 624 %error Unexpected breakpoint size 625 %endif 0 0000918A 81C6[0000] add si, g_bplist.bp 627 628 ; si-> point 629 ; ax = info (ah = reason, al = new value if reason 3) 630 ; cx = 0-based index of initially failed point 0 0000918E 51 push cx 0 0000918F FF7402 push word [si + 2] 0 00009192 FF34 push word [si] ; stack: linear address 0 00009194 BB0080 mov bx, 8000h ; bh = 80h (gg), 635 ; bl = what we tried to restore (n/a) 0 00009197 E82B0F call display_breakpoint_failure 0 0000919A 59 pop cx 0 0000919B E82A06 call gg_handlefailedrestore 639 %if _BREAKPOINTS 0 0000919E E8F805 call bb_handlefailedrestore 0 000091A1 8D6620 lea sp, [bp + (_NUM_B_BP + _NUM_SYM_BP) * 2] 642 %else 643 mov sp, bp 644 %endif 645 ; (discard bb + gg error info) 0 000091A4 C3 retn 647 648 649 .points_set: 650 ; All bb and gg points were successfully written. 651 ; Next: Handle cseip case, if such a point has been detected. 652 653 654 ; old cseip breakpoint handling comment: 655 ; interrupt ? emuint : .isstdtrace (including DPMI hack, pushf handling) 656 657 %endif ; _NUM_G_BP 658 659 660 %if _NUM_G_BP || _BREAKPOINTS 0 000091A5 F606[0000]10 testopt [internalflags2], dif2_gg_first_detected 0 000091AA 7503E90A01 jz .only_run ; easy case, no cseip point detected --> 663 664 665 ; Enter special mode: Restore cseip breakpoint content. 0 000091AF 800E[0000]02 setopt [internalflags2], dif2_gg_skip_non_cseip 667 0 000091B4 89D1 mov cx, dx ; = number of points set 669 %if _BREAKPOINTS 0 000091B6 83EC20 sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 671 %endif 0 000091B9 89E5 mov bp, sp ; -> behind error info 673 %if _NUM_G_BP 0 000091BB 89CA mov dx, cx 0 000091BD 01D2 add dx, dx 0 000091BF 29D4 sub sp, dx 0 000091C1 E81F04 call gg_restorepoints_and_init_error_info 678 0 000091C4 7326 jnc .gg_restore_cseip_success 680 681 682 ; Error in gg_restorepoints. Try to restore other gg, all bb. 683 684 ; Exit special mode: Handle non-cseip breakpoints again. 0 000091C6 8026[0000]FD clropt [internalflags2], dif2_gg_skip_non_cseip 686 687 ; Enter special mode: Skip cseip breakpoints. 0 000091CB 800E[0000]04 setopt [internalflags2], dif2_gg_skip_cseip 689 690 ; As we already tried to restore all cseip gg points, 691 ; here we skip these in the gg_restorepoints call. 0 000091D0 E81304 call gg_restorepoints 693 694 ; Exit special mode: No longer skip cseip breakpoints. 0 000091D3 8026[0000]FB clropt [internalflags2], dif2_gg_skip_cseip 696 697 ; Any cseip bb points aren't yet restored, so do not skip them. 698 %if _BREAKPOINTS 0 000091D8 51 push cx 0 000091D9 B91000 mov cx, _NUM_B_BP + _NUM_SYM_BP 0 000091DC E85404 call bb_restorepoints_and_init_error_info 0 000091DF 59 pop cx 703 %endif 704 %else 705 jmp .gg_restore_cseip_success 706 %endif 707 708 .gg_bb_cseip_fail_common: 709 ; The failure that led us here is already noted in the info. 710 %if _NUM_G_BP 0 000091E0 E8E505 call gg_handlefailedrestore 712 %endif 713 %if _BREAKPOINTS 0 000091E3 E8B305 call bb_handlefailedrestore 715 %endif 716 %if _NUM_G_BP 717 %if _BREAKPOINTS 0 000091E6 8D6620 lea sp, [bp + (_NUM_B_BP + _NUM_SYM_BP) * 2] 719 %else 720 mov sp, bp 721 %endif 722 %elif _BREAKPOINTS 723 add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 724 %endif 0 000091E9 E9[0000] jmp cmd3 726 727 .gg_restore_cseip_success: 728 %if _BREAKPOINTS 0 000091EC B91000 mov cx, (_NUM_B_BP + _NUM_SYM_BP) 730 ; = index above last one to restore 0 000091EF E84104 call bb_restorepoints_and_init_error_info 0 000091F2 7322 jnc @F ; no error ? --> 733 734 ; Error in bb_restorepoints. Try to restore other gg, other bb. 735 736 ; Exit special mode: Handle non-cseip breakpoints again. 0 000091F4 8026[0000]FD clropt [internalflags2], dif2_gg_skip_non_cseip 738 739 ; Enter special mode: Skip cseip breakpoints. 0 000091F9 800E[0000]04 setopt [internalflags2], dif2_gg_skip_cseip 741 742 ; As we already tried to restore all cseip gg and bb points, 743 ; here we skip these in the bb_restorepoints call. 744 %if _NUM_G_BP 0 000091FE 31C9 xor cx, cx 0 00009200 8A0E[0000] mov cl, byte [g_bplist.used_count] 0 00009204 E8DF03 call gg_restorepoints 0 00009207 51 push cx 749 %endif 0 00009208 B91000 mov cx, _NUM_B_BP + _NUM_SYM_BP 0 0000920B E82804 call bb_restorepoints 752 %if _NUM_G_BP 0 0000920E 59 pop cx 754 %endif 755 756 ; Exit special mode: No longer skip cseip breakpoints. 0 0000920F 8026[0000]FB clropt [internalflags2], dif2_gg_skip_cseip 758 0 00009214 EBCA jmp .gg_bb_cseip_fail_common 760 761 @@: 762 ; Success! Now discard the reserved error info. 0 00009216 8D6620 lea sp, [bp + (_NUM_B_BP + _NUM_SYM_BP) * 2] 764 %else 765 mov sp, bp 766 %endif 767 768 ; Special mode restoration handled. Now trace one instruction. 769 ; (Proceed if repeated string op or interrupt.) 770 %if _PM 771 call resetmode 772 %endif 0 00009219 E83A13 call seteq ; make the = operand take effect 0 0000921C BA0F00 mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 0 0000921F 8B1E[0000] mov bx, word [reg_cs] 776 _386_PM_o32 ; mov esi, dword [reg_eip] 0 00009223 8B36[0000] mov si, word [reg_eip] 778 .pp2: 0 00009227 E8D90F call pp16 ; get next instruction byte into AL 0 0000922A BF[0000] mov di, ppbytes 0 0000922D B9[0000] mov cx, PPLEN_ONLY_STRING 782 %if _SYMBOLIC 783 mov byte [pp_instruction], al 784 %endif 0 00009230 F2AE repne scasb 0 00009232 7522 jne .not_p ; if not one of these --> 787 %if _LINK_COMPAT 0 00009234 8A85[FFFF] mov al,byte [word di+PPLEN-1]; get corresponding byte in ppinfo 789 %else 790 mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 791 %endif 0 00009238 A880 test al, PP_PREFIX ; prefix ? 0 0000923A 740E jz .pp3 ; no --> 0 0000923C 08C6 or dh, al ; set the OSIZE or ASIZE flags if either of these 795 ; Note: Multiple OSIZE in a 16-bit cs do not toggle 796 ; between decoding as O32 and O16, they're always 797 ; decoded as O32. The same is true for A32, and 798 ; in a 32-bit cs for O16 and A16. 0 0000923E FECA dec dl 0 00009240 75E5 jnz .pp2 ; if not out of bytes --> 0 00009242 C706[0000][0000] mov word [gg_deferred_message], msg.warnprefix 0 00009248 EB0C jmp .not_p 803 804 ; A repeatable string instruction is to be decoded. 805 ; Finish the decoding and skip the appropriate number 806 ; of opcode bytes. 807 .pp3: 808 _386_PM call pp_fix32bitflags 0 0000924A A847 test al, PP_VARSIZ | PP_SIZ_MASK 0 0000924C 7403E9[0000] jnz error 811 %if 0 812 test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 813 jz .ignoreosize ; no --> 814 and dh, 2 815 add al, dh 816 .ignoreosize: 817 and ax, PP_SIZ_MASK 818 _386_PM movzx eax, ax ; clear high word (in case it counts) 819 _386_PM_o32 ; add esi, eax 820 add si, ax 821 %endif 822 ; pp10: 823 %if _SYMBOLIC 824 call pp3_check_symhints 825 jc .not_p ; trace --> 826 %endif 827 ; jmp short pp11 ; we have a skippable instruction here 828 ; pp11: 829 _386_PM call test_d_b_bit 830 _386_PM jnz .32 ; full 32-bit offset valid --> 831 _386_PM movzx esi, si ; clear high word here 832 .32: 0 00009251 E8190F call proceedbreakpoint ; run until the breakpoint is hit 834 ; This call might return modeswitched. 0 00009254 EB03 jmp short @F 836 837 .not_p: 0 00009256 E8220A call traceone ; call common code 839 @@: 0 00009259 9C pushf 841 842 ; Exit special mode, do not skip non-cseip breakpoints anymore. 0 0000925A 8026[0000]FD clropt [internalflags2], dif2_gg_skip_non_cseip 844 845 ; Enter special mode: Skip matching/restoring cseip breakpoint. 0 0000925F 800E[0000]04 setopt [internalflags2], dif2_gg_skip_cseip 847 0 00009264 F6C47F test ah, 7Fh ; error happened during proceedbreakpoint ? 0 00009267 743D jz @F ; no --> 850 0 00009269 59 pop cx ; (discard flags on stack) 852 853 %if _NUM_G_BP 0 0000926A 31C9 xor cx, cx 0 0000926C 8A0E[0000] mov cl, byte [g_bplist.used_count] 856 %endif 857 858 %if _BREAKPOINTS 0 00009270 83EC20 sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 860 ; reserve space for bb error info 861 %endif 0 00009273 89E5 mov bp, sp ; -> behind gg error info, -> bb error info 863 %if _NUM_G_BP 0 00009275 89CA mov dx, cx 0 00009277 01D2 add dx, dx 0 00009279 29D4 sub sp, dx ; reserve space for gg error info 867 %endif 0 0000927B 50 push ax 869 %if _NUM_G_BP 0 0000927C E86403 call gg_restorepoints_and_init_error_info 871 %endif 872 %if _BREAKPOINTS 0 0000927F 51 push cx 0 00009280 B91000 mov cx, _NUM_B_BP + _NUM_SYM_BP 0 00009283 E8AD03 call bb_restorepoints_and_init_error_info 0 00009286 59 pop cx 877 %endif 878 ; Exit special mode: No longer skip cseip breakpoints. 0 00009287 8026[0000]FB clropt [internalflags2], dif2_gg_skip_cseip 0 0000928C 58 pop ax 0 0000928D 51 push cx 882 883 %if _PM 884 call resetmode 885 %endif 0 0000928E E87E00 call put_deferred_message_silent 887 0 00009291 FF36[0200] push word [tpg_proceed_bp + 2] 0 00009295 FF36[0000] push word [tpg_proceed_bp] 0 00009299 8A1E[0500] mov bl, [tpg_proceed_bp + BPSIZE - 1] 0 0000929D B700 mov bh, 0 ; proceed breakpoint 0 0000929F E8230E call display_breakpoint_failure 0 000092A2 59 pop cx 0 000092A3 E93AFF jmp .gg_bb_cseip_fail_common 895 896 897 @@: 0 000092A6 9D popf ; CF 899 0 000092A7 7218 jc .after_run ; an unexpected interrupt occured --> 901 0 000092A9 E83A00 call .after_run_restore ; restore stuff 0 000092AC E83B02 call gg_bb_check_hit ; expected interrupt matches our gg or bb ? 0 000092AF 731E jnc .expectedinterrupt ; yes, handle expected interrupt --> 905 906 907 ; Clear all special modes. Stop specialcasing cseip breakpoint. 0 000092B1 8026[0000]E8 clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 0 000092B6 E995FE jmp gg5 ; next write all points and run --> 912 %endif ; _NUM_G_BP || _BREAKPOINTS 913 914 .only_run: 915 ; Clear all special modes. Stop specialcasing cseip breakpoint. 0 000092B9 8026[0000]E8 clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 919 0 000092BE E8D20F call run ; Now run the program. 921 .after_run: 922 %if _NUM_G_BP || _BREAKPOINTS 0 000092C1 E82200 call .after_run_restore 924 0 000092C4 E82302 call gg_bb_check_hit 926 .after_gg_bb_check_hit: 0 000092C7 7306 jnc .expectedinterrupt 928 %endif ; _NUM_G_BP || _BREAKPOINTS 929 .unexpectedinterrupt: 930 %if _PM 931 call resetmode 932 %endif 0 000092C9 E84300 call put_deferred_message_silent 0 000092CC E97009 jmp unexpectedinterrupt ; print messages for unexpected breakpoint and quit. 935 936 %if _NUM_G_BP || _BREAKPOINTS 937 .expectedinterrupt: 0 000092CF E85F00 call adjust_cseip_after_breakpoint 939 ; it's one of our breakpoints, adjust (e)ip 940 0 000092D2 89C1 mov cx, ax ; handle_bb_* expects flags in cx 0 000092D4 50 push ax 0 000092D5 50 push ax ; handle_bb_* expects dword counter on stack 0 000092D6 E8A207 call handle_bb_hit_pass_match 0 000092D9 58 pop ax 0 000092DA 58 pop ax ; discard 0 000092DB 7203E96EFE jnc gg5 ; if it was a pass non-hit or non-pass non-hit 948 ; then jump back to do a subsequent G step 949 ; If jumping, the function has set up gg_first_cseip_linear 950 ; with the current CS:(E)IP so that the next step will start 951 ; out with skipping past the breakpoint(s) on that address. 952 ; Note that gg_bb_check_hit returns ax = 7 if a gg point is 953 ; hit, so we always fall through to .actual_hit here. 954 955 .actual_hit: 956 %if _PM 957 call resetmode 958 %endif 0 000092E0 E82C00 call put_deferred_message_silent 960 ; (put bb message after gg_bb_check_hit call) 0 000092E3 E9C90C jmp dumpregs_extended_silent 962 ; (handles sf_(double_)ctrl_c) 963 %endif 964 965 966 .after_run_restore: 967 %if _NUM_G_BP || _BREAKPOINTS 0 000092E6 83EC20 sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 969 ; reserve space for bb error info 0 000092E9 89E5 mov bp, sp ; -> behind gg error info, -> bb error info 971 %if _NUM_G_BP 0 000092EB 31C9 xor cx, cx 0 000092ED 8A0E[0000] mov cl, byte [g_bplist.used_count] 0 000092F1 89CA mov dx, cx 0 000092F3 01D2 add dx, dx 0 000092F5 29D4 sub sp, dx ; reserve space for gg error info 0 000092F7 E8E902 call gg_restorepoints_and_init_error_info 978 ; try restoring gg points, and fill error info 979 %endif 980 %if _BREAKPOINTS 0 000092FA 51 push cx 0 000092FB B91000 mov cx, _NUM_B_BP + _NUM_SYM_BP 983 ; = index above last one to restore 0 000092FE E83203 call bb_restorepoints_and_init_error_info 985 ; try restoring bb points, and fill error info 0 00009301 59 pop cx 987 %endif 988 989 %if _PM 990 call resetmode 991 %endif 0 00009302 E80A00 call put_deferred_message_silent 993 994 %if _NUM_G_BP 0 00009305 E8C004 call gg_handlefailedrestore 996 ; handle gg point restore failures 997 %endif 998 %if _BREAKPOINTS 0 00009308 E88E04 call bb_handlefailedrestore 1000 ; handle bb point restore failures 1001 %endif 1002 %if _NUM_G_BP 1003 %if _BREAKPOINTS 0 0000930B 8D6620 lea sp, [bp + (_NUM_B_BP + _NUM_SYM_BP) * 2] 1005 %else 1006 mov sp, bp ; remove the stack frame 1007 %endif 1008 %else 1009 add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 1010 %endif 1011 %endif ; _NUM_G_BP || _BREAKPOINTS 0 0000930E C3 retn 1013 1014 1015 ; INP: word [gg_deferred_message] 1016 ; word [bb_deferred_message_in_lineout_behind] 1017 ; OUT: variables reset to msg.empty_message 1018 ; messages displayed; first the gg one then the bb one 1019 ; CHG: dx 1020 ; STT: ds = es = ss 1021 ; 1022 ; Note: Uses putsz_silent and putsline_silent, meaning 1023 ; if silent mode is enabled, the messages are 1024 ; written to the silent buffer instead of displayed. 1025 put_deferred_message_silent: 0 0000930F BA[0000] mov dx, msg.empty_message 0 00009312 8716[0000] xchg dx, word [gg_deferred_message] 0 00009316 E8DA08 call putsz_silent 0 00009319 BA[750C] mov dx, putsline_silent 1030 1031 ; INP: dx = puts function to call, CHG ax, bx, cx, dx, di 1032 ; CHG: dx 1033 ; STT: ds = es = ss 1034 put_bb_deferred_message_calling_dx: 0 0000931C 57 push di 0 0000931D 31FF xor di, di 0 0000931F 873E[0000] xchg di, word [bb_deferred_message_in_lineout_behind] 0 00009323 85FF test di, di 0 00009325 7408 jz @F 0 00009327 50 push ax 0 00009328 53 push bx 0 00009329 51 push cx 0 0000932A FFD2 call dx 0 0000932C 59 pop cx 0 0000932D 5B pop bx 0 0000932E 58 pop ax 1047 @@: 0 0000932F 5F pop di 0 00009330 C3 retn 1050 1051 1052 ; INP: [internalflags2] & dif2_tpg_adjusted_cseip 1053 ; [internalflags2] & dif2_tpg_do_not_adjust 1054 ; word [reg_cs] 1055 ; (d)word [reg_eip] 1056 ; OUT: If both flags clear on input, 1057 ; set [internalflags2] & dif2_tpg_adjusted_cseip 1058 ; cs:(e)ip adjusted by decrementing (e)ip 1059 ; (It is only decremented by the first call to this 1060 ; function, which sets the flag in dif2.) 1061 ; Else, 1062 ; do nothing 1063 ; CHG: bx 1064 ; STT: ds = ss = debugger data selector 1065 adjust_cseip_after_breakpoint: 0 00009331 F606[0100]06 testopt [internalflags2], dif2_tpg_adjusted_cseip | dif2_tpg_do_not_adjust 0 00009336 7509 jnz .retn 0 00009338 800E[0100]02 setopt [internalflags2], dif2_tpg_adjusted_cseip 1070 _386_PM mov bx, word [reg_cs] 1071 _386_PM call resetmode_and_test_d_b_bit 1072 _386_PM jz .16 ; 16-bit cs --> 1073 _386_PM o32 ; dec dword [reg_eip] 1074 .16: 0 0000933D FF0E[0000] dec word [reg_eip] ; re-execute (restored) opcode one byte in front of this 1076 .retn: 0 00009341 C3 retn 1078 1079 1080 %ifn _BREAKPOINTS 1081 bb_check_hit: 1082 xor ax, ax 1083 stc 1084 retn 1085 %else 1086 ; INP: word [run_int] 1087 ; word [reg_cs] 1088 ; (d)word [reg_eip] 1089 ; bb breakpoints 1090 ; OUT: NC if a breakpoint was hit, 1091 ; (e)ip must be decremented by one 1092 ; word [bb_deferred_message_in_lineout_behind] set 1093 ; and line_out written if bb point matched 1094 ; (The bb point's index is already written to this msg.) 1095 ; ax & 1 set if non-pass match (actual hit), 1096 ; else ax & 2 set if pass match (consider as hit first, 1097 ; but dump registers next (not to silent buffer) 1098 ; and then continue execution) 1099 ; else ax & 4 always set, indicates any match 1100 ; (including matches that should merely continue) 1101 ; all pass points' counters stepped 1102 ; CY if no breakpoint was hit, 1103 ; ax = 0 1104 ; CHG: all 1105 ; STT: es = ds = ss 1106 bb_check_hit: 1107 lframe near 0 00009342 5589E5 lenter 0 00009345 31C0 xor ax, ax 1110 lequ 1, flag_trigger 1111 lequ 2, flag_pass 1112 lequ 4, flag_match 1113 lvar word, flags 0 00009347 50 push ax 1115 1116 ; Finish up. Check if it was one of _our_ breakpoints. 0 00009348 813E[0000][0000] cmp word [run_int], int3msg 0 0000934E 7505 jne @F ; if not interrupt 03h --> 1119 1120 ; Get previous cs:eip (where breakpoint was executed if any at all). 0 00009350 E82A05 call get_cseip_of_possible_breakpoint 1122 ; dx:ax = linear address of previous cs:eip 1123 ; bx = reg_cs 0 00009353 EB15 jmp .check 1125 1126 @@: 1127 ; For T/TP/P: if trace interrupt fired just while 1128 ; pointing at a bb point, do match. 0 00009355 813E[0000][0000] cmp word [run_int], int1msg 0 0000935B 7403E95101 jne .gg9 1131 0 00009360 800E[0100]04 setopt [internalflags2], dif2_tpg_do_not_adjust 1133 ; remember that we should not adjust 1134 _386_PM_o32 0 00009365 31C9 xor cx, cx 0 00009367 E89704 call get_cseip_ecx_linear 1137 ; get linear of this cs:(e)ip 1138 .check: 0 0000936A 7303E94201 jc .gg9 1140 1141 ; Store the matched address (if any) here in case of non-hit 1142 ; match. (Ie, non-hit pass match or non-hit non-pass match.) 0 0000936F A3[0000] mov word [gg_next_cseip_linear], ax 0 00009372 8916[0200] mov word [gg_next_cseip_linear + 2], dx 1145 0 00009376 87DA xchg bx, dx 0 00009378 91 xchg cx, ax ; bx:cx = linear address of previous cs:eip 0 00009379 31C0 xor ax, ax 1149 .loop: 0 0000937B 53 push bx 0 0000937C 50 push ax 0 0000937D E8[0000] call calcpointbit ; bx = index, ah = value 0 00009380 84A7[0000] test byte [b_bplist.used_mask+bx], ah 1154 ; (NC) 0 00009384 7503E91601 jz .next 0 00009389 84A7[0000] test byte [b_bplist.disabled_mask+bx], ah 1157 ; (NC) 0 0000938D 7403E90D01 jnz .next 0 00009392 58 pop ax 0 00009393 5B pop bx 0 00009394 53 push bx 0 00009395 50 push ax 0 00009396 89C6 mov si, ax 0 00009398 01F6 add si, si 0 0000939A 01F6 add si, si 1166 %if BPSIZE == 4 1167 %elif BPSIZE == 5 1168 add si, ax 1169 %elif BPSIZE == 6 0 0000939C 01C6 add si, ax ; * 5 0 0000939E 01C6 add si, ax ; * 6 1172 %elif BPSIZE == 9 1173 add si, si ; * 8 1174 add si, ax ; * 9 1175 %else 1176 %error Unexpected breakpoint size 1177 %endif 0 000093A0 81C6[0000] add si, b_bplist.bp ; -> point 1179 0 000093A4 E83C01 call gg_bb_lods_bp_linear 1181 0 000093A7 E88D03 call gg_bb_check_is_first 0 000093AA 7203E9F000 jnc .next 1184 0 000093AF 39C8 cmp ax, cx 0 000093B1 7403E9E900 jne .next 0 000093B6 39DA cmp dx, bx 0 000093B8 7403E9E200 jne .next 1189 1190 .hit: 0 000093BD 58 pop ax 0 000093BE 50 push ax 1193 0 000093BF 804EFE04 or byte [bp + ?flags], ?flag_match 1195 1196 %if _SYMBOLIC 1197 cmp ax, _NUM_B_BP ; is it a symbol breakpoint ? 1198 jb @F ; no --> 1199 1200 ; skip WHEN and counter handling for symbol breakpoints 1201 test byte [bp + ?flags], ?flag_trigger 1202 ; triggered yet ? 1203 jz .setup_trigger ; no, trigger now --> 1204 jmp .next ; yes, ignore --> 1205 1206 @@: 1207 %endif 0 000093C3 89C7 mov di, ax 0 000093C5 01FF add di, di 1210 0 000093C7 8BB5[0000] mov si, [b_bplist.when + di] 1212 ; si -> condition 0 000093CB 85F6 test si, si ; any ? 0 000093CD 741B jz @F ; no --> 1215 %if _PM 1216 call resetmode 1217 %endif 0 000093CF FF36[0000] push word [rc] 0 000093D3 8F06[0000] pop word [priorrc] 0 000093D7 AC lodsb 0 000093D8 E8[0000] nearcall getexpression ; parse stored expression 0 000093DB E8[0000] call chkeol 0 000093DE E8[0000] nearcall toboolean ; get boolean 0 000093E1 85D2 test dx, dx ; true ? 0 000093E3 7503E9B700 jz .next ; no, skip --> 0 000093E8 58 pop ax 0 000093E9 50 push ax 1228 @@: 1229 0 000093EA 8D9D[0000] lea bx, [b_bplist.counter + di] 1231 ; word [bx] = this matched point's counter 1232 0 000093EE F646FE03 test byte [bp + ?flags], ?flag_trigger | ?flag_pass 0 000093F2 7413 jz @F ; none set yet ? --> 0 000093F4 E8C100 call step_pass_counter ; step counter even if already matched 0 000093F7 7203E9A300 jnc .next ; (either is already set, so additional 1237 ; setting of ?flag_pass is skipped) 0 000093FC F646FE01 test byte [bp + ?flags], ?flag_trigger 0 00009400 7403E99A00 jnz .next ; (trigger is already set, so skip triggering) 0 00009405 EB05 jmp .setup_trigger ; triggered (after previous pass match) 1241 1242 @@: 0 00009407 E8AE00 call step_pass_counter ; step counter of matched point, no flag yet 0 0000940A 7340 jnc .check_pass ; not triggered, check for pass match --> 1245 1246 .setup_trigger: 1247 ; Trigger! (And the first detected triggering point.) 0 0000940C 804EFE01 or byte [bp + ?flags], ?flag_trigger 1249 0 00009410 51 push cx 0 00009411 BF[0000] mov di, line_out 0 00009414 BE[0000] mov si, msg.bb_hit.1 1253 %if _SYMBOLIC 1254 cmp ax, _NUM_B_BP 1255 jb @F 1256 mov si, msg.bb_sym_hit.1 1257 @@: 1258 %endif 0 00009417 E8C100 call copy_single_counted_string 1260 ; (If _SYMBOLIC=0) Now si -> msg.bb_hit.2.nocounter 1261 ; (If _SYMBOLIC=1) Now si -> msg.bb_hit.2.nocounter 1262 ; or si -> msg.bb_sym_hit.2.nocounter 1263 1264 0 0000941A 89C2 mov dx, ax 1266 %if _SYMBOLIC 1267 cmp ax, _NUM_B_BP 1268 jb @F 1269 sub ax, _NUM_B_BP 1270 call hexbyte ; store index of this point 1271 jmp @FF ; skip counter dump --> 1272 1273 @@: 1274 %endif 1275 ; Store breakpoint index in message. 0 0000941C E8[0000] call hexbyte ; store index of this point 1277 1278 ; Get counter of this breakpoint. 0 0000941F 8B07 mov ax, word [bx] 1280 1281 ; Is it equal to default ? 0 00009421 3D0080 cmp ax, 8000h 0 00009424 7409 je @F ; yes, skip --> 1284 0 00009426 BE[0000] mov si, msg.bb_hit.2.counter 0 00009429 E8AF00 call copy_single_counted_string 1287 ; Now si -> msg.bb_hit.3.counter.no_id 1288 1289 ; Store counter in message. 0 0000942C E8[0000] call hexword 1291 1292 @@: 0 0000942F F606[0000]08 testopt [internalflags2], dif2_gg_is_gg 0 00009434 7407 jz @F 0 00009436 F606[0200]08 testopt [options], gg_bb_hit_no_repeat 0 0000943B EB05 jmp @FF 1297 @@: 0 0000943D F606[0200]10 testopt [options], tp_bb_hit_no_repeat 1299 @@: 0 00009442 7406 jz @F 0 00009444 C706[0000][0000] mov word [lastcmd], dmycmd 1302 @@: 0 0000944A EB1D jmp .trigger_common 1304 1305 1306 .check_pass: 0 0000944C 7451 jz .next ; no pass match ? --> 1308 0 0000944E 804EFE02 or byte [bp + ?flags], ?flag_pass 1310 0 00009452 51 push cx 0 00009453 BF[0000] mov di, line_out 0 00009456 BE[0000] mov si, msg.bb_pass.1 0 00009459 E87F00 call copy_single_counted_string 1315 ; Now si -> msg.bb_pass.2 1316 0 0000945C 89C2 mov dx, ax 1318 ; Store breakpoint index in message. 0 0000945E E8[0000] call hexbyte ; store index of this point 1320 0 00009461 E87700 call copy_single_counted_string 1322 ; Now si -> msg.bb_pass.3.no_id 1323 1324 ; Get counter of this breakpoint. 0 00009464 8B07 mov ax, word [bx] 1326 ; Store counter in message. 0 00009466 E8[0000] call hexword 1328 1329 .trigger_common: 0 00009469 53 push bx 1331 %if _SYMBOLIC 1332 cmp dx, _NUM_B_BP ; symbol breakpoint ? 1333 jae @F ; yes, no ID --> 1334 %endif 0 0000946A BBFFFF mov bx, -1 0 0000946D E8[0000] call get_set_id_offset_length 0 00009470 F6C7FC test bh, 63 << 2 ; length nonzero ? 0 00009473 7421 jz @F ; no --> 1339 1340 ; The maximum length of a short ID is based on 1341 ; how much space there is after the longest message 1342 ; ("Passed ..., counter=XXXX") assuming 80 columns. 0 00009475 BE[0000] mov si, msg.bb_hitpass_id.short 0 00009478 80FF74 cmp bh, 29 << 2 ; long ? 0 0000947B 7203 jb .trigger_short_id 1346 ; This jump MUST be a jb, not jbe. The jbe 1347 ; would not match ZR for words where the 1348 ; idbuffer offset is a nonzero value. 0 0000947D BE[0000] mov si, msg.bb_hitpass_id.long 1350 .trigger_short_id: 1351 0 00009480 E85800 call copy_single_counted_string 0 00009483 88F9 mov cl, bh 0 00009485 D0E9 shr cl, 1 0 00009487 D0E9 shr cl, 1 ; cx = length 0 00009489 81E3FF03 and bx, 1023 ; bx = offset 0 0000948D 8DB7[0000] lea si, [b_bplist.idbuffer + bx] 0 00009491 F3A4 rep movsb 1359 0 00009493 BE[0000] mov si, msg.bb_hitpass_id.after 1361 1362 @@: 0 00009496 5B pop bx 0 00009497 E84100 call copy_single_counted_string 1365 0 0000949A 893E[0000] mov word [bb_deferred_message_in_lineout_behind], di 0 0000949E 59 pop cx 1368 1369 .next: 0 0000949F 58 pop ax 0 000094A0 5B pop bx 1372 0 000094A1 40 inc ax 0 000094A2 83F810 cmp ax, _NUM_B_BP + _NUM_SYM_BP 0 000094A5 7303E9D1FE jb .loop 1376 0 000094AA 8B46FE mov ax, word [bp + ?flags] 0 000094AD A807 test al, ?flag_pass | ?flag_trigger | ?flag_match 0 000094AF 7503 jnz .return ; (NC) 1380 1381 .gg9: 0 000094B1 31C0 xor ax, ax 0 000094B3 F9 stc 1384 .return: 0 000094B4 89EC5D lleave 0 000094B7 C3 retn 1387 1388 1389 ; INP: word [bx] = pass counter of this breakpoint 1390 ; OUT: NC if to proceed (no trigger), 1391 ; ZR if no pass message display 1392 ; NZ if pass message display 1393 ; CY if to trigger 1394 step_pass_counter: 0 000094B8 F707FF3F test word [bx], 3FFFh ; is it already at a terminal state ? 0 000094BC 740A jz .no_decrement ; yes, do not further decrement --> 0 000094BE FF0F dec word [bx] ; decrement (to 0/4000h/8000h/C000h) 0 000094C0 7417 jz .trigger ; case for decrementing 1 to 0 --> 0 000094C2 813F0040 cmp word [bx], 4000h 0 000094C6 7411 je .trigger ; case for decrementing 4001h to 4000h 1401 .no_decrement: 0 000094C8 813F0080 cmp word [bx], 8000h ; decrement resulted in 8000h 0 000094CC 740B je .trigger ; or was already in that state? --> 0 000094CE 813F00C0 cmp word [bx], 0_C000h 0 000094D2 7405 je .trigger ; or C000h --> 1406 .proceed: 0 000094D4 F6470140 test byte [bx + 1], 40h ; (NC) ZR if no pass message 0 000094D8 C3 retn 1409 1410 .trigger: 0 000094D9 F9 stc 0 000094DA C3 retn 1413 %endif 1414 %endif ; !_LOADER 1415 1416 1417 ; INP: byte [ds:si] = length of source string 1418 ; ds:si + 1 -> source string 1419 ; es:di -> destination buffer 1420 ; OUT: cx = 0 1421 ; ZR, NC 1422 ; ds:si -> after source string 1423 ; es:di -> after written string 1424 ; CHG: - 1425 ; STT: UP 1426 copy_single_counted_string: section_of_function 0 000094DB 91 xchg ax, cx 0 000094DC 31C0 xor ax, ax 0 000094DE AC lodsb 0 000094DF 91 xchg ax, cx 0 000094E0 F3A4 rep movsb 0 000094E2 C3 retn 1433 1434 1435 %if !_LOADER 1436 ; INP: si -> linear address of breakpoint 1437 ; (32 bits if _PM, else 24 bits) 1438 ; OUT: dx:ax = linear address of breakpoint 1439 ; si -> behind linear address 1440 gg_bb_lods_bp_linear: 0 000094E3 AD lodsw 0 000094E4 92 xchg ax, dx 1443 %if _PM 1444 lodsw 1445 %else 0 000094E5 31C0 xor ax, ax 0 000094E7 AC lodsb 1448 %endif 0 000094E8 92 xchg ax, dx 0 000094E9 C3 retn 1451 1452 1453 ; INP: word [run_int] 1454 ; word [reg_cs] 1455 ; (d)word [reg_eip] 1456 ; gg/bb breakpoints 1457 ; OUT: NC if a breakpoint was hit, 1458 ; (e)ip must be decremented by one 1459 ; word [bb_deferred_message_in_lineout_behind] set 1460 ; and line_out written if bb point matched 1461 ; (The bb point's index is already written to this msg.) 1462 ; ax = 7 if non-bb match, else 1463 ; ax & 1 set if non-pass match (actual hit), 1464 ; else ax & 2 set if pass match (consider as hit first, 1465 ; but dump registers next (not to silent buffer) 1466 ; and then continue execution) 1467 ; else ax & 4 always set, indicates any match 1468 ; (including matches that should merely continue) 1469 ; all pass points' counters stepped 1470 ; CY if no breakpoint was hit, 1471 ; ax = 0 1472 ; CHG: all 1473 ; STT: es = ds = ss 1474 gg_bb_check_hit: 0 000094EA E855FE call bb_check_hit 0 000094ED 720D jc .gg_check_hit 1477 0 000094EF A801 test al, 1 ; actual bb hit ? 0 000094F1 7507 jnz .ret_NC ; yes, return as hit 1480 0 000094F3 50 push ax ; bb is pass match or any other match, 0 000094F4 E80500 call gg_check_hit ; is gg a match ? 0 000094F7 58 pop ax 0 000094F8 732D jnc gg_check_hit.hit ; yes --> (set NC, ax = 7) 1485 1486 ; Here, we return the flags 2 (set if pass match) and 1487 ; 4 (always set, indicating any match). 1488 1489 .ret_NC: 0 000094FA F8 clc 0 000094FB C3 retn 1492 1493 .gg_check_hit: 1494 ; (fall through) 1495 1496 %ifn _NUM_G_BP 1497 gg_check_hit: 1498 stc 1499 retn 1500 %else 1501 ; INP: word [run_int] 1502 ; word [reg_cs] 1503 ; (d)word [reg_eip] 1504 ; bb breakpoints 1505 ; OUT: NC if a breakpoint was hit, 1506 ; (e)ip must be decremented by one 1507 ; ax = 7 1508 ; CY if no breakpoint was hit, 1509 ; ax = 0 1510 ; CHG: all 1511 ; STT: es = ds = ss 1512 gg_check_hit: 1513 ; Finish up. Check if it was one of _our_ breakpoints. 0 000094FC 813E[0000][0000] cmp word [run_int], int3msg 0 00009502 752D jne .gg9 ; if not interrupt 03h --> 1516 1517 ; Get previous cs:eip (where breakpoint was executed if any at all). 0 00009504 E87603 call get_cseip_of_possible_breakpoint 1519 ; dx:ax = linear address of previous cs:eip 0 00009507 7228 jc .gg9 0 00009509 BE[0000] mov si, g_bplist.bp 0 0000950C 31C9 xor cx, cx 0 0000950E 8A4CFF mov cl, byte [si-1] ; number of saved breakpoints 0 00009511 E31E jcxz .gg9 ; none, so always unexpected --> 1525 0 00009513 89C7 mov di, ax 0 00009515 89D3 mov bx, dx ; bx:di = linear address of previous cs:(e)ip 1528 1529 .loop_gg6: 0 00009517 E8C9FF call gg_bb_lods_bp_linear 1531 0 0000951A E81A02 call gg_bb_check_is_first 0 0000951D 730D jnc .next 1534 0 0000951F 39DA cmp dx, bx 0 00009521 7509 jne .next 0 00009523 39F8 cmp ax, di 0 00009525 7505 jne .next 1539 1540 .hit: 0 00009527 B80700 mov ax, 7 0 0000952A F8 clc 0 0000952B C3 retn 1544 1545 .next: 1546 1547 %if BPSIZE == 4 || BPSIZE == 5 1548 inc si ; skip saved (actually CCh) byte 1549 %elif BPSIZE == 6 0 0000952C 83C603 add si, 3 ; skip word offset and byte content 1551 %elif BPSIZE == 9 1552 add si, 5 ; skip dword offset and byte content 1553 %endif 1554 ; BPSIZE implied 0 0000952F E2E6 loop .loop_gg6 ; try next if there's any 1556 1557 .gg9: 0 00009531 31C0 xor ax, ax 0 00009533 F9 stc 0 00009534 C3 retn 1561 %endif 1562 1563 1564 %if _DELAY_BEFORE_BP 1565 delay_before_bp: 0 00009535 F606[0300]04 testopt [options3], opt3_delay_before_bp 0 0000953A 7428 jz .ret 0 0000953C F606[0200]80 testopt [internalflags3], dif3_delayed 0 00009541 7521 jnz .ret 0 00009543 800E[0200]80 setopt [internalflags3], dif3_delayed 0 00009548 06 push es 0 00009549 57 push di 0 0000954A 50 push ax 0 0000954B BF4000 mov di, 40h ; dual mode segment/selector 0 0000954E 8EC7 mov es, di 0 00009550 268B3E6C00 mov di, word [es:6Ch] 1577 @@: 0 00009555 263B3E6C00 cmp di, word [es:6Ch] 0 0000955A 7505 jne @F 0 0000955C E8[0000] call idle 0 0000955F EBF4 jmp @B 1582 @@: 0 00009561 58 pop ax 0 00009562 5F pop di 0 00009563 07 pop es 1586 .ret: 0 00009564 C3 retn 1588 %endif 1589 1590 1591 %if _BREAKPOINTS 1592 bb_writepoints_init_reset: 0 00009565 BF[0000] mov di, b_bplist.bp 0 00009568 B0CC mov al, 0CCh 0 0000956A B91000 mov cx, _NUM_B_BP + _NUM_SYM_BP 1596 .loop: 0 0000956D 83C705 add di, BPSIZE - 1 0 00009570 AA stosb 0 00009571 E2FA loop .loop 1600 1601 ; This is called first by gg before writing any of the 1602 ; gg points. So, if it fails, it only needs to restore 1603 ; its own points, not any of the gg points. 1604 ; This is also called deep down in run_with_bb when called 1605 ; from tt or pp. In this case, there may be a proceed 1606 ; breakpoint already written. On failure, after having 1607 ; restored all yet-written bb points, this proceed 1608 ; breakpoint is restored too. 1609 ; Symbolic branch: This initialises symbol breakpoints. 1610 ; 1611 ; INP: bb breakpoints 1612 ; tpg_proceed_bp 1613 ; OUT: does not return if an error occurred, 1614 ; instead jumps to cmd3 1615 ; STT: might return modeswitched 1616 bb_writepoints_init: 1617 %if _SYMBOLIC 1618 nearcall zz_detect_xms ; re-detect XMS if used after run 1619 1620 mov dx, word [sym_storage.main.bb.first] 1621 mov bx, b_bplist.bp + _NUM_B_BP * BPSIZE 1622 mov cx, _NUM_B_BP 1623 jmp .sym_condition 1624 1625 .sym_loop: 1626 cmp cx, _NUM_B_BP + _NUM_SYM_BP 1627 jb .sym_enough 1628 mov dx, msg.bb_sym_too_many 1629 .sym_error_putsz: 1630 call putsz_error 1631 mov cx, (_NUM_B_BP + _NUM_SYM_BP) 1632 xor ax, ax 1633 @@: 1634 push ax 1635 loop @B ; dummy bb error info 1636 mov bp, sp 1637 dec cx ; no bb write/restore failure 1638 push cx 1639 push cx 1640 jmp .sym_error_done ; handle error (including pp restore) --> 1641 1642 .sym_enough: 1643 push dx 1644 push ax 1645 dualcall getfarpointer.main 1646 pop di 1647 pop es 1648 1649 mov ax, word [es:di + smLinear] 1650 mov word [bx], ax ; store low word of linear 1651 inc bx 1652 inc bx 1653 mov ax, word [es:di + smLinear + 2] 1654 %if BPSIZE == 5 || BPSIZE == 9 1655 mov word [bx], ax ; store high word of linear 1656 inc bx 1657 inc bx 1658 %else 1659 mov byte [bx], al ; store high byte of linear 1660 inc bx 1661 mov dx, msg.bb_sym_beyond_linear 1662 test ah, ah 1663 jnz .sym_error_putsz 1664 %endif 1665 %if BPSIZE == 6 || BPSIZE == 9 1666 mov ax, word [es:di + smOffset] 1667 mov word [bx], ax ; store low word of offset 1668 inc bx 1669 inc bx 1670 mov ax, word [es:di + smOffset + 2] 1671 %if BPSIZE == 9 1672 mov word [bx], ax ; store high word of offset 1673 inc bx 1674 inc bx 1675 %else 1676 mov dx, msg.bb_sym_beyond_offset 1677 test ax, ax 1678 jnz .sym_error_putsz 1679 %endif 1680 %endif 1681 inc bx ; skip content byte 1682 mov ax, cx 1683 push bx 1684 call calcpointbit 1685 or byte [b_bplist.used_mask + bx], ah 1686 pop bx 1687 inc cx 1688 mov dx, word [es:di + smSpecialNext] 1689 1690 .sym_condition: 1691 cmp dx, -1 1692 jne .sym_loop 1693 1694 jmp @FF 1695 @@: 1696 mov ax, cx 1697 call calcpointbit 1698 not ah 1699 and byte [b_bplist.used_mask + bx], ah 1700 inc cx 1701 @@: 1702 cmp cx, _NUM_B_BP + _NUM_SYM_BP 1703 jb @BB 1704 %endif 1705 0 00009573 E8D500 call bb_writepoints 0 00009576 735B jnc .retn 1708 0 00009578 83EC20 sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 1710 ; reserve space for bb error info 0 0000957B 89E5 mov bp, sp 1712 ; cx = index of failed point 1713 ; = index above last one to restore 1714 ; ax = error info of failed point 0 0000957D 50 push ax 0 0000957E 51 push cx 0 0000957F E8B100 call bb_restorepoints_and_init_error_info 1718 .sym_error_done: 1719 1720 bb_restorepoints_exit: equ $ 1721 ; If this is not gg and T/P wrote a proceed breakpoint, 1722 ; restore it here (after having restored bb points). 0 00009582 E8D50A call proceed_writepoint_restore 1724 ; This call might return modeswitched. 0 00009585 BB0000 mov bx, 0 ; (preserve CF) 0 00009588 7305 jnc @F 0 0000958A 80CC80 or ah, 80h ; mark error during restoration 0 0000958D 89C3 mov bx, ax ; bx & 80h set: error restoring pp 1729 @@: 1730 0 0000958F 59 pop cx 0 00009590 58 pop ax ; error info + index of failed point 1733 0 00009591 89CE mov si, cx 0 00009593 01F6 add si, si 0 00009595 01F6 add si, si ; * 4 1737 %if BPSIZE == 4 1738 %elif BPSIZE == 5 1739 add si, cx ; * 5 1740 %elif BPSIZE == 6 0 00009597 01CE add si, cx ; * 5 0 00009599 01CE add si, cx ; * 6 1743 %elif BPSIZE == 9 1744 add si, si ; * 8 1745 add si, cx ; * 9 1746 %else 1747 %error Unexpected breakpoint size 1748 %endif 0 0000959B 81C6[0000] add si, b_bplist.bp ; -> point 1750 0 0000959F 53 push bx 1752 0 000095A0 E86CFD call put_deferred_message_silent 1754 ; CHG: dx 1755 0 000095A3 83F9FF cmp cx, -1 0 000095A6 740B je @F 1758 1759 ; si-> point 1760 ; ax = info (ah = reason, al = new value if reason 3) 1761 ; cx = 0-based index of initially failed point 0 000095A8 FF7402 push word [si + 2] 0 000095AB FF34 push word [si] ; stack: linear address 0 000095AD BB0040 mov bx, 4000h ; bh = 40h (bb), 1765 ; bl = what we tried to restore (n/a) 0 000095B0 E8120B call display_breakpoint_failure 1767 ; This function calls resetmode. 1768 1769 @@: 0 000095B3 E8E301 call bb_handlefailedrestore 1771 ; This function calls resetmode. 1772 0 000095B6 58 pop ax 0 000095B7 F6C480 test ah, 80h ; pp failed to restore ? 0 000095BA 7411 jz @F 1776 0 000095BC FF36[0200] push word [tpg_proceed_bp + 2] 0 000095C0 FF36[0000] push word [tpg_proceed_bp] 0 000095C4 8A1E[0500] mov bl, [tpg_proceed_bp + BPSIZE - 1] 0 000095C8 B700 mov bh, 0 ; proceed breakpoint 0 000095CA E8F80A call display_breakpoint_failure 1782 @@: 0 000095CD 83C420 add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 1784 ; discard bb error info 0 000095D0 E9[0000] jmp cmd3 1786 1787 .retn: 0 000095D3 C3 retn 1789 %endif 1790 1791 1792 %if _NUM_G_BP 1793 ; INP: ss:bp -> behind gg error info space 1794 ; cx = number of error info words on stack 1795 ; OUT: error info space initialised to all zeros 1796 ; CHG: ax, di, es 1797 ; STT: sets es to ss 1798 gg_restorepoints_init_error_info: 0 000095D4 16 push ss 0 000095D5 07 pop es 0 000095D6 89EF mov di, bp ; es:di -> behind error info 0 000095D8 51 push cx 0 000095D9 4F dec di 0 000095DA 4F dec di 0 000095DB 31C0 xor ax, ax 0 000095DD FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 0 000095DE F3AB rep stosw ; initialize error info 0 000095E0 FC cld 0 000095E1 59 pop cx 0 000095E2 C3 retn 1811 1812 1813 gg_restorepoints_and_init_error_info: 0 000095E3 E8EEFF call gg_restorepoints_init_error_info 1815 1816 ; Restore gg breakpoints. 1817 ; On errors remember failures but restore all remaining anyway. 1818 ; 1819 ; INP: cx = number of breakpoints to restore (<= 255), 1820 ; assumed at beginning of g_bplist.bp 1821 ; ss:bp -> behind cx words for error info 1822 ; OUT: NC if all points restored successfully 1823 ; CY if at least one point couldn't be restored, 1824 ; error info filled, high byte: 1825 ; reason = 0 = no error (this point didn't fail), 1826 ; 1 = couldn't write, 1827 ; 2 = unreachable, 1828 ; 3 = overwritten), 1829 ; low byte: new byte value (if reason 3) 1830 ; CHG: ax, bx, (e)dx, si, di, es 1831 ; STT: sets es to ss 1832 ; might return modeswitched 1833 ; 1834 ; Note: The points are restored in reverse, from the last back 1835 ; to the front. The first point is handled last. 1836 gg_restorepoints: 0 000095E6 89CE mov si, cx 0 000095E8 01F6 add si, si 0 000095EA 01F6 add si, si ; * 4 1840 %if BPSIZE == 4 1841 %elif BPSIZE == 5 1842 add si, cx ; * 5 1843 %elif BPSIZE == 6 0 000095EC 01CE add si, cx ; * 5 0 000095EE 01CE add si, cx ; * 6 1846 %elif BPSIZE == 9 1847 add si, si ; * 8 1848 add si, cx ; * 9 1849 %else 1850 %error Unexpected breakpoint size 1851 %endif 0 000095F0 81C6[FAFF] add si, g_bplist.bp - BPSIZE ; -> last point in list (first to restore) 1853 0 000095F4 F8 clc ; assume success 0 000095F5 51 push cx 0 000095F6 9C pushf 0 000095F7 E329 jcxz .done ; nothing to do --> 1858 .loop: 0 000095F9 E8E300 call gg_writepoints_restore ; Restore breakpoint bytes. 0 000095FC 7324 jnc .done ; successful --> 0 000095FE 5A pop dx ; discard flags 0 000095FF 5B pop bx 0 00009600 53 push bx 0 00009601 9C pushf ; store (CY) flags 1865 0 00009602 50 push ax 0 00009603 89F7 mov di, si 0 00009605 81EF[0600] sub di, BPSIZE+g_bplist.bp 1869 %if BPSIZE == 5 || BPSIZE == 6 || BPSIZE == 9 0 00009609 89F8 mov ax, di 0 0000960B 31D2 xor dx, dx 0 0000960D BF0600 mov di, BPSIZE 0 00009610 F7F7 div di 0 00009612 89C7 mov di, ax ; di = 0-based point index 0 00009614 D1E7 shl di, 1 ; di = 0-based error info offset 1876 %elif BPSIZE == 4 1877 shr di, 1 ; di = 0-based error info offset 1878 %else 1879 %error "Unexpected BPSIZE" 1880 %endif 0 00009616 29DF sub di, bx 0 00009618 29DF sub di, bx 0 0000961A 8F03 pop word [bp+di] ; store error info 0 0000961C 49 dec cx ; exclude the failed point 0 0000961D 83EE0C sub si, 2*BPSIZE ; -> the point _before_ failed one 0 00009620 EBD7 jmp short .loop 1887 .done: 0 00009622 9D popf ; get flags. CY if any couldn't be restored 0 00009623 59 pop cx ; restore cx 0 00009624 C3 retn 1891 %endif 1892 1893 1894 %if _BREAKPOINTS 1895 ; INP: ss:bp -> error info space (one word per bb breakpoint) 1896 ; OUT: error info space initialised to all zeros 1897 ; CHG: ax, di, es 1898 ; STT: sets es to ss 1899 ; 1900 ; Note: This initialises words for all bb points. 1901 ; While the value in cx is preserved, it is 1902 ; assumed that space for all points is allocated. 1903 bb_restorepoints_init_error_info: 0 00009625 16 push ss 0 00009626 07 pop es 0 00009627 89EF mov di, bp 0 00009629 31C0 xor ax, ax 0 0000962B 51 push cx 0 0000962C B91000 mov cx, _NUM_B_BP + _NUM_SYM_BP 0 0000962F F3AB rep stosw 0 00009631 59 pop cx 0 00009632 C3 retn 1913 1914 1915 bb_restorepoints_and_init_error_info: 0 00009633 E8EFFF call bb_restorepoints_init_error_info 1917 1918 ; Restore bb breakpoints. 1919 ; On errors remember failures but restore all remaining anyway. 1920 ; 1921 ; INP: cx = index above last one to restore 1922 ; ss:bp -> error info space (one word per bb breakpoint) 1923 ; OUT: NC if all points restored successfully 1924 ; CY if at least one point couldn't be restored, 1925 ; error info filled, high byte: 1926 ; reason = 0 = no error (this point didn't fail), 1927 ; 1 = couldn't write, 1928 ; 2 = unreachable, 1929 ; 3 = overwritten), 1930 ; low byte: new byte value (if reason 3) 1931 ; CHG: ax, bx, cx, (e)dx, si, di, es 1932 ; STT: sets es to ss 1933 ; might return modeswitched 1934 ; 1935 ; Note: The points are restored in reverse, from the list back 1936 ; to the front. The first point is handled last. 1937 bb_restorepoints: 1938 0 00009636 F8 clc ; assume success 0 00009637 9C pushf 0 00009638 E30F jcxz .done 1942 .loop: 0 0000963A E81400 call bb_writepoints_restore 0 0000963D 730A jnc .done 0 0000963F 5A pop dx ; (discard flags) 0 00009640 9C pushf ; store (CY) flags 1947 ; cx = index of point that failed to write 1948 ; ah = reason, al = new byte value (reason 3) 0 00009641 89CF mov di, cx 0 00009643 01FF add di, di 0 00009645 8903 mov word [bp + di], ax ; store error info 0 00009647 EBF1 jmp .loop 1953 1954 .done: 0 00009649 9D popf ; CF 0 0000964A C3 retn 1957 1958 1959 ; Loop through bb breakpoints and exchange the saved 1960 ; byte with that one at the actual address. Used to write 1961 ; the breakpoints. 1962 ; 1963 ; INP: - 1964 ; OUT: NC if successful 1965 ; CY if error writing a point, 1966 ; cx = index of point that failed to write 1967 ; (all PRIOR points were processed successfully, 1968 ; either written successfully or skipped) 1969 ; CHG: ax, bx, (e)dx, si, cx, di 1970 ; STT: might return modeswitched 1971 bb_writepoints: 0 0000964B 31C9 xor cx, cx 0 0000964D BF0100 mov di, 1 0 00009650 A9 db __TEST_IMM16 ; (skip xor, NC) 1975 1976 ; Same, but go through the breakpoints in reverse order 1977 ; and check that what we overwrite is a 0CCh byte. If so, 1978 ; restore the original value. (The 0CCh is discarded.) 1979 ; 1980 ; INP: cx = index *above* last to write 1981 ; (_NUM_B_BP + _NUM_SYM_BP for all) 1982 ; OUT: NC if successful 1983 ; CY if error writing a point, 1984 ; cx = index of point that failed to write 1985 ; ah = 1 if error because point could not be written 1986 ; ah = 2 if error because address is unreachable 1987 ; ah = 3 if error because point contained non-0CCh value, 1988 ; al = new byte 1989 ; CHG: ax, bx, (e)dx, si, cx, di 1990 ; STT: might return modeswitched 1991 bb_writepoints_restore: 0 00009651 31FF xor di, di ; (NC) 1993 bb_wp: 1994 lframe near 0 00009653 5589E5 lenter 1996 lvar word, is_write 0 00009656 57 push di 1998 0 00009657 F646FE01 test byte [bp + ?is_write], 1 2000 ; (NC) is it writing ? 0 0000965B 7458 jz .next ; no, is restoring, first decrement cx --> 2002 2003 .loop: 0 0000965D 89C8 mov ax, cx 0 0000965F E8[0000] call calcpointbit ; bx = index, ah = value 0 00009662 84A7[0000] test byte [b_bplist.used_mask+bx], ah 2007 ; (NC) 0 00009666 744D jz .next 0 00009668 84A7[0000] test byte [b_bplist.disabled_mask+bx], ah 2010 ; (NC) 0 0000966C 7547 jnz .next 2012 0 0000966E 89CE mov si, cx 0 00009670 01F6 add si, si 0 00009672 01F6 add si, si ; * 4 2016 %if BPSIZE == 4 2017 %elif BPSIZE == 5 2018 add si, cx ; * 5 2019 %elif BPSIZE == 6 0 00009674 01CE add si, cx ; * 5 0 00009676 01CE add si, cx ; * 6 2022 %elif BPSIZE == 9 2023 add si, si ; * 8 2024 add si, cx ; * 9 2025 %else 2026 %error Unexpected breakpoint size 2027 %endif 0 00009678 81C6[0000] add si, b_bplist.bp ; -> point 2029 0 0000967C E864FE call gg_bb_lods_bp_linear 2031 ; dx:ax = linear address 2032 0 0000967F E8B500 call gg_bb_check_is_first 0 00009682 7331 jnc .next ; (NC) 2035 0 00009684 E81602 call getsegmented ; bx:(e)dx = segmented address 2037 %if BPSIZE == 6 0 00009687 AD lodsw ; skip word offset 2039 %elif BPSIZE == 9 2040 lodsw 2041 lodsw ; skip dword offset 2042 %endif 0 00009688 AC lodsb ; get byte to write 0 00009689 B402 mov ah, 2 0 0000968B 723E jc .return ; not in PM anymore/address not available --> (CY) 0 0000968D F646FE01 test byte [bp + ?is_write], 1 2047 ; writing? 0 00009691 7517 jnz .forward_nocheck ; yes --> 2049 2050 .backward_check: 0 00009693 50 push ax 0 00009694 E8[0000] call readmem ; read current byte 0 00009697 3CCC cmp al, 0CCh ; is this still what we wrote? 0 00009699 B483 mov ah, 83h ; (80h = error occurred while restoring) 0 0000969B F9 stc 0 0000969C 752D jne .return_discard ; nope --> (CY) 0 0000969E 58 pop ax 0 0000969F E8[0000] call writemem ; return the byte to its original value 0 000096A2 7211 jc .next ; failed --> (CY, handled there) 0 000096A4 C644FFCC mov byte [si-1], 0CCh ; reset stored point 0 000096A8 EB0B jmp short .next 2062 2063 .forward_nocheck: 2064 %if _DELAY_BEFORE_BP 0 000096AA E888FE call delay_before_bp 2066 %endif 0 000096AD E8[0000] call writemem 0 000096B0 7203 jc .next 0 000096B2 8844FF mov byte [si-1], al ; save the previous byte there 2070 .next: 0 000096B5 B401 mov ah, 1 ; (in case of error) 0 000096B7 7212 jc .return ; failed to write --> (CY) 2073 0 000096B9 F646FE01 test byte [bp + ?is_write], 1 0 000096BD 7505 jnz .is_write_next 0 000096BF 49 dec cx ; restore: decrement index 0 000096C0 799B jns .loop ; decremented to 0FFFFh ? no, loop --> 0 000096C2 EB06 jmp .return_NC 2079 2080 .is_write_next: 0 000096C4 41 inc cx ; write: increment index 0 000096C5 83F910 cmp cx, _NUM_B_BP + _NUM_SYM_BP 2083 ; above last ? 0 000096C8 7293 jb .loop ; no, loop --> 2085 .return_NC: 0 000096CA F8 clc 2087 .return: 2088 .return_discard: 0 000096CB 730A jnc .ret 2090 0 000096CD F646FE01 test byte [bp + ?is_write], 1 2092 ; restoring ? 0 000096D1 7503 jnz .ret_CY ; no --> 0 000096D3 80CC80 or ah, 80h ; error occurred while restoring 2095 .ret_CY: 0 000096D6 F9 stc 2097 .ret: 0 000096D7 89EC5D lleave 0 000096DA C3 lret 2100 %endif 2101 2102 2103 %if _NUM_G_BP 2104 ; Loop through saved breakpoints and exchange the saved 2105 ; byte with that one at the actual address. Used to write 2106 ; the breakpoints. 2107 ; 2108 ; INP: si-> current point 2109 ; cx = number of points to write (might be zero) 2110 ; OUT: NC if successful 2111 ; CY if error writing a point, 2112 ; cx = number of points still to write (including failed one) 2113 ; (si-BPSIZE)-> point that failed 2114 ; CHG: ax, bx, (e)dx, si, cx, di 2115 gg_writepoints: 0 000096DB BF0100 mov di, 1 0 000096DE A9 db __TEST_IMM16 ; (skip xor, NC) 2118 2119 ; Same, but go through the breakpoints in reverse order 2120 ; and check that what we overwrite is a 0CCh byte. If so, 2121 ; restore the original value. (The 0CCh is discarded.) 2122 ; 2123 ; Additionally: 2124 ; OUT: CY if error writing a point, 2125 ; ah = 1 if error because point could not be written 2126 ; ah = 2 if error because address is unreachable 2127 ; ah = 3 if error because point contained non-0CCh value, 2128 ; al = new byte 2129 gg_writepoints_restore: 0 000096DF 31FF xor di, di ; (NC) 2131 gg_wp: 0 000096E1 E347 jcxz .return ;if nothing to do --> (still NC from xor/test) 2133 .loop: 0 000096E3 E8FDFD call gg_bb_lods_bp_linear 2135 ; dx:ax = linear address 2136 0 000096E6 E84E00 call gg_bb_check_is_first 0 000096E9 7209 jc @F ; if to handle this breakpoint --> 2139 2140 ; Skip to next breakpoint. 2141 %if BPSIZE == 4 || BPSIZE == 5 2142 inc si ; -> after point 2143 %elif BPSIZE == 6 0 000096EB 83C603 add si, 3 ; skip word offset and byte content 2145 %elif BPSIZE == 9 2146 add si, 5 ; skip dword offset and byte content 2147 %endif 2148 ; BPSIZE implied 2149 0 000096EE 85FF test di, di ; (NC) 0 000096F0 7532 jnz .next ; going forward --> 0 000096F2 EB22 jmp .next_lea_si ; (NC) 2153 2154 ; Handle this breakpoint. 2155 @@: 0 000096F4 E8A601 call getsegmented ; bx:(e)dx = segmented address 2157 %if BPSIZE == 6 0 000096F7 AD lodsw ; skip word offset 2159 %elif BPSIZE == 9 2160 lodsw 2161 lodsw ; skip dword offset 2162 %endif 0 000096F8 AC lodsb ; get byte to write 0 000096F9 B402 mov ah, 2 0 000096FB 722D jc .return ; not in PM anymore/address not available --> (CY) 0 000096FD 85FF test di, di ; writing? 0 000096FF 751A jnz .forward_nocheck ; yes --> 2168 2169 .backward_check: 0 00009701 50 push ax 0 00009702 E8[0000] call readmem ; read current byte 0 00009705 3CCC cmp al, 0CCh ; is this still what we wrote? 0 00009707 B483 mov ah, 83h ; (80h = error occurred while restoring) 0 00009709 F9 stc 0 0000970A 7529 jne .return_discard ; nope --> (CY) 0 0000970C 58 pop ax 0 0000970D E8[0000] call writemem ; return the byte to its original value 0 00009710 7212 jc .next ; failed --> (CY, handled there) 0 00009712 C644FFCC mov byte [si-1], 0CCh ; reset stored point 2180 .next_lea_si: 0 00009716 8D74F4 lea si, [si-2*BPSIZE] ; adjust (for reverse writing) 0 00009719 EB09 jmp short .next 2183 2184 .forward_nocheck: 2185 %if _DELAY_BEFORE_BP 0 0000971B E817FE call delay_before_bp 2187 %endif 0 0000971E E8[0000] call writemem 0 00009721 8844FF mov byte [si-1], al ; save the previous byte there 2190 .next: 0 00009724 B401 mov ah, 1 ; (in case of error) 0 00009726 7202 jc .return ; failed to write --> (CY) 0 00009728 E2B9 loop .loop 2194 .return: ; (NC) 0 0000972A 730A jnc .ret 2196 0 0000972C 85FF test di, di ; restoring ? 0 0000972E 7503 jnz .ret_CY ; no --> 0 00009730 80CC80 or ah, 80h ; error occurred while restoring 2200 .ret_CY: 0 00009733 F9 stc 0 00009734 52 push dx ; (counteract effect of pop) 2203 .return_discard: 0 00009735 5A pop dx 2205 .ret: 0 00009736 C3 retn 2207 %endif 2208 2209 2210 ; INP: dx:ax = linear address of point to be (re)set 2211 ; dword [internalflags2] 2212 ; dword [gg_first_cseip_linear] 2213 ; OUT: CY if to (re)set breakpoint 2214 ; if: no flag set 2215 ; or: dx:ax doesn't match, dif2_gg_skip_non_cseip clear 2216 ; (setting non-cseip point) 2217 ; or: dx:ax matches, dif2_gg_skip_cseip clear 2218 ; (setting cseip point afterwards) 2219 ; NC if to not (re)set breakpoint 2220 ; if: dx:ax doesn't match, dif2_gg_skip_non_cseip set 2221 ; (not setting non-cseip point afterwards) 2222 ; or: dx:ax matches, dif2_gg_skip_cseip set 2223 ; (not setting cseip point) 2224 gg_bb_check_is_first: 0 00009737 F606[0000]07 testopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 0 0000973C 7418 jz .continue 2228 0 0000973E 3906[0000] cmp [gg_first_cseip_linear], ax 0 00009742 7514 jne .is_not_first 0 00009744 3916[0200] cmp [gg_first_cseip_linear + 2], dx 0 00009748 750E jne .is_not_first 2233 2234 .is_first: 0 0000974A 800E[0000]10 setopt [internalflags2], dif2_gg_first_detected 0 0000974F F606[0000]04 testopt [internalflags2], dif2_gg_skip_cseip 0 00009754 7509 jnz .skip 2238 .continue: 0 00009756 F9 stc 0 00009757 C3 retn 2241 2242 .is_not_first: 0 00009758 F606[0000]02 testopt [internalflags2], dif2_gg_skip_non_cseip 0 0000975D 74F7 jz .continue 2245 .skip: 0 0000975F F8 clc 0 00009760 C3 retn 2248 2249 2250 ; INP: al = number to put 2251 ; OUT: putsline called with ordinal string 2252 ; CHG: di, [line_out], ax 2253 putordinalbyte: 0 00009761 53 push bx 0 00009762 51 push cx 0 00009763 52 push dx 2257 2258 ; Note that trim_overflow in front of line_out is 2259 ; initialised to '0', which we depend on here. 2260 ; With the output from decbyte, at least two decimal 2261 ; digits are always valid in the buffer. 0 00009764 BF[0000] mov di, line_out 0 00009767 E80700 call ordinalbyte 0 0000976A E8[0000] call putsline 0 0000976D 5A pop dx 0 0000976E 59 pop cx 0 0000976F 5B pop bx 0 00009770 C3 retn 2269 2270 2271 ordinalbyte: 0 00009771 E8[0000] call decbyte 0 00009774 8B45FE mov ax, [di - 2] ; al = lower address, higher decimal digit 2274 ; ah = higher address, lower decimal digit 0 00009777 3C31 cmp al, '1' 0 00009779 7417 je .gotsuf_th ; 11th, 12th, 13th or other teen --> 0 0000977B BA7374 mov dx, "st" 0 0000977E 80FC31 cmp ah, '1' 0 00009781 7412 je .gotsuf ; if low digit was one --> 0 00009783 BA6E64 mov dx, "nd" 0 00009786 80FC32 cmp ah, '2' 0 00009789 740A je .gotsuf ; if low digit was two --> 0 0000978B B272 mov dl, 'r' 0 0000978D 80FC33 cmp ah, '3' 0 00009790 7403 je .gotsuf ; if low digit was three --> 2286 .gotsuf_th: 0 00009792 BA7468 mov dx, "th" 2288 .gotsuf: 0 00009795 89D0 mov ax, dx 0 00009797 AB stosw 0 00009798 C3 retn 2292 2293 2294 %if _BREAKPOINTS 2295 ; INP: ss:bp -> error info (points at first info word) 2296 ; Each word provides information for one point we tried 2297 ; to restore. The lowest info word corresponds to the 2298 ; first bb breakpoint (bb 00), followed by the info word 2299 ; for the second bb breakpoint (bb 01), and so on. 2300 ; There are always as many info words as there are 2301 ; bb breakpoints. 2302 ; CHG: ax, bx, cx, dx, di, si 2303 ; STT: sets es to ss 2304 bb_handlefailedrestore: 2305 %if _PM 2306 call resetmode 2307 %endif 0 00009799 31FF xor di, di 0 0000979B 31C9 xor cx, cx 0 0000979D 16 push ss 0 0000979E 07 pop es 0 0000979F BE[0000] mov si, b_bplist.bp 2313 .loop: 0 000097A2 8B03 mov ax, word [bp + di] 0 000097A4 F6C47F test ah, 7Fh ; failed ? 0 000097A7 7414 jz .next 0 000097A9 51 push cx 0 000097AA 57 push di 2319 ; cx = 0-based index 0 000097AB FF7402 push word [si + 2] 0 000097AE FF34 push word [si] ; stack: linear address 0 000097B0 8A5C05 mov bl, byte [si + BPSIZE - 1] 2323 ; bl = what we tried to restore 0 000097B3 B740 mov bh, 40h ; bh = 40h (bb) 0 000097B5 80CC80 or ah, 80h ; ah & 80h = set (is restore) 0 000097B8 E80A09 call display_breakpoint_failure 0 000097BB 5F pop di 0 000097BC 59 pop cx 2329 .next: 0 000097BD 83C606 add si, BPSIZE 0 000097C0 AF scasw ; di += 2 0 000097C1 41 inc cx 0 000097C2 83F910 cmp cx, _NUM_B_BP + _NUM_SYM_BP 0 000097C5 72DB jb .loop 2335 .end: 0 000097C7 C3 retn 2337 %endif 2338 2339 2340 %if _NUM_G_BP 2341 ; INP: cx = number of restored points (number of info words) 2342 ; ss:bp-> error info (points *behind* last info word) 2343 ; Each word provides information for one point we tried 2344 ; to restore. The lowest info word corresponds to the 2345 ; first gg breakpoint, followed by the info word for 2346 ; the second gg breakpoint (if any), and so on. 2347 ; CHG: ax, bx, cx, dx, di, si 2348 ; STT: sets es to ss 2349 gg_handlefailedrestore: 2350 %if _PM 2351 call resetmode 2352 %endif 0 000097C8 89CF mov di, cx 0 000097CA 01FF add di, di 0 000097CC F7DF neg di 0 000097CE 16 push ss 0 000097CF 07 pop es 0 000097D0 BB0000 mov bx, 0 0 000097D3 BE[0000] mov si, g_bplist.bp 0 000097D6 E325 jcxz .end 2361 .loop: 0 000097D8 8B03 mov ax, word [bp+di] 0 000097DA F6C47F test ah, 7Fh ; failed? 0 000097DD 7416 jz .next ; no --> 2365 2366 ; si-> point 2367 ; ax = info (ah = reason, al = new value if reason 3) 2368 ; bx = point's 0-based index 2369 .display: 0 000097DF 53 push bx 0 000097E0 57 push di 0 000097E1 89D9 mov cx, bx ; cx = 0-based index 0 000097E3 FF7402 push word [si + 2] 0 000097E6 FF34 push word [si] ; stack: linear address 0 000097E8 8A5C05 mov bl, byte [si + BPSIZE - 1] 2376 ; bl = what we tried to restore 0 000097EB B780 mov bh, 80h ; bh = 80h (gg) 0 000097ED 80CC80 or ah, 80h ; ah & 80h = set (is restore) 0 000097F0 E8D208 call display_breakpoint_failure 0 000097F3 5F pop di 0 000097F4 5B pop bx 2382 .next: 0 000097F5 43 inc bx ; increment counter 0 000097F6 83C606 add si, BPSIZE ; -> next point 0 000097F9 47 inc di 0 000097FA 47 inc di ; di+bp-> next error info 0 000097FB 75DB jnz .loop ; not yet at end --> 2388 .end: 0 000097FD C3 retn 2390 %endif ; _NUM_G_BP 2391 2392 2393 ; INP: word [reg_cs] 2394 ; (d)word [reg_eip] 2395 ; OUT: bx = word [reg_cs] 2396 ; CY if invalid address 2397 ; NC if address is valid, 2398 ; dx:ax = linear address 2399 ; CHG: edx, ax, ecx 2400 get_cseip_minus_1_linear: 2401 _386_PM_o32 ; or ecx, byte -1 0 000097FE 83C9FF or cx, byte -1 2403 2404 ; INP: word [reg_cs] 2405 ; (d)word [reg_eip] 2406 ; (e)cx = adjustment to (e)ip 2407 ; OUT: bx = word [reg_cs] 2408 ; CY if invalid address 2409 ; NC if address is valid, 2410 ; dx:ax = linear address 2411 ; CHG: edx, ax 2412 get_cseip_ecx_linear: 0 00009801 8B1E[0000] mov bx, [reg_cs] ; bx = cs 2414 _386_PM_o32 0 00009805 8B16[0000] mov dx, [reg_eip] ; (e)dx = (e)ip 2416 _386_PM_o32 0 00009809 01CA add dx, cx ; bx:(e)dx = adjusted cs:(e)ip 2418 ; (getlinear doesn't use the high word of edx if it's a 16-bit cs) 2419 ; call getlinear ; dx:ax = linear address of this cs:eip 2420 ; (fall through to getlinear_d_b) 2421 %endif ; !_LOADER 2422 2423 2424 ; INP: If currently in RM, 2425 ; bx:dx = segment:offset of address 2426 ; If currently in PM, 2427 ; bx:(e)dx = selector:offset of address 2428 ; OUT: bx = unchanged (selector/segment) 2429 ; CY if address is invalid, 2430 ; because Int31.0006 failed for bx or 2431 ; because 32-bit address overflowed or 2432 ; because A20 could not be switched on 2433 ; NC if address is valid, 2434 ; dx:ax = linear address 2435 ; dh is always zero if the address is in RM address space 2436 ; CHG: dx, ax 2437 %if _PM 2438 getlinear_d_b: section_of_function 2439 push di 2440 mov di, test_d_b_bit 2441 call getlinear_common 2442 pop di 2443 retn 2444 2445 getlinear_high_limit: section_of_function 2446 push di 2447 mov di, test_high_limit 2448 call getlinear_common 2449 pop di 2450 retn 2451 2452 getlinear_32bit: section_of_function 2453 push di 2454 mov di, .always_NZ 2455 call getlinear_common 2456 pop di 2457 retn 2458 2459 .always_NZ: 2460 test di, di 2461 retn 2462 2463 section_of getlinear_16bit 2464 getlinear_16bit: section_of_function 2465 push di 2466 mov di, .always_ZR 2467 call getlinear_common 2468 pop di 2469 retn 2470 2471 .always_ZR: 2472 cmp di, di 2473 retn 2474 2475 %if _DEBUG1 2476 getlinear_high_limit.do_not_use_test: section_of_function 2477 ; DO NOT use resetmode, called by readmem/writemem 2478 push di 2479 mov di, test_d_b_bit 2480 call getlinear_common.do_not_use_test 2481 pop di 2482 retn 2483 %endif 2484 %else 2485 check_section_of getlinear_d_b 2486 check_section_of getlinear_high_limit 2487 check_section_of getlinear_32bit 2488 getlinear_d_b: equ getlinear_common 2489 getlinear_high_limit: equ getlinear_common 2490 getlinear_32bit: equ getlinear_common 2491 getlinear_16bit: equ getlinear_common 2492 %if _DEBUG1 2493 check_section_of getlinear_high_limit.do_not_use_test 2494 getlinear_high_limit.do_not_use_test: equ getlinear_common.do_not_use_test 2495 %endif 2496 %endif 2497 2498 2499 ; Internal entry: Call function di to determine use 2500 ; of a 32-bit offset, INP: bx = seg/sel, OUT: NZ iff 32-bit 2501 getlinear_common: section_of_function 2502 %if _PM 2503 call resetmode 2504 ; This must execute in the correct mode, 2505 ; because we get the input from whatever 2506 ; mode we were originally entered in. 2507 %endif 2508 %if _DEBUG1 2509 call .do_not_use_test ; get linear address 2510 jc @F ; already an error ? then return --> 2511 push bx 2512 push cx 2513 mov bx, test_records_getLinear 2514 call handle_test_case_multiple_16 2515 ; check whether this should testcase the error 2516 ; CY to indicate error from this call 2517 pop cx 2518 pop bx 2519 @@: 2520 retn 2521 2522 %endif 2523 ; DOES NOT use resetmode 2524 .do_not_use_test: 0 0000980B 53 push bx 2526 %if _PM 2527 call ispm 2528 jnz .rm 2529 mov ax, 0006h 2530 push cx 2531 push dx 2532 int 31h ; get selector base address into cx:dx 2533 pop ax ; (edxh:)ax = offset, cx:dx = base 2534 jc .return_cx_bx 2535 2536 _386 call di 2537 _386 jz .16 2538 _386 push edx 2539 _386 pop bx 2540 _386 pop bx ; bx = high word edx (in 32-bit PM segment) 2541 _386 jmp .32 2542 .16: ; bx:ax = offset 2543 xor bx, bx ; 16-bit PM segment, clear offset high word 2544 .32: 2545 add ax, dx 2546 adc bx, cx ; add the base 2547 xchg bx, dx ; dx:ax = 32-bit linear address 2548 clc 2549 2550 .return_cx_bx: 2551 pop cx 2552 pop bx 2553 retn 2554 .rm: 2555 %endif 0 0000980C 89D8 mov ax, bx 0 0000980E 51 push cx 0 0000980F B104 mov cl, 4 0 00009811 D3C0 rol ax, cl 0 00009813 59 pop cx 0 00009814 BBF0FF mov bx, 0FFF0h 0 00009817 21C3 and bx, ax ; bx = low word adjustment 0 00009819 83E00F and ax, byte 0Fh ; ax = higher bits which don't fit in the low word 0 0000981C 01DA add dx, bx 0 0000981E 83D000 adc ax, byte 0 0 00009821 92 xchg ax, dx ; dx:ax = 21-bit linear address 0 00009822 F606[0100]10 testopt [internalflags], debuggeeA20 0 00009827 7503 jnz .return_bx ; A20 line enabled, no need to adjust (NC) 0 00009829 80E2EF and dl, ~10h ; clear corresponding bit of the address if it was set (NC) 2570 .return_bx: 0 0000982C 5B pop bx 0 0000982D C3 retn 2573 2574 2575 ; INP: bx = segment/selector to use by default 2576 ; al = next character in input 2577 ; si -> following character in input 2578 ; OUT: NC if successful, 2579 ; bx:dx = linear address 2580 ; (if not _PM, this always fits in 24 bits) 2581 ; al = next character 2582 ; si -> following character 2583 ; (d)word [bp_offset] = preferred offset, -1 if none 2584 ; CY if error 2585 ; CHG: edx, bx, ax, si, (d)word [bp_offset] 2586 getlinearaddr: section_of_function 2587 %if _PM 2588 call resetmode 2589 %endif 2590 %if !_LOADER 2591 _386_PM_o32 ; or dword 0 0000982E 830E[0000]FF or word [bp_offset], strict byte -1 2593 %endif 0 00009833 E8[0000] call skipcomm0 0 00009836 3C40 cmp al, '@' 0 00009838 7531 jne .at_not 0 0000983A AC lodsb ; insure we have a blank or opening parens 0 0000983B 3C28 cmp al, '(' 0 0000983D 740A je .at 0 0000983F 3C09 cmp al, 9 0 00009841 7406 je .at 0 00009843 3C20 cmp al, 32 0 00009845 7402 je .at 0 00009847 EB1F jmp .at_not_reload ; assume the @ is part of a symbol 2605 2606 .at: 0 00009849 E8[0000] call skipwh0 0 0000984C 3C28 cmp al, '(' 0 0000984E 750E jne .at_not_paren 2610 0 00009850 AC lodsb 0 00009851 E8[0000] nearcall getdword 0 00009854 E8[0000] call skipwh0 0 00009857 3C29 cmp al, ')' 0 00009859 7520 jne .error 0 0000985B AC lodsb 2617 0 0000985C EB03 jmp .at_got 2619 2620 .at_not_paren: 0 0000985E E8[0000] nearcall getdword 2622 .at_got: 2623 %ifn _PM 2624 ; test bh, bh 2625 ; jnz .error 0 00009861 83FB11 cmp bx, 11h 0 00009864 7315 jae .error 2628 %endif 0 00009866 F8 clc 0 00009867 C3 retn 2631 2632 .at_not_reload: 0 00009868 4E dec si 0 00009869 4E dec si 0 0000986A AC lodsb 2636 .at_not: 0 0000986B E8[0000] nearcall getaddrX 2638 %if _PM 2639 _no386 and word [bp_offset + 2], 0 2640 %endif 2641 %if !_LOADER 2642 _386_PM_o32 ; mov dword [bp_offset], edx 0 0000986E 8916[0000] mov word [bp_offset], dx 2644 %endif 0 00009872 50 push ax 0 00009873 E895FF call getlinear_high_limit 0 00009876 93 xchg bx, ax ; dx:bx = linear 0 00009877 87D3 xchg dx, bx ; bx:dx = linear 0 00009879 58 pop ax ; al = next character 0 0000987A C3 retn 2651 2652 .error: 0 0000987B F9 stc 0 0000987C C3 retn 2655 2656 2657 %if !_LOADER 2658 ; INP: word [reg_cs] 2659 ; (d)word [reg_eip] 2660 ; dword [tpg_possible_breakpoint] 2661 ; [internalflags2] & dif2_tpg_have_bp 2662 ; OUT: CY if invalid address 2663 ; NC if address is valid, 2664 ; dx:ax = linear address 2665 ; CHG: edx, ax, ecx, bx 2666 ; STT: ds = ss = debugger data selector 2667 get_cseip_of_possible_breakpoint: 0 0000987D A1[0000] mov ax, [tpg_possible_breakpoint] 0 00009880 8B16[0200] mov dx, [tpg_possible_breakpoint + 2] 2670 ; dx:ax = stored possible breakpoint address 0 00009884 F606[0100]01 testopt [internalflags2], dif2_tpg_have_bp 0 00009889 7511 jnz .retn ; (NC) if already stored --> 0 0000988B E870FF call get_cseip_minus_1_linear 2674 ; dx:ax = linear address at cs:(e)ip - 1 0 0000988E 720C jc .retn ; (CY) if getlinear failed --> 0 00009890 A3[0000] mov [tpg_possible_breakpoint], ax 0 00009893 8916[0200] mov [tpg_possible_breakpoint + 2], dx 2678 ; store for later use 0 00009897 800E[0100]01 setopt [internalflags2], dif2_tpg_have_bp 2680 ; (NC) 2681 .retn: 0 0000989C C3 retn 2683 2684 2685 %if _PM 2686 2687 ; DEBUGX: when a mode switch from PM to RM did occur in the debuggee, 2688 ; breakpoint addresses in non-RM address space are unreachable. 2689 ; To enable the debugger to reset the breakpoints, it has to switch 2690 ; temporarily to PM. (In DEBUG/X 1.19, a switch from RM to PM in the 2691 ; debuggee will temporarily switch the debugger back to RM too. We 2692 ; handle this case without a switch as the linear RM address can be 2693 ; accessed directly in PM, assuming that the DPMI hosts linear-to- 2694 ; physical mapping for the RM address space is the same as the one 2695 ; we get in PM.) 2696 2697 ; (To use mode switching in any case, the format the breakpoints are 2698 ; stored in needs to be modified. Additionally, the mode switching 2699 ; needs to be done elsewhere instead of in getsegmented. resetmode 2700 ; can be used as is, even if a mode switch from PM to RM occured.) 2701 2702 switchmode: 2703 ;--- raw switch: 2704 ;--- si:e/di: new cs:e/ip 2705 ;--- dx:e/bx: new ss:e/sp 2706 ;--- ax: new ds 2707 ;--- cx: new es 2708 _386 xor ebx, ebx ; clear ebxh 2709 mov bx, sp 2710 _386 xor edi, edi ; clear edih 2711 mov di, .back_after_switch 2712 call ispm 2713 jz .pm 2714 .r86m: 2715 d4 call d4message 2716 d4 asciz "In switchmode.r86m",13,10 2717 mov ax, [dssel] ; switch rm -> pm 2718 mov si, [code_sel] 2719 mov dx, ax 2720 mov cx, ax 2721 jmp far [dpmi_rm2pm] 2722 .pm: 2723 d4 call d4message 2724 d4 asciz "In switchmode.pm",13,10 2725 mov ax, [pspdbg] ; switch pm -> rm 2726 mov si, [code_seg] 2727 mov dx, ax 2728 mov cx, ax 2729 _386_o32 ; jmp far dword [dpmi_pm2rm] 2730 jmp far [dpmi_pm2rm] 2731 2732 .back_after_switch: 2733 xor byte [pm_2_86m_0], 2 2734 xoropt [internalflags], protectedmode 2735 d4 call d4message 2736 d4 asciz "In switchmode.back_after_switch",13,10 2737 retn 2738 2739 2740 ; INP: al = direction, 0 = save state, 1 = restore state 2741 ; [auxbuff] = state buffer 2742 ; ES = debugger data selector 2743 ; CHG: edi 2744 sr_state: 2745 testopt [internalflags], switchbuffer 2746 jz .return ; no need to call --> 2747 _386_o32 ; xor edi, edi 2748 xor di, di 2749 call ispm 2750 jz .pm 2751 .r86m: 2752 d4 call d4message 2753 d4 asciz "In sr_state.r86m",13,10 2754 mov es, word [auxbuff_segorsel + soaSegment] 2755 call far [dpmi_rmsav] 2756 jmp .return 2757 2758 .pm: 2759 d4 call d4message 2760 d4 asciz "In sr_state.pm",13,10 2761 mov es, word [auxbuff_segorsel + soaSelector] 2762 _386_o32 ; call far dword [dpmi_pmsav] 2763 call far [dpmi_pmsav] 2764 .return: 2765 push ss 2766 pop es 2767 retn 2768 2769 2770 ; INP: [internalflags] & modeswitched 2771 ; OUT: flag cleared, mode switched back if had been switched 2772 ; EI 2773 ; CHG: - (not even flags!) 2774 ; STT: es = ds = ss = gs = fs = debugger data segment/selector 2775 ; 2776 ; Switches back to RM if a mode switch to PM was done by getsegmented. 2777 ; Does nothing otherwise. (Can be called multiple times.) 2778 resetmode: section_of_function 2779 pushf 2780 testopt [internalflags], modeswitched ; switched mode previously ? 2781 jz .return ; no --> 2782 d4 call d4message 2783 d4 asciz "In resetmode (actually resetting)",13,10 2784 subcpu 286 2785 _386_o32 2786 pusha 2787 call switchmode ; switch back to the mode we were entered in (RM) 2788 mov al, 1 2789 call sr_state ; restore state 2790 call handle_mode_changed ; ! called with flag set 2791 clropt [internalflags], modeswitched ; reset the flag 2792 _386 push ss 2793 _386 pop gs 2794 _386 push ss 2795 _386 pop fs 2796 _386_o32 2797 popa 2798 subcpureset 2799 .return: 2800 popf 2801 sti 2802 retn 2803 %endif 2804 %endif ; !_LOADER 2805 2806 ; INP: dx:ax = linear address 2807 ; OUT: CY if inaccessible 2808 ; NC if accessible, 2809 ; bx:(e)dx = segment:offset or selector:offset address 2810 ; A temporary mode switch from RM to PM might have occured. 2811 ; This has to be reset by calling resetmode. 2812 ; CHG: (e)ax, (e)bx, (e)dx, fs, gs 2813 ; STT: es = ds = ss = our segment/selector 2814 ; 2815 ; It is assumed that only one byte needs to be accessed. 2816 ; (A workaround to access multiple bytes would be to access each 2817 ; byte separately and call this function for each of the bytes.) 2818 ; 2819 ; The TSR command code assumes that getsegmented.pm does not switch 2820 ; modes and that it will return an offset in (e)dx that allows 2821 ; 16-bit access. Adjust that code if either is no longer true. 2822 ; 2823 ; This is often used in conjunction with writemem or 2824 ; readmem. Refer to debug.asm for those. Note that 2825 ; they will decide whether to use edx or dx depending 2826 ; on the segment limit of the selector returned in 2827 ; bx. Currently edxh is always zero so it doesn't 2828 ; matter whether writemem or readmem choose a32 or 2829 ; a16 addressing. 2830 getsegmented: section_of_function 2831 %if _DEBUG1 2832 push bx 2833 push cx 2834 mov bx, test_records_getSegmented 2835 call handle_test_case_multiple_16 2836 pop cx 2837 pop bx 2838 jnc @F 2839 ; stc ; (already CY if the conditional didn't jump) 2840 retn 2841 2842 @@: 2843 %endif 2844 .do_not_use_test: 2845 2846 %if _PM 2847 call ispm 2848 jnz .rm 2849 .pm: 2850 push cx 2851 mov bx, word [scratchsel] 2852 xchg ax, dx 2853 xchg ax, cx ; cx:dx = linear address 2854 mov ax, 0007h 2855 int 31h ; set base to the address 2856 pop cx 2857 jc .invalid 2858 %if 1 2859 push cx 2860 mov ax, 0008h 2861 xor cx, cx 2862 xor dx, dx 2863 int 31h ; set limit to zero (access to one byte only) 2864 pop cx 2865 jc .invalid 2866 %endif 2867 _386_o32 ; xor edx, edx 2868 xor dx, dx ; bx:(e)dx = selector:offset (using scratchsel with the address as base) 2869 retn ; (NC) 2870 %endif 2871 .rm: 0 0000989D 83FA10 cmp dx, byte 10h ; check for address space 0 000098A0 7219 jb .nothma ; below HMA, normal access --> 0 000098A2 7402 je .checkhma ; possibly in HMA --> 2875 .nonrmspace: ; above HMA 2876 %if _PM 2877 ; It's a PM address but we are in RM. 2878 testopt [internalflags], canswitchmode 2879 jz .invalid ; can't switch to PM --> 2880 .switchmodes: 2881 _386_o32 2882 push si 2883 _386_o32 2884 push di 2885 _386_o32 2886 push cx 2887 _386_o32 2888 push bp 2889 push dx 2890 push ax 2891 d4 call d4message 2892 d4 asciz "In getsegmented.switchmodes (switching to access memory beyond 1088 KiB)",13,10 2893 call remember_mode 2894 setopt [internalflags], modeswitched ; set flag for resetmode 2895 mov al, 0 2896 call sr_state ; save state 2897 call switchmode ; switch to PM 2898 call handle_mode_changed ; ! called with flag set 2899 pop ax 2900 pop dx 2901 _386_o32 2902 pop bp 2903 _386_o32 2904 pop cx 2905 _386_o32 2906 pop di 2907 _386_o32 2908 pop si 2909 jmp .pm 2910 2911 .invalid: ; the address is inaccessible 2912 %endif 0 000098A4 F9 stc 0 000098A5 C3 retn 2915 2916 .checkhma: 0 000098A6 83F8F0 cmp ax, -10h ; valid offset for HMA ? 0 000098A9 73F9 jae .nonrmspace ; no, above HMA --> 0 000098AB F606[0100]20 testopt [internalflags], debuggerA20 ; A20 on, HMA accessible ? 0 000098B0 74F2 jz .nonrmspace ; no, treat as above HMA (DEBUGX) --> 0 000098B2 BBFFFF mov bx, 0FFFFh ; the HMA must always be addressed by segment FFFFh 0 000098B5 83C010 add ax, byte 10h ; and the offset is always at least 0010h (FFFFh:0010h = 00100000h) 2923 ; (NC because we checked that this won't overflow) 0 000098B8 92 xchg ax, dx ; bx:dx = segment:offset 0 000098B9 EB11 jmp .zero_edxh 2926 2927 .nothma: 0 000098BB 51 push cx 0 000098BC B104 mov cl, 4 0 000098BE D3CA ror dx, cl ; dx (high 4 bits) = high 4 bits of segment 0 000098C0 89C3 mov bx, ax 0 000098C2 D3EB shr bx, cl ; bx = low 12 bits of segment 0 000098C4 09DA or dx, bx ; dx = segment 0 000098C6 83E00F and ax, byte 0Fh ; ax = low 4 bits of linear, used as offset (NC) 0 000098C9 92 xchg ax, dx 0 000098CA 93 xchg ax, bx ; bx:dx = segment:offset 0 000098CB 59 pop cx 2938 .zero_edxh: 2939 _386_PM movzx edx, dx 0 000098CC C3 retn 2941 2942 2943 %if !_LOADER 2944 ; T command - Trace. 2945 tt: 2946 %if _TEST_HELP_FILE 2947 dec si 2948 dec si 2949 mov dx, msg.testhelp 2950 call isstring? 2951 je testhelpfile 2952 inc si 2953 lodsb 2954 %endif 2955 0 000098CD 8A64FE mov ah, byte [si - 2] 0 000098D0 80E4DF and ah, TOUPPER 0 000098D3 80FC54 cmp ah, 'T' 0 000098D6 7508 jne @F 0 000098D8 88C4 mov ah, al 0 000098DA 80E4DF and ah, TOUPPER 0 000098DD 80FC4D cmp ah, 'M' 2963 @@: 0 000098E0 7542 jne isnotmodeset 0 000098E2 E8[0000] call skipcomma 0 000098E5 E8[0000] call iseol? 0 000098E8 7416 je ismodeget 0 000098EA E8[0000] nearcall getexpression 0 000098ED E8[0000] call chkeol ; expect end of line here 0 000098F0 09DA or dx, bx 0 000098F2 7507 jnz .set ; selected nonzero --> 2972 .clear: ; selected zero 0 000098F4 8026[0000]FD clropt [options], traceints 0 000098F9 EB05 jmp short .get 2975 .set: 0 000098FB 800E[0000]02 setopt [options], traceints 2977 .get: 2978 ismodeget: 0 00009900 B030 mov al, '0' 0 00009902 BE[0000] mov si, tmode0 0 00009905 F606[0000]02 testopt [options], traceints 0 0000990A 7404 jz .zero 0 0000990C 40 inc ax 0 0000990D BE[0000] mov si, tmode1 2985 .zero: 0 00009910 A2[0000] mov byte [tmodev], al 0 00009913 BF[0000] mov di, line_out 0 00009916 56 push si 0 00009917 BE[0000] mov si, tmodes 0 0000991A E8[0000] call showstring 0 0000991D 5E pop si 0 0000991E E8[0000] call showstring 0 00009921 E9[0000] jmp putsline_crlf 2994 2995 isnotmodeset: 2996 %if _TSR && (_APPLICATION || _DEVICE) 0 00009924 80FC53 cmp ah, 'S' 0 00009927 750D jne @F 0 00009929 50 push ax 0 0000992A 8A04 mov al, byte [si] 0 0000992C 24DF and al, TOUPPER 0 0000992E 3C52 cmp al, 'R' 0 00009930 58 pop ax 0 00009931 7503E92C02 je tsr 3005 @@: 3006 %endif 3007 3008 %if _RH 0 00009936 E8[0000] call enable_rh 3010 %endif 3011 3012 %if _TTEST 0 00009939 50 push ax 0 0000993A 80FC54 cmp ah, 'T' 0 0000993D 7516 jne @F 0 0000993F 8B04 mov ax, word [si] 0 00009941 25DFDF and ax, TOUPPER_W 0 00009944 3D4553 cmp ax, "ES" 0 00009947 750C jne @F 0 00009949 8A4402 mov al, byte [si + 2] 0 0000994C 24DF and al, TOUPPER 0 0000994E 3C54 cmp al, 'T' 0 00009950 7503E9A700 je ttestcmd 3024 @@: 0 00009955 58 pop ax 3026 %endif 3027 0 00009956 8026[0300]F7 clropt [internalflags], tt_p 0 0000995B 80FC50 cmp ah, 'P' 0 0000995E 7506 jne @F 0 00009960 AC lodsb 0 00009961 800E[0300]08 setopt [internalflags], tt_p 3033 @@: 3034 tt0: 3035 %if _RH 0 00009966 E8[0000] call enable_rh 3037 %endif 0 00009969 C706[0000][C809] mov word [lastcmd], tt0 0 0000996F 8026[0100]EF clropt [internalflags2], dif2_is_pp 0 00009974 E82C0A call parse_pt ; process arguments 3041 3042 ; Do it times. 3043 tt1: 0 00009977 53 push bx 0 00009978 51 push cx 3046 0 00009979 F606[0300]08 testopt [internalflags], tt_p 0 0000997E 743A jz .not_p 3049 3050 %if _PM 3051 call resetmode 3052 %endif 0 00009980 BA0F00 mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 0 00009983 8B1E[0000] mov bx, word [reg_cs] 3055 _386_PM_o32 ; mov esi, dword [reg_eip] 0 00009987 8B36[0000] mov si, word [reg_eip] 3057 .pp2: 0 0000998B E87508 call pp16 ; get next instruction byte into AL 0 0000998E BF[0000] mov di, ppbytes 0 00009991 B9[0000] mov cx, PPLEN_ONLY_STRING 3061 %if _SYMBOLIC 3062 mov byte [pp_instruction], al 3063 %endif 0 00009994 F2AE repne scasb 0 00009996 7522 jne .not_p ; if not one of these --> 3066 %if _LINK_COMPAT 0 00009998 8A85[FFFF] mov al,byte [word di+PPLEN-1]; get corresponding byte in ppinfo 3068 %else 3069 mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 3070 %endif 0 0000999C A880 test al, PP_PREFIX ; prefix ? 0 0000999E 740E jz .pp3 ; no --> 0 000099A0 08C6 or dh, al ; set the OSIZE or ASIZE flags if either of these 3074 ; Note: Multiple OSIZE in a 16-bit cs do not toggle 3075 ; between decoding as O32 and O16, they're always 3076 ; decoded as O32. The same is true for A32, and 3077 ; in a 32-bit cs for O16 and A16. 0 000099A2 FECA dec dl 0 000099A4 75E5 jnz .pp2 ; if not out of bytes --> 0 000099A6 BA[0000] mov dx, msg.warnprefix 0 000099A9 E8[0000] call putsz 0 000099AC EB0C jmp .not_p 3083 3084 ; A repeatable string instruction is to be decoded. 3085 ; Finish the decoding and skip the appropriate number 3086 ; of opcode bytes. 3087 .pp3: 3088 _386_PM call pp_fix32bitflags 0 000099AE A847 test al, PP_VARSIZ | PP_SIZ_MASK 0 000099B0 7403E9[0000] jnz error 3091 %if 0 3092 test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 3093 jz .ignoreosize ; no --> 3094 and dh, 2 3095 add al, dh 3096 .ignoreosize: 3097 and ax, PP_SIZ_MASK 3098 _386_PM movzx eax, ax ; clear high word (in case it counts) 3099 _386_PM_o32 ; add esi, eax 3100 add si, ax 3101 %endif 3102 ; pp10: 3103 %if _SYMBOLIC 3104 call pp3_check_symhints 3105 jc .not_p ; trace --> 3106 %endif 3107 ; jmp short pp11 ; we have a skippable instruction here 3108 ; pp11: 3109 _386_PM call resetmode_and_test_d_b_bit 3110 _386_PM jnz .32 ; full 32-bit offset valid --> 3111 _386_PM movzx esi, si ; clear high word here 3112 .32: 0 000099B5 E8B507 call proceedbreakpoint ; run until the breakpoint is hit 3114 ; This call might return modeswitched. 0 000099B8 EB03 jmp short @F 3116 3117 .not_p: 0 000099BA E8BE02 call traceone ; call common code 3119 @@: 0 000099BD 7303E97D02 jc unexpectedinterrupt ; an unexpected interrupt occured --> 3121 %if _BREAKPOINTS 0 000099C2 BA0000 mov dx, 0 ; do not skip WHILE 0 000099C5 7413 jz @F ; (breakpoint after instruction was hit) 3124 3125 ; bb breakpoint was hit. dumpregs, then return 0 000099C7 E8B100 call handle_bb_hit_pass_match 0 000099CA 7204 jc .actual_hit ; actual match ? --> 0 000099CC 7414 jz tt2.nodump ; non-silent mode ? --> 0 000099CE EB0A jmp tt2 ; silent mode --> 3130 3131 .actual_hit: 3132 %if _PM 3133 call resetmode 3134 %endif 0 000099D0 E83CF9 call put_deferred_message_silent 0 000099D3 E8D905 call dumpregs_extended_silent 0 000099D6 59 pop cx 0 000099D7 5B pop bx ; (discard counter) 0 000099D8 EB1B jmp @FF 3140 @@: 3141 %endif 3142 tt2: 0 000099DA 52 push dx 3144 %if _PM 3145 call resetmode 3146 %endif 0 000099DB E831F9 call put_deferred_message_silent 0 000099DE E8CE05 call dumpregs_extended_silent 3149 ; dump registers 0 000099E1 5A pop dx ; preserve skip WHILE flag 3151 .nodump: 3152 0 000099E2 E84F00 call tt_handle_while 0 000099E5 59 pop cx 0 000099E6 5B pop bx 3156 0 000099E7 83E901 sub cx, 1 0 000099EA 83DB00 sbb bx, 0 ; decrement loop counter 3159 0 000099ED 85DB test bx, bx 0 000099EF 7508 jnz tt1_jmp ; loop --> 0 000099F1 85C9 test cx, cx 0 000099F3 7504 jnz tt1_jmp ; loop --> 3164 3165 @@: 3166 %if _PM 3167 call resetmode 3168 %endif 0 000099F5 E8[0000] call silence_dump 3170 0 000099F8 C3 retn 3172 3173 tt1_jmp: 0 000099F9 E97BFF jmp tt1 3175 3176 3177 %if _TTEST 3178 ttestcmd: 0 000099FC 58 pop ax 0 000099FD 46 inc si 0 000099FE 46 inc si 0 000099FF 46 inc si 0 00009A00 E8[0000] call skipwhite 3184 3185 .tt0: 0 00009A03 C706[0000][650A] mov word [lastcmd], .tt0 0 00009A09 8026[0100]EF clropt [internalflags2], dif2_is_pp 0 00009A0E E89209 call parse_pt ; process arguments 3189 3190 ; Do it times. 3191 .tt1: 0 00009A11 53 push bx 0 00009A12 51 push cx 3194 3195 .tt2: 3196 %if _PM 3197 call resetmode 3198 %endif 0 00009A13 E8F9F8 call put_deferred_message_silent 0 00009A16 E89605 call dumpregs_extended_silent 3201 ; dump registers 3202 .nodump: 3203 0 00009A19 31D2 xor dx, dx 0 00009A1B E81600 call tt_handle_while 0 00009A1E 59 pop cx 0 00009A1F 5B pop bx 3208 0 00009A20 83E901 sub cx, 1 0 00009A23 83DB00 sbb bx, 0 ; decrement loop counter 3211 0 00009A26 85DB test bx, bx 0 00009A28 7508 jnz .tt1_jmp ; loop --> 0 00009A2A 85C9 test cx, cx 0 00009A2C 7504 jnz .tt1_jmp ; loop --> 3216 3217 @@: 3218 %if _PM 3219 call resetmode 3220 %endif 0 00009A2E E8[0000] call silence_dump 3222 0 00009A31 C3 retn 3224 3225 .tt1_jmp: 0 00009A32 EBDD jmp .tt1 3227 %endif 3228 3229 3230 ; INP: dx = nonzero if to bypass while condition 3231 tt_handle_while: 0 00009A34 85D2 test dx, dx 0 00009A36 7538 jnz @F 0 00009A38 F606[0300]04 testopt [internalflags], tt_while 0 00009A3D 7431 jz @F 3236 3237 %if _PM 3238 call resetmode 3239 %endif 0 00009A3F E82F00 call .point_to_condition 3241 ; dx = si -> line_out with condition 0 00009A42 FF36[0000] push word [rc] 0 00009A46 8F06[0000] pop word [priorrc] 0 00009A4A AC lodsb 0 00009A4B E8[0000] nearcall getexpression ; parse stored expression 0 00009A4E E8[0000] call chkeol 0 00009A51 E8[0000] nearcall toboolean ; get boolean 0 00009A54 85D2 test dx, dx ; true ? 0 00009A56 7518 jnz @F ; yes, continue --> 3250 0 00009A58 E8[0000] call silence_dump 3252 0 00009A5B BA[0000] mov dx, msg.while_terminated_before 0 00009A5E E8[0000] call putsz 0 00009A61 E80D00 call .point_to_condition 0 00009A64 E8[0000] call putsz ; display condition 0 00009A67 BA[0000] mov dx, msg.while_terminated_after 0 00009A6A E8[0000] call putsz 0 00009A6D E9[0000] jmp cmd3 3260 3261 @@: 0 00009A70 C3 retn 3263 3264 3265 .point_to_condition: 0 00009A71 16 push ss 0 00009A72 07 pop es 0 00009A73 16 push ss 0 00009A74 1F pop ds 0 00009A75 BE[0000] mov si, while_buffer 0 00009A78 89F2 mov dx, si 0 00009A7A C3 retn 3273 3274 3275 ; INP: cl = flags indicating what kind of bb match occurred 3276 ; cl & 1 set if actual hit, 3277 ; else cl & 2 set if pass match, 3278 ; else it is a non-pass non-hit match 3279 ; (cl & 4 always set (indicates any bb match)) 3280 ; cl & 8 set if pp/tt breakpoint hit 3281 ; dword [ss:sp] = command repetition counter 3282 ; OUT: NC if pass match or non-pass non-hit match, 3283 ; if pass match: deferred message output, dumpregs output 3284 ; if cl & 8 set (pass/nonpass bb, tt/pp hit): 3285 ; dx = 0 3286 ; ZR if [internalflags] & tt_silent_mode clear 3287 ; NZ if [internalflags] & tt_silent_mode set 3288 ; if cl & 8 clear (pass/nonpass bb, no tt/pp hit): 3289 ; ZR 3290 ; dword [ss:sp] increased by 1 3291 ; dx = 1 (indicates to skip WHILE condition) 3292 ; CY if actual hit (hit bb), 3293 ; dx = 0 3294 ; ax = INP:cx 3295 ; CHG: dx, bx, cx, si, di, all high words, fs, gs 3296 ; STT: ds = es = ss 3297 handle_bb_hit_pass_match: 3298 d5 call d5message 3299 d5 asciz "in handle_bb_hit_pass_match",13,10 3300 0 00009A7B 91 xchg ax, cx 3302 0 00009A7C F606[0100]08 testopt [internalflags2], dif2_bp_failure 0 00009A81 7569 jnz .actual_hit ; after failure, handle as actual hit 3305 0 00009A83 A801 test al, 1 ; actual hit ? else: non-hit, pass or non-pass 0 00009A85 7565 jnz .actual_hit ; yes --> 3308 0 00009A87 A802 test al, 2 ; at least pass match ? 0 00009A89 7415 jz .nonpassnonhit ; no --> 3311 3312 .passnonhit: 3313 3314 d5 call d5message 3315 d5 asciz "bb pass non-hit",13,10 3316 3317 %if _PM 3318 call resetmode 3319 %endif 3320 ; call put_deferred_message_loud 0 00009A8B BA[0000] mov dx, msg.empty_message 0 00009A8E 8716[0000] xchg dx, word [gg_deferred_message] 0 00009A92 E8[0000] call putsz 0 00009A95 BA[0000] mov dx, putsline 0 00009A98 E881F8 call put_bb_deferred_message_calling_dx 3326 0 00009A9B 50 push ax 3328 ; call dumpregs_extended_loud 3329 ; (includes handle_serial_flags_ctrl_c) 0 00009A9C E8[0000] call dumpregs_extended 0 00009A9F 58 pop ax ; (preserve so the test al, 8 can use it) 3332 .nonpassnonhit: 0 00009AA0 E81505 call handle_serial_flags_ctrl_c 3334 3335 ; al & 4 always set 3336 0 00009AA3 8026[0000]E9 clropt [internalflags2], dif2_gg_skip_non_cseip | dif2_gg_skip_cseip | dif2_gg_first_detected 0 00009AA8 800E[0000]01 setopt [internalflags2], dif2_gg_is_first 3340 0 00009AAD FF36[0200] push word [gg_next_cseip_linear + 2] 0 00009AB1 FF36[0000] push word [gg_next_cseip_linear] 0 00009AB5 8F06[0000] pop word [gg_first_cseip_linear] 0 00009AB9 8F06[0200] pop word [gg_first_cseip_linear + 2] 3345 0 00009ABD A808 test al, 8 ; not bb hit, is tt/pp hit ? 0 00009ABF 751C jnz @FF ; yes --> 3348 0 00009AC1 F706[0000]8010 testopt [internalflags2], dif2_is_pp | dif2_tpg_keep_proceed_bp, 1 0 00009AC7 7502 jnz @F 0 00009AC9 EB12 jmp @FF 3352 3353 @@: 3354 lframe near 3355 lpar dword, counter 3356 lpar_return 0 00009ACB 5589E5 lenter 0 00009ACE 83460401 add word [bp + ?counter], 1 0 00009AD2 83560600 adc word [bp + ?counter + 2], 0 0 00009AD6 5D lleave 0 00009AD7 BA0100 mov dx, 1 ; skip WHILE 0 00009ADA 38C0 cmp al, al ; (NC, ZR) 0 00009ADC C3 retn 3364 3365 @@: 0 00009ADD 31D2 xor dx, dx ; no skip WHILE 0 00009ADF A802 test al, 2 ; displayed pass point ? 0 00009AE1 7503 jnz @F ; yes --> 0 00009AE3 A8FF test al, -1 ; NC, NZ (do not skip dump) 3370 ; al & 0Ch is set so this test is NZ 0 00009AE5 C3 retn 3372 3373 @@: 0 00009AE6 F606[0300]10 testopt [internalflags], tt_silent_mode 3375 ; (NC, ZF is ZR if to skip dump) 0 00009AEB C3 retn 3377 3378 .actual_hit: 3379 d5 call d5message 3380 d5 asciz "bb hit",13,10 3381 0 00009AEC 31D2 xor dx, dx ; no skip WHILE 0 00009AEE F9 stc 0 00009AEF C3 retn 3385 3386 3387 %if _ATTACH 3388 attach: 3389 %if _BOOTLDR 0 00009AF0 F606[0100]40 testopt [internalflags], nodosloaded 0 00009AF5 7403E9[0000] jnz error 3392 %endif 0 00009AFA E8[0000] call skipwh0 0 00009AFD E8[0000] nearcall getword 0 00009B00 E8[0000] call chkeol 0 00009B03 F606[0200]40 testopt [internalflags], tsrmode 0 00009B08 750C jnz @F ; resident --> 0 00009B0A BA[0000] mov dx, msg.notyettsr 0 00009B0D B81101 mov ax, 0111h 3400 .specificerror: 0 00009B10 E8[0000] call setrc 0 00009B13 E9[0000] jmp putsz_error 3403 3404 @@: 3405 %if _PM 3406 call setes2dx 3407 %else 0 00009B16 8EC2 mov es, dx 3409 %endif 0 00009B18 26813E0000CD20 cmp word [es:0], 20CDh 0 00009B1F 7408 je @F 0 00009B21 BA[0000] mov dx, msg.invalidpsp 0 00009B24 B81201 mov ax, 0112h 0 00009B27 EBE7 jmp .specificerror 3415 3416 @@: 0 00009B29 2639161600 cmp word [es:16h], dx 0 00009B2E 7508 jne @F 0 00009B30 BA[0000] mov dx, msg.selfownedpsp 0 00009B33 B81301 mov ax, 0113h 0 00009B36 EBD8 jmp .specificerror 3422 3423 @@: 0 00009B38 06 push es 0 00009B39 1F pop ds 0 00009B3A 16 push ss 0 00009B3B 07 pop es 0 00009B3C BE0A00 mov si, TPIV 0 00009B3F BF[0000] mov di, psp22 0 00009B42 A5 movsw 0 00009B43 A5 movsw ; save Int22 3432 %if _PM 3433 mov ax, word [ss:pspdbg] 3434 %else 0 00009B44 8CD0 mov ax, ss ; => our process 3436 %endif 0 00009B46 C744FC[D001] mov word [ si-4 ], int22 0 00009B4B 8944FE mov word [ si-2 ], ax ; set pspInt22 (required) 0 00009B4E BE1600 mov si, 16h 0 00009B51 A5 movsw ; save parent 0 00009B52 8944FE mov word [ si-2 ], ax ; set pspParent 0 00009B55 16 push ss 0 00009B56 1F pop ds 0 00009B57 8026[0200]BF clropt [internalflags], tsrmode 0 00009B5C BA[0000] mov dx, msg.nowattached 0 00009B5F E9[0000] jmp putsz 3447 %endif 3448 3449 3450 %if _TSR && (_APPLICATION || _DEVICE) 3451 tsr: 3452 %if _BOOTLDR 0 00009B62 F606[0100]40 testopt [internalflags], nodosloaded 0 00009B67 7403E9[0000] jnz error 3455 %endif 0 00009B6C E8[0000] call guard_re 0 00009B6F 46 inc si 0 00009B70 AC lodsb 0 00009B71 E8[0000] call chkeol 0 00009B74 F606[0200]40 testopt [internalflags], tsrmode 0 00009B79 7408 jz .try ; not yet resident --> 0 00009B7B BA[0000] mov dx, msg.alreadytsr 0 00009B7E B81401 mov ax, 0114h 0 00009B81 EB3C jmp .specificerror_es 3465 .try: 0 00009B83 8B16[0000] mov dx, word [pspdbe] 0 00009B87 8B1E[0000] mov bx, word [pspdbg] 0 00009B8B BF0A00 mov di, 0Ah 3469 .loop: 3470 %if _PM 3471 mov cx, dx ; = original segment address 3472 call ispm 3473 jnz .rm 3474 push bx 3475 mov ax, dx 3476 [cpu 286] 3477 shr dx, 12 3478 shl ax, 4 ; shift to get a 32-bit linear address 3479 __CPU__ 3480 call getsegmented.pm ; set up selector for access 3481 ; This call makes some assumptions: 3482 ; - No mode switch occurs; we are still in PM. 3483 ; Currently none is performed from PM. 3484 ; - (e)dx isn't larger than about FFD0h. 3485 ; Currently scratchsel with an offset of zero is returned. 3486 call setrmlimit 3487 mov di, dx ; -> PSP 3488 mov dx, bx 3489 pop bx 3490 add di, byte 0Ah ; -> PSP termination vector 3491 .rm: 3492 %endif 0 00009B8E 8EC2 mov es, dx 0 00009B90 268B450C mov ax, word [es:(di-0Ah)+16h] 0 00009B94 40 inc ax 0 00009B95 7422 jz .pspnotfound 0 00009B97 48 dec ax 0 00009B98 741F jz .pspnotfound ; parent is invalid --> 3499 %if _PM 3500 cmp ax, cx 3501 %else 0 00009B9A 39D0 cmp ax, dx 3503 %endif 0 00009B9C 741B je .pspnotfound ; parent is the process itself --> 0 00009B9E 89C2 mov dx, ax 0 00009BA0 39D8 cmp ax, bx 0 00009BA2 75EA jne .loop ; parent is not us --> 0 00009BA4 26813D[D001] cmp word [es:di], int22 0 00009BA9 7506 jne .psphooked 0 00009BAB 26395D02 cmp word [es:di+2], bx 0 00009BAF 7416 je .found ; correct vector --> (otherwise: hooked) 3512 .psphooked: 0 00009BB1 BA[0000] mov dx, msg.psphooked 0 00009BB4 B80F01 mov ax, 010Fh 0 00009BB7 EB06 jmp short .specificerror_es 3516 .pspnotfound: 0 00009BB9 BA[0000] mov dx, msg.pspnotfound 0 00009BBC B81001 mov ax, 0110h 3519 .specificerror_es: 0 00009BBF E8[0000] call setrc 3521 .putsz_es: 0 00009BC2 16 push ss 0 00009BC3 07 pop es 3524 .putsz: 0 00009BC4 E9[0000] jmp putsz 3526 3527 .found: 0 00009BC7 BE[0000] mov si, psp22 0 00009BCA A5 movsw 0 00009BCB A5 movsw ; write our parent's vector 0 00009BCC 83C708 add di, 16h-(0Ah+4) 0 00009BCF A5 movsw ; write our parent 0 00009BD0 800E[0200]40 setopt [internalflags], tsrmode ; note that we are resident 3534 %if _PM 3535 push cx 3536 %else 0 00009BD5 06 push es 3538 %endif 0 00009BD6 BA[0000] mov dx, msg.nowtsr1 0 00009BD9 E8E6FF call .putsz_es 0 00009BDC 58 pop ax 0 00009BDD BF[0000] mov di, line_out 0 00009BE0 E8[0000] call hexword 0 00009BE3 E8[0000] call putsline 0 00009BE6 BF[0000] mov di, psp22 0 00009BE9 31C0 xor ax, ax 0 00009BEB AB stosw 0 00009BEC AB stosw 0 00009BED AB stosw ; clear our parent/int22 fields 0 00009BEE BA[0000] mov dx, msg.nowtsr2 0 00009BF1 EBD1 jmp short .putsz 3552 %endif 3553 3554 3555 ; INP: dx -> message, zero-terminated 3556 ; CHG: - 3557 ; OUT: message displayed or put into silent buffer 3558 ; STT: ds = es = ss = debugger data selector 3559 putsz_silent: 0 00009BF3 E81000 call silence_init 0 00009BF6 E8[0000] call putsz ; print string 3562 3563 silence_exit: 0 00009BF9 F606[0300]10 testopt [internalflags], tt_silent_mode 0 00009BFE 7405 jz @F 0 00009C00 8026[0300]DF clropt [internalflags], tt_silence 3567 @@: 0 00009C05 C3 retn 3569 3570 3571 silence_init: 0 00009C06 F606[0300]10 testopt [internalflags], tt_silent_mode 0 00009C0B 7405 jz @F 0 00009C0D 800E[0300]20 setopt [internalflags], tt_silence 3575 @@: 0 00009C12 C3 retn 3577 3578 3579 ; INP: es:di -> behind message in line_out 3580 ; CHG: ax, bx, cx, dx 3581 ; OUT: message displayed or put into silent buffer 3582 ; STT: ds = es = ss = debugger data selector 3583 putsline_silent: 0 00009C13 E8F0FF call silence_init 0 00009C16 E8[0000] call putsline 0 00009C19 EBDE jmp silence_exit 3587 3588 3589 ; INP: word [run_int] 3590 ; InDOS status 3591 ; STT: es = ds = ss 3592 ; OUT: dx -> last message 3593 ; message displayed 3594 ; CHG: ax, di 3595 putrunint: 3596 %if _DEBUG && _DEBUG_COND 3597 testopt [options6], opt6_debug_putrunint 3598 jz @F 3599 testopt [internalflags6], dif6_debug_mode 3600 jnz @F 3601 call reset_interrupts 3602 setopt [internalflags6], dif6_debug_mode 3603 setopt [options6], opt6_debug_mode 3604 @@: 3605 %endif 3606 3607 %if _DEBUG 3608 %if _DEBUG_COND 3609 testopt [internalflags6], dif6_debug_mode 3610 jz @F 3611 %endif 3612 testopt [options6], opt6_debug_putrunint_early 3613 jz @F 3614 int3 3615 nop 3616 @@: 3617 %endif 3618 3619 %if _AREAS_HOOK_SERVER 3620 _386_PM_o32 ; push ecx 3621 push cx 3622 push bx 3623 _386_PM_o32 ; push esi 3624 push si 3625 3626 mov ax, word [run_int] 3627 cmp ax, int1msg 3628 je .end_j 3629 cmp ax, int3msg 3630 je .end_j 3631 %if _CATCHINT19 3632 cmp ax, int19msg 3633 je .end_j 3634 %endif 3635 cmp ax, progtrm 3636 jne @F 3637 .end_j: 3638 jmp .end 3639 3640 @@: 3641 _386_PM_o32 ; xor ecx, ecx 3642 xor cx, cx 3643 call get_cseip_ecx_linear 3644 mov bx, dx ; bx:ax = linear cs:eip 3645 push ss 3646 pop es 3647 mov di, ddebugareas 3648 xor cx, cx 3649 3650 .loop: 3651 %if _PM 3652 mov dx, word [es:di + areastrucNext + 2] 3653 mov di, word [es:di + areastrucNext] 3654 call setes2dx 3655 %else 3656 les di, [es:di + areastrucNext] 3657 mov dx, es 3658 %endif 3659 cmp dx, word [pspdbg] 3660 je .end 3661 3662 push dx 3663 push di 3664 push cx 3665 push bx 3666 push ax 3667 3668 push di 3669 mov cx, word [es:di + areastrucFunAmount] 3670 mov di, word [es:di + areastrucFunOffset] 3671 jcxz .noareafun 3672 .loopareafun: 3673 cmp bx, word [es:di + areastrucfunLinear + 2] 3674 jne @F 3675 cmp ax, word [es:di + areastrucfunLinear] 3676 @@: 3677 jb .nextareafun 3678 3679 cmp bx, word [es:di + areastrucfunLinearEnd + 2] 3680 jne @F 3681 cmp ax, word [es:di + areastrucfunLinearEnd] 3682 @@: 3683 jae .nextareafun 3684 3685 push bx 3686 push ax 3687 push cx 3688 push di 3689 3690 sub ax, word [es:di + areastrucfunLinear] 3691 sbb bx, word [es:di + areastrucfunLinear + 2] 3692 jnz .nextareafun_pop 3693 3694 mov cx, word [es:di + areastrucfunListAmount] 3695 push cx 3696 mov di, word [es:di + areastrucfunListOffset] 3697 repne scasw 3698 pop cx 3699 jne .nextareafun_pop 3700 add cx, cx 3701 dec di 3702 dec di 3703 add di, cx 3704 _386_PM xor ecx, ecx 3705 mov cx, word [es:di] 3706 _386_PM_o32 3707 mov si, word [reg_esp] 3708 _386_PM_o32 3709 add si, cx 3710 push ds 3711 %if _PM 3712 mov bx, word [reg_ss] 3713 call test_d_b_bit 3714 mov ds, bx 3715 jz .16 3716 .32: 3717 _386_PM_a32 3718 %else 3719 mov ds, word [reg_ss] 3720 %endif 3721 .16: 3722 lodsw 3723 pop ds 3724 .gotfunction: 3725 pop di 3726 pop cx 3727 pop bx ; (discard) 3728 pop bx 3729 3730 xchg dx, ax 3731 mov bx, word [reg_cs] ; bx:dx = cs:ip 3732 call getlinear_16bit ; dx:ax = linear 3733 mov bx, dx ; bx:ax = linear 3734 jmp .noareafun 3735 3736 .nextareafun_pop: 3737 pop di 3738 pop cx 3739 pop ax 3740 pop bx 3741 .nextareafun: 3742 add di, AREASTRUCFUN_size 3743 loop .loopareafun 3744 .noareafun: 3745 pop di 3746 3747 mov cx, word [es:di + areastrucSubAmount] 3748 mov di, word [es:di + areastrucSubOffset] 3749 jcxz .noareasub 3750 .loopareasub: 3751 cmp bx, word [es:di + areastrucsubLinear + 2] 3752 jne @F 3753 cmp ax, word [es:di + areastrucsubLinear] 3754 @@: 3755 jb .nextareasub 3756 3757 cmp bx, word [es:di + areastrucsubLinearEnd + 2] 3758 jne @F 3759 cmp ax, word [es:di + areastrucsubLinearEnd] 3760 @@: 3761 jae .nextareasub 3762 3763 push bx 3764 push ax 3765 push cx 3766 push di 3767 3768 sub ax, word [es:di + areastrucsubLinear] 3769 sbb bx, word [es:di + areastrucsubLinear + 2] 3770 jnz .nextareasub_pop 3771 3772 mov dx, ax ; = ip 3773 mov si, word [es:di + areastrucsubListOffset] 3774 mov cx, word [es:di + areastrucsubListAmount] 3775 .looparea: 3776 es lodsw 3777 cmp dx, ax 3778 es lodsw 3779 jb .nextarea 3780 cmp dx, ax 3781 jae .nextarea 3782 es lodsw 3783 mov bx, ax ; es:bx -> area message 3784 xchg ax, dx ; es:dx -> area message 3785 3786 ; If we are displaying to a serial port then 3787 ; we assume that we are not sharing the output 3788 ; device with an areas hook client. Therefore 3789 ; we want to skip the initial linebreal in the 3790 ; areas message if there is one. 3791 ; The linebreaks are intended to separate (shared) 3792 ; output from prior output of the code that caused 3793 ; the fault, eg interactive E mode prompt or 3794 ; partial disassembly output. 3795 cmp word [es:bx], 13 | (10 << 8) 3796 ; is it with an initial linebreak ? 3797 jne @F ; no --> 3798 testopt [serial_flags], sf_use_serial 3799 jz @F ; if not serial --> 3800 inc dx 3801 inc dx ; skip the linebreak 3802 @@: 3803 push es 3804 pop ds ; => our area hook client's data selector 3805 call putsz ; display ds:dx -> ASCIZ message 3806 push ss 3807 pop ds ; reset ds 3808 pop di 3809 pop cx 3810 pop ax 3811 pop bx 3812 3813 pop ax 3814 pop bx 3815 pop cx 3816 pop di 3817 pop dx 3818 3819 jmp .end 3820 3821 .nextarea: 3822 add si, 4 3823 loop .looparea 3824 3825 .nextareasub_pop: 3826 pop di 3827 pop cx 3828 pop ax 3829 pop bx 3830 .nextareasub: 3831 add di, AREASTRUCSUB_size 3832 loop .loopareasub 3833 .noareasub: 3834 3835 .next: 3836 pop ax 3837 pop bx 3838 pop cx 3839 pop di 3840 %if _PM 3841 pop dx 3842 call setes2dx 3843 %else 3844 pop es 3845 %endif 3846 loop .loop_j 3847 jmp .end 3848 3849 .loop_j: 3850 jmp .loop 3851 3852 .end: 3853 _386_PM_o32 ; pop esi 3854 pop si 3855 pop bx 3856 _386_PM_o32 ; pop ecx 3857 pop cx 3858 %endif 0 00009C1B 16 push ss 0 00009C1C 07 pop es 3861 3862 .noarea: 0 00009C1D 8B16[0000] mov dx, word [run_int] 0 00009C21 81FA[0000] cmp dx, progtrm 0 00009C25 7515 jne .done 3866 0 00009C27 B8FFFF mov ax, -1 0 00009C2A E8[0000] call InDOS 0 00009C2D 7504 jnz .no_int21_4D 3870 0 00009C2F B44D mov ah, 4Dh 0 00009C31 CD21 int 21h 3873 .no_int21_4D: 0 00009C33 A3[0000] mov word [usertermcode], ax 0 00009C36 BF[0000] mov di, progexit 0 00009C39 E8[0000] call hexword 3877 .done: 0 00009C3C E9[0000] jmp putsz 3879 3880 3881 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 3881 ------------------ note: usesection lDEBUG_DATA_ENTRY 3882 %if _LINK_COMPAT 3883 align 16, db 0 3884 %endif 3885 3886 align 2, db 0 0 00005490 0000 usertermcode: dw 0 3888 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 3888 ------------------ note: usesection lDEBUG_CODE 3889 3890 3891 ; Print message about unexpected interrupt, dump registers, and 3892 ; end command. This code is also used by the G and P commands. 3893 unexpectedinterrupt: section_of_function 3894 %if _PM 3895 call resetmode 3896 %endif 0 00009C3F E8C4FF call silence_init 0 00009C42 E8D6FF call putrunint 0 00009C45 E8B1FF call silence_exit 3900 %if _CATCHINT19 0 00009C48 81FA[0000] cmp dx, int19msg 0 00009C4C 7409 je .noregs ; if it terminated, skip the registers 3903 %endif 0 00009C4E 81FA[0000] cmp dx, progtrm 0 00009C52 7403 je .noregs ; if it terminated, skip the registers 0 00009C54 E85803 call dumpregs_extended_silent 3907 .noregs: 0 00009C57 E80C03 call terminate_silent_dump.if_nonnull 0 00009C5A E8[0000] call silence_dump 3910 0 00009C5D F606[0000]08 testopt [internalflags2], dif2_gg_is_gg 0 00009C62 7407 jz @F 0 00009C64 F606[0200]20 testopt [options], gg_unexpected_no_repeat 0 00009C69 EB05 jmp @FF 3915 @@: 0 00009C6B F606[0200]40 testopt [options], tp_unexpected_no_repeat 3917 @@: 0 00009C70 7406 jz @F 0 00009C72 C706[0000][0000] mov word [lastcmd], dmycmd 3920 @@: 3921 0 00009C78 E9[0000] jmp cmd3 ; back to the start 3923 3924 3925 ; Trace an instruction. 3926 ; INP: word [reg_cs], dword [reg_eip], other register values 3927 ; OUT: NC if the breakpoint or trace interrupt was hit, 3928 ; ah = 0 3929 ; ch = 0 3930 ; d[reg_eip] adjusted if a breakpoint (bb) hit 3931 ; cx & 8 set if trace interrupt hit 3932 ; (assumed to be the expected trace hit) 3933 ; (ZF only set if _BREAKPOINTS) 3934 ; ZR if trace interrupt was hit, 3935 ; cx & 7 = 0 3936 ; NZ if a breakpoint (bb) was hit (or both were hit), 3937 ; cx & 1 set if non-pass match (actual hit), 3938 ; else cx & 2 set if pass match (consider as hit first, 3939 ; but dump registers next (not to silent buffer) 3940 ; and then continue execution) 3941 ; else cx & 4 always set, indicates any match 3942 ; (including matches that should merely continue) 3943 ; all pass points' counters stepped 3944 ; CY if no breakpoint and no trace interrupt was hit, 3945 ; cx = 0 3946 ; If [internalflags2] & dif2_gg_is_gg is set: 3947 ; ah & 7Fh = status = 0 = no error, 3948 ; 1 = couldn't write, 3949 ; 2 = unreachable, 3950 ; 3 = overwritten, al = new value 3951 ; ah & 80h = set if error restoring point, 3952 ; else error writing point to begin with 3953 ; If that flag is clear: 3954 ; Does not return if a breakpoint cannot be written 3955 ; or cannot be restored, jumps to cmd3 instead. 3956 ; CHG: all 3957 ; STT: ds = es = ss 3958 ; might return modeswitched (if dif2_gg_is_gg) 3959 ; might be called while modeswitched 3960 traceone: section_of_function 0 00009C7B F606[0000]80 testopt [internalflags2], dif2_tpg_keep_proceed_bp 0 00009C80 7403E98A00 jnz .proceedbreakpoint 3963 3964 %if _PM 3965 call resetmode 3966 %endif 0 00009C85 31C9 xor cx, cx 0 00009C87 E8[0000] call getcseipbyte 0 00009C8A 3CCD cmp al, 0CDh ; int opcode? 0 00009C8C 7403E98100 jne .isstdtrace ; no --> 0 00009C91 41 inc cx 0 00009C92 E8[0000] call getcseipbyte 0 00009C95 3C03 cmp al, 3 0 00009C97 7479 je .isstdtrace ; int 3 opcode --> 0 00009C99 F606[0000]02 testopt [options], traceints ; TM=1? 0 00009C9E 7503E9B400 jz isstdtraceX 3977 %if _IMMASM 0 00009CA3 F606[0300]02 testopt [internalflags6], dif6_immasm 0 00009CA8 7403E9AA00 jnz isstdtraceX 3980 %endif 0 00009CAD 3C01 cmp al, 1 0 00009CAF 7461 je .isstdtrace ; int 1 opcode --> 3983 3984 ; TM==1, single-step into the INT 0 00009CB1 88C3 mov bl, al 3986 %if _PM 3987 call ispm 3988 jz .singlestep_into_interrupt_pm 3989 %endif 0 00009CB3 B700 mov bh, 0 0 00009CB5 1E push ds 0 00009CB6 31C0 xor ax, ax 0 00009CB8 8ED8 mov ds, ax 0 00009CBA D1E3 shl bx, 1 0 00009CBC D1E3 shl bx, 1 0 00009CBE C537 lds si, [bx] 0 00009CC0 FA cli 0 00009CC1 8A04 mov al, byte [si] 0 00009CC3 FE04 inc byte [si] 0 00009CC5 3804 cmp byte [si], al 0 00009CC7 8804 mov byte [si], al 0 00009CC9 FB sti 0 00009CCA 8CDB mov bx, ds ; bx:si-> interrupt handler (RM, 16 bit) 0 00009CCC 89D8 mov ax, bx 0 00009CCE 1F pop ds 0 00009CCF 753E jne .singlestep_into_interrupt_setbp 4007 4008 ; The interrupt handler is in a ROM. 4009 %if 0 4010 jmp short isstdtraceX 4011 %else 0 00009CD1 8736[0000] xchg si, word [reg_eip] 0 00009CD5 8706[0000] xchg ax, word [reg_cs] ; get cs:ip, set interrupt handler address 0 00009CD9 8B0E[0000] mov cx, word [reg_efl] ; get flags 0 00009CDD 1E push ds 0 00009CDE 8B1E[0000] mov bx, word [reg_esp] 0 00009CE2 8E1E[0000] mov ds, word [reg_ss] ; ds:bx-> debuggee stack 0 00009CE6 83EB06 sub bx, byte 6 ; reserve enough space for flags, cs, ip 0 00009CE9 46 inc si 0 00009CEA 46 inc si ; skip CDh xxh opcode 0 00009CEB 894F04 mov word [bx+4], cx 0 00009CEE 894702 mov word [bx+2], ax 0 00009CF1 8937 mov word [bx+0], si ; save flags, cs, ip on stack 0 00009CF3 1F pop ds 0 00009CF4 891E[0000] mov word [reg_esp], bx ; update sp 0 00009CF8 8026[0100]FC and byte [reg_efl+1], ~(2|1) ; clear IF and TF (NC) 4027 ; Note: If invalid flag values were previously set by the user 4028 ; by directly accessing the FL or EFL register, these won't be 4029 ; fixed by us now. This could be worked around by executing a 4030 ; NOP in debuggee's environment (or only with debuggee's flags) 4031 ; first, but I don't think it's much of an issue. 0 00009CFD C706[0000][0000] mov word [run_int], int1msg 0 00009D03 8126[0000]7FF8 clropt [internalflags2], dif2_tpg_have_bp | dif2_tpg_adjusted_cseip | dif2_tpg_do_not_adjust | dif2_tpg_keep_proceed_bp, 1 0 00009D09 B90800 mov cx, 8 0 00009D0C 31C0 xor ax, ax ; NC, ZR 0 00009D0E C3 retn 4039 4040 %endif 4041 %if _PM 4042 .singlestep_into_interrupt_pm: 4043 mov ax, 0204h 4044 int 31h 4045 mov bx, cx 4046 _386_o32 ; mov esi, edx 4047 mov si, dx ; bx:(e)si-> interrupt handler 4048 test bl, 4 ; is it a LDT selector? (NC) 4049 jz isstdtraceX ; no --> 4050 %endif 4051 .singlestep_into_interrupt_setbp: 4052 .proceedbreakpoint: 0 00009D0F E95B04 jmp proceedbreakpoint 4054 4055 .isstdtrace: 4056 %if _PM 4057 call ispm 4058 jz .notdpmientry ; already in PM --> 4059 mov ax, w[reg_eip] ; is this a switch to protected mode ? 4060 cmp ax, w[dpmiwatch+0] 4061 jne .notdpmientry 4062 mov ax, w[reg_cs] 4063 cmp ax, w[dpmiwatch+2] 4064 je isdpmientry ; yes, catch it --> (this means really "go") 4065 .notdpmientry: 4066 %endif 0 00009D12 800E[0100]01 or byte [reg_efl+1], 1 ; set single-step mode (cleared when returning into DEBUG) 0 00009D17 31C9 xor cx, cx 0 00009D19 E85100 call skipprefixes 0 00009D1C 3C9C cmp al, 9Ch ; opcode "PUSHF"? 0 00009D1E 7517 jnz .notpushf 4072 %if _BREAKPOINTS 0 00009D20 E8E604 call run_with_bb 0 00009D23 B400 mov ah, 0 0 00009D25 9C pushf 4076 %else 4077 call run 4078 xor cx, cx 4079 xor ax, ax 4080 %endif 4081 ; Clear TF in the fl word or efl dword 4082 ; pointed to by debuggee's ss:(e)sp 0 00009D26 06 push es 4084 %if _PM 4085 mov bx, word [reg_ss] ; get ss selector into bx 4086 mov es, bx 4087 _386 call test_d_b_bit ; check whether a 32-bit ss 4088 %else 0 00009D27 8E06[0000] mov es, word [reg_ss] 4090 %endif 4091 _386_PM_o32 ; mov ebx, dword [reg_esp] 0 00009D2B 8B1E[0000] mov bx, word [reg_esp] ; es:(e)bx-> debuggee's stack 4093 _386_PM jz .pushf_16 4094 _386_PM and byte [es:ebx+1], ~1 ; clear TF 4095 _386_PM jmp short .pushf_common 4096 .pushf_16: 0 00009D2F 26806701FE and byte [es:bx+1], ~1 ; clear TF 4098 .pushf_common: 0 00009D34 07 pop es 0 00009D35 EB06 jmp short .checkreturn 4101 .notpushf: 4102 %if _BREAKPOINTS 0 00009D37 E8CF04 call run_with_bb 0 00009D3A B400 mov ah, 0 0 00009D3C 9C pushf 4106 %else 4107 call run 4108 xor cx, cx 4109 xor ax, ax 4110 %endif 4111 .checkreturn: 0 00009D3D 813E[0000][0000] cmp word [run_int], int1msg 0 00009D43 7509 jne .nomatch 0 00009D45 80C908 or cl, 8 4115 %if _BREAKPOINTS 0 00009D48 9D popf ; CF 0 00009D49 7308 jnc .ret_NZ_NC 4118 %endif 0 00009D4B 38C0 cmp al, al ; if correct interrupt (ZR, NC) 0 00009D4D C3 retn 4121 4122 .nomatch: 4123 %if _BREAKPOINTS 0 00009D4E 9D popf ; CF 0 00009D4F 7302 jnc .ret_NZ_NC 4126 %endif 0 00009D51 F9 stc 0 00009D52 C3 retn 4129 4130 %if _BREAKPOINTS 4131 .ret_NZ_NC: 0 00009D53 80C904 or cl, 4 ; (NZ, NC) 0 00009D56 C3 retn 4134 %endif 4135 4136 4137 ; an INT is to be processed (TM is 0) 4138 ; to avoid the nasty x86 bug which makes IRET 4139 ; cause a debug exception 1 instruction too late 4140 ; a breakpoint is set behind the INT 4141 4142 isstdtraceX: 0 00009D57 B90200 mov cx, 2 0 00009D5A E84600 call iswriteablecseip ; is it ROM ? 0 00009D5D 72B3 jc traceone.isstdtrace ; is read-only --> 0 00009D5F 8B1E[0000] mov bx, word [reg_cs] 4147 4148 ; (e)si = (e)ip + 2 4149 ; We don't test whether it's a 32-bit code segment here. 4150 ; The previous code would leave the high word of esi uninitialized then. 4151 _386_PM_o32 ; mov esi, dword [reg_eip] 0 00009D63 8B36[0000] mov si, word [reg_eip] 4153 _386_PM_o32 ; add esi, byte 2 0 00009D67 83C602 add si, byte 2 ; ! do not remove the byte override, else o32 won't work 0 00009D6A E90004 jmp proceedbreakpoint ; set BP at BX:(E)SI and run debuggee 4156 4157 ; Call getcseipbyte and loop while increasing cx if the returned 4158 ; byte was a prefix. Returns the first non-prefix byte (an opcode) 4159 ; in al. (WAIT or FWAIT is not considered a prefix because it's 4160 ; really an opcode and we also trace it without executing a 4161 ; following FPU opcode.) 4162 skipprefixes: 4163 .: 0 00009D6D E8[0000] call getcseipbyte 0 00009D70 3C26 cmp al, 26h 0 00009D72 742A je .prefix ; ES 0 00009D74 3C2E cmp al, 2Eh 0 00009D76 7426 je .prefix ; CS 0 00009D78 3C36 cmp al, 36h 0 00009D7A 7422 je .prefix ; SS 0 00009D7C 3C3E cmp al, 3Eh 0 00009D7E 741E je .prefix ; DS 0 00009D80 3CF0 cmp al, 0F0h 0 00009D82 741A je .prefix ; LOCK 0 00009D84 3CF3 cmp al, 0F3h 0 00009D86 7416 je .prefix ; REPZ 0 00009D88 3CF2 cmp al, 0F2h 0 00009D8A 7412 je .prefix ; REPNZ 0 00009D8C EB14 _no386_jmps .noprefix ; no 386, following aren't prefixes (invalid opcodes on 186+) --> 0 00009D8E 3C64 cmp al, 64h 0 00009D90 740C je .prefix ; FS 0 00009D92 3C65 cmp al, 65h 0 00009D94 7408 je .prefix ; GS 0 00009D96 3C66 cmp al, 66h 0 00009D98 7404 je .prefix ; o32/o16 0 00009D9A 3C67 cmp al, 67h 0 00009D9C 7504 jne .noprefix ; not a32/a16 4188 .prefix: 0 00009D9E 41 inc cx 4190 ; jmp short . 0 00009D9F 79CC jns . ; this is not correct but serves as hack to avoid an infinite loop 4192 ; (note that getcseipbyte really uses cx as signed number) 0 00009DA1 49 dec cx ; back to 07FFFh 4194 .noprefix: 0 00009DA2 C3 retn 4196 4197 4198 ;--- test if memory at CS:E/IP can be written to 4199 ;--- return C if not 4200 4201 iswriteablecseip: 0 00009DA3 E8[0000] call getcseipbyte ; get byte at CS:EIP+CX 0 00009DA6 88C4 mov ah, al 0 00009DA8 34FF xor al, 0FFh 0 00009DAA E8[0000] call setcseipbyte 0 00009DAD 720E jc .return 0 00009DAF E8[0000] call getcseipbyte 0 00009DB2 38C4 cmp ah, al ; is it ROM? 0 00009DB4 F9 stc 0 00009DB5 7406 jz .return 0 00009DB7 88E0 mov al, ah 0 00009DB9 E8[0000] call setcseipbyte 0 00009DBC F8 clc 4214 .return: 0 00009DBD C3 retn 4216 4217 4218 %if _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 4219 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 4219 ------------------ note: usesection lDEBUG_DATA_ENTRY 4220 4221 r86m_debugger_exception: 0 00005492 FA cli 0 00005493 8CC8 mov ax, cs 0 00005495 8ED8 mov ds, ax ; => debugger data segment 0 00005497 8F06[0000] pop word [exception_csip] ; ip 0 0000549B 8F06[0200] pop word [exception_csip + 2] ; cs 0 0000549F 5A pop dx ; get rid of flags 4228 %if _AREAS 0 000054A0 FC cld 0 000054A1 8EC0 mov es, ax 0 000054A3 89E6 mov si, sp 0 000054A5 BF[0000] mov di, exception_stack 0 000054A8 B90800 mov cx, 8 0 000054AB F3A4 rep movsb 4235 %endif 0 000054AD 8ED0 mov ss, ax 4237 %ifn _ONLY386 4238 ..@patch_no386_ds_6_DATA_ENTRY: 0 000054AF 66 o32 ; mov esp, dword [savesp] 4240 %endif 0 000054B0 8B26[0000] mov sp, word [savesp] 0 000054B4 90 times 1 - (($ - $$) & 1) nop ; align in-code parameter 0 000054B5 E8[0000] call entry_to_code_seg 0 000054B8 [200E] dw .code 4245 4246 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 4246 ------------------ note: usesection lDEBUG_CODE 4247 .code: 0 00009DBE FB sti 4249 %endif 4250 %if _PM || _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 4251 debuggerexception: 0 00009DBF FC cld 0 00009DC0 16 push ss 0 00009DC1 1F pop ds 4255 %if _DEBUG && _DEBUG_COND 4256 testopt [options6], opt6_debug_exception 4257 jz @F 4258 testopt [internalflags6], dif6_debug_mode 4259 jnz @F 4260 call reset_interrupts 4261 setopt [internalflags6], dif6_debug_mode 4262 setopt [options6], opt6_debug_mode 4263 @@: 4264 %endif 4265 4266 %if _DEBUG 4267 %if _DEBUG_COND 4268 testopt [internalflags6], dif6_debug_mode 4269 jz @F 4270 %endif 4271 testopt [options6], opt6_debug_exception_early 4272 jz @F 4273 int3 4274 nop 4275 @@: 4276 %endif 0 00009DC2 E8[0000] call unhack ; sets es to ss 4278 4279 %if _AREAS 0 00009DC5 8CCB mov bx, cs 0 00009DC7 3B1E[0200] cmp bx, word [exception_csip + 2] 0 00009DCB 7532 jne .unknownarea 0 00009DCD A1[0000] mov ax, word [exception_csip] 0 00009DD0 BF[A000] mov di, areafunctions 0 00009DD3 B90500 mov cx, areafunctions.amount 0 00009DD6 F2AF repne scasw 0 00009DD8 7508 jne .unknownfunction 0 00009DDA BB[0000] mov bx, exception_stack 0 00009DDD 035D08 add bx, word [di - areafunctions - 2 + areafunctions.skip] 0 00009DE0 8B07 mov ax, [bx] 4291 .gotfunction: 4292 4293 .unknownfunction: 0 00009DE2 89C2 mov dx, ax ; = ip 0 00009DE4 BE[3000] mov si, areas 0 00009DE7 B90E00 mov cx, areas.amount 4297 .looparea: 0 00009DEA AD lodsw 0 00009DEB 39C2 cmp dx, ax 0 00009DED AD lodsw 0 00009DEE 720B jb .nextarea 0 00009DF0 39C2 cmp dx, ax 0 00009DF2 7307 jae .nextarea 0 00009DF4 AD lodsw 0 00009DF5 92 xchg ax, dx 0 00009DF6 E8[0000] call putsz 0 00009DF9 EB04 jmp .donearea 4308 .nextarea: 0 00009DFB AD lodsw 0 00009DFC AD lodsw 0 00009DFD E2EB loop .looparea 4312 4313 .donearea: 4314 .unknownarea: 4315 %endif 0 00009DFF E81BFE call putrunint.noarea 4317 %if _EXCCSIP 0 00009E02 BF[0000] mov di, exccsip 0 00009E05 A1[0200] mov ax, word [exception_csip + 2] 0 00009E08 E8[0000] call hexword 0 00009E0B 47 inc di 0 00009E0C A1[0000] mov ax, word [exception_csip] 0 00009E0F E8[0000] call hexword 4324 0 00009E12 BA[0000] mov dx, excloc 0 00009E15 E8[0000] call putsz 4327 %endif 4328 %if _DEBUG 4329 %if _DEBUG_COND 4330 testopt [internalflags6], dif6_debug_mode 4331 jz @F 4332 %endif 4333 testopt [options6], opt6_debug_exception_late 4334 jz @F 4335 int3 4336 @@: 4337 %endif 0 00009E18 E9[0000] jmp cmd3 4339 %endif ; _PM || _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 4340 4341 4342 %if _AREAS 4343 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 4343 ------------------ note: usesection lDEBUG_DATA_ENTRY 4344 4345 %imacro areadefine 1-2.nolist 4346 dw ..@%1_start 4347 dw ..@%1_end 4348 %ifempty %2 4349 dw msg.area_%1 4350 %else 4351 dw msg.area_%2 4352 %endif 4353 dw 0 4354 %endmacro 4355 4356 %define AREAFUNCTIONS "" 4357 %define AREAFUNCTIONSSKIP "" 4358 %imacro areafunctiondefine 2.nolist 4359 %xdefine AREAFUNCTIONS AREAFUNCTIONS,%1 4360 %xdefine AREAFUNCTIONSSKIP AREAFUNCTIONSSKIP,%2 4361 %endmacro 4362 0 000054BA 00 align 8, db 0 4364 areas: 4365 .: 4366 ; More specific areas first! 4367 ; (The first range match wins.) 0 000054C0 [0000][0000][0000] areadefine ee_interactive_access 0 000054C6 0000 4369 %ifn _DUALCODE && _EXPRDUALCODE 0 000054C8 [0000][0000][0000] areadefine hh_indirection_memory_access 0 000054CE 0000 4371 %else 4372 areadefine hh_code1_indirection_memory_access, hh_indirection_memory_access 4373 %endif 0 000054D0 [0000][0000][0000] areadefine rr_variable_read_access 0 000054D6 0000 0 000054D8 [0000][0000][0000] areadefine rr_variable_write_access 0 000054DE 0000 0 000054E0 [0000][0000][0000] areadefine uu_referenced_memory_access 0 000054E6 0000 0 000054E8 [0000][0000][0000] areadefine uu_simulate_scas 0 000054EE 0000 0 000054F0 [0000][0000][0000] areadefine uu_simulate_cmps 0 000054F6 0000 0 000054F8 [0000][0000][0000] areadefine aa_access 0 000054FE 0000 0 00005500 [0000][0000][0000] areadefine dd_access 0 00005506 0000 0 00005508 [0000][0000][0000] areadefine ee_access 0 0000550E 0000 0 00005510 [0000][0000][0000] areadefine rr_access 0 00005516 0000 0 00005518 [0000][0000][0000] areadefine sss_access 0 0000551E 0000 0 00005520 [0000][D115][0000] areadefine run_access 0 00005526 0000 0 00005528 [0000][0000][0000] areadefine uu_access 0 0000552E 0000 4386 .end: 4387 .amount: equ (.end - .) / 8 4388 4389 %if _DUALCODE && _EXPRDUALCODE 4390 areas2: 4391 .: 4392 areadefine hh_indirection_memory_access 4393 .end: 4394 .amount: equ (.end - .) / 8 4395 %endif 4396 4397 areafunctiondefine ..@readmem_fault_skip_4_near_call, 4 4398 areafunctiondefine ..@writemem_fault_skip_4_near_call_a, 4 4399 areafunctiondefine ..@writemem_fault_skip_4_near_call_b, 4 4400 areafunctiondefine ..@getcseipbyte_fault_skip_2_near_call, 2 4401 areafunctiondefine ..@setcseipbyte_fault_skip_2_near_call, 2 4402 %if _PM 4403 areafunctiondefine ..@readmem_fault_skip_2_near_call, 2 4404 areafunctiondefine ..@writemem_fault_skip_2_near_call_a, 2 4405 areafunctiondefine ..@writemem_fault_skip_2_near_call_b, 2 4406 areafunctiondefine ..@getcseipbyte_fault_skip_6_near_call, 6 4407 areafunctiondefine ..@setcseipbyte_fault_skip_6_near_call, 6 4408 %endif 4409 4410 4411 align 2, db 0 4412 areafunctions: 4413 .: 0 00005530 [0000][0000][0000] repeatdw AREAFUNCTIONS 0 00005536 [0000][0000] 4415 .end: 4416 .amount: equ (.end - .) / 2 4417 .skip: 0 0000553A 040004000400020002 repeatdw AREAFUNCTIONSSKIP 0 00005543 00 4419 4420 4421 %if _AREAS_HOOK_CLIENT 4422 areas_struc: 4423 istruc AREASTRUC 4424 at areastrucEntry 4425 stc 4426 retf 4427 at areastrucNext, dd -1 4428 at areastrucPrev, dd -1 4429 at areastrucSubAmount, dw areas_sub_amount 4430 at areastrucSubOffset, dw areas_sub 4431 at areastrucFunAmount, dw 1 4432 at areastrucFunOffset, dw areas_fun 4433 iend 4434 4435 areas_sub: 4436 istruc AREASTRUCSUB 4437 at areastrucsubLinear, dd 0 4438 at areastrucsubLinearEnd 4439 %ifn _LINK 4440 dd ldebug_code_size 4441 %else 4442 dw behind_code wrt lDEBUG_CODE 4443 %endif 4444 at areastrucsubListOffset, dw areas 4445 at areastrucsubListAmount, dw areas.amount 4446 iend 4447 %if _DUALCODE && _EXPRDUALCODE 4448 istruc AREASTRUCSUB 4449 at areastrucsubLinear, dd 0 4450 at areastrucsubLinearEnd 4451 %ifn _LINK 4452 dd ldebug_code2_size 4453 %else 4454 dw behind_code2 wrt lDEBUG_CODE2 4455 %endif 4456 at areastrucsubListOffset, dw areas2 4457 at areastrucsubListAmount, dw areas2.amount 4458 iend 4459 %endif 4460 areas_sub_amount equ ($ - areas_sub) / AREASTRUCSUB_size 4461 4462 areas_fun: 4463 istruc AREASTRUCFUN 4464 at areastrucfunLinear, dd 0 4465 at areastrucfunLinearEnd 4466 %ifn _LINK 4467 dd ldebug_code_size 4468 %else 4469 dw behind_code wrt lDEBUG_CODE 4470 %endif 4471 at areastrucfunListOffset, dw areafunctions 4472 at areastrucfunListAmount, dw areafunctions.amount 4473 iend 4474 %endif 4475 4476 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 4476 ------------------ note: usesection lDEBUG_CODE 4477 %endif 4478 4479 4480 %if _PM 4481 [cpu 386] 4482 ; INP: dh = flags as for pp2,pp3,pp5 (1 = ASIZE, 2 = OSIZE) 4483 ; OUT: dh = flags as used by pp3,pp5 (1 = A32, 2 = O32) 4484 pp_fix32bitflags: section_of_function 4485 call test_d_b_bit 4486 jz .16 4487 xor dh, 1|2 ; toggle OSIZE and ASIZE (once) 4488 .16: 4489 retn 4490 __CPU__ 4491 %endif 4492 4493 ; P command - proceed (i.e., skip over call/int/loop/string instruction). 4494 pp: 4495 %if _RH 0 00009E1B E8[0000] call enable_rh 4497 %endif 0 00009E1E C706[0000][7D0E] mov word [lastcmd], pp 0 00009E24 800E[0100]10 setopt [internalflags2], dif2_is_pp 0 00009E29 E87705 call parse_pt ; process arguments 4501 4502 ; Do it times. First check the type of instruction. 4503 pp1: 0 00009E2C 53 push bx 0 00009E2D 51 push cx ; save bx:cx 4506 %if _PM 4507 call resetmode 4508 %endif 0 00009E2E BA0F00 mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 0 00009E31 8B1E[0000] mov bx, word [reg_cs] 4511 _386_PM_o32 ; mov esi, dword [reg_eip] 0 00009E35 8B36[0000] mov si, word [reg_eip] 4513 pp2: 0 00009E39 E8C703 call pp16 ; get next instruction byte into AL 0 00009E3C BF[0000] mov di, ppbytes 0 00009E3F B9[0000] mov cx, PPLEN 0 00009E42 A2[0000] mov byte [pp_instruction], al 0 00009E45 F2AE repne scasb 0 00009E47 752B jne pp5 ; if not one of these --> 4520 %if _LINK_COMPAT 0 00009E49 8A85[FFFF] mov al,byte [word di+PPLEN-1]; get corresponding byte in ppinfo 4522 %else 4523 mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 4524 %endif 0 00009E4D A880 test al, PP_PREFIX ; prefix ? 0 00009E4F 740F jz pp3 ; no --> 0 00009E51 08C6 or dh, al ; set the OSIZE or ASIZE flags if either of these 4528 ; Note: Multiple OSIZE in a 16-bit cs do not toggle 4529 ; between decoding as O32 and O16, they're always 4530 ; decoded as O32. The same is true for A32, and 4531 ; in a 32-bit cs for O16 and A16. 0 00009E53 FECA dec dl 0 00009E55 75E2 jnz pp2 ; if not out of bytes --> 0 00009E57 BA[0000] mov dx, msg.warnprefix 0 00009E5A E8[0000] call putsz 0 00009E5D E9B500 jmp pp12 4537 4538 ; A repeatable string, interrupt, call immediate or loop 4539 ; instruction is to be decoded. Finish the decoding and 4540 ; skip the appropriate number of opcode bytes. 4541 pp3: 4542 _386_PM call pp_fix32bitflags 4543 _386_PM_o32 0 00009E60 8936[0000] mov word [pp_operand], si 0 00009E64 A840 test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 0 00009E66 7405 jz .ignoreosize ; no --> 0 00009E68 80E602 and dh, 2 0 00009E6B 00F0 add al, dh 4549 .ignoreosize: 0 00009E6D 83E007 and ax, PP_SIZ_MASK 4551 _386_PM movzx eax, ax ; clear high word (in case it counts) 4552 _386_PM_o32 ; add esi, eax 0 00009E70 01C6 add si, ax 0 00009E72 EB55 jmp pp10 4555 4556 4557 pp5: 4558 _386_PM call pp_fix32bitflags 0 00009E74 3CFF cmp al, 0FFh ; FF/2 or FF/3 indirect NEAR or FAR call ? 0 00009E76 7403E99A00 jne pp12 ; no, just an ordinary instruction --> 0 00009E7B E88503 call pp16 ; get MOD REG R/M byte 0 00009E7E 24F7 and al, ~ (1 << 3) ; clear lowest bit of REG field (/3 to /2) 0 00009E80 3410 xor al, 2 << 3 ; /3 or /2 to /0 0 00009E82 A838 test al, 7 << 3 0 00009E84 7403E98C00 jnz pp12 ; if not FF/2 or FF/3 --> 0 00009E89 3CC0 cmp al, 0C0h ; mod = 3 ? 0 00009E8B 733C jae .adjust0 ; if just a register --> 0 00009E8D F6C601 test dh, 1 0 00009E90 750E jnz .a32 ; if 32-bit addressing --> 0 00009E92 3C06 cmp al, 6 ; mod = 0 r/m = 6 would encode bp ? 0 00009E94 7431 je .adjust2 ; if just plain disp16 --> 0 00009E96 3C40 cmp al, 40h 0 00009E98 722F jb .adjust0 ; if indirect register --> 0 00009E9A 3C80 cmp al, 80h 0 00009E9C 722A jb .adjust1 ; if disp8[reg(s)] 0 00009E9E EB27 jmp short .adjust2 ; it's disp16[reg(s)] 4577 4578 ; Handle 32-bit addressing (A32 ModR/M referencing memory) 4579 .a32: 0 00009EA0 3C05 cmp al, 5 ; mod = 0 and r/m = 5 (would encode ebp) ? 0 00009EA2 7421 je .adjust4 ; if just plain disp32 --> 0 00009EA4 3404 xor al, 4 ; 4 to 0 (r/m 4 would encode esp) 0 00009EA6 A807 test al, 7 ; 0 if r/m would encode esp 0 00009EA8 7513 jnz .a32_nosib ; if no SIB byte --> 0 00009EAA 86C4 xchg al, ah 0 00009EAC E85403 call pp16 0 00009EAF 86C4 xchg al, ah ; load and skip the SIB byte 4588 ; The SIB byte is only used here to detect the 4589 ; special case encoding of disp32 with mod=0 4590 ; and base=5. index=4 is also special but it 4591 ; does not alter the size of the displacement 4592 ; that we have to skip. 0 00009EB1 A8C0 test al, 0C0h ; is it mod = 0 ? 0 00009EB3 7508 jnz @F ; no, not a special case --> 0 00009EB5 80E407 and ah, 7 0 00009EB8 80FC05 cmp ah, 5 ; is it base = 5 ? 0 00009EBB 7408 je .adjust4 ; yes, special case encoding of disp32 --> 4598 @@: 4599 .a32_nosib: 0 00009EBD 3C40 cmp al, 40h 0 00009EBF 7208 jb .adjust0 ; if indirect register --> 0 00009EC1 3C80 cmp al, 80h 0 00009EC3 7203 jb .adjust1 ; if disp8[reg(s)] --> 4604 ; otherwise, it's disp32[reg(s)] 4605 .adjust4: 4606 _386_PM_o32 ; inc esi 0 00009EC5 46 inc si ; skip an instruction byte 4608 _386_PM_o32 ; inc esi 0 00009EC6 46 inc si ; skip an instruction byte 4610 .adjust2: 4611 _386_PM_o32 ; inc esi 0 00009EC7 46 inc si ; skip an instruction byte 4613 .adjust1: 4614 _386_PM_o32 ; inc esi 0 00009EC8 46 inc si ; skip an instruction byte 4616 .adjust0: 4617 4618 pp10: 4619 _386_PM_o32 0 00009EC9 56 push si 4621 0 00009ECA 803E[0000]E8 cmp byte [pp_instruction], 0E8h 0 00009ECF 7534 jne .done 4624 4625 _386_PM_o32 0 00009ED1 8B36[0000] mov si, word [pp_operand] 4627 4628 _386_PM xor eax, eax 0 00009ED5 E82B03 call pp16 0 00009ED8 86C4 xchg al, ah 0 00009EDA E82603 call pp16 0 00009EDD 86C4 xchg al, ah 4633 _386_PM jmp @F 0 00009EDF F6C602 test dh, 2 0 00009EE2 7521 jnz .notcallrel16 4636 @@: 4637 _386_PM test dh, 2 4638 _386_PM jz @F 4639 4640 _386_PM rol eax, 16 4641 _386_PM call pp16 4642 _386_PM xchg al, ah 4643 _386_PM call pp16 4644 _386_PM xchg al, ah 4645 _386_PM rol eax, 16 4646 @@: 4647 _386_PM_o32 0 00009EE4 01C6 add si, ax 0 00009EE6 B20F mov dl, 15 ; number of bytes to go 4650 .loop: 0 00009EE8 E81803 call pp16 0 00009EEB 3CCB cmp al, 0CBh ; retf ? 0 00009EED 7417 je .trace 0 00009EEF 3CCA cmp al, 0CAh ; retf imm16 ? 0 00009EF1 7413 je .trace 0 00009EF3 3CCF cmp al, 0CFh ; iret ? 0 00009EF5 740F je .trace 0 00009EF7 BF[0000] mov di, ppbytes 0 00009EFA B9[0000] mov cx, PPLEN_ONLY_PREFIXES 0 00009EFD F2AE repne scasb 0 00009EFF 7504 jne .done 4662 ; if one of the prefixes 0 00009F01 FECA dec dl 0 00009F03 75E3 jnz .loop ; if not out of bytes --> 4665 4666 ; fall through: do not trace 4667 .notcallrel16: 4668 .done: 0 00009F05 A8 db __TEST_IMM8 ; (skip stc, NC) 4670 .trace: 0 00009F06 F9 stc ; trace 4672 _386_PM_o32 0 00009F07 5E pop si 4674 0 00009F08 720B jc pp12 ; trace --> 4676 %if _SYMBOLIC 4677 call pp3_check_symhints 4678 jc pp12 ; trace --> 4679 %endif 4680 ; jmp pp11 ; we have a skippable instruction here 4681 pp11: 4682 _386_PM call test_d_b_bit 4683 _386_PM jnz .32 ; full 32-bit offset valid --> 4684 _386_PM movzx esi, si ; clear high word here 4685 .32: 4686 @@: 0 00009F0A E86002 call proceedbreakpoint ; run until the breakpoint is hit 0 00009F0D 7254 jc pp15 ; unexpected --> 4689 %if _BREAKPOINTS 0 00009F0F 7515 jnz pp12.bb_hit 4691 %endif 0 00009F11 31D2 xor dx, dx ; do not skip WHILE 0 00009F13 EB2C jmp short pp13 4694 4695 pp12: 0 00009F15 F606[0000]80 testopt [internalflags2], dif2_tpg_keep_proceed_bp 0 00009F1A 75EE jnz @B 4698 0 00009F1C E85CFD call traceone 0 00009F1F 7242 jc pp15 4701 ; jc unexpectedinterrupt 4702 4703 %if _BREAKPOINTS 0 00009F21 BA0000 mov dx, 0 ; do not skip WHILE 0 00009F24 7413 jz @F 4706 4707 .bb_hit: 0 00009F26 E852FB call handle_bb_hit_pass_match 0 00009F29 7204 jc .actual_hit 4710 d5 call d5message 4711 d5 asciz "in pp12.bb_hit after non-hit",13,10 0 00009F2B 741C jz pp13.nodump 0 00009F2D EB12 jmp pp13 4714 4715 4716 .actual_hit: 4717 %if _PM 4718 call resetmode 4719 %endif 0 00009F2F E8DDF3 call put_deferred_message_silent 0 00009F32 E87A00 call dumpregs_extended_silent 0 00009F35 59 pop cx 0 00009F36 5B pop bx ; (discard counter) 0 00009F37 EB23 jmp @FF 4725 4726 @@: 4727 %endif 4728 4729 ; We could check here for the correct address too, but that 4730 ; would require disassembling the instruction and correctly so. 4731 ; (Disassembling it incorrectly would only result in spurious 4732 ; "Unexpected single-step interrupt" messages aborting multi- 4733 ; traces though, so it won't be fatal.) 4734 ; Wouldn't really be useful though: Only the "int1" or "int 01h" 4735 ; instructions should cause this, and their operation means we 4736 ; might as well behave as if the breakpoint was expected. 0 00009F39 813E[0000][0000] cmp word [run_int], int1msg 0 00009F3F 7522 jne pp15 ; if some other interrupt (unexpected) --> 4739 4740 pp13: 0 00009F41 52 push dx 4742 %if _PM 4743 call resetmode 4744 %endif 4745 ; An expected breakpoint. Dump registers, then loop. 0 00009F42 E8CAF3 call put_deferred_message_silent 0 00009F45 E86700 call dumpregs_extended_silent 0 00009F48 5A pop dx ; preserve skip WHILE flag 4749 4750 .nodump: 0 00009F49 E8E8FA call tt_handle_while 0 00009F4C 59 pop cx 0 00009F4D 5B pop bx 4754 0 00009F4E 83E901 sub cx, 1 0 00009F51 83DB00 sbb bx, 0 4757 0 00009F54 85DB test bx, bx 0 00009F56 7508 jnz pp14 0 00009F58 85C9 test cx, cx 0 00009F5A 7504 jnz pp14 ; back for more --> 4762 4763 @@: 4764 %if _PM 4765 call resetmode 4766 %endif 0 00009F5C E8[0000] call silence_dump 4768 0 00009F5F C3 retn 4770 4771 %if ($ - pp1 - 1) < 128 4772 pp14: equ pp1 4773 %else 0 00009F60 E9C9FE pp14: jmp pp1 4775 %endif 4776 4777 pp15: 0 00009F63 E9D9FC jmp unexpectedinterrupt ; print message about unexpected interrupt 4779 ; and quit 4780 4781 4782 %if _SYMBOLIC 4783 ; INP: bx:(e)si -> where to place breakpoint by default 4784 ; byte [pp_instruction] = E8h if near immediate call, 4785 ; bx:(d)word [pp_operand] -> rel16/rel32 4786 ; word [reg_cs]:(d)word [reg_eip] = next CS:(E)IP 4787 ; OUT: NC if no symhint detected or only skip symhints, 4788 ; bx:(e)si -> where to place breakpoint 4789 ; (will be modified if skip symhints occurred) 4790 ; CY if trace symhints detected 4791 pp3_check_symhints: 4792 nearcall zz_detect_xms ; re-detect XMS if used after run 4793 4794 ; Check for ..@symhint_trace|skip_caller_* hint at called address. 4795 pp3_check_trace_caller_or_skip_caller: 4796 xor ax, ax 4797 lframe 4798 lenter 4799 lvar word, segment 4800 push bx 4801 lvar dword, offset 4802 %ifn _PM 4803 push ax 4804 %else 4805 _no386 push ax 4806 %endif 4807 _386_PM_o32 4808 push si 4809 lvar word, skip 4810 push ax 4811 4812 mov al, byte [pp_instruction] 4813 cmp al, 0E8h 4814 jne .notcallrel16 4815 _386_PM_o32 4816 mov si, word [pp_operand] 4817 4818 _386_PM movzx eax, ax 4819 call pp16 4820 xchg al, ah 4821 call pp16 4822 xchg al, ah 4823 _386_PM jmp @F 4824 test dh, 2 4825 jnz .notcallrel16 4826 @@: 4827 _386_PM test dh, 2 4828 _386_PM jz @F 4829 4830 _386_PM rol eax, 16 4831 _386_PM call pp16 4832 _386_PM xchg al, ah 4833 _386_PM call pp16 4834 _386_PM xchg al, ah 4835 _386_PM rol eax, 16 4836 @@: 4837 _386_PM_o32 4838 add si, ax 4839 _386_PM_o32 4840 mov dx, si 4841 call getlinear_d_b 4842 jc @F 4843 mov cx, dx 4844 mov bx, ax 4845 nearcall binsearchmain ; search for matching symbol 4846 jcxz @F 4847 .loop_symbol: 4848 push bx ; main index 4849 push ax ; (reserve space, uninitialised) 4850 dualcall getfarpointer.main 4851 pop di 4852 pop es 4853 4854 test byte [es:di + smFlags + 1], smfSymHint >> 8 4855 jz .next_symbol 4856 4857 nearcall zz_copy_strings_to_str_buffer 4858 4859 push cx 4860 push ss 4861 pop es 4862 mov di, str_buffer + msg.symhint_size 4863 mov si, msg.trace_caller 4864 mov cx, msg.trace_caller_size 4865 push di 4866 repe cmpsb 4867 pop di 4868 pop cx 4869 je pp3_trace 4870 4871 push cx 4872 mov si, msg.skip_caller 4873 mov cx, msg.skip_caller_size 4874 repe cmpsb 4875 pop cx 4876 jne .next_symbol 4877 4878 call pp3_handle_skip_di 4879 4880 .next_symbol: 4881 inc bx 4882 loop .loop_symbol 4883 4884 @@: 4885 .notcallrel16: 4886 4887 4888 ; Check for ..@symhint_trace|skip_here_* hint at cs:eip address. 4889 pp3_check_trace_here_or_skip_here: 4890 mov bx, word [reg_cs] 4891 _386_PM_o32 4892 mov dx, word [reg_eip] 4893 call getlinear_d_b 4894 jc @F 4895 mov cx, dx 4896 mov bx, ax 4897 nearcall binsearchmain ; search for matching symbol 4898 jcxz @F 4899 .loop_symbol: 4900 push bx ; main index 4901 push ax ; (reserve space, uninitialised) 4902 dualcall getfarpointer.main 4903 pop di 4904 pop es 4905 4906 test byte [es:di + smFlags + 1], smfSymHint >> 8 4907 jz .next_symbol 4908 4909 nearcall zz_copy_strings_to_str_buffer 4910 4911 push cx 4912 push ss 4913 pop es 4914 mov di, str_buffer + msg.symhint_size 4915 mov si, msg.trace_here 4916 mov cx, msg.trace_here_size 4917 push di 4918 repe cmpsb 4919 pop di 4920 pop cx 4921 je pp3_trace 4922 4923 push cx 4924 mov si, msg.skip_here 4925 mov cx, msg.skip_here_size 4926 repe cmpsb 4927 pop cx 4928 jne .next_symbol 4929 4930 call pp3_handle_skip_di 4931 4932 .next_symbol: 4933 inc bx 4934 loop .loop_symbol 4935 4936 @@: 4937 db __TEST_IMM8 ; skip stc, NC 4938 pp3_trace: 4939 stc 4940 4941 push ss 4942 pop es 4943 push ss 4944 pop ds 4945 4946 mov word [stack_low_address], str_buffer 4947 4948 pop dx ; ?skip 4949 _386_PM_o32 4950 pop si ; ?offset 4951 %ifn _PM 4952 pop ax ; ?offset high word 4953 %else 4954 _no386 pop ax ; ?offset high word (if it was not pop esi) 4955 %endif 4956 pop bx ; ?segment 4957 ; restore bx:(e)si if proceeding, else discard 4958 lleave code 4959 lahf 4960 _386_PM movzx edx, dx 4961 _386_PM_o32 4962 add si, dx 4963 sahf 4964 retn 4965 4966 4967 ; INP: ds:di -> symbol with ASCIZ keyword or expression 4968 ; word [bp + ?segment] = segment/selector of breakpoint 4969 ; (d)word [bp + ?offset] = offset of breakpoint 4970 ; OUT: word [bp + ?skip] = how far to skip 4971 ; CHG: esi, dx, ax 4972 ; STT: es = ds = ss 4973 pp3_handle_skip_di: 4974 push bx 4975 push cx 4976 4977 mov si, di 4978 @@: 4979 lodsb 4980 cmp al, 0 4981 je .expr_have 4982 cmp al, '_' 4983 jne @B 4984 mov byte [si - 1], 0 4985 .expr_have: 4986 mov si, di 4987 mov dx, msg.asciz 4988 call isstring? 4989 jne .expr_num 4990 xor cx, cx 4991 mov bx, word [bp + ?segment] 4992 _386_PM_o32 4993 mov si, word [bp + ?offset] 4994 .expr_asciz_loop: 4995 call pp16 4996 test al, al 4997 loopnz .expr_asciz_loop 4998 jcxz .error 4999 neg cx 5000 mov dx, cx 5001 jmp .expr_got 5002 5003 .error: 5004 mov si, line_in + 2 5005 jmp error 5006 5007 .expr_num: 5008 lodsb 5009 nearcall getword 5010 .expr_got: 5011 mov word [bp + ?skip], dx 5012 5013 pop cx 5014 pop bx 5015 retn 5016 5017 lleave ctx 5018 5019 5020 ; INP: bx = SYMMAIN index 5021 ; CHG: es, di, si, dx, ax 5022 ; STT: ss = ds 5023 ; 5024 ; Note: This invalidates the access slice. 5025 zz_copy_strings_to_str_buffer: section_of_function 5026 mov word [stack_low_address], stack 5027 5028 push cx 5029 5030 push bx ; main index 5031 push ax ; (reserve space, uninitialised) 5032 dualcall getfarpointer.main 5033 pop di 5034 pop es 5035 push ds 5036 ; Here we depend on str_buffer being 512-bytes long, 5037 ; to allow storing both smName1 and smName2 contents 5038 ; one after another in str_buffer. 5039 nearcall getstring1 5040 push ss 5041 pop es 5042 mov si, dx 5043 mov di, str_buffer 5044 rep movsb 5045 mov si, di 5046 pop ds 5047 push bx ; main index 5048 push ax ; (reserve space, uninitialised) 5049 dualcall getfarpointer.main 5050 pop di 5051 pop es 5052 push ds 5053 nearcall getstring2 5054 push ss 5055 pop es 5056 mov di, si 5057 mov si, dx 5058 rep movsb 5059 mov al, 0 5060 stosb 5061 pop ds 5062 5063 pop cx 5064 retn 5065 %endif 5066 5067 5068 terminate_silent_dump.if_nonnull: 5069 %if _RH 0 00009F66 F606[0200]10 testopt [options6], opt6_rh_mode 0 00009F6B 7507 jnz @F 5072 %endif 0 00009F6D F606[0300]10 testopt [internalflags], tt_silent_mode 0 00009F72 743A jz terminate_silent_dump.ret 5075 @@: 0 00009F74 06 push es 0 00009F75 57 push di 0 00009F76 50 push ax 0 00009F77 8E06[0000] mov es, word [auxbuff_segorsel] 0 00009F7B 8B3E[0000] mov di, word [auxbuff_behind_last_silent] 5081 %if _PM 5082 cmp di, word [auxbuff_switchbuffer_size] 5083 je terminate_silent_dump.done 5084 %else 0 00009F7F 85FF test di, di 0 00009F81 7428 jz terminate_silent_dump.done 5087 %endif 0 00009F83 4F dec di 0 00009F84 B000 mov al, 0 0 00009F86 AE scasb 0 00009F87 7422 je terminate_silent_dump.done 0 00009F89 EB1B jmp @FF 5093 5094 terminate_silent_dump: 5095 %if _RH 0 00009F8B F606[0200]10 testopt [options6], opt6_rh_mode 0 00009F90 7507 jnz @F 5098 %endif 0 00009F92 F606[0300]10 testopt [internalflags], tt_silent_mode 0 00009F97 7415 jz .ret 5101 @@: 5102 .is_silent: 0 00009F99 06 push es 0 00009F9A 57 push di 0 00009F9B 50 push ax 0 00009F9C 8E06[0000] mov es, word [auxbuff_segorsel] 0 00009FA0 8B3E[0000] mov di, word [auxbuff_behind_last_silent] 0 00009FA4 B000 mov al, 0 5109 @@: 0 00009FA6 AA stosb 0 00009FA7 FF06[0000] inc word [auxbuff_behind_last_silent] 5112 ; -> point past the NUL 5113 .done: 0 00009FAB 58 pop ax 0 00009FAC 5F pop di 0 00009FAD 07 pop es 5117 .ret: 0 00009FAE C3 retn 5119 5120 5121 dumpregs_extended_silent: 5122 %if _PM 5123 call resetmode 5124 %endif 0 00009FAF E854FC call silence_init 5126 ; Call dumpregs (trimputs, puts, putsline, disasm) with 5127 ; "silence" flag (writes to auxbuff instead of terminal). 0 00009FB2 E8[0000] call dumpregs_extended 5129 5130 %ifn _RH 5131 ; Terminate the last dump's output with a NUL byte. 5132 call terminate_silent_dump.if_nonnull 5133 %endif 0 00009FB5 E841FC call silence_exit 5135 %endif ; !_LOADER 5136 5137 5138 handle_serial_flags_ctrl_c: section_of_function 0 00009FB8 1E push ds 0 00009FB9 50 push ax 0 00009FBA 16 push ss 0 00009FBB 1F pop ds 0 00009FBC F606[0300]40 testopt [options3], opt3_check_ctrlc_0bh 0 00009FC1 7409 jz @FF 5145 ; The following DOS call originated in sleepcmd. 5146 ; However, it is useful for all callers of this 5147 ; function so put it here. 0 00009FC3 E8[0000] call InDOS 0 00009FC6 7504 jnz @F 0 00009FC8 B40B mov ah, 0Bh 5151 doscall ; allow to break with Ctrl-C 0 00009FCA CD21 int 21h 5152 @@: 5153 @@: 0 00009FCC F606[0000]02 testopt [serial_flags], sf_ctrl_c 0 00009FD1 755B jnz handle_ctrl_c 0 00009FD3 F606[0000]10 testopt [serial_flags], sf_use_serial 0 00009FD8 7551 jnz .ret 0 00009FDA E8[0000] call InDOS_or_BIOS_IO 0 00009FDD 744C jz .ret 0 00009FDF F606[0300]20 testopt [options3], opt3_check_ctrlc_keyb 0 00009FE4 7445 jz .ret 5162 5163 .check_rombios_buffer: 0 00009FE6 53 push bx 0 00009FE7 52 push dx 0 00009FE8 B84000 mov ax, 40h ; dual mode segment/selector 0 00009FEB 50 push ax 0 00009FEC A1[0000] mov ax, word [io_end_buffer] 0 00009FEF 8B16[0000] mov dx, word [io_start_buffer] 0 00009FF3 1F pop ds 0 00009FF4 85C0 test ax, ax 0 00009FF6 7503 jnz @F 0 00009FF8 A18200 mov ax, word [82h] ; end of circular keypress buffer 5174 @@: 0 00009FFB 85D2 test dx, dx 0 00009FFD 7504 jnz @F 0 00009FFF 8B168000 mov dx, word [80h] ; start of circular buffer 5178 @@: 0 0000A003 89C3 mov bx, ax 0 0000A005 29D3 sub bx, dx ; cmp end, start 0 0000A007 7620 jbe .ret_dx_bx ; invalid --> 0 0000A009 F6C301 test bl, 1 ; even amount of bytes ? 0 0000A00C 751B jnz .ret_dx_bx ; invalid --> 0 0000A00E 8B1E1A00 mov bx, word [1Ah] ; current head of circular buffer 5185 .loop: 0 0000A012 3B1E1C00 cmp bx, word [1Ch] ; equal to current tail ? 0 0000A016 7411 je .ret_dx_bx ; yes, all entries checked --> 0 0000A018 803F03 cmp byte [bx], 3 ; is it Ctrl-C ? 0 0000A01B 7411 je handle_ctrl_c ; yes, handle --> 0 0000A01D 43 inc bx 0 0000A01E 43 inc bx ; -> next entry 0 0000A01F 39C3 cmp bx, ax ; at end of buffer ? 0 0000A021 72EF jb .loop ; no, loop --> 0 0000A023 7704 ja .ret_dx_bx ; invalid --> 0 0000A025 89D3 mov bx, dx ; reset to start of buffer 0 0000A027 EBE9 jmp .loop ; then loop --> 5197 5198 .ret_dx_bx: 0 0000A029 5A pop dx 0 0000A02A 5B pop bx 5201 5202 .ret: 0 0000A02B 58 pop ax 0 0000A02C 1F pop ds 0 0000A02D C3 retn 5206 5207 5208 handle_ctrl_c: 0 0000A02E 16 push ss 0 0000A02F 1F pop ds 0 0000A030 16 push ss 0 0000A031 07 pop es 5213 %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 0000A032 C606[0000]00 mov byte [in_getinput], 0 5215 %endif 0 0000A037 8026[0000]F9 clropt [serial_flags], sf_ctrl_c | sf_double_ctrl_c 5217 %if _PM 5218 call resetmode 5219 %endif 5220 %if !_LOADER 0 0000A03C E827FF call terminate_silent_dump.if_nonnull 0 0000A03F E8[0000] call silence_dump 5223 %endif 0 0000A042 BA[0000] mov dx, msg.ctrlc 0 0000A045 E8[0000] call putsz 5226 0 0000A048 800E[0000]10 setopt [internalflags3], dif3_input_terminal_override 5228 ; make sure we drain terminal input 5229 @@: 0 0000A04D E8[0000] call getc_if_any ; drain the buffer 0 0000A050 75FB jnz @B ; if any was available --> 5232 0 0000A052 8026[0000]EF clropt [internalflags3], dif3_input_terminal_override 0 0000A057 E9[0000] jmp cmd2_reset_re 5235 5236 5237 %if !_LOADER 5238 ; INP: bp [tpg_proceed_bp], 5239 ; linear address and point content to write 5240 ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5241 ; set if a breakpoint was written 5242 ; OUT: CY if error, 5243 ; bp [tpg_proceed_bp] = has point content to restore 5244 ; ah = reason = 0 = no error (never), 5245 ; 1 = couldn't write, 5246 ; 2 = unreachable, 5247 ; 3 = overwritten, al = new byte value 5248 ; NC if no error, 5249 ; ah = 0 5250 ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5251 ; cleared 5252 ; CHG: di, (e)dx, ax, bx 5253 ; STT: might switch modes due to getsegmented call 5254 proceed_writepoint_restore: 0 0000A05A B400 mov ah, 0 0 0000A05C F606[0000]40 testopt [internalflags2], dif2_tpg_proceed_bp_set 0 0000A061 7461 jz proceed_wp.retn ; (NC) 0 0000A063 BF0100 mov di, 1 0 0000A066 EB05 jmp proceed_wp 5260 5261 ; INP: bp [tpg_proceed_bp], 5262 ; linear address and point content to write (0CCh) 5263 ; OUT: CY if error, 5264 ; bp [tpg_proceed_bp] = has point content 0CCh 5265 ; ah = reason = 0 = no error (never), 5266 ; 1 = couldn't write, 5267 ; 2 = unreachable, 5268 ; 3 = overwritten (never) 5269 ; NC if no error (either flag not set or point restored), 5270 ; ah = 0 5271 ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5272 ; set 5273 ; CHG: di, (e)dx, ax, bx 5274 ; STT: might switch modes due to getsegmented call 5275 proceed_writepoint: 5276 %if _DELAY_BEFORE_BP 0 0000A068 E8CAF4 call delay_before_bp 5278 %endif 0 0000A06B 31FF xor di, di 5280 proceed_wp: 5281 lframe near 0 0000A06D 5589E5 lenter 0 0000A070 83F701 xor di, 1 5284 lvar word, is_write 0 0000A073 57 push di 5286 0 0000A074 A1[0000] mov ax, word [tpg_proceed_bp] 5288 %if _PM 5289 mov dx, word [tpg_proceed_bp + 2] 5290 %else 0 0000A077 31D2 xor dx, dx 0 0000A079 8A16[0200] mov dl, byte [tpg_proceed_bp + 2] 5293 %endif 0 0000A07D E81DF8 call getsegmented 0 0000A080 A0[0500] mov al, byte [tpg_proceed_bp + BPSIZE - 1] 5296 ; al = byte to restore 0 0000A083 B402 mov ah, 2 ; error reason: unreachable 0 0000A085 723A jc .return 5299 0 0000A087 F646FE01 test byte [bp + ?is_write], 1 5301 ; (NC) is it writing ? 0 0000A08B 7518 jnz .write 5303 .restore: 0 0000A08D 50 push ax 0 0000A08E E8[0000] call readmem ; read current byte 0 0000A091 3CCC cmp al, 0CCh ; is this still what we wrote? 0 0000A093 B403 mov ah, 3 ; error reason: overwritten, al = new value 0 0000A095 F9 stc 0 0000A096 7529 jne .return_discard ; nope --> (CY) 0 0000A098 58 pop ax 0 0000A099 E8[0000] call writemem ; return the byte to its original value 0 0000A09C 720D jc .next ; failed --> (CY, handled there) 0 0000A09E C606[0500]CC mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 5314 ; reset stored point 0 0000A0A3 EB06 jmp short .next 5316 5317 .write: 0 0000A0A5 E8[0000] call writemem 0 0000A0A8 A2[0500] mov byte [tpg_proceed_bp + BPSIZE - 1], al 5320 ; save the previous byte there 5321 .next: 0 0000A0AB B401 mov ah, 1 ; (in case of error) error reason: cannot write 0 0000A0AD 7212 jc .return ; failed to write --> (CY) 0 0000A0AF B400 mov ah, 0 ; (no error) 5325 0 0000A0B1 800E[0000]40 setopt [internalflags2], dif2_tpg_proceed_bp_set 5327 ; set flag in case of successful writing 0 0000A0B6 F646FE01 test byte [bp + ?is_write], 1 5329 ; (NC) is it writing ? 0 0000A0BA 7505 jnz .return ; yes, leave flag set --> 0 0000A0BC 8026[0000]BF clropt [internalflags2], dif2_tpg_proceed_bp_set 5332 ; (NC) clear flag in case of successful restoring 5333 .return: 5334 .return_discard: 0 0000A0C1 89EC5D lleave 5336 .retn: 0 0000A0C4 C3 retn 5338 5339 5340 ; INP: ah & 7Fh = status = 0 = no error, 5341 ; 1 = couldn't write, 5342 ; 2 = unreachable, 5343 ; 3 = overwritten, al = new value 5344 ; ah & 80h = set if error restoring point, 5345 ; else error writing point 5346 ; bh & 80h = set if gg breakpoint, 5347 ; cx = index (0-based) 5348 ; bh & 40h = set if bb breakpoint, 5349 ; cx = index (0-based) 5350 ; bh & C0h = clear if proceed breakpoint 5351 ; bl = what we tried to restore, only set if ah & 80h set 5352 ; dword [ss:sp] = linear address (24 bit if non-_PM) 5353 ; CHG: ax, bx, cx, dx, di 5354 ; STT: ds = es = ss = debugger data selector 5355 display_breakpoint_failure: 5356 %if _PM 5357 call resetmode 5358 %endif 5359 0 0000A0C5 50 push ax 0 0000A0C6 53 push bx 0 0000A0C7 51 push cx 0 0000A0C8 56 push si 0 0000A0C9 E8[0000] call silence_dump ; do away with silent mode 0 0000A0CC 5E pop si 0 0000A0CD 59 pop cx 0 0000A0CE 5B pop bx 0 0000A0CF 58 pop ax 5369 0 0000A0D0 800E[0100]08 setopt [internalflags2], dif2_bp_failure 5371 5372 lframe near 5373 lpar dword, linear 0 0000A0D5 5589E5 lenter 5375 lvar word, input_ax 0 0000A0D8 50 push ax 5377 0 0000A0D9 BA[0000] mov dx, msg.cant_bp_the 0 0000A0DC E8[0000] call putsz 0 0000A0DF F6C780 test bh, 80h 0 0000A0E2 740B jz @F 5382 0 0000A0E4 89C8 mov ax, cx 0 0000A0E6 40 inc ax ; make it 1-based 0 0000A0E7 E877F6 call putordinalbyte 5386 0 0000A0EA BA[0000] mov dx, msg.cant_bp_type_gg 0 0000A0ED EB15 jmp .got_type 5389 5390 @@: 0 0000A0EF F6C740 test bh, 40h 0 0000A0F2 740D jz @F 5393 0 0000A0F4 89C8 mov ax, cx 0 0000A0F6 BF[0000] mov di, msg.cant_bp_type_permanent.index 0 0000A0F9 E8[0000] call hexbyte ; (0-based index) 5397 0 0000A0FC BA[0000] mov dx, msg.cant_bp_type_permanent 5399 %if _SYMBOLIC 5400 sub ax, _NUM_B_BP 5401 jb .got_type 5402 5403 mov di, msg.cant_bp_type_symbol.index 5404 call hexbyte ; (0-based index) 5405 5406 mov dx, msg.cant_bp_type_symbol 5407 %endif 0 0000A0FF EB03 jmp .got_type 5409 5410 @@: 0 0000A101 BA[0000] mov dx, msg.cant_bp_type_proceed 5412 5413 .got_type: 0 0000A104 E8[0000] call putsz 5415 0 0000A107 BF[0000] mov di, msg.cant_bp_linear.address1 0 0000A10A 8B4606 mov ax, word [bp + ?linear + 2] 5418 %ifn _PM 0 0000A10D B400 mov ah, 0 5420 %endif 0 0000A10F E8[0000] call hexword 0 0000A112 47 inc di 5423 ; mov di, msg.cant_bp_linear.address2 0 0000A113 8B4604 mov ax, word [bp + ?linear] 0 0000A116 E8[0000] call hexword 5426 0 0000A119 BA[0000] mov dx, msg.cant_bp_linear 0 0000A11C E8[0000] call putsz 5429 0 0000A11F BF[0000] mov di, msg.cant_bp_restore.value 0 0000A122 89D8 mov ax, bx 0 0000A124 E8[0000] call hexbyte 5433 0 0000A127 BA[0000] mov dx, msg.cant_bp_write 0 0000A12A 8B46FE mov ax, word [bp + ?input_ax] 0 0000A12D F6C480 test ah, 80h 0 0000A130 7406 jz @F 0 0000A132 80E47F and ah, ~80h 0 0000A135 BA[0000] mov dx, msg.cant_bp_restore 5440 @@: 0 0000A138 E8[0000] call putsz 5442 0 0000A13B BF[0000] mov di, msg.cant_bp_reason3.value 0 0000A13E E8[0000] call hexbyte 5445 0 0000A141 BA[0000] mov dx, msg.cant_bp_reason 0 0000A144 E8[0000] call putsz 5448 0 0000A147 BA[0000] mov dx, msg.cant_bp_reason0 0 0000A14A 80FC01 cmp ah, 1 0 0000A14D 7215 jb @F 0 0000A14F BA[0000] mov dx, msg.cant_bp_reason1 0 0000A152 7410 je @F 0 0000A154 BA[0000] mov dx, msg.cant_bp_reason2 0 0000A157 80FC03 cmp ah, 3 0 0000A15A 7208 jb @F 0 0000A15C BA[0000] mov dx, msg.cant_bp_reason3 0 0000A15F 7403 je @F 0 0000A161 BA[0000] mov dx, msg.cant_bp_reasonu 5460 @@: 0 0000A164 E8[0000] call putsz 5462 0 0000A167 89EC5D lleave 0 0000A16A C20400 lret 5465 5466 5467 %if _PM 5468 isdpmientry: 5469 testopt [internalflags4], dif4_int_2F_hooked 5470 jnz .stdhook 5471 mov word [reg_eip], mydpmientry 5472 mov word [reg_cs], ds ; if Int2F not hooked, point to the hook here 5473 ; ds => lDEBUG_DATA_ENTRY 5474 .stdhook: 5475 ; Run code until it returned far. 5476 mov bx, word [reg_esp] 5477 push ds 5478 mov ds, word [reg_ss] ; ds:bx-> (16-bit) stack 5479 mov si, word [bx+0] 5480 mov bx, word [bx+2] ; get (16-bit) far return address 5481 pop ds 5482 %endif 5483 ; Proceed over an instruction 5484 ; INP: bx:(e)si-> where to write the breakpoint 5485 ; OUT: NC if the breakpoint was hit, 5486 ; ah = 0 5487 ; ch = 0 5488 ; d[reg_eip] adjusted 5489 ; cx & 8 set if proceed point hit 5490 ; (ZF only set if _BREAKPOINTS) 5491 ; ZR if breakpoint after instruction was hit, 5492 ; cx & 7 = 0 5493 ; NZ if another breakpoint (bb) was hit (or both), 5494 ; cx & 1 set if non-pass match (actual hit), 5495 ; else cx & 2 set if pass match (consider as hit first, 5496 ; but dump registers next (not to silent buffer) 5497 ; and then continue execution) 5498 ; else cx & 4 always set, indicates any match 5499 ; (including matches that should merely continue) 5500 ; all pass points' counters stepped 5501 ; CY if the breakpoint was not hit, 5502 ; cx = 0 5503 ; If [internalflags2] & dif2_gg_is_gg is set: 5504 ; ah & 7Fh = status = 0 = no error, 5505 ; 1 = couldn't write, 5506 ; 2 = unreachable, 5507 ; 3 = overwritten, al = new value 5508 ; ah & 80h = set if error restoring point, 5509 ; else error writing point to begin with 5510 ; If that flag is clear: 5511 ; Does not return if a breakpoint cannot be written 5512 ; or cannot be restored, jumps to cmd3 instead. 5513 ; CHG: all 5514 ; STT: ds = es = ss 5515 ; might return modeswitched (if dif2_gg_is_gg) 5516 ; might be called while modeswitched 5517 proceedbreakpoint: section_of_function 0 0000A16D F606[0000]80 testopt [internalflags2], dif2_tpg_keep_proceed_bp 0 0000A172 750C jnz @F 5520 5521 _386_PM_o32 ; mov edx, esi 0 0000A174 89F2 mov dx, si ; bx:(e)dx = segmented 0 0000A176 E892F6 call getlinear_d_b ; dx:ax = linear 5524 0 0000A179 A3[0000] mov word [tpg_proceed_bp], ax 5526 ; The following two instructions must be in this order. 5527 ; For the non-_PM build, writing to the second word 5528 ; of the breakpoint also writes to the content byte. 0 0000A17C 8916[0200] mov word [tpg_proceed_bp + 2], dx 5530 ; store in point 5531 @@: 0 0000A180 C606[0500]CC mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 5533 ; initialise content 0 0000A185 E8E0FE call proceed_writepoint 5535 ; This call might return modeswitched. 0 0000A188 7308 jnc @F 5537 0 0000A18A 80E47F and ah, ~80h ; mark error during writing 5539 0 0000A18D 31C9 xor cx, cx ; cx = 0 in case of branching 0 0000A18F 51 push cx ; put the zero on the stack 5542 0 0000A190 EB0E jmp .failure 5544 5545 @@: 5546 ; The run functions call resetmode. 5547 %if _BREAKPOINTS 0 0000A192 E87400 call run_with_bb 0 0000A195 89C8 mov ax, cx 5550 %else 5551 call run 5552 xor ax, ax 5553 %endif 0 0000A197 50 push ax 5555 5556 ; It's important to keep the linear address saved inbetween, 5557 ; even though we save by value (as opposed to DEBUG/X G's saving 5558 ; of the reference) because the selector that we used for the 5559 ; access might now be invalid or (worse) point elsewhere, or 5560 ; a mode change might have occured. (The latter is sometimes 5561 ; handled by a specific kludge in DEBUG/X, but not always.) 5562 0 0000A198 E8BFFE call proceed_writepoint_restore 5564 ; This call might return modeswitched. 0 0000A19B 7326 jnc @F 5566 0 0000A19D 80CC80 or ah, 80h ; mark error during restoration 5568 5569 .failure: 5570 ; Here we may be modeswitched. 0 0000A1A0 F606[0000]08 testopt [internalflags2], dif2_gg_is_gg 5572 ; is it from gg ? 0 0000A1A5 7559 jnz .return_CY_pop_cx ; (CY) yes, return to gg 5574 ; This branch may be taken while modeswitched. 5575 5576 %if _PM 5577 call resetmode 5578 %endif 5579 0 0000A1A7 E865F1 call put_deferred_message_silent 5581 0 0000A1AA 50 push ax 0 0000A1AB E8[0000] call silence_dump 0 0000A1AE 58 pop ax 5585 0 0000A1AF FF36[0200] push word [tpg_proceed_bp + 2] 0 0000A1B3 FF36[0000] push word [tpg_proceed_bp] 0 0000A1B7 8A1E[0500] mov bl, [tpg_proceed_bp + BPSIZE - 1] 0 0000A1BB B700 mov bh, 0 0 0000A1BD E805FF call display_breakpoint_failure 5591 ; This function calls resetmode. 0 0000A1C0 E9[0000] jmp cmd3 5593 5594 @@: 0 0000A1C3 E8B7F6 call get_cseip_of_possible_breakpoint 5596 ; dx:ax = linear address 1 before cs:(e)ip 0 0000A1C6 7236 jc .return_CY_pop_cx_ax_zero 5598 0 0000A1C8 59 pop cx 5600 %if _PM 5601 cmp word [tpg_proceed_bp + 2], dx 5602 %else 0 0000A1C9 84F6 test dh, dh ; (bits 24 to 31 set. shouldn't happen) 0 0000A1CB 7517 jnz .not_pp 0 0000A1CD 3816[0200] cmp byte [tpg_proceed_bp + 2], dl 5606 %endif 0 0000A1D1 7511 jne .not_pp 0 0000A1D3 3906[0000] cmp word [tpg_proceed_bp], ax 0 0000A1D7 750B jne .not_pp ; is unexpected (not behind the breakpoint) --> 5610 5611 ; Need to check this here, because we have to 5612 ; decrement (e)ip if the breakpoint was hit. 0 0000A1D9 813E[0000][0000] cmp word [run_int], int3msg 0 0000A1DF 7503 jne .not_pp ; is unexpected (not returned by interrupt 03h) --> 0 0000A1E1 80C908 or cl, 8 ; set flag: pp hit 5616 5617 .not_pp: 0 0000A1E4 B400 mov ah, 0 ; set error to "no error" 5619 0 0000A1E6 E319 jcxz .return_CY ; bb hit/pass/nonpass or pp hit ? if no --> 5621 0 0000A1E8 E846F1 call adjust_cseip_after_breakpoint 5623 ; decrement (e)ip to point at the instruction 5624 0 0000A1EB F6C101 test cl, 1 ; bb hit ? 0 0000A1EE 750A jnz .return ; yes, return (NC, NZ) --> 5627 0 0000A1F0 F6C108 test cl, 8 ; proceed point matched ? 0 0000A1F3 7506 jnz @F ; yes --> 5630 0 0000A1F5 800E[0000]80 setopt [internalflags2], dif2_tpg_keep_proceed_bp 5632 ; flag that we should keep this proceed point 5633 ; (NC, NZ) 5634 .return: 0 0000A1FA C3 retn 5636 5637 @@: 5638 ; return with ax = 0, NC, ZR 5639 ; 5640 ; (hit proceed point, no hit bb (possibly pass/non-pass bb) 0 0000A1FB 31C0 xor ax, ax ; ah = 0 (NC, ZR) 0 0000A1FD C3 retn 5643 5644 ; set ax = 0, pop cx, CY 5645 .return_CY_pop_cx_ax_zero: 0 0000A1FE 31C0 xor ax, ax 5647 5648 ; pop cx, CY (preserve ax) 5649 .return_CY_pop_cx: 0 0000A200 59 pop cx 5651 .return_CY: 0 0000A201 F9 stc 0 0000A202 C3 retn 5654 5655 5656 ; PPX - Get next byte in instruction stream. 5657 ; INP: bx:(e)si-> next byte 5658 ; OUT: al = next byte 5659 ; (e)si incremented 5660 pp16: section_of_function 5661 %if _PM 5662 call resetmode_and_test_d_b_bit 5663 %endif 0 0000A203 1E push ds 0 0000A204 8EDB mov ds, bx 5666 %if _PM 5667 jz .16 5668 a32 ; use esi for lodsb 5669 .16: 5670 %endif 0 0000A206 AC lodsb 0 0000A207 1F pop ds 0 0000A208 C3 retn 5674 ; begin loop over instruction bytes. 5675 5676 5677 %if _BREAKPOINTS 5678 ; Run with bb breakpoints 5679 ; 5680 ; OUT: CY if another breakpoint (not a bb one) or trace hit, 5681 ; cx = 0 5682 ; NC if a bb breakpoint hit, 5683 ; cx & 1 set if it is an actual hit 5684 ; else cx & 2 set if it is a pass match, 5685 ; else it is a non-pass non-match 5686 ; (cx & 4 always set) 5687 ; STT: might return modeswitched 5688 run_with_bb: 0 0000A209 F606[0000]08 testopt [internalflags2], dif2_gg_is_gg 0 0000A20E 750C jnz .no_bb 5691 0 0000A210 F606[0300]C0 testopt [internalflags], tt_no_bb | tt_no_bb_first 0 0000A215 740C jz @F 5694 0 0000A217 8026[0300]7F clropt [internalflags], tt_no_bb_first 5696 5697 .no_bb: 0 0000A21C E87400 call run 0 0000A21F 31C9 xor cx, cx 0 0000A221 F9 stc 0 0000A222 C3 retn 5702 5703 @@: 5704 .gg5: 5705 %if _BREAKPOINTS 0 0000A223 E83FF3 call bb_writepoints_init_reset 5707 %endif 5708 0 0000A226 F606[0000]10 testopt [internalflags2], dif2_gg_first_detected 0 0000A22B 7436 jz .only_run ; easy case, no cseip point detected --> 5711 5712 5713 ; Enter special mode: Restore cseip breakpoint content. 0 0000A22D 800E[0000]02 setopt [internalflags2], dif2_gg_skip_non_cseip 5715 0 0000A232 83EC20 sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 0 0000A235 89E5 mov bp, sp ; -> error info 5718 0 0000A237 B91000 mov cx, _NUM_B_BP + _NUM_SYM_BP 5720 ; = index above last one to restore 0 0000A23A E8F6F3 call bb_restorepoints_and_init_error_info 0 0000A23D 7317 jnc @F ; no error ? --> 5723 5724 ; Error in bb_restorepoints. Try to restore other bb. 5725 5726 ; Exit special mode: Handle non-cseip breakpoints again. 0 0000A23F 8026[0000]FD clropt [internalflags2], dif2_gg_skip_non_cseip 5728 5729 ; Enter special mode: Skip cseip breakpoints. 0 0000A244 800E[0000]04 setopt [internalflags2], dif2_gg_skip_cseip 5731 5732 ; As we already tried to restore all cseip bb points, 5733 ; here we skip these in the bb_restorepoints call. 0 0000A249 B91000 mov cx, _NUM_B_BP + _NUM_SYM_BP 0 0000A24C E8E7F3 call bb_restorepoints 5736 5737 ; Exit special mode: No longer skip cseip breakpoints. 0 0000A24F 8026[0000]FB clropt [internalflags2], dif2_gg_skip_cseip 5739 5740 ; The failure that led us here is already noted in the info. 0 0000A254 EB1D jmp .bb_exit 5742 5743 5744 @@: 5745 ; Success! Now discard the reserved error info. 0 0000A256 83C420 add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 5747 5748 ; Exit special mode, do not skip non-cseip breakpoints anymore. 0 0000A259 8026[0000]FD clropt [internalflags2], dif2_gg_skip_non_cseip 5750 5751 ; Enter special mode: Skip matching/restoring cseip breakpoint. 0 0000A25E 800E[0000]04 setopt [internalflags2], dif2_gg_skip_cseip 5753 5754 .only_run: 0 0000A263 E82D00 call run 5756 .after_run: 5757 5758 %if _BREAKPOINTS 0 0000A266 83EC20 sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 0 0000A269 89E5 mov bp, sp 5761 0 0000A26B B91000 mov cx, _NUM_B_BP + _NUM_SYM_BP 5763 ; = index above last one to restore 0 0000A26E E8C2F3 call bb_restorepoints_and_init_error_info 0 0000A271 7308 jnc @F 5766 5767 .bb_exit: 0 0000A273 B8FFFF mov ax, -1 0 0000A276 50 push ax ; (unused: ax error info) 0 0000A277 50 push ax ; cx error point index, -1 = invalid 5771 0 0000A278 E907F3 jmp bb_restorepoints_exit 5773 5774 5775 @@: 0 0000A27B 83C420 add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 5777 0 0000A27E E8C1F0 call bb_check_hit 0 0000A281 89C1 mov cx, ax 0 0000A283 9C pushf 5781 ; Clear all special modes. Stop specialcasing cseip breakpoint. 5782 ; 5783 ; This resets all the special flags for subsequent calls. 0 0000A284 8026[0000]E8 clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 0 0000A289 9D popf ; CF 0 0000A28A 7302 jnc @F 5789 0 0000A28C F9 stc 5791 ; cx = flags as returned by bb_check_hit 0 0000A28D C3 retn 5793 5794 @@: 0 0000A28E E8A0F0 call adjust_cseip_after_breakpoint 5796 ; re-execute (restored) opcode one byte in front of this 0 0000A291 F8 clc ; (NC) 5798 ; cx = flags as returned by bb_check_hit 0 0000A292 C3 retn 5800 %endif 5801 %endif 5802 %endif ; !_LOADER 5803 5804 5805 ; Run - Start up the running program. 5806 ; 5807 ; INP: b[eqflag], a[eqladdr] = address given behind '=' for command 5808 ; w[pspdbe] = process of debuggee 5809 ; [run2324] = interrupt handlers 23h and 24h to set 5810 ; values for registers in d[reg_eax] etc 5811 ; OUT: (_DEBUG && _DEBUGUPDATESAVE) 5812 ; interrupt handlers' ieNext fields updated 5813 ; d[reg_eax] etc updated 5814 ; w[run_int]-> message of how execution returned 5815 ; UP, EI, high word efl = 0, es = ds = ss 5816 ; CHG: all 5817 ; STT: ds = ss 5818 ; UP 5819 ; (INP:es ignored) 5820 run: 0 0000A293 16 push ss 0 0000A294 07 pop es 5823 %if _PM 5824 call resetmode 5825 call remember_mode 5826 %endif 5827 %if _DELAY_BEFORE_BP 0 0000A295 8026[0200]7F clropt [internalflags3], dif3_delayed 5829 %endif 5830 %if !_LOADER 0 0000A29A 8126[0000]7FF0 clropt [internalflags2], dif2_tpg_have_bp | dif2_tpg_adjusted_cseip | dif2_tpg_do_not_adjust | dif2_bp_failure | dif2_tpg_keep_proceed_bp, 1 0 0000A2A0 E8B302 call seteq ; set CS:IP to '=' address 5836 %endif 5837 5838 %if _VXCHG 0 0000A2A3 B000 mov al, 0 ; restore debuggee screen 0 0000A2A5 E8[0000] call swapscreen 5841 %endif 5842 5843 %if _ALTVID 0 0000A2A8 E8AE00 call setscreen 5845 %endif 5846 5847 ; For DDebugX: Do this before we install our 5848 ; exception handlers. So if an exception 5849 ; is raised then it is handled by the outer 5850 ; instance instead of our handler. 5851 ; (The actual problem may be that we don't 5852 ; restore the handlers in the entrypoint 5853 ; that leads to debuggerexception.) 5854 ; Also, for non-_DEBUG DebugX too, check the 5855 ; validity before setting debuggee PSP and 5856 ; int 23h, 24h so they needn't be reset. 5857 %if _PM 5858 ; Load segreg values into es to make sure 5859 ; they're valid. (Previously done with 5860 ; the stack pointing into the reg array. 5861 ; Better to do it now with a valid stack.) 5862 ; Only done if we may be in Protected Mode. 5863 ; 86 Mode allows any value to be loaded. 5864 mov es, word [reg_ds] 5865 mov es, word [reg_ss] 5866 _386 mov es, word [reg_fs] 5867 _386 mov es, word [reg_gs] 5868 %endif 0 0000A2AB 8E06[0000] mov es, word [reg_es] ; last one: actual es value 5870 5871 %if !_LOADER 0 0000A2AF 8B1E[0000] mov bx, word [pspdbe] 0 0000A2B3 E8[0000] call setpsp ; set debuggee's PSP 0 0000A2B6 E8[0000] call setint2324 ; set debuggee's int 23/24 5875 %endif 5876 5877 %if _DEBUG ; set this copy's divide/trace/breakpoint ints 5878 %if _TSR || _BOOTLDR || _DEVICE 5879 ..@patch_tsr_quit_run: 5880 db __TEST_IMM16 5881 dw __REL16__(.skipints) 5882 %endif 5883 %if _DEBUG_COND 5884 testopt [internalflags6], dif6_debug_mode 5885 jz .skipints 5886 call set_interrupts 5887 jmp .skipints 5888 5889 set_interrupts: equ $ 5890 %endif 5891 push cx 5892 push si 5893 push ax 5894 push dx 5895 push es 5896 push bx 5897 push bp 5898 push di 5899 5900 %if _PM 5901 call ispm 5902 jz @F ; in PM --> 5903 testopt [internalflags], canswitchmode 5904 jz @FF ; in 86 Mode and cannot switch to PM --> 5905 5906 d4 call d4message 5907 d4 asciz "In run (switch mode before calling pm_set_handlers)",13,10 5908 setopt [internalflags], modeswitched ; set flag for resetmode 5909 mov al, 0 5910 call sr_state ; save state 5911 call switchmode ; switch to PM 5912 ; ! handle_mode_changed not called here ! 5913 ; do not call InDOS or other functions using seg/sels 5914 @@: 5915 call pm_set_handlers 5916 ; ! this calls resetmode 5917 @@: 5918 %endif 5919 5920 %if _CATCHINT06 && _DETECT95LX 5921 mov cx, word [inttab_number_variable] 5922 %else 5923 mov cx, inttab_number 5924 %endif 5925 jcxz .intend 5926 mov si, inttab 5927 .intloop: 5928 lodsb 5929 xchg ax, dx 5930 lodsw ; get address 5931 xchg ax, dx 5932 %if _DEBUGUPDATESAVE 5933 mov di, dx ; -> IISP header 5934 %endif 5935 5936 call InDOS 5937 jz .int21_25 5938 5939 xor bx, bx 5940 %if _PM 5941 call ispm 5942 jnz @F 5943 push dx 5944 mov dx, bx ; set segment to access (= 0) 5945 call setrmsegm ; get bx = selector configured to this 5946 pop dx 5947 @@: 5948 %endif 5949 mov es, bx ; => 86 Mode IVT (segment or selector) 5950 %if _PM 5951 xor bx, bx ; bh = 0 5952 %endif 5953 mov bl, al 5954 add bx, bx 5955 add bx, bx 5956 5957 %if _DEBUGUPDATESAVE 5958 push word [ es:bx + 2 ] 5959 push word [ es:bx ] ; get vector 5960 pop word [ di + ieNext ] 5961 pop word [ di + ieNext + 2] 5962 %endif 5963 5964 mov word [ es:bx ], dx 5965 %if _PM 5966 push word [ pspdbg ] ; => lDEBUG_DATA_ENTRY (86 Mode seg) 5967 pop word [ es:bx + 2 ] 5968 %else 5969 mov word [ es:bx + 2 ], ds ; => lDEBUG_DATA_ENTRY 5970 %endif 5971 jmp short .intset 5972 5973 .int21_25: 5974 5975 %if _PM 5976 %if _DEBUGUPDATESAVE 5977 mov ah, 35h ; get interrupt vector 5978 push word [pspdbg] ; => lDEBUG_DATA_ENTRY 5979 dual2call _doscall_return_es_parameter_es_ds 5980 mov word [ di + ieNext ], bx 5981 pop word [ di + ieNext + 2 ] 5982 %endif 5983 mov ah, 25h ; set interrupt vector 5984 push word [pspdbg] ; => lDEBUG_DATA_ENTRY 5985 dual2call _doscall_return_es_parameter_es_ds 5986 pop ax ; (discard returned parameter) 5987 %else 5988 %if _DEBUGUPDATESAVE 5989 mov ah, 35h 5990 int 21h ; get vector 5991 mov word [ di + ieNext ], bx 5992 mov word [ di + ieNext + 2 ], es 5993 %endif 5994 mov ah, 25h ; set interrupt vector 5995 int 21h ; ds => lDEBUG_DATA_ENTRY 5996 %endif 5997 .intset: 5998 loop .intloop 5999 6000 .intend: 6001 pop di 6002 pop bp 6003 pop bx 6004 pop es 6005 pop dx 6006 pop ax 6007 pop si 6008 pop cx 6009 %if _DEBUG_COND 6010 retn 6011 %endif 6012 .skipints: 6013 %endif 6014 6015 .2: 6016 %if _RUN2_ENTRY_SECTION 6017 %if _PM 6018 call ispm 6019 jnz @F 6020 push word [cssel] 6021 db __TEST_IMM8 ; (skip push) 6022 @@: 6023 %endif 0 0000A2B9 16 push ss 0 0000A2BA B8[B400] mov ax, .entry 0 0000A2BD 50 push ax 0 0000A2BE CB retf 6028 6029 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 6029 ------------------ note: usesection lDEBUG_DATA_ENTRY 6030 .entry: 6031 %endif 0 00005544 2B26[0000] sub sp, word [run_sp_reserve] 0 00005548 8926[0000] mov word [run_sp], sp ; save stack position 6034 6035 ; Disable this for now. The debugger uses its ss 6036 ; for 86 Mode and Protected Mode at the same area 6037 ; so it should always be valid to adjust SPSAV with 6038 ; the current run_sp, regardless of current mode. 6039 ; Update: SPSAV should always hold a 86 Mode address. 6040 ; So check for our segment, not the current ss. (But 6041 ; for _PM=0 ss is always equal to word [pspdbg].) 6042 ; I assume that the original fix was intended for cases 6043 ; where the segment doesn't match our 86 Mode ss, that 6044 ; is the word [pspdbg]. 6045 %if !_LOADER 6046 %if 1 6047 ; 16.2.2021: check if saved SS is debugger's SS. If no, don't adjust saved SP. 6048 ; SS may be != saved SS if debugger is stopped in protected-mode - then the 6049 ; current DPMI real-mode stack may be stored in SPSAV. 6050 %if _PM 6051 mov ax, word [pspdbg] 6052 %else 0 0000554C 8CD0 mov ax, ss 6054 %endif 0 0000554E 3B063000 cmp ax, word [SPSAV + 2] 0 00005552 7508 jne @F 6057 %endif 0 00005554 2B26[0000] sub sp, word [spadjust] 0 00005558 89262E00 mov word [SPSAV], sp 6060 @@: 6061 %endif 0 0000555C FA cli 6063 0 0000555D BC[0000] mov sp, regs 6065 %ifn _ONLY386 0 00005560 EB11 _386_jmps .386 ; --> 0 00005562 58 pop ax 0 00005563 58 pop ax ; discard all high words 0 00005564 5B pop bx 0 00005565 58 pop ax 0 00005566 59 pop cx 0 00005567 58 pop ax 0 00005568 5A pop dx 0 00005569 58 pop ax 0 0000556A 58 pop ax ; we'll get esp later 0 0000556B 58 pop ax 0 0000556C 5D pop bp 0 0000556D 58 pop ax 0 0000556E 5E pop si 0 0000556F 58 pop ax 0 00005570 5F pop di 6082 ; ds, ss, cs loaded later 6083 ; es already loaded 6084 %endif 6085 %ifn _ONLYNON386 6086 %ifn _ONLY386 0 00005571 EB18 jmp short .common 6088 %endif 6089 6090 .386: 6091 [cpu 386] 0 00005573 6658 pop eax 0 00005575 665B pop ebx 0 00005577 6659 pop ecx 0 00005579 665A pop edx 0 0000557B 58 pop ax 0 0000557C 58 pop ax ; we'll get esp later 0 0000557D 665D pop ebp 0 0000557F 665E pop esi 0 00005581 665F pop edi 6101 ; pop ax ; get ds later 6102 ; pop ax ; discard high words of segment registers 6103 ; pop ax ; es already loaded 6104 ; pop ax 6105 ; pop ax ; get ss later 6106 ; pop ax 6107 ; pop ax ; get cs later 6108 ; pop ax 0 00005583 83C410 add sp, byte 8 * 2 0 00005586 0FA1 pop fs 0 00005588 58 pop ax 0 00005589 0FA9 pop gs 6113 __CPU__ 6114 .common: 6115 %endif 0 0000558B A1[0000] mov ax, word [reg_eax] ; restore ax (used to discard words) 0 0000558E 8E16[0000] mov ss, word [reg_ss] 6118 %if _ONLYNON386 6119 mov sp, word [reg_esp] 6120 %else 6121 ..@patch_no386_ds_code_or_entry: 0 00005592 66 o32 ; mov esp, dword [reg_esp] 0 00005593 8B26[0000] mov sp, word [reg_esp] ; restore program stack 6124 %endif 0 00005597 C606[0000]00 mov byte [bInDbg], 0 6126 6127 align 4, nop 6128 patcharea_run: 0 0000559C 90 .: times 32 nop 6130 .end: 6131 .size equ .end - . 6132 %if _RUN2_ENTRY_SECTION 6133 .segment equ pspdbg 6134 %else 6135 .segment equ code_seg 6136 %endif 6137 0 000055BC 66 _386_o32 ; push dword [reg_efl] 0 000055BD FF36[0000] push word [reg_efl] 0 000055C1 66 _386_o32 ; push dword [reg_cs] ; high word is zero 0 000055C2 FF36[0000] push word [reg_cs] 0 000055C6 66 _386_o32 ; push dword [reg_eip] 0 000055C7 FF36[0000] push word [reg_eip] 0 000055CB F606[0100]02 test byte [reg_efl+1], 2 ; IF set? 0 000055D0 8E1E[0000] mov ds, word [reg_ds] ; restore ds 0 000055D4 7401 jz .di 0 000055D6 FB sti ; required for ring3 protected mode if IOPL==0 6148 .di: 6149 %if _ONLYNON386 6150 iret 6151 %else 6152 ..@patch_no386_iret_code_or_entry: 0 000055D7 66 o32 ; iretd 0 000055D8 CF iret ; jump to program 6155 %endif 6156 6157 ; The byte at ..@patch_no386_ds will be adjusted to a ds prefix on non-386 processors. 6158 ; This does not change the following instruction's behaviour (aside from changing it 6159 ; to a 16-bit instruction as intended) and insures that sp is set in the instruction 6160 ; right behind the instruction that sets ss. 6161 6162 ; The byte at ..@patch_no386_iret will be adjusted to an iret instruction on non-386 processors. 6163 ; This avoids the NOP that would be written there if _386_o32 was used, because the iret 6164 ; should follow right behind the sti instruction. 6165 6166 6167 usesection lDEBUG_DATA_ENTRY 6167 ------------------ note: usesection lDEBUG_DATA_ENTRY 6168 6169 6170 %if _CATCHSYSREQ 6171 @@: 6172 jmp far [cs:intr_sysreq.next] 6173 6174 iispentry intr_sysreq, 0 6175 cmp byte [cs:bInDbg], 0 6176 jne @B 6177 %if _SYSREQINT == 15h 6178 cmp ax, 8501h ; sysreq released? 6179 jne @B 6180 %else 6181 pushf 6182 push cs 6183 call @B 6184 push ds 6185 push ax 6186 mov ax, 40h 6187 mov ds, ax 6188 test byte [18h], 4 6189 pop ax 6190 pop ds 6191 jnz @F 6192 iret 6193 6194 @@: 6195 %endif 6196 %if _PM && _SYSREQ_DISABLE_INT2F_HOOK 6197 clropt [options4], opt4_int_2F_hook ; disable hooking 6198 %endif 6199 mov word [cs:run_int], sysreqmsg ; remember interrupt type 6200 jmp intrtn ; jump to register saving routine 6201 %endif 6202 6203 6204 %if _CATCHINT08 0 000055D9 CBEB10FFFFFFFF4B42 iispentry intr8, 0 0 000055E2 00EBF400 6206 intr8_original: equ intr8.next 0 000055EC 9C pushf 0 000055ED 2EFF1E[4C01] call far [cs:intr8_original] 0 000055F2 9C pushf 0 000055F3 53 push bx 0 000055F4 1E push ds 6212 0 000055F5 0E push cs 0 000055F6 1F pop ds 6215 0 000055F7 803E[0000]00 cmp byte [bInDbg], 0 ; in debugger ? 0 000055FC 7559 jne .reset ; yes --> 6218 0 000055FE F606[0000]04 testopt [serial_flags], sf_double_ctrl_c 0 00005603 7408 jz @F 6221 0 00005605 C706[0000][0000] mov word [run_int], runint_ctrlc_msg 0 0000560B EB44 jmp @FF 6224 6225 @@: 0 0000560D BB4000 mov bx, 40h 0 00005610 8EDB mov ds, bx 0 00005612 F606170004 test byte [17h], 4 ; CTRL currently pressed ? 0 00005617 0E push cs 0 00005618 1F pop ds 0 00005619 743C jz .reset ; no --> 6232 0 0000561B 8B1E[0000] mov bx, word [intr8_limit] 0 0000561F 85DB test bx, bx ; enabled ? 0 00005621 7439 jz .return ; no --> 0 00005623 FF06[0000] inc word [intr8_counter] 0 00005627 391E[0000] cmp word [intr8_counter], bx ; default is ca 5 seconds 0 0000562B 722F jb .return 6239 0 0000562D C706[0000][0000] mov word [run_int], int8msg 0 00005633 F606[0100]80 testopt [options], int8_disable_serial 0 00005638 7417 jz @F 0 0000563A F606[0000]10 testopt [serial_flags], sf_use_serial 0 0000563F 7410 jz @F 6245 6246 ; Immediately disable use of serial I/O. 0 00005641 8026[0000]EF clropt [serial_flags], sf_use_serial 0 00005646 8026[0100]BF clropt [options], enable_serial 0 0000564B C706[0000][0000] mov word [run_int], int8_kbd_msg 6250 6251 @@: 0 00005651 1F pop ds 0 00005652 5B pop bx 0 00005653 9D popf ; (in 86 Mode) 0 00005654 E97B01 jmp intrtn 6256 6257 .reset: 0 00005657 8326[0000]00 and word [intr8_counter], 0 6259 .return: 0 0000565C 1F pop ds 0 0000565D 5B pop bx 0 0000565E 9D popf ; (in 86 Mode) 0 0000565F CF iret 6264 %endif 6265 6266 6267 %if !_LOADER 6268 ; Interrupt 22h (program termination) handler. 6269 int22: 0 00005660 FA cli 6271 .cleartraceflag: 0 00005661 0E push cs 0 00005662 1F pop ds 0 00005663 0E push cs 0 00005664 17 pop ss 0 00005665 8B26[0000] mov sp, word [run_sp] ; restore running stack 0 00005669 0326[0000] add sp, word [run_sp_reserve] 0 0000566D C706[0000][0000] mov word [run_int], progtrm ; set interrupt message 0 00005673 C706[0000][0000] mov word [lastcmd], dmycmd ; disable T/P/G auto-repeat 6280 %if _PM 6281 mov byte [pm_2_86m_0], 0 6282 clropt [internalflags], protectedmode ; reset PM flag 6283 %endif 6284 %ifn _RUN_ENTRY_SECTION 6285 times 1 - (($ - $$) & 1) nop ; align in-code parameter 6286 call entry_to_code_seg 6287 dw intrtn1_code 6288 ; jump to register saving routine 6289 %else 0 00005679 E9FA01 jmp intrtn1_entry 6291 %endif 6292 %endif ; !_LOADER 6293 6294 sharedentry1.hwreset: 0 0000567C CB retf 6296 6297 6298 %if !_LOADER 0 0000567D 90 align 2 0 0000567E 4A50 db "JP" ; signature for MS-DOS v7 6301 ; This signature should be immediately before the int 1 interrupt handler 6302 ; to preserve int 1 and int 3. It was discovered by Japheth who wrote 6303 ; about it in https://bttr-software.de/forum/forum_entry.php?id=22502 6304 ; Interrupt 01h (single-step interrupt) handler. 0 00005680 EB10FFFFFFFF4B4200 iispentry intr1, 0, sharedentry1 0 00005689 EBF100 6306 lframe int 0 00005692 5589E5 lenter 0 00005695 50 push ax 6309 6310 %ifn _PASSTF 0 00005696 806607FE clropt [bp + ?frame_fl], 100h ; clear TF (always) 6312 %endif 6313 0 0000569A 8CC8 mov ax, cs 0 0000569C 394604 cmp word [bp + ?frame_cs], ax ; entry segment ? 0 0000569F 751A jne .if_ZR ; no --> (NZ) 6317 6318 ; On the NEC V20 if we trace an int3 instruction 6319 ; or a div instruction that faults, we will 6320 ; enter our Trace Interrupt entry with the 6321 ; interrupt stack frame pointing at the first 6322 ; instruction of the int 3 or int 0 handler. 6323 ; If this happens, clear the Trace Flag and 6324 ; continue running our handler. 0 000056A1 817E02[3A02] cmp word [bp + ?frame_ip], intr0 0 000056A6 7413 je .if_ZR ; that one --> (ZR) 0 000056A8 817E02[5602] cmp word [bp + ?frame_ip], intr3 0 000056AD 740C je .if_ZR ; that one --> (ZR) 6329 6330 ; If the DOS doesn't clear the Trace Flag when 6331 ; it uses a PRA to return to, its iret will 6332 ; enable tracing and invoke our Trace Interrupt 6333 ; with the stack frame pointing to *the second* 6334 ; instruction in the PRA handler. 6335 ; Like above, clear TF then run the PRA handler. 6336 %if _PM 6337 cmp word [bp + ?frame_ip], getline_extra_int22.cleartraceflag 6338 je .if_ZR ; that one --> (ZR) 6339 %endif 0 000056AF 817E02[D101] cmp word [bp + ?frame_ip], int22.cleartraceflag 0 000056B4 7405 je .if_ZR ; that one --> (ZR) 0 000056B6 817E02[0000] cmp word [bp + ?frame_ip], debug22.cleartraceflag 6343 .if_ZR: 0 000056BB 58 pop ax 6345 6346 %if _PASSTF 6347 jnz @F ; handle trace entry --> 6348 clropt [bp + ?frame_fl], 100h ; clear TF (only if we continue) 6349 lleave code, optimiserestoresp ; restore bp 6350 iret ; continue run if matched 6351 6352 @@: 6353 lleave , optimiserestoresp ; restore bp 6354 %else 0 000056BC 5D lleave , optimiserestoresp ; restore bp (common before branch) 0 000056BD 7501 jnz @F ; handle trace entry --> 0 000056BF CF iret ; continue run if matched 6358 6359 @@: 6360 %endif 6361 0 000056C0 2EC706[0000][0000] mov word [cs:run_int], int1msg ; remember interrupt type 0 000056C7 E90801 jmp intrtn ; jump to register saving routine 6364 6365 6366 ; Interrupt 00h (divide error) handler. 0 000056CA EB10FFFFFFFF4B4200 iispentry intr0, 0, sharedentry1 0 000056D3 EBA700 0 000056DC 2EC706[0000][0000] mov word [cs:run_int], int0msg ; remember interrupt type 0 000056E3 E9EC00 jmp intrtn ; jump to register saving routine 6370 6371 6372 6373 ; Interrupt 03h (breakpoint interrupt) handler. 0 000056E6 EB10FFFFFFFF4B4200 iispentry intr3, 0, sharedentry1 0 000056EF EB8B00 0 000056F8 2EC706[0000][0000] mov word [cs:run_int], int3msg ; remember interrupt type 6376 %if _CATCHINT06 0 000056FF E9D000 jmp intrtn ; jump to register saving routine 6378 6379 6380 ; Interrupt 06h (invalid opcode) handler. 0 00005702 EB10FFFFFFFF4B4200 iispentry intr6, 0, sharedentry2 0 0000570B EB1100 0 00005714 2EC706[0000][0000] mov word [cs:run_int], int6msg ; remember interrupt type 6383 %endif 0 0000571B E9B400 jmp intrtn ; jump to register saving routine 6385 %endif ; !_LOADER 6386 6387 6388 sharedentry2.hwreset: 0 0000571E CB retf 6390 6391 6392 %if _CATCHINT07 6393 ; Interrupt 07h (no x87 present on 286+) handler. 6394 iispentry intr7, 0, sharedentry2 6395 mov word [cs:run_int], int7msg ; remember interrupt type 6396 cmp byte [cs:bInDbg], 0 6397 jne r86m_debugger_exception 6398 jmp intrtn ; jump to register saving routine 6399 %endif 6400 6401 %if _CATCHINT0C 6402 ; Interrupt 0Ch (stack fault in R86M, or IRQ) handler. 0 0000571F 90EB10FFFFFFFF4B42 iispentry intr0C, 0, sharedentry2 0 00005728 00EBF300 6404 %if _MCLOPT 6405 cmp byte [cs:master_pic_base], 20h 6406 jae @F 6407 %endif 0 00005732 50 push ax 0 00005733 B00B mov al, 0Bh ; request In-Service Register (ISR) 0 00005735 E620 out 20h, al ; from primary PIC 0 00005737 E420 in al, 20h ; read the ISR 0 00005739 A810 test al, 1_0000b ; IRQ #4 occurred ? 0 0000573B 58 pop ax 0 0000573C 7515 jnz .notours ; yes, (likely) not a stack fault --> 6415 @@: 0 0000573E 2EC706[0000][0000] mov word [cs:run_int], int0Cmsg ; remember interrupt type 0 00005745 2E803E[0000]00 cmp byte [cs:bInDbg], 0 0 0000574B 7403E942FD jne r86m_debugger_exception 0 00005750 E97F00 jmp intrtn ; jump to register saving routine 6420 6421 .notours: 0 00005753 2EFF2E[9202] jmp far [cs:.next] 6423 %endif 6424 %if _CATCHINT0D 6425 6426 6427 ; Interrupt 0Dh (general protection fault in R86M, or IRQ) handler. 0 00005758 EB10FFFFFFFF4B4200 iispentry intr0D, 0, sharedentry2 0 00005761 EBBB00 6429 %if _MCLOPT 6430 cmp byte [cs:master_pic_base], 20h 6431 jae @F 6432 %endif 0 0000576A 50 push ax 0 0000576B B00B mov al, 0Bh ; request In-Service Register (ISR) 0 0000576D E620 out 20h, al ; from primary PIC 0 0000576F E420 in al, 20h ; read the ISR 0 00005771 A820 test al, 10_0000b ; IRQ #5 occurred ? 0 00005773 58 pop ax 0 00005774 7514 jnz .notours ; yes, (likely) not a GPF --> 6440 @@: 0 00005776 2EC706[0000][0000] mov word [cs:run_int], int0Dmsg ; remember interrupt type 0 0000577D 2E803E[0000]00 cmp byte [cs:bInDbg], 0 0 00005783 7403E90AFD jne r86m_debugger_exception 0 00005788 EB48 jmp intrtn ; jump to register saving routine 6445 6446 .notours: 0 0000578A 2EFF2E[CA02] jmp far [cs:.next] 6448 %endif 6449 %if _CATCHINT18 6450 ; Interrupt 18h (diskless boot hook) handler. 0 0000578F 90EB10FFFFFFFF4B42 iispentry intr18, 0, sharedentry3 0 00005798 00EB7700 0 000057A2 2EC706[0000][0000] mov word [cs:run_int], int18msg ; remember interrupt type 6453 %endif 6454 %if _CATCHINT19 0 000057A9 EB27 jmp intrtn ; jump to register saving routine 6456 6457 6458 ; Interrupt 19h (boot load) handler. 0 000057AB 90EB10FFFFFFFF4B42 iispentry intr19, 0, sharedentry3 0 000057B4 00EB5B00 0 000057BE 2EC706[0000][0000] mov word [cs:run_int], int19msg ; remember interrupt type 0 000057C5 2EC706[0000][0000] mov word [cs:lastcmd], dmycmd ; disable T/P/G auto-repeat 0 000057CC 2E8026[0300]FE clropt [cs:internalflags2], dif2_boot_loaded_kernel 6463 %endif 6464 6465 ; Common interrupt routine. 6466 6467 %if !_LOADER 6468 ; Housekeeping. 6469 intrtn: 0 000057D2 FA cli ; just in case 0 000057D3 2E8F06[0000] pop word [cs:reg_eip] ; recover things from stack 0 000057D8 2E8F06[0000] pop word [cs:reg_cs] 0 000057DD 2E8F06[0000] pop word [cs:reg_efl] 0 000057E2 2E8C1E[0000] mov word [cs:reg_ds], ds ; ! word-aligned (AC flag) 0 000057E7 2EA3[0000] mov word [cs:reg_eax], ax ; ! word-aligned (AC flag) 0 000057EB 8CC8 mov ax, cs 0 000057ED 8ED8 mov ds, ax ; => lDEBUG_DATA_ENTRY 6478 0 000057EF 90 align 4, nop 6480 patcharea_intrtn: 0 000057F0 90 .: times 32 nop 6482 .end: 6483 .size equ .end - . 6484 .segment equ pspdbg 6485 6486 %ifn _RUN_ENTRY_SECTION 6487 times 1 - (($ - $$) & 1) nop ; align in-code parameter 6488 call entry_to_code_seg 6489 dw intrtn_code 6490 ; To avoid delaying the code segment switch, we use the client's 6491 ; stack here to call (jump) via entry_to_code_seg. 6492 %else 0 00005810 EB01 jmp intrtn_entry 6494 %endif 6495 6496 sharedentry3.hwreset: 0 00005812 CB retf 6498 6499 6500 %ifn _RUN_ENTRY_SECTION 6501 usesection lDEBUG_CODE 6502 6503 code_insure_low_byte_not_0CCh 6504 intrtn_code: 6505 %else 6506 usesection lDEBUG_DATA_ENTRY 6506 ------------------ note: usesection lDEBUG_DATA_ENTRY 6507 intrtn_entry: 6508 %endif 6509 6510 %if _PM 6511 mov byte [pm_2_86m_0], 0 6512 clropt [internalflags], protectedmode ; reset PM flag 6513 .from_installdpmi: 6514 %endif 0 00005813 8C16[0000] mov word [reg_ss], ss ; save stack position 0 00005817 8326[0200]00 _386 and word [reg_eip+2], byte 0 ; we're from real mode 0 0000581C 66 _386_o32 ; mov dword [reg_esp], esp 0 0000581D 8926[0000] mov word [reg_esp], sp 0 00005821 8ED0 mov ss, ax ; mov ss, cs ; (don't use the stack here) 6520 6521 %if _PM 6522 jmp @F 6523 6524 %ifn _RUN_ENTRY_SECTION 6525 intrtn2_code: ; <--- entry protected mode 6526 %else 6527 intrtn2_entry: ; <--- entry protected mode 6528 %endif 6529 mov word [ss:reg_ds], ds ; ! word-aligned (AC flag) 6530 mov word [ss:reg_eax], ax ; ! word-aligned (AC flag) 6531 mov ax, ss 6532 mov ds, ax ; mov ds, ss 6533 @@: 6534 %endif 0 00005823 B80200 mov ax, 2 6536 %ifn _ONLY386 0 00005826 EB1A _386_jmps .386 ; --> 0 00005828 BC[0200] mov sp, reg_es+2 0 0000582B 06 push es 6540 ; sub sp, ax 6541 ; sub sp, ax ; ds already saved 6542 ; sub sp, ax ; don't overwrite high word of di 0 0000582C 83EC06 sub sp, byte 3*2 0 0000582F 57 push di 0 00005830 29C4 sub sp, ax 0 00005832 56 push si 0 00005833 29C4 sub sp, ax 0 00005835 55 push bp 6549 ; sub sp, ax 6550 ; sub sp, ax ; sp already saved 6551 ; sub sp, ax 0 00005836 83EC06 sub sp, byte 3*2 0 00005839 52 push dx 0 0000583A 29C4 sub sp, ax 0 0000583C 51 push cx 0 0000583D 29C4 sub sp, ax 0 0000583F 53 push bx 6558 %endif 6559 %ifn _ONLYNON386 6560 %ifn _ONLY386 0 00005840 EB34 jmp short .common 6562 %endif 6563 6564 .386: 6565 [cpu 386] 0 00005842 66BC[02000000] mov esp, reg_gs+2 0 00005848 0FA8 push gs 0 0000584A 29C4 sub sp, ax ; don't overwrite high words of segments 0 0000584C 0FA0 push fs 6570 ; sub sp, ax 6571 ; sub sp, ax ; cs already saved 6572 ; sub sp, ax 6573 ; sub sp, ax ; ss already saved 6574 ; sub sp, ax 0 0000584E 83EC0A sub sp, byte 5*2 0 00005851 06 push es 6577 ; sub sp, ax 6578 ; sub sp, ax ; ds already saved 0 00005852 83EC04 sub sp, byte 2*2 0 00005855 6657 push edi 0 00005857 6656 push esi 0 00005859 6655 push ebp 6583 ; sub sp, ax 6584 ; sub sp, ax ; sp already saved 0 0000585B 83EC04 sub sp, byte 2*2 0 0000585E 6652 push edx 0 00005860 6651 push ecx 0 00005862 669C pushfd ; (this overwrites reg_ebx) 0 00005864 01C4 add sp, ax ; discard low word of efl 0 00005866 8F06[0200] pop word [reg_efl+2] 0 0000586A 6A00 push 0 0 0000586C 9C pushf ; (this also overwrites reg_ebx) 0 0000586D 669D popfd ; clear high word of efl inside debugger (resets AC flag) 0 0000586F 6653 push ebx 0 00005871 A1[0000] mov ax, word [reg_eax] ; restore ax 0 00005874 6650 push eax ; so we don't overwrite it with 2 here 6597 __CPU__ 6598 .common: 6599 %endif 6600 6601 %ifn _RUN_ENTRY_SECTION 6602 code_insure_low_byte_not_0CCh 6603 ; Clean up. 6604 intrtn1_code: 6605 %else 6606 intrtn1_entry: 6607 %endif 0 00005876 66 _386_o32 ; mov esp, dword [run_sp] 0 00005877 8B26[0000] mov sp, word [run_sp] ; restore running stack 0 0000587B 0326[0000] add sp, word [run_sp_reserve] 0 0000587F FC cld ; clear direction flag 0 00005880 FB sti ; interrupts back on 6613 6614 %if _SYMBOLIC 6615 clropt [internalflags2], dif2_xms_detection_done 6616 ; Re-detect XMS after running. 6617 ; 6618 ; The actual detection is done in symbol access functions, 6619 ; which are only called once all breakpoints are restored. 6620 %endif 6621 6622 %if _RUN_ENTRY_SECTION 0 00005881 E8[0000] call entry_to_code_segsel 0 00005884 [2113] dw .code 6625 6626 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 6626 ------------------ note: usesection lDEBUG_CODE 6627 .code: 6628 %endif 6629 6630 %if _PM 6631 call handle_mode_changed 6632 %endif 6633 0 0000A2BF E8BBF5 call get_cseip_of_possible_breakpoint 6635 ; Initialise this here. This means we do not need to call 6636 ; resetmode between proceed_wp and bb_wp and gg_wp. If 6637 ; more than one point needs to switch modes this avoids 6638 ; repeated modeswitching back and forth. 6639 6640 %if _DEBUG ; reset to next copy's divide/trace/breakpoint ints 6641 %if _DEBUG_COND 6642 testopt [internalflags6], dif6_debug_mode 6643 jz .skipints 6644 call reset_interrupts 6645 jmp .skipints 6646 6647 reset_interrupts: equ $ 6648 %endif 6649 push cx 6650 push si 6651 push di 6652 push ax 6653 push bx 6654 push dx 6655 push bp 6656 6657 %if _PM 6658 call ispm 6659 jz @F ; in PM --> 6660 testopt [internalflags], canswitchmode 6661 jz @FF ; in 86 Mode and cannot switch to PM --> 6662 6663 d4 call d4message 6664 d4 asciz "In intrtn1_code (switch mode before calling pm_reset_handlers)",13,10 6665 setopt [internalflags], modeswitched ; set flag for resetmode 6666 mov al, 0 6667 call sr_state ; save state 6668 call switchmode ; switch to PM 6669 ; ! handle_mode_changed not called here ! 6670 ; do not call InDOS or other functions using seg/sels 6671 @@: 6672 call pm_reset_handlers 6673 ; ! this calls resetmode 6674 @@: 6675 6676 numdef OVERRIDE_BUILD_PM_DEBUG, 0 6677 %if ! _CATCHPMINT214C && ! _OVERRIDE_BUILD_PM_DEBUG 6678 %fatal Cannot build DDEBUGX: handler switching without Int21.4C hook untested 6679 %endif 6680 %endif 6681 6682 %if CATCHINTAMOUNT 6683 %if _CATCHINT06 && _DETECT95LX 6684 mov cx, word [inttab_number_variable] 6685 %else 6686 mov cx, inttab_number 6687 %endif 6688 jcxz .intend 6689 mov si, inttab 6690 mov dx, -1 ; always force 6691 .nextint: 6692 lodsb 6693 xchg ax, bx ; bl = number 6694 lodsw ; si -> list 6695 xchg ax, si ; si -> entry, ax -> list 6696 xchg ax, bx ; al = number, bx -> list 6697 call UnhookInterruptForce 6698 xchg bx, si ; si -> list 6699 loop .nextint 6700 6701 .intend: 6702 %endif 6703 6704 pop bp 6705 pop dx 6706 pop bx 6707 pop ax 6708 pop di 6709 pop si 6710 pop cx 6711 %if _DEBUG_COND 6712 retn 6713 %endif 6714 .skipints: 6715 %endif 6716 0 0000A2C2 8026[0100]FE clropt [reg_efl], 100h ; clear TF 6718 0 0000A2C7 E8[0000] call getpsp 0 0000A2CA 891E[0000] mov word [pspdbe], bx 6721 0 0000A2CE E8[0000] call getint2324 ; save debuggee's int 23/24, set debugger's int 23/24 6723 0 0000A2D1 16 push ss 0 0000A2D2 07 pop es 0 0000A2D3 E8[0000] call setpspdbg ; set PSP of debugger 6727 0 0000A2D6 800E[0100]30 setopt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is on 6729 %if _PM 6730 call ispm 6731 jz .a20done ; assume A20 on. (is this the right thing to do?) 6732 %endif 0 0000A2DB 06 push es 0 0000A2DC 1E push ds 0 0000A2DD 57 push di 0 0000A2DE 56 push si 0 0000A2DF 51 push cx 0 0000A2E0 31F6 xor si, si 0 0000A2E2 8EDE mov ds, si ; ds = 0000h 0 0000A2E4 4E dec si 0 0000A2E5 8EC6 mov es, si ; es = FFFFh 0 0000A2E7 46 inc si ; ds:si = 0000h:0000h = 00000h 0 0000A2E8 BF1000 mov di, 0010h ; es:di = FFFFh:0010h = 100000h (same address if it overflows) 0 0000A2EB 89F9 mov cx, di ; 32 byte (16 = 10h word) 0 0000A2ED F3A7 repe cmpsw ; compare them and assume A20 line switched off if same 0 0000A2EF 59 pop cx 0 0000A2F0 5E pop si 0 0000A2F1 5F pop di 0 0000A2F2 1F pop ds 0 0000A2F3 07 pop es 0 0000A2F4 7505 jne .a20done ; not equal, A20 line is switched on --> 6752 ; if equal, the A20 line is probably switched off 0 0000A2F6 8026[0100]CF clropt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is off 6754 6755 %if 0 ;_LOCALENABLEA20 6756 ; This doesn't serve any particular reason if we have no business accessing the HMA. 6757 ; What's more important is that the dump, assemble, and disassemble commands *should* 6758 ; use a disabled A20 if it is disabled to the debuggee. Thus, enabling A20 belongs, if 6759 ; at all, into getsegmented (similar to the switch to PM) as there may be breakpoints in 6760 ; the HMA that we need to reset. 6761 %if _GUARD_86M_INT2F 6762 push es 6763 xor ax, ax 6764 mov es, ax ; (only used in 86 Mode) 6765 mov ax, [es:2Fh * 4] 6766 cmp ax, -1 6767 je @F ; --> (ZR) 6768 or ax, [es:2Fh * 4 + 2] 6769 @@: 6770 pop es 6771 jz @F 6772 %endif 6773 mov ax, 4300h 6774 int 2Fh ; XMS v2 installation check 6775 cmp al, 80h ; installed ? 6776 jne .a20done ; no --> 6777 mov ax, 4310h 6778 int 2Fh ; get entry 6779 mov ah, 05h 6780 push cs 6781 call callfaresbx ; local enable A20 6782 push ds 6783 pop es 6784 dec ax 6785 jnz .a20done ; not able to enable A20 --> 6786 ; actually check here to insure it is on? 6787 setopt [internalflags], debuggerA20 ; our A20 is on 6788 @@: 6789 %endif 6790 .a20done: 6791 0 0000A2FB C606[0000]01 mov byte [bInDbg], 1 6793 %if _CATCHINT19 0 0000A300 813E[0000][0000] cmp word [run_int], int19msg 0 0000A306 7505 jne @F 0 0000A308 800E[0200]20 setopt [internalflags3], dif3_gotint19 6797 %endif 6798 @@: 0 0000A30D 813E[0000][0000] cmp word [run_int], progtrm 0 0000A313 7505 jnz @F 0 0000A315 800E[0200]80 setopt [internalflags], attachedterm 6802 @@: 6803 6804 %if _FORCETEXT 6805 call checkgfx ; see if current mode is gfx, set to text if yes 6806 %endif 6807 6808 %if _VXCHG 0 0000A31A B001 mov al, 1 ; restore debugger screen 0 0000A31C E8[0000] call swapscreen 6811 %ifn _VXCHGBIOS 0 0000A31F 06 push es 0 0000A320 B84000 mov ax, 0040h 0 0000A323 8EC0 mov es, ax 0 0000A325 26A08400 mov al, [es:84h] ; did the number of screen rows change? 0 0000A329 268A3E6200 mov bh, [es:62h] 0 0000A32E 883E[0000] mov [vpage], bh 0 0000A332 3A06[0000] cmp al, [vrows] 0 0000A336 A2[0000] mov [vrows], al 0 0000A339 7419 jz @F 6821 0 0000A33B F606[0000]01 testopt [internalflags6], dif6_vv_mode 0 0000A340 7412 jz @F 6824 0 0000A342 88C6 mov dh, al ; yes. we cannot fully restore, but at least 0 0000A344 B200 mov dl, 0 ; clear bottom line to ensure the debugger displays 6827 ; will be seen 0 0000A346 B402 mov ah, 2 ; set cursor position 0 0000A348 CD10 int 10h 0 0000A34A B307 mov bl, 7 ; BH=video page, BL=attribute 0 0000A34C B95000 mov cx, 80 ; CX=columns 0 0000A34F B82009 mov ax, 0920h ; AL=char to display 0 0000A352 CD10 int 10h 6834 @@: 0 0000A354 07 pop es 6836 %else 6837 ;--- with page flips, there are problems with many BIOSes: 6838 ;--- the debugger displays may get the color of the debuggee! 6839 ;--- if there's any trick to convince the BIOS not to do this, 6840 ;--- implement it here! 6841 mov byte [vpage], 1 6842 %endif 6843 %endif 6844 6845 %if _ALTVID 0 0000A355 E80100 call setscreen 6847 %endif 6848 0 0000A358 C3 retn 6850 6851 %if 0 ;_LOCALENABLEA20 6852 callfaresbx: 6853 push es 6854 push bx 6855 retf 6856 %endif 6857 %endif ; !_LOADER 6858 6859 6860 %if _ALTVID 6861 6862 ;--- switch to debugger/debuggee screen with option /2. 6863 ;--- since DOS/BIOS is used for output, there's no guarantee that it will work. 6864 6865 setscreen: 0 0000A359 C3 retn ; will be patched to "push ds" if "/2" cmdline switch and second adapter exists 6867 ; (SMC in section lDEBUG_CODE) 0 0000A35A 8B16[0000] mov dx, [oldcrtp] 0 0000A35E 8B1E[0000] mov bx, [oldcols] 0 0000A362 A1[0000] mov ax, [oldmr] 0 0000A365 B94000 mov cx, 0040h ; 0040h is supposed to work in both rm/pm 0 0000A368 8ED9 mov ds, cx 0 0000A36A 368B0E[0000] mov cx, [ss:oldcsrpos] 0 0000A36F 80261000CF and byte [10h], ~ 30h 0 0000A374 80FAB4 cmp dl, 0B4h 0 0000A377 7505 jnz @F 0 0000A379 800E100030 or byte [10h], 30h 6878 @@: 0 0000A37E 871E4A00 xchg bx, [4Ah] 0 0000A382 870E5000 xchg cx, [50h] 0 0000A386 87166300 xchg dx, [63h] 0 0000A38A 86064900 xchg al, [49h] 0 0000A38E 86268400 xchg ah, [84h] 0 0000A392 1F pop ds 0 0000A393 8916[0000] mov [oldcrtp], dx 0 0000A397 890E[0000] mov [oldcsrpos], cx 0 0000A39B 891E[0000] mov [oldcols], bx 0 0000A39F A3[0000] mov [oldmr], ax 0 0000A3A2 C3 retn 6890 %endif 6891 6892 6893 %if _FORCETEXT 6894 checkgfx: 6895 mov dx, 3CEh ; see if in graphics mode 6896 in al, dx 6897 mov bl, al 6898 mov al, 6 6899 out dx, al 6900 inc dx 6901 in al, dx 6902 xchg bl, al 6903 dec dx 6904 out dx, al 6905 test bl, 1 6906 jz @F 6907 mov ax, 0003h 6908 int 10h 6909 @@: 6910 retn 6911 %endif 6912 6913 6914 %if _PM 6915 ; INP: flag for PM 6916 ; flag for prior PM (from remember_mode) 6917 ; flag for modeswitched (set if in modeswitching) 6918 ; OUT: seg/sels initialised for new mode, if changed 6919 handle_mode_changed: 6920 mov si, convsegs 6921 mov cx, convsegs.amount 6922 6923 call ispm 6924 jz .now_pm 6925 [cpu 286] 6926 .now_86m: 6927 testopt [internalflags3], dif3_prior_pm 6928 jz .from_no_change 6929 %if _MMXSUPP && _MMX_REDETECT 6930 call mmx_redetect 6931 %endif 6932 .from_pm_now_86m: 6933 .from_pm_now_86m.loop: 6934 lodsw 6935 xchg ax, di 6936 cmp si, convsegs.end_fixed 6937 ja @F 6938 mov dx, word [di + soaSegment] 6939 mov word [di + soaSegSel], dx 6940 loop .from_pm_now_86m.loop 6941 jmp .from_done_change 6942 6943 @@: 6944 ; We want to switch modes to get the segment bases. 6945 ; First check we aren't already modeswitched. 6946 testopt [internalflags], modeswitched 6947 jnz .from_done_change ; cancel this --> 6948 6949 testopt [internalflags], canswitchmode 6950 jnz @FF 6951 jmp @F 6952 6953 numdef OVERRIDE_BUILD_PM_HANDLE_SWITCH, 0 6954 %if ! _CATCHPMINT214C && ! _OVERRIDE_BUILD_PM_HANDLE_SWITCH 6955 %fatal Cannot build DEBUGX: handle mode changed without Int21.4C will fail 6956 %endif 6957 6958 6959 .from_pm_now_86m.loop.nonfixed.nomodeswitch: 6960 lodsw 6961 xchg ax, di 6962 @@: 6963 xor dx, dx 6964 mov word [di + soaSegment], dx 6965 mov word [di + soaSegSel], dx 6966 loop .from_pm_now_86m.loop.nonfixed.nomodeswitch 6967 jmp .from_done_change 6968 6969 @@: 6970 push cx 6971 push di 6972 push si 6973 d4 call d4message 6974 d4 asciz "In intrtn1_code.from_pm_now_86m (switching modes to access selectors)",13,10 6975 setopt [internalflags], modeswitched ; set flag for resetmode 6976 mov al, 0 6977 call sr_state ; save state 6978 call switchmode ; switch to PM 6979 ; ! handle_mode_changed not called here ! 6980 ; do not call InDOS or other functions using seg/sels 6981 pop si 6982 pop di 6983 jmp @F 6984 6985 .from_pm_now_86m.loop.nonfixed: 6986 lodsw 6987 xchg ax, di 6988 push cx 6989 @@: 6990 xor bx, bx 6991 xchg bx, word [di + soaSelector] 6992 mov ax, 0006h 6993 int 31h 6994 jc @F ; fail --> 6995 test dl, 15 6996 jnz @F ; not on a segment boundary --> 6997 test cx, 0FFF0h 6998 jnz @F ; >= 1024 KiB --> 6999 shr dx, 4 7000 shl cx, 12 7001 or dx, cx 7002 db __TEST_IMM16 ; (skip xor) 7003 @@: 7004 xor dx, dx ; if no valid segment 7005 mov word [di + soaSegment], dx 7006 pop cx 7007 mov word [di + soaSegSel], dx 7008 loop .from_pm_now_86m.loop.nonfixed 7009 call resetmode ; ! only if we did the switch 7010 ; Note: This recursively calls this function, 7011 ; handle_mode_changed. Because the modeswitched 7012 ; flag is set during this call, this only re- 7013 ; initialises the fixed seg/sels with the segment 7014 ; values. That is redundant but does no harm. 7015 jmp .from_done_change 7016 __CPU__ 7017 7018 .now_pm: 7019 testopt [internalflags3], dif3_prior_pm 7020 jnz .from_no_change 7021 %if _MMXSUPP && _MMX_REDETECT 7022 call mmx_redetect 7023 %endif 7024 .from_86m_now_pm: 7025 .from_86m_now_pm.loop: 7026 lodsw 7027 xchg ax, di 7028 cmp si, convsegs.end_fixed 7029 ja @F 7030 7031 mov ax, word [di + soaSelector] 7032 test ax, ax 7033 jnz .no_dosdata_change 7034 mov bx, word [di + soaSegment] 7035 mov ax, 0002h 7036 int 31h 7037 mov word [di + soaSelector], ax 7038 7039 .no_dosdata_change: 7040 mov word [di + soaSegSel], ax 7041 jmp @FFF 7042 7043 @@: 7044 ; Magic: Do not modify if called during modeswitching. 7045 testopt [internalflags], modeswitched 7046 jnz .from_done_change ; cancel this --> 7047 7048 mov bx, word [di + soaSegment] 7049 mov ax, 0002h 7050 int 31h 7051 jnc @F 7052 xor ax, ax 7053 @@: 7054 mov word [di + soaSegSel], ax 7055 mov word [di + soaSelector], ax 7056 and word [di + soaSegment], 0 7057 @@: 7058 %if $ - .from_86m_now_pm.loop > 126 7059 loop .from_86m_now_pm.loop_j 7060 jmp .from_done_change 7061 7062 .from_86m_now_pm.loop_j: 7063 jmp .from_86m_now_pm.loop 7064 %else 7065 loop .from_86m_now_pm.loop 7066 %endif 7067 .from_done_change: 7068 .from_no_change: 7069 7070 7071 remember_mode: 7072 clropt [internalflags3], dif3_prior_pm 7073 call ispm 7074 jnz .from_86m 7075 .from_pm: 7076 setopt [internalflags3], dif3_prior_pm 7077 .from_86m: 7078 retn 7079 %endif 7080 7081 7082 %if _MMXSUPP && _MMX_REDETECT && _PM 7083 mmx_redetect: 7084 _no386 retn 7085 %ifn _ONLYNON386 7086 subcpu 386 7087 push eax 7088 push ebx 7089 push ecx 7090 push edx 7091 7092 mov byte [has_mmx], 0 ; if no 486 or no cpuid, reset 7093 7094 ; Copied from init.asm, debugging messages 7095 ; and machine variable access removed. 7096 mov bx, sp ; save current stack pointer to align 7097 and sp, ~3 ; align stack to avoid AC fault 7098 pushfd ; push original EFLAGS 7099 pop eax ; get original EFLAGS 7100 mov ecx, eax ; save original EFLAGS in ECX (including IF) 7101 7102 xor eax, 40000h ; flip AC bit in EFLAGS 7103 and ax, ~0200h ; clear IF 7104 push eax ; put new EFLAGS value on stack 7105 popfd ; replace EFLAGS value; DI 7106 pushfd ; get new EFLAGS 7107 pop eax ; store new EFLAGS value in EAX 7108 mov ax, cx ; ignore low bits (including IF) 7109 cmp eax, ecx 7110 je .cpudone_stack_eax_equals_ecx ; if 80386 --> 7111 7112 ; Intel486 DX CPU, Intel487 SX NDP, and Intel486 SX CPU check. 7113 ; Checking for ability to set/clear ID flag (bit 21) in EFLAGS 7114 ; which indicates the presence of a processor with the ability 7115 ; to use the CPUID instruction. 7116 mov eax, ecx ; get original EFLAGS 7117 xor eax, 200000h ; flip ID bit in EFLAGS 7118 and ax, ~0200h ; clear IF 7119 push eax ; save new EFLAGS value on stack 7120 popfd ; replace current EFLAGS value; DI 7121 pushfd ; get new EFLAGS 7122 pop eax ; store new EFLAGS in EAX 7123 mov ax, cx ; ignore low bits (including IF) 7124 7125 .cpudone_stack_eax_equals_ecx: 7126 push ecx 7127 popfd ; restore AC,ID bits and IF in EFLAGS (86 Mode) 7128 mov sp, bx ; restore sp 7129 7130 cmp eax, ecx ; check if it's changed 7131 je .cpudone ; if it's a 486 (can't toggle ID bit) --> 7132 7133 ; Execute CPUID instruction. 7134 subcpu 486 ; NASM (at least 2.10rc1) handles cpuid itself as a 7135 ; 586+ instruction, but we know better. So this 7136 ; part is declared for 486 compatibility, and only 7137 ; the cpuid instructions are emitted with 586 7138 ; compatibility to appease NASM. 7139 xor eax, eax ; set up input for CPUID instruction 7140 [cpu 586] 7141 cpuid 7142 __CPU__ 7143 cmp eax, byte 1 7144 jb .cpudone ; if 1 is not a valid input value for CPUID 7145 xor eax, eax ; otherwise, run CPUID with eax = 1 7146 inc eax 7147 [cpu 586] 7148 cpuid 7149 __CPU__ 7150 test edx, 80_0000h 7151 setnz byte [has_mmx] 7152 .cpudone: 7153 pop edx 7154 pop ecx 7155 pop ebx 7156 pop eax 7157 retn 7158 7159 subcpureset 7160 subcpureset 7161 %endif 7162 %endif 7163 7164 7165 %if _PM && _DEBUG 7166 ; INP: - 7167 ; OUT: es = ds 7168 ; CHG: eax, edx, bx, cx, bp, si, di 7169 ; STT: in PM 7170 ; do not call InDOS or other functions using seg/sels 7171 pm_set_handlers: 7172 xor bp, bp ; = 0 if no 386 7173 _386 inc bp 7174 _386 inc bp ; = 2 if 386 7175 7176 push ds 7177 pop es 7178 7179 mov si, exctab ; hook several exceptions 7180 %if _DEBUGUPDATESAVE 7181 mov di, excsave 7182 %endif 7183 _386 xor edx, edx ; clear edxh 7184 mov dx, exc_first 7185 .loopexc: 7186 lodsb 7187 mov bl, al 7188 7189 %if _DEBUGUPDATESAVE 7190 _386_o32 ; push edx 7191 push dx ; preserve excXX pointer 7192 mov ax, 0202h 7193 ; (edxh is zero) 7194 int 31h ; cx:(e)dx -> prior handler 7195 _386_o32 ; xchg eax, edx 7196 xchg ax, dx 7197 _386_o32 ; stosd 7198 stosw ; store offset (dword on 386+, else word) 7199 xchg ax, cx 7200 stosw ; store selector 7201 mov ax, 4 7202 sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7203 add di, ax ; -> next entry of excsave 7204 _386_o32 ; pop edx 7205 pop dx 7206 %endif 7207 7208 mov cx, word [cssel] ; -> our handler for this exception 7209 mov ax, 0203h 7210 int 31h ; set our handler 7211 %ifn _LINK 7212 add dx, byte exc_second - exc_first 7213 %else 7214 add dx, strict byte 0 7215 wlcalc byte_ext_exc_second, equ $ - 1 7216 wlcalc byte_minusext_exc_first, equ $ - 1 7217 %endif 7218 ; -> next handler 7219 cmp si, endexctab ; if another to go --> 7220 jb .loopexc 7221 7222 %if _CATCHPMINT214C 7223 mov si, pminttab ; ds:si -> pminttab 7224 %if _DEBUGUPDATESAVE 7225 mov di, pmintsave ; es:di -> pmintsave 7226 %endif 7227 .loopint: 7228 lodsb ; get interrupt number 7229 mov bl, al ; bl = interrupt number 7230 7231 %if _DEBUGUPDATESAVE 7232 _386 xor edx, edx ; clear edxh 7233 mov ax, 0204h 7234 int 31h ; cx:(e)dx -> prior handler 7235 _386_o32 ; xchg eax, edx 7236 xchg ax, dx ; (e)ax = offset 7237 _386_o32 ; stosd 7238 stosw ; store offset (dword on 386+, else word) 7239 xchg ax, cx 7240 stosw ; store selector 7241 mov ax, 4 7242 sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7243 add di, ax ; -> next entry of pmintsave 7244 %endif 7245 7246 lodsw ; ax -> our handler 7247 _386 xor edx, edx 7248 xchg ax, dx ; (e)dx -> our handler 7249 mov cx, word [cssel] ; cx:(e)dx -> our handler 7250 mov ax, 0205h 7251 int 31h 7252 cmp si, pminttab.end 7253 jb .loopint 7254 %endif 7255 7256 jmp resetmode 7257 %endif 7258 7259 7260 %if _PM && (_CATCHPMINT214C || _DEBUG || _TSR || _DEVICE) 7261 ; INP: - 7262 ; OUT: - 7263 ; CHG: eax, edx, bx, cx, bp, si, di 7264 ; STT: in PM 7265 ; do not call InDOS or other functions using seg/sels 7266 pm_reset_handlers: 7267 xor bp, bp ; = 0 if no 386 7268 _386 inc bp 7269 _386 inc bp ; = 2 if 386 7270 7271 7272 %if CATCHEXCAMOUNT 7273 ; unhook exceptions 7274 mov di, exctab 7275 mov si, excsave 7276 .loopexc: 7277 mov bl, [di] ; bl = exception number 7278 inc di 7279 _386_o32 ; lodsd 7280 lodsw ; load offset (dword on 386+, else word) 7281 _386_o32 ; xchg eax, edx 7282 xchg ax, dx 7283 lodsw ; load selector 7284 xchg ax, cx ; cx:(e)dx -> prior handler 7285 mov ax, 4 7286 sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7287 add si, ax ; -> next entry of excsave 7288 mov ax, 0203h 7289 int 31h ; set previous handler 7290 cmp di, endexctab ; if another to go --> 7291 jb .loopexc 7292 %endif 7293 7294 7295 %if CATCHPMINTAMOUNT 7296 ; unhook interrupts 7297 mov di, pminttab ; ds:di -> pminttab 7298 mov si, pmintsave ; ds:si -> pmintsave 7299 .loopint: 7300 mov bl, [di] ; bl = interrupt number 7301 add di, 3 ; -> after this pminttab entry 7302 _386_o32 ; lodsd 7303 lodsw ; load offset (dword on 386+, else word) 7304 _386_o32 ; xchg eax, edx 7305 xchg ax, dx 7306 lodsw ; load selector 7307 xchg ax, cx ; cx:(e)dx -> prior handler 7308 mov ax, 4 7309 sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7310 add si, ax ; -> next entry of pmintsave 7311 mov ax, 0205h 7312 int 31h ; set previous handler 7313 cmp di, pminttab.end ; if another to go --> 7314 jb .loopint 7315 %endif 7316 7317 jmp resetmode 7318 %endif 7319 7320 7321 %if _DEBUG1 7322 ; INP: bx -> dword address, word counter 7323 ; dx:ax = linear address to check 7324 ; OUT: NC if to proceed as usual 7325 ; CY if address matched and counter indicates trigger 7326 ; (ie, this should cause the caller to fail) 7327 ; If the address matched, the counter has been stepped. 7328 ; (The result of that step indicates whether to trigger.) 7329 ; STT: ds = ss = debugger data selector 7330 handle_test_case: 7331 cmp word [bx], ax 7332 jne .proceed 7333 cmp word [bx + 2], dx 7334 jne .proceed 7335 7336 test word [bx + 4], 7FFFh ; is it already at a terminal state ? 7337 jz .no_decrement ; yes, do not further decrement --> 7338 dec word [bx + 4] ; decrement (towards 0 or 8000h) 7339 jz .trigger ; case for decrementing 1 to 0 --> 7340 .no_decrement: 7341 cmp word [bx + 4], 8000h ; decrement resulted in 8000h 7342 je .trigger ; or was already in that state? --> 7343 .proceed: 7344 clc 7345 retn 7346 7347 .trigger: 7348 stc 7349 retn 7350 7351 7352 ; INP: bx -> first test record (dword address, word counter) 7353 ; dx:ax = linear address to check 7354 ; cx = number of consecutive test records to check 7355 ; OUT: NC if to proceed as usual 7356 ; CY if address matched and counter indicates trigger 7357 ; (ie, this should cause the caller to fail) 7358 ; CHG: bx, cx 7359 ; STT: ds = ss = debugger data selector 7360 ; 7361 ; Note that all test cases are tried and, if the address 7362 ; matches, their counters are stepped. In particular, 7363 ; a trigger no longer causes us to skip all further 7364 ; test cases that may have the same address. 7365 ; If at least one of the matching test cases indicates a 7366 ; trigger condition after its stepping, the return is CY. 7367 handle_test_case_multiple_16: 7368 mov cx, 16 7369 handle_test_case_multiple: 7370 clc 7371 pushf ; initialise flags on stack with NC 7372 jcxz .end 7373 .loop: 7374 call handle_test_case 7375 jnc .next 7376 popf ; (discard) 7377 stc 7378 pushf ; new flags on stack with CY 7379 .next: 7380 add bx, 6 7381 loop .loop 7382 .end: 7383 popf ; CF 7384 retn 7385 %endif 7386 7387 7388 %if !_LOADER 7389 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 7389 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 00005886 00 align 4, db 0 0 00005888 01000000 default_pp_count: dd 1 0 0000588C 01000000 default_tp_count: dd 1 0 00005890 01000000 default_tt_count: dd 1 7394 7395 7396 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 7396 ------------------ note: usesection lDEBUG_CODE 7397 ; PARSE_PT - Parse 'p' or 't' command. Also resets pagedcommand flag. 7398 ; Entry AL First character of command 7399 ; SI Address of next character 7400 ; [internalflags2] & dif2_is_pp = set if P 7401 ; [internalflags] & tt_p = set if TP 7402 ; both clear if T 7403 ; Exit BX:CX Number of times to repeat 7404 ; Uses AH,BX,CX,DX. 7405 7406 parse_pt: 0 0000A3A3 E8[0000] call guard_re 0 0000A3A6 C706[0000][0000] mov word [gg_deferred_message], msg.empty_message 0 0000A3AC 8326[0000]00 and word [bb_deferred_message_in_lineout_behind], 0 0 0000A3B1 8026[0000]F7 clropt [internalflags2], dif2_gg_is_gg 0 0000A3B6 8026[0300]2B clropt [internalflags], tt_while | tt_silent_mode | tt_no_bb | tt_no_bb_first 0 0000A3BB 8326[0000]00 and word [tt_silent_mode_number], 0 7414 7415 ; TP.NB, T.NB, P.NB: trace/proceed without bb breakpoints 7416 ; 7417 ; Note that when such a command is repeated through lastcmd, 7418 ; it gets an empty line, thus tt_no_bb remains clear, and 7419 ; the corresponding command without .NB is run. 0 0000A3C0 3C2E cmp al, '.' 0 0000A3C2 7520 jne .no_dot 7422 0 0000A3C4 AD lodsw 0 0000A3C5 25DFDF and ax, TOUPPER_W 0 0000A3C8 3D4E42 cmp ax, "NB" 0 0000A3CB 7411 je .dot_nb 7427 ; TP.SB, T.SB, P.SB: trace/proceed without bb for first step 0 0000A3CD 3D5342 cmp ax, "SB" 0 0000A3D0 7405 je .dot_sb 0 0000A3D2 4E dec si 0 0000A3D3 4E dec si 0 0000A3D4 E9[0000] jmp error 7433 7434 .dot_sb: 0 0000A3D7 800E[0300]80 setopt [internalflags], tt_no_bb_first 0 0000A3DC EB05 jmp .dot_common 7437 7438 .dot_nb: 0 0000A3DE 800E[0300]40 setopt [internalflags], tt_no_bb 7440 .dot_common: 0 0000A3E3 AC lodsb 7442 .no_dot: 0 0000A3E4 E84F01 call parseql ; process =addr 0 0000A3E7 E8[0000] call skipcomm0 ; skip any white space 7445 0 0000A3EA BA0400 mov dx, opt3_pp_no_paging 0 0000A3ED 8B1E[FA03] mov bx, word [default_pp_count + 2] 0 0000A3F1 8B0E[F803] mov cx, word [default_pp_count] 0 0000A3F5 F606[0100]10 testopt [internalflags2], dif2_is_pp 0 0000A3FA 751D jnz @F 0 0000A3FC BA0200 mov dx, opt3_tp_no_paging 0 0000A3FF 8B1E[FE03] mov bx, word [default_tp_count + 2] 0 0000A403 8B0E[FC03] mov cx, word [default_tp_count] 0 0000A407 F606[0300]08 testopt [internalflags], tt_p 0 0000A40C 750B jnz @F 0 0000A40E BA0100 mov dx, opt3_tt_no_paging 0 0000A411 8B1E[0204] mov bx, word [default_tt_count + 2] 0 0000A415 8B0E[0004] mov cx, word [default_tt_count] 7459 @@: ; bx:cx = default count 7460 0 0000A419 8516[0000] test word [options3], dx 0 0000A41D 7405 jz @F 0 0000A41F 8026[0000]F7 clropt [internalflags], pagedcommand 7464 @@: 7465 7466 ; Initialise auxbuff pointers. 0 0000A424 E8F900 call tpg_initialise_empty_auxbuff 7468 0 0000A427 E8[0000] call iseol? 7470 %if _LINK_COMPAT 0 0000A42A 7503 jne @F 0 0000A42C E97E00 jmp strict near .ppt1 ; if no count given --> (uses bx:cx = default) 7473 @@: 7474 %else 7475 je .ppt1 ; if no count given --> (uses bx:cx = default) 7476 %endif 0 0000A42F E8[0000] nearcall getdword ; bx:dx = given count 7478 0 0000A432 53 push bx 0 0000A433 52 push dx ; push count 0 0000A434 E8[0000] call skipcomm0 0 0000A437 E8[0000] call iseol? 0 0000A43A 746F je .no_while 0 0000A43C 4E dec si 0 0000A43D BA[0000] mov dx, msg.while 0 0000A440 E8[0000] call isstring? 0 0000A443 7405 je .found_while 7488 0 0000A445 E8AE00 call .handle_silent ; (error if no SILENT keyword) 7490 0 0000A448 EB61 jmp .no_while 7492 7493 7494 .found_while: 0 0000A44A E8[0000] call skipcomma 0 0000A44D 4E dec si 0 0000A44E 89F1 mov cx, si 0 0000A450 AC lodsb 0 0000A451 E8[0000] nearcall getexpression 0 0000A454 E8[0000] nearcall toboolean 0 0000A457 E8[0000] call skipcomm0 0 0000A45A 52 push dx 0 0000A45B 56 push si 0 0000A45C E8[0000] call iseol? ; expect end of line here 0 0000A45F 7404 je .no_while_silent 7506 0 0000A461 4E dec si 0 0000A462 E89100 call .handle_silent 7509 7510 .no_while_silent: 0 0000A465 5E pop si 0 0000A466 5A pop dx 0 0000A467 85D2 test dx, dx ; condition true now ? 0 0000A469 750F jnz @F 7515 0 0000A46B BA[0000] mov dx, msg.while_not_true 0 0000A46E E8[0000] call putsz 0 0000A471 B83601 mov ax, 0136h 0 0000A474 E8[0000] call setrc 0 0000A477 E9[0000] jmp cmd3 7521 7522 @@: 7523 ; (si + 1) -> line terminator (13, ';', 0) or next keyword 7524 @@: 0 0000A47A 4E dec si ; -> terminator, or blank 0 0000A47B 807CFF20 cmp byte [si - 1], 32 ; another blank at end ? 0 0000A47F 74F9 je @B ; yes --> 0 0000A481 807CFF09 cmp byte [si - 1], 9 0 0000A485 74F3 je @B ; yes --> 0 0000A487 807CFF2C cmp byte [si - 1], ',' ; comma at end ? 0 0000A48B 74ED je @B ; yes --> 0 0000A48D 89F0 mov ax, si 0 0000A48F 29C8 sub ax, cx ; ax = length of expression 0 0000A491 3D[FFFF] cmp ax, while_buffer.length - 1 0 0000A494 7603E9[0000] ja error 0 0000A499 57 push di 0 0000A49A BF[0000] mov di, while_buffer 0 0000A49D 89CE mov si, cx ; -> expression start 0 0000A49F 91 xchg cx, ax ; cx = length of expression 0 0000A4A0 F3A4 rep movsb ; store expression 0 0000A4A2 B000 mov al, 0 0 0000A4A4 AA stosb ; terminate string 0 0000A4A5 5F pop di 7544 0 0000A4A6 800E[0300]04 setopt [internalflags], tt_while 7546 .no_while: 0 0000A4AB 59 pop cx 0 0000A4AC 5B pop bx ; bx:cx = given count 7549 7550 .ppt1: 0 0000A4AD 85DB test bx, bx 0 0000A4AF 7507 jnz @F 0 0000A4B1 85C9 test cx, cx 0 0000A4B3 7503E9[0000] jz error ; must be at least 1, else error --> 7555 @@: 0 0000A4B8 53 push bx 0 0000A4B9 51 push cx 7558 0 0000A4BA 8026[0000]E8 clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 7562 0 0000A4BF F606[0200]04 testopt [options], tp_do_not_skip_bp 0 0000A4C4 752A jnz .do_not_skip_cseip 0 0000A4C6 800E[0000]01 setopt [internalflags2], dif2_gg_is_first 7566 0 0000A4CB 803E[0000]00 cmp byte [eqflag], 0 0 0000A4D0 7507 jne .cseip_take_eql 7569 7570 _386_PM_o32 ; xor ecx, ecx 0 0000A4D2 31C9 xor cx, cx 0 0000A4D4 E82AF3 call get_cseip_ecx_linear 0 0000A4D7 EB0B jmp .got_cseip 7574 7575 .cseip_take_eql: 0 0000A4D9 8B1E[0400] mov bx, word [eqladdr + 4] 7577 _386_PM_o32 ; mov edx, dword [eqladdr] 0 0000A4DD 8B16[0000] mov dx, word [eqladdr] 0 0000A4E1 E827F3 call getlinear_d_b 7580 .got_cseip: 0 0000A4E4 7303E9[0000] jc error 0 0000A4E9 A3[0000] mov word [gg_first_cseip_linear], ax 0 0000A4EC 8916[0200] mov word [gg_first_cseip_linear + 2], dx 7584 .do_not_skip_cseip: 7585 0 0000A4F0 59 pop cx 0 0000A4F1 5B pop bx 7588 0 0000A4F2 E86100 call seteq ; make the = operand take effect 0 0000A4F5 C3 retn 7591 7592 7593 .handle_silent: 0 0000A4F6 BA[0000] mov dx, msg.silent 0 0000A4F9 E8[0000] call isstring? 0 0000A4FC 7403E9[0000] jne error 0 0000A501 E8[0000] call skipcomma 0 0000A504 4E dec si 0 0000A505 E8[0000] call skipequals 0 0000A508 E8[0000] call iseol? 0 0000A50B 740A je .no_silent_mode_number 7602 0 0000A50D E8[0000] nearcall getword 0 0000A510 8916[0000] mov word [tt_silent_mode_number], dx 0 0000A514 E8[0000] call chkeol 7606 7607 .no_silent_mode_number: 0 0000A517 E8[0000] call guard_auxbuff.1_or_2 0 0000A51A 800E[0300]10 setopt [internalflags], tt_silent_mode 0 0000A51F C3 retn 7611 7612 7613 ; INP: (_PM) word [auxbuff_switchbuffer_size] 7614 ; word [auxbuff_behind_last_silent] 7615 ; [options6] & opt6_rh_mode 7616 ; OUT: word [auxbuff_behind_last_silent] 7617 ; word [auxbuff_start_silent] 7618 ; CHG: dx 7619 tpg_initialise_empty_auxbuff: 7620 %if _RH 0 0000A520 8B16[0000] mov dx, word [auxbuff_behind_last_silent] 0 0000A524 F606[0200]10 testopt [options6], opt6_rh_mode 0 0000A529 7506 jnz .last 7624 %endif 7625 .reset: 7626 %if _PM 7627 mov dx, word [auxbuff_switchbuffer_size] 7628 %else 0 0000A52B 31D2 xor dx, dx 7630 %endif 0 0000A52D 8916[0000] mov word [auxbuff_behind_last_silent], dx 7632 .last: 7633 %if _RH 0 0000A531 8916[0000] mov word [auxbuff_start_silent], dx 7635 %endif 0 0000A535 C3 retn 7637 7638 7639 ; PARSEQL - Parse `=' operand for `g', 'p' and `t' commands. 7640 ; Entry AL First character of command 7641 ; SI Address of next character 7642 ; Exit AL First character beyond range 7643 ; SI Address of the character after that 7644 ; eqflag Nonzero if an `=' operand was present 7645 ; eqladdr Address, if one was given 7646 ; Uses AH,BX,CX,DX. 7647 7648 parseql: 0 0000A536 C606[0000]00 mov byte [eqflag], 0 ; mark '=' as absent 0 0000A53B 3C3D cmp al, '=' 0 0000A53D 7516 jne peq1 ; if no '=' operand 0 0000A53F E8[0000] call skipwhite 0 0000A542 8B1E[0000] mov bx, word [reg_cs] ; default segment 0 0000A546 E8[0000] nearcall getaddrX ; get the address into bx:(e)dx 7655 _386_PM_o32 ; mov dword [eqladdr], edx 0 0000A549 8916[0000] mov word [eqladdr+0], dx 0 0000A54D 891E[0400] mov word [eqladdr+4], bx 0 0000A551 FE06[0000] inc byte [eqflag] 7659 peq1: 0 0000A555 C3 retn 7661 7662 7663 ; SETEQ - Copy the = arguments to their place, if appropriate. 7664 ; (This is not done immediately, because the command may have 7665 ; a syntax error.) 7666 ; Uses AX. 7667 seteq: 0 0000A556 803E[0000]00 cmp byte [eqflag], 0 0 0000A55B 7411 je .return ; if no `=' operand 0 0000A55D A1[0000] mov ax, word [eqladdr+0] 0 0000A560 A3[0000] mov word [reg_eip], ax 7672 %if _PM 7673 mov ax, word [eqladdr+2] 7674 mov word [reg_eip+2], ax 7675 %endif 0 0000A563 A1[0400] mov ax, word [eqladdr+4] 0 0000A566 A3[0000] mov word [reg_cs], ax 0 0000A569 C606[0000]00 mov byte [eqflag], 0 ; clear the flag 7679 .return: 0 0000A56E C3 retn 7681 %endif ; !_LOADER 7682 7683 usesection lDEBUG_CODE 7683 ------------------ note: usesection lDEBUG_CODE 7684 7685 ..@run_access_end: === Trace listing source: ../lst/debug.obj/serialp.lst 1 2 %if 0 3 4 Serial port handling code 5 6 2019 by E. C. Masloch 7 based on http://www.sci.muni.cz/docs/pc/serport.txt The Serial Port rel. 14 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 "serialp.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00005894 ???????? eldhSignature: resb 4 ; "ELD1" 0 00005898 ?????? resb 3 ; reserved 0 0000589B ?? resb 1 ; 26 (Ctrl-Z) 0 0000589C ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 000058A0 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 000058A2 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 000058A4 ???????? eldhDataOffset: resd 1 0 000058A8 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 000058AA ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000058AC ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000058AE ???????? eldhReserved: resb 4 ; reserved 0 000058B2 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 000058B4 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000058B8 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000058BC ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000058C0 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00005894 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000589C ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 000058A0 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 000058A2 ???? 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 0 00005894 ???? 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 0 00005896 ???? eldltAmount: resw 1 0 00005898 ???????? 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 0 00005894 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00005896 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00005898 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000589A ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000589C ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 000058A4 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00005894 ???? eldlSignature: resw 1 ; 0E1D1h 0 00005896 ???????? eldlReserved: resw 2 0 0000589A ???? eldlUseLinkHash: resw 1 0 0000589C ???? eldlDataAmount: resw 1 0 0000589E ???? eldlDataPrefixes: resw 1 0 000058A0 ???? eldlDataEntries: resw 1 0 000058A2 ???? eldlDataAddresses: resw 1 0 000058A4 ???? eldlCodeAmount: resw 1 0 000058A6 ???? eldlCodePrefixes: resw 1 0 000058A8 ???? eldlCodeEntries: resw 1 0 000058AA ???? 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 0 00005894 ???? ifKeyword: resw 1 0 00005896 ???? ifDescription: resw 1 0 00005898 ???? ifOptions: resw 1 0 0000589A ???? ifValue: resw 1 0 0000589C ???? ifTrying: resw 1 0 0000589E ???? 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 0 00005894 ???????? saOffset: resd 1 0 00005898 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00005894 ???? so16aOffset: resw 1 0 00005896 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00005894 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00005894 ?????? bsJump: resb 3 0 00005897 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00005894 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00005896 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00005897 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00005899 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 0000589A ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 0000589C ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000589E ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000589F ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 000058A1 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 000058A3 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 000058A5 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 000058A9 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 000058AD ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 000058B1 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 000058B3 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 000058B5 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 000058B9 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 000058BB ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00005894 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00005895 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00005896 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00005897 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 000058A6 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00005894 ???????????????? deName: resb 8 0 0000589C ?????? deExt: resb 3 0 0000589F ?? deAttrib: resb 1 0 000058A0 ?? dePlusSize: resb 1 0 000058A1 ?????????????? resb 7 0 000058A8 ???? deClusterHigh: resw 1 0 000058AA ???? deTime: resw 1 0 000058AC ???? deDate: resw 1 0 000058AE ???? deClusterLow: resw 1 0 000058B0 ???????? 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 0 100005884 ???????? lsvFirstCluster: resd 1 0 100005888 ???????? lsvFATSector: resd 1 0 10000588C ???? lsvFATSeg: resw 1 0 10000588E ???? lsvLoadSeg: resw 1 0 100005890 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100005874 ???? ldMemoryTop: resw 1 0 100005876 ???? ldLoadTop: resw 1 0 100005878 ???? ldSectorSeg: resw 1 0 10000587A ?? ldFATType: resb 1 92 <2> ldFlags: 0 10000587B ?? ldHasLBA: resb 1 0 10000587C ???? ldClusterSize: resw 1 0 10000587E ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100005880 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100005882 ?? .partition: resb 1 ; byte 0 100005883 ?? .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 <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 0 100005864 ???????? ldRootSector: resd 1 0 100005868 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 10000586A ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 10000586C ???? ldParasLeft: resw 1 0 10000586E ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 100005854 ???????? ldMaxCluster: resd 1 0 100005858 ???????? ldFileSize: resd 1 0 10000585C ???????? ldCurrentCluster: resd 1 0 100005860 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00005894 ???????? liiSignature: resb 4 ; "NLDR" 0 00005898 ???? liiVersion: resb 2 ; "00" 0 0000589A ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 0000589C ???? liiAmountParagraphs: resw 1 0 0000589E ???????????? liiReserved: resw 3 0 000058A4 ???? 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 0 000058A6 ???? 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 0 000058A8 ???? 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 0 000058AA ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00005894 ???? lpSize: resw 1 0 00005896 ???? lpCount: resw 1 0 00005898 ???????? lpBuffer: resd 1 0 0000589C ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00005894 ?? piBoot: resb 1 0 00005895 ?????? piStartCHS: resb 3 0 00005898 ?? piType: resb 1 0 00005899 ?????? piEndCHS: resb 3 0 0000589C ???????? piStart: resd 1 0 000058A0 ???????? 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 0 00005894 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00005896 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00005898 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 0000589A ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 0000589C ???? lsOptions: resw 1 ; option flags 0 0000589E ???? lsSegment: resw 1 ; => where to load file 0 000058A0 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 000058A4 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 000058A8 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 000058AA ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 000058AC ???????????????? 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 0 00005894 ???? exact_struc_at 00h, exeSignature: resw 1 0 00005896 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00005898 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 0000589A ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 0000589C ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 0000589E ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 000058A0 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 000058A2 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 000058A4 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 000058A6 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 000058A8 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 000058AA ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 000058AC ???? 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. 0 000058AE ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00005894 ???? ifhHandle: resw 1 0 00005896 ???? ifhFlags: resw 1 0 00005898 ???????? 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 <1> areastrucEntry: resb 24 0 000058AC ???????? areastrucNext: resd 1 0 000058B0 ???????? areastrucPrev: resd 1 0 000058B4 ???? areastrucSubAmount: resw 1 0 000058B6 ???? areastrucSubOffset: resw 1 0 000058B8 ???? areastrucFunAmount: resw 1 0 000058BA ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00005894 ???????? areastrucsubLinear: resd 1 0 00005898 ???????? areastrucsubLinearEnd: resd 1 0 0000589C ???? areastrucsubListOffset: resw 1 0 0000589E ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00005894 ???????? areastrucfunLinear: resd 1 0 00005898 ???????? areastrucfunLinearEnd: resd 1 0 0000589C ???? areastrucfunListOffset: resw 1 0 0000589E ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00005894 ???? areastart: resw 1 0 00005896 ???? areaend: resw 1 0 00005898 ???? areamessage: resw 1 0 0000589A ???? 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 0 00005894 ???? 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.) 0 00005896 ???? ivFlags: resw 1 0 00005898 ???? 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. 0 0000589A ???? 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 0 0000589C ?? 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. 0 0000589D ?? 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 0 00005894 ???????? mrLinear: resd 1 0 00005898 ???????? mrOffset: resd 1 0 0000589C ???? mrSegmentSelector: resw 1 0 0000589E ???? mrFlags: resw 1 0 000058A0 ???????? 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 0 00005894 ???????? .size_: resd 1 0 00005898 ???? .srchdl: resw 1 0 0000589A ???????? .srcadr: resd 1 0 0000589E ???? .dsthdl: resw 1 0 000058A0 ???????? .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 %endif 21 22 23 usesection lDEBUG_DATA_ENTRY 23 ------------------ note: usesection lDEBUG_DATA_ENTRY 24 %if _LINK_COMPAT 25 align 2, db 0 26 %endif 27 0 00005894 CB iisphwreset serial_interrupt_handler 29 0 00005895 00 align 2, db 0 0 00005896 EB10FFFFFFFF4B4280 iispentry serial_interrupt_handler, 80h, serial_interrupt_handler 0 0000589F EBF300 0 000058A8 2EF606[0000]01 testopt [cs:serial_flags], sf_init_done 0 000058AE 7505 jnz @F 34 .notours: 0 000058B0 2EFF2E[0400] jmp far [cs:.next] 36 @@: 0 000058B5 50 push ax 0 000058B6 1E push ds 39 0 000058B7 0E push cs 0 000058B8 1F pop ds 0 000058B9 B020 mov al, 20h ; acknowledge interrupt 0 000058BB 803E[0100]00 cmp byte [serial_use_irqmask + 1], 0 0 000058C0 740B je @F 0 000058C2 E87900 call serial_next_is_iret 0 000058C5 751F jne @FF ; not our job to issue EOI --> 0 000058C7 E6A0 out 0A0h, al ; to secondary PIC 0 000058C9 E620 out 20h, al ; to primary PIC 0 000058CB EB19 jmp @FF 50 51 @@: 52 ; Fix for a condition when we use interrupt 0Ch (for COM1). 53 ; If _CATCHINT0C then we need to pass along Stack Fault in R86M to 54 ; the next handler, which will also be ours. Therefore do the inverse 55 ; of the In-Service Register check here. 0 000058CD B00B mov al, 0Bh ; request In-Service Register (ISR) 0 000058CF E620 out 20h, al ; from primary PIC 0 000058D1 E420 in al, 20h ; read the ISR 0 000058D3 8406[0000] test al, byte [serial_use_irqmask] 0 000058D7 7504 jnz .ours 0 000058D9 1F pop ds 0 000058DA 58 pop ax 0 000058DB EBD3 jmp .notours 64 65 .ours: 0 000058DD E85E00 call serial_next_is_iret 0 000058E0 7504 jne @F ; not our job to issue EOI --> 0 000058E2 B020 mov al, 20h ; acknowledge interrupt 0 000058E4 E620 out 20h, al ; to primary PIC 70 @@: 0 000058E6 51 push cx 0 000058E7 52 push dx 0 000058E8 56 push si 74 0 000058E9 FC cld 76 ih_continue: 0 000058EA 8B16[0000] mov dx, [baseport] 0 000058EE 42 inc dx 0 000058EF 42 inc dx ; (base + 2) write FCR, read IIR 80 %if _USE_TX_FIFO 0 000058F0 A0[0000] mov al, byte [serial_fcr_setting] 0 000058F3 24F9 and al, ~ 0000_0110b 0 000058F5 EE out dx, al ; (write FCR) configure FIFOs 0 000058F6 31C0 xor ax, ax 85 %else 86 xor ax, ax 87 out dx, al ; (write FCR) configure FIFOs 88 nop 89 %endif 0 000058F8 EC in al, dx ; (read IIR) get interrupt cause 0 000058F9 A801 test al, 1 ; did the UART generate the int? 0 000058FB 750C jnz ih_sep ; no, then it's somebody else's problem 0 000058FD 2406 and al, 6 ; mask bits not needed 0 000058FF 89C6 mov si, ax ; make a pointer out of it 0 00005901 4A dec dx 0 00005902 4A dec dx ; = base 0 00005903 FF94[BE00] call near word [serial_interrupt_table + si] ; serve this int 0 00005907 EBE1 jmp ih_continue ; and look for more things to be done 99 ih_sep: 0 00005909 5E pop si 0 0000590A 5A pop dx ; restore regs 0 0000590B 59 pop cx 0 0000590C F606[0200]01 testopt [options6], opt6_share_serial_irq 0 00005911 7423 jz .ret 0 00005913 F606[0200]02 testopt [options6], opt6_serial_EOI_call 106 ; Sharing the IRQ means we need to pass along 107 ; the call to the next handler. This enables 108 ; using the same IRQ, eg IRQ #3 for COM2 and 109 ; COM4, by two different applications. 0 00005918 741F jz .chain 0 0000591A E82100 call serial_next_is_iret 0 0000591D 741A je .chain ; already issued EOI --> 0 0000591F 1F pop ds 0 00005920 58 pop ax 0 00005921 9C pushf 0 00005922 0E push cs 0 00005923 E88AFF call serial_interrupt_handler.notours 0 00005926 50 push ax 0 00005927 1E push ds 0 00005928 B020 mov al, 20h ; acknowledge interrupt 0 0000592A 2E803E[0100]00 cmp byte [cs:serial_use_irqmask + 1], 0 0 00005930 7402 je @F 0 00005932 E6A0 out 0A0h, al ; to secondary PIC 124 @@: 0 00005934 E620 out 20h, al ; to primary PIC 126 .ret: 0 00005936 1F pop ds 0 00005937 58 pop ax 0 00005938 CF iret 130 131 .chain: 0 00005939 1F pop ds 0 0000593A 58 pop ax 0 0000593B E972FF jmp serial_interrupt_handler.notours 135 136 137 ; INP: ds = cs => data entry segment 138 ; OUT: ZR if should issue EOI 139 ; NZ if should not issue EOI 140 ; REM: This returns ZR if we aren't sharing 141 ; the IRQ or we are but the next handler 142 ; consists of an iret instruction only. 143 serial_next_is_iret: 0 0000593E 53 push bx 0 0000593F 1E push ds 0 00005940 F606[0200]01 testopt [options6], opt6_share_serial_irq 0 00005945 7407 jz @F ; if not sharing --> (ZR) 0 00005947 C51E[0400] lds bx, [serial_interrupt_handler.next] 0 0000594B 803FCF cmp byte [bx], 0CFh ; iret ? 150 @@: 0 0000594E 1F pop ds 0 0000594F 5B pop bx 153 entry_retn: section_of_function 0 00005950 C3 retn 155 0 00005951 00 align 2, db 0 0 00005952 [C600][CB00][1301] serial_interrupt_table: dw int_modem,int_tx,int_rx,int_status 0 00005958 [6601] 158 159 160 int_modem: 161 ; just clear modem status, we are not interested in it 0 0000595A 83C206 add dx, 6 0 0000595D EC in al, dx ; read MSR 0 0000595E C3 retn 165 166 167 int_tx: 0 0000595F 8B16[0000] mov dx, [baseport] 0 00005963 8B36[0000] mov si, word [txtail] 170 0 00005967 52 push dx 0 00005968 83C205 add dx, 5 0 0000596B EC in al, dx ; (base + 5) read LSR 0 0000596C 5A pop dx 0 0000596D A820 test al, 20h ; Transmitter Holding Register Empty ? 0 0000596F 7421 jz itx_setup_int ; no, it was a spurious interrupt --> 177 ; This conditional detects the condition specified in 178 ; the section "Known problems with several chips": 179 ; When a 1 is written to the bit 1 (Tx int enab) in the 180 ; IER, a Tx interrupt is generated. This is an erroneous 181 ; interrupt if the THRE bit is not set. [So don't set 182 ; this bit as long as the THRE bit isn't set. CB] 183 184 ; check if there's something to be sent 185 %if _USE_TX_FIFO 0 00005971 B90100 mov cx, 1 0 00005974 F606[0000]08 test byte [serial_flags], sf_built_in_fifo 0 00005979 7404 jz @F 0 0000597B 8A0E[0000] mov cl, byte [serial_fifo_size] 190 @@: 191 %endif 192 itx_more: 0 0000597F 3B36[0000] cmp si, word [txhead] 0 00005983 7419 je itx_nothing 0 00005985 AC lodsb 0 00005986 EE out dx, al ; write it to the THR 197 ; check for wrap-around in our fifo 198 tx_checkwrap 0 00005987 81FE[8000] cmp si, txfifo+_TXFIFOSIZE 0 0000598B 7203 jb %%tx_nowrap 0 0000598D BE[0000] mov si, txfifo 244 <1> %%tx_nowrap: 199 %if _USE_TX_FIFO 200 ; send as much bytes as the chip can take when available 0 00005990 E2ED loop itx_more 202 %endif 203 itx_setup_int: 0 00005992 3B36[0000] cmp si, word [txhead] 0 00005996 7406 je itx_nothing 0 00005998 42 inc dx 0 00005999 B003 mov al, 0000_0011b 0 0000599B EE out dx, al ; write to IER 0 0000599C EB04 jmp itx_dontstop 210 itx_nothing: 211 ; no more data in the fifo, so inhibit TX interrupts 0 0000599E 42 inc dx 0 0000599F B001 mov al, 0000_0001b 0 000059A1 EE out dx, al ; write to IER 215 itx_dontstop: 0 000059A2 8936[0000] mov word [txtail], si 0 000059A6 C3 retn 218 219 220 int_rx: 0 000059A7 8B36[0000] mov si, word [rxhead] 222 irx_more: 0 000059AB 8B16[0000] mov dx, [baseport] 0 000059AF EC in al, dx ; read from RBR 0 000059B0 3C03 cmp al, 3 0 000059B2 7511 jne @FF 0 000059B4 F606[0000]02 testopt [serial_flags], sf_ctrl_c 0 000059B9 7405 jz @F 0 000059BB 800E[0000]04 setopt [serial_flags], sf_double_ctrl_c 230 @@: 0 000059C0 800E[0000]02 setopt [serial_flags], sf_ctrl_c 232 @@: 0 000059C5 8804 mov byte [si], al 0 000059C7 89F0 mov ax, si 0 000059C9 46 inc si 236 ; check for wrap-around 237 rx_checkwrap 0 000059CA 81FE[8000] cmp si, rxfifo+_RXFIFOSIZE 0 000059CE 7203 jb %%rx_nowrap 0 000059D0 BE[0000] mov si, rxfifo 237 <1> %%rx_nowrap: 0 000059D3 3936[0000] cmp word [rxtail], si 0 000059D7 7415 je @FF 240 ; see if there are more bytes to be read 0 000059D9 83C205 add dx, 5 0 000059DC EC in al, dx ; read LSR 0 000059DD A801 test al, 1 ; Data Available ? 0 000059DF 75CA jnz irx_more 245 .end: 0 000059E1 8936[0000] mov word [rxhead], si 247 ; test al, 20h ; Transmitter Holding Register Empty ? 248 ; jnz int_tx ; yes, do transmit next --> 249 ; Sometimes when sending and receiving at the 250 ; same time, TX ints get lost. This is a cure. 251 ; retn 0 000059E5 E977FF jmp int_tx ; (this checks for THRE) 253 254 @@: 0 000059E8 8B16[0000] mov dx, [baseport] 0 000059EC EC in al, dx ; read RBR (discard) 0 000059ED A9 db __TEST_IMM16 ; (skip mov) 258 @@: 0 000059EE 89C6 mov si, ax 0 000059F0 83C205 add dx, 5 0 000059F3 EC in al, dx ; read LSR 0 000059F4 A801 test al, 1 ; Data Available ? 0 000059F6 75F0 jnz @BB 0 000059F8 EBE7 jmp .end 265 266 267 int_status: 268 ; just clear the status ("this trivial task is left as an exercise 269 ; to the student") 0 000059FA 83C205 add dx, 5 0 000059FD EC in al, dx ; read LSR 0 000059FE C3 retn 273 274 275 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 275 ------------------ note: usesection lDEBUG_CODE 276 %if _LINK_COMPAT 277 align 2, db 0 278 %endif 279 280 ; OUT: ZR if no new character in buffer 281 ; NZ if new character read, 282 ; al = character 283 ; STT: ds = debugger segment 284 serial_receive_char: 0 0000A570 56 push si 286 ; see if there are bytes to be read from the fifo 0 0000A571 8B36[0000] mov si, word [rxtail] 288 0 0000A575 3B36[0000] cmp si, word [rxhead] 0 0000A579 7412 je .nodata 0 0000A57B AC lodsb 292 %if _ECHO_RX_TO_TX 293 %if _RX_TO_TX_ADD_LF 294 call serial_send_char_add_lf 295 %else 296 call serial_send_char 297 %endif 298 %endif 299 ; check for wrap-around 300 rx_checkwrap 0 0000A57C 81FE[8000] cmp si, rxfifo+_RXFIFOSIZE 0 0000A580 7203 jb %%rx_nowrap 0 0000A582 BE[0000] mov si, rxfifo 237 <1> %%rx_nowrap: 0 0000A585 8936[0000] mov word [rxtail], si 0 0000A589 85F6 test si, si ; (NZ) 0 0000A58B EB02 jmp .return 304 305 .nodata: 0 0000A58D 31C0 xor ax, ax ; (ZR) 307 .return: 0 0000A58F 5E pop si 0 0000A590 C3 retn 310 311 312 ; OUT: ZR if no new character in buffer 313 ; NZ if new character available, 314 ; al = character 315 ; STT: ds = debugger segment 316 serial_check_receive_char: 0 0000A591 56 push si 318 ; see if there are bytes to be read from the fifo 0 0000A592 8B36[0000] mov si, word [rxtail] 320 0 0000A596 3B36[0000] cmp si, word [rxhead] 0 0000A59A 7405 je .nodata 0 0000A59C AC lodsb 0 0000A59D 85F6 test si, si ; (NZ) 0 0000A59F EB02 jmp .return 326 327 .nodata: 0 0000A5A1 31C0 xor ax, ax ; (ZR) 329 .return: 0 0000A5A3 5E pop si 0 0000A5A4 C3 retn 332 333 334 ; OUT: NC if successful 335 ; CY if handler hooked in different interrrupt 336 ; and couldn't unhook 337 serial_install_interrupt_handler: 338 ; install interrupt handler first 0 0000A5A5 A0[0000] mov al, byte [serial_use_intnum] 0 0000A5A8 F606[0000]01 testopt [internalflags4], dif4_int_serial_hooked 0 0000A5AD 740D jz @F 0 0000A5AF 3A06[0000] cmp al, byte [serial_installed_intnum] 0 0000A5B3 7418 je .ret ; --> (NC) 0 0000A5B5 50 push ax 0 0000A5B6 E84A01 call serial_uninstall_interrupt_handler 0 0000A5B9 58 pop ax 0 0000A5BA 7211 jc .ret ; --> (CY) 348 @@: 0 0000A5BC A2[0000] mov byte [serial_installed_intnum], al 0 0000A5BF BE[0200] mov si, serial_interrupt_handler 0 0000A5C2 E8[0000] call install_86m_interrupt_handler 0 0000A5C5 800E[0000]01 setopt [internalflags4], dif4_int_serial_hooked 0 0000A5CA E8[0000] call update_inttab_optional 354 ; (NC) 355 .ret: 0 0000A5CD C3 retn 357 358 359 %if 0 360 361 If you do the following: 362 363 r dspvi FF 364 r dco or= 4000 365 (wait for KEEP prompt to fail) 366 r dspvi 0B 367 r dco or= 4000 368 (try to reply to the KEEP prompt) 369 370 In dosemu2 the default interrupt handler apparently 371 doesn't send an EOI to the PIC and thus the interrupts 372 get stuck when prompting with the correct handler. 373 Therefore, we should send an EOI to the PIC just in case. 374 375 %endif 376 377 ; INP: word [serial_use_irqmask] 378 ; CHG: ax 379 serial_eoi: 0 0000A5CE B020 mov al, 20h ; acknowledge interrupt 0 0000A5D0 803E[0100]00 cmp byte [serial_use_irqmask + 1], 0 0 0000A5D5 7402 je @F 0 0000A5D7 E6A0 out 0A0h, al ; to secondary PIC 384 @@: 0 0000A5D9 E620 out 20h, al ; to primary PIC 0 0000A5DB C3 retn 387 388 389 serial_clear_fifos: 390 ; clear fifos (not those in the 16550A, but ours) 0 0000A5DC B8[0000] mov ax, rxfifo 0 0000A5DF A3[0000] mov word [rxhead], ax 0 0000A5E2 A3[0000] mov word [rxtail], ax 0 0000A5E5 B8[0000] mov ax, txfifo 0 0000A5E8 A3[0000] mov word [txhead], ax 0 0000A5EB A3[0000] mov word [txtail], ax 0 0000A5EE C3 retn 398 399 400 numdef SERIAL_DL_WORD, 0 401 402 serial_init_UART: 0 0000A5EF E8DCFF call serial_eoi 404 ; initialize the UART 0 0000A5F2 8B16[0000] mov dx, [baseport] 0 0000A5F6 83C203 add dx, 3 ; (base + 3) read/write LCR 0 0000A5F9 EC in al, dx ; read LCR 0 0000A5FA A2[0000] mov byte [serial_save_lcr], al 0 0000A5FD B080 mov al, 80h ; DLAB = 1 0 0000A5FF EE out dx, al ; write LCR, make DL register accessible 0 0000A600 52 push dx 0 0000A601 8B16[0000] mov dx, [baseport] ; (base) 413 %if _SERIAL_DL_WORD 414 in ax, dx ; read bps rate divisor (DL) 415 mov word [serial_save_dl], ax 416 mov ax, word [serial_use_dl] 417 out dx, ax ; write bps rate divisor (DL) 418 %else 0 0000A605 EC in al, dx ; read bps rate divisor low byte (DL) 0 0000A606 42 inc dx 0 0000A607 A2[0000] mov byte [serial_save_dl], al 0 0000A60A EC in al, dx ; read bps rate divisor high byte (DL) 0 0000A60B A2[0100] mov byte [serial_save_dl + 1], al 0 0000A60E A0[0100] mov al, byte [serial_use_dl + 1] 0 0000A611 EE out dx, al ; write bps rate divisor high byte (DL) 0 0000A612 4A dec dx 0 0000A613 A0[0000] mov al, byte [serial_use_dl] 0 0000A616 EE out dx, al ; write bps rate divisor low byte (DL) 429 %endif 0 0000A617 5A pop dx ; (base + 3) write LCR 0 0000A618 A0[0000] mov al, byte [serial_use_params] 432 ; DLAB = 0 and control parameters 0 0000A61B EE out dx, al ; write parameters 434 435 ; is it a 16550A? 0 0000A61C 4A dec dx ; (base + 2) write FCR, read IIR 437 %if _USE_TX_FIFO 0 0000A61D B007 mov al, 0000_0111b 0 0000A61F 0A06[0000] or al, byte [serial_use_fifo] 0 0000A623 A2[0000] mov byte [serial_fcr_setting], al 0 0000A626 EE out dx, al ; (write FCR) try to clear and enable FIFOs 0 0000A627 90 nop 0 0000A628 EC in al, dx ; read IIR 0 0000A629 800E[0000]08 or byte [serial_flags], sf_built_in_fifo 445 ; in case of built-in tx FIFO 0 0000A62E 24C0 and al, 1100_0000b ; mask of FIFO functional bits 0 0000A630 3CC0 cmp al, 1100_0000b ; both bits set ? 0 0000A632 740B je @F ; yes --> 0 0000A634 8026[0000]F7 and byte [serial_flags], ~ sf_built_in_fifo 450 ; no built-in tx FIFO 0 0000A639 31C0 xor ax, ax 0 0000A63B A2[0000] mov byte [serial_fcr_setting], al 0 0000A63E EE out dx, al ; (write FCR) disable the FIFOs 454 @@: 455 %else 456 xor ax, ax 457 out dx, al ; (write FCR) disable the FIFOs 458 %endif 0 0000A63F 4A dec dx ; (base + 1) 0 0000A640 EC in al, dx ; read IER 0 0000A641 A2[0000] mov byte [serial_save_ier], al 0 0000A644 B001 mov al, 0000_0001b ; allow RX interrupts 0 0000A646 EE out dx, al ; write to IER 0 0000A647 4A dec dx ; (base + 0) read RBR 0 0000A648 EC in al, dx ; clear receiver 0 0000A649 83C205 add dx, 5 ; (base + 5) read LSR 0 0000A64C EC in al, dx ; clear line status 0 0000A64D 42 inc dx ; (base + 6) read MSR 0 0000A64E EC in al, dx ; clear modem status 470 ; free interrupt in the ICU 0 0000A64F 8B0E[0000] mov cx, word [serial_use_irqmask] 0 0000A653 F7D1 not cx ; negated mask of bits to change 0 0000A655 31DB xor bx, bx ; all bits clear (= IRQ ON) 0 0000A657 E81200 call set_irq 0 0000A65A 891E[0000] mov word [serial_save_irq_off], bx 0 0000A65E 890E[0000] mov word [serial_save_irq_mask], cx 477 ; and enable ints from the UART 0 0000A662 4A dec dx 0 0000A663 4A dec dx ; (base + 4) 0 0000A664 EC in al, dx ; read MCR 0 0000A665 A2[0000] mov byte [serial_save_mcr], al 0 0000A668 B008 mov al, 0000_1000b 0 0000A66A EE out dx, al ; write MCR 0 0000A66B C3 retn 485 486 ; INP: cx = negated mask of bits to change 487 ; (if bit is clear, modify corresponding IRQ) 488 ; bx = mask of what to set bits to (0 = IRQ ON, 1 = IRQ OFF) 489 ; OUT: bx = mask of bits previously set 490 ; CHG: ax 491 set_irq: 0 0000A66C 52 push dx 0 0000A66D BA0100 mov dx, 1 494 .loop: 0 0000A670 85CA test dx, cx 0 0000A672 753E jnz .next 0 0000A674 84D2 test dl, dl 0 0000A676 741E jz .high 499 500 .low: 0 0000A678 E421 in al, 21h ; get PIC configuration 0 0000A67A 50 push ax 0 0000A67B F7D2 not dx ; dx = mask of bits to keep 0 0000A67D 20D0 and al, dl ; mask to 0 the bit to set 0 0000A67F 53 push bx 0 0000A680 F7D2 not dx ; dx = mask of bits to change 0 0000A682 20D3 and bl, dl ; get bit state to change to 0 0000A684 08D8 or al, bl ; set this bit state 0 0000A686 E621 out 21h, al ; configure the PIC 0 0000A688 5B pop bx ; = saved states / still to set states 0 0000A689 F7D2 not dx ; dx = mask of bits to keep 0 0000A68B 58 pop ax ; = prior config 0 0000A68C 20D3 and bl, dl ; clear bits to change 0 0000A68E F7D2 not dx ; dx = mask of bits to change 0 0000A690 20D0 and al, dl ; separate out only bits to change 0 0000A692 08C3 or bl, al ; set in bx 0 0000A694 EB1C jmp .next 518 519 .high: 0 0000A696 E4A1 in al, 0A1h ; get PIC configuration 0 0000A698 50 push ax 0 0000A699 F7D2 not dx ; dx = mask of bits to keep 0 0000A69B 20F0 and al, dh ; mask to 0 the bit to set 0 0000A69D 53 push bx 0 0000A69E F7D2 not dx ; dx = mask of bits to change 0 0000A6A0 20F7 and bh, dh ; get bit state to change to 0 0000A6A2 08F8 or al, bh ; set this bit state 0 0000A6A4 E6A1 out 0A1h, al ; configure the PIC 0 0000A6A6 5B pop bx ; = saved states / still to set states 0 0000A6A7 F7D2 not dx ; dx = mask of bits to keep 0 0000A6A9 58 pop ax ; = prior config 0 0000A6AA 20F7 and bh, dh ; clear bits to change 0 0000A6AC F7D2 not dx ; dx = mask of bits to change 0 0000A6AE 20F0 and al, dh ; separate out only bits to change 0 0000A6B0 08C7 or bh, al ; set in bx 536 537 .next: 0 0000A6B2 01D2 add dx, dx 0 0000A6B4 75BA jnz .loop 0 0000A6B6 5A pop dx 0 0000A6B7 C3 retn 542 543 544 ; OUT: NC if successful 545 ; CY if couldn't unhook 546 serial_clean_up: 0 0000A6B8 E813FF call serial_eoi 0 0000A6BB 31C0 xor ax, ax 0 0000A6BD 8B16[0000] mov dx, [baseport] 0 0000A6C1 83C204 add dx, 4 ; (base + 4) 551 ; disconnect the UART from the int line 0 0000A6C4 EE out dx, al ; write MCR 0 0000A6C5 4A dec dx 0 0000A6C6 4A dec dx 0 0000A6C7 4A dec dx ; (base + 1) disable UART ints 0 0000A6C8 EE out dx, al ; write IER 0 0000A6C9 42 inc dx ; (base + 2) 558 ; disable the FIFOs (old software relies on it) 0 0000A6CA EE out dx, al ; write FCR 560 561 ; reset the UART 0 0000A6CB 8B16[0000] mov dx, [baseport] 0 0000A6CF 83C203 add dx, 3 ; (base + 3) read/write LCR 0 0000A6D2 B080 mov al, 80h ; DLAB = 1 0 0000A6D4 EE out dx, al ; write LCR, make DL register accessible 0 0000A6D5 52 push dx 0 0000A6D6 8B16[0000] mov dx, [baseport] ; (base) 568 %if _SERIAL_DL_WORD 569 mov ax, word [serial_save_dl] 570 out dx, ax ; write bps rate divisor (DL) 571 %else 0 0000A6DA A0[0000] mov al, byte [serial_save_dl] 0 0000A6DD EE out dx, al ; write bps rate divisor low byte (DL) 0 0000A6DE 42 inc dx 0 0000A6DF A0[0100] mov al, byte [serial_save_dl + 1] 0 0000A6E2 EE out dx, al ; write bps rate divisor high byte (DL) 577 %endif 0 0000A6E3 5A pop dx ; (base + 3) write LCR 0 0000A6E4 A0[0000] mov al, byte [serial_save_lcr] 0 0000A6E7 EE out dx, al ; write parameters 581 0 0000A6E8 4A dec dx ; (base + 2) write FCR, read IIR 0 0000A6E9 31C0 xor ax, ax 0 0000A6EB EE out dx, al ; (write FCR) disable the FIFOs 0 0000A6EC 4A dec dx ; (base + 1) 0 0000A6ED A0[0000] mov al, byte [serial_save_ier] 0 0000A6F0 EE out dx, al ; write to IER 0 0000A6F1 8B1E[0000] mov bx, [serial_save_irq_off] 589 ; bits clear for IRQ ON 0 0000A6F5 8B0E[0000] mov cx, [serial_save_irq_mask] 591 ; negated mask of bits to change 0 0000A6F9 E870FF call set_irq 0 0000A6FC 42 inc dx 0 0000A6FD 42 inc dx 0 0000A6FE 42 inc dx ; (base + 4) 0 0000A6FF A0[0000] mov al, byte [serial_save_mcr] 0 0000A702 EE out dx, al ; write MCR 598 599 ; restore int vector 600 ; OUT: NC if successful 601 ; CY if couldn't unhook 602 serial_uninstall_interrupt_handler: 0 0000A703 BE[0200] mov si, serial_interrupt_handler 0 0000A706 A0[0000] mov al, byte [serial_installed_intnum] 0 0000A709 BA0100 mov dx, opt4_int_serial_force >> 16 0 0000A70C E8[0000] call UnhookInterruptForce 0 0000A70F 7208 jc @F 0 0000A711 8026[0000]FE clropt [internalflags4], dif4_int_serial_hooked 0 0000A716 E8[0000] call update_inttab_optional 610 ; (NC) 611 @@: 0 0000A719 C3 retn 613 614 615 serial_send_char_add_lf: 0 0000A71A 50 push ax 617 .loop: 0 0000A71B E80800 call serial_send_char 0 0000A71E 3C0D cmp al, 13 ; add LF after CR; change it if you don't like it 0 0000A720 B00A mov al, 10 0 0000A722 74F7 je .loop 0 0000A724 58 pop ax 0 0000A725 C3 retn 624 625 serial_send_char: 0 0000A726 56 push si 0 0000A727 51 push cx 0 0000A728 52 push dx 0 0000A729 06 push es 630 0 0000A72A 8B36[0000] mov si, word [txhead] 0 0000A72E 8804 mov byte [si],al 0 0000A730 46 inc si 634 ; check for wrap-around 635 tx_checkwrap 0 0000A731 81FE[8000] cmp si, txfifo+_TXFIFOSIZE 0 0000A735 7203 jb %%tx_nowrap 0 0000A737 BE[0000] mov si, txfifo 244 <1> %%tx_nowrap: 636 0 0000A73A 50 push ax 638 %if _PM 639 push ax 640 call push_if 641 %else 0 0000A73B 9C pushf 643 %endif 0 0000A73C 3936[0000] cmp word [txtail], si 0 0000A740 7558 jne .no_wait 646 647 ; Because we enable the tx empty interrupt 648 ; when putting data into the buffer, it 649 ; should still be enabled here when the 650 ; buffer is currently full. So we only 651 ; need to wait for the interrupt to 652 ; occur and be processed by our handler. 653 0 0000A742 31C9 xor cx, cx 0 0000A744 BA4000 mov dx, 40h ; 0040h is a bimodal segment/selector 0 0000A747 8EC2 mov es, dx 657 .wait_reset_dx: 0 0000A749 268B166C00 mov dx, word [es:6Ch] 659 660 .wait: 0 0000A74E E8[0000] call idle 662 %if _PM 663 call pop_if 664 push ax 665 call push_if 666 %else 0 0000A751 9D popf 0 0000A752 9C pushf 669 %endif 670 0 0000A753 3B36[0000] cmp si, word [txtail] 0 0000A757 7541 jne .no_wait 673 674 %if _SLEEP_NEW 0 0000A759 26A16C00 mov ax, word [es:6Ch] 0 0000A75D 39C2 cmp dx, ax 0 0000A75F 74ED je .wait 0 0000A761 F7DA neg dx ; minus prior tick 0 0000A763 01C2 add dx, ax ; new tick - prior tick 680 0 0000A765 3B16[0000] cmp dx, word [sleep_delta_limit] 0 0000A769 7609 jbe @F 0 0000A76B 8B16[0000] mov dx, word [sleep_delta_limit] 0 0000A76F 85D2 test dx, dx 0 0000A771 7501 jnz @F 0 0000A773 42 inc dx ; limit 0 would lead to stagnant sleep 687 @@: 0 0000A774 3B16[0000] cmp dx, word [sleep_highest_delta] 0 0000A778 7604 jbe @F 0 0000A77A 8916[0000] mov word [sleep_highest_delta], dx 691 @@: 0 0000A77E 01D1 add cx, dx 0 0000A780 7205 jc @F 694 %else 695 cmp dx, word [es:6Ch] 696 je .wait 697 inc cx 698 %endif 0 0000A782 83F95A cmp cx, 5 * 18 0 0000A785 72C2 jb .wait_reset_dx 701 @@: 702 703 ; Immediately disable use of serial I/O. 0 0000A787 8026[0000]EF clropt [serial_flags], sf_use_serial 0 0000A78C 8026[0100]BF clropt [options], enable_serial 0 0000A791 BA[0000] mov dx, msg.no_progress 0 0000A794 E8[0000] call putsz 0 0000A797 E9[0000] jmp cmd3 709 710 .no_wait: 0 0000A79A 8936[0000] mov word [txhead], si 0 0000A79E FA cli ; try to avoid interrupt while emptying buffer 713 ; test if we can send a byte right away 714 %if 0 ; int_tx checks for THRE ...- 715 mov dx, [baseport] 716 add dx, 5 ; (base + 5) 717 in al, dx ; read LSR 718 test al, 20h ; Transmitter Holding Register Empty ? 719 jz .crank ; no, just enable the interrupt --> 720 %endif 721 722 ; call int_tx ; send bytes, enables or disables the tx interrupt 0 0000A79F 0E push cs 0 0000A7A0 E80700 call code_to_int_tx 725 726 %if 0 ; -... and sets up the interrupt accordingly 727 jmp .dontcrank 728 .crank: 729 ; crank it up 730 ; note that this might not work with some very old 8250s 731 add dx, 1 - 5 ; (base + 1) write IER 732 mov al, 0000_0011b 733 out dx, al ; enable tx empty interrupt 734 .dontcrank: 735 %endif 736 %if _PM 737 call pop_if 738 %else 0 0000A7A3 9D popf 740 %endif 0 0000A7A4 58 pop ax 0 0000A7A5 07 pop es 0 0000A7A6 5A pop dx 0 0000A7A7 59 pop cx 0 0000A7A8 5E pop si 0 0000A7A9 C3 retn 747 748 %if _PM 749 push_if: 750 lframe near 751 lpar word, flags 752 lpar_return 753 lenter 754 call ispm 755 jnz .86m 756 .pm: 757 push ax 758 mov ax, 0902h 759 int 31h 760 test al, al ; 0 = disabled ? 761 mov ax, 0 ; initialise to IF=0 762 jz @F 763 mov ah, 2 ; else, IF=1 764 @@: 765 mov word [bp + ?flags], ax 766 pop ax 767 jmp .end 768 .86m: 769 pushf 770 pop word [bp + ?flags] 771 .end: 772 lleave 773 lret 774 775 pop_if: 776 lframe near 777 lpar word, flags 778 lenter 779 call ispm 780 jnz .86m 781 push ax 782 mov ax, 0900h ; initialise to disable VIF = 0900h 783 test byte [bp + ?flags + 1], 2 784 jz @F ; if to disable --> 785 inc ax ; else enable VIF = 0901h 786 @@: 787 int 31h 788 pop ax 789 jmp .end 790 .86m: 791 push word [bp + ?flags] 792 popf 793 .end: 794 lleave 795 lret 796 %endif 797 798 code_to_int_tx: 0 0000A7AA 2EFF36[4802] push word [cs:.entry_retf_word] 800 %if _PM 801 ; near return address 802 call ispm 803 jnz .rm 804 805 push word [cssel] 806 jmp @F 807 808 %endif 809 .rm: 0 0000A7AF 16 push ss 811 @@: 0 0000A7B0 2EFF36[4602] push word [cs:.int_tx_word] 0 0000A7B5 CB retf ; jump to lDEBUG_DATA_ENTRY:int_tx 814 815 align 2, db 0 816 .int_tx_word: 0 0000A7B6 [CB00] dw int_tx 818 .entry_retf_word: 0 0000A7B8 [6C01] dw entry_retf 820 821 822 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 822 ------------------ note: usesection lDEBUG_DATA_ENTRY 823 824 entry_int3_retf: 0 000059FF CC int3 826 entry_retf: 0 00005A00 CB retf === Trace listing source: ../lst/debug.obj/ss.lst 1 2 %if 0 3 4 lDebug S commands (search, sleep) 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 "ss.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00005A02 ???????? eldhSignature: resb 4 ; "ELD1" 0 00005A06 ?????? resb 3 ; reserved 0 00005A09 ?? resb 1 ; 26 (Ctrl-Z) 0 00005A0A ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00005A0E ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00005A10 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00005A12 ???????? eldhDataOffset: resd 1 0 00005A16 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00005A18 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00005A1A ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00005A1C ???????? eldhReserved: resb 4 ; reserved 0 00005A20 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00005A22 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00005A26 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00005A2A ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00005A2E ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00005A02 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00005A0A ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00005A0E ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00005A10 ???? 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 0 00005A02 ???? 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 0 00005A04 ???? eldltAmount: resw 1 0 00005A06 ???????? 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 0 00005A02 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00005A04 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00005A06 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00005A08 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00005A0A ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00005A12 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00005A02 ???? eldlSignature: resw 1 ; 0E1D1h 0 00005A04 ???????? eldlReserved: resw 2 0 00005A08 ???? eldlUseLinkHash: resw 1 0 00005A0A ???? eldlDataAmount: resw 1 0 00005A0C ???? eldlDataPrefixes: resw 1 0 00005A0E ???? eldlDataEntries: resw 1 0 00005A10 ???? eldlDataAddresses: resw 1 0 00005A12 ???? eldlCodeAmount: resw 1 0 00005A14 ???? eldlCodePrefixes: resw 1 0 00005A16 ???? eldlCodeEntries: resw 1 0 00005A18 ???? 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 0 00005A02 ???? ifKeyword: resw 1 0 00005A04 ???? ifDescription: resw 1 0 00005A06 ???? ifOptions: resw 1 0 00005A08 ???? ifValue: resw 1 0 00005A0A ???? ifTrying: resw 1 0 00005A0C ???? 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 0 00005A02 ???????? saOffset: resd 1 0 00005A06 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00005A02 ???? so16aOffset: resw 1 0 00005A04 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00005A02 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00005A02 ?????? bsJump: resb 3 0 00005A05 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00005A02 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00005A04 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00005A05 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00005A07 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00005A08 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 00005A0A ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 00005A0C ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 00005A0D ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00005A0F ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00005A11 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00005A13 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00005A17 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 00005A1B ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00005A1F ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00005A21 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00005A23 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00005A27 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 00005A29 ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00005A02 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00005A03 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00005A04 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00005A05 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00005A14 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00005A02 ???????????????? deName: resb 8 0 00005A0A ?????? deExt: resb 3 0 00005A0D ?? deAttrib: resb 1 0 00005A0E ?? dePlusSize: resb 1 0 00005A0F ?????????????? resb 7 0 00005A16 ???? deClusterHigh: resw 1 0 00005A18 ???? deTime: resw 1 0 00005A1A ???? deDate: resw 1 0 00005A1C ???? deClusterLow: resw 1 0 00005A1E ???????? 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 0 1000059F2 ???????? lsvFirstCluster: resd 1 0 1000059F6 ???????? lsvFATSector: resd 1 0 1000059FA ???? lsvFATSeg: resw 1 0 1000059FC ???? lsvLoadSeg: resw 1 0 1000059FE ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 1000059E2 ???? ldMemoryTop: resw 1 0 1000059E4 ???? ldLoadTop: resw 1 0 1000059E6 ???? ldSectorSeg: resw 1 0 1000059E8 ?? ldFATType: resb 1 92 <2> ldFlags: 0 1000059E9 ?? ldHasLBA: resb 1 0 1000059EA ???? ldClusterSize: resw 1 0 1000059EC ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 1000059EE ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 1000059F0 ?? .partition: resb 1 ; byte 0 1000059F1 ?? .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 <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 0 1000059D2 ???????? ldRootSector: resd 1 0 1000059D6 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 1000059D8 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 1000059DA ???? ldParasLeft: resw 1 0 1000059DC ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000059C2 ???????? ldMaxCluster: resd 1 0 1000059C6 ???????? ldFileSize: resd 1 0 1000059CA ???????? ldCurrentCluster: resd 1 0 1000059CE ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00005A02 ???????? liiSignature: resb 4 ; "NLDR" 0 00005A06 ???? liiVersion: resb 2 ; "00" 0 00005A08 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 00005A0A ???? liiAmountParagraphs: resw 1 0 00005A0C ???????????? liiReserved: resw 3 0 00005A12 ???? 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 0 00005A14 ???? 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 0 00005A16 ???? 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 0 00005A18 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00005A02 ???? lpSize: resw 1 0 00005A04 ???? lpCount: resw 1 0 00005A06 ???????? lpBuffer: resd 1 0 00005A0A ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00005A02 ?? piBoot: resb 1 0 00005A03 ?????? piStartCHS: resb 3 0 00005A06 ?? piType: resb 1 0 00005A07 ?????? piEndCHS: resb 3 0 00005A0A ???????? piStart: resd 1 0 00005A0E ???????? 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 0 00005A02 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00005A04 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00005A06 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00005A08 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 00005A0A ???? lsOptions: resw 1 ; option flags 0 00005A0C ???? lsSegment: resw 1 ; => where to load file 0 00005A0E ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00005A12 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00005A16 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00005A18 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 00005A1A ???????????????? 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 0 00005A02 ???? exact_struc_at 00h, exeSignature: resw 1 0 00005A04 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00005A06 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00005A08 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 00005A0A ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 00005A0C ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00005A0E ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00005A10 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00005A12 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00005A14 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00005A16 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00005A18 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 00005A1A ???? 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. 0 00005A1C ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00005A02 ???? ifhHandle: resw 1 0 00005A04 ???? ifhFlags: resw 1 0 00005A06 ???????? 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 <1> areastrucEntry: resb 24 0 00005A1A ???????? areastrucNext: resd 1 0 00005A1E ???????? areastrucPrev: resd 1 0 00005A22 ???? areastrucSubAmount: resw 1 0 00005A24 ???? areastrucSubOffset: resw 1 0 00005A26 ???? areastrucFunAmount: resw 1 0 00005A28 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00005A02 ???????? areastrucsubLinear: resd 1 0 00005A06 ???????? areastrucsubLinearEnd: resd 1 0 00005A0A ???? areastrucsubListOffset: resw 1 0 00005A0C ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00005A02 ???????? areastrucfunLinear: resd 1 0 00005A06 ???????? areastrucfunLinearEnd: resd 1 0 00005A0A ???? areastrucfunListOffset: resw 1 0 00005A0C ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00005A02 ???? areastart: resw 1 0 00005A04 ???? areaend: resw 1 0 00005A06 ???? areamessage: resw 1 0 00005A08 ???? 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 0 00005A02 ???? 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.) 0 00005A04 ???? ivFlags: resw 1 0 00005A06 ???? 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. 0 00005A08 ???? 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 0 00005A0A ?? 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. 0 00005A0B ?? 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 0 00005A02 ???????? mrLinear: resd 1 0 00005A06 ???????? mrOffset: resd 1 0 00005A0A ???? mrSegmentSelector: resw 1 0 00005A0C ???? mrFlags: resw 1 0 00005A0E ???????? 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 0 00005A02 ???????? .size_: resd 1 0 00005A06 ???? .srchdl: resw 1 0 00005A08 ???????? .srcadr: resd 1 0 00005A0C ???? .dsthdl: resw 1 0 00005A0E ???????? .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 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 23 ------------------ note: usesection lDEBUG_CODE 24 25 sleepcmd: 0 0000A7BA E8[0000] call skipcomma 0 0000A7BD E8[0000] nearcall getdword 0 0000A7C0 53 push bx 0 0000A7C1 52 push dx 0 0000A7C2 E8[0000] call skipwh0 0 0000A7C5 E8[0000] call iseol? 0 0000A7C8 7421 je .seconds 0 0000A7CA 4E dec si 0 0000A7CB BA[0000] mov dx, msg.seconds 0 0000A7CE E8[0000] call isstring? 0 0000A7D1 7414 je .seconds_check_eol 0 0000A7D3 BA[0000] mov dx, msg.ticks 0 0000A7D6 E8[0000] call isstring? 39 .error_NZ: 0 0000A7D9 7403E9[0000] jne error 41 .ticks_check_eol: 0 0000A7DE AC lodsb 0 0000A7DF E8[0000] call chkeol 44 0 0000A7E2 B80100 mov ax, 1 0 0000A7E5 EB07 jmp .common 47 48 .seconds_check_eol: 0 0000A7E7 AC lodsb 0 0000A7E8 E8[0000] call chkeol 51 .seconds: 0 0000A7EB B81200 mov ax, 18 53 .common: 0 0000A7EE 5A pop dx 0 0000A7EF 50 push ax 0 0000A7F0 F7E2 mul dx ; dx:ax = low word times multiplier 0 0000A7F2 89D3 mov bx, dx 0 0000A7F4 89C1 mov cx, ax ; bx:cx = low word times multiplier 0 0000A7F6 58 pop ax 0 0000A7F7 5A pop dx 0 0000A7F8 F7E2 mul dx ; dx:ax = high word times multiplier 0 0000A7FA 01C3 add bx, ax 0 0000A7FC 83D200 adc dx, 0 ; dx:bx:cx = entire result 0 0000A7FF 75D8 jnz .error_NZ 65 0 0000A801 85C9 test cx, cx 0 0000A803 7504 jnz @F 0 0000A805 85DB test bx, bx 0 0000A807 745E jz .end 70 @@: 71 0 0000A809 B84000 mov ax, 40h ; bimodal segment/selector 0 0000A80C 8EC0 mov es, ax 74 .loop_reset: 0 0000A80E 268B166C00 mov dx, word [es:6Ch] 76 .loop: 0 0000A813 263B166C00 cmp dx, word [es:6Ch] 0 0000A818 7520 jne .next 0 0000A81A E8[0000] call handle_serial_flags_ctrl_c 0 0000A81D F606[0300]40 testopt [options3], opt3_check_ctrlc_0bh 0 0000A822 7509 jnz @F ; already called function 0Bh --> 0 0000A824 E8[0000] call InDOS 0 0000A827 7504 jnz @F 0 0000A829 B40B mov ah, 0Bh 85 doscall ; allow to break with Ctrl-C 0 0000A82B CD21 int 21h 86 @@: 87 %if _SLEEP_NEW 0 0000A82D 8B3E[0000] mov di, word [sleep_repeat_idle] 0 0000A831 47 inc di 90 @@: 0 0000A832 E8[0000] call idle 0 0000A835 4F dec di 0 0000A836 75FA jnz @B 94 %else 95 call idle 96 %endif 0 0000A838 EBD9 jmp .loop 98 99 .next: 100 %if _SLEEP_NEW 0 0000A83A F7DA neg dx ; minus prior tick 0 0000A83C 2603166C00 add dx, word [es:6Ch] ; new tick - prior tick 103 0 0000A841 3B16[0000] cmp dx, word [sleep_delta_limit] 0 0000A845 7609 jbe @F 0 0000A847 8B16[0000] mov dx, word [sleep_delta_limit] 0 0000A84B 85D2 test dx, dx 0 0000A84D 7501 jnz @F 0 0000A84F 42 inc dx ; limit 0 would lead to stagnant sleep 110 @@: 0 0000A850 3B16[0000] cmp dx, word [sleep_highest_delta] 0 0000A854 7604 jbe @F 0 0000A856 8916[0000] mov word [sleep_highest_delta], dx 114 @@: 0 0000A85A 29D1 sub cx, dx 0 0000A85C 83DB00 sbb bx, 0 0 0000A85F 7206 jc .end 118 %else 119 sub cx, 1 120 sbb bx, 0 121 %endif 0 0000A861 75AB jnz .loop_reset 0 0000A863 E302 jcxz .end 0 0000A865 EBA7 jmp .loop_reset 125 126 .end: 0 0000A867 C3 retn 128 129 130 %imacro extcall 1-2.nolist 131 nearcall %1 132 %endmacro 133 %define extcallcall nearcall 134 %imacro internalcoderelocation 0-*.nolist 135 %endmacro 136 %imacro internaldatarelocation 0-*.nolist 137 %endmacro 138 %imacro linkdatarelocation 0-*.nolist 139 %endmacro 140 %define relocated(address) address 141 %define reloc 142 %define reloc2 143 %assign ELD 0 144 145 %include "ssshared.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug S commands (search, sleep) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2025 E. C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_CODE 18 ------------------ <1> note: usesection lDEBUG_CODE 19 <1> 20 <1> ..@sss_access_start: 21 <1> 22 <1> ; S command - search for a string of bytes. 23 <1> sss: 24 <1> %ifn ELD 0 0000A868 4E dec si 0 0000A869 4E dec si ; -> at 'S' 0 0000A86A BA[0000] mov dx, msg.sleep 0 0000A86D E8[0000] call isstring? ; check for "SLEEP" 0 0000A870 7503E945FF je sleepcmd 0 0000A875 46 inc si ; skip 'S' 0 0000A876 AC lodsb ; load next 32 <1> %endif 33 <1> 34 <1> %if _LOADER 35 <1> jmp error 36 <1> %else 37 <1> %if _SREVERSE 0 0000A877 8026[0300]7F reloc clropt [relocated(internalflags3)], dif3_sss_is_reverse 39 <1> linkdatarelocation internalflags3, -3 40 <1> %endif 41 <1> 0 0000A87C 8B1E[0000] reloc mov bx, word [relocated(reg_ds)] ; get search range 43 <1> linkdatarelocation reg_ds 44 <1> _386_PM_o32 ; xor ecx, ecx 0 0000A880 31C9 xor cx, cx 0 0000A882 E8[0000] extcallcall getrangeX ; get address range into BX:(E)DX..BX:(E)CX 0 0000A885 E8[0000] extcallcall skipcomm0 48 <1> _386_PM_o32 ; push edx 0 0000A888 52 push dx 50 <1> _386_PM_o32 ; push ecx 0 0000A889 51 push cx 0 0000A88A 53 push bx 53 <1> 0 0000A88B C606[0000]00 reloc mov byte [relocated(sss_silent_count_used)], 0 55 <1> linkdatarelocation sss_silent_count_used, -3 56 <1> %if ELD 57 <1> reloc mov byte [tagbuffer], 0 ; clear caps and wild flags for scasb 58 <1> internaldatarelocation -3 59 <1> reloc mov byte [sss_range_used], 0 60 <1> internaldatarelocation -3 61 <1> reloc2 mov word [sss_repe_cmpsb_for_range], do_repe_cmpsb 62 <1> internaldatarelocation -4 63 <1> internalcoderelocation 64 <1> %endif 65 <1> 66 <1> %if _SREVERSE 0 0000A890 BA[0000] reloc mov dx, msg.reverse 68 <1> internaldatarelocation 0 0000A893 4E dec si 0 0000A894 E8[0000] extcallcall isstring? 0 0000A897 7509 jne @F 72 <1> 0 0000A899 800E[0300]80 reloc setopt [relocated(internalflags3)], dif3_sss_is_reverse 74 <1> linkdatarelocation internalflags3, -3 0 0000A89E E8[0000] extcallcall skipcomma 0 0000A8A1 4E dec si 77 <1> @@: 78 <1> %else 79 <1> dec si 80 <1> %endif 81 <1> 0 0000A8A2 BA[0000] reloc mov dx, msg.silent 83 <1> internaldatarelocation 0 0000A8A5 E8[0000] extcallcall isstring? 0 0000A8A8 7516 jne @F 0 0000A8AA E8[0000] extcallcall skipequals 0 0000A8AD E8[0000] extcallcall getdword 0 0000A8B0 8916[0000] reloc mov word [relocated(sss_silent_count)], dx 89 <1> linkdatarelocation sss_silent_count 0 0000A8B4 891E[0200] reloc mov word [relocated(sss_silent_count) + 2], bx 91 <1> linkdatarelocation sss_silent_count 0 0000A8B8 F616[0000] reloc not byte [relocated(sss_silent_count_used)] 93 <1> linkdatarelocation sss_silent_count_used 0 0000A8BC E8[0000] extcallcall skipcomm0 0 0000A8BF 4E dec si 96 <1> @@: 97 <1> 0 0000A8C0 BA[0000] reloc mov dx, msg.range 99 <1> internaldatarelocation 0 0000A8C3 E8[0000] extcallcall isstring? 0 0000A8C6 AC lodsb 0 0000A8C7 7513 jne .notrange 103 <1> 104 <1> %if ELD 105 <1> extcallcall skipcomm0 106 <1> dec si 107 <1> reloc mov dx, msg.caps 108 <1> internaldatarelocation 109 <1> extcallcall isstring? 110 <1> lodsb 111 <1> jne .notrangecaps 112 <1> extcallcall skipcomm0 113 <1> 114 <1> reloc or byte [tagbuffer], 2 ; set caps flag for scasb 115 <1> internaldatarelocation -3 116 <1> reloc2 mov word [sss_repe_cmpsb_for_range], do_repe_cmpsb_caps 117 <1> internaldatarelocation -4 118 <1> internalcoderelocation 119 <1> .notrangecaps: 120 <1> %endif 121 <1> 0 0000A8C9 8B1E[0000] reloc mov bx, word [relocated(reg_ds)] ; get search range 123 <1> linkdatarelocation reg_ds 0 0000A8CD 31C9 xor cx, cx 0 0000A8CF E8[0000] extcallcall getrangeX ; try to get second range 0 0000A8D2 56 push si 0 0000A8D3 E8[0000] extcallcall chkeol ; and insure end-of-line 128 <1> ; successful if it returned 129 <1> _386_PM_o32 ; mov esi, edx 0 0000A8D6 89D6 mov si, dx ; bx:esi-> source string 131 <1> _386_PM_o32 ; sub ecx, edx 0 0000A8D8 29D1 sub cx, dx ; ecx = count - 1 133 <1> %if ELD 134 <1> reloc not byte [sss_range_used] 135 <1> internaldatarelocation 136 <1> %endif 0 0000A8DA EB34 jmp short .setesedi 138 <1> 139 <1> .notrange: 140 <1> %if ELD 141 <1> call getstr_sss ; get string of bytes 142 <1> %else 0 0000A8DC E8[0000] nearcall getstr 144 <1> %endif 0 0000A8DF 56 push si 0 0000A8E0 81EF[0000] reloc sub di, strict word relocated(line_out) 147 <1> ; di = number of bytes to look for 148 <1> linkdatarelocation line_out 0 0000A8E4 7503E9[0000] jz error 0 0000A8E9 89F9 mov cx, di 0 0000A8EB 4F dec di ; minus one 0 0000A8EC BE[0000] reloc mov si, relocated(line_out) 153 <1> linkdatarelocation line_out 0 0000A8EF 57 push di 155 <1> 156 <1> %if _SWHILEBUFFER && ! ELD 157 <1> %if _WHILEBUFFSIZE < 264 158 <1> %error WHILE buffer not large enough for search pattern 159 <1> %endif 0 0000A8F0 F606[0300]04 testopt [internalflags], tt_while 0 0000A8F5 7509 jnz .use_auxbuff 0 0000A8F7 BF[0000] mov di, while_buffer 0 0000A8FA 57 push di 0 0000A8FB F3A4 rep movsb 0 0000A8FD 5E pop si 166 <1> _386_PM movzx esi, si 0 0000A8FE EB0D jmp .use_whilebuffer 168 <1> %endif 169 <1> 170 <1> %if 1 && ELD 171 <1> cmp cx, patternbuffer.size 172 <1> ja error 173 <1> reloc mov di, patternbuffer 174 <1> internaldatarelocation 175 <1> push di 176 <1> rep movsb 177 <1> pop si 178 <1> _386_PM movzx esi, si 179 <1> ; jmp .use_whilebuffer 180 <1> %else 181 <1> .use_auxbuff: 0 0000A900 E8[0000] extcallcall guard_auxbuff 0 0000A903 8E06[0000] reloc mov es, word [relocated(auxbuff_segorsel)] 184 <1> linkdatarelocation auxbuff_segorsel 0 0000A907 31FF xor di, di 0 0000A909 F3A4 rep movsb ; move to auxbuff 187 <1> _386_PM_o32 ; xor esi, esi 0 0000A90B 31F6 xor si, si 189 <1> %endif 190 <1> .use_whilebuffer: 0 0000A90D 8CC3 mov bx, es ; bx:esi -> auxbuff 0 0000A90F 59 pop cx 193 <1> _386_PM movzx ecx, cx ; ecx = count - 1 194 <1> .setesedi: 195 <1> %if _SCOUNT || ELD 0 0000A910 53 push bx 0 0000A911 E8[0000] extcall count_store, optional 0 0000A914 5B pop bx 199 <1> %endif 0 0000A915 16 push ss 0 0000A916 07 pop es 0 0000A917 BF[0000] reloc mov di, relocated(search_results) 203 <1> linkdatarelocation search_results 0 0000A91A 51 push cx 205 <1> %if ELD 206 <1> houdini 207 <1> reloc mov cx, relocated(search_results_amount) 208 <1> linkdatarelocation search_results_amount 209 <1> reloc mov ax, relocated(0) 210 <1> linkdatarelocation build_option_PM 211 <1> test ax, ax 212 <1> jz @F 213 <1> mov ax, cx 214 <1> @@: 215 <1> add cx, cx ; times 2 216 <1> add cx, ax ; PM: times 3, else: times 2 217 <1> %elif _PM 218 <1> mov cx, (6 * search_results_amount) >> 1 219 <1> %else 0 0000A91B B92000 mov cx, (4 * search_results_amount) >> 1 221 <1> %endif 0 0000A91E 31C0 xor ax, ax 0 0000A920 A3[0000] reloc mov word [relocated(sscounter)], ax 224 <1> linkdatarelocation sscounter 0 0000A923 A3[0200] reloc mov word [relocated(sscounter) + 2], ax 226 <1> linkdatarelocation sscounter 0 0000A926 F3AB rep stosw 0 0000A928 59 pop cx 229 <1> 230 <1> %if ELD 231 <1> reloc test byte [tagbuffer + 0], 3 232 <1> internaldatarelocation -3 233 <1> jz .simple 234 <1> .difficult: 235 <1> reloc mov ax, difficult_scasb 236 <1> internalcoderelocation 237 <1> reloc mov di, difficult_repne_scasb 238 <1> internalcoderelocation 239 <1> jmp @F 240 <1> 241 <1> .simple: 242 <1> reloc mov ax, do_scasb 243 <1> internalcoderelocation 244 <1> reloc mov di, do_repne_scasb 245 <1> internalcoderelocation 246 <1> @@: 247 <1> reloc mov word [sss_scasb], ax 248 <1> internaldatarelocation 249 <1> reloc mov word [sss_repne_scasb], di 250 <1> internaldatarelocation 251 <1> 252 <1> reloc rol byte [sss_range_used], 1 253 <1> internaldatarelocation 254 <1> jc .simple_match 255 <1> xor ax, ax 256 <1> reloc mov di, tagbuffer 257 <1> internaldatarelocation 258 <1> push cx 259 <1> mov cx, words(tagbuffer.size) 260 <1> repe scasw 261 <1> pop cx 262 <1> je .simple_match 263 <1> 264 <1> .difficult_match: 265 <1> reloc2 mov word [sss_repe_cmpsb], difficult_repe_cmpsb 266 <1> internaldatarelocation -4 267 <1> internalcoderelocation 268 <1> jmp @F 269 <1> 270 <1> .simple_match: 271 <1> reloc mov ax, word [sss_repe_cmpsb_for_range] 272 <1> internaldatarelocation 273 <1> reloc mov word [sss_repe_cmpsb], ax 274 <1> internaldatarelocation 275 <1> @@: 276 <1> %endif 0 0000A929 E8[0000] extcall prephack ; set up for the interrupt vector hack 0 0000A92C E8[0000] extcallcall dohack 0 0000A92F 8EDB mov ds, bx 0 0000A931 5F pop di ; original si 0 0000A932 07 pop es 282 <1> %if ELD 283 <1> reloc mov ax, relocated(0) 284 <1> linkdatarelocation build_option_PM 285 <1> test ax, ax 286 <1> jz @F 287 <1> %endif 288 <1> _386_PM_jmpn .386init ; 386 --> 289 <1> @@: 290 <1> .init: 291 <1> %if ELD 292 <1> _386_PM_o32 ; pop ebx 293 <1> pop bx 294 <1> _386_PM_o32 ; pop edx 295 <1> pop dx 296 <1> %else 0 0000A933 5B pop bx 0 0000A934 5A pop dx 299 <1> %endif 300 <1> .init_popped: 0 0000A935 29D3 sub bx, dx ; bx = number of bytes in search range minus one 0 0000A937 29CB sub bx, cx ; = number of possible positions of string minus 1 0 0000A939 7303E93401 jb .error_unhack_di 0 0000A93E 89D7 mov di, dx 0 0000A940 89CA mov dx, cx 0 0000A942 89D9 mov cx, bx 307 <1> 308 <1> ; ds:si-> search string, length (dx+1) 309 <1> ; es:di-> data to search in, (cx+1) bytes 310 <1> %if _SREVERSE 0 0000A944 36F606[0300]80 reloc testopt [ss:relocated(internalflags3)], dif3_sss_is_reverse 312 <1> linkdatarelocation internalflags3, -3 0 0000A94A 7516 jnz .reverse 314 <1> %endif 315 <1> .loop: 0 0000A94C 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 0 0000A94E 56 push si 0 0000A94F AC lodsb ; first character in al 319 <1> %if ELD 320 <1> _386_PM clc 321 <1> reloc call near [ss:sss_repne_scasb] 322 <1> internaldatarelocation 323 <1> %else 0 0000A950 F2AE repne scasb ; look for first byte 325 <1> %endif 0 0000A952 7408 je .foundbyte 327 <1> %if ELD 328 <1> _386_PM clc 329 <1> reloc call near [ss:sss_scasb] 330 <1> internaldatarelocation 331 <1> %else 0 0000A954 AE scasb ; count in cx was cnt-1 333 <1> %endif 0 0000A955 7536 jne .done 335 <1> .found_last_byte: 0 0000A957 E85600 call .handle_found_byte 0 0000A95A EB31 jmp .done 338 <1> 339 <1> .foundbyte: 0 0000A95C E85100 call .handle_found_byte 0 0000A95F 5E pop si 0 0000A960 EBEA jmp .loop ; cx = 0 if one to search, 343 <1> ; cx = 1 if two to search, etc 344 <1> 345 <1> %if _SREVERSE 346 <1> .reverse: 0 0000A962 01CF add di, cx ; -> last position to check 348 <1> .reverseloop: 0 0000A964 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 0 0000A966 56 push si 0 0000A967 AC lodsb ; first character in al 0 0000A968 FD std ; no AMD erratum workaround needed 353 <1> %if ELD 354 <1> _386_PM clc 355 <1> reloc call near [ss:sss_repne_scasb] 356 <1> internaldatarelocation 357 <1> %else 0 0000A969 F2AE repne scasb ; look for first byte 359 <1> %endif 0 0000A96B 7411 je .reversefoundbyte 361 <1> %if ELD 362 <1> _386_PM clc 363 <1> reloc call near [ss:sss_scasb] 364 <1> internaldatarelocation 365 <1> %else 0 0000A96D AE scasb ; count in cx was cnt-1 367 <1> %endif 0 0000A96E 751D jne .done 369 <1> .reversefound_last_byte: 0 0000A970 FC cld 0 0000A971 83C702 add di, 2 0 0000A974 38C0 cmp al, al ; ZR for case if dx = 0 0 0000A976 E83700 call .handle_found_byte 0 0000A979 83EF02 sub di, 2 0 0000A97C EB0F jmp .done 376 <1> 377 <1> .reversefoundbyte: 0 0000A97E FC cld 0 0000A97F 83C702 add di, 2 0 0000A982 38C0 cmp al, al ; ZR for case if dx = 0 0 0000A984 E82900 call .handle_found_byte 0 0000A987 83EF02 sub di, 2 0 0000A98A 5E pop si 0 0000A98B EBD7 jmp .reverseloop ; cx = 0 if one to search, 385 <1> ; cx = 1 if two to search, etc 386 <1> %endif 387 <1> 388 <1> .done: 0 0000A98D 5E pop si ; discard 390 <1> .commondone: 0 0000A98E FC cld 0 0000A98F 16 push ss 0 0000A990 1F pop ds 0 0000A991 E8[0000] extcallcall unhack 0 0000A994 BF[0000] reloc mov di, relocated(line_out) 396 <1> linkdatarelocation line_out 397 <1> 0 0000A997 A1[0200] reloc mov ax, word [relocated(sscounter) + 2] 399 <1> linkdatarelocation sscounter 0 0000A99A 85C0 test ax, ax 0 0000A99C 7403 jz .nohighcounter 0 0000A99E E8[0000] extcallcall hexword 403 <1> .nohighcounter: 404 <1> 0 0000A9A1 A1[0000] reloc mov ax, word [relocated(sscounter)] 406 <1> linkdatarelocation sscounter 0 0000A9A4 E8[0000] extcallcall hexword 0 0000A9A7 E8[0000] extcallcall putsline 0 0000A9AA BA[0000] reloc mov dx, msg.matches 410 <1> internaldatarelocation 411 <1> %if ELD 412 <1> extcallcall putsz 413 <1> retn 414 <1> %else 0 0000A9AD E9[0000] jmp putsz 416 <1> %endif 417 <1> 418 <1> 419 <1> ; INP: ZR 420 <1> .handle_found_byte: 0 0000A9B0 51 push cx 0 0000A9B1 57 push di 0 0000A9B2 89D1 mov cx, dx 424 <1> %if ELD 425 <1> _386_PM clc 426 <1> reloc call near [ss:sss_repe_cmpsb] 427 <1> internaldatarelocation 428 <1> %else 0 0000A9B4 F3A6 repe cmpsb ; compare string behind first byte 430 <1> %endif 431 <1> ; If we're searching for a single-byte value then 432 <1> ; dx is equal to zero here. In that case cx gets 433 <1> ; the value zero and then repe cmpsb does not 434 <1> ; alter ZF, meaning it will stay ZR (as noted for 435 <1> ; the comment INP section). 0 0000A9B6 5F pop di 0 0000A9B7 7402 je .display ; if equal 438 <1> .next: 0 0000A9B9 59 pop cx 0 0000A9BA C3 retn 441 <1> 442 <1> .display: 0 0000A9BB 8CC3 mov bx, es 0 0000A9BD 57 push di 0 0000A9BE 1E push ds 0 0000A9BF 06 push es 0 0000A9C0 16 push ss 0 0000A9C1 1F pop ds 0 0000A9C2 E8[0000] extcallcall unhack ; undo the interrupt vector hack and restore es 0 0000A9C5 57 push di 0 0000A9C6 833E[0200]00 reloc cmp word [relocated(sscounter) + 2], strict byte 0 452 <1> linkdatarelocation sscounter, -3 0 0000A9CB 7519 jne @F 0 0000A9CD 8B3E[0000] reloc mov di, word [relocated(sscounter)] 455 <1> linkdatarelocation sscounter 0 0000A9D1 81FF1000 reloc cmp di, strict word relocated(search_results_amount) 457 <1> linkdatarelocation search_results_amount 0 0000A9D5 730F jae @F 459 <1> %if ELD && _PM 460 <1> reloc mov ax, relocated(0) 461 <1> linkdatarelocation build_option_PM 462 <1> add di, di ; times 2 463 <1> test ax, ax ; PM build ? 464 <1> jz .idxnotpm ; no --> (ax == zero) 465 <1> mov ax, di ; = times 2 466 <1> .idxnotpm: 467 <1> add di, di ; times 4 468 <1> add di, ax ; _PM: times 4 + times 2 = times 6, else: times 4 469 <1> %elif _PM 470 <1> add di, di ; times 2 471 <1> mov ax, di ; = times 2 472 <1> add di, di ; times 4 473 <1> add di, ax ; times 4 + times 2 = times 6 474 <1> %else 0 0000A9D7 01FF add di, di ; times 2 0 0000A9D9 01FF add di, di ; times 4 477 <1> %endif 0 0000A9DB 81C7[0000] reloc add di, strict word relocated(search_results) 479 <1> linkdatarelocation search_results 480 <1> 0 0000A9DF 58 pop ax 0 0000A9E0 50 push ax 0 0000A9E1 48 dec ax 0 0000A9E2 AB stosw 485 <1> %if _PM 486 <1> %if ELD 487 <1> reloc mov ax, relocated(0) 488 <1> linkdatarelocation build_option_PM 489 <1> test ax, ax 490 <1> jz .storenotpm 491 <1> %endif 492 <1> xor ax, ax 493 <1> stosw 494 <1> .storenotpm: 495 <1> %endif 0 0000A9E3 89D8 mov ax, bx 0 0000A9E5 AB stosw 498 <1> 499 <1> @@: 0 0000A9E6 8306[0000]01 reloc add word [relocated(sscounter)], strict byte 1 501 <1> linkdatarelocation sscounter, -3 0 0000A9EB 8316[0200]00 reloc adc word [relocated(sscounter) + 2], strict byte 0 503 <1> linkdatarelocation sscounter, -3 0 0000A9F0 D006[0000] reloc rol byte [relocated(sss_silent_count_used)], 1 505 <1> linkdatarelocation sss_silent_count_used 0 0000A9F4 7317 jnc @F 0 0000A9F6 A1[0000] reloc mov ax, word [relocated(sss_silent_count)] 508 <1> linkdatarelocation sss_silent_count 0 0000A9F9 0B06[0200] reloc or ax, word [relocated(sss_silent_count) + 2] 510 <1> linkdatarelocation sss_silent_count 0 0000A9FD 58 pop ax 0 0000A9FE 52 push dx 0 0000A9FF 7467 jz .nodisplay 0 0000AA01 5A pop dx 0 0000AA02 50 push ax 0 0000AA03 832E[0000]01 reloc sub word [relocated(sss_silent_count)], strict byte 1 517 <1> linkdatarelocation sss_silent_count, -3 0 0000AA08 831E[0200]00 reloc sbb word [relocated(sss_silent_count) + 2], strict byte 0 519 <1> linkdatarelocation sss_silent_count, -3 520 <1> @@: 0 0000AA0D 89D8 mov ax, bx 0 0000AA0F BF[0000] reloc mov di, relocated(line_out) 523 <1> linkdatarelocation line_out 0 0000AA12 E8[0000] extcallcall hexword ; 4 (segment) 0 0000AA15 B03A mov al, ':' 0 0000AA17 AA stosb ; +1=5 0 0000AA18 58 pop ax 0 0000AA19 48 dec ax 0 0000AA1A E8[0000] extcallcall hexword 530 <1> %if _SDUMP 0 0000AA1D F606[0200]80 reloc testopt [relocated(options)], ss_no_dump 532 <1> linkdatarelocation options, -3 0 0000AA22 7540 jnz .no_dump 0 0000AA24 F9 stc 0 0000AA25 11D0 adc ax, dx ; -> behind result 0 0000AA27 763B jbe .noresult ; end of segment 0 0000AA29 89C6 mov si, ax ; cannot be zero 538 <1> 539 <1> %if _SDUMPDISPLACEMENT 540 <1> _386_PM movzx edx, dx 0 0000AA2B E84E00 call sss_calculate_displacement 542 <1> 0 0000AA2E 89FB mov bx, di 0 0000AA30 01C3 add bx, ax 0 0000AA32 01C3 add bx, ax 0 0000AA34 01C3 add bx, ax 547 <1> %else 548 <1> mov ax, 32<<8|32 549 <1> stosw 550 <1> lea bx, [di+3*16] 551 <1> %endif 552 <1> 0 0000AA36 89F1 mov cx, si ; cannot be zero 0 0000AA38 F7D9 neg cx ; cannot be zero 555 <1> %if _SDUMPDISPLACEMENT 0 0000AA3A 39C1 cmp cx, ax 557 <1> %else 558 <1> cmp cx, byte 16 559 <1> %endif 0 0000AA3C 7602 jbe .cxdone 561 <1> %if _SDUMPDISPLACEMENT 0 0000AA3E 89C1 mov cx, ax 563 <1> %else 564 <1> mov cx, 16 565 <1> %endif 566 <1> .cxdone: ; cx cannot be zero 0 0000AA40 1F pop ds 0 0000AA41 1E push ds ; restore search's segment 569 <1> %if _SDUMPDISPLACEMENT 0 0000AA42 50 push ax 571 <1> %endif 0 0000AA43 51 push cx 573 <1> .disploop: 0 0000AA44 AC lodsb 0 0000AA45 E8[0000] extcallcall dd_store 0 0000AA48 B020 mov al, 32 0 0000AA4A AA stosb 0 0000AA4B E2F7 loop .disploop 0 0000AA4D 59 pop cx 580 <1> %if _SDUMPDISPLACEMENT 0 0000AA4E 58 pop ax 582 <1> %endif 0 0000AA4F 16 push ss 0 0000AA50 1F pop ds 0 0000AA51 F7D9 neg cx 586 <1> %if _SDUMPDISPLACEMENT 0 0000AA53 01C1 add cx, ax 588 <1> %else 589 <1> add cx, byte 16 590 <1> %endif 0 0000AA55 7407 jz .noblanks 592 <1> .loopblanks: 0 0000AA57 B82020 mov ax, 32<<8|32 0 0000AA5A AB stosw 0 0000AA5B AA stosb 0 0000AA5C E2F9 loop .loopblanks 597 <1> .noblanks: 0 0000AA5E C645E72D mov byte [di-(1+(8*3))], '-' 0 0000AA62 89DF mov di, bx 600 <1> .noresult: 601 <1> .no_dump: 602 <1> %endif ; _SDUMP 0 0000AA64 52 push dx 0 0000AA65 E8[0000] extcallcall putsline_crlf 605 <1> .nodisplay: 0 0000AA68 E8[0000] extcallcall dohack 0 0000AA6B 5A pop dx 0 0000AA6C 07 pop es 0 0000AA6D 1F pop ds 0 0000AA6E 5F pop di 0 0000AA6F E947FF jmp .next 612 <1> 613 <1> 614 <1> .error_unhack_di: 0 0000AA72 16 push ss 0 0000AA73 1F pop ds 0 0000AA74 E8[0000] extcallcall unhack 0 0000AA77 89FE mov si, di 0 0000AA79 E9[0000] jmp error 620 <1> 621 <1> 622 <1> %if _PM 623 <1> subcpu 386 624 <1> 625 <1> .386init: 626 <1> pop ebx 627 <1> pop edx 628 <1> extcallcall ispm 629 <1> jnz .init_popped ; not PM --> 630 <1> sub ebx, edx ; ebx = number of bytes in search range minus one 631 <1> sub ebx, ecx ; = number of possible positions of string minus 1 632 <1> jb .error_unhack_di 633 <1> mov edi, edx 634 <1> mov edx, ecx 635 <1> mov ecx, ebx 636 <1> 637 <1> ; ds:esi-> search string, length (edx+1) 638 <1> ; es:edi-> data to search in, (ecx+1) bytes 639 <1> ; Although 386+ RM still uses 64 KiB segments, it allows 640 <1> ; us to use the 32-bit addressing variant of the string 641 <1> ; instructions as long as we never access any byte above 642 <1> ; the 64 KiB limit. (Even if the index register contains 643 <1> ; 00010000h after an instruction executed.) 644 <1> %if _SREVERSE 645 <1> reloc testopt [ss:relocated(internalflags3)], dif3_sss_is_reverse 646 <1> linkdatarelocation internalflags3, -3 647 <1> jnz .386reverse 648 <1> %endif 649 <1> .386loop: 650 <1> or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 651 <1> push esi 652 <1> a32 lodsb ; first character in al 653 <1> %if ELD 654 <1> _386_PM stc 655 <1> reloc call near [ss:sss_repne_scasb] 656 <1> internaldatarelocation 657 <1> %else 658 <1> a32 repne scasb ; look for first byte 659 <1> %endif 660 <1> je .386foundbyte 661 <1> %if ELD 662 <1> _386_PM stc 663 <1> reloc call near [ss:sss_scasb] 664 <1> internaldatarelocation 665 <1> %else 666 <1> a32 scasb ; count in ecx was cnt-1 667 <1> %endif 668 <1> jne .386done 669 <1> .386found_last_byte: 670 <1> call .386handle_found_byte 671 <1> jmp .386done 672 <1> 673 <1> .386foundbyte: 674 <1> call .386handle_found_byte 675 <1> pop esi 676 <1> jmp .386loop ; ecx = 0 if one to search, 677 <1> ; ecx = 1 if two to search, etc 678 <1> 679 <1> %if _SREVERSE 680 <1> .386reverse: 681 <1> add edi, ecx ; -> last position to check 682 <1> .386reverseloop: 683 <1> or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 684 <1> push esi 685 <1> a32 lodsb ; first character in al 686 <1> std ; no AMD erratum workaround needed 687 <1> %if ELD 688 <1> _386_PM stc 689 <1> reloc call near [ss:sss_repne_scasb] 690 <1> internaldatarelocation 691 <1> %else 692 <1> a32 repne scasb ; look for first byte 693 <1> %endif 694 <1> je .386reversefoundbyte 695 <1> %if ELD 696 <1> _386_PM stc 697 <1> reloc call near [ss:sss_scasb] 698 <1> internaldatarelocation 699 <1> %else 700 <1> a32 scasb ; count in ecx was cnt-1 701 <1> %endif 702 <1> jne .386done 703 <1> .386reversefound_last_byte: 704 <1> cld 705 <1> add edi, 2 706 <1> cmp al, al ; ZR for case if edx = 0 707 <1> call .386handle_found_byte 708 <1> sub edi, 2 709 <1> jmp .386done 710 <1> 711 <1> .386reversefoundbyte: 712 <1> cld 713 <1> add edi, 2 714 <1> cmp al, al ; ZR for case if edx = 0 715 <1> call .386handle_found_byte 716 <1> sub edi, 2 717 <1> pop esi 718 <1> jmp .386reverseloop ; ecx = 0 if one to search, 719 <1> ; ecx = 1 if two to search, etc 720 <1> %endif 721 <1> 722 <1> .386done: 723 <1> pop esi ; discard 724 <1> jmp .commondone 725 <1> 726 <1> 727 <1> ; INP: ZR 728 <1> .386handle_found_byte: 729 <1> push ecx 730 <1> push edi 731 <1> mov ecx, edx 732 <1> %if ELD 733 <1> _386_PM stc 734 <1> reloc call near [ss:sss_repe_cmpsb] 735 <1> internaldatarelocation 736 <1> %else 737 <1> a32 repe cmpsb ; compare string behind first byte 738 <1> %endif 739 <1> ; If we're searching for a single-byte value then 740 <1> ; edx is equal to zero here. In that case ecx gets 741 <1> ; the value zero and then a32 repe cmpsb does not 742 <1> ; alter ZF, meaning it will stay ZR (as noted for 743 <1> ; the comment INP section). 744 <1> pop edi 745 <1> je .386display ; if equal 746 <1> .386next: 747 <1> pop ecx 748 <1> retn 749 <1> 750 <1> .386display: 751 <1> mov bx, es 752 <1> push edi 753 <1> push ds 754 <1> push es 755 <1> push ss 756 <1> pop ds 757 <1> extcallcall unhack ; undo the interrupt vector hack and restore es 758 <1> push edi 759 <1> reloc mov edi, dword [relocated(sscounter)] 760 <1> linkdatarelocation sscounter 761 <1> reloc cmp edi, strict dword relocated(search_results_amount) 762 <1> linkdatarelocation search_results_amount, -4 ; low word of the dword ! 763 <1> jae @F 764 <1> add di, di ; * 2 765 <1> mov ax, di 766 <1> add di, di ; * 4 767 <1> add di, ax ; * 4 + * 2 = * 6 768 <1> reloc add di, relocated(search_results) 769 <1> linkdatarelocation search_results 770 <1> pop eax 771 <1> push eax 772 <1> dec eax 773 <1> stosd 774 <1> mov ax, bx 775 <1> stosw 776 <1> 777 <1> @@: 778 <1> reloc inc dword [relocated(sscounter)] 779 <1> linkdatarelocation sscounter 780 <1> reloc rol byte [relocated(sss_silent_count_used)], 1 781 <1> linkdatarelocation sss_silent_count_used 782 <1> jnc @F 783 <1> reloc cmp dword [relocated(sss_silent_count)], strict byte 0 784 <1> linkdatarelocation sss_silent_count, -3 785 <1> pop eax 786 <1> push dx 787 <1> je .386nodisplay 788 <1> pop dx 789 <1> push eax 790 <1> reloc sub word [relocated(sss_silent_count)], strict byte 1 791 <1> linkdatarelocation sss_silent_count, -3 792 <1> reloc sbb word [relocated(sss_silent_count) + 2], strict byte 0 793 <1> linkdatarelocation sss_silent_count, -3 794 <1> @@: 795 <1> mov ax, bx 796 <1> reloc mov di, relocated(line_out) 797 <1> linkdatarelocation line_out 798 <1> extcallcall hexword ; 4 (segment) 799 <1> mov al, ':' 800 <1> stosb ; +1=5 801 <1> pop eax 802 <1> dec eax 803 <1> extcallcall test_high_limit 804 <1> jz .noa32 805 <1> extcall hexword_high, PM required 806 <1> .noa32: 807 <1> extcallcall hexword 808 <1> %if _SDUMP 809 <1> reloc testopt [relocated(options)], ss_no_dump 810 <1> linkdatarelocation options, -3 811 <1> jnz .386_no_dump 812 <1> stc 813 <1> adc eax, edx ; -> behind result 814 <1> jbe .386noresult ; end of segment 815 <1> mov esi, eax 816 <1> ; esi is at most 10000h in a 64 KiB segment. 817 <1> ; The jcxz at .386cxdone will branch if si = 0, 818 <1> ; which is only possible if esi = 10000h. 819 <1> ; esi is never zero here. 820 <1> 821 <1> %if _SDUMPDISPLACEMENT 822 <1> call sss_calculate_displacement 823 <1> %else 824 <1> mov ax, 32<<8|32 825 <1> stosw 826 <1> %endif 827 <1> 828 <1> pop bx ; get search selector 829 <1> push bx 830 <1> extcallcall test_high_limit 831 <1> jnz .386_high_limit 832 <1> 833 <1> .386_low_limit: 834 <1> mov cx, si ; 0 if at end of 64 KiB limit, else nonzero 835 <1> neg cx ; 0 if at end of 64 KiB limit, else nonzero 836 <1> %if _SDUMPDISPLACEMENT 837 <1> cmp cx, ax 838 <1> %else 839 <1> cmp cx, byte 16 ; below or equal maximum dump length ? 840 <1> %endif 841 <1> jmp @F 842 <1> 843 <1> .386_high_limit: 844 <1> mov ecx, esi ; cannot be 0 845 <1> neg ecx ; cannot be 0 846 <1> %if _SDUMPDISPLACEMENT 847 <1> movzx eax, ax 848 <1> cmp ecx, eax 849 <1> %else 850 <1> cmp ecx, byte 16 ; below or equal maximum dump length ? 851 <1> %endif 852 <1> @@: 853 <1> jbe .386cxdone ; (e)cx <= maximum dump length, use cx 854 <1> %if _SDUMPDISPLACEMENT 855 <1> mov cx, ax 856 <1> %else 857 <1> mov cx, 16 ; reset cx (ecxh is not used) 858 <1> %endif 859 <1> .386cxdone: 860 <1> jcxz .386noresult ; if at end of 64 KiB limit --> 861 <1> ; (The displacement is already written here. Oh well.) 862 <1> %if _SDUMPDISPLACEMENT 863 <1> mov bx, di 864 <1> add bx, ax 865 <1> add bx, ax 866 <1> add bx, ax 867 <1> %else 868 <1> lea bx, [di+3*16] 869 <1> %endif 870 <1> pop ds 871 <1> push ds ; restore search's segment 872 <1> %if _SDUMPDISPLACEMENT 873 <1> push ax 874 <1> %endif 875 <1> push cx 876 <1> .386disploop: 877 <1> a32 lodsb 878 <1> extcallcall dd_store 879 <1> mov al, 32 880 <1> stosb 881 <1> loop .386disploop 882 <1> pop cx 883 <1> %if _SDUMPDISPLACEMENT 884 <1> pop ax 885 <1> %endif 886 <1> push ss 887 <1> pop ds 888 <1> neg cx 889 <1> %if _SDUMPDISPLACEMENT 890 <1> add cx, ax 891 <1> %else 892 <1> add cx, byte 16 893 <1> %endif 894 <1> jz .386noblanks 895 <1> .386loopblanks: 896 <1> mov ax, 32<<8|32 897 <1> stosw 898 <1> stosb 899 <1> loop .386loopblanks 900 <1> .386noblanks: 901 <1> mov byte [di-(1+(8*3))], '-' 902 <1> mov di, bx 903 <1> .386noresult: 904 <1> .386_no_dump: 905 <1> %endif ; _SDUMP 906 <1> push dx 907 <1> extcallcall putsline_crlf 908 <1> .386nodisplay: 909 <1> extcallcall dohack 910 <1> pop dx 911 <1> pop es 912 <1> pop ds 913 <1> pop edi 914 <1> jmp .386next 915 <1> 916 <1> subcpureset 917 <1> %endif ; _PM 918 <1> 919 <1> 920 <1> %if _SDUMPDISPLACEMENT 921 <1> 922 <1> ; INP: (e)dx = length of pattern - 1 923 <1> ; es:di -> where to write, within line_out 924 <1> ; di <= line_out + 13 925 <1> ; di >= line_out + 9 926 <1> ; OUT: bx = table offset 927 <1> ; ax = how many bytes to dump (13 .. 16) 928 <1> ; CHG: - 929 <1> sss_calculate_displacement: 930 <1> 0 0000AA7C 31DB xor bx, bx 932 <1> _386_PM_o32 0 0000AA7E 42 inc dx ; = pattern length (can overflow) 934 <1> _386_PM mov bl, 6 ; dword needed 935 <1> _386_PM test edx, 0FF00_0000h 936 <1> _386_PM jnz @F 937 <1> _386_PM mov bl, 4 ; 3byte needed 938 <1> _386_PM test edx, 0FF_0000h 939 <1> _386_PM jnz @F 0 0000AA7F B302 mov bl, 2 ; word needed 0 0000AA81 84F6 test dh, dh 0 0000AA83 7502 jnz @F 0 0000AA85 B300 mov bl, 0 ; byte needed 944 <1> @@: 945 <1> 0 0000AA87 B8202B mov ax, " +" 0 0000AA8A AB stosw ; common prefix 948 <1> _386_PM_o32 0 0000AA8B 89D0 mov ax, dx 0 0000AA8D FF97[0000] reloc call near [word sss_displacement_write_table + bx] 951 <1> internaldatarelocation 952 <1> ; write displacement number 953 <1> _386_PM_o32 0 0000AA91 4A dec dx ; restore 955 <1> 0 0000AA92 B82020 mov ax, 32 | 32 << 8 0 0000AA95 AB stosw ; write blanks 0 0000AA96 89F8 mov ax, di 0 0000AA98 2D[0000] reloc sub ax, strict word relocated(line_out) 960 <1> linkdatarelocation line_out ; = length written so far (<= 25, >= 15) 0 0000AA9B F7D8 neg ax ; minus length written so far (>= -25, <= -15) 0 0000AA9D 83C04F add ax, 79 ; 79 minus length written so far 963 <1> ; = how many columns remaining (>= 54, <= 64) 0 0000AAA0 D1E8 shr ax, 1 0 0000AAA2 D1E8 shr ax, 1 ; divide by 4 (>= 13, <= 16) 966 <1> ; = how many bytes can be dumped 0 0000AAA4 C3 retn 968 <1> 969 <1> 970 <1> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 970 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY 971 <1> align 2, db 0 972 <1> sss_displacement_write_table: 0 00005A02 [0000] reloc dw .byte 974 <1> internalcoderelocation 0 00005A04 [0000] reloc dw .word 976 <1> internalcoderelocation 977 <1> %if _PM && ! _ONLYNON386 978 <1> reloc dw .3byte 979 <1> internalcoderelocation 980 <1> reloc dw .dword 981 <1> internalcoderelocation 982 <1> %endif 983 <1> 984 <1> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 984 ------------------ <1> note: usesection lDEBUG_CODE 985 <1> 986 <1> %if ELD 987 <1> .byte: 988 <1> extcallcall hexbyte 989 <1> retn 990 <1> .word: 991 <1> extcallcall hexword 992 <1> retn 993 <1> %if _PM && ! _ONLYNON386 994 <1> .3byte: 995 <1> subcpu 386 996 <1> ror eax, 16 997 <1> extcallcall hexbyte 998 <1> rol eax, 16 999 <1> subcpureset 1000 <1> jmp .word 1001 <1> .dword: 1002 <1> extcall hexdword, PM required 1003 <1> retn 1004 <1> %endif 1005 <1> %else 1006 <1> .byte: equ hexbyte 1007 <1> .word: equ hexword 1008 <1> %if _PM && ! _ONLYNON386 1009 <1> .3byte: 1010 <1> subcpu 386 1011 <1> ror eax, 16 1012 <1> call hexbyte 1013 <1> rol eax, 16 1014 <1> subcpureset 1015 <1> jmp .word 1016 <1> .dword: equ hexdword 1017 <1> %endif 1018 <1> %endif 1019 <1> %endif 1020 <1> 1021 <1> %if ELD 1022 <1> do_repne_scasb: 1023 <1> _386_PM jc do_repne_scasb_a32 1024 <1> repne scasb 1025 <1> retn 1026 <1> 1027 <1> do_scasb: 1028 <1> _386_PM jc do_scasb_a32 1029 <1> scasb 1030 <1> retn 1031 <1> 1032 <1> do_repe_cmpsb: 1033 <1> _386_PM jc do_repe_cmpsb_a32 1034 <1> repe cmpsb 1035 <1> retn 1036 <1> 1037 <1> do_repe_cmpsb_caps: 1038 <1> _386_PM jc do_repe_cmpsb_caps_a32 1039 <1> jcxz .retn 1040 <1> .loop: 1041 <1> lodsb 1042 <1> mov bh, 2 ; caps flag 1043 <1> call difficult_scasb_a16 1044 <1> loope .loop 1045 <1> .retn: 1046 <1> retn 1047 <1> 1048 <1> difficult_repe_cmpsb: 1049 <1> _386_PM jc difficult_repe_cmpsb_a32 1050 <1> jcxz .retn 1051 <1> lframe 1052 <1> lenter 1053 <1> xor bx, bx 1054 <1> push bx ; ?idx = 0 1055 <1> lvar word, idx 1056 <1> mov bl, 2 ; skip initial tag 1057 <1> .loop: 1058 <1> push cx 1059 <1> mov cx, bx ; cl = how many tags to skip times 2 1060 <1> mov bx, word [bp + ?idx]; + tagbuffer -> current tag byte 1061 <1> reloc mov ch, byte [ss:word tagbuffer + bx] 1062 <1> internaldatarelocation ; get current tag byte 1063 <1> shr ch, cl ; shift down tag to bit 0 and 1 1064 <1> add cl, 2 ; next tag 1065 <1> cmp cl, 8 ; need to increment ?idx ? 1066 <1> jb @F ; no --> 1067 <1> mov cl, 0 ; reset for next iteration 1068 <1> inc word [bp + ?idx] ; point at next tag byte 1069 <1> @@: 1070 <1> mov bx, cx ; bl = shift count for next tag, 1071 <1> ; bh bit 0 and 1 = tag 1072 <1> pop cx 1073 <1> lodsb 1074 <1> push bx ; preserve shift count 1075 <1> call difficult_scasb_a16 1076 <1> pop bx 1077 <1> loope .loop 1078 <1> lleave 1079 <1> .retn: 1080 <1> retn 1081 <1> 1082 <1> 1083 <1> difficult_repne_scasb: 1084 <1> reloc mov bh, byte [ss:tagbuffer] 1085 <1> internaldatarelocation 1086 <1> _386_PM jc difficult_repne_scasb_a32 1087 <1> jcxz .ret 1088 <1> .loop: 1089 <1> call difficult_scasb_a16 1090 <1> loopne .loop 1091 <1> .ret: 1092 <1> retn 1093 <1> 1094 <1> difficult_scasb: 1095 <1> reloc mov bh, byte [ss:tagbuffer] 1096 <1> internaldatarelocation 1097 <1> _386_PM jc difficult_scasb_a32 1098 <1> difficult_scasb_a16: 1099 <1> test bh, 1 1100 <1> jnz .wild 1101 <1> test bh, 2 1102 <1> jnz .caps 1103 <1> scasb 1104 <1> retn 1105 <1> 1106 <1> .caps: 1107 <1> push di 1108 <1> scasb 1109 <1> je .ret_stack ; ZR 1110 <1> cmp al, 'A' 1111 <1> jb .ret_stack ; NZ 1112 <1> cmp al, 'Z' 1113 <1> jbe .toggle 1114 <1> cmp al, 'a' 1115 <1> jb .ret_stack ; NZ 1116 <1> cmp al, 'z' 1117 <1> ja .ret_stack ; NZ 1118 <1> .toggle: 1119 <1> pop di 1120 <1> xor al, 32 ; try other caps status 1121 <1> scasb 1122 <1> retn 1123 <1> 1124 <1> .ret_stack: 1125 <1> pop bx 1126 <1> retn 1127 <1> 1128 <1> .wild: 1129 <1> scasb 1130 <1> cmp al, al 1131 <1> retn 1132 <1> 1133 <1> 1134 <1> %if _PM 1135 <1> subcpu 386 1136 <1> do_repne_scasb_a32: 1137 <1> repne 1138 <1> 1139 <1> do_scasb_a32: 1140 <1> a32 scasb 1141 <1> retn 1142 <1> 1143 <1> do_repe_cmpsb_a32: 1144 <1> a32 repe cmpsb 1145 <1> retn 1146 <1> 1147 <1> do_repe_cmpsb_caps_a32: 1148 <1> jecxz .retn 1149 <1> .loop: 1150 <1> a32 lodsb 1151 <1> mov bh, 2 ; caps flag 1152 <1> call difficult_scasb_a32 1153 <1> loope .loop, ecx 1154 <1> .retn: 1155 <1> retn 1156 <1> 1157 <1> difficult_repe_cmpsb_a32: 1158 <1> jecxz .retn 1159 <1> lframe 1160 <1> lenter 1161 <1> xor bx, bx 1162 <1> push bx ; ?idx = 0 1163 <1> lvar word, idx 1164 <1> mov bl, 2 ; skip initial tag 1165 <1> .loop: 1166 <1> push cx 1167 <1> mov cx, bx ; cl = how many tags to skip times 2 1168 <1> mov bx, word [bp + ?idx]; + tagbuffer -> current tag byte 1169 <1> reloc mov ch, byte [ss:word tagbuffer + bx] 1170 <1> internaldatarelocation ; get current tag byte 1171 <1> shr ch, cl ; shift down tag to bit 0 and 1 1172 <1> add cl, 2 ; next tag 1173 <1> cmp cl, 8 ; need to increment ?idx ? 1174 <1> jb @F ; no --> 1175 <1> mov cl, 0 ; reset for next iteration 1176 <1> inc word [bp + ?idx] ; point at next tag byte 1177 <1> @@: 1178 <1> mov bx, cx ; bl = shift count for next tag, 1179 <1> ; bh bit 0 and 1 = tag 1180 <1> pop cx 1181 <1> a32 lodsb 1182 <1> push bx ; preserve shift count 1183 <1> call difficult_scasb_a32 1184 <1> pop bx 1185 <1> loope .loop, ecx 1186 <1> lleave 1187 <1> .retn: 1188 <1> retn 1189 <1> 1190 <1> 1191 <1> difficult_repne_scasb_a32: 1192 <1> jecxz .ret 1193 <1> .loop: 1194 <1> call difficult_scasb_a32 1195 <1> loopne .loop, ecx 1196 <1> .ret: 1197 <1> retn 1198 <1> 1199 <1> difficult_scasb_a32: 1200 <1> test bh, 1 1201 <1> jnz .wild 1202 <1> test bh, 2 1203 <1> jnz .caps 1204 <1> a32 scasb 1205 <1> retn 1206 <1> 1207 <1> .caps: 1208 <1> push edi 1209 <1> a32 scasb 1210 <1> je .ret_stack ; ZR 1211 <1> cmp al, 'A' 1212 <1> jb .ret_stack ; NZ 1213 <1> cmp al, 'Z' 1214 <1> jbe .toggle 1215 <1> cmp al, 'a' 1216 <1> jb .ret_stack ; NZ 1217 <1> cmp al, 'z' 1218 <1> ja .ret_stack ; NZ 1219 <1> .toggle: 1220 <1> pop edi 1221 <1> xor al, 32 ; try other caps status 1222 <1> a32 scasb 1223 <1> retn 1224 <1> 1225 <1> .ret_stack: 1226 <1> pop ebx 1227 <1> retn 1228 <1> 1229 <1> .wild: 1230 <1> a32 scasb 1231 <1> cmp al, al 1232 <1> retn 1233 <1> 1234 <1> subcpureset 1235 <1> %endif 1236 <1> %endif 1237 <1> 1238 <1> ..@sss_access_end: 1239 <1> %endif ; _LOADER 146 147 %unimacro extcall 1-2.nolist 148 %undef extcall 149 %undef extcallcall 150 %unimacro internalcoderelocation 0-*.nolist 151 %unimacro internaldatarelocation 0-*.nolist 152 %unimacro linkdatarelocation 0-*.nolist 153 %undef relocated 154 %undef reloc 155 %undef reloc2 === Trace listing source: ../lst/debug.obj/symbols.lst 1 2 %if 0 3 4 lDebug symbol handling 5 6 Copyright (C) 2008-2026 E. C. Masloch 7 8 Usage of the works is permitted provided that this 9 instrument is retained with the works, so that any entity 10 that uses the works is notified of this instrument. 11 12 DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 14 %endif 15 16 %define SOURCEFILENAME "symbols.asm" 17 %ifidni __OUTPUT_FORMAT__, obj 18 %include "debug.mac" 1 <1> [list -] 14 <3> [list -] 14 <2> [list -] 86 <1> [list -] 86 ------------------ <1> note: Disable usesection detection === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00005A06 ???????? eldhSignature: resb 4 ; "ELD1" 0 00005A0A ?????? resb 3 ; reserved 0 00005A0D ?? resb 1 ; 26 (Ctrl-Z) 0 00005A0E ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00005A12 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00005A14 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00005A16 ???????? eldhDataOffset: resd 1 0 00005A1A ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00005A1C ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00005A1E ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00005A20 ???????? eldhReserved: resb 4 ; reserved 0 00005A24 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00005A26 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00005A2A ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00005A2E ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00005A32 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00005A06 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00005A0E ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00005A12 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00005A14 ???? 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 0 00005A06 ???? 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 0 00005A08 ???? eldltAmount: resw 1 0 00005A0A ???????? 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 0 00005A06 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00005A08 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00005A0A ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00005A0C ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00005A0E ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00005A16 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00005A06 ???? eldlSignature: resw 1 ; 0E1D1h 0 00005A08 ???????? eldlReserved: resw 2 0 00005A0C ???? eldlUseLinkHash: resw 1 0 00005A0E ???? eldlDataAmount: resw 1 0 00005A10 ???? eldlDataPrefixes: resw 1 0 00005A12 ???? eldlDataEntries: resw 1 0 00005A14 ???? eldlDataAddresses: resw 1 0 00005A16 ???? eldlCodeAmount: resw 1 0 00005A18 ???? eldlCodePrefixes: resw 1 0 00005A1A ???? eldlCodeEntries: resw 1 0 00005A1C ???? 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 0 00005A06 ???? ifKeyword: resw 1 0 00005A08 ???? ifDescription: resw 1 0 00005A0A ???? ifOptions: resw 1 0 00005A0C ???? ifValue: resw 1 0 00005A0E ???? ifTrying: resw 1 0 00005A10 ???? 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 0 00005A06 ???????? saOffset: resd 1 0 00005A0A ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00005A06 ???? so16aOffset: resw 1 0 00005A08 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00005A06 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00005A06 ?????? bsJump: resb 3 0 00005A09 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00005A06 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00005A08 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00005A09 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00005A0B ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00005A0C ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 00005A0E ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 00005A10 ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 00005A11 ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00005A13 ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00005A15 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00005A17 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00005A1B ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 00005A1F ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00005A23 ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00005A25 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00005A27 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00005A2B ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 00005A2D ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00005A06 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00005A07 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00005A08 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00005A09 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00005A18 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00005A06 ???????????????? deName: resb 8 0 00005A0E ?????? deExt: resb 3 0 00005A11 ?? deAttrib: resb 1 0 00005A12 ?? dePlusSize: resb 1 0 00005A13 ?????????????? resb 7 0 00005A1A ???? deClusterHigh: resw 1 0 00005A1C ???? deTime: resw 1 0 00005A1E ???? deDate: resw 1 0 00005A20 ???? deClusterLow: resw 1 0 00005A22 ???????? 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 0 1000059F6 ???????? lsvFirstCluster: resd 1 0 1000059FA ???????? lsvFATSector: resd 1 0 1000059FE ???? lsvFATSeg: resw 1 0 100005A00 ???? lsvLoadSeg: resw 1 0 100005A02 ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 1000059E6 ???? ldMemoryTop: resw 1 0 1000059E8 ???? ldLoadTop: resw 1 0 1000059EA ???? ldSectorSeg: resw 1 0 1000059EC ?? ldFATType: resb 1 92 <2> ldFlags: 0 1000059ED ?? ldHasLBA: resb 1 0 1000059EE ???? ldClusterSize: resw 1 0 1000059F0 ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 1000059F2 ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 1000059F4 ?? .partition: resb 1 ; byte 0 1000059F5 ?? .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 <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 0 1000059D6 ???????? ldRootSector: resd 1 0 1000059DA ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 1000059DC ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 1000059DE ???? ldParasLeft: resw 1 0 1000059E0 ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000059C6 ???????? ldMaxCluster: resd 1 0 1000059CA ???????? ldFileSize: resd 1 0 1000059CE ???????? ldCurrentCluster: resd 1 0 1000059D2 ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00005A06 ???????? liiSignature: resb 4 ; "NLDR" 0 00005A0A ???? liiVersion: resb 2 ; "00" 0 00005A0C ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 00005A0E ???? liiAmountParagraphs: resw 1 0 00005A10 ???????????? liiReserved: resw 3 0 00005A16 ???? 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 0 00005A18 ???? 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 0 00005A1A ???? 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 0 00005A1C ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00005A06 ???? lpSize: resw 1 0 00005A08 ???? lpCount: resw 1 0 00005A0A ???????? lpBuffer: resd 1 0 00005A0E ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00005A06 ?? piBoot: resb 1 0 00005A07 ?????? piStartCHS: resb 3 0 00005A0A ?? piType: resb 1 0 00005A0B ?????? piEndCHS: resb 3 0 00005A0E ???????? piStart: resd 1 0 00005A12 ???????? 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 0 00005A06 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00005A08 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00005A0A ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00005A0C ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 00005A0E ???? lsOptions: resw 1 ; option flags 0 00005A10 ???? lsSegment: resw 1 ; => where to load file 0 00005A12 ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00005A16 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00005A1A ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00005A1C ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 00005A1E ???????????????? 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 0 00005A06 ???? exact_struc_at 00h, exeSignature: resw 1 0 00005A08 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00005A0A ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00005A0C ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 00005A0E ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 00005A10 ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00005A12 ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00005A14 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00005A16 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00005A18 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00005A1A ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00005A1C ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 00005A1E ???? 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. 0 00005A20 ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00005A06 ???? ifhHandle: resw 1 0 00005A08 ???? ifhFlags: resw 1 0 00005A0A ???????? 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 <1> areastrucEntry: resb 24 0 00005A1E ???????? areastrucNext: resd 1 0 00005A22 ???????? areastrucPrev: resd 1 0 00005A26 ???? areastrucSubAmount: resw 1 0 00005A28 ???? areastrucSubOffset: resw 1 0 00005A2A ???? areastrucFunAmount: resw 1 0 00005A2C ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00005A06 ???????? areastrucsubLinear: resd 1 0 00005A0A ???????? areastrucsubLinearEnd: resd 1 0 00005A0E ???? areastrucsubListOffset: resw 1 0 00005A10 ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00005A06 ???????? areastrucfunLinear: resd 1 0 00005A0A ???????? areastrucfunLinearEnd: resd 1 0 00005A0E ???? areastrucfunListOffset: resw 1 0 00005A10 ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00005A06 ???? areastart: resw 1 0 00005A08 ???? areaend: resw 1 0 00005A0A ???? areamessage: resw 1 0 00005A0C ???? 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 0 00005A06 ???? 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.) 0 00005A08 ???? ivFlags: resw 1 0 00005A0A ???? 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. 0 00005A0C ???? 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 0 00005A0E ?? 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. 0 00005A0F ?? 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 0 00005A06 ???????? mrLinear: resd 1 0 00005A0A ???????? mrOffset: resd 1 0 00005A0E ???? mrSegmentSelector: resw 1 0 00005A10 ???? mrFlags: resw 1 0 00005A12 ???????? 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 0 00005A06 ???????? .size_: resd 1 0 00005A0A ???? .srchdl: resw 1 0 00005A0C ???????? .srcadr: resd 1 0 00005A10 ???? .dsthdl: resw 1 0 00005A12 ???????? .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 19 %endif 20 21 22 %if !_LINK || _SYMBOLIC 23 usesection lDEBUG_DATA_ENTRY 24 25 align 4, db 0 26 sym_storage: 27 .clear_on_free.first: 28 .start: dd 0 29 %if _XMS_SYMBOL_TABLE 30 .main.xms.start:dd 0 31 .hash.xms.start:dd 0 32 .str.xms.start: dd 0 33 .xms.free: dd 0 34 .xms.end: dd 0 35 %endif 36 37 .first_start: 38 .main.start: dd 0 ; -> SYMMAIN array 39 .hash.start: dd 0 ; -> SYMHASH array 40 .str.start: dd 0 ; -> SYMSTR heap 41 .free: dd 0 ; -> free table space 42 .end: dd 0 ; -> after end of allocated table space 43 .after_start: 44 45 ; The following are SYMMAIN array indices. 46 .main.end: dw 0 47 .main.free: dw 0 48 .minus1_on_free.first: 49 .main.based.base: dw -1 50 .main.base.first: dw -1 51 .main.base.last: dw -1 52 .main.bb.first: dw -1 53 .main.bb.last: dw -1 54 .main.nonbased.first: dw -1 55 .main.nonbased.last: dw -1 56 .main.reloc.first: dw -1 57 .main.reloc.last: dw -1 58 59 %if _ZZ_INSERT_TEMP 60 ; This is a SYMMAIN array index. However, it 61 ; should NOT participate in relocation. Must 62 ; be >= .main.free at all times. 63 .main.temp.first: dw -1 64 %endif 65 .minus1_on_free.after: 66 %if _ZZ_INSERT_TEMP 67 ; Amount of in-use temporary SYMMAIN entries. 68 .main.temp.amount: dw 0 69 %endif 70 71 ; The following are SYMHASH array dword indices. 72 .hash.end: dw 0 73 .hash.free: dw 0 74 75 ; The following are SYMSTR heap dword indices. 76 .str.end: dw 0 77 .str.free: dw 0 78 .clear_on_free.after: 79 80 %if _BOOTLDR 81 align 16, db 0 82 ; Image identification 83 ; First dword: signature 84 ; Next word: version, two ASCII digits 85 ; Next word: checksum. adding up all words of the paragraph gives zero 86 ; Next word: size of image (including this paragraph) 87 ; Three words reserved, zero. 88 zz_imageident: 89 db "NSYM00" 90 .check: dw 0 91 .size: dw 0 92 times 3 dw 0 93 %endif 94 95 %if _XMS_SYMBOL_TABLE 96 align 16, db 0 97 zz_xms: 98 .16_zeros: times 16 db 0 99 align 2, db 0 100 .movestruc: times XMSMOVE_size db 0 101 align 4, db 0 102 .entry: dq 0 103 .transfer_address: dd 0 104 .transfer_size: dd XMSTRANSFER_default_size 105 .handle: dw -1 106 %endif ; _XMS_SYMBOL_TABLE 107 108 align 2, db 0 109 zz_saved_strategy: dw 0 110 zz_saved_umblink: dw 0 111 zz_flag_existing_default: 112 .symbol: db insertfExistingBlockDiffering 113 .start: db insertfExistingKeep 114 115 116 usesection lDEBUG_CODE 117 118 %if _DUALCODE && _SYMBOLICDUALCODE 119 usesection lDEBUG_CODE2 120 %endif 121 122 overridedef STANDALONE, 0 123 overridedef INCLUDECOMMON, 0 124 overridedef DEBUG0, 0 125 overridedef DEBUG1, 0 126 overridedef SYMMAINLARGE, 1 127 %include "insert.asm" 128 resetdef 129 resetdef 130 resetdef 131 resetdef 132 resetdef 133 134 135 ; error handlers used by insert.asm 136 invaliddata: 137 mov ax, 0500h 138 nearcall setrc 139 mov dx, msg.invaliddata 140 exit_error_msg: 141 142 %if _DUALCODE && _SYMBOLICDUALCODE 143 %define SECTION_OF_exit_error_msg_code_entry lDEBUG_CODE 144 nearcall exit_error_msg_code_entry 145 146 usesection lDEBUG_CODE 147 148 exit_error_msg_code_entry: 149 add sp, 6 ; discard near + far return address 150 %endif 151 exit_error_msg_code: 152 push ss 153 pop ds 154 push ss 155 pop es 156 call putsz_error 157 nearcall zz_restore_strat 158 mov ax, 05FFh 159 call setrc 160 jmp near [errret] 161 162 %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 163 usesection lDEBUG_CODE2 164 165 %define SECTION_OF_error_entry lDEBUG_CODE 166 section_of symbolasm_error 167 symbolasm_error: section_of_function 168 nearcall error_entry 169 170 usesection lDEBUG_CODE 171 172 error_entry: 173 add sp, 6 174 jmp error 175 %else 176 usesection lDEBUG_CODE 177 178 section_of symbolasm_error 179 check_section_of symbolasm_error 180 symbolasm_error equ error 181 %endif 182 183 zz: 184 %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 185 %define SECTION_OF_zz_relocated lDEBUG_CODE2 186 nearcall zz_relocated 187 retn 188 189 usesection lDEBUG_CODE2 190 %endif 191 192 zz_relocated: 193 db __TEST_IMM8 194 .: 195 lodsb 196 nearcall iseol? 197 je .end 198 cmp al, 32 199 jbe . 200 cmp al, '-' 201 je .switch 202 cmp al, '/' 203 je .switch 204 205 dec si 206 mov dx, msg.add 207 nearcall isstring? 208 je zz_add 209 210 mov dx, msg.abort 211 nearcall isstring? 212 je zz_abort 213 214 nearcall zz_commit_insert 215 216 217 usesection lDEBUG_DATA_ENTRY 218 219 align 4, db 0 220 .dispatch: 221 dw zz_commit 222 dw msg.commit 223 dw zz_del 224 dw msg.del 225 dw zz_del 226 dw msg.delete 227 dw zz_reloc 228 dw msg.reloc 229 dw zz_reloc 230 dw msg.relocate 231 dw zz_stat 232 dw msg.stat 233 dw zz_list 234 dw msg.list 235 dw zz_match 236 dw msg.match 237 dw 0 ; table end marker 238 239 240 %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 241 usesection lDEBUG_CODE2 242 %else 243 usesection lDEBUG_CODE 244 %endif 245 246 mov bx, .dispatch 247 @@: 248 mov cx, [bx] 249 mov dx, [bx + 2] 250 add bx, 4 251 jcxz @F 252 nearcall isstring? 253 jne @B 254 jmp cx 255 256 @@: 257 mov ax, 0501h 258 nearcall setrc 259 jmp symbolasm_error 260 261 .end: 262 retn 263 264 .switch: 265 nearcall zz_commit_insert 266 267 lodsb 268 nearcall capitalise 269 cmp al, 'S' 270 jne .unknown_switch 271 nearcall zz_switch_s 272 jmp zz_relocated 273 274 .unknown_switch: 275 mov ax, 0502h 276 nearcall setrc 277 278 db __TEST_IMM8 ; (skip dec) 279 @@: 280 dec si 281 @@: 282 jmp symbolasm_error 283 284 zz_switch_s.error_pop_si: 285 pop si 286 jmp @B 287 288 289 ; This is a no-op. In the dispatcher however, 290 ; if this command is matched then the function 291 ; zz_commit_insert was already called. 292 zz_commit: 293 lodsb 294 nearcall chkeol 295 retn 296 297 298 ; This is the only command (other than Z ADD) that 299 ; is executed without first committing the temporary 300 ; inserts. It helps if the debugger gets confused, as 301 ; otherwise all commands will fail during their attempt 302 ; to commit and the debugger becomes unusable. 303 zz_abort: 304 lodsb 305 nearcall chkeol 306 %if _ZZ_INSERT_TEMP 307 and word [sym_storage.main.temp.amount], 0 308 or word [sym_storage.main.temp.first], -1 309 %endif 310 retn 311 312 313 zz_reloc: 314 nearcall skipwhite 315 316 lframe 317 lenter 318 319 mov bx, word [reg_cs] ; default segment = cs 320 nearcall getaddrX 321 322 xor cx, cx 323 lvar dword, start_offset 324 %if _PM 325 push ax 326 push ax 327 dualcall push_cxdx_or_edx 328 %else 329 push cx 330 push dx 331 %endif 332 333 push ax 334 nearcall getlinear_32bit 335 jc symbolasm_error 336 337 mov cx, ax 338 pop ax 339 lvar dword, start_source 340 push dx 341 push cx 342 343 nearcall capitalise 344 cmp al, 'L' 345 je .l 346 347 nearcall getdword 348 sub dx, word [bp + ?start_offset] 349 sbb bx, word [bp + ?start_offset + 2] 350 jc symbolasm_error 351 add dx, 1 352 adc bx, 0 353 jc symbolasm_error 354 jmp @F 355 356 .l: 357 lodsb 358 nearcall getdword 359 @@: 360 lvar dword, length 361 push bx 362 push dx 363 364 mov bx, word [reg_cs] 365 nearcall getaddrX 366 nearcall chkeol 367 nearcall getlinear_32bit 368 jc symbolasm_error 369 370 xchg ax, cx 371 xchg dx, bx ; bx:cx = start of destination 372 373 mov ax, word [bp + ?start_source] 374 mov dx, word [bp + ?start_source + 2] 375 ; dx:ax = start of source 376 377 push word [bp + ?length + 2] 378 push word [bp + ?length] 379 ; stack = length 380 381 dualcall zz_relocate 382 383 lleave 384 385 mov ax, cx 386 387 test ax, ax 388 jnz @F 389 390 mov dx, msg.zz_reloc_amount_none 391 jmp @FF 392 393 @@: 394 mov dx, msg.zz_reloc_amount_1 395 nearcall disp_message 396 mov di, line_out 397 nearcall decword 398 push ax 399 nearcall putsline 400 pop ax 401 mov dx, msg.zz_reloc_amount_2.plural 402 cmp ax, 1 403 jne @F 404 mov dx, msg.zz_reloc_amount_2.singular 405 @@: 406 nearcall disp_message 407 retn 408 409 410 zz_del: 411 nearcall skipwhite 412 413 dec si 414 mov dx, msg.unrefstring 415 nearcall isstring? 416 je delete_unref_str 417 mov dx, msg.range 418 nearcall isstring? 419 je zz_del_range 420 jmp zz_del_match 421 422 423 delete_unref_str: 424 lodsb 425 nearcall chkeol 426 xor si, si 427 jmp .condition 428 429 .loop: 430 push si ; string index 431 push ax ; (reserve space, uninitialised) 432 dualcall getfarpointer.str 433 pop di 434 pop es 435 436 mov cx, word [es:di + ssLength] 437 cmp ch, 0 438 mov ch, 0 439 jne .next 440 441 push si 442 mov bx, si 443 nearcall zz_delete_string 444 pop si 445 jmp .condition 446 447 .next: 448 ; The maximum length of a SYMSTR is 255 + SYMSTR_size + 3. 449 nearcall zz_get_symstr_length_indices.ssLength_in_cx 450 451 ; Due to the maximum length, both the byte index and the 452 ; SYMSTR_index_size index delta fit into a word each. 453 add si, cx ; keep count of what index we're at 454 .condition: 455 cmp si, word [sym_storage.str.free] 456 jb .loop ; if not yet at free space --> 457 retn 458 459 460 zz_del_match: 461 nearcall skipwhite 462 463 db __TEST_IMM8 ; skip stc, NC 464 465 ; INP: ss:bx -> symbol name 466 ; cx = length of name 467 .add_poison_entrypoint: 468 stc 469 lframe 470 lvar word, string_hash 471 lenter 472 lvar word, string_length 473 push cx 474 lvar word, bit_0_is_poison 475 pushf 476 lvar dword, string_pointer 477 push ss 478 push bx 479 480 mov cx, 0 481 482 lvar word, matched_amount 483 push cx 484 485 jc .poison_skip_1 486 487 488 mov ah, al 489 cmp al, "'" 490 je .symbol_quoted 491 cmp al, '"' 492 je .symbol_quoted 493 dec si 494 mov ah, 0 495 .symbol_quoted: 496 mov word [bp + ?string_pointer], si 497 .symbol_loop: 498 lodsb 499 cmp ah, 0 500 jne @F 501 nearcall ifsep 502 je .symbol_end 503 jmp .symbol_next 504 @@: 505 cmp al, 13 506 je .error 507 test al, al 508 jz .error 509 cmp al, ah 510 jne @F 511 lodsb 512 nearcall ifsep 513 jne .error 514 jmp .symbol_end 515 @@: 516 .symbol_next: 517 inc cx 518 jmp .symbol_loop 519 520 .error: 521 mov ax, 0503h 522 nearcall setrc 523 jmp symbolasm_error 524 525 .symbol_end: 526 test cx, cx 527 jz .error 528 mov word [bp + ?string_length], cx 529 530 nearcall chkeol 531 532 533 .poison_skip_1: 534 push ds 535 lds si, [bp + ?string_pointer] 536 mov cx, word [bp + ?string_length] 537 nearcall zz_hash 538 mov word [bp + ?string_hash], bx 539 pop ds 540 541 lvar word, inner_main_index 542 push ax 543 544 .loop: 545 ; ?inner_main_index used as parameter 546 push word [bp + ?string_pointer + 2] 547 push word [bp + ?string_pointer] 548 push word [bp + ?string_length] 549 mov bx, word [bp + ?string_hash] 550 551 dualcall zz_match_symbol 552 jc .none 553 554 inc word [bp + ?matched_amount] 555 push dx 556 mov bx, word [bp + ?inner_main_index] 557 nearcall zz_delete_main 558 pop bx 559 nearcall zz_delete_hash 560 561 jmp .loop 562 563 .none: 564 mov ax, word [bp + ?matched_amount] 565 testopt [bp + ?bit_0_is_poison], 1 566 lleave 567 jz @F 568 test ax, ax 569 jz .retn 570 @@: 571 572 zz_del_display_amount: 573 test ax, ax 574 jnz @F 575 576 mov dx, msg.zz_del_amount_none 577 jmp @FF 578 579 @@: 580 mov dx, msg.zz_del_amount_1 581 nearcall disp_message 582 mov di, line_out 583 nearcall decword 584 push ax 585 nearcall putsline 586 pop ax 587 mov dx, msg.zz_del_amount_2.plural 588 cmp ax, 1 589 jne @F 590 mov dx, msg.zz_del_amount_2.singular 591 @@: 592 nearcall disp_message 593 zz_del_match.retn: 594 retn 595 596 597 zz_del_range: 598 lodsb 599 600 lframe 601 lenter 602 603 mov bx, word [reg_cs] ; default segment = cs 604 nearcall getaddrX 605 606 xor cx, cx 607 lvar dword, start_offset 608 %if _PM 609 push ax 610 push ax 611 dualcall push_cxdx_or_edx 612 %else 613 push cx 614 push dx 615 %endif 616 617 push ax 618 nearcall getlinear_32bit 619 jc symbolasm_error 620 621 mov cx, ax 622 pop ax 623 lvar dword, start_source 624 push dx 625 push cx 626 627 nearcall capitalise 628 cmp al, 'L' 629 je .l 630 631 nearcall getdword 632 sub dx, word [bp + ?start_offset] 633 sbb bx, word [bp + ?start_offset + 2] 634 jc symbolasm_error 635 add dx, 1 636 adc bx, 0 637 jc symbolasm_error 638 jmp @F 639 640 .l: 641 lodsb 642 nearcall getdword 643 @@: 644 lvar dword, length 645 push bx 646 push dx 647 648 nearcall chkeol 649 650 mov ax, word [bp + ?start_source] 651 mov dx, word [bp + ?start_source + 2] 652 ; dx:ax = start 653 654 mov bx, ax 655 mov cx, dx 656 add bx, word [bp + ?length] 657 adc cx, word [bp + ?length + 2] 658 sub bx, 1 659 sbb cx, 0 ; cx:bx = end 660 nearcall binsearchmain 661 push cx 662 jcxz .done 663 xchg ax, bx ; ax = main index to delete 664 665 .loop: 666 push ax ; preserve main index 667 push cx ; preserve number of entries 668 nearcall zz_delete_main_and_its_hash 669 pop cx 670 pop ax 671 loop .loop ; do next deletion (same main index) --> 672 mov word [stack_low_address], str_buffer 673 .done: 674 pop ax 675 lleave 676 jmp zz_del_display_amount 677 678 679 zz_stat: 680 lodsb 681 nearcall chkeol 682 683 nearcall list_sym_storage_usage 684 retn 685 686 687 zz_match: 688 nearcall skipwhite 689 690 lframe 691 lvar word, string_length 692 lvar word, string_hash 693 lenter 694 lequ 1, flag_is_add 695 lequ 2, flag_is_base 696 lequ 4, flag_is_single_line 697 mov bx, ?flag_is_single_line 698 lvar word, flags 699 push bx 700 lvar dword, string_pointer 701 push ss 702 push bx 703 704 dec si 705 mov dx, msg.add 706 nearcall isstring? 707 jne @F 708 709 inc byte [bp + ?flags] ; set ?flag_is_add 710 711 @@: 712 nearcall skipwhite 713 714 dec si 715 mov dx, msg.base 716 nearcall isstring? 717 jne @F 718 719 or byte [bp + ?flags], ?flag_is_base 720 721 @@: 722 nearcall skipwhite 723 724 xor cx, cx 725 mov ah, al 726 cmp al, "'" 727 je .symbol_quoted 728 cmp al, '"' 729 je .symbol_quoted 730 dec si 731 mov ah, 0 732 .symbol_quoted: 733 mov word [bp + ?string_pointer], si 734 .symbol_loop: 735 lodsb 736 cmp ah, 0 737 jne @F 738 nearcall ifsep 739 je .symbol_end 740 jmp .symbol_next 741 @@: 742 cmp al, 13 743 je .error 744 test al, al 745 jz .error 746 cmp al, ah 747 jne @F 748 lodsb 749 nearcall ifsep 750 jne .error 751 jmp .symbol_end 752 @@: 753 .symbol_next: 754 inc cx 755 jmp .symbol_loop 756 757 .error: 758 mov ax, 0504h 759 nearcall setrc 760 jmp symbolasm_error 761 762 .symbol_end: 763 test cx, cx 764 jz .error 765 mov word [bp + ?string_length], cx 766 767 nearcall chkeol 768 769 770 push ds 771 lds si, [bp + ?string_pointer] 772 mov cx, word [bp + ?string_length] 773 nearcall zz_hash 774 mov word [bp + ?string_hash], bx 775 pop ds 776 777 lvar word, inner_main_index 778 push ax 779 780 ; ?inner_main_index used as parameter 781 push word [bp + ?string_pointer + 2] 782 push word [bp + ?string_pointer] 783 push word [bp + ?string_length] 784 785 dualcall zz_match_symbol 786 jc .none 787 ; Here, dx, and bx need to be preserved until 788 ; the next call to zz_match_symbol. 789 push dx 790 push bx 791 792 push word [bp + ?inner_main_index] 793 push word [bp + ?flags] 794 dualcall zz_list_symbol.first 795 jmp .next 796 797 798 .loop: 799 ; ?inner_main_index used as parameter 800 push word [bp + ?string_pointer + 2] 801 push word [bp + ?string_pointer] 802 push word [bp + ?string_length] 803 804 dualcall zz_match_symbol.continue 805 jc .end 806 807 ; Here, dx, and bx need to be preserved until 808 ; the next call to zz_match_symbol. 809 push dx 810 push bx 811 812 push word [bp + ?inner_main_index] 813 push word [bp + ?flags] 814 dualcall zz_list_symbol.subsequent 815 .next: 816 pop bx 817 pop dx 818 jmp .loop 819 820 821 .none: 822 mov dx, msg.zz_match_none 823 test byte [bp + ?flags], ?flag_is_add 824 jz @F 825 mov dx, msg.zz_match_add_none 826 @@: 827 nearcall disp_message 828 829 .end: 830 lleave 831 retn 832 833 834 zz_list: 835 lframe 836 lenter 837 lequ 1, flag_is_add 838 lequ 2, flag_is_base 839 xor ax, ax 840 lvar word, flags 841 push ax 842 lvar dword, start 843 push ax 844 push ax 845 dec ax 846 lvar dword, end 847 push ax 848 push ax 849 850 nearcall skipwhite 851 852 dec si 853 mov dx, msg.add 854 nearcall isstring? 855 jne @F 856 857 inc byte [bp + ?flags] ; set ?flag_is_add 858 859 @@: 860 nearcall skipwhite 861 862 dec si 863 mov dx, msg.base 864 nearcall isstring? 865 jne @F 866 867 or byte [bp + ?flags], ?flag_is_base 868 869 @@: 870 nearcall skipwhite 871 872 nearcall iseol? 873 je .do 874 875 mov bx, word [reg_cs] 876 nearcall getlinearaddr 877 mov word [bp + ?start], dx 878 mov word [bp + ?start + 2], bx 879 mov word [bp + ?end], dx 880 mov word [bp + ?end + 2], bx 881 882 nearcall skipwh0 883 nearcall iseol? 884 je .do 885 886 mov bx, word [reg_cs] 887 nearcall getlinearaddr 888 mov word [bp + ?end], dx 889 mov word [bp + ?end + 2], bx 890 nearcall chkeol 891 892 .do: 893 test byte [bp + ?flags], ?flag_is_add 894 jz @F 895 mov dx, msg.zz_list_add_range 896 nearcall disp_message 897 @@: 898 mov dx, msg.zz_list_range_first 899 nearcall disp_message 900 mov ax, word [bp + ?start + 2] 901 nearcall disp_ax_hex 902 mov ax, word [bp + ?start] 903 nearcall disp_ax_hex 904 mov dx, msg.zz_list_range_second 905 nearcall disp_message 906 mov ax, word [bp + ?end + 2] 907 nearcall disp_ax_hex 908 mov ax, word [bp + ?end] 909 nearcall disp_ax_hex 910 mov dx, msg.zz_list_range_third 911 nearcall disp_message 912 913 mov dx, word [bp + ?start + 2] 914 mov ax, word [bp + ?start] 915 mov cx, word [bp + ?end + 2] 916 mov bx, word [bp + ?end] 917 918 nearcall binsearchmain 919 jcxz .none 920 921 push bx 922 push word [bp + ?flags] 923 dualcall zz_list_symbol.first 924 jmp .next 925 926 .loop: 927 push bx 928 push word [bp + ?flags] 929 dualcall zz_list_symbol.subsequent 930 .next: 931 inc bx 932 loop .loop 933 .end: 934 mov dx, msg.zz_list_end 935 nearcall disp_message 936 jmp .ret 937 938 .none: 939 mov dx, msg.zz_list_none 940 test byte [bp + ?flags], ?flag_is_add 941 jz @F 942 mov dx, msg.zz_list_add_none 943 @@: 944 nearcall disp_message 945 946 .ret: 947 lleave 948 retn 949 950 951 ; INP: word [ss:sp + 2] = main index 952 ; word [ss:sp] = list flags 953 ; CHG: ax, dx, es, di 954 dualfunction 955 zz_list_symbol: 956 .first: 957 db __TEST_IMM8 ; (skip stc, NC) 958 .subsequent: 959 stc 960 lframe dualdistance 961 lpar word, main_index 962 lequ 1, flag_is_add 963 lequ 2, flag_is_base 964 lequ 4, flag_is_single_line 965 lpar word, flags 966 lenter 967 lvar word, bit_0_is_subsequent 968 pushf 969 mov ax, -1 970 lvar word, base_index 971 push ax 972 push bx 973 974 push word [bp + ?main_index] 975 push ax ; (reserve space, uninitialised) 976 dualcall getfarpointer.main 977 pop di 978 pop es 979 980 test byte [bp + ?bit_0_is_subsequent], 1 981 jnz .loop 982 983 test byte [bp + ?flags], ?flag_is_single_line 984 jnz .loop_first 985 mov dx, msg.zz_list_start 986 nearcall disp_message 987 jmp .loop_first 988 .loop: 989 mov dx, msg.zz_list_between 990 nearcall disp_message 991 .loop_first: 992 mov dx, msg.zz_list_first 993 test byte [bp + ?flags], ?flag_is_add 994 jz @F 995 mov dx, msg.zz_list_add_first 996 @@: 997 nearcall disp_message 998 mov dx, word [es:di + smLinear + 2] 999 mov ax, word [es:di + smLinear] 1000 1001 test byte [bp + ?flags], ?flag_is_base 1002 jz @F 1003 sub ax, word [vregs + 1 * 4] 1004 sbb dx, word [vregs + 1 * 4 + 2] 1005 jmp .have_base 1006 @@: 1007 1008 mov bx, word [es:di + smBase] 1009 cmp bx, -1 1010 je .have_base 1011 mov word [bp + ?base_index], bx 1012 1013 push bx 1014 push ax 1015 dualcall getfarpointer.main 1016 pop di 1017 pop es 1018 1019 sub ax, word [es:di + smLinear] 1020 sbb dx, word [es:di + smLinear + 2] 1021 1022 push word [bp + ?main_index] 1023 push ax ; (reserve space, uninitialised) 1024 dualcall getfarpointer.main 1025 pop di 1026 pop es 1027 .have_base: 1028 1029 push ax 1030 mov ax, dx 1031 test ah, ah 1032 jz @F 1033 xchg al, ah 1034 nearcall disp_al_hex 1035 xchg al, ah 1036 @@: 1037 nearcall disp_al_hex 1038 pop ax 1039 nearcall disp_ax_hex 1040 1041 mov al, 'h' 1042 test byte [bp + ?flags], ?flag_is_add 1043 jz @F 1044 nearcall putc 1045 @@: 1046 1047 test byte [bp + ?flags], ?flag_is_base 1048 jz @F 1049 mov dx, msg.zz_list_base 1050 nearcall disp_message 1051 jmp .displayed_base 1052 @@: 1053 mov bx, word [bp + ?base_index] 1054 cmp bx, -1 1055 je .displayed_base 1056 1057 mov dx, msg.zz_list_base_symbol 1058 nearcall disp_message 1059 1060 push bx 1061 dualcall displaystring 1062 1063 push word [bp + ?main_index] 1064 push ax ; (reserve space, uninitialised) 1065 dualcall getfarpointer.main 1066 pop di 1067 pop es 1068 1069 .displayed_base: 1070 1071 mov dx, msg.zz_list_second 1072 test byte [bp + ?flags], ?flag_is_add 1073 jz @F 1074 mov dx, msg.zz_list_add_second 1075 @@: 1076 nearcall disp_message 1077 mov ax, word [es:di + smOffset + 2] 1078 test ax, ax 1079 jz @F 1080 nearcall disp_ax_hex 1081 @@: 1082 mov ax, word [es:di + smOffset] 1083 nearcall disp_ax_hex 1084 1085 mov dx, msg.zz_list_middle 1086 test byte [bp + ?flags], ?flag_is_add 1087 jz @F 1088 mov dx, msg.zz_list_add_middle 1089 @@: 1090 nearcall disp_message 1091 push word [bp + ?main_index] 1092 dualcall displaystring 1093 mov dx, msg.zz_list_last 1094 test byte [bp + ?flags], ?flag_is_add 1095 jz @F 1096 mov dx, msg.zz_list_add_last 1097 @@: 1098 nearcall disp_message 1099 1100 pop bx 1101 lleave 1102 dualreturn 1103 lret 1104 1105 1106 zz_add: 1107 nearcall skipwhite 1108 1109 xor bx, bx 1110 lframe 1111 lenter 1112 lvar dword, string_pointer 1113 push ss 1114 push bx 1115 lvar word, string_length 1116 push bx 1117 lvar dword, linear 1118 push bx 1119 push bx 1120 lvar dword, offset 1121 push bx 1122 push bx 1123 lvar word, insertflags 1124 push bx 1125 1126 clropt [internalflags2], dif2_poison 1127 or word [sym_storage.main.based.base], -1 1128 ; set base to none 1129 ; base is set by expression evaluator if any is used 1130 1131 .loop: 1132 nearcall iseol? 1133 jne @F 1134 1135 ; ?linear used as parameter to zz_insert 1136 ; ?offset used as parameter to zz_insert 1137 ; ?insertflags used as parameter to zz_insert 1138 les dx, [bp + ?string_pointer] 1139 mov cx, word [bp + ?string_length] 1140 test cx, cx 1141 jz .error 1142 1143 testopt [internalflags2], dif2_poison 1144 jnz .poisoned 1145 1146 dualcall zz_insert 1147 1148 .ret: 1149 lleave code 1150 retn 1151 1152 1153 ; cx = symbol name length 1154 .poisoned: 1155 nearcall zz_commit_insert 1156 1157 mov ax, 050Dh 1158 nearcall setrc 1159 mov dx, msg.poison_block 1160 nearcall putsz_error 1161 1162 mov bx, word [bp + ?string_pointer] 1163 nearcall zz_del_match.add_poison_entrypoint 1164 jmp .ret 1165 1166 1167 @@: 1168 dec si 1169 lodsw ; get single-letter type name, if any 1170 nearcall capitalise ; uppercase type name letter in al 1171 cmp ah, ':' 1172 jne @F 1173 mov ah, '=' 1174 @@: 1175 dec si ; -> at = or : 1176 cmp ax, "S=" 1177 je .symbol 1178 cmp ax, "O=" 1179 je .offset 1180 cmp ax, "L=" 1181 je .linear 1182 cmp ax, "F=" 1183 je .flags 1184 dec si ; -> at first letter of type name 1185 1186 mov dx, msg.symbol 1187 nearcall isstring? 1188 je .symbol 1189 mov dx, msg.offset 1190 nearcall isstring? 1191 je .offset 1192 mov dx, msg.linear 1193 nearcall isstring? 1194 je .linear 1195 mov dx, msg.flags 1196 nearcall isstring? 1197 je .flags 1198 1199 lodsb 1200 mov bx, word [reg_cs] 1201 nearcall getaddrX 1202 1203 xor cx, cx 1204 %if _PM 1205 push ax 1206 push ax 1207 dualcall push_cxdx_or_edx 1208 pop word [bp + ?offset] 1209 pop word [bp + ?offset + 2] 1210 %else 1211 mov word [bp + ?offset + 2], cx 1212 mov word [bp + ?offset], dx 1213 %endif 1214 push ax 1215 nearcall getlinear_32bit 1216 jc .error 1217 mov word [bp + ?linear], ax 1218 mov word [bp + ?linear + 2], dx 1219 pop ax ; al = next character 1220 jmp .next 1221 1222 .skip_equal: 1223 lodsb 1224 cmp al, '=' 1225 je @F 1226 cmp al, ':' 1227 jne .error 1228 @@: 1229 lodsb 1230 retn 1231 1232 .flags: 1233 call .skip_equal 1234 nearcall getword 1235 mov word [bp + ?insertflags], dx 1236 jmp .next 1237 1238 .offset: 1239 call .skip_equal 1240 nearcall getexpression ; bx:dx = expression 1241 mov word [bp + ?offset], dx 1242 mov word [bp + ?offset + 2], bx 1243 jmp .next 1244 1245 .linear: 1246 call .skip_equal 1247 nearcall getexpression ; bx:dx = expression 1248 mov word [bp + ?linear], dx 1249 mov word [bp + ?linear + 2], bx 1250 jmp .next 1251 1252 .symbol: 1253 call .skip_equal 1254 xor cx, cx 1255 mov ah, al 1256 cmp al, "'" 1257 je .symbol_quoted 1258 cmp al, '"' 1259 je .symbol_quoted 1260 dec si 1261 mov ah, 0 1262 .symbol_quoted: 1263 mov word [bp + ?string_pointer], si 1264 .symbol_loop: 1265 lodsb 1266 cmp ah, 0 1267 jne @F 1268 nearcall ifsep 1269 je .symbol_end 1270 jmp .symbol_next 1271 @@: 1272 cmp al, 13 1273 je .error 1274 test al, al 1275 jz .error 1276 cmp al, ah 1277 jne @F 1278 lodsb 1279 nearcall ifsep 1280 jne .error 1281 jmp .symbol_end 1282 @@: 1283 .symbol_next: 1284 inc cx 1285 jmp .symbol_loop 1286 1287 .symbol_end: 1288 jcxz .error 1289 xchg cx, word [bp + ?string_length] 1290 test cx, cx 1291 jnz .error 1292 .next: 1293 nearcall skipwh0 1294 jmp .loop 1295 1296 1297 .error: 1298 mov ax, 0505h 1299 nearcall setrc 1300 jmp symbolasm_error 1301 1302 lleave ctx 1303 1304 1305 ; INP: si -> first character after /S switch start 1306 ; OUT: al = first character after parsed switch end 1307 ; si -> next character 1308 zz_switch_s: section_of_function 1309 lodsb 1310 nearcall capitalise 1311 cmp al, 'R' 1312 jne .notr 1313 clropt [internalflags2], dif2_sym_req_mask 1314 setopt [internalflags2], dif2_sym_req_86mm 1315 jmp @F 1316 .notr: 1317 cmp al, '*' 1318 jne .notasterisk 1319 clropt [internalflags2], dif2_sym_req_mask 1320 setopt [internalflags2], dif2_sym_req_86mm | dif2_sym_req_xms 1321 jmp @F 1322 .notasterisk: 1323 cmp al, 'X' 1324 jne .notx 1325 clropt [internalflags2], dif2_sym_req_mask 1326 setopt [internalflags2], dif2_sym_req_xms 1327 @@: 1328 lodsb 1329 cmp al, 32 1330 push ax 1331 push si 1332 ja .x_cont 1333 jmp .end 1334 .x_cont: 1335 pop si 1336 pop ax 1337 .notx: 1338 cmp al, ':' 1339 je .skip 1340 cmp al, '=' 1341 jne symbolasm_error 1342 .skip: 1343 inc si 1344 push si 1345 dec si 1346 mov dx, msg.max 1347 nearcall isstring? 1348 jne @F 1349 lodsb 1350 mov dx, -1 1351 mov bx, dx 1352 jmp .common 1353 1354 @@: 1355 pop ax 1356 lodsb 1357 push si 1358 cmp al, '(' 1359 jne .not_expr 1360 lodsb 1361 nearcall getexpression 1362 nearcall skipwh0 1363 cmp al, ')' 1364 lodsb 1365 jne symbolasm_error 1366 jmp .common 1367 1368 .not_expr: 1369 nearcall zz_get_literal 1370 .common: 1371 cmp bx, -1 1372 jne @F 1373 cmp dx, -1 1374 je @FFF 1375 @@: 1376 testopt [internalflags2], dif2_sym_req_86mm 1377 jnz @F 1378 test bx, bx 1379 jnz .error_pop_si 1380 cmp dx, kib((SYMMAIN_size + SYMHASH_size + SYMSTR_index_size) * 65535) 1381 ja .error_pop_si 1382 jmp @FF 1383 1384 @@: 1385 test bx, bx 1386 jnz .error_pop_si 1387 cmp dx, _86MM_SYMBOL_TABLE_MAX 1388 ja .error_pop_si 1389 @@: 1390 1391 pop cx ; (discard si) 1392 push ax ; preserve next character 1393 push si 1394 xchg ax, dx ; ax = size 1395 test ax, ax 1396 jz .free 1397 1398 push ax ; on stack: originally requested amount KiB 1399 %if _BOOTLDR 1400 testopt [internalflags], nodosloaded 1401 jnz .notxms 1402 %endif 1403 1404 %if _APPLICATION || _DEVICE 1405 testopt [internalflags2], dif2_sym_req_xms 1406 jz .notxms 1407 1408 cmp word [zz_xms.entry + 4], 0 1409 jne @F 1410 cmp word [zz_xms.entry + 6], 0 1411 jne @F 1412 cmp word [zz_xms.entry + 2], 0 1413 je .no_xms 1414 @@: 1415 1416 cmp ax, -1 1417 jne @F 1418 1419 mov ax, kib( (SYMHASH_index_size + SYMMAIN_index_size + SYMSTR_index_size) * 64 * 1024) ; ax = how many KiB 1422 @@: 1423 mov bx, ax 1424 xor dx, dx 1425 mov cx, 6 1426 .loop_shl_6: 1427 shl ax, 1 1428 rcl dx, 1 ; to paragraphs 1429 loop .loop_shl_6 1430 1431 @@: 1432 push dx 1433 push ax 1434 mov ah, 09h 1435 add bx, kib(fromparas(paras(ssString + 255)) + XMSTRANSFER_default_size) 1436 jc symbolasm_error 1437 mov dx, bx 1438 push bx 1439 nearcall zz_call_xms ; dx = allocated handle 1440 dec ax 1441 pop bx ; bx = how many KiB allocated 1442 pop ax 1443 pop cx ; cx:ax = how many paragraphs allocated 1444 ; (not including the XMS transfer buffer) 1445 jz @F 1446 mov ax, 0506h 1447 mov dx, msg.zz_fail_xms_alloc 1448 jmp .no_xms.error 1449 1450 @@: 1451 add sp, 2 ; discard ax on stack 1452 jmp xms_init 1453 1454 .no_xms: ; no XMS driver 1455 mov ax, 0507h 1456 mov dx, msg.zz_no_xms 1457 .no_xms.error: 1458 nearcall disp_message 1459 testopt [internalflags2], dif2_sym_req_86mm 1460 jnz .notxms 1461 mov dx, msg.empty_message 1462 nearcall setrc 1463 %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 1464 jmp exit_error_msg 1465 %else 1466 jmp exit_error_msg_code 1467 %endif 1468 %endif 1469 1470 .notxms: 1471 pop ax ; restore KiB requested (-1 = max) 1472 1473 cmp ax, -1 ; max ? 1474 jne @F 1475 mov ax, _86MM_SYMBOL_TABLE_MAX 1476 ; set maximum size 1477 @@: 1478 1479 mov bx, ax 1480 mov cl, 6 1481 shl ax, cl ; to paragraphs 1482 1483 %if _BOOTLDR 1484 %if _APPLICATION || _DEVICE 1485 testopt [internalflags], nodosloaded 1486 jz @FF 1487 %endif 1488 test ax, ax 1489 jnz @F 1490 mov dx, msg.zz_switch_s_internal_error 1491 mov ax, 0509h 1492 nearcall setrc 1493 jmp .putsz_end 1494 1495 @@: 1496 dec ax ; allow for image ident paragraph 1497 @@: 1498 %endif 1499 1500 push bx 1501 mov cx, ax 1502 xor bx, bx 1503 nearcall shift_left_4_bxcx 1504 1505 cmp word [zz_xms.handle], -1 1506 jne @FF 1507 1508 cmp word [sym_storage.start + 2], 0 1509 jne @F 1510 cmp word [sym_storage.start], 0 1511 je @FF 1512 @@: 1513 1514 push word [sym_storage.start + 2] 1515 push word [sym_storage.start] 1516 dualcall normalise_pointer_with_displacement_bxcx 1517 pop cx 1518 pop bx 1519 1520 cmp word [sym_storage.end + 2], bx 1521 jne @F 1522 cmp word [sym_storage.end], cx 1523 je .no_size_change 1524 @@: 1525 1526 nearcall InDOS 1527 jz @F 1528 1529 %if _BOOTLDR 1530 %if _APPLICATION || _DEVICE 1531 testopt [internalflags], nodosloaded 1532 jz .notboot1 1533 %endif 1534 testopt [internalflags2], dif2_boot_loaded_kernel 1535 jz @F 1536 1537 mov dx, msg.zz_switch_s_boot_loaded_kernel 1538 jmp .putsz_end_pop 1539 1540 .notboot1: 1541 %endif 1542 1543 mov dx, msg.zz_switch_s_indos 1544 .putsz_end_pop: 1545 pop bx 1546 .putsz_end: 1547 nearcall putsz_error 1548 jmp .end 1549 1550 @@: 1551 1552 mov di, ax 1553 1554 %if _BOOTLDR 1555 testopt [internalflags], nodosloaded 1556 jnz @F 1557 %endif 1558 %if _APPLICATION || _DEVICE 1559 testopt [internalflags2], dif2_createdprocess 1560 jz @F 1561 1562 mov cx, word [created_psp] 1563 cmp cx, word [pspdbe] ; current PSP the created one ? 1564 jne @F ; no --> 1565 1566 dec cx 1567 %if _PM 1568 mov ax, cx 1569 nearcall setes2ax 1570 %else 1571 mov es, cx ; => MCB 1572 %endif 1573 inc cx 1574 cmp word [es:1], cx ; right owner ? 1575 jne @F ; no --> 1576 mov cx, word [created_size] 1577 cmp cx, word [es:3] ; right size ? 1578 jne @F ; no --> 1579 1580 mov cx, word [created_psp] 1581 mov bx, 1000h 1582 mov word [created_size], bx 1583 mov ah, 4Ah 1584 push cx ; save segment value 1585 push cx ; = value for es 1586 dual2call _doscall_return_es ; resize to 64 KiB 1587 pop cx ; (discard) 1588 pop cx ; = segment 1589 dec cx 1590 %if _PM 1591 mov ax, cx 1592 nearcall setes2ax 1593 %else 1594 mov es, cx ; => MCB 1595 %endif 1596 inc cx 1597 mov word [es:1], cx ; restore owner to debuggee process 1598 %endif 1599 1600 @@: 1601 mov ax, di 1602 pop bx 1603 1604 .no_size_change: 1605 push ss 1606 pop es 1607 push ss 1608 pop ds 1609 push ax ; size in paragraphs 1610 mov dx, msg.zz_switch_s_received 1611 nearcall putsz 1612 mov di, line_out 1613 mov ax, bx 1614 nearcall decword 1615 mov ax, " K" 1616 stosw 1617 mov ax, "iB" 1618 stosw 1619 mov al, '.' 1620 stosb 1621 nearcall putsline_crlf 1622 1623 nearcall zz_compact 1624 pop cx ; size in paragraphs 1625 1626 lframe 1627 lvar dword, common_size_bytes 1628 lenter 1629 lvar word, req_size_para 1630 push cx 1631 1632 mov dx, cx 1633 xor bx, bx 1634 nearcall shift_left_4_bxcx ; new size in bytes 1635 1636 1637 cmp word [zz_xms.handle], -1 1638 je .fromnotxms1 1639 1640 .fromxms1: 1641 cmp bx, word [sym_storage.xms.free + 2] 1642 jne @F 1643 cmp cx, word [sym_storage.xms.free] 1644 @@: 1645 jb .new_smaller 1646 mov bx, word [sym_storage.xms.free + 2] 1647 mov cx, word [sym_storage.xms.free] 1648 jmp .fromxms_old_smaller 1649 1650 .fromnotxms1: 1651 push word [sym_storage.start + 2] 1652 push word [sym_storage.start] 1653 dualcall normalise_pointer_with_displacement_bxcx 1654 pop cx 1655 pop bx ; -> after allocated block, with new size 1656 1657 cmp bx, word [sym_storage.free + 2] 1658 jne @F 1659 cmp cx, word [sym_storage.free] 1660 @@: 1661 je .lframe_no_reallocation_needed 1662 jb .new_smaller 1663 .old_smaller: 1664 mov bx, word [sym_storage.free + 2] 1665 mov cx, word [sym_storage.free] 1666 jmp .got_smaller 1667 1668 .new_smaller: 1669 ..@new_smaller: 1670 mov dx, msg.zz_too_full 1671 nearcall putsz_error 1672 jmp .lframe_end 1673 1674 .got_smaller: 1675 push bx 1676 push cx 1677 dualcall pointer_to_linear 1678 xchg dx, bx 1679 xchg ax, cx ; bx:cx = linear after end 1680 push word [sym_storage.start + 2] 1681 push word [sym_storage.start] 1682 dualcall pointer_to_linear ; dx:ax = linear start 1683 sub cx, ax 1684 sbb bx, dx ; end - start = size 1685 ; bx:cx = smaller of current size and requested 1686 ; (in bytes) 1687 .fromxms_old_smaller: 1688 mov word [bp + ?common_size_bytes], cx 1689 mov word [bp + ?common_size_bytes + 2], bx 1690 1691 nearcall bxcx_to_cx_paragraphs 1692 mov dx, cx ; dx = smaller in paragraphs 1693 1694 %if _BOOTLDR 1695 %if _APPLICATION || _DEVICE 1696 testopt [internalflags], nodosloaded 1697 jz .notboot2 1698 %endif 1699 1700 push dx 1701 nearcall bootgetmemorysize 1702 pop bx 1703 int 12h 1704 mov cl, 10 - 4 1705 shl ax, cl 1706 cmp ax, dx 1707 je @F 1708 1709 mov dx, msg.zz_switch_s_boot_rpl 1710 jmp .lframe_end_putsz_error 1711 1712 @@: 1713 mov dx, [boot_new_memsizekib] 1714 shl dx, cl 1715 cmp ax, dx 1716 je @F 1717 1718 mov dx, msg.zz_switch_s_boot_memsize_differ 1719 jmp .lframe_end_putsz_error 1720 1721 @@: 1722 cmp word [zz_xms.handle], -1 1723 jne .fromxms2 1724 1725 mov cx, [bp + ?req_size_para] 1726 inc cx 1727 sub ax, cx 1728 ; => transfer buffer 1729 %if 0 1730 new = how much to allocate (?req_size_para + 1 paragraph) 1731 ebda = how large is EBDA 1732 old = how much was allocated 1733 ?common_size_bytes = at most the smaller of new - 16B and old - 16B 1734 transfer area must hold ?common_size_bytes 1735 1736 transfer area may not overlap old source 1737 transfer area may not overlap ebda source 1738 transfer area may not overlap ebda target 1739 transfer area may not overlap new target 1740 1741 ebda source and ebda target may overlap 1742 old source and new target may overlap 1743 1744 1745 new=100 ebda=1 old=1 memsize=200 1746 98 => transfer 1747 198 => ebda 1748 199 => old 1749 100 => target new 1750 99 => target ebda 1751 1752 new=1 ebda=1 old=100 memsize=200 1753 98 => transfer 1754 99 => ebda 1755 100 => old 1756 199 => target new 1757 198 => target ebda 1758 1759 new=2 ebda=100 old=1 memsize=200 1760 97 => transfer 1761 99 => ebda 1762 199 => old 1763 198 => target new 1764 98 => target ebda 1765 1766 new=50 ebda=50 old=1 memsize=200 1767 99 => transfer 1768 149 => ebda 1769 199 => old 1770 150 => target new 1771 100 => target ebda 1772 1773 new=1 ebda=50 old=50 memsize=200 1774 99 => transfer 1775 100 => ebda 1776 150 => old 1777 199 => target new 1778 149 => target ebda 1779 1780 new=40 ebda=1 old=50 memsize=200 1781 109 => transfer 1782 149 => ebda 1783 150 => old 1784 160 => target new 1785 159 => target ebda 1786 %endif 1787 jc @F 1788 cmp ax, 1000h 1789 jae @FF 1790 @@: 1791 mov dx, msg.zz_switch_s_boot_transfer_too_low 1792 jmp .lframe_end_putsz_error 1793 1794 @@: 1795 mov cx, word [bp + ?common_size_bytes] 1796 mov bx, word [bp + ?common_size_bytes + 2] 1797 push ax ; allocated transfer buffer 1798 nearcall zz_transfer_buffer ; transfer into transfer buffer 1799 pop word [sym_storage.start + 2] 1800 1801 .fromxms2: 1802 mov ax, dx ; => current EBDA 1803 mov dx, ss 1804 dec dx ; => NDEB image ident paragraph 1805 sub dx, [bp + ?req_size_para] 1806 push dx 1807 dec dx ; => target symbol table image ident 1808 xor cx, cx ; size of EBDA to move (if none) 1809 push ds 1810 mov ds, cx 1811 mov bx, word [40Eh] ; new ref in word [0:40Eh] (if none) 1812 pop ds 1813 cmp byte [ boot_ebdaflag ], 0 ; any EBDA ? 1814 jz .noebda 1815 1816 push ds 1817 mov ds, ax ; => EBDA 1818 xor bx, bx 1819 mov bl, byte [ 0 ] ; EBDA size in KiB 1820 mov cl, 6 1821 shl bx, cl ; *64, to paragraphs 1822 mov cx, bx ; = size of EBDA to move (in paragraphs) 1823 sub dx, cx ; => target EBDA 1824 mov bx, dx ; = new EBDA reference to put in word [0:40Eh] 1825 pop ds 1826 1827 .noebda: 1828 1829 nearcall movp ; move EBDA 1830 mov cl, 6 1831 shr dx, cl ; to KiB 1832 mov word [ boot_new_memsizekib ], dx 1833 push ds 1834 xor cx, cx 1835 mov ds, cx 1836 mov word [40Eh], bx ; = new ref in word [0:40Eh] 1837 mov word [413h], dx 1838 pop ds 1839 1840 pop ax 1841 mov cx, word [bp + ?common_size_bytes] 1842 mov bx, word [bp + ?common_size_bytes + 2] 1843 1844 1845 cmp word [zz_xms.handle], -1 1846 je .fromnotxms3 1847 1848 .fromxms3: 1849 nearcall zz_xms_to_86mm 1850 nearcall zz_xms_try_free_handle 1851 jmp .from3common 1852 1853 .fromnotxms3: 1854 push ax 1855 nearcall zz_transfer_buffer ; transfer into target 1856 pop ax 1857 1858 .from3common: 1859 push ax 1860 dec ax 1861 mov bx, word [bp + ?req_size_para] 1862 inc bx ; = how many paragraphs used 1863 mov es, ax ; => paragraph for imageident 1864 xor di, di ; -> imageident target 1865 1866 mov word [zz_imageident.size], bx 1867 ; set image ident size 1868 mov word [zz_imageident.check], di 1869 mov si, zz_imageident 1870 push si 1871 mov cx, 8 1872 xor dx, dx 1873 @@: 1874 lodsw 1875 add dx, ax 1876 loop @B 1877 pop si 1878 1879 neg dx 1880 mov word [zz_imageident.check], dx 1881 ; set image ident checksum 1882 mov cl, 8 1883 rep movsw ; write image ident paragraph 1884 1885 push ss 1886 pop es 1887 1888 pop word [sym_storage.start + 2] 1889 1890 mov cx, word [bp + ?common_size_bytes] 1891 mov bx, word [bp + ?common_size_bytes + 2] 1892 push word [sym_storage.start + 2] 1893 push word [sym_storage.start] 1894 dualcall normalise_pointer_with_displacement_bxcx 1895 pop word [sym_storage.end] 1896 pop word [sym_storage.end + 2] 1897 ; size common part 1898 1899 jmp .init_tail 1900 1901 1902 .notboot2: 1903 %endif 1904 1905 cmp word [zz_xms.handle], -1 1906 jne .fromxms4 1907 1908 .fromnotxms4: 1909 mov bx, 1 ; enable UMB link 1910 mov ax, 5803h 1911 doscall 1912 mov bx, 80h ; first fit, UMA then LMA 1913 mov ax, 5801h 1914 doscall 1915 jnc @F 1916 xor bx, bx ; first fit (LMA then UMA) 1917 mov ax, 5801h 1918 doscall 1919 @@: 1920 1921 mov bx, dx 1922 1923 test bx, bx ; prior size was none ? 1924 jz .no_prefix ; no prefix --> 1925 1926 mov ah, 48h 1927 doscall 1928 jnc @F 1929 1930 mov dx, msg.zz_s_cannot_alloc_transfer 1931 .lframe_end_putsz_error: 1932 nearcall putsz_error 1933 jmp .lframe_end_restore_strat 1934 1935 @@: 1936 mov cx, word [bp + ?common_size_bytes] 1937 mov bx, word [bp + ?common_size_bytes + 2] 1938 1939 push ax ; allocated transfer buffer 1940 nearcall zz_transfer_buffer 1941 push word [sym_storage.start + 2] 1942 mov ah, 49h 1943 dual2call _doscall_return_es ; free prior buffer 1944 pop ax ; (discard) 1945 pop word [sym_storage.start + 2] 1946 ; relocate 1947 1948 mov cx, word [bp + ?common_size_bytes] 1949 mov bx, word [bp + ?common_size_bytes + 2] 1950 push word [sym_storage.start + 2] 1951 push word [sym_storage.start] 1952 dualcall normalise_pointer_with_displacement_bxcx 1953 pop word [sym_storage.end] 1954 pop word [sym_storage.end + 2] 1955 ; size common part 1956 1957 .no_prefix: 1958 .fromxms4: 1959 mov bx, 02h ; last fit 1960 mov ax, 5801h 1961 doscall 1962 mov bx, 0 ; disable UMB link 1963 mov ax, 5803h 1964 doscall 1965 1966 mov bx, word [bp + ?req_size_para] 1967 mov ah, 48h 1968 doscall ; allocate target buffer 1969 jnc @F 1970 1971 mov dx, msg.zz_s_cannot_alloc_target 1972 nearcall putsz_error 1973 jmp .lframe_end_restore_strat 1974 1975 @@: 1976 mov cx, word [bp + ?common_size_bytes] 1977 mov bx, word [bp + ?common_size_bytes + 2] 1978 1979 cmp word [zz_xms.handle], -1 1980 je .fromnotxms5 1981 1982 .fromxms5: 1983 nearcall zz_xms_to_86mm 1984 and word [sym_storage.start], 0 1985 mov word [sym_storage.start + 2], ax 1986 1987 mov cx, word [bp + ?common_size_bytes] 1988 mov bx, word [bp + ?common_size_bytes + 2] 1989 push word [sym_storage.start + 2] 1990 push word [sym_storage.start] 1991 dualcall normalise_pointer_with_displacement_bxcx 1992 pop word [sym_storage.end] 1993 pop word [sym_storage.end + 2] 1994 ; size common part 1995 nearcall zz_xms_try_free_handle 1996 jmp .from5common 1997 1998 .fromnotxms5: 1999 push ax ; allocated memory block 2000 nearcall zz_transfer_buffer 2001 pop ax ; allocated memory block 2002 xchg word [sym_storage.start + 2], ax 2003 test ax, ax 2004 jz @F 2005 push ax ; value for es to int 21h call 2006 mov ah, 49h 2007 dual2call _doscall_return_es ; free transfer buffer 2008 pop ax ; (discard) 2009 @@: 2010 .from5common: 2011 2012 .init_tail: 2013 mov cx, word [bp + ?req_size_para] 2014 xor bx, bx ; bx:cx = number of paragraphs allocated 2015 nearcall shift_left_4_bxcx ; = number of bytes allocated 2016 2017 sub cx, word [bp + ?common_size_bytes] 2018 sbb bx, word [bp + ?common_size_bytes + 2] 2019 ; = number of bytes allocated after end 2020 push word [sym_storage.end + 2] 2021 push word [sym_storage.end] 2022 pop di 2023 %if _PM 2024 push word [symsel1] 2025 dualcall segment_to_selector 2026 %endif 2027 pop es ; es:di -> after end of common part 2028 xor ax, ax 2029 .init_loop: 2030 push es 2031 %if _PM 2032 dualcall selector_to_segment 2033 %endif 2034 push di 2035 dualcall normalise_pointer 2036 pop di 2037 %if _PM 2038 push word [symsel1] 2039 dualcall segment_to_selector 2040 %endif 2041 pop es ; normalise pointer 2042 sub cx, SEGTRANSFER_size 2043 sbb bx, 0 2044 jc .init_last 2045 2046 push cx 2047 mov cx, SEGTRANSFER_size >> 1 2048 rep stosw ; store zeros 2049 pop cx 2050 jmp .init_loop 2051 2052 .init_last: 2053 add cx, SEGTRANSFER_size 2054 adc bx, 0 2055 shr cx, 1 2056 rep stosw ; store zeros 2057 2058 mov cx, word [bp + ?req_size_para] 2059 xor bx, bx 2060 nearcall shift_left_4_bxcx ; requested size bytes 2061 push word [sym_storage.start + 2] 2062 push word [sym_storage.start] 2063 dualcall normalise_pointer_with_displacement_bxcx 2064 pop word [sym_storage.end] 2065 pop word [sym_storage.end + 2] 2066 ; update .end 2067 2068 cmp word [bp + ?common_size_bytes + 2], 0 2069 jne @F ; if it was an empty table 2070 cmp word [bp + ?common_size_bytes], 0 2071 jne @F 2072 2073 ; initialise pointers 2074 mov dx, word [sym_storage.start + 2] 2075 mov ax, word [sym_storage.start] 2076 mov word [sym_storage.main.start + 2], dx 2077 mov word [sym_storage.main.start], ax 2078 mov word [sym_storage.hash.start + 2], dx 2079 mov word [sym_storage.hash.start], ax 2080 mov word [sym_storage.str.start + 2], dx 2081 mov word [sym_storage.str.start], ax 2082 mov word [sym_storage.free + 2], dx 2083 mov word [sym_storage.free], ax 2084 @@: 2085 2086 nearcall zz_expand 2087 2088 cmp word [bp + ?common_size_bytes + 2], 0 2089 jne @F ; if it was an empty table ...- 2090 cmp word [bp + ?common_size_bytes], 0 2091 jne @F 2092 nearcall zz_store_pre_str ; -... store the pre strings 2093 @@: 2094 2095 .lframe_end_restore_strat: 2096 nearcall zz_restore_strat 2097 2098 .lframe_end: 2099 .lframe_no_reallocation_needed: 2100 lleave 2101 jmp .end 2102 2103 .end_restore_strat: 2104 nearcall zz_restore_strat 2105 2106 .end: 2107 pop si 2108 pop ax ; al = next character 2109 push ss 2110 pop es 2111 push ss 2112 pop ds 2113 retn 2114 2115 2116 .free: 2117 mov dx, msg.zz_switch_s_freeing 2118 nearcall putsz 2119 nearcall zz_free_nonxms 2120 nearcall zz_xms_try_free_handle 2121 nearcall zz_free_reset 2122 jmp .end 2123 2124 2125 zz_free_nonxms: section_of_function 2126 %if _BOOTLDR 2127 %if _APPLICATION || _DEVICE 2128 testopt [internalflags], nodosloaded 2129 jz .free_notboot 2130 %endif 2131 2132 mov dx, msg.zz_switch_s_boot_loaded_kernel 2133 testopt [internalflags2], dif2_boot_loaded_kernel 2134 jnz .free_putsz_error_end 2135 2136 nearcall bootgetmemorysize 2137 int 12h 2138 mov cl, 10 - 4 2139 shl ax, cl 2140 cmp ax, dx 2141 je @F 2142 2143 mov dx, msg.zz_switch_s_boot_rpl 2144 jmp .free_putsz_error_end 2145 2146 @@: 2147 mov dx, [boot_new_memsizekib] 2148 shl dx, cl 2149 cmp ax, dx 2150 je @F 2151 2152 mov dx, msg.zz_switch_s_boot_memsize_differ 2153 .free_putsz_error_end: 2154 nearcall putsz_error 2155 retn 2156 2157 @@: 2158 ; ax => current EBDA 2159 mov dx, ss 2160 dec dx ; => NDEB image ident paragraph 2161 xor cx, cx ; size of EBDA to move (if none) 2162 push ds 2163 mov ds, cx 2164 mov bx, word [40Eh] ; new ref in word [0:40Eh] (if none) 2165 pop ds 2166 cmp byte [ boot_ebdaflag ], 0 ; any EBDA ? 2167 jz .free_noebda 2168 2169 push ds 2170 mov ds, ax ; => EBDA 2171 xor bx, bx 2172 mov bl, byte [ 0 ] ; EBDA size in KiB 2173 mov cl, 6 2174 shl bx, cl ; *64, to paragraphs 2175 mov cx, bx ; = size of EBDA to move (in paragraphs) 2176 sub dx, cx ; => target EBDA 2177 mov bx, dx ; = new EBDA reference to put in word [0:40Eh] 2178 pop ds 2179 2180 .free_noebda: 2181 nearcall movp ; move EBDA 2182 mov cl, 6 2183 shr dx, cl ; to KiB 2184 mov word [ boot_new_memsizekib ], dx 2185 push ds 2186 xor cx, cx 2187 mov ds, cx 2188 mov word [40Eh], bx ; = new ref in word [0:40Eh] 2189 mov word [413h], dx 2190 pop ds 2191 retn 2192 2193 2194 .free_notboot: 2195 %endif 2196 2197 %if _APPLICATION || _DEVICE 2198 zz_free_dos: section_of_function 2199 xor ax, ax 2200 xchg ax, word [sym_storage.start + 2] 2201 2202 test ax, ax 2203 jz @F 2204 dec ax 2205 %if _PM 2206 nearcall setes2ax 2207 %else 2208 mov es, ax 2209 %endif 2210 xor ax, ax ; ax = 0 2211 mov word [es:1], ax ; free MCB 2212 @@: 2213 retn 2214 %endif 2215 2216 2217 zz_free_reset: section_of_function 2218 push ss 2219 pop es 2220 2221 xor ax, ax 2222 2223 mov di, sym_storage.clear_on_free.first 2224 mov cx, (sym_storage.clear_on_free.after - sym_storage.clear_on_free.first) >> 1 2227 rep stosw 2228 2229 dec ax ; = 0FFFFh 2230 2231 mov di, sym_storage.minus1_on_free.first 2232 mov cx, (sym_storage.minus1_on_free.after - sym_storage.minus1_on_free.first) >> 1 2235 rep stosw 2236 retn 2237 2238 2239 bxcx_to_cx_paragraphs: section_of_function 2240 add cx, 15 2241 adc bx, 0 2242 shift_right_4_bxcx: 2243 %rep 4 2244 shr bx, 1 2245 rcr cx, 1 ; cx = paragraphs 2246 %endrep 2247 retn 2248 2249 2250 ; INP: ax => allocated memory 2251 ; bx:cx = size of compacted table in bytes 2252 ; CHG: bx, cx, dx, di, si 2253 zz_xms_to_86mm: section_of_function 2254 mov dx, word [zz_xms.handle] 2255 mov si, zz_xms.movestruc 2256 xor di, di 2257 2258 mov word [si + xmsmDestHandle], di ; 86M memory 2259 mov word [si + xmsmDestAddress + 2], ax 2260 mov word [si + xmsmDestAddress], di ; ax:0 -> memory 2261 mov word [si + xmsmSourceHandle], dx ; our handle 2262 mov word [si + xmsmSourceAddress], di 2263 mov word [si + xmsmSourceAddress + 2], di ; 0 = beginning 2264 mov word [si + xmsmCount], cx 2265 mov word [si + xmsmCount + 2], bx ; size of compacted tables 2266 nearcall call_xms_move 2267 2268 mov cx, .table.amount 2269 mov bx, .table 2270 @@: 2271 mov si, word [bx] ; -> source xms offset dword 2272 mov di, word [bx + 2] ; -> dest memory far pointer 2273 add bx, 4 ; -> next .table entry, if any 2274 push cx 2275 push bx 2276 xor cx, cx ; = 0 2277 push ax 2278 push cx ; -> far to start of memory 2279 mov cx, word [si] 2280 mov bx, word [si + 2] ; = xms block offset 2281 dualcall normalise_pointer_with_displacement_bxcx 2282 pop word [di] 2283 pop word [di + 2] ; write far pointer 2284 pop bx ; -> next .table entry 2285 pop cx ; = loop counter 2286 loop @B 2287 retn 2288 2289 2290 usesection lDEBUG_DATA_ENTRY 2291 2292 align 4, db 0 2293 .table: 2294 dw sym_storage.main.xms.start 2295 dw sym_storage.main.start 2296 2297 dw sym_storage.hash.xms.start 2298 dw sym_storage.hash.start 2299 2300 dw sym_storage.str.xms.start 2301 dw sym_storage.str.start 2302 2303 dw sym_storage.xms.free 2304 dw sym_storage.free 2305 2306 dw sym_storage.xms.end 2307 dw sym_storage.end 2308 .table.amount: equ ($ - .table) >> 2 2309 2310 2311 %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 2312 usesection lDEBUG_CODE2 2313 %else 2314 usesection lDEBUG_CODE 2315 %endif 2316 2317 2318 ; INP: word [sym_storage.start + 2] => allocated memory 2319 ; dx = handle of allocated block 2320 ; bx:cx = size of compacted table in bytes 2321 ; CHG: ax, bx, cx, dx, di, si 2322 zz_86mm_to_xms: section_of_function 2323 mov si, zz_xms.movestruc 2324 xor di, di 2325 2326 mov word [si + xmsmSourceHandle], di ; 86M memory 2327 push word [sym_storage.start + 2] 2328 pop word [si + xmsmSourceAddress + 2] 2329 mov word [si + xmsmSourceAddress], di ; .start:0 -> memory 2330 mov word [si + xmsmDestHandle], dx ; our handle 2331 mov word [si + xmsmDestAddress], di 2332 mov word [si + xmsmDestAddress + 2], di ; 0 = beginning 2333 mov word [si + xmsmCount], cx 2334 mov word [si + xmsmCount + 2], bx ; size of compacted tables 2335 nearcall call_xms_move 2336 2337 push word [sym_storage.start + 2] 2338 push word [sym_storage.start] 2339 dualcall pointer_to_linear ; dx:ax = linear start 2340 2341 mov cx, zz_xms_to_86mm.table.amount 2342 mov bx, zz_xms_to_86mm.table 2343 @@: 2344 mov di, word [bx] ; -> dest xms offset dword 2345 mov si, word [bx + 2] ; -> source memory far pointer 2346 add bx, 4 ; -> next .table entry, if any 2347 push cx 2348 push bx 2349 2350 xchg dx, bx 2351 xchg ax, cx ; bx:cx = linear start 2352 2353 2354 push word [si + 2] 2355 push word [si] 2356 dualcall pointer_to_linear ; dx:ax = linear of pointer 2357 sub ax, cx 2358 sbb dx, bx ; pointer - start = byte offset 2359 mov word [di], ax 2360 mov word [di + 2], dx 2361 xchg dx, bx 2362 xchg ax, cx ; dx:ax = linear start 2363 2364 pop bx ; -> next .table entry 2365 pop cx ; = loop counter 2366 loop @B 2367 2368 retn 2369 2370 2371 ; cx:ax = amount of paragraphs allocated (<= 1.5 MiB/ 2 MiB) 2372 ; (not including transfer buffer) 2373 ; bx = amount of KiB allocated 2374 ; (actual allocation, including transfer buffer) 2375 ; dx = XMS handle 2376 xms_init: 2377 xor di, di 2378 lframe near 2379 lenter 2380 lvar dword, common_size_bytes 2381 push di 2382 push di 2383 lvar dword, amountpara 2384 push cx 2385 push ax 2386 lvar word, amountkib 2387 push bx 2388 lvar word, newhandle 2389 push dx 2390 2391 push ax 2392 push bx 2393 push cx 2394 push dx 2395 2396 nearcall zz_compact 2397 2398 mov dx, word [zz_xms.handle] 2399 cmp dx, -1 2400 je .notfromxms 2401 2402 .fromxms: 2403 mov bx, word [bp + ?amountpara + 2] 2404 mov cx, word [bp + ?amountpara] 2405 nearcall shift_left_4_bxcx ; requested size bytes 2406 2407 cmp bx, word [sym_storage.xms.free + 2] 2408 jne @F 2409 cmp cx, word [sym_storage.xms.free] 2410 @@: 2411 jae @F 2412 2413 .new_smaller: 2414 mov dx, [bp + ?newhandle] 2415 lleave code 2416 2417 nearcall zz_xms_try_free 2418 jmp ..@new_smaller 2419 2420 2421 @@: 2422 mov bx, word [sym_storage.xms.free + 2] 2423 mov cx, word [sym_storage.xms.free] 2424 2425 mov si, zz_xms.movestruc 2426 xor di, di 2427 2428 push word [bp + ?newhandle] 2429 pop word [si + xmsmDestHandle] ; new handle 2430 mov word [si + xmsmDestAddress + 2], di 2431 mov word [si + xmsmDestAddress], di ; 0 2432 mov word [si + xmsmSourceHandle], dx ; old handle 2433 mov word [si + xmsmSourceAddress], di 2434 mov word [si + xmsmSourceAddress + 2], di ; 0 2435 mov word [si + xmsmCount], cx 2436 mov word [si + xmsmCount + 2], bx ; size of compacted tables 2437 2438 mov word [bp + ?common_size_bytes], cx 2439 mov word [bp + ?common_size_bytes + 2], bx 2440 nearcall call_xms_move 2441 2442 nearcall zz_xms_try_free 2443 2444 push word [bp + ?newhandle] 2445 pop word [zz_xms.handle] 2446 2447 jmp .fromxmscommon 2448 2449 2450 .notfromxms: 2451 cmp word [sym_storage.start + 2], 0 2452 je .fromxmscommon 2453 2454 mov bx, word [bp + ?amountpara + 2] 2455 mov cx, word [bp + ?amountpara] 2456 nearcall shift_left_4_bxcx ; requested size bytes 2457 2458 push bx 2459 push cx 2460 2461 push word [sym_storage.free + 2] 2462 push word [sym_storage.free] 2463 dualcall pointer_to_linear 2464 xchg dx, bx 2465 xchg ax, cx ; bx:cx = linear after end 2466 push word [sym_storage.start + 2] 2467 push word [sym_storage.start] 2468 dualcall pointer_to_linear ; dx:ax = linear start 2469 sub cx, ax 2470 sbb bx, dx ; end - start = size 2471 ; bx:cx = current size (in bytes) 2472 mov word [bp + ?common_size_bytes], cx 2473 mov word [bp + ?common_size_bytes + 2], bx 2474 2475 pop ax 2476 pop dx ; = new size 2477 cmp dx, bx 2478 jne @F 2479 cmp ax, cx 2480 @@: 2481 jb .new_smaller 2482 2483 mov dx, word [bp + ?newhandle] 2484 nearcall zz_86mm_to_xms 2485 2486 push word [bp + ?newhandle] 2487 pop word [zz_xms.handle] 2488 2489 nearcall zz_free_nonxms 2490 2491 .fromxmscommon: 2492 mov dx, msg.zz_switch_s_received_xms 2493 nearcall putsz 2494 mov di, line_out 2495 mov ax, word [bp + ?amountkib] 2496 nearcall decword 2497 mov ax, " K" 2498 stosw 2499 mov ax, "iB" 2500 stosw 2501 mov al, '.' 2502 stosb 2503 nearcall putsline_crlf 2504 2505 pop dx 2506 pop cx 2507 pop bx 2508 pop ax 2509 2510 mov si, zz_xms.movestruc 2511 2512 mov bx, cx 2513 mov cx, ax 2514 nearcall shift_left_4_bxcx ; to bytes 2515 2516 xor ax, ax 2517 2518 cmp word [bp + ?common_size_bytes + 2], ax 2519 jne @F 2520 cmp word [bp + ?common_size_bytes], ax 2521 @@: 2522 jne .no_init_start 2523 2524 ; Initialise 2525 2526 mov word [sym_storage.main.xms.start], ax 2527 mov word [sym_storage.main.xms.start + 2], ax 2528 2529 mov word [sym_storage.hash.xms.start], ax 2530 mov word [sym_storage.hash.xms.start + 2], ax 2531 2532 mov word [sym_storage.str.xms.start], ax 2533 mov word [sym_storage.str.xms.start + 2], ax 2534 2535 mov word [sym_storage.xms.free], ax 2536 mov word [sym_storage.xms.free + 2], ax 2537 2538 .no_init_start: 2539 mov word [sym_storage.xms.end], cx 2540 mov word [sym_storage.xms.end + 2], bx 2541 2542 push word [bp + ?newhandle] 2543 pop word [zz_xms.handle] 2544 2545 2546 2547 XMSTRAIL_SIZE equ fromkib(kib(fromparas(paras(ssString + 255)) + XMSTRANSFER_default_size)) 2548 XMSTRAIL_TRANSFER_OFFSET equ XMSTRAIL_SIZE - XMSTRANSFER_default_size 2549 add cx, XMSTRAIL_TRANSFER_OFFSET & 0FFFFh 2550 adc bx, XMSTRAIL_TRANSFER_OFFSET >> 16 ; -> transfer buffer 2551 2552 mov word [zz_xms.transfer_address], cx 2553 mov word [zz_xms.transfer_address + 2], bx ; set address 2554 2555 mov word [zz_xms.transfer_size], XMSTRANSFER_default_size & 0FFFFh 2556 mov word [zz_xms.transfer_size + 2], XMSTRANSFER_default_size >> 16 2557 ; set size 2558 2559 add cx, XMSTRANSFER_default_size & 0FFFFh 2560 adc bx, XMSTRANSFER_default_size >> 16 ; initialise all memory 2561 2562 push word [bp + ?newhandle] 2563 pop word [si + xmsmDestHandle] ; our handle 2564 mov dx, word [sym_storage.xms.free + 2] 2565 mov di, word [sym_storage.xms.free] 2566 mov word [si + xmsmDestAddress], di 2567 mov word [si + xmsmDestAddress + 2], dx 2568 mov word [si + xmsmSourceHandle], ax ; 86M memory 2569 push ds 2570 %if _PM 2571 dualcall selector_to_segment 2572 %endif 2573 pop word [si + xmsmSourceAddress + 2] 2574 mov word [si + xmsmSourceAddress], zz_xms.16_zeros 2575 2576 sub cx, di 2577 sbb bx, dx 2578 2579 mov word [si + xmsmCount + 2], ax 2580 mov ax, cx 2581 and ax, 15 2582 mov word [si + xmsmCount], ax 2583 jz @F 2584 2585 nearcall call_xms_move 2586 add word [si + xmsmDestAddress], ax 2587 adc word [si + xmsmDestAddress + 2], 0 2588 sub cx, ax 2589 sbb bx, 0 2590 2591 @@: 2592 mov byte [si + xmsmCount], 16 2593 2594 .loop: 2595 sub cx, 16 2596 sbb bx, 0 2597 jc .last 2598 2599 nearcall call_xms_move 2600 2601 add word [si + xmsmDestAddress], 16 2602 adc word [si + xmsmDestAddress + 2], 0 2603 2604 jmp .loop 2605 2606 .last: 2607 add cx, 16 2608 adc bx, 0 2609 2610 jcxz @F 2611 mov word [si + xmsmCount], cx 2612 2613 nearcall call_xms_move 2614 @@: 2615 2616 nearcall zz_expand 2617 2618 cmp word [bp + ?common_size_bytes + 2], 0 2619 jne @F ; if it was an empty table ...- 2620 cmp word [bp + ?common_size_bytes], 0 2621 jne @F 2622 nearcall zz_store_pre_str ; -... store the pre strings 2623 2624 @@: 2625 lleave 2626 2627 jmp zz_switch_s.end_restore_strat 2628 2629 2630 zz_free_xms: section_of_function 2631 nearcall zz_free_reset 2632 2633 zz_xms_try_free_handle: section_of_function 2634 mov dx, -1 2635 xchg dx, word [zz_xms.handle] 2636 cmp dx, -1 2637 je @F 2638 2639 zz_xms_try_free: section_of_function 2640 nearcall zz_detect_xms 2641 2642 mov ah, 0Ah 2643 nearcall zz_call_xms 2644 dec ax 2645 jz @F 2646 xchg ax, dx 2647 mov dx, msg.zz_xms_not_freed_1 2648 nearcall putsz_error 2649 nearcall disp_ax_hex 2650 mov dx, msg.zz_xms_not_freed_2 2651 nearcall putsz_error 2652 @@: 2653 retn 2654 2655 2656 ; CHG: ax, ds, es 2657 ; OUT: ss = es = ds 2658 zz_save_strat: section_of_function 2659 push ss 2660 pop ds 2661 nearcall InDOS 2662 jnz .indos 2663 mov ax, 5800h 2664 int 21h 2665 mov word [zz_saved_strategy], ax 2666 mov ax, 5802h 2667 int 21h 2668 xor ah, ah 2669 mov word [zz_saved_umblink], ax 2670 .indos: 2671 nearcall zz_detect_xms 2672 push ss 2673 pop ds 2674 push ss 2675 pop es 2676 retn 2677 2678 2679 ; STT: ss = ds 2680 zz_restore_strat: section_of_function 2681 nearcall InDOS 2682 jnz .ret 2683 mov bx, word [zz_saved_umblink] 2684 mov ax, 5803h 2685 int 21h 2686 mov bx, word [zz_saved_strategy] 2687 mov ax, 5801h 2688 int 21h 2689 .ret: 2690 retn 2691 2692 2693 usesection lDEBUG_CODE 2694 2695 %if _XMS_SYMBOL_TABLE 2696 ; CHG: - 2697 ; STT: ss = ds 2698 zz_detect_xms: section_of_function 2699 testopt [internalflags2], dif2_xms_detection_done 2700 jnz .retn 2701 2702 _386_o32 2703 push ax 2704 _386_o32 2705 push bx 2706 _386_o32 2707 push cx 2708 _386_o32 2709 push dx 2710 _386_o32 2711 push si 2712 _386_o32 2713 push di 2714 _386_o32 2715 push bp 2716 2717 nearcall InDOS 2718 jz .notindos 2719 xor ax, ax 2720 %if _PM 2721 nearcall setes2ax 2722 %else 2723 mov es, ax 2724 %endif 2725 mov bx, 4 * 2Fh 2726 mov ax, word [es:bx + 2] 2727 mov bx, word [es:bx] 2728 call .checkxms 2729 .ret: 2730 _386_o32 2731 pop bp 2732 _386_o32 2733 pop di 2734 _386_o32 2735 pop si 2736 _386_o32 2737 pop dx 2738 _386_o32 2739 pop cx 2740 _386_o32 2741 pop bx 2742 _386_o32 2743 pop ax 2744 2745 push ss 2746 pop ds 2747 push ss 2748 pop es 2749 .retn: 2750 retn 2751 2752 .notindos: 2753 mov ax, 352Fh 2754 push word [pspdbg] 2755 dual2call _doscall_return_es 2756 pop ax ; returned es 2757 call .checkxms 2758 jmp .ret 2759 2760 .checkxms: 2761 %if _PM 2762 nearcall ispm 2763 jnz @F 2764 testopt [options], zz_no_pm_xms 2765 jnz .checkxms_via_86m 2766 @@: 2767 %endif 2768 test ax, ax 2769 jz .no_xms 2770 cmp bx, -1 2771 je .no_xms 2772 %if _PM 2773 clropt [internalflags2], dif2_no_pm_xms 2774 %endif 2775 mov ax, 4300h 2776 int 2Fh 2777 cmp al, 80h 2778 je .got_xms 2779 %if _PM 2780 nearcall ispm 2781 jnz .no_xms 2782 .checkxms_via_86m: 2783 [cpu 286] 2784 mov ax, 4300h 2785 push byte 0 2786 push byte 2Fh 2787 call intcall 2788 cmp al, 80h 2789 jne .no_xms 2790 2791 mov ax, 4310h 2792 push byte 0 ; es value 2793 push byte 0 ; ds value 2794 push byte 2Fh 2795 push bp 2796 call intcall_return_parameter_es_parameter_ds 2797 pop ax ; discard returned ds 2798 pop ax ; get returned es 2799 and word [zz_xms.entry + 4], 0 2800 and word [zz_xms.entry + 6], 0 2801 mov word [zz_xms.entry + 2], ax 2802 mov word [zz_xms.entry], bx 2803 setopt [internalflags2], dif2_no_pm_xms | dif2_xms_detection_done 2804 retn 2805 __CPU__ 2806 %endif 2807 2808 .no_xms: 2809 setopt [internalflags2], dif2_xms_detection_done 2810 and word [zz_xms.entry], 0 2811 and word [zz_xms.entry + 2], 0 2812 %if _PM 2813 and word [zz_xms.entry + 4], 0 2814 and word [zz_xms.entry + 6], 0 2815 %endif 2816 retn 2817 2818 .got_xms: 2819 setopt [internalflags2], dif2_xms_detection_done 2820 mov ax, 4310h 2821 int 2Fh 2822 %if _PM 2823 _386 nearcall ispm 2824 _386 jnz .rm 2825 _386 mov dword [zz_xms.entry], ebx 2826 _386 and word [zz_xms.entry + 6], 0 2827 _386 mov word [zz_xms.entry + 4], es 2828 _386 retn 2829 .rm: 2830 %endif 2831 mov word [zz_xms.entry], bx 2832 mov word [zz_xms.entry + 2], es 2833 %if _PM 2834 and word [zz_xms.entry + 4], 0 2835 and word [zz_xms.entry + 6], 0 2836 %endif 2837 retn 2838 2839 2840 ; Note: In dosemu DPMI it seems that 2F.4310 always returns 2841 ; a far 32:32 pointer in es:ebx. This must be called 2842 ; with a 32-bit stack frame. 2843 zz_call_xms: section_of_function 2844 cmp word [zz_xms.entry + 2], 0 2845 jne @F 2846 %if _PM 2847 cmp word [zz_xms.entry + 4], 0 2848 jne @F 2849 cmp word [zz_xms.entry + 6], 0 2850 jne @F 2851 %endif 2852 2853 .seterror: 2854 xor ax, ax ; failure 2855 mov bl, 80h ; function not implemented 2856 retn 2857 2858 @@: 2859 push ax 2860 mov ax, 256 2861 nearcall stack_check.internal 2862 pop ax 2863 jb .seterror ; no, error out --> 2864 %if _PM 2865 _386_PM nearcall ispm 2866 _386_PM jnz .rm 2867 testopt [internalflags2], dif2_no_pm_xms 2868 jz .pm 2869 .86m_via_pm: 2870 lframe 2871 lvar 32h, 86m_call_struc 2872 lenter 2873 push es 2874 _386_PM_o32 2875 mov word [bp + ?86m_call_struc +00h], di ; edi 2876 _386_PM_o32 2877 mov word [bp + ?86m_call_struc +04h], si ; esi 2878 _386_PM_o32 2879 mov word [bp + ?86m_call_struc +10h], bx ; ebx 2880 _386_PM_o32 2881 mov word [bp + ?86m_call_struc +14h], dx ; edx 2882 _386_PM_o32 2883 mov word [bp + ?86m_call_struc +18h], cx ; ecx 2884 _386_PM_o32 2885 mov word [bp + ?86m_call_struc +1Ch], ax ; eax 2886 mov ax, word [bp + ?frame_bp] 2887 mov word [bp + ?86m_call_struc +08h], ax ; bp 2888 xor ax, ax 2889 mov word [bp + ?86m_call_struc +20h], ax ; flags 2890 ; Note: As noted in the RBIL61 Int31.0301 description, 2891 ; the DPMI host will provide a stack if the 2892 ; passed ss:sp fields are zero. However, this 2893 ; stack is documented to be small, 30 words. 2894 ; XMS specifies that a stack of 128 words should 2895 ; be available to it when calling its entrypoint. 2896 ; 2897 ; Here we re-use our (PM) stack with a heuristically 2898 ; chosen displacement in the hopes that the host will 2899 ; not use more than that of the stack itself. 2900 XMS_VIA_86M_CALLBACK_STACK_DISPLACEMENT equ 128 2901 mov ax, sp 2902 sub ax, XMS_VIA_86M_CALLBACK_STACK_DISPLACEMENT 2903 mov word [bp + ?86m_call_struc +2Eh], ax ; sp 2904 mov ax, 256 + XMS_VIA_86M_CALLBACK_STACK_DISPLACEMENT 2905 nearcall stack_check.internal ; enough for XMS ? 2906 jb .stackoverflow 2907 2908 mov ax, word [pspdbg] 2909 mov word [bp + ?86m_call_struc +30h], ax ; ss 2910 mov word [bp + ?86m_call_struc +22h], ax ; es 2911 mov word [bp + ?86m_call_struc +24h], ax ; ds 2912 ; (ds is used to point to zz_xms.movestruc) 2913 push word [zz_xms.entry + 2] 2914 push word [zz_xms.entry] 2915 pop word [bp + ?86m_call_struc +2Ah] ; ip 2916 pop word [bp + ?86m_call_struc +2Ch] ; cs 2917 push ss 2918 pop es ; => stack 2919 lea di, [bp + ?86m_call_struc] ; -> 86-Mode call structure 2920 _386 movzx edi, di ; (previously checked b[dpmi32] here) 2921 xor cx, cx ; copy that many words to 86M stack 2922 mov ax, 0301h ; far call 86M procedure 2923 xor bx, bx 2924 int 31h 2925 mov ah, byte [bp + ?86m_call_struc +20h] ; flags 2926 sahf 2927 mov ax, word [bp + ?86m_call_struc +08h] ; bp 2928 mov word [bp + ?frame_bp], ax 2929 _386_PM_o32 2930 mov di, word [bp + ?86m_call_struc +00h] ; edi 2931 _386_PM_o32 2932 mov si, word [bp + ?86m_call_struc +04h] ; esi 2933 _386_PM_o32 2934 mov bx, word [bp + ?86m_call_struc +10h] ; ebx 2935 _386_PM_o32 2936 mov dx, word [bp + ?86m_call_struc +14h] ; edx 2937 _386_PM_o32 2938 mov cx, word [bp + ?86m_call_struc +18h] ; ecx 2939 _386_PM_o32 2940 mov ax, word [bp + ?86m_call_struc +1Ch] ; eax 2941 @@: 2942 pop es 2943 lleave 2944 retn 2945 2946 .stackoverflow: 2947 call .seterror 2948 jmp @B 2949 2950 2951 .pm: 2952 _386_PM_o32 2953 .rm: 2954 %endif 2955 call far [zz_xms.entry] 2956 retn 2957 2958 fail_xms_access: 2959 mov dx, msg.zz_fail_xms_access 2960 mov ax, 050Bh 2961 nearcall setrc 2962 jmp exit_error_msg_code 2963 2964 call_xms_move: section_of_function 2965 push ax 2966 push bx 2967 push si 2968 mov si, zz_xms.movestruc 2969 mov ah, 0Bh 2970 nearcall zz_call_xms 2971 dec ax 2972 jnz fail_xms_access 2973 pop si 2974 pop bx 2975 pop ax 2976 retn 2977 %endif 2978 2979 2980 %if _PM 2981 setes2ax: section_of_function 2982 mov bx, ax 2983 setes2bx: 2984 nearcall ispm 2985 jnz @F 2986 mov dx, bx 2987 nearcall setrmsegm 2988 @@: 2989 mov es, bx 2990 retn 2991 %endif ; _PM 2992 2993 2994 %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 2995 usesection lDEBUG_CODE2 2996 %endif 2997 2998 ; INP: bx:cx = length in bytes 2999 ; word [sym_storage.start + 2] => source (or 0) 3000 ; ax => destination 3001 ; CHG: di, si, cx 3002 ; STT: ds = es = ss 3003 zz_transfer_buffer: section_of_function 3004 push cx 3005 mov di, ax 3006 mov cx, word [sym_storage.start + 2] 3007 mov si, sym_storage.first_start 3008 @@: 3009 lodsw 3010 lodsw 3011 sub ax, cx ; x.start - sym_storage.start = para index 3012 add ax, di ; para index + destination = new seg 3013 mov word [si - 2], ax 3014 cmp si, sym_storage.after_start 3015 jb @B 3016 mov ax, di 3017 pop cx 3018 3019 push word [sym_storage.start + 2] 3020 push word [sym_storage.start] 3021 pop si 3022 %if _PM 3023 push word [symsel2] 3024 dualcall segment_to_selector 3025 %endif 3026 pop ds ; ds:si -> transfer source 3027 3028 push ax 3029 xor di, di 3030 %if _PM 3031 push word [ss:symsel1] 3032 dualcall segment_to_selector 3033 %endif 3034 pop es ; es:di -> transfer destination 3035 3036 .transfer_loop: 3037 push es 3038 %if _PM 3039 dualcall selector_to_segment 3040 %endif 3041 push di 3042 dualcall normalise_pointer 3043 pop di 3044 %if _PM 3045 push word [ss:symsel1] 3046 dualcall segment_to_selector 3047 %endif 3048 pop es ; normalise pointer 3049 push ds 3050 %if _PM 3051 dualcall selector_to_segment 3052 %endif 3053 push si 3054 dualcall normalise_pointer 3055 pop si 3056 %if _PM 3057 push word [ss:symsel2] 3058 dualcall segment_to_selector 3059 %endif 3060 pop ds ; normalise pointer 3061 sub cx, SEGTRANSFER_size 3062 sbb bx, 0 3063 jc .transfer_last 3064 3065 push cx 3066 mov cx, SEGTRANSFER_size >> 1 3067 rep movsw 3068 pop cx 3069 jmp .transfer_loop 3070 3071 .transfer_last: 3072 add cx, SEGTRANSFER_size 3073 adc bx, 0 3074 shr cx, 1 3075 rep movsw 3076 3077 push ss 3078 pop ds 3079 push ss 3080 pop es 3081 retn 3082 3083 3084 zz_get_literal: section_of_function 3085 mov ah, 0 3086 xor bx, bx ; (in case of decimal base shortcut: 3087 mov dx, 10 ; set base: decimal) 3088 cmp al, '#' ; shortcut change to decimal base? 3089 je .lit_base ; yes --> 3090 3091 .lithex_common: 3092 call .lit_ishexdigit? ; the first character must be a digit then 3093 jc .err2 3094 xor dl, dl ; initialize value 3095 .lithex_loopdigit: 3096 cmp al, '_' 3097 je .lithex_skip 3098 call .lit_ishexdigit? ; was last character ? 3099 jc .lit_end ; yes --> 3100 test bh, 0F0h ; would shift bits out ? 3101 jnz .err2 3102 nearcall capitalise 3103 sub al, '0' 3104 cmp al, 9 ; was decimal digit ? 3105 jbe .lithex_decimaldigit; yes --> 3106 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 3107 .lithex_decimaldigit: 3108 mov cx, 4 3109 .lithex_loopshift: 3110 shl dx, 1 3111 rcl bx, 1 3112 loop .lithex_loopshift ; *16 3113 or dl, al ; add in the new digit 3114 .lithex_skip: 3115 lodsb 3116 jmp short .lithex_loopdigit 3117 3118 .lit_end: 3119 cmp al, '#' ; base change specification? 3120 je .lit_base ; yes --> 3121 nearcall isseparator? ; after the number, there must be a separator 3122 jne .err2 ; none here --> 3123 jmp .term_end ; okay --> 3124 .lit_base: 3125 test bx, bx ; insure base <= 36 3126 jnz .err2 3127 cmp dx, byte 36 3128 ja .err2 3129 cmp dx, byte 2 ; and >= 2 3130 jb .err2 ; otherwise error --> 3131 3132 lodsb 3133 mov ah, 0 ; (not sure why this) 3134 cmp dl, 16 ; hexadecimal ? 3135 je .lithex_common ; yes, use specific handling --> 3136 3137 mov di, dx ; di = base 3138 mov cl, dl 3139 add cl, '0'-1 3140 cmp cl, '9' 3141 jbe .lit_basebelow11 3142 mov cl, '9' 3143 .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 3144 mov ch, dl 3145 add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 3146 3147 call .lit_isdigit? ; first character must be a digit 3148 jc .err2 3149 xor dx, dx ; initialize value 3150 .lit_loopdigit: 3151 cmp al, '_' 3152 je .lit_skip 3153 call .lit_isdigit? ; was last character ? 3154 jc .lit_end ; yes --> 3155 nearcall capitalise 3156 sub al, '0' 3157 cmp al, 9 ; was decimal digit ? 3158 jbe .lit_decimaldigit ; yes --> 3159 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 3160 .lit_decimaldigit: 3161 push ax 3162 mov ax, dx 3163 push bx 3164 mul di ; multiply low word with base 3165 mov bx, dx 3166 mov dx, ax 3167 pop ax 3168 push dx 3169 mul di ; multiply high word with base 3170 test dx, dx 3171 pop dx 3172 jnz .err2 ; overflow --> 3173 add bx, ax ; add them 3174 pop ax 3175 jc .err2 ; overflow --> 3176 add dl, al ; add in the new digit 3177 adc dh, 0 3178 adc bx, byte 0 3179 jc .err2 ; overflow --> 3180 .lit_skip: 3181 lodsb 3182 jmp short .lit_loopdigit 3183 3184 .term_end: 3185 retn 3186 3187 .err2: 3188 mov ax, 050Ch 3189 nearcall setrc 3190 jmp symbolasm_error 3191 3192 .lit_ishexdigit?: 3193 nearcall getexpression.lit_ishexdigit? 3194 retn 3195 3196 .lit_isdigit?: 3197 nearcall getexpression.lit_isdigit? 3198 retn 3199 %endif === Trace listing source: ../lst/debug.obj/uu.lst 1 2 %if 0 3 4 lDebug U command - Disassembler 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 "uu.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00005A10 ???????? eldhSignature: resb 4 ; "ELD1" 0 00005A14 ?????? resb 3 ; reserved 0 00005A17 ?? resb 1 ; 26 (Ctrl-Z) 0 00005A18 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00005A1C ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00005A1E ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00005A20 ???????? eldhDataOffset: resd 1 0 00005A24 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00005A26 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00005A28 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00005A2A ???????? eldhReserved: resb 4 ; reserved 0 00005A2E ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00005A30 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00005A34 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00005A38 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00005A3C ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00005A10 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00005A18 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00005A1C ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00005A1E ???? 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 0 00005A10 ???? 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 0 00005A12 ???? eldltAmount: resw 1 0 00005A14 ???????? 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 0 00005A10 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00005A12 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00005A14 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00005A16 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00005A18 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00005A20 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00005A10 ???? eldlSignature: resw 1 ; 0E1D1h 0 00005A12 ???????? eldlReserved: resw 2 0 00005A16 ???? eldlUseLinkHash: resw 1 0 00005A18 ???? eldlDataAmount: resw 1 0 00005A1A ???? eldlDataPrefixes: resw 1 0 00005A1C ???? eldlDataEntries: resw 1 0 00005A1E ???? eldlDataAddresses: resw 1 0 00005A20 ???? eldlCodeAmount: resw 1 0 00005A22 ???? eldlCodePrefixes: resw 1 0 00005A24 ???? eldlCodeEntries: resw 1 0 00005A26 ???? 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 0 00005A10 ???? ifKeyword: resw 1 0 00005A12 ???? ifDescription: resw 1 0 00005A14 ???? ifOptions: resw 1 0 00005A16 ???? ifValue: resw 1 0 00005A18 ???? ifTrying: resw 1 0 00005A1A ???? 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 0 00005A10 ???????? saOffset: resd 1 0 00005A14 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00005A10 ???? so16aOffset: resw 1 0 00005A12 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00005A10 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00005A10 ?????? bsJump: resb 3 0 00005A13 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00005A10 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00005A12 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00005A13 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00005A15 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00005A16 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 00005A18 ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 00005A1A ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 00005A1B ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00005A1D ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00005A1F ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00005A21 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00005A25 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 00005A29 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00005A2D ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00005A2F ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00005A31 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00005A35 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 00005A37 ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00005A10 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00005A11 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00005A12 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00005A13 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00005A22 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00005A10 ???????????????? deName: resb 8 0 00005A18 ?????? deExt: resb 3 0 00005A1B ?? deAttrib: resb 1 0 00005A1C ?? dePlusSize: resb 1 0 00005A1D ?????????????? resb 7 0 00005A24 ???? deClusterHigh: resw 1 0 00005A26 ???? deTime: resw 1 0 00005A28 ???? deDate: resw 1 0 00005A2A ???? deClusterLow: resw 1 0 00005A2C ???????? 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 0 100005A00 ???????? lsvFirstCluster: resd 1 0 100005A04 ???????? lsvFATSector: resd 1 0 100005A08 ???? lsvFATSeg: resw 1 0 100005A0A ???? lsvLoadSeg: resw 1 0 100005A0C ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 1000059F0 ???? ldMemoryTop: resw 1 0 1000059F2 ???? ldLoadTop: resw 1 0 1000059F4 ???? ldSectorSeg: resw 1 0 1000059F6 ?? ldFATType: resb 1 92 <2> ldFlags: 0 1000059F7 ?? ldHasLBA: resb 1 0 1000059F8 ???? ldClusterSize: resw 1 0 1000059FA ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 1000059FC ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 1000059FE ?? .partition: resb 1 ; byte 0 1000059FF ?? .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 <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 0 1000059E0 ???????? ldRootSector: resd 1 0 1000059E4 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 1000059E6 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 1000059E8 ???? ldParasLeft: resw 1 0 1000059EA ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 1000059D0 ???????? ldMaxCluster: resd 1 0 1000059D4 ???????? ldFileSize: resd 1 0 1000059D8 ???????? ldCurrentCluster: resd 1 0 1000059DC ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00005A10 ???????? liiSignature: resb 4 ; "NLDR" 0 00005A14 ???? liiVersion: resb 2 ; "00" 0 00005A16 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 00005A18 ???? liiAmountParagraphs: resw 1 0 00005A1A ???????????? liiReserved: resw 3 0 00005A20 ???? 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 0 00005A22 ???? 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 0 00005A24 ???? 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 0 00005A26 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00005A10 ???? lpSize: resw 1 0 00005A12 ???? lpCount: resw 1 0 00005A14 ???????? lpBuffer: resd 1 0 00005A18 ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00005A10 ?? piBoot: resb 1 0 00005A11 ?????? piStartCHS: resb 3 0 00005A14 ?? piType: resb 1 0 00005A15 ?????? piEndCHS: resb 3 0 00005A18 ???????? piStart: resd 1 0 00005A1C ???????? 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 0 00005A10 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00005A12 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00005A14 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00005A16 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 00005A18 ???? lsOptions: resw 1 ; option flags 0 00005A1A ???? lsSegment: resw 1 ; => where to load file 0 00005A1C ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00005A20 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00005A24 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00005A26 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 00005A28 ???????????????? 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 0 00005A10 ???? exact_struc_at 00h, exeSignature: resw 1 0 00005A12 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00005A14 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00005A16 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 00005A18 ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 00005A1A ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00005A1C ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00005A1E ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00005A20 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00005A22 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00005A24 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00005A26 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 00005A28 ???? 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. 0 00005A2A ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00005A10 ???? ifhHandle: resw 1 0 00005A12 ???? ifhFlags: resw 1 0 00005A14 ???????? 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 <1> areastrucEntry: resb 24 0 00005A28 ???????? areastrucNext: resd 1 0 00005A2C ???????? areastrucPrev: resd 1 0 00005A30 ???? areastrucSubAmount: resw 1 0 00005A32 ???? areastrucSubOffset: resw 1 0 00005A34 ???? areastrucFunAmount: resw 1 0 00005A36 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00005A10 ???????? areastrucsubLinear: resd 1 0 00005A14 ???????? areastrucsubLinearEnd: resd 1 0 00005A18 ???? areastrucsubListOffset: resw 1 0 00005A1A ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00005A10 ???????? areastrucfunLinear: resd 1 0 00005A14 ???????? areastrucfunLinearEnd: resd 1 0 00005A18 ???? areastrucfunListOffset: resw 1 0 00005A1A ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00005A10 ???? areastart: resw 1 0 00005A12 ???? areaend: resw 1 0 00005A14 ???? areamessage: resw 1 0 00005A16 ???? 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 0 00005A10 ???? 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.) 0 00005A12 ???? ivFlags: resw 1 0 00005A14 ???? 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. 0 00005A16 ???? 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 0 00005A18 ?? 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. 0 00005A19 ?? 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 0 00005A10 ???????? mrLinear: resd 1 0 00005A14 ???????? mrOffset: resd 1 0 00005A18 ???? mrSegmentSelector: resw 1 0 00005A1A ???? mrFlags: resw 1 0 00005A1C ???????? 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 0 00005A10 ???????? .size_: resd 1 0 00005A14 ???? .srchdl: resw 1 0 00005A16 ???????? .srcadr: resd 1 0 00005A1A ???? .dsthdl: resw 1 0 00005A1C ???????? .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 "asmops.mac" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug assembler/disassembler table operands 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2026 E. C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> ; Equates for instruction operands. 19 <1> ; First the sizes. 20 <1> 21 <1> OP_ALL equ 40h ; byte/word/dword operand (could be 30h but ...) 22 <1> OP_1632 equ 50h ; word or dword operand 23 <1> OP_8 equ 60h ; byte operand 24 <1> OP_16 equ 70h ; word operand 25 <1> OP_32 equ 80h ; dword operand 26 <1> OP_64 equ 90h ; qword operand 27 <1> OP_1632_DEFAULT equ 0A0h ; word or dword or default opsize 28 <1> OP_1632_DEFAULT_ASM equ 0B0h; asm: word or dword or default opsize, 29 <1> ; disasm: word or dword 30 <1> 31 <1> OP_SIZE equ OP_ALL ; the lowest of these 32 <1> 33 <1> ; These operand types need to be combined with a size. 34 <1> ; Bits 0 to 3 give one of these types (maximum 15), 35 <1> ; and bits 4 to 7 specify the size. Table entries 36 <1> ; for these are identified by detecting that they 37 <1> ; are above-or-equal OP_SIZE. 38 <1> ; The first parameter to the opsizeditem macro is the 39 <1> ; name of the item. It has to match the names used in 40 <1> ; the instr.key and debugtbl.inc files. 41 <1> ; The second parameter is the entry for bittab that 42 <1> ; is used by aa.asm (the assembler). 43 <1> ; The third parameter is the suffix used to create the 44 <1> ; entry for asmjmp (prefix aop_) and disjmp2 (dop_). 45 <1> 46 <1> %macro opsizeditem 3.nolist 47 <1> %1 equ nextindex 48 <1> %xdefine BITTAB_OPSIZEDITEMS BITTAB_OPSIZEDITEMS,%2 49 <1> %xdefine ASMJMP_OPSIZEDITEMS ASMJMP_OPSIZEDITEMS,aop_%3 50 <1> %xdefine DISJMP2_OPSIZEDITEMS DISJMP2_OPSIZEDITEMS,dop_%3 51 <1> %assign nextindex nextindex + 1 52 <1> %endmacro 53 <1> %assign nextindex 0 54 <1> %define BITTAB_OPSIZEDITEMS "" 55 <1> %define ASMJMP_OPSIZEDITEMS "" 56 <1> %define DISJMP2_OPSIZEDITEMS "" 57 <1> opsizeditem OP_IMM, ARG_IMMED, imm ; immediate 58 <1> opsizeditem OP_IMM_NOT_EXTEND, ARG_IMMED, imm_not_extend ; immediate 59 <1> ; This one is for showing the WORD/DWORD size keyword if the 60 <1> ; value could fit into an imms8. 61 <1> opsizeditem OP_RM,ARG_DEREF+ARG_JUSTREG,rm ; reg/mem 62 <1> opsizeditem OP_M, ARG_DEREF, m ; mem (but not reg) 63 <1> opsizeditem OP_R_MOD, ARG_JUSTREG, r_mod ; register, determined from MOD R/M part 64 <1> opsizeditem OP_MOFFS, ARG_DEREF, moffs ; memory offset; e.g., [1234] 65 <1> opsizeditem OP_R, ARG_JUSTREG, r ; reg part of reg/mem byte 66 <1> opsizeditem OP_R_ADD, ARG_JUSTREG, r_add ; register, determined from instruction byte 67 <1> opsizeditem OP_AX, ARG_JUSTREG, ax ; al or ax or eax 68 <1> %if nextindex > 16 69 <1> %error Too many op sized items 70 <1> %endif 71 <1> 72 <1> ; These don't need a size. 73 <1> ; Because the size needs to be clear to indicate 74 <1> ; that one of these is to be used, the maximum 75 <1> ; value for these is 63 (as 64 is OP_SIZE). 76 <1> ; The minimum value for these is 1 because a 0 77 <1> ; without size means the end of an op list (OP_END). 78 <1> ; The first parameter to the opitem macro is the name 79 <1> ; of the item. It has to match the names used in the 80 <1> ; instr.key and debugtbl.inc files. 81 <1> ; The second parameter is the entry for bittab that 82 <1> ; is used by aa.asm (the assembler). The third 83 <1> ; parameter is the entry for asmjmp. 84 <1> ; The fourth parameter is the entry for optab as used 85 <1> ; by uu.asm (the disassembler). 86 <1> ; 87 <1> ; asm_siznum contains entries for OP_M64 to OP_MXX. 88 <1> ; (The order has to match their opitem order.) 89 <1> ; asm_regnum contains entries for OP_DX to OP_GS. 90 <1> ; (The order has to match their opitem order.) 91 <1> 92 <1> %macro opitem 4.nolist 93 <1> %1 equ nextindex 94 <1> %xdefine BITTAB_OPITEMS BITTAB_OPITEMS,%2 95 <1> %xdefine ASMJMP_OPITEMS ASMJMP_OPITEMS,%3 96 <1> %xdefine OPTAB_OPITEMS OPTAB_OPITEMS,%4 97 <1> %assign nextindex nextindex + 1 98 <1> %endmacro 99 <1> OP_END equ 0 100 <1> %assign nextindex 1 101 <1> %define BITTAB_OPITEMS "" 102 <1> %define ASMJMP_OPITEMS "" 103 <1> %define OPTAB_OPITEMS "" 104 <1> ; order of the following (ao17 entries) must match asm_siznum in aa.asm 105 <1> OP_FIRST_ASM_SIZNUM equ nextindex ; corresponding to asm_siznum start 106 <1> opitem OP_M64, ARG_DEREF, ao17,dop_m64 ; qword memory (obsolete?) 107 <1> opitem OP_MFLOAT, ARG_DEREF, ao17,dop_mfloat ; float memory 108 <1> opitem OP_MDOUBLE, ARG_DEREF, ao17,dop_mdouble; double-precision floating memory 109 <1> opitem OP_M80, ARG_DEREF, ao17,dop_m80 ; tbyte memory 110 <1> opitem OP_MXX, ARG_DEREF, ao17,dop_mxx ; memory (size unknown) 111 <1> opitem OP_FARIMM, ARG_FARADDR, ao21,dop_farimm ; far16/far32 immediate 112 <1> opitem OP_FAR_OFFSET, ARG_IMMED, aop_faroffset,da_internal_error ; far offset-only 113 <1> opitem OP_REL8, ARG_IMMED, ao23,dop_rel8 ; byte address relative to IP 114 <1> opitem OP_REL1632, ARG_IMMED, ao25,dop_rel1632; word or dword address relative to IP 115 <1> opitem OP_1CHK, ARG_WEIRDREG, ao29,dop49 ; check for ST(1) 116 <1> opitem OP_STI, ARG_WEIRDREG, aop_sti,dop_sti ; ST(I) 117 <1> opitem OP_CR, ARG_WEIRDREG, aop_cr,dop_cr ; CRx 118 <1> opitem OP_DR, ARG_WEIRDREG, ao34,dop_dr ; DRx 119 <1> opitem OP_TR, ARG_WEIRDREG, ao35,dop_tr ; TRx 120 <1> opitem OP_SEGREG, ARG_WEIRDREG, ao39,dop_segreg ; segment register 121 <1> opitem OP_IMMS8, ARG_IMMED, ao41,dop_imms8 ; sign extended immediate byte 122 <1> opitem OP_IMMS8_EXTEND, ARG_IMMED, ao41_extend,dop_imms8 ; add etc word/dword r/m, imms8 123 <1> opitem OP_IMM8, ARG_IMMED, ao42,dop_imm8 ; immediate byte (other args may be (d)word) 124 <1> opitem OP_IMM8_OPTIONAL,ARG_IMMED, ao42,dop_imm8_optional 125 <1> opitem OP_IMM8_INT, ARG_IMMED, ao42,dop_imm8_int ; immediate byte for int 126 <1> opitem OP_IMM8_SHIFTROT,ARG_IMMED, ao42,dop_imm8_shiftrot ; immediate byte for shift/rotate 127 <1> opitem OP_MMX, ARG_WEIRDREG, aop_mmx,dop_mmx ; MMx 128 <1> opitem OP_MMX_MOD, ARG_WEIRDREG, aop_mmx_mod,dop_mmx_mod ; MMx, but in ModR/M part 129 <1> opitem OP_X, 0FFh, ao_x, dop_x ; OPX byte follows 130 <1> opitem OP_SHOSIZ, 0FFh, ao44, dop_shosiz ; set flag to always show the size 131 <1> opitem OP_ASM_MOVX, 0FFh, ao_movx,dop60a ; enforce next operand size to be specified 132 <1> opitem OP_SHORT, 0FFh, ao_short,dop_short ; allow short keyword 133 <1> opitem OP_NEAR, 0FFh, ao_near,dop_near ; allow near keyword 134 <1> opitem OP_FAR, 0FFh, ao_far, dop_far ; allow far keyword 135 <1> opitem OP_FAR_REQUIRED, 0FFh, ao_far_required,dop_far_required ; require far keyword 136 <1> opitem OP_FAR_M, 0FFh, ao_modifier_continue,dop_far_m ; les, lds, lss, lfs, lgs, or jmp/call far mem 137 <1> opitem OP_DOUBLE_M, 0FFh, ao_modifier_continue,dop_double_m ; bound 138 <1> opitem OP_M_SRC, 0FFh, ao_modifier_continue,dop_m_src 139 <1> opitem OP_M_DST, 0FFh, ao_modifier_continue,dop_m_dst 140 <1> opitem OP_M_SRC_DST, 0FFh, ao_modifier_continue,dop_m_src_dst 141 <1> opitem OP_STACK_PUSH, 0FFh, ac09_internal_error,dop_stack_push 142 <1> opitem OP_STACK_POP, 0FFh, ac09_internal_error,dop_stack_pop 143 <1> opitem OP_STACK_SPECIAL,0FFh, ac09_internal_error,dop_stack_special 144 <1> opitem OP_M_ALWAYS_16, 0FFh, ao_m_always_16,dop_m_always_16 145 <1> opitem OP_E_CX, ARG_JUSTREG, aop_e_cx, da_e_cx ; (E)CX 146 <1> OP_FIRST_STRING equ nextindex 147 <1> opitem OP_1, ARG_IMMED, ao46, "1" ; 1 (simple "string" ops from here on) 148 <1> opitem OP_3, ARG_IMMED, ao47, "3" ; 3 149 <1> ; order of the following (ao48 entries) must match asm_regnum in aa.asm 150 <1> OP_FIRST_ASM_REGNUM equ nextindex ; corresponding to asm_regnum start 151 <1> opitem OP_DX, ARG_JUSTREG, ao48, "DX" ; DX 152 <1> opitem OP_CL, ARG_JUSTREG, ao48, "CL" ; CL 153 <1> opitem OP_ST, ARG_WEIRDREG, ao48, "ST" ; ST (top of coprocessor stack) 154 <1> opitem OP_CS, ARG_WEIRDREG, ao48, "CS" ; CS 155 <1> opitem OP_DS, ARG_WEIRDREG, ao48, "DS" ; DS 156 <1> opitem OP_ES, ARG_WEIRDREG, ao48, "ES" ; ES 157 <1> opitem OP_FS, ARG_WEIRDREG, ao48, "FS" ; FS 158 <1> opitem OP_GS, ARG_WEIRDREG, ao48, "GS" ; GS 159 <1> opitem OP_SS, ARG_WEIRDREG, ao48, "SS" ; SS 160 <1> OP_AFTER_LAST equ nextindex 161 <1> %if nextindex > OP_SIZE 162 <1> %error Too many op items 163 <1> %endif 164 <1> OP_AMOUNT_TABLE equ nextindex + 16 - 1 165 <1> ; nextindex: amount sizeless types 166 <1> ; 16: OP_SIZE combined types 167 <1> ; -1: OP_END does not occur in tables 168 <1> 169 <1> ; The following are extensions to sizeless OP_ items. 170 <1> ; After an OP_X operand, a byte giving an index into 171 <1> ; the OPX tables follows in the list. This is never 172 <1> ; used with a size so we can make use of the full 173 <1> ; eight bits. First macro parameter is the name which 174 <1> ; matches the use in instr.key. Second parameter is 175 <1> ; the routine in the assembler to dispatch to. Third 176 <1> ; parameter is the routine in the disassembler. 177 <1> ; Only used for some disassembler extensions for now. 178 <1> 179 <1> %macro opxitem 3.nolist 180 <1> %1 equ nextindex 181 <1> %xdefine ASMJMP_OPXITEMS ASMJMP_OPXITEMS,%2 182 <1> %xdefine DISJMP_OPXITEMS DISJMP_OPXITEMS,%3 183 <1> %assign nextindex nextindex + 1 184 <1> %endmacro 185 <1> %assign nextindex 0 186 <1> %define ASMJMP_OPXITEMS "" 187 <1> %define DISJMP_OPXITEMS "" 188 <1> opxitem OPX_NOTHING, ao_modifier_continue, dop60a 189 <1> opxitem OPX_MOD_IF_REG, ao_modifier_continue, dop_mod_if_reg 190 <1> opxitem OPX_MOD_IF_MEMOFFS_AND_OTHER_REG_AL_AX_EAX, ao_modifier_continue, dop_mod_if_memoffs_and_other_acc 192 <1> opxitem OPX_MOD_IF_OTHER_REG_AX_EAX, ao_modifier_continue, dop_mod_if_other_acc_1632 194 <1> opxitem OPX_MOD_IF_REG_1632, ao_modifier_continue, dop_mod_if_reg_1632 196 <1> opxitem OPX_MOD_IF_REG_AL_AX_EAX, ao_modifier_continue, dop_mod_if_reg_acc 198 <1> opxitem OPX_MOD_IF_REG_AX_EAX, ao_modifier_continue, dop_mod_if_reg_acc_1632 200 <1> opxitem OPX_MODALWAYS_IF_REG, ao_modifier_continue, dop_modalways_if_reg 202 <1> opxitem OPX_LOOP_OPTION, ac09_internal_error, dop_loop_option 203 <1> opxitem OPX_MOD_FORCE_3, ao_modifier_continue, dop_mod_force_3 204 <1> %if nextindex > 256 205 <1> %error Too many opx items 206 <1> %endif 21 %define MN_BSWAP %? 22 %define MN_GS %? 23 %define MN_O32 %? 24 %endif 25 26 27 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 27 ------------------ note: usesection lDEBUG_CODE 28 29 ..@uu_access_start: 30 ; U command - disassemble. 31 uu: 0 0000AAA5 4E dec si 0 0000AAA6 4E dec si 0 0000AAA7 BA[0000] mov dx, msg.uninstall 0 0000AAAA E8[0000] call isstring? 0 0000AAAD AC lodsb 0 0000AAAE 7503E9[0000] je uninstall 38 %if _LOADER 39 jmp error 40 %else 0 0000AAB3 AC lodsb 42 0 0000AAB4 C706[0000][1A00] mov word [lastcmd], lastuu 0 0000AABA E8[0000] call iseol? 0 0000AABD 7530 jne uu1 ; if an address was given 46 47 lastuu: 48 _386_PM xor eax, eax 0 0000AABF A1[0000] mov ax, word [uu_default_lines] 50 ; default length in lines, if nonzero 0 0000AAC2 85C0 test ax, ax 0 0000AAC4 740C jz @F 0 0000AAC6 7807 js short .error 0 0000AAC8 A3[0000] mov word [getrange_lines], ax 0 0000AACB 31C0 xor ax, ax 0 0000AACD EB11 jmp @FF 57 58 .error: 0 0000AACF E9[0000] jmp error 60 61 @@: 0 0000AAD2 C706[0000]0080 mov word [getrange_lines], 8000h 0 0000AAD8 A1[0000] mov ax, word [uu_default_length] 0 0000AADB 85C0 test ax, ax 0 0000AADD 74F0 jz short .error 0 0000AADF 48 dec ax 67 @@: 68 _386_PM_o32 ; mov ecx, dword [u_addr] 0 0000AAE0 8B0E[0000] mov cx, word [u_addr] 70 _386_PM_o32 ; mov edx, ecx 0 0000AAE4 89CA mov dx, cx 72 _386_PM_o32 ; add ecx, byte 1Fh 0 0000AAE6 01C1 add cx, ax 0 0000AAE8 7303 jnc .no_overflow ; if no overflow --> 75 _386_PM_o32 ; or ecx, byte -1 0 0000AAEA 83C9FF or cx, byte -1 ; til end of segment 77 .no_overflow: 0 0000AAED EB25 jmp short uu2 79 80 uu1: 0 0000AAEF 8B0E[0000] mov cx, word [uu_default_length] 82 ; default length 0 0000AAF3 8B3E[0000] mov di, word [uu_default_lines] 84 ; default length in lines, if nonzero 0 0000AAF7 8B1E[0000] mov bx, word [reg_cs] 0 0000AAFB C706[0000]0080 mov word [getrange_lines], 8000h 87 %if _MS_0RANGE_COMPAT 0 0000AB01 C606[0000]FF mov byte [getrange_is_uu], -1 0 0000AB06 E8[0000] nearcall getrangeX.lines_and_uu ; get address range into bx:(e)dx 90 %else 91 nearcall getrangeX.lines ; get address range into bx:(e)dx 92 %endif 0 0000AB09 E8[0000] call chkeol ; expect end of line here 0 0000AB0C 891E[0400] mov word [u_addr + saSegSel], bx 95 %if _PM 96 call ispm 97 jnz .86m 98 .pm: 99 mov word [u_addr + saSelector], bx 100 jmp @F 101 .86m: 102 mov word [u_addr + saSegment], bx 103 @@: 104 %endif 105 _386_PM_o32 ; mov dword [u_addr], edx 0 0000AB10 8916[0000] mov word [u_addr], dx 107 108 ; (d)word [u_addr] = offset start address 109 ; word [u_addr + saSegSel] = segment start address 110 ; (e)cx = end address 111 ; (e)dx = start adddress (same as [u_addr]) 112 uu2: 113 _386_PM_o32 ; inc ecx 0 0000AB14 41 inc cx 115 uu3: 0 0000AB15 E8[0000] call handle_serial_flags_ctrl_c 117 _386_PM_o32 ; push ecx 0 0000AB18 51 push cx 119 _386_PM_o32 ; push edx 0 0000AB19 52 push dx 0 0000AB1A 8326[FA00]00 and word [disflags], 0 0 0000AB1F E81E00 call disasm ; do it 123 _386_PM_o32 ; pop ebx 0 0000AB22 5B pop bx 125 _386_PM_o32 ; pop ecx 0 0000AB23 59 pop cx 127 _386_PM_o32 ; mov eax, dword [u_addr] 0 0000AB24 A1[0000] mov ax, word [u_addr] 129 _386_PM_o32 ; mov edx, eax 0 0000AB27 89C2 mov dx, ax 131 _386_PM_o32 ; sub eax, ecx 0 0000AB29 29C8 sub ax, cx ; current position - end 133 _386_PM_o32 ; sub ebx, ecx 0 0000AB2B 29CB sub bx, cx ; previous position - end 135 0 0000AB2D F606[0100]80 testopt [getrange_lines], 8000h 0 0000AB32 7405 jz @F 138 _386_PM_o32 ; cmp eax, ebx 0 0000AB34 39D8 cmp ax, bx 0 0000AB36 73DD jnb uu3 ; if we haven't reached the goal 0 0000AB38 C3 retn 142 143 @@: 0 0000AB39 FF0E[0000] dec word [getrange_lines] 0 0000AB3D 75D6 jnz uu3 0 0000AB3F C3 retn 147 148 149 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 149 ------------------ note: usesection lDEBUG_DATA_ENTRY 150 %if _LINK_COMPAT 151 align 16, db 0 152 %endif 153 154 ; Jump table for displaying sized operands. 155 ; Entries are defined in the debug.asm opsizeditem list. 156 align 2, db 0 157 disjmp2: 0 00005A10 [6909][3009][9D09] dw DISJMP2_OPSIZEDITEMS 0 00005A16 [670C][740C][8E09] 0 00005A1C [7D0C][CE0C][D30C] 159 .end: 160 161 ; Jump table for displaying operands. 162 ; Entries are defined in the debug.asm opitem list. 163 align 2, db 0 164 optab: 0 00005A22 [3A02] dw da_internal_error ; entry for OP_END 0 00005A24 [D70C][DB0C][EC0C] dw OPTAB_OPITEMS 0 00005A2A [090D][1F0D][310D] 0 00005A30 [3A02][D90D][170E] 0 00005A36 [C60F][D60F][EC0F] 0 00005A3C [0C10][1710][3610] 0 00005A42 [5E10][5E10][7010] 0 00005A48 [8B10][7610][8410] 0 00005A4E [9610][9E10][AF10] 0 00005A54 [2D12][3212][5712] 0 00005A5A [7212][7E12][8512] 0 00005A60 [3612][3D12][4412] 0 00005A66 [5012][4B12][6E11] 0 00005A6C [9611][C711][2612] 0 00005A72 [B70C]310033004458 0 00005A7A 434C53544353445345 0 00005A83 53465347535353 167 168 169 align 2, db 0 170 disjmp_opx: 0 00005A8A [3212][F410][2111] dw DISJMP_OPXITEMS 0 00005A90 [4C11][ED10][6511] 0 00005A96 [5E11][E410][B910] 0 00005A9C [DA10] 172 173 174 %if _MEMREF_AMOUNT 0 00005A9E 00 align 16, db 0 0 00005AA0 00 memrefs: times MEMREF_size * _MEMREF_AMOUNT db 0 0 00005AE0 0000 .free: dw 0 178 0 00005AE2 00 align 4, db 0 180 string_memref_counter: 0 00005AE4 00000000 dd 0 182 %endif 183 184 185 ; DISASM - Disassemble. 186 187 %if _SYMBOLIC 188 align 4, db 0 189 u_lin_start: dd 0 190 %endif 191 align 2, db 0 192 %if _40COLUMNS 0 00005AE8 0000 mnemonofs: dw 0 0 00005AEA 0000 trailofs: dw 0 195 %endif 0 00005AEC 0000 dis_n: dw 0 ; number of bytes in instruction so far 0 00005AEE 0000 dw 0 0 00005AF0 00 preflags: db 0 ; flags for prefixes found so far (includes OSIZE,ASIZE) 0 00005AF1 00 preused: db 0 ; flags for prefixes used so far 200 %if _PM 201 presizeflags: db 0 ; O32,A32 flags = (OSIZE,ASIZE) XOR (32-bit cs?) 202 %else 203 presizeflags: equ preflags ; O32,A32 flags are always equal to OSIZE,ASIZE 204 %endif 205 206 %if 0 ; moved to debug.mac 207 PRESEG equ 1 ; segment prefix 208 PREREP equ 2 ; rep prefixes 209 PREREPZ equ 4 ; F3h, not F2h 210 PRELOCK equ 8 ; lock prefix 211 PREOSIZE equ 10h ; flag for OSIZE prefix 212 PREASIZE equ 20h ; flag for ASIZE prefix 213 PRE32D equ 10h ; flag for 32-bit data 214 PRE32A equ 20h ; flag for 32-bit addressing 215 PREWAIT equ 40h ; prefix wait (not really a prefix) 216 GOTREGM equ 80h ; set if we have the reg/mem part 217 %endif 218 0 00005AF2 00 instru: db 0 ; the main instruction byte 0 00005AF3 00 disp8: db 0 0 00005AF4 00 gotsib: db 0 222 %if 1 223 ; This handling is commented because it is never needed. 224 ; Almost all OPX operands that display the MODRM keyword 225 ; (OPX_MOD_IF_*) have a single condition per oplist, so 226 ; never need this flag. MOV 8A:F5 is the exception. But 227 ; its two OPX operands can never both show the keyword as 228 ; one needs an memoffs in the r/m and the other a reg. 229 ; Update: Enabled now, for XCHG AX, MODRM AX. 0 00005AF5 00 moddone:db 0 ; whether MODRM keyword displayed yet 231 %endif 232 align 2, db 0 0 00005AF6 0000 index: dw 0 ; index of the instruction (unsqueezed) 0 00005AF8 [0000][0100][0400] obsinst:dw SFPGROUP3, SFPGROUP3+1, SFPGROUP3+4 0 00005AFE [2400][2600] dw SPARSE_BASE+24h, SPARSE_BASE+26h ; obsolete-instruction values 236 ; This is used to search for obsolete instructions: 237 ; DBE0h: feni 238 ; DBE1h: fdisi 239 ; DBE4h: fsetpm 240 ; 124h: mov trX, reg 241 ; 126h: mov reg, trX 242 0 00005B02 00 rmsize: db 0 ; <0 or 0 or >0 means mod r/m is 8 or 16 or 32 0 00005B03 00 segmnt: db 0 ; segment determined by prefix (or otherwise) 245 align 4, db 0 0 00005B04 00000000 addrr: dd 0 ; address in mod r/m byte 0 00005B08 0000 savesp2:dw 0 ; save the stack pointer here (used in disasm) 248 249 align 2, db 0 0 00005B0A 0000 disflags: dw 0 ; flags for the disassembler 251 252 ;--- equates for disflags: 253 254 %if 0 ; moved to debug.mac 255 DIS_F_REPT equ 1 ; repeat after pop ss, etc. 256 DIS_F_SHOW equ 2 ; show memory contents 257 DIS_I_SHOW equ 4 ; there are memory contents to show 258 DIS_I_UNUSED equ 8 ; (internal) print " (unused)" 259 DIS_I_SHOWSIZ equ 10h ; (internal) always show the operand size 260 DIS_I_KNOWSIZ equ 20h ; (internal) we know the operand size of instr. 261 DIS_I_MOV_SS equ 40h ; (internal) note for repetition: mov ss 262 DIS_I_DONTSHOW equ 80h ; do not show memory contents override 263 DIS_I_NOSIZ equ 100h ; do not show size 264 DIS_I_FAR_M equ 200h ; far memory reference, show segment word contents 265 DIS_I_DOUBLE_M equ 400h ; double memory reference, show second item contents 266 DIS_I_SHOW_A32 equ 800h ; memory contents to show are 32-bit addressed 267 DIS_I_M_SRC equ 1000h ; memory operand is source 268 DIS_I_M_DST equ 2000h ; memory operand is destination 269 ; both of the above may be set 270 DIS_I_M_ALWAYS_16 equ 4000h ; mov from or to segreg, display no size 271 ; and treat as m16 and ignore (but allow) osize 272 %endif 273 0 00005B0C 00 disflags2: db 0 ; another copy of DIS_I_KNOWSIZ 0 00005B0D 00 disrepeatcount: db 0 276 277 align 2, db 0 0 00005B0E 0000 sizeloc: dw 0 ; address of size words in output line 279 uu_a32_size_byte_keyword: 0 00005B10 0000 dw 0 281 uu_a32_size_dword_keyword: 0 00005B12 0000 dw 0 283 %if _COND 0 00005B14 0000 condmsg: dw 0 ; -> conditionals message to display (if R and no mem) 285 %endif 286 287 ; Jump table for a certain place. 288 ; The size of this table matches OPTYPES_BASE. 289 align 2, db 0 290 disjmp: 0 00005B16 [A512] dw disbad ; illegal instruction 0 00005B18 [5701] dw da_twobyte ; two-byte instruction 0 00005B1A [6301] dw da_insgrp ; instruction group 0 00005B1C [6A01] dw da_fpuins ; coprocessor instruction 0 00005B1E [8501] dw da_fpugrp ; coprocessor instruction group 0 00005B20 [8E01] dw da_insprf ; instruction prefix (including 66h/67h) 297 %ifn _LINK 298 %if ($ - disjmp) != OPTYPES_BASE 299 %error Wrong length of table disjmp 300 %endif 301 %endif 302 303 ; Table for 16-bit mod r/m addressing. 8 = BX, 4 = BP, 2 = SI, 1 = DI. 0 00005B22 0A09060502010408 rmtab: db 8+2, 8+1, 4+2, 4+1, 2, 1, 4, 8 305 306 307 align 2, db 0 0 00005B2A [0000][0000][0000] reg32addr: dw reg_eax, reg_ecx, reg_edx, reg_ebx 0 00005B30 [0000] 0 00005B32 [0000][0000][0000] dw reg_esp, reg_ebp, reg_esi, reg_edi 0 00005B38 [0000] 310 311 align 2, db 0 0 00005B3A [0000][0000][0000] segrgaddr: dw reg_es,reg_cs,reg_ss,reg_ds,reg_fs,reg_gs 0 00005B40 [0000][0000][0000] 313 314 ; Tables for handling of named prefixes. 315 316 prefixlist: 0 00005B46 262E363E .segment: db 26h,2Eh,36h,3Eh 318 %ifdef MN_GS 0 00005B4A 6465 db 64h,65h ; segment prefixes (in order) 320 %endif 321 .after_segment: 0 00005B4C 9BF0F2F3 db 9Bh,0F0h,0F2h,0F3h ; WAIT,LOCK,REPNE,REPE 323 .size: 324 %ifdef MN_O32 0 00005B50 6667 db 066h,067h ; OSIZE, ASIZE 326 %endif 327 N_PREFIX: equ $ - prefixlist 328 329 align 2, db 0 0 00005B52 [0000][0000][0000] prefixmnem: dw MN_WAIT,MN_LOCK,MN_REPNE,MN_REPE 0 00005B58 [0000] 331 %ifdef MN_O32 0 00005B5A [0000][0000] dw MN_O32,MN_A32 ; in 16-bit CS, OSIZE is O32 and ASIZE is A32 333 %if _PM 334 dw MN_O16,MN_A16 ; in 32-bit CS, OSIZE is O16 and ASIZE is A16 335 %endif 336 %endif 337 338 %if _COND 339 align 2, db 0 340 cond_table: 0 00005B5E 0008 dw 800h ; OF 0 00005B60 0100 dw 1 ; CF 0 00005B62 4000 dw 40h ; ZF 0 00005B64 4100 dw 41h ; CF | ZF 0 00005B66 8000 dw 80h ; SF 0 00005B68 0400 dw 4 ; PF 347 ; dw cond_L_GE ; handled specifically 348 ; dw cond_LE_G ; handled specifically 349 %endif 350 351 single_byte_opcodes_repeat_disassembly: 352 .: 0 00005B6A E6 db 0E6h ; out imm8, al 0 00005B6B E7 db 0E7h ; out imm8, (e)ax 0 00005B6C EE db 0EEh ; out dx, al 0 00005B6D EF db 0EFh ; out dx, (e)ax 0 00005B6E 6E db 06Eh ; outsb 0 00005B6F 6F db 06Fh ; outsw/outsd 0 00005B70 E4 db 0E4h ; in al, imm8 0 00005B71 E5 db 0E5h ; in (e)ax, imm8 0 00005B72 EC db 0ECh ; in al, dx 0 00005B73 ED db 0EDh ; in (e)ax, dx 0 00005B74 6C db 06Ch ; insb 0 00005B75 6D db 06Dh ; insw/insd 0 00005B76 F4 db 0F4h ; hlt 0 00005B77 FB db 0FBh ; sti 0 00005B78 17 db 17h ; pop ss 368 .length: equ $ - . 0 00005B79 1F db 1Fh ; pop ds 0 00005B7A 07 db 07h ; pop es 371 .length_nec: equ $ - . 372 373 374 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 374 ------------------ note: usesection lDEBUG_CODE 375 376 disasm: section_of_function 0 0000AB40 C606[FD00]00 mov byte [disrepeatcount], 0 ; number of repeated disassembly lines 378 379 %if _MEMREF_AMOUNT 0 0000AB45 B90400 mov cx, _MEMREF_AMOUNT 0 0000AB48 BF[9000] mov di, memrefs 382 @@: 0 0000AB4B E88A0E call init_one_memref 0 0000AB4E E2FB loop @B 0 0000AB50 AB stosw ; memrefs.free 386 %endif 387 388 .preserve_disrepeatcount: 389 %if _COND 0 0000AB51 8326[0401]00 and word [condmsg], 0 ; initialize conditions message 391 %endif 392 .preserve_condmsg_and_disrepeatcount: 0 0000AB56 8926[F800] mov word [savesp2], sp 394 _386_PM_o32 ; xor eax, eax 0 0000AB5A 31C0 xor ax, ax 396 _386_PM_o32 ; mov dword [dis_n], eax 0 0000AB5C A3[DC00] mov word [dis_n], ax 0 0000AB5F A3[E300] mov word [disp8], ax ; clear disp8 and gotsib 0 0000AB62 A3[E000] mov word [preflags], ax ; clear preflags and preused 0 0000AB65 A3[0001] mov word [uu_a32_size_byte_keyword], ax 0 0000AB68 A3[0201] mov word [uu_a32_size_dword_keyword], ax 402 %if 1 0 0000AB6B A2[E500] mov byte [moddone], al 404 %endif 0 0000AB6E C706[F200]8003 mov word [rmsize], 0380h ; rmsize = 80h don't display any memory, 406 ; segmnt = 3 initially use DS segment 407 %if rmsize + 1 != segmnt 408 %error Unexpected layout 409 %endif 0 0000AB74 A3[0000] mov word [dismach], ax ; no special machine needed, so far 0 0000AB77 8B1E[0400] mov bx, word [u_addr + saSegSel] 412 %if _PM 413 mov byte [bCSAttr], al 414 %if _DISASM_32BIT 415 call test_d_b_bit 416 jz .16 417 mov byte [bCSAttr], 40h 418 .16: 419 %endif 420 %endif 421 %if _40COLUMNS 0 0000AB7B B81C00 mov ax, MNEMONOFS 0 0000AB7E BA4F00 mov dx, 79 424 %if _MS_MNEMON_COMPAT 0 0000AB81 F606[0100]04 testopt [asm_options], disasm_msdebug_mnemonofs 0 0000AB86 7403 jz .notms 0 0000AB88 B81800 mov ax, MNEMONOFS_MS 428 .notms: 429 %endif 0 0000AB8B F606[0100]01 testopt [asm_options], disasm_40_columns 0 0000AB90 7406 jz .not40 0 0000AB92 B81400 mov ax, MNEMONOFS_40 0 0000AB95 BA2700 mov dx, 39 434 .not40: 0 0000AB98 A3[D800] mov word [mnemonofs], ax 0 0000AB9B 8916[DA00] mov word [trailofs], dx 437 %endif 438 439 %if _SYMBOLIC 440 nearcall zz_detect_xms ; re-detect XMS if used after run 441 442 testopt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 443 jnz .no_symbol 444 445 _386_PM_o32 446 mov dx, word [u_addr] 447 call getlinear_32bit 448 jc .no_symbol 449 450 mov word [u_lin_start], ax 451 mov word [u_lin_start + 2], dx 452 453 mov cx, dx 454 mov bx, ax 455 nearcall binsearchmain ; search for matching symbol 456 jcxz .no_symbol 457 .loop_symbol: 458 push bx 459 dualcall displaystring 460 push bx 461 push ax 462 dualcall getfarpointer.main 463 pop di 464 pop es 465 xor dx, dx 466 _386_PM test byte [bCSAttr], 40h 467 _386_PM jz @F 468 _386_PM mov dx, word [u_addr + 2] 469 @@: 470 mov ax, word [u_addr] 471 cmp dx, word [es:di + smOffset + 2] 472 mov dx, msg.uu_after_symbol.non_wrt 473 jne .wrt_symbol 474 cmp ax, word [es:di + smOffset] 475 je .non_wrt_symbol 476 .wrt_symbol: 477 mov dx, msg.uu_between_symbol.wrt 478 call disp_message 479 push ss 480 pop es 481 mov di, line_out 482 mov ax, word [u_addr + 4] 483 call hexword 484 push bx 485 push cx 486 call putsline 487 pop cx 488 pop bx 489 mov dx, msg.uu_after_symbol.wrt 490 .non_wrt_symbol: 491 call disp_message 492 .next_symbol: 493 inc bx 494 loop .loop_symbol 495 496 .no_symbol: 497 push ss 498 pop es 499 push ss 500 pop ds 501 %endif 502 0 0000AB9F E89E13 call disgetbyte ; get a byte of the instruction 0 0000ABA2 3C9B cmp al, 9Bh ; wait instruction (must be the first prefix) 0 0000ABA4 7508 jne da2 ; if not --> 506 507 ; The wait instruction is actually a separate instruction as far as 508 ; the x86 is concerned, but we treat it as a prefix since there are 509 ; some mnemonics that incorporate it. But it has to be treated specially 510 ; since you can't do, e.g., seg cs wait ... but must do wait seg cs ... 511 ; instead. We'll catch it later if the wait instruction is not going to 512 ; be part of a shared mnemonic. 513 0 0000ABA6 800E[E000]40 or byte [preflags], PREWAIT 515 516 ; If we've found a prefix, we return here for the actual instruction 517 ; (or another prefix). 518 519 da1: 0 0000ABAB E89213 call disgetbyte 521 da2: 0 0000ABAE A2[E200] mov [instru],al ; save away the instruction 0 0000ABB1 B400 mov ah,0 524 525 ; Now we have the sequence number of the instruction in AX. Look it up. 526 527 da3: 0 0000ABB3 89C3 mov bx,ax 0 0000ABB5 A3[E600] mov [index],ax ; save the compressed index 0 0000ABB8 3D[0000] cmp ax,SPARSE_BASE 0 0000ABBB 720A jb da4 ; if it's not from the squeezed part of the table 532 %if _LINK 0 0000ABBD 8A9F[0000] mov bl,[word sqztab+bx] 534 wlcalc word_minusext_SPARSE_BASE, equ $ - 2 535 %else 536 mov bl,[sqztab+bx-SPARSE_BASE] 537 %endif 0 0000ABC1 B700 mov bh,0 0 0000ABC3 81C3[0000] add bx,SPARSE_BASE ; bx = compressed index 540 541 da4: 0 0000ABC7 8A8F[0000] mov cl, [optypes+bx]; cx = opcode type 0 0000ABCB B500 mov ch, 0 0 0000ABCD D1E3 shl bx, 1 0 0000ABCF 8B9F[0000] mov bx, [opinfo+bx] ; bx = other info (usually the mnemonic) 0 0000ABD3 89CE mov si, cx 0 0000ABD5 89D8 mov ax, bx 0 0000ABD7 B10C mov cl, 12 0 0000ABD9 D3E8 shr ax, cl 0 0000ABDB 3A06[0000] cmp al, [dismach] 0 0000ABDF 7203 jb da5 ; if a higher machine is already required 0 0000ABE1 A2[0000] mov [dismach], al ; set machine type 553 da5: 0 0000ABE4 80E70F and bh, 0Fh ; remove the machine field 555 %if _LINK_COMPAT 0 0000ABE7 81FE[0000] cmp si, strict word OPTYPES_BASE 557 %else 558 cmp si, OPTYPES_BASE 559 %endif 0 0000ABEB 7360 jae da13_unp ; if this is an actual instruction 0 0000ABED F7C60100 test si, 1 ; check whether valid displacement 0 0000ABF1 7403E9E900 jnz da_internal_error ; if not --> 0 0000ABF6 FF94[0601] call [disjmp+si] ; otherwise, do more specific processing 0 0000ABFA EBB7 jmp s da3 ; back for more 565 566 ; Two-byte instruction. 567 568 da_twobyte: 0 0000ABFC E84113 call disgetbyte 0 0000ABFF A2[E200] mov [instru],al 0 0000AC02 B400 mov ah,0 0 0000AC04 05[0000] add ax,SPARSE_BASE 0 0000AC07 C3 ret 574 575 ; Instruction group. 576 577 da_insgrp: 0 0000AC08 E89711 call getregmem_r ; get the middle 3 bits of the R/M byte 0 0000AC0B 98 cbw 0 0000AC0C 01D8 add ax,bx ; offset 0 0000AC0E C3 ret 582 583 ; Coprocessor instruction. 584 585 da_fpuins: 0 0000AC0F 800E[FA00]10 or byte [disflags],DIS_I_SHOWSIZ 0 0000AC14 800E[0000]01 or byte [dmflags],DM_COPR 0 0000AC19 E89011 call getregmem 0 0000AC1C 3CC0 cmp al,0c0h 0 0000AC1E 72E8 jb da_insgrp ;range 00-bfh is same as an instruction group 0 0000AC20 B103 mov cl,3 0 0000AC22 D2E8 shr al,cl ;C0h --> 18h 0 0000AC24 2C10 sub al,18h-8 ;18h --> 8 0 0000AC26 98 cbw 0 0000AC27 01D8 add ax,bx ;offset 0 0000AC29 C3 ret 597 598 ; Coprocessor instruction group. 599 600 da_fpugrp: 0 0000AC2A A0[0000] mov al,[regmem] 0 0000AC2D 2407 and al,7 0 0000AC2F 98 cbw 0 0000AC30 01D8 add ax,bx 0 0000AC32 C3 ret 606 607 ; Instruction prefix. At this point, bl = prefix bits; bh = segment 608 609 da_insprf: 0 0000AC33 841E[E000] test bl,[preflags] 0 0000AC37 7511 jnz da12 ; if there are duplicates 0 0000AC39 081E[E000] or [preflags],bl 0 0000AC3D F6C301 test bl,PRESEG 0 0000AC40 7404 jz da11 ; if not a segment 0 0000AC42 883E[F300] mov [segmnt],bh ; save the segment 616 da11: 0 0000AC46 58 pop ax ; discard return address 0 0000AC47 E961FF jmp da1 619 620 da12: 0 0000AC4A E9FD10 jmp disbad ; we don't allow duplicate prefixes 622 623 ; si = index into table opindex, + OPTYPES_BASE 624 da13_unp: 625 %if _LINK_COMPAT 0 0000AC4D 81EE[0000] sub si, strict word OPTYPES_BASE 627 %else 628 sub si, OPTYPES_BASE ; = offset into opindex 629 %endif 0 0000AC51 31C0 xor ax, ax 0 0000AC53 8A84[0000] mov al, [si + opindex] ; ax = adjustment (from opindex) 0 0000AC57 01F6 add si, si ; take offset twice 0 0000AC59 4E dec si ; subtract one 0 0000AC5A 01C6 add si, ax ; add in the adjustment 635 636 ; OK. Here we go. This is an actual instruction. 637 ; bx = offset of mnemonic in mnlist 638 ; si = offset of operand list in oplists 639 ; First print the op mnemonic. 640 641 da13: 642 %if _PM 643 mov al, byte [preflags] 644 and al, PREOSIZE | PREASIZE ; get OSIZE,ASIZE status (= O32,A32 in 16-bit cs) 645 %if _DISASM_32BIT 646 _386 test byte [bCSAttr], 40h ; in a 32-bit segment? 647 _386 jz .16 ; no --> 648 _386 xor al, PRE32D | PRE32A ; OSIZE,ASIZE present means O16,A16 649 .16: 650 %endif 651 mov byte [presizeflags], al ; set O32,A32 status 652 %endif 0 0000AC5C 56 push si 0 0000AC5D 8DB7[0000] lea si,[mnlist+bx] ; offset of mnemonic 655 %ifdef MN_BSWAP 656 %if _LINK 0 0000AC61 81FE[0000] cmp si, strict word mnlist 658 wlcalc word_ext_MN_BSWAP, equ $ - 2 659 %else 660 cmp si,mnlist+MN_BSWAP 661 %endif 0 0000AC65 7505 jne da13a ; if not BSWAP 0 0000AC67 E86612 call dischk32d 0 0000AC6A 74DE jz da12 ; if no operand-size prefix --> 665 %endif 666 da13a: 0 0000AC6C E88511 call showop ; print out the op code (at line_out+28) 0 0000AC6F 8326[FE00]00 and word [sizeloc], 0 ; clear out this flag 0 0000AC74 5E pop si ; recover list of operands (offset in oplists) 0 0000AC75 81C6[0000] add si, oplists ; -> actual oplist entry 671 672 da14_check_end: 0 0000AC79 803C00 cmp byte [si], OP_END 0 0000AC7C 7503E98E00 je da_op_end_e ; if we're done --> 675 676 ; Loop over operands. si-> next operand type. 677 ; Fortunately the operands appear in the instruction in the same 678 ; order as they appear in the disassembly output. 679 680 da14: 0 0000AC81 C606[FC00]00 mov byte [disflags2], 0 ; clear out size-related flags 0 0000AC86 AC lodsb ; get the operand type 0 0000AC87 3C40 cmp al,OP_SIZE 0 0000AC89 7263 jb da18 ; if it's not size dependent 0 0000AC8B C606[FC00]20 mov byte [disflags2],DIS_I_KNOWSIZ ;indicate variable size 0 0000AC90 3CB0 cmp al,OP_1632_DEFAULT_ASM 0 0000AC92 7323 jae da15 0 0000AC94 3CA0 cmp al,OP_1632_DEFAULT 0 0000AC96 7313 jae da15_default 0 0000AC98 3C60 cmp al,OP_8 0 0000AC9A 7329 jae da16 ; if the size is fixed (8, 16, 32, 64) 0 0000AC9C 3C50 cmp al,OP_1632 0 0000AC9E 7317 jae da15 ; if word or dword (or segreg mov) 694 ; OP_ALL here. This has a width of 2. 695 ; If the low bit is clear, this means 696 ; 8 bit, else 16/32 bits. 0 0000ACA0 B4FF mov ah,-1 0 0000ACA2 F606[E200]01 test byte [instru],1 0 0000ACA7 7424 jz da17 ; if byte --> 0 0000ACA9 EB0C jmp da15 701 702 da15_default: 703 %if _DISASM_32BIT 0 0000ACAB F606[E000]10 test byte [preflags], PREOSIZE 0 0000ACB0 7505 jnz da15 706 %endif 0 0000ACB2 800E[FB00]01 setopt [disflags], DIS_I_NOSIZ 708 da15: 0 0000ACB7 800E[E100]10 or byte [preused],PRE32D; mark this flag as used 710 .no_use_osize: 0 0000ACBC 8A26[E000] mov ah,[presizeflags] 0 0000ACC0 80E410 and ah,PRE32D ;this will be 10h for dword, 00h for word 0 0000ACC3 EB08 jmp s da17 ;done 714 715 da16: 0 0000ACC5 88C4 mov ah,al ;OP_8, OP_16, OP_32 or OP_64 (we know which) 0 0000ACC7 80E4F0 and ah,0f0h ;this converts ah to <0 for byte, =0 for word, 0 0000ACCA 80EC70 sub ah,OP_16 ;and >0 for dword (byte=F0h, word=00h, dword=10h, qword=20h) 719 720 ; Now we know the size (in ah); branch off to do the operand itself. 721 722 da17: 0 0000ACCD 88C3 mov bl, al 0 0000ACCF 83E30F and bx, 0Fh ; 8 entries (IMM, RM, M, R_MOD, M_OFFS, R, R_ADD, AX) 0 0000ACD2 D1E3 shl bx, 1 0 0000ACD4 83FB12 cmp bx, disjmp2.end - disjmp2 0 0000ACD7 7306 jae @F 0 0000ACD9 FF97[0000] call [disjmp2 + bx] ; print out the operand 0 0000ACDD EB2D jmp short da20 ; done with operand 730 731 @@: 732 da_internal_error: 0 0000ACDF B80E01 mov ax, 010Eh 0 0000ACE2 E8[0000] call setrc 0 0000ACE5 BA[0000] mov dx, msg.uu_internal_error 0 0000ACE8 E8[0000] call putsz 0 0000ACEB E9[0000] jmp cmd3 738 739 740 ; Sizeless operands. 741 742 da18: 0 0000ACEE 98 cbw 0 0000ACEF 93 xchg ax, bx ; bx = index 0 0000ACF0 D1E3 shl bx, 1 0 0000ACF2 8B87[1200] mov ax, [optab + bx] 0 0000ACF6 83FB52 cmp bx, OP_FIRST_STRING << 1 0 0000ACF9 720F jb da19 ; if it's not a string 0 0000ACFB 83FB68 cmp bx, OP_AFTER_LAST << 1 0 0000ACFE 73DF jae @B 0 0000AD00 E85A11 call dis_stosw_lowercase 0 0000AD03 84E4 test ah, ah 0 0000AD05 7505 jnz da20 ; if it's two characters 0 0000AD07 4F dec di 0 0000AD08 EB02 jmp s da20 ; done with operand 756 757 da19: 0 0000AD0A FFD0 call ax ; otherwise, do something else 759 760 ; Operand done, check if there's another one. 761 da20: 0 0000AD0C 803C00 cmp byte [si], OP_END 763 da_op_end_e: 0 0000AD0F 7410 je da_op_end ; if we're done --> 0 0000AD11 B02C mov al,',' 0 0000AD13 AA stosb 0 0000AD14 F606[0000]02 testopt [asm_options], disasm_commablank 0 0000AD19 7403 jz .nospace 0 0000AD1B B020 mov al, 32 0 0000AD1D AA stosb 771 .nospace: 0 0000AD1E E960FF jmp da14 ;another operand 773 774 775 ; All operands done. Now handle prefixes: 776 ; OPSIZE (66h), ADDRSIZE (67h), WAIT, segment, REP, LOCK 777 da_op_end: 778 779 ; Now check whether O32 or A32 modifies the opcode. 780 da_modify_opcode_osize_asize: 781 %if _DISASM_32BIT 0 0000AD21 B9[0000] mov cx, N_LTABO 0 0000AD24 BB[0000] mov bx, ltabo1 784 %ifn _LINK 785 mov dx, 2*N_LTABO-2 786 %else 0 0000AD27 BA[FEFF] mov dx, N_LTABO-2 788 wlcalc word_ext_N_LTABO, equ $ - 2 789 %endif 0 0000AD2A B410 mov ah, PRE32D 0 0000AD2C E89100 call da23_osize_asize 792 0 0000AD2F B9[0000] mov cx, N_LTABA 0 0000AD32 BB[0000] mov bx, ltaba1 795 %ifn _LINK 796 mov dx, 2*N_LTABA-2 797 %else 0 0000AD35 BA[FEFF] mov dx, N_LTABA-2 799 wlcalc word_ext_N_LTABA, equ $ - 2 800 %endif 0 0000AD38 B420 mov ah, PRE32A 0 0000AD3A E88300 call da23_osize_asize 803 %endif 804 805 ; Now check and loop for unused prefixes. 806 da21: 0 0000AD3D A0[E100] mov al, [preused] ; = flags that are used 0 0000AD40 F6D0 not al ; = flags that are not used 0 0000AD42 2206[E000] and al, [preflags] ; = flags that are not used but present 0 0000AD46 7503E95301 jz da28 ; if all present flags were used --> 811 0 0000AD4B B9[0000] mov cx, N_WTAB 0 0000AD4E BB[0000] mov bx, wtab1 814 %ifn _LINK 815 mov dx, 2*N_WTAB-2 816 %else 0 0000AD51 BA[FEFF] mov dx, N_WTAB-2 818 wlcalc word_ext_N_WTAB, equ $ - 2 819 %endif 0 0000AD54 B440 mov ah, PREWAIT 0 0000AD56 84E0 test al, ah 0 0000AD58 740A jz @F 823 ; if there's a WAIT prefix hanging 0 0000AD5A E86300 call da23_wait 0 0000AD5D 7403E98500 jne disbad2 0 0000AD62 EBD9 jmp da21 827 828 @@: 829 %if _DISASM_32BIT 0 0000AD64 B420 mov ah, PREASIZE 0 0000AD66 84E0 test al, ah 0 0000AD68 7515 jnz da21_asize ; if it is a 67h prefix --> 833 0 0000AD6A B410 mov ah, PREOSIZE 0 0000AD6C 84E0 test al, ah 0 0000AD6E 747A jz da24 ; if not osize --> 837 da21_osize: 838 ; check whether OSIZE applies (segreg push/pop) 0 0000AD70 57 push di 0 0000AD71 50 push ax 0 0000AD72 A1[E600] mov ax, [index] 842 %if 0 843 mov di, .msg_number 844 call hexword 845 push dx 846 mov dx, .msg 847 call putsz 848 pop dx 849 jmp .skipmsg 850 usesection lDEBUG_DATA_ENTRY 851 .msg: db "Index=" 852 .msg_number: 853 asciz "----h, base=",_4digitshex(SPARSE_BASE),"h.",13,10 854 usesection lDEBUG_CODE 855 .skipmsg: 856 %endif 0 0000AD75 BF[0000] mov di, o32prfxtab 0 0000AD78 B9[0000] mov cx, O32P_AMOUNT 0 0000AD7B F2AF repne scasw 0 0000AD7D EB16 jmp da21_a_o_common 861 862 da21_asize: 863 ; check whether ASIZE applies to an implicit operand 0 0000AD7F 57 push di 0 0000AD80 50 push ax 0 0000AD81 A1[E600] mov ax, [index] 0 0000AD84 84E4 test ah, ah 0 0000AD86 750D jnz da21_nota32prfx_nz 869 ; opcode index > FF, not in this list --> 0 0000AD88 BF[0000] mov di, a32prfxtab 0 0000AD8B AE scasb ; xlatb ? 0 0000AD8C 7407 je @F ; yes --> (ZR) 0 0000AD8E 24FE and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 0 0000AD90 B9[FFFF] mov cx, A32P_LEN - 1 0 0000AD93 F2AE repne scasb ; scan table (low bit cleared) 876 @@: 877 da21_a_o_common: 878 da21_nota32prfx_nz: 0 0000AD95 58 pop ax 0 0000AD96 5F pop di 0 0000AD97 754E jne da21_notprfx ; not in the list --> 882 0 0000AD99 0826[E100] or [preused], ah ; mark it as used 0 0000AD9D B104 mov cl, 4 ; (ch = 0 because A32P_LEN / O32P_AMOUNT < 256) 885 %ifn _LINK 886 %if A32P_LEN > 255 || O32P_AMOUNT > 255 887 %error Remove optimisation 888 %endif 889 %endif 0 0000AD9F E8E111 call moveover ; make space for "A32 " (or a16, osize) 891 _386_PM push ax 0 0000ADA2 80FC10 cmp ah, PREOSIZE ; is it OSIZE ? 0 0000ADA5 B84133 mov ax, "A3" ; start of "A32" 0 0000ADA8 7502 jne @F ; no --> 0 0000ADAA B04F mov al, 'O' ; make it OSIZE (O32/O16) 896 @@: 0 0000ADAC E81A10 call dis_lowercase ; al = "a"/"o" if lowercase option specified 898 %if _40COLUMNS 0 0000ADAF 8B36[D800] mov si, word [mnemonofs] 0 0000ADB3 8984[0000] mov word [line_out + si], ax 0 0000ADB7 C784[0200]3220 mov word [line_out + si + 2], "2 " 902 ; trail of A32/O32 903 _386_PM pop ax 904 _386_PM test byte [presizeflags], ah 905 _386_PM ; do we have 32-bit ASIZE/OSIZE ? 906 _386_PM jnz da21_j0 ; yes, keep a32/o32 (in 16-bit cs) --> 907 _386_PM mov word [line_out + si + 1], "16" 908 ; no, make it a16/o16 (in 32-bit cs) 909 %else 910 mov word [line_out+MNEMONOFS], ax 911 mov word [line_out+MNEMONOFS+2], "2 " 912 ; trail of A32/O32 913 _386_PM pop ax 914 _386_PM test byte [presizeflags], ah 915 _386_PM ; do we have 32-bit ASIZE/OSIZE ? 916 _386_PM jnz da21_j0 ; yes, keep a32/o32 (in 16-bit cs) --> 917 _386_PM mov word [line_out + MNEMONOFS + 1], "16" 918 ; no, make it a16/o16 (in 32-bit cs) 919 %endif 920 %else 921 jmp da24 922 %endif 923 924 da21_j0: 0 0000ADBD E97DFF jmp da21 926 927 da21_notprfx: equ disbad2 928 929 930 da23_osize_asize: equ da23 931 932 da23_wait: 933 %if _PM 934 or byte [presizeflags], ah 935 ; Fake that this flag is set for da23's check. 936 ; If not _PM then presizeflags == preflags and 937 ; PREWAIT is already set in that variable. 938 %endif 939 940 ; INP: bx -> array of words to match against word [index] 941 ; cx = number of array entries 942 ; ah = preused flag to mark as used if match 943 ; ah = presizeflags flag to check if in use 944 ; dx = offset to add to di -> behind matched word 945 ; OUT: ZR if one of the array entries matched, 946 ; byte [preused] |= INP:ah 947 ; if also flag in byte [presizeflags] was set, 948 ; mnemonic replaced 949 ; NZ if no entry matched 950 ; CHG: ax, cx, si 951 ; 952 ; Note: If this is called with a 32-bit CS then the 953 ; OSIZE/ASIZE value in the byte [preflags] is 954 ; inverted to that in the byte [presizeflags]. 955 ; As we check the latter, for O16/A16 we will 956 ; not modify the mnemonics (keeping the 16-bit 957 ; default mnemonics) but will mark the prefix 958 ; as used by setting the flag in byte [preused]. 959 ; If there is no OSIZE/ASIZE in 32-bit CS then 960 ; the preused flag is also set (which does no 961 ; harm) and the 32-bit mnemonic is selected. 962 ; Operation in 16-bit CS has the same result as 963 ; the prior handling, though it will always 964 ; scan for the affected opcodes, and set the 965 ; preused flag even if no prefix is used. 966 da23: 0 0000ADC0 57 push di 0 0000ADC1 89DF mov di, bx 0 0000ADC3 50 push ax 0 0000ADC4 0C01 or al, 1 ; NZ, in case cx == 0 0 0000ADC6 A1[E600] mov ax, [index] 0 0000ADC9 F2AF repne scasw 0 0000ADCB 58 pop ax 0 0000ADCC 7517 jne .ret ; if not found in the list --> (NZ) 0 0000ADCE 0826[E100] or byte [preused], ah ; mark this (OSIZE, ASIZE or WAIT) prefix as used 0 0000ADD2 8426[E000] test byte [presizeflags], ah 977 ; is it O32, A32, or is WAIT present ? 0 0000ADD6 740D jz .ret ; no, do not modify mnemonic --> 0 0000ADD8 01D7 add di, dx ; replace the mnemonic with the modified name 0 0000ADDA 8B35 mov si, [di] 0 0000ADDC 81C6[0000] add si, mnlist 0 0000ADE0 E81110 call showop ; copy instruction mnemonic 0 0000ADE3 38C0 cmp al, al ; ZR 984 .ret: 0 0000ADE5 5F pop di 0 0000ADE6 C3 retn 987 988 989 da21_j1: equ da21_j0 990 991 disbad2: 0 0000ADE7 E9600F jmp disbad 993 994 da24: 0 0000ADEA A801 test al, PRESEG 0 0000ADEC 7438 jz da25 ; if not because of a segment prefix --> 0 0000ADEE A1[E600] mov ax, [index] 0 0000ADF1 84E4 test ah, ah 0 0000ADF3 75F2 jnz disbad2 ; if index > 256, it's none of these --> 0 0000ADF5 57 push di 0 0000ADF6 B9[0000] mov cx, SEGP_LEN 0 0000ADF9 BF[0000] mov di, segprfxtab 0 0000ADFC F2AE repne scasb 0 0000ADFE 5F pop di 0 0000ADFF 75E6 jne disbad2 ; if it's not on the list --> 0 0000AE01 B90300 mov cx, 3 0 0000AE04 E87C11 call moveover 0 0000AE07 57 push di 1009 %if _40COLUMNS 0 0000AE08 BF[0000] mov di, line_out 0 0000AE0B 033E[D800] add di, word [mnemonofs] 1012 %else 1013 mov di, line_out+MNEMONOFS 1014 %endif 0 0000AE0F E84810 call showseg ; show segment register 0 0000AE12 B03A mov al, ':' 0 0000AE14 F606[0000]04 testopt [asm_options], disasm_nasm 0 0000AE19 7402 jz .notnasm 0 0000AE1B B020 mov al, 32 1020 .notnasm: 0 0000AE1D AA stosb 0 0000AE1E 5F pop di 0 0000AE1F 800E[E100]01 or byte [preused], PRESEG ; mark it as used 1024 da21_j2: 0 0000AE24 EB97 jmp s da21_j1 1026 1027 da25: 0 0000AE26 A802 test al, PREREP 0 0000AE28 7435 jz da26 ; if not a REP prefix 0 0000AE2A 2406 and al, PREREP|PREREPZ 0 0000AE2C 0806[E100] or [preused], al 0 0000AE30 A1[E600] mov ax, [index] 0 0000AE33 84E4 test ah, ah 0 0000AE35 7525 jnz disbad3 ; if not in the first 256 bytes 0 0000AE37 24FE and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 0 0000AE39 57 push di 0 0000AE3A BF[0000] mov di, replist 0 0000AE3D B9[0000] mov cx, REP_SAME_LEN; scan those for REP first 0 0000AE40 F2AE repne scasb 1040 %if _LINK 0 0000AE42 BE[0000] mov si, mnlist 1042 wlcalc word_ext_MN_REP, equ $ - 2 1043 %else 1044 mov si, mnlist+MN_REP 1045 %endif 0 0000AE45 7439 je da27 ; if one of the REP instructions --> 1047 %if _LINK 0 0000AE47 B100 mov cl, 0 1049 wlcalc byte_ext_REP_DIFF_LEN, equ $ - 1 1050 %else 1051 mov cl, REP_DIFF_LEN; (ch = 0) 1052 %endif 0 0000AE49 F2AE repne scasb 0 0000AE4B 750F jne disbad3 ; if not one of the REPE/REPNE instructions 1055 %if _LINK 0 0000AE4D BE[0000] mov si, mnlist 1057 wlcalc word_ext_MN_REPE, equ $ - 2 1058 %else 1059 mov si, mnlist+MN_REPE 1060 %endif 0 0000AE50 F606[E100]04 test byte [preused], PREREPZ 0 0000AE55 7529 jnz da27 ; if REPE 1063 %if _LINK 0 0000AE57 BE[0000] mov si, mnlist 1065 wlcalc word_ext_MN_REPNE, equ $ - 2 1066 %else 1067 mov si, mnlist+MN_REPNE 1068 %endif 0 0000AE5A EB24 jmp s da27 ; it's REPNE 1070 1071 disbad3: 0 0000AE5C E9EB0E jmp disbad 1073 1074 da26: 0 0000AE5F A808 test al, PRELOCK 0 0000AE61 74F9 jz disbad3 ; if not a lock prefix, either --> 0 0000AE63 57 push di 0 0000AE64 A1[E600] mov ax, [index] 0 0000AE67 BF[0000] mov di, locktab 0 0000AE6A B9[0000] mov cx, N_LOCK 0 0000AE6D F2AF repne scasw 0 0000AE6F 75EB jne disbad3 ; if not in the approved list --> 0 0000AE71 F606[E100]01 test byte [preused], PRESEG 0 0000AE76 74E4 jz disbad3 ; if memory was not accessed --> 1085 %if _LINK 0 0000AE78 BE[0000] mov si, mnlist 1087 wlcalc word_ext_MN_LOCK, equ $ - 2 1088 %else 1089 mov si, mnlist+MN_LOCK 1090 %endif 0 0000AE7B 800E[E100]08 or byte [preused], PRELOCK 1092 1093 ; Slip in another mnemonic (REP or LOCK). 1094 ; SI = offset of mnemonic, what should be 1095 ; DI is on the stack. 1096 1097 da27: 0 0000AE80 5F pop di 0 0000AE81 B90800 mov cx, 8 1100 %if _40COLUMNS 1101 ; We cheat: Instead of moving things back after showop, 1102 ; which obtains the final true length of the mnemonic, 1103 ; we get the length here separately. This only works because 1104 ; the REP and LOCK prefixes are never suffixed by a W or D, 1105 ; so the length found here matches what showop will get. 0 0000AE84 F606[0100]02 testopt [asm_options], disasm_no_indent 0 0000AE89 7407 jz @F 0 0000AE8B 8B4CFE mov cx, word [si - 2] ; get mnemonic length in low 4 bits 0 0000AE8E 83E10F and cx, 15 ; extract the length 0 0000AE91 41 inc cx ; allow for one blank 1111 @@: 1112 %endif 0 0000AE92 56 push si 0 0000AE93 E8ED10 call moveover 0 0000AE96 5E pop si 0 0000AE97 57 push di 0 0000AE98 E8590F call showop 0 0000AE9B 5F pop di 0 0000AE9C EB86 jmp da21_j2 1120 1121 ; Done with instruction. Erase the size indicator, if appropriate. 1122 1123 da28: 0 0000AE9E 8B0E[FE00] mov cx, [sizeloc] ; -> size keyword, or zero if none 0 0000AEA2 E324 jcxz da28b ; if there was no size given --> 0 0000AEA4 A0[FA00] mov al, [disflags] 0 0000AEA7 A810 test al, DIS_I_SHOWSIZ 0 0000AEA9 751D jnz da28b ; if we need to show the size --> 0 0000AEAB A820 test al, DIS_I_KNOWSIZ 0 0000AEAD 7419 jz da28b ; if the size is not known already --> 0 0000AEAF 87CF xchg cx, di ; di -> size keyword, cx -> behind disassembly 0 0000AEB1 89FE mov si,di ; si -> size keyword 0 0000AEB3 B020 mov al, 32 ; scan for next blank 1134 da28a: 0 0000AEB5 AE scasb ; skip size name 0 0000AEB6 75FD jne da28a ; if not done yet --> 1137 ; (The above is the same as repne scasb, but 1138 ; has no effect on cx.) 0 0000AEB8 F606[0000]04 testopt [asm_options], disasm_nasm 0 0000AEBD 7503 jnz .nasm 0 0000AEBF 83C704 add di, byte 4 ; skip 'PTR ' 1142 .nasm: 0 0000AEC2 87F7 xchg si, di ; di -> size keyword, si -> after size keyword 0 0000AEC4 29F1 sub cx, si ; behind disassembly - after size keyword 1145 ; = length of disassembly part after keyword 0 0000AEC6 F3A4 rep movsb ; move the remainder of the line 1147 ; di -> behind disassembly (size keyword deleted) 1148 1149 ; Now we're really done. Print out the bytes on the left. 1150 1151 ; di -> behind disassembly 1152 da28b: 0 0000AEC8 57 push di 0 0000AEC9 BF[0000] mov di, line_out ; print start of disassembly line 0 0000AECC A1[0400] mov ax, [u_addr + saSegSel] 1156 ; print address 0 0000AECF E8[0000] call hexword ; segment/selector 0 0000AED2 B03A mov al, ':' 0 0000AED4 AA stosb ; colon 1160 _386_PM_o32 ; mov eax, dword [u_addr] 0 0000AED5 A1[0000] mov ax, word [u_addr] 1162 %if _PM && _DISASM_32BIT 1163 test byte [bCSAttr], 40h 1164 jz .16 1165 call hexword_high 1166 .16: 1167 %endif 0 0000AED8 E8[0000] call hexword ; offset 0 0000AEDB B020 mov al, 32 0 0000AEDD AA stosb ; one blank 0 0000AEDE 8B1E[DC00] mov bx, [dis_n] 1172 da28c: 1173 %if _40COLUMNS 0 0000AEE2 BE[FFFF] mov si, line_out - 1 0 0000AEE5 0336[D800] add si, word [mnemonofs] 1176 %else 1177 mov si,line_out+MNEMONOFS - 1 1178 %endif 0 0000AEE9 29FE sub si, di ; how many columns available for machine code 0 0000AEEB D1EE shr si, 1 ; how many bytes can be dumped 0 0000AEED 39F3 cmp bx, si 0 0000AEEF 7619 jbe da29 ; if it's a short instruction which fits in one line 0 0000AEF1 29F3 sub bx, si ; bx = how many bytes to defer to next line(s) 0 0000AEF3 53 push bx 0 0000AEF4 89F3 mov bx, si ; bx = how many bytes fit in this line 0 0000AEF6 57 push di 0 0000AEF7 E87310 call disshowbytes ; dump bytes on this line 0 0000AEFA E8[0000] call putsline_crlf ; append CR LF and display line 1189 ; Note that MNEMONOFS is always even, and so is the length 1190 ; of the prefix (segment + colon + offset 4 or 8 + blank). 1191 ; We determined how many bytes to dump by using line_out 1192 ; plus mnemonofs minus 1. Therefore we will always actually 1193 ; have two bytes left before the disassembly here. This is 1194 ; crucial for this call as it appends two bytes to the line. 1195 ; We do not want the CR or LF to overwrite the disassembly 1196 ; text in the line_out buffer so we need two bytes of space. 0 0000AEFD 59 pop cx ; -> at column after segmented address 0 0000AEFE 5B pop bx ; = how many bytes left for subsequent line(s) 0 0000AEFF BF[0000] mov di, line_out ; reset di 0 0000AF02 29F9 sub cx, di ; = how many columns to skip 0 0000AF04 B020 mov al, 32 0 0000AF06 F3AA rep stosb ; fill with blanks 0 0000AF08 EBD8 jmp short da28c ; loop for subsequent line(s) --> 1204 da29: 0 0000AF0A E86010 call disshowbytes ; dunp remaining bytes 1206 da30: 0 0000AF0D B020 mov al, 32 ; pad to op code 1208 %if _40COLUMNS 0 0000AF0F B9[0000] mov cx, line_out 0 0000AF12 030E[D800] add cx, word [mnemonofs] 1211 %else 1212 mov cx,line_out+MNEMONOFS 1213 %endif 0 0000AF16 29F9 sub cx,di 0 0000AF18 7202 jc da30_1 ; (shouldn't happen) 0 0000AF1A F3AA rep stosb 1217 da30_1: 0 0000AF1C 5F pop di ; -> behind disassembly 0 0000AF1D F606[FA00]08 test byte [disflags],DIS_I_UNUSED 0 0000AF22 740D jz da32 ; if we don't print ` (unused)' 0 0000AF24 BE[0000] mov si,unused 0 0000AF27 807DFF20 cmp byte [di-1], 32 0 0000AF2B 7501 jne da31 ; if there's already a space here 0 0000AF2D 46 inc si 1225 da31: 0 0000AF2E E8[0000] call showstring 1227 1228 ; Print info on minimal processor needed. 1229 1230 da32: 0 0000AF31 A0[0000] mov al, [dismach] 0 0000AF34 3A06[0000] cmp al, [maxmachinetype] 0 0000AF38 7603 jbe @F 0 0000AF3A A2[0000] mov [maxmachinetype], al 1235 @@: 0 0000AF3D 57 push di 0 0000AF3E BF[E800] mov di, obsinst 0 0000AF41 8B0E[E600] mov cx, word [index] 0 0000AF45 E8930F call showmach ;show the machine type, if needed 0 0000AF48 5F pop di 0 0000AF49 E313 jcxz da32f_j1 ; if no message --> 1242 1243 ; Print a message on the far right. 1244 1245 da32_tabto: 1246 %if _40COLUMNS 0 0000AF4B B8[0000] mov ax, line_out 0 0000AF4E 0306[DA00] add ax, word [trailofs] 1249 %else 1250 mov ax, line_out+79 1251 %endif 0 0000AF52 29C8 sub ax, cx 0 0000AF54 51 push cx 0 0000AF55 E8[0000] call tab_to ; tab out to the location 0 0000AF58 59 pop cx 0 0000AF59 F3A4 rep movsb ; copy the string 1257 da32z_j1: 0 0000AF5B E98302 jmp da32z ; done 1259 1260 da32f_j1: 0 0000AF5E EB72 jmp da32f 1262 1263 %if _COND 1264 ; Try dumping a condition status. 1265 da32_cond: 1266 %if _COND_RDUMP_ONLY 0 0000AF60 A802 test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 0 0000AF62 75F7 jnz da32z_j1 ; not showing conditionals message --> 1269 %endif 0 0000AF64 8B36[0401] mov si, word [condmsg] 0 0000AF68 85F6 test si, si ; stored a message here ? 0 0000AF6A 74EF jz da32z_j1 ; no --> 0 0000AF6C 57 push di 0 0000AF6D 89F7 mov di, si 0 0000AF6F B9FFFF mov cx, -1 0 0000AF72 31C0 xor ax, ax 0 0000AF74 F2AE repne scasb 0 0000AF76 F7D1 not cx 0 0000AF78 49 dec cx ; get string length 0 0000AF79 5F pop di 0 0000AF7A EBCF jmp short da32_tabto 1282 %else 1283 da32_cond: equ da32z_j1 1284 %endif 1285 1286 da32_xlatb: 0 0000AF7C A802 test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 0 0000AF7E 75E0 jnz da32_cond 0 0000AF80 803E[F300]03 _no386 cmp byte [segmnt], 3 0 0000AF85 77D9 _no386 ja da32_cond ; if FS or GS on non-386 --> (invalid) 0 0000AF87 F606[E000]20 _no386 test byte [presizeflags], PRE32A 0 0000AF8C 75D2 _no386 jnz da32_cond 0 0000AF8E 803E[F300]05 cmp byte [segmnt], 5 0 0000AF93 77CB ja da32_cond ; if invalid segment --> 0 0000AF95 813E[E600]D700 cmp word [index], 0D7h ; xlatb ? 0 0000AF9B 75C3 jne da32_cond 0 0000AF9D A1[0000] mov ax, word [reg_ebx] 0 0000AFA0 A3[F400] mov word [addrr], ax 0 0000AFA3 A1[0200] mov ax, word [reg_ebx + 2] 0 0000AFA6 A3[F600] mov word [addrr + 2], ax; get address in (e)bx 0 0000AFA9 A0[0000] mov al, byte [reg_eax] 0 0000AFAC 0006[F400] add byte [addrr], al 0 0000AFB0 8016[F500]00 adc byte [addrr + 1], 0 0 0000AFB5 8316[F600]00 adc word [addrr + 2], 0 ; add al 0 0000AFBA C606[F200]80 mov byte [rmsize], 80h ; byte size 1306 %if _MEMREF_AMOUNT 0 0000AFBF 800E[FB00]10 setopt [disflags], DIS_I_M_SRC 1308 %endif 1309 %if _DISASM_32BIT 0 0000AFC4 F606[E000]20 test byte [presizeflags], PRE32A 0 0000AFC9 7425 jz @F 0 0000AFCB 800E[FB00]08 setopt [disflags], DIS_I_SHOW_A32 1313 ; set flag if 32-bit 1314 %endif 0 0000AFD0 EB1E jmp @F 1316 1317 1318 ; Dump referenced memory location. 1319 1320 da32f: 0 0000AFD2 A0[FA00] mov al,[disflags] 0 0000AFD5 3406 xor al, DIS_F_SHOW | DIS_I_SHOW 0 0000AFD7 A886 test al, DIS_F_SHOW | DIS_I_SHOW | DIS_I_DONTSHOW 1324 ; (NZ if either _SHOW is clear, or _DONTSHOW is set) 0 0000AFD9 75A1 jnz da32_xlatb ; if there is no memory location to show --> 0 0000AFDB 803E[F300]03 _no386 cmp byte [segmnt], 3 0 0000AFE0 779A _no386 ja da32_xlatb ; if FS or GS on non-386 --> (invalid) 0 0000AFE2 F606[FB00]08 _no386 testopt [disflags], DIS_I_SHOW_A32 0 0000AFE7 7593 _no386 jnz da32_xlatb 0 0000AFE9 803E[F300]05 cmp byte [segmnt], 5 0 0000AFEE 778C ja da32_xlatb ; if invalid segment --> 1332 @@: 1333 %if _PM 1334 push ax 1335 %endif 0 0000AFF0 A0[F300] mov al, [segmnt] ; segment number 0 0000AFF3 98 cbw 0 0000AFF4 D1E0 shl ax, 1 0 0000AFF6 93 xchg ax, bx ; mov bx, ax 0 0000AFF7 8B9F[2A01] mov bx, [segrgaddr + bx]; get address of value 1341 %if _PM 1342 pop ax 1343 call ispm 1344 jnz @F ; if 86 Mode, all segments readable --> 1345 [cpu 286] 1346 verr word [bx] 1347 jnz da32_cond ; (NOT to da32_xlatb) 1348 __CPU__ 1349 @@: 1350 %endif 0 0000AFFB 53 push bx 1352 %if _MEMREF_AMOUNT 0 0000AFFC FF37 push word [bx] ; = segment/selector value 0 0000AFFE E88509 call get_free_memref ; memrefs + bx -> the memref structure 0 0000B001 8F87[9800] pop word [memrefs + bx + mrSegmentSelector] 0 0000B005 808F[9A00]02 or byte [memrefs + bx + mrFlags], mrfMem 0 0000B00A F606[FB00]10 testopt [disflags], DIS_I_M_SRC 0 0000B00F 7405 jz @F 0 0000B011 808F[9A00]04 or byte [memrefs + bx + mrFlags], mrfMemSource 1360 @@: 0 0000B016 F606[FB00]20 testopt [disflags], DIS_I_M_DST 0 0000B01B 7405 jz @F 0 0000B01D 808F[9A00]08 or byte [memrefs + bx + mrFlags], mrfMemDest 1364 @@: 1365 %endif 1366 1367 %if _40COLUMNS 0 0000B022 B8[F8FF] mov ax, line_out - 8 0 0000B025 0306[DA00] add ax, word [trailofs] 1370 %else 1371 mov ax, line_out + 79 - 8 1372 %endif 1373 ; 8 is composed of: 1374 ; 3 segreg name + colon 1375 ; 4 low word offset 1376 ; 1 equals sign 1377 ; 79 means we write to the very right of an 80-columns 1378 ; display, up to the second-to-last column. 0 0000B029 B90200 mov cx, 2 ; if byte then content uses 2 digits 1380 %if _MEMREF_AMOUNT 0 0000B02C C687[9C00]01 mov byte [memrefs + bx + mrLength], 1 1382 ; if byte then length = 1 1383 %endif 0 0000B031 803E[F200]00 cmp byte [rmsize],0 0 0000B036 7C10 jl da32h ; if byte 0 0000B038 7408 jz da32g ; if word 1387 %if _MEMREF_AMOUNT 0 0000B03A 8087[9C00]02 add byte [memrefs + bx + mrLength], 2 1389 ; add 2 bytes to length for high half of dword 1390 %endif 0 0000B03F 83C104 add cx, byte 4 ; add 4 digits for high half of dword 1392 da32g: 1393 %if _MEMREF_AMOUNT 0 0000B042 FE87[9C00] inc byte [memrefs + bx + mrLength] 1395 ; add 1 byte to length for the high byte 1396 %endif 0 0000B046 41 inc cx 0 0000B047 41 inc cx ; add 2 digits for the high byte 1399 da32h: 0 0000B048 F606[FB00]04 testopt [disflags], DIS_I_DOUBLE_M 0 0000B04D 740B jz @F 1402 %if _MEMREF_AMOUNT 0 0000B04F 8A97[9C00] mov dl, byte [memrefs + bx + mrLength] 0 0000B053 0097[9C00] add byte [memrefs + bx + mrLength], dl 1405 ; double the amount of bytes 1406 %endif 0 0000B057 01C9 add cx, cx ; double the amount of digits 0 0000B059 41 inc cx ; plus one slot for the comma 1409 @@: 0 0000B05A F606[FB00]02 testopt [disflags], DIS_I_FAR_M 0 0000B05F 7408 jz @F 1412 %if _MEMREF_AMOUNT 0 0000B061 8087[9C00]02 add byte [memrefs + bx + mrLength], 2 1414 ; add 2 bytes to the length for the segment 1415 %endif 0 0000B066 83C105 add cx, 5 ; 4 digits for segment plus 1 colon 1417 @@: 1418 %if _MEMREF_AMOUNT 0 0000B069 FF36[F400] push word [addrr] 0 0000B06D 8F87[9400] pop word [memrefs + bx + mrOffset] 1421 %endif 1422 %if _DISASM_32BIT 0 0000B071 F606[FB00]08 testopt [disflags], DIS_I_SHOW_A32 0 0000B076 7410 jz @F 1425 %if _MEMREF_AMOUNT 0 0000B078 FF36[F600] push word [addrr + 2] 0 0000B07C 8F87[9600] pop word [memrefs + bx + mrOffset + 2] 0 0000B080 808F[9A00]10 or byte [memrefs + bx + mrFlags], mrfA32 1429 %endif 0 0000B085 83C104 add cx, 4 ; add 4 digits for high word offset 1431 @@: 1432 %endif 1433 %if _MEMREF_AMOUNT 0 0000B088 E81C09 call calc_linear_memref_and_mark_nonfree 1435 %endif 0 0000B08B 29C8 sub ax, cx 0 0000B08D E8[0000] call tab_to ; CHG: ax, bx, cx, dx, di 0 0000B090 E8BB0D call showseg_uppercase_ax 1439 ; ax = segment register name 0 0000B093 E8450D call dis_lowercase_refmem_w 0 0000B096 AB stosw 0 0000B097 B03A mov al, ':' 0 0000B099 AA stosb 1444 %if _DISASM_32BIT 0 0000B09A F606[FB00]08 testopt [disflags], DIS_I_SHOW_A32 0 0000B09F 7406 jz @F 0 0000B0A1 A1[F600] mov ax, [addrr + 2] 0 0000B0A4 E8[0000] call hexword ; show high word of offset 1449 @@: 1450 %endif 0 0000B0A7 A1[F400] mov ax, [addrr] 0 0000B0AA E8[0000] call hexword ; show offset 1453 1454 %if _DISASM_32BIT 0 0000B0AD F606[FB00]08 testopt [disflags], DIS_I_SHOW_A32 0 0000B0B2 7407 jz .isa16option ; if 16-bit addressing --> 0 0000B0B4 F606[0100]20 testopt [asm_options], disasm_a32_memref 0 0000B0B9 EB05 jmp .commonoption 1459 .isa16option: 1460 %endif 0 0000B0BB F606[0100]10 testopt [asm_options], disasm_a16_memref 1462 .commonoption: 0 0000B0C0 7504 jnz @F 0 0000B0C2 5B pop bx 0 0000B0C3 E91B01 jmp da32z 1466 @@: 1467 0 0000B0C6 B03D mov al,'=' 0 0000B0C8 AA stosb 0 0000B0C9 E8[0000] call putsline 0 0000B0CC BF[0000] mov di, line_out 1472 ..@uu_referenced_memory_access_start: 0 0000B0CF 5B pop bx 0 0000B0D0 06 push es 0 0000B0D1 8E07 mov es, [bx] 0 0000B0D3 66 _386_o32 0 0000B0D4 8B1E[F400] mov bx, [addrr] 1478 0 0000B0D8 F606[FB00]02 testopt [disflags], DIS_I_FAR_M 0 0000B0DD 743D jz .no_far_m 0 0000B0DF BE0100 mov si, 1 0 0000B0E2 803E[F200]00 cmp byte [rmsize], 0 0 0000B0E7 7C08 jl @F 0 0000B0E9 BE0200 mov si, 2 0 0000B0EC 7403 jz @F 0 0000B0EE BE0400 mov si, 4 1487 @@: 1488 %if _DISASM_32BIT 0 0000B0F1 F606[FB00]08 testopt [disflags], DIS_I_SHOW_A32 0 0000B0F6 7411 jz @F 1491 [cpu 386] 0 0000B0F8 660FB7F6 movzx esi, si 0 0000B0FC 26678A0433 mov al, byte [es:ebx + esi] 0 0000B101 26678A643301 mov ah, byte [es:ebx + esi + 1] 1495 __CPU__ 0 0000B107 EB07 jmp @FF 1497 @@: 1498 %endif 0 0000B109 268A00 mov al, byte [es:bx + si] 0 0000B10C 268A6001 mov ah, byte [es:bx + si + 1] 1501 @@: 0 0000B110 8CC6 mov si, es 0 0000B112 07 pop es 0 0000B113 06 push es 0 0000B114 E8[0000] call hexword 0 0000B117 B03A mov al, ':' 0 0000B119 AA stosb 0 0000B11A 8EC6 mov es, si 1509 .no_far_m: 1510 0 0000B11C 8CC6 mov si, es 1512 %if _DISASM_32BIT 0 0000B11E F606[FB00]08 testopt [disflags], DIS_I_SHOW_A32 0 0000B123 741E jz @F 1515 [cpu 386] 0 0000B125 26678A03 mov al, [es:ebx] ; avoid a "mov ax,[-1]" 0 0000B129 803E[F200]00 cmp byte [rmsize], 0 0 0000B12E 7C38 jl .displaybyte ; if byte --> 0 0000B130 26678A6301 mov ah, [es:ebx + 1] 0 0000B135 742B jz .displayword ; if word --> 0 0000B137 26678A5302 mov dl, [es:ebx + 2] ; avoid a "mov dx,[-1]" 0 0000B13C 26678A7303 mov dh, [es:ebx + 3] 1523 __CPU__ 0 0000B141 EB18 jmp .displaydword ; is dword --> 1525 @@: 1526 %endif 0 0000B143 268A07 mov al, [es:bx] ; avoid a "mov ax,[-1]" 0 0000B146 803E[F200]00 cmp byte [rmsize], 0 0 0000B14B 7C1B jl .displaybyte ; if byte 0 0000B14D 268A6701 mov ah, [es:bx + 1] 0 0000B151 740F jz .displayword ; if word 0 0000B153 268A5702 mov dl, [es:bx + 2] ; avoid a "mov dx,[-1]" 0 0000B157 268A7703 mov dh, [es:bx + 3] 1534 .displaydword: 0 0000B15B 07 pop es 0 0000B15C 92 xchg ax, dx 0 0000B15D E8[0000] call hexword 0 0000B160 92 xchg ax, dx 0 0000B161 A8 db __TEST_IMM8 ; (skip pop) 1540 .displayword: 0 0000B162 07 pop es 0 0000B163 E8[0000] call hexword 0 0000B166 EB04 jmp short .displayed ; done 1544 .displaybyte: 0 0000B168 07 pop es 0 0000B169 E8[0000] call hexbyte ; display byte 1547 .displayed: 1548 0 0000B16C F606[FB00]04 testopt [disflags], DIS_I_DOUBLE_M 0 0000B171 746E jz .no_double_m 1551 0 0000B173 B02C mov al, ',' 0 0000B175 AA stosb 1554 0 0000B176 06 push es 0 0000B177 8EC6 mov es, si 1557 0 0000B179 BE0100 mov si, 1 0 0000B17C 803E[F200]00 cmp byte [rmsize], 0 0 0000B181 7C08 jl @F 0 0000B183 BE0200 mov si, 2 0 0000B186 7403 jz @F 0 0000B188 BE0400 mov si, 4 1564 @@: 1565 %if _DISASM_32BIT 0 0000B18B F606[FB00]08 testopt [disflags], DIS_I_SHOW_A32 0 0000B190 7426 jz @F 1568 [cpu 386] 0 0000B192 660FB7F6 movzx esi, si 0 0000B196 26678A0433 mov al, [es:ebx + esi] ; avoid a "mov ax,[-1]" 0 0000B19B 803E[F200]00 cmp byte [rmsize], 0 0 0000B1A0 7C3B jl .double_displaybyte ; if byte --> 0 0000B1A2 26678A643301 mov ah, [es:ebx + esi + 1] 0 0000B1A8 742D jz .double_displayword ; if word --> 0 0000B1AA 26678A543302 mov dl, [es:ebx + esi + 2] 1576 ; avoid a "mov dx,[-1]" 0 0000B1B0 26678A743303 mov dh, [es:ebx + esi + 3] 1578 __CPU__ 0 0000B1B6 EB18 jmp .double_displaydword 1580 @@: 1581 %endif 0 0000B1B8 268A00 mov al, [es:bx + si] ; avoid a "mov ax,[-1]" 0 0000B1BB 803E[F200]00 cmp byte [rmsize], 0 0 0000B1C0 7C1B jl .double_displaybyte ; if byte --> 0 0000B1C2 268A6001 mov ah, [es:bx + si + 1] 0 0000B1C6 740F jz .double_displayword ; if word --> 0 0000B1C8 268A5002 mov dl, [es:bx + si + 2]; avoid a "mov dx,[-1]" 0 0000B1CC 268A7003 mov dh, [es:bx + si + 3] 1589 .double_displaydword: 0 0000B1D0 07 pop es 0 0000B1D1 92 xchg ax, dx 0 0000B1D2 E8[0000] call hexword 0 0000B1D5 92 xchg ax, dx 0 0000B1D6 A8 db __TEST_IMM8 ; (skip pop) 1595 .double_displayword: 0 0000B1D7 07 pop es 0 0000B1D8 E8[0000] call hexword 0 0000B1DB EB04 jmp short .double_displayed 1599 .double_displaybyte: 0 0000B1DD 07 pop es 0 0000B1DE E8[0000] call hexbyte ; display byte 1602 .double_displayed: 1603 .no_double_m: 1604 ..@uu_referenced_memory_access_end: 1605 1606 da32z: 0 0000B1E1 E8[0000] call trimputs ; done with operand list 1608 1609 %if _MEMREF_AMOUNT 1610 set_string_memref: 0 0000B1E4 F606[FA00]02 test byte [disflags], DIS_F_SHOW 0 0000B1E9 7503 jnz @F 1613 .none_j: 0 0000B1EB E91E01 jmp .none 1615 @@: 1616 0 0000B1EE A1[E600] mov ax, [index] 0 0000B1F1 84E4 test ah, ah 0 0000B1F3 75F6 jnz .none_j 0 0000B1F5 BF[0000] mov di, ppbytes.string ; list of string opcodes 0 0000B1F8 B9[0000] mov cx, ppbytes.string_amount 0 0000B1FB F2AE repne scasb 0 0000B1FD 75EC jne .none_j ; if not one of these --> 1624 ; last entries are: 0A6h,0A7h,0AEh,0AFh 1625 ; corresponding to cmpsb, cmpsw/d, scasb, scasw/d 1626 ; so cx = 0 means scasw, = 1 scasb, = 2 cmpsw, = 3 cmpsb 1627 %if _LINK_COMPAT 0 0000B1FF 8A85[FFFF] mov al,byte [word di+PPLEN-1]; get corresponding byte in ppinfo 1629 %else 1630 mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 1631 %endif 1632 0 0000B203 31D2 xor dx, dx 0 0000B205 FF36[0000] push word [reg_ecx] 0 0000B209 8F06[D400] pop word [string_memref_counter] 1636 %if _DISASM_32BIT 0 0000B20D F606[E000]20 test byte [presizeflags], PRE32A 0 0000B212 7404 jz @F ; if 16-bit addressing --> 0 0000B214 8B16[0200] mov dx, [reg_ecx + 2] ; = ecxh value 1640 @@: 1641 %endif 0 0000B218 8916[D600] mov word [string_memref_counter + 2], dx 1643 0 0000B21C 80F904 cmp cl, 4 ; repetition differs for memory content ? 0 0000B21F 7203E9A000 jae @F ; no --> 0 0000B224 F606[E000]02 test byte [preflags], PREREP 0 0000B229 7503E99600 jz @F ; if not repeated --> 1648 1649 %if _DISASM_32BIT 0 0000B22E F606[E000]20 test byte [presizeflags], PRE32A 0 0000B233 7407 jz .isa16option ; if 16-bit addressing --> 0 0000B235 F606[0100]80 testopt [asm_options], disasm_a32_string 0 0000B23A EB05 jmp .commonoption 1654 .isa16option: 1655 %endif 0 0000B23C F606[0100]40 testopt [asm_options], disasm_a16_string 1657 .commonoption: 0 0000B241 750D jnz .optiondone 0 0000B243 C706[D400]0100 mov word [string_memref_counter], 1 0 0000B249 8326[D600]00 and word [string_memref_counter + 2], 0 0 0000B24E EB74 jmp @F 1662 1663 .optiondone: 1664 0 0000B250 01C9 add cx, cx ; 0 = scasd, 2 = scasb, 4 = cmpsd, 6 = cmpsb 1666 %if _DISASM_32BIT 0 0000B252 F606[E000]10 test byte [presizeflags], PRE32D 0 0000B257 7501 jnz .iso32 1669 %endif 0 0000B259 41 inc cx ; point to word entry, not dword 1671 .iso32: 1672 0 0000B25A 01C9 add cx, cx ; table entries are words, so 0..14 1674 0 0000B25C F606[E000]04 test byte [preflags], PREREPZ 0 0000B261 7403 jz .isrepne 0 0000B263 83C110 add cx, simulate_rep_sca_cmp.table_repe_offset 1678 ; from 0..14 to 16..30 1679 .isrepne: 1680 0 0000B266 89CB mov bx, cx ; = index into table 0 0000B268 8B97[6C01] mov dx, word [bx + simulate_rep_sca_cmp.table] 1683 ; function to call 1684 %if _DISASM_32BIT 0 0000B26C F606[E000]20 test byte [presizeflags], PRE32A 0 0000B271 7401 jz .isa16 ; if 16-bit addressing --> 0 0000B273 4A dec dx ; a32 prefix is 1 byte lower than table entry 1688 .isa16: 1689 %endif 1690 0 0000B274 66 _386_o32 0 0000B275 8B36[0000] mov si, word [reg_esi] 0 0000B279 66 _386_o32 0 0000B27A 8B3E[0000] mov di, word [reg_edi] 0 0000B27E 66 _386_o32 0 0000B27F 8B0E[0000] mov cx, word [reg_ecx] 0 0000B283 8E06[0000] mov es, word [reg_es] 0 0000B287 50 push ax 0 0000B288 A810 test al, PP_STRSRC ; cmps ? 0 0000B28A 740D jz .issca ; no, no need to load ds --> 1701 0 0000B28C A0[F300] mov al, [segmnt] ; segment number 0 0000B28F 98 cbw 0 0000B290 D1E0 shl ax, 1 0 0000B292 93 xchg ax, bx ; mov bx, ax 0 0000B293 8B9F[2A01] mov bx, word [segrgaddr + bx] 1707 ; si = address of segment/selector reg 0 0000B297 8E1F mov ds, [bx] 1709 1710 .issca: 0 0000B299 66 _386_o32 0 0000B29A 36A1[0000] mov ax, word [ss:reg_eax] 1713 0 0000B29E 36F606[0100]04 testopt [ss:reg_efl], 400h 1715 ; DF set ? 0 0000B2A4 7401 jz .up 0 0000B2A6 FD std 1718 .up: 0 0000B2A7 FFD2 call dx ; simulate the repeated string op 0 0000B2A9 FC cld 0 0000B2AA 16 push ss 0 0000B2AB 1F pop ds 0 0000B2AC 16 push ss 0 0000B2AD 07 pop es 1725 0 0000B2AE 6651 _386 push ecx 0 0000B2B0 59 _386 pop cx 0 0000B2B1 5A _386 pop dx 1729 1730 %if _DISASM_32BIT 0 0000B2B2 F606[E000]20 _386 test byte [presizeflags], PRE32A 0 0000B2B7 7502 _386 jnz .count32 ; if 32-bit addressing --> 1733 %endif 0 0000B2B9 31D2 xor dx, dx 1735 .count32: 0 0000B2BB 290E[D400] sub word [string_memref_counter], cx 0 0000B2BF 1916[D600] sbb word [string_memref_counter + 2], dx 1738 0 0000B2C3 58 pop ax 1740 @@: 1741 0 0000B2C4 A810 test al, PP_STRSRC 0 0000B2C6 7429 jz .no_src 1744 0 0000B2C8 803E[F300]03 _no386 cmp byte [segmnt], 3 0 0000B2CD 7722 _no386 ja .no_src ; if FS or GS on non-386 --> (invalid) 0 0000B2CF 803E[F300]05 cmp byte [segmnt], 5 0 0000B2D4 771B ja .no_src ; if invalid segment --> 1749 0 0000B2D6 50 push ax 0 0000B2D7 A0[F300] mov al, [segmnt] ; segment number 0 0000B2DA 98 cbw 0 0000B2DB D1E0 shl ax, 1 0 0000B2DD 93 xchg ax, bx ; mov bx, ax 0 0000B2DE 58 pop ax 0 0000B2DF 8BB7[2A01] mov si, word [segrgaddr + bx] 1757 ; si = address of segment/selector reg 0 0000B2E3 BF[0000] mov di, reg_esi ; di = address of offset reg 0 0000B2E6 E8FC06 call init_string_memref 1760 @@: ; entry: set memref to string source and mark 1761 ; (jump to .none afterwards if al is zero) 0 0000B2E9 808F[9A00]60 or byte [memrefs + bx + mrFlags], mrfString | mrfStringSource 0 0000B2EE E8B606 call calc_linear_memref_and_mark_nonfree 1764 1765 .no_src: 0 0000B2F1 A828 test al, PP_STRDEST | PP_STRSRC2 0 0000B2F3 7417 jz .none 0 0000B2F5 BE[0000] mov si, reg_es ; si = address of segment/selector reg 0 0000B2F8 BF[0000] mov di, reg_edi ; di = address of offset reg 0 0000B2FB E8E706 call init_string_memref 0 0000B2FE A808 test al, PP_STRSRC2 ; alternative string source ? 0 0000B300 B000 mov al, 0 ; (cause conditional branch to jump) 0 0000B302 75E5 jnz @B ; yes, set as string source --> 0 0000B304 808F[9A00]A0 or byte [memrefs + bx + mrFlags], mrfString | mrfStringDest 0 0000B309 E89B06 call calc_linear_memref_and_mark_nonfree 1776 1777 .none: 1778 1779 %if _SYMBOLIC 1780 display_symbol_memrefs: 1781 testopt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 1782 jnz .none_memref 1783 1784 mov cx, [memrefs.free] 1785 test cx, cx 1786 jz .none_memref 1787 1788 xor si, si 1789 .loop_memref: 1790 push cx 1791 push si 1792 1793 mov bx, si 1794 call get_memref_index_bx 1795 mov ax, word [memrefs + bx + mrFlags] 1796 mov dx, msg.memrefs_branchdirect 1797 test al, mrfBranchDirect 1798 jnz .gotmsg 1799 1800 test byte [disflags], DIS_F_SHOW 1801 jz .next_memref 1802 1803 mov dx, msg.memrefs_stringsource 1804 test al, mrfStringSource 1805 jnz .gotmsg 1806 mov dx, msg.memrefs_stringdest 1807 test al, mrfStringDest 1808 jnz .gotmsg 1809 mov dl, al 1810 and dl, mrfMemSource | mrfMemDest 1811 cmp dl, mrfMemSource | mrfMemDest 1812 mov dx, msg.memrefs_memsourcedest 1813 je .gotmsg 1814 mov dx, msg.memrefs_memsource 1815 test al, mrfMemSource 1816 jnz .gotmsg 1817 mov dx, msg.memrefs_memdest 1818 test al, mrfMemDest 1819 jnz .gotmsg 1820 mov dx, msg.memrefs_mem_unknown 1821 test al, mrfMem 1822 jnz .gotmsg 1823 mov dx, msg.memrefs_unknown 1824 .gotmsg: 1825 1826 ; We do not call zz_detect_xms here because that is 1827 ; already done unconditionally during the initialisation 1828 ; of the function disasm. 1829 1830 push dx 1831 mov ax, [memrefs + bx + mrLinear] 1832 mov dx, [memrefs + bx + mrLinear + 2] 1833 1834 mov cx, dx 1835 mov bx, ax 1836 nearcall binsearchmain ; search for matching symbol 1837 pop dx 1838 jcxz .no_symbol 1839 .loop_symbol: 1840 call putsz 1841 push bx 1842 dualcall displaystring 1843 push bx 1844 push ax 1845 dualcall getfarpointer.main 1846 pop di 1847 pop es 1848 1849 pop si 1850 push si 1851 1852 push dx 1853 1854 push bx 1855 mov bx, si 1856 call get_memref_index_bx 1857 mov dx, word [memrefs + bx + mrOffset + 2] 1858 mov ax, word [memrefs + bx + mrOffset] 1859 1860 cmp dx, word [es:di + smOffset + 2] 1861 mov dx, msg.memref_after_symbol.non_wrt 1862 jne .wrt_symbol 1863 cmp ax, word [es:di + smOffset] 1864 je .non_wrt_symbol 1865 .wrt_symbol: 1866 mov dx, msg.memref_between_symbol.wrt 1867 call disp_message 1868 push ss 1869 pop es 1870 mov di, line_out 1871 mov ax, word [memrefs + bx + mrSegmentSelector] 1872 call hexword 1873 push bx 1874 push cx 1875 call putsline 1876 pop cx 1877 pop bx 1878 mov dx, msg.memref_after_symbol.wrt 1879 .non_wrt_symbol: 1880 call disp_message 1881 1882 pop bx 1883 pop dx 1884 .next_symbol: 1885 inc bx 1886 loop .loop_symbol 1887 1888 .no_symbol: 1889 push ss 1890 pop es 1891 push ss 1892 pop ds 1893 1894 .next_memref: 1895 pop si 1896 pop cx 1897 inc si 1898 loop .loop_memref_j 1899 jmp .none_memref 1900 1901 .loop_memref_j: 1902 jmp .loop_memref 1903 1904 .none_memref: 1905 %endif 1906 1907 %if _DEBUG2 1908 display_memrefs: 1909 mov cx, [memrefs.free] 1910 test cx, cx 1911 jz .none 1912 xor si, si 1913 .loop: 1914 mov bx, si 1915 call get_memref_index_bx 1916 mov ax, word [memrefs + bx + mrFlags] 1917 mov dx, msg.memrefs_branchdirect 1918 test al, mrfBranchDirect 1919 jnz .gotmsg 1920 mov dx, msg.memrefs_stringsource 1921 test al, mrfStringSource 1922 jnz .gotmsg 1923 mov dx, msg.memrefs_stringdest 1924 test al, mrfStringDest 1925 jnz .gotmsg 1926 mov dl, al 1927 and dl, mrfMemSource | mrfMemDest 1928 cmp dl, mrfMemSource | mrfMemDest 1929 mov dx, msg.memrefs_memsourcedest 1930 je .gotmsg 1931 mov dx, msg.memrefs_memsource 1932 test al, mrfMemSource 1933 jnz .gotmsg 1934 mov dx, msg.memrefs_memdest 1935 test al, mrfMemDest 1936 jnz .gotmsg 1937 mov dx, msg.memrefs_mem_unknown 1938 test al, mrfMem 1939 jnz .gotmsg 1940 mov dx, msg.memrefs_unknown 1941 .gotmsg: 1942 call putsz 1943 1944 mov di, line_out 1945 mov ax, word [memrefs + bx + mrSegmentSelector] 1946 call hexword 1947 push word [memrefs + bx + mrOffset] 1948 mov al, ':' 1949 stosb 1950 %if 1 || _PM 1951 mov ax, word [memrefs + bx + mrOffset + 2] 1952 test byte [memrefs + bx + mrFlags], mrfA32 1953 jz .16 1954 call hexword 1955 .16: 1956 %endif 1957 pop ax 1958 call hexword 1959 push si 1960 push cx 1961 mov si, msg.memrefs_length 1962 call copy_single_counted_string 1963 mov ax, word [memrefs + bx + mrLength + 2] 1964 test ax, ax 1965 jz @F 1966 call hexword 1967 @@: 1968 mov ax, word [memrefs + bx + mrLength] 1969 call hexword 1970 call putsline_crlf 1971 pop cx 1972 pop si 1973 1974 inc si 1975 dec cx 1976 jnz .loop 1977 .none: 1978 %endif ; _DEBUG2 1979 %endif ; _MEMREF_AMOUNT 1980 1981 1982 da_repeat: 1983 %if _SYMBOLIC 1984 testopt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 1985 jnz .no_sym_between 1986 1987 mov bx, word [u_addr + 4] 1988 _386_PM_o32 1989 mov dx, word [u_addr] 1990 call getlinear_32bit 1991 jc .no_sym_between 1992 1993 ; push dx 1994 push ax ; linear after instruction 1995 1996 xchg dx, cx 1997 xchg ax, bx 1998 1999 sub bx, 1 2000 sbb cx, 0 ; cx:bx = end of range 2001 2002 mov dx, word [u_lin_start + 2] 2003 mov ax, word [u_lin_start] 2004 add ax, 1 2005 adc dx, 0 ; dx:ax = start of range 2006 2007 nearcall binsearchmain 2008 pop ax 2009 ; pop dx ; dx:ax = linear after instruction 2010 jcxz .no_sym_between 2011 2012 .loop_sym_between: 2013 ; push dx 2014 push ax 2015 push bx 2016 dualcall displaystring 2017 pop ax 2018 ; pop dx 2019 2020 push bx 2021 push ax ; (reserve space, uninitialised) 2022 dualcall getfarpointer.main 2023 pop di 2024 pop es 2025 2026 ; push dx 2027 push ax 2028 sub ax, word [es:di + smLinear] 2029 ; sbb dx, word [es:di + smLinear + 2] 2030 2031 ; push dx 2032 push ax 2033 xor dx, dx 2034 add ax, word [es:di + smOffset] 2035 adc dx, word [es:di + smOffset + 2] 2036 cmp word [u_addr + 2], dx 2037 mov dx, msg.uu_after_symbol_between_1.non_wrt 2038 jne .sym_between.wrt 2039 cmp word [u_addr], ax 2040 je .sym_between.not_wrt 2041 .sym_between.wrt: 2042 mov dx, msg.uu_after_symbol_between_1.wrt 2043 call disp_message 2044 2045 push ss 2046 pop es 2047 mov di, line_out 2048 mov ax, word [u_addr + 4] 2049 call hexword 2050 push bx 2051 push cx 2052 call putsline 2053 pop cx 2054 pop bx 2055 2056 mov dx, msg.uu_after_symbol_between_2.wrt 2057 .sym_between.not_wrt: 2058 call disp_message 2059 pop ax 2060 ; pop dx 2061 2062 push ss 2063 pop es 2064 push di 2065 push bx 2066 push cx 2067 mov di, line_out 2068 call decword 2069 call putsline 2070 pop cx 2071 pop bx 2072 pop di 2073 pop ax 2074 ; pop dx 2075 2076 ; push dx 2077 mov dx, msg.uu_after_symbol_between_3 2078 call disp_message 2079 ; pop dx 2080 2081 inc bx 2082 loop .loop_sym_between 2083 .no_sym_between: 2084 push ss 2085 pop es 2086 %endif 2087 0 0000B30C A0[FA00] mov al, [disflags] 2089 %if _IMMASM 0 0000B30F F606[0300]02 testopt [internalflags6], dif6_immasm 0 0000B314 7404 jz .notimmasm 0 0000B316 A808 test al, DIS_I_UNUSED 0 0000B318 753E jnz @F ; if " (unused)" was displayed --> 2094 .notimmasm: 2095 %endif 0 0000B31A A801 test al, DIS_F_REPT 0 0000B31C 7453 jz @FF ; if not repeating --> 0 0000B31E A808 test al, DIS_I_UNUSED 0 0000B320 7536 jnz @F ; if " (unused)" was displayed --> 0 0000B322 A840 test al, DIS_I_MOV_SS 0 0000B324 A1[E600] mov ax, [index] 0 0000B327 740C jz .not_mov_to_ss ; not mov to ss --> 2103 0 0000B329 F606[0000]80 testopt [asm_options], disasm_nec 0 0000B32E 7528 jnz @F ; allow mov from or to any segreg 2106 ; DIS_I_MOV_SS is set, check for wo[index] == 8Eh; 2107 ; as we only want to match move *to* ss, not from (8Ch). 0 0000B330 3D8E00 cmp ax, 8Eh ; move to seg reg? 0 0000B333 7423 je @F ; yes, it is mov to ss --> 2110 .not_mov_to_ss: 2111 0 0000B335 3D[0000] cmp ax, SGROUP4 + 0 ; pop r/m ? 0 0000B338 7507 jne .not_pop_rm 0 0000B33A 803E[0000]C0 cmp byte [regmem], 1100_0000b 2115 ; long-form pop reg ? 0 0000B33F 7317 jae @F ; yes --> 2117 .not_pop_rm: 2118 0 0000B341 84E4 test ah, ah 0 0000B343 752D jnz .not_single_byte_opcode 2121 0 0000B345 BF[5A01] mov di, single_byte_opcodes_repeat_disassembly 0 0000B348 B90F00 mov cx, single_byte_opcodes_repeat_disassembly.length 0 0000B34B F606[0000]80 testopt [asm_options], disasm_nec 0 0000B350 7402 jz .not_nec 2126 %if single_byte_opcodes_repeat_disassembly.length_nec == single_byte_opcodes_repeat_disassembly.length + 2 0 0000B352 41 inc cx 0 0000B353 41 inc cx 2130 %else 2131 mov cx, single_byte_opcodes_repeat_disassembly.length_nec 2132 %endif 2133 .not_nec: 0 0000B354 F2AE repne scasb 0 0000B356 751A jne @FFF 2136 @@: 0 0000B358 8326[FA00]03 and word [disflags], DIS_F_REPT|DIS_F_SHOW 0 0000B35D FE06[FD00] inc byte [disrepeatcount] 0 0000B361 803E[FD00]10 cmp byte [disrepeatcount], 16 0 0000B366 7303E9E6F7 jb disasm.preserve_disrepeatcount 2141 0 0000B36B BA[0000] mov dx, msg.uu_too_many_repeat 0 0000B36E E8[0000] call putsz 2144 @@: 0 0000B371 C3 retn 2146 2147 @@: 2148 .not_single_byte_opcode: 2149 0 0000B372 8A3E[E300] mov bh, byte [disp8] 0 0000B376 3DEB00 cmp ax, 0EBh ; unconditional short jump ? 0 0000B379 74F6 je @BB ; yes, return --> 2153 _386_PM_o32 ; and dword [dis_n], byte 0 0 0000B37B 8326[DC00]00 and word [dis_n], byte 0 0 0000B380 E8BD0B call disgetbyte 0 0000B383 B302 mov bl, 2 ; displacement to skip a jmp short 0 0000B385 3CEB cmp al, 0EBh ; jmp short ? 0 0000B387 7406 je @F ; yes --> 0 0000B389 B303 mov bl, 3 ; displacement to skip a 16-bit jmp near 0 0000B38B 3CE9 cmp al, 0E9h ; jmp near ? 0 0000B38D 75E2 jne @BB ; no, return --> 2162 %if _PM 2163 %if _DISASM_32BIT 2164 test byte [bCSAttr], 40h ; 32-bit code segment ? 2165 jz @F ; no, 16-bit, use displacement 3 --> 2166 mov bl, 5 ; displacement to skip a 32-bit jmp near 2167 %endif 2168 %endif 2169 @@: 0 0000B38F 38DF cmp bh, bl ; right displacement ? 0 0000B391 75DE jne @BBB ; no --> 2172 0 0000B393 8326[FA00]03 and word [disflags], DIS_F_REPT|DIS_F_SHOW 2174 %if _LINK 0 0000B398 8136[0401][0000] xor word [condmsg], strict word msg.condnotjump 2176 wlcalc word_opext_xor_msg.condjump, equ $ - 2 2177 %elif _LINK_COMPAT 2178 xor word [condmsg], strict word (msg.condnotjump + DATASECTIONFIXUP) ^ (msg.condjump + DATASECTIONFIXUP) 2180 %else 2181 xor word [condmsg], (msg.condnotjump + DATASECTIONFIXUP) ^ (msg.condjump + DATASECTIONFIXUP) 2183 %endif 0 0000B39E E9B5F7 jmp disasm.preserve_condmsg_and_disrepeatcount 2185 2186 2187 %if _MEMREF_AMOUNT 2188 simulate_rep_sca_cmp: 2189 2190 ..@uu_simulate_scas_start: 0 0000B3A1 67 _386_a32 2192 .repne_scasd: 0 0000B3A2 66 _386_o32 0 0000B3A3 F2 repne 0 0000B3A4 AF scasw 0 0000B3A5 C3 retn 2197 0 0000B3A6 67 _386_a32 2199 .repne_scasw: 0 0000B3A7 F2AF repne scasw 0 0000B3A9 C3 retn 2202 0 0000B3AA 67 _386_a32 2204 .repne_scasb: 0 0000B3AB F2AE repne scasb 0 0000B3AD C3 retn 2207 0 0000B3AE 67 _386_a32 2209 .repe_scasd: 0 0000B3AF 66 _386_o32 0 0000B3B0 F3 repe 0 0000B3B1 AF scasw 0 0000B3B2 C3 retn 2214 0 0000B3B3 67 _386_a32 2216 .repe_scasw: 0 0000B3B4 F3AF repe scasw 0 0000B3B6 C3 retn 2219 0 0000B3B7 67 _386_a32 2221 .repe_scasb: 0 0000B3B8 F3AE repe scasb 0 0000B3BA C3 retn 2224 ..@uu_simulate_scas_end: 2225 2226 ..@uu_simulate_cmps_start: 0 0000B3BB 67 _386_a32 2228 .repne_cmpsd: 0 0000B3BC 66 _386_o32 0 0000B3BD F2 repne 0 0000B3BE A7 cmpsw 0 0000B3BF C3 retn 2233 0 0000B3C0 67 _386_a32 2235 .repne_cmpsw: 0 0000B3C1 F2A7 repne cmpsw 0 0000B3C3 C3 retn 2238 0 0000B3C4 67 _386_a32 2240 .repne_cmpsb: 0 0000B3C5 F2A6 repne cmpsb 0 0000B3C7 C3 retn 2243 0 0000B3C8 67 _386_a32 2245 .repe_cmpsd: 0 0000B3C9 66 _386_o32 0 0000B3CA F3 repe 0 0000B3CB A7 cmpsw 0 0000B3CC C3 retn 2250 0 0000B3CD 67 _386_a32 2252 .repe_cmpsw: 0 0000B3CE F3A7 repe cmpsw 0 0000B3D0 C3 retn 2255 0 0000B3D1 67 _386_a32 2257 .repe_cmpsb: 0 0000B3D2 F3A6 repe cmpsb 0 0000B3D4 C3 retn 2260 ..@uu_simulate_cmps_end: 2261 2262 2263 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 2263 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 00005B7B 00 align 2, db 0 2265 .table: 0 00005B7C [FD08] dw .repne_scasd 0 00005B7E [0209] dw .repne_scasw 0 00005B80 [0609] dw .repne_scasb 0 00005B82 [0609] dw .repne_scasb 0 00005B84 [1709] dw .repne_cmpsd 0 00005B86 [1C09] dw .repne_cmpsw 0 00005B88 [2009] dw .repne_cmpsb 0 00005B8A [2009] dw .repne_cmpsb 2274 .table_repe_offset: equ $ - .table 0 00005B8C [0A09] dw .repe_scasd 0 00005B8E [0F09] dw .repe_scasw 0 00005B90 [1309] dw .repe_scasb 0 00005B92 [1309] dw .repe_scasb 0 00005B94 [2409] dw .repe_cmpsd 0 00005B96 [2909] dw .repe_cmpsw 0 00005B98 [2D09] dw .repe_cmpsb 0 00005B9A [2D09] dw .repe_cmpsb 2283 2284 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 2284 ------------------ note: usesection lDEBUG_CODE 2285 %endif 2286 2287 2288 ; Here are the routines for printing out the operands themselves. 2289 ; Immediate data (OP_IMM) 2290 2291 dop_imm_not_extend: 0 0000B3D5 F606[FA00]10 test byte [disflags], DIS_I_SHOWSIZ 0 0000B3DA 7532 jnz dop_imm 0 0000B3DC 84E4 test ah, ah 0 0000B3DE 782E js dop_imm ; if byte --> 0 0000B3E0 91 xchg ax, cx ; ch = size 0 0000B3E1 741E je .16 2298 .32: 0 0000B3E3 E8700B call disgetword ; ax = low word 0 0000B3E6 92 xchg ax, dx ; dx = low word 0 0000B3E7 E86C0B call disgetword ; ax = high word 0 0000B3EA 92 xchg ax, dx ; dx:ax = dword 2303 0 0000B3EB 50 push ax ; stack -> low word 0 0000B3EC E80B00 call .checkword 0 0000B3EF 7502 jne @F ; cannot be imms8 0 0000B3F1 39D0 cmp ax, dx 2308 @@: 0 0000B3F3 E86C0A call showsize_ch_flag_ZR; if can be imms8, show size keyword 0 0000B3F6 92 xchg ax, dx ; ax = high word 0 0000B3F7 E9C00A jmp disp32.stack 2312 2313 .checkword: 0 0000B3FA B107 mov cl, 7 0 0000B3FC D2F8 sar al, cl ; = -1 if negative imms8, 0 if positive 0 0000B3FE 38E0 cmp al, ah ; ZR if imms16 in imms8 range 0 0000B400 C3 retn 2318 2319 .16: 0 0000B401 E8520B call disgetword ; ax = word 0 0000B404 50 push ax ; stack -> word 0 0000B405 E8F2FF call .checkword 0 0000B408 E8570A call showsize_ch_flag_ZR; if can be imms8, show size keyword 0 0000B40B E9AF0A jmp disp32.low_stack 2325 2326 2327 dop_imm: 0 0000B40E 80FC00 cmp ah, 0 0 0000B411 7C1A jl dop03 ; if just a byte --> 0 0000B413 9C pushf 0 0000B414 F606[FA00]10 test byte [disflags], DIS_I_SHOWSIZ 0 0000B419 7403 jz .nosize ; if we don't need to show the size --> 0 0000B41B E84C0A call showsize 2334 .nosize: 0 0000B41E E8350B call disgetword 2336 %if _IMMASM 0 0000B421 A3[0000] mov word [immasm_imm16], ax 2338 %endif 0 0000B424 9D popf ; ZF 0 0000B425 7503E9[0000] je hexword ; if just a word 0 0000B42A E9890A jmp disp32.ax 2342 2343 dop03: 0 0000B42D E8100B call disgetbyte ; print immediate byte 0 0000B430 E9[0000] jmp hexbyte 2346 2347 2348 ; Memory offset reference (OP_MOFFS) 2349 2350 dop_moffs: 0 0000B433 B005 mov al, 5 2352 %if _DISASM_32BIT 0 0000B435 F606[E000]20 test byte [presizeflags], PRE32A 0 0000B43A 7501 jnz .32 ; if 32-bit addressing --> 2355 %endif 0 0000B43C 40 inc ax 2357 .32: 0 0000B43D A2[0000] mov [regmem], al 0 0000B440 EB13 jmp s dop05 2360 2361 2362 ; MOD R/M (OP_RM) 2363 2364 dop_rm: 0 0000B442 E86709 call getregmem 0 0000B445 3CC0 cmp al,0c0h 0 0000B447 7203E9D902 jae dop33 ; if pure register reference --> 2368 0 0000B44C F606[FB00]40 testopt [disflags], DIS_I_M_ALWAYS_16 0 0000B451 7402 jz @F 0 0000B453 B400 mov ah, 0 ; word size (m16) 2372 @@: 2373 2374 dop05: ; <--- used by OP_M, OP_M64, OP_M80, OP_MOFFS 0 0000B455 8826[F200] mov byte [rmsize], ah ; save r/m size 0 0000B459 F606[FB00]01 testopt [disflags], DIS_I_NOSIZ 0 0000B45E 7506 jnz @F 0 0000B460 E8070A call showsize ; print out size 0 0000B463 E83B0A call showptr ; append "PTR " (if not NASM syntax) 2380 @@: 2381 dop06: ; <--- used by OP_MXX, OP_MFLOAT, OP_MDOUBLE 0 0000B466 800E[E100]01 or byte [preused],PRESEG ; needed even if there's no segment override 2383 ; because handling of LOCK prefix relies on it 0 0000B46B B05B mov al, '[' 0 0000B46D E89302 call stosb_nasm 2386 0 0000B470 F606[E000]01 test byte [preflags],PRESEG 0 0000B475 7406 jz dop07 ;if no segment override 0 0000B477 E8E009 call showseg ;print segment name 0 0000B47A B03A mov al,':' 0 0000B47C AA stosb 2392 dop07: 0 0000B47D A0[0000] mov al,[regmem] 0 0000B480 24C7 and al,0c7h 0 0000B482 800E[E100]20 or byte [preused],PREASIZE 2396 %if _DISASM_32BIT 0 0000B487 F606[E000]20 test byte [presizeflags],PRE32A 0 0000B48C 7403E9EA00 jnz dop18 ;if 32-bit addressing 2399 %endif 0 0000B491 800E[FA00]04 or byte [disflags],DIS_I_SHOW ;we'd like to show this address 0 0000B496 8326[F400]00 and word [addrr], 0 ; zero out the address initially 0 0000B49B 93 xchg ax,bx ;mov bx,ax 0 0000B49C E85702 call store_opensqubracket 0 0000B49F 80FB06 cmp bl,6 0 0000B4A2 7503E9B200 je dop16 ;if [xxxx] 0 0000B4A7 83E307 and bx,7 0 0000B4AA 8A9F[1201] mov bl,[rmtab+bx] 0 0000B4AE F6C308 test bl,8 0 0000B4B1 7525 jnz dop09 ;if BX 0 0000B4B3 F6C304 test bl,4 0 0000B4B6 7436 jz dop11 ;if not BP 0 0000B4B8 B84250 mov ax,'BP' 0 0000B4BB 8B0E[0000] mov cx,[reg_ebp] 0 0000B4BF E80A00 call da_set_default_ss 0 0000B4C2 EB1B jmp dop10 2416 2417 2418 ; INP: al = 2 * register number 2419 ; [preflags] & PRESEG set if segment overridden 2420 ; else, 2421 ; byte [segmnt] = initialised to 3 (ds) 2422 ; OUT: no action if register number not for esp or ebp 2423 ; no action if segment overridden 2424 ; otherwise, 2425 ; byte [segmnt] -= 1, resulting in 2 (ss) 2426 da_set_default_ss_if_esp_ebp: 0 0000B4C4 3C08 cmp al, 2 * 4 0 0000B4C6 7404 je @F 0 0000B4C8 3C0A cmp al, 2 * 5 0 0000B4CA 750B jne @FF 2431 @@: 2432 da_set_default_ss: 0 0000B4CC F606[E000]01 test byte [preflags], PRESEG 0 0000B4D1 7504 jnz @F ; if segment override --> 0 0000B4D3 FE0E[F300] dec byte [segmnt] ; default is now SS 2436 @@: 0 0000B4D7 C3 retn 2438 2439 2440 dop09: 0 0000B4D8 B84258 mov ax,'BX' ;BX 0 0000B4DB 8B0E[0000] mov cx,[reg_ebx] 2443 2444 dop10: 0 0000B4DF 890E[F400] mov [addrr],cx ;print it out, etc. 0 0000B4E3 E87709 call dis_stosw_lowercase 0 0000B4E6 F6C303 test bl,2+1 0 0000B4E9 741C jz dop13 ;if done 0 0000B4EB B02B mov al,'+' 0 0000B4ED AA stosb 2451 dop11: 0 0000B4EE B85349 mov ax,'SI' 0 0000B4F1 8B0E[0000] mov cx,[reg_esi] 0 0000B4F5 F6C301 test bl,1 0 0000B4F8 7406 jz dop12 ;if SI 0 0000B4FA B044 mov al,'D' ;DI 0 0000B4FC 8B0E[0000] mov cx,[reg_edi] 2458 2459 dop12: 0 0000B500 010E[F400] add [addrr], cx ; print it out, etc. 0 0000B504 E85609 call dis_stosw_lowercase 2462 dop13: 0 0000B507 F606[0000]C0 test byte [regmem], 0C0h 0 0000B50C 7455 jz s dop17 ; if no displacement --> 0 0000B50E F606[0000]80 test byte [regmem], 80h 0 0000B513 752D jnz dop15 ; if word displacement --> 0 0000B515 E8280A call disgetbyte 0 0000B518 98 cbw 0 0000B519 0106[F400] add [addrr], ax 2470 0 0000B51D 80FB04 cmp bl, 4 ; BP only ? 0 0000B520 740E je @F ; yes, do not display "BYTE" size --> 0 0000B522 84C0 test al, al 0 0000B524 750A jnz @F 0 0000B526 B02B mov al, '+' 0 0000B528 AA stosb 0 0000B529 E85209 call showsize.byte 0 0000B52C B000 mov al, 0 0 0000B52E EB0D jmp @FF 2480 @@: 2481 0 0000B530 3C00 cmp al, 0 0 0000B532 B42B mov ah, '+' 0 0000B534 7D04 jge dop14 ; if not negative --> 0 0000B536 B42D mov ah, '-' 0 0000B538 F6D8 neg al 2487 dop14: 0 0000B53A 8825 mov [di], ah 0 0000B53C 47 inc di 2490 @@: 0 0000B53D E8[0000] call hexbyte ; print the byte displacement 0 0000B540 EB21 jmp s dop17 ; done --> 2493 2494 dop15: 0 0000B542 B02B mov al, '+' 0 0000B544 AA stosb 2497 0 0000B545 E80E0A call disgetword 0 0000B548 83F87F cmp ax, 127 0 0000B54B 7F0A jg @F 0 0000B54D 83F880 cmp ax, -128 0 0000B550 7C05 jl @F 0 0000B552 50 push ax 0 0000B553 E83909 call showsize.word 0 0000B556 58 pop ax 2506 @@: 0 0000B557 EB03 jmp @F 2508 dop16: 0 0000B559 E8FA09 call disgetword 2510 @@: 0 0000B55C 0106[F400] add [addrr], ax 0 0000B560 E8[0000] call hexword ; print word displacement 2513 2514 dop17: 0 0000B563 B05D mov al, ']' 0 0000B565 AA stosb 0 0000B566 C3 retn 2518 2519 2520 getsibbyte: 0 0000B567 A0[0000] mov al, [sibbyte] ; init if we already read it 0 0000B56A D006[E400] rol byte [gotsib], 1 ; have it already ? 0 0000B56E 720A jc .ret ; yes --> 0 0000B570 F616[E400] not byte [gotsib] ; save that we have it 0 0000B574 E8C909 call disgetbyte ; get SIB byte 0 0000B577 A2[0000] mov [sibbyte], al ; save it 2527 .ret: 0 0000B57A C3 retn 2529 2530 2531 %if _DISASM_32BIT 2532 ; 32-bit MOD REG R/M addressing. 2533 2534 dop18: 0 0000B57B 810E[FA00]0408 or word [disflags], DIS_I_SHOW | DIS_I_SHOW_A32 0 0000B581 8326[F400]00 and word [addrr], 0 0 0000B586 8326[F600]00 and word [addrr + 2], 0 ; zero out the address initially 0 0000B58B 3C05 cmp al, 5 ; mod=0 and r/m=5 ? 0 0000B58D 7503E9AF00 je dop19 ; yes, just a disp32 address --> 0 0000B592 50 push ax 0 0000B593 2407 and al, 7 0 0000B595 3C04 cmp al, 4 0 0000B597 7503 jne dop20 ; if no SIB --> 0 0000B599 E8CBFF call getsibbyte 2545 dop20: 0 0000B59C 58 pop ax 0 0000B59D A880 test al, 80h 0 0000B59F 754C jnz dop22 ; if disp32 --> 0 0000B5A1 A840 test al, 40h 0 0000B5A3 7467 jz dop23 ; if no disp8 --> 2551 0 0000B5A5 E89809 call disgetbyte 0 0000B5A8 84C0 test al, al 0 0000B5AA 7509 jnz @F 0 0000B5AC 50 push ax 0 0000B5AD 893E[0001] mov word [uu_a32_size_byte_keyword], di 0 0000B5B1 E8CA08 call showsize.byte 0 0000B5B4 58 pop ax 2559 @@: 2560 0 0000B5B5 98 cbw 0 0000B5B6 99 cwd 0 0000B5B7 0106[F400] add word [addrr], ax 0 0000B5BB 1116[F600] adc word [addrr + 2], dx 2565 0 0000B5BF 3C00 cmp al, 0 0 0000B5C1 7D06 jge dop21 ; if not negative --> 0 0000B5C3 F6D8 neg al 0 0000B5C5 C6052D mov byte [di], '-' 0 0000B5C8 47 inc di 2571 dop21: 0 0000B5C9 E8[0000] call hexbyte 0 0000B5CC EB3B jmp s dop22a ; done --> 2574 2575 2576 disp32_add_to_addrr_dword_size: 0 0000B5CE 893E[0201] mov word [uu_a32_size_dword_keyword], di 0 0000B5D2 E8B408 call showsize.dword 2579 disp32_add_to_addrr: 0 0000B5D5 E87E09 call disgetword 0 0000B5D8 0106[F400] add word [addrr], ax 0 0000B5DC 50 push ax 0 0000B5DD 9C pushf 0 0000B5DE E87509 call disgetword 0 0000B5E1 9D popf 0 0000B5E2 1106[F600] adc word [addrr + 2], ax 0 0000B5E6 E8[0000] call hexword 0 0000B5E9 58 pop ax 0 0000B5EA E9[0000] jmp hexword 2590 2591 dop22: 0 0000B5ED E8DEFF call disp32_add_to_addrr_dword_size 2593 ; print disp32 0 0000B5F0 83F87F cmp ax, 127 0 0000B5F3 7F14 jg @F 0 0000B5F5 83F880 cmp ax, -128 0 0000B5F8 7C0F jl @F 0 0000B5FA B10F mov cl, 15 0 0000B5FC D3F8 sar ax, cl 0 0000B5FE 3906[F600] cmp word [addrr + 2], ax 0 0000B602 7505 jne @F 0 0000B604 8326[0201]00 and word [uu_a32_size_dword_keyword], 0 2603 @@: 2604 2605 dop22a: 0 0000B609 E8F500 call store_plus 2607 2608 dop23: 0 0000B60C A0[0000] mov al,[regmem] 0 0000B60F 2407 and al,7 0 0000B611 3C04 cmp al,4 0 0000B613 7403E9CD00 jne dop28 ;if no SIB 0 0000B618 A0[0000] mov al, [sibbyte] 0 0000B61B 88C4 mov ah, al 0 0000B61D 250738 and ax, 00_111_000_00_000_111b 2616 ; ah = index << 3, al = base 0 0000B620 80FC20 cmp ah, 4 << 3 ; index encodes esp ? 0 0000B623 7414 je dop_sib_index_4 ; yes, use base only --> 2619 ; When this branch is taken, the scale is ignored. 2620 ; This is typically used only for encoding [esp] 2621 ; and [esp + x] but is a valid encoding even for 2622 ; other base registers. So better support it. 2623 ; (This used to be a special case for SIB == 24h 2624 ; only because it doesn't usually occur else. 2625 ; The other cases were rejected in dop25.) 2626 0 0000B625 E80700 call dop_is_mod_0_and_base_5 0 0000B628 7559 jnz dop24 ; if not mod=0 base=5 --> 0 0000B62A E8A8FF call disp32_add_to_addrr; show 32-bit displacement instead of [EBP] 0 0000B62D EB5C jmp dop25 ; and handle the scale and index --> 2631 2632 2633 ; INP: al = low 3 bits of SIB byte (= base) 2634 ; byte [regmem] = ModR/M byte 2635 ; OUT: NZ if not mod=0 base=5 special case 2636 ; ZR else 2637 ; REM: base=5 usually encodes [ebp], and mod=0 2638 ; usually encodes no displacement field. 2639 ; If both are true however, then the 2640 ; special case is true: there is no base 2641 ; register and a 32-bit displacement. 2642 dop_is_mod_0_and_base_5: 0 0000B62F 3C05 cmp al, 5 0 0000B631 7505 jne @F ; NZ if not base=5 --> 0 0000B633 F606[0000]C0 test byte [regmem], 1100_0000b 2646 ; NZ if not mod=0 2647 @@: 0 0000B638 C3 retn 2649 2650 2651 dop_sib_index_4: 2652 ; The mod=0 base=5 special case and the 2653 ; index=4 special case can occur both 2654 ; together. That is a SIB encoding of 2655 ; a 32-bit displacement without any 2656 ; index or base registers. 2657 ; 2658 ; This was noted on stackoverflow.com by 2659 ; Peter Cordes: "x86-32 has 2 redundant 2660 ; ways to encode [0x123456], i.e. no-base 2661 ; + disp32: with or without a SIB byte, 2662 ; because SIB has an encoding for no-base 2663 ; and no-index." (There is a use for this 2664 ; distinction and thus the SIB form only 2665 ; in 64-bit mode but it is accepted as a 2666 ; valid alternative encoding even for us.) 2667 ; 2668 ; - https://stackoverflow.com/questions/48124293/can-rip-be-used-with-another-register-with-rip-relative-addressing/48125453#48125453 0 0000B639 E8F3FF call dop_is_mod_0_and_base_5 0 0000B63C 7403E9A400 jnz dop28 ; if not mod=0 base=5 --> 2671 ; fall through to dop19 2672 2673 dop19: 0 0000B641 E8B200 call store_opensqubracket 0 0000B644 E887FF call disp32_add_to_addrr_dword_size 2676 ; display 32-bit offset 0 0000B647 833E[F600]01 cmp word [addrr + 2], 1 ; >= 64 KiB ? 0 0000B64C 7305 jae @F ; yes, delete keyword --> 0 0000B64E 8326[0201]00 and word [uu_a32_size_dword_keyword], 0 2680 ; no, do not delete keyword 2681 @@: 0 0000B653 EB6E jmp dop27 2683 2684 dop_store_and_add_base_reg32: 0 0000B655 E89200 call store_opensqubracket_e 0 0000B658 E86608 call showreg16 0 0000B65B E866FE call da_set_default_ss_if_esp_ebp 0 0000B65E 3C0A cmp al, 5 * 2 ; ebp ? 0 0000B660 7405 je @F ; yes, delete BYTE --> 0 0000B662 8326[0001]00 and word [uu_a32_size_byte_keyword], 0 2691 ; do not delete BYTE 2692 @@: 2693 add_reg32_to_addrr: 0 0000B667 B90100 mov cx, 1 2695 add_reg32_times_cx_to_addrr: 0 0000B66A 50 push ax 0 0000B66B 53 push bx 0 0000B66C 93 xchg ax, bx 0 0000B66D 8B9F[1A01] mov bx, word [reg32addr + bx] 2700 @@: 0 0000B671 8B07 mov ax, word [bx] 0 0000B673 0106[F400] add word [addrr], ax 0 0000B677 8B4702 mov ax, word [bx + 2] 0 0000B67A 1106[F600] adc word [addrr + 2], ax 0 0000B67E E2F1 loop @B 0 0000B680 5B pop bx 0 0000B681 58 pop ax 0 0000B682 C3 retn 2709 2710 dop24: 0 0000B683 E8CFFF call dop_store_and_add_base_reg32 0 0000B686 B05D mov al, ']' 0 0000B688 E86D00 call stosb_notnasm 2714 dop25: 0 0000B68B E87300 call store_plus 2716 0 0000B68E A0[0000] mov al, [sibbyte] 0 0000B691 E81107 call da_get_bits_3_to_5 ; al = index 2719 ; (In dop23 we already checked this is not = 4 2720 ; which is a special escaping encoding.) 2721 0 0000B694 E85300 call store_opensqubracket_e 2723 0 0000B697 8A26[0000] mov ah, [sibbyte] 0 0000B69B B90100 mov cx, 1 0 0000B69E F6C4C0 test ah, 0C0h 0 0000B6A1 740F jz @F 0 0000B6A3 41 inc cx 0 0000B6A4 F6C480 test ah, 80h 0 0000B6A7 7409 jz @F 0 0000B6A9 B104 mov cl, 4 0 0000B6AB F6C440 test ah, 40h 0 0000B6AE 7402 jz @F 0 0000B6B0 B108 mov cl, 8 2735 @@: 2736 0 0000B6B2 E80C08 call showreg16 0 0000B6B5 51 push cx 0 0000B6B6 E8B1FF call add_reg32_times_cx_to_addrr 0 0000B6B9 59 pop cx 0 0000B6BA 49 dec cx ; = 0-based scale 2742 ; jz dop27 ; if scale == 1 (S=00b) --> 0 0000B6BB B02A mov al, '*' 0 0000B6BD AA stosb 0 0000B6BE 88C8 mov al, cl 0 0000B6C0 0431 add al, '1' ; from 0-based to '1'-based 2747 dop26: 0 0000B6C2 AA stosb 2749 dop27: 0 0000B6C3 8B0E[0001] mov cx, word [uu_a32_size_byte_keyword] 2751 ; -> size keyword, or zero if none 0 0000B6C7 E302 jcxz @F ; if there was no size given --> 0 0000B6C9 EB06 jmp .delete 2754 @@: 0 0000B6CB 8B0E[0201] mov cx, word [uu_a32_size_dword_keyword] 2756 ; -> size keyword, or zero if none 0 0000B6CF E311 jcxz @F ; if there was no size given --> 2758 .delete: 0 0000B6D1 56 push si 0 0000B6D2 87CF xchg cx, di ; di -> size keyword, cx -> behind disassembly 0 0000B6D4 89FE mov si, di ; si -> size keyword 0 0000B6D6 B020 mov al, 32 ; scan for next blank 2763 .da28a: 0 0000B6D8 AE scasb ; skip size name 0 0000B6D9 75FD jne .da28a ; if not done yet --> 2766 ; (The above is the same as repne scasb, but 2767 ; has no effect on cx.) 0 0000B6DB 87F7 xchg si, di ; di -> size keyword, si -> after size keyword 0 0000B6DD 29F1 sub cx, si ; behind disassembly - after size keyword 2770 ; = length of disassembly part after keyword 0 0000B6DF F3A4 rep movsb ; move the remainder of the line 2772 ; di -> behind disassembly (size keyword deleted) 0 0000B6E1 5E pop si 2774 @@: 2775 dop17_j2: 0 0000B6E2 E97EFE jmp dop17 2777 2778 ; 32-bit addressing without SIB 2779 2780 dop28: 0 0000B6E5 E86DFF call dop_store_and_add_base_reg32 0 0000B6E8 EBD9 jmp short dop27 2783 2784 2785 ; Store '[' if not NASM syntax, 2786 ; then (regardless of syntax) store 'E' 2787 ; INP: di-> buffer 2788 ; OUT: di-> behind "[E" or 'E' 2789 ; CHG: - 2790 ; 2791 ; The 'E' is lowercased if that option is selected. 2792 store_opensqubracket_e: 0 0000B6EA 50 push ax 0 0000B6EB E80800 call store_opensqubracket 0 0000B6EE B045 mov al, 'E' 0 0000B6F0 E8D606 call dis_lowercase 0 0000B6F3 AA stosb 0 0000B6F4 58 pop ax 0 0000B6F5 C3 retn 2800 %endif 2801 2802 ; Store '[' if not NASM syntax 2803 ; INP: di-> buffer 2804 ; OUT: di-> behind '[' if not NASM syntax 2805 ; CHG: al 2806 store_opensqubracket: 0 0000B6F6 B05B mov al, '[' 2808 2809 ; Store al if not NASM syntax 2810 ; INP: di-> buffer 2811 ; OUT: di-> behind stored byte if not NASM syntax 2812 ; CHG: - 2813 stosb_notnasm: 0 0000B6F8 F606[0000]04 testopt [asm_options], disasm_nasm 0 0000B6FD 7501 jnz .ret 0 0000B6FF AA stosb 0 0000B700 C3 .ret: retn 2818 2819 ; Store '+' if NASM syntax 2820 ; INP: di-> buffer 2821 ; OUT: di-> behind '+' if NASM syntax 2822 ; CHG: al 2823 store_plus: 0 0000B701 B02B mov al, '+' 2825 2826 ; Store al if NASM syntax 2827 ; INP: di-> buffer 2828 ; OUT: di-> behind stored byte if NASM syntax 2829 ; CHG: - 2830 stosb_nasm: 0 0000B703 F606[0000]04 testopt [asm_options], disasm_nasm 0 0000B708 7401 jz .ret 0 0000B70A AA stosb 0 0000B70B C3 .ret: retn 2835 2836 2837 ; Memory-only reference (OP_M) 2838 2839 dop_m: 0 0000B70C E89D06 call getregmem 0 0000B70F 3CC0 cmp al, 0C0h 0 0000B711 7303E93FFD jb dop05 ; if it's what we expect --> 2843 2844 ; it's a register reference 0 0000B716 E93106 disbad1:jmp disbad ; this is not supposed to happen --> 2846 2847 ; Register reference from MOD R/M part (OP_R_MOD) 2848 2849 dop_r_mod: 0 0000B719 E89006 call getregmem 0 0000B71C 3CC0 cmp al,0c0h 0 0000B71E 72F6 jb disbad1 ;if it's a memory reference 0 0000B720 EB03 jmp s dop33 2854 2855 ; Pure register reference (OP_R) 2856 2857 dop_r: 0 0000B722 E87D06 call getregmem_r 2859 2860 dop33: ; <--- used by OP_RM, OP_R_MOD and OP_R_ADD 0 0000B725 2407 and al,7 ;entry point for regs from MOD R/M, and others 0 0000B727 8A0E[FC00] mov cl,[disflags2] 0 0000B72B 080E[FA00] or [disflags],cl ;if it was variable size operand, the size 2864 ;should now be marked as known. 0 0000B72F 80FC00 cmp ah,0 0 0000B732 7C11 jl dop35 ;if byte register 0 0000B734 740D jz dop34 ;if word register 2868 dop33a: 0 0000B736 80FC20 cmp ah, 20h ; qword register (MMX) ? 0 0000B739 7415 je dop35_1 ; --> 2871 dop33b: 0 0000B73B 50 push ax 0 0000B73C B045 mov al, 'E' 0 0000B73E E88806 call dis_lowercase 0 0000B741 AA stosb 0 0000B742 58 pop ax 2877 ;mov byte [di],'E' ;enter here from OP_ECX 2878 ;inc di 2879 dop34: 0 0000B743 0408 add al,8 2881 dop35: 0 0000B745 98 cbw 0 0000B746 D1E0 shl ax,1 0 0000B748 93 xchg ax,bx ;mov bx,ax 0 0000B749 8B87[0000] mov ax,[rgnam816+bx];get the register name 0 0000B74D E90D07 jmp dis_stosw_lowercase 2887 2888 dop35_1: 0 0000B750 50 push ax 0 0000B751 B84D4D mov ax, "MM" 0 0000B754 E80607 call dis_stosw_lowercase 0 0000B757 58 pop ax 0 0000B758 0430 add al, '0' 0 0000B75A AA stosb 0 0000B75B C3 retn 2896 2897 2898 da_e_cx: 0 0000B75C 800E[E100]20 or byte [preused], PREASIZE 0 0000B761 F606[E000]20 test byte [preflags], PREASIZE 0 0000B766 7404 jz .deleteparameter 0 0000B768 B001 mov al, 1 2903 %if _PM 2904 test byte [presizeflags], PRE32A 2905 jz dop34 2906 %endif 0 0000B76A EBCF jmp dop33b 2908 2909 .deleteparameter: 2910 @@: 0 0000B76C 4F dec di 0 0000B76D 803D2C cmp byte [di], ',' 0 0000B770 75FA jne @B 0 0000B772 C3 retn 2915 2916 2917 ; Register number embedded in the instruction (OP_R_ADD) 2918 2919 dop_r_add: 0 0000B773 A0[E200] mov al,[instru] 0 0000B776 EBAD jmp s dop33 2922 2923 ; AL or AX or EAX (OP_AX) 2924 2925 dop_ax: 0 0000B778 B000 mov al,0 0 0000B77A EBA9 jmp s dop33 2928 2929 ; QWORD mem (OP_M64) 2930 ; This operand type is used by CMPXCHG8B, FILD and FISTP. 2931 dop_m64: 2932 ;mov ax, 'Q' ; print "QWORD" 0 0000B77C B420 mov ah, 20h ; size QWORD 0 0000B77E EB35 jmp s dop40 2935 2936 ; FLOAT (=REAL4) mem (OP_MFLOAT) 2937 dop_mfloat: 0 0000B780 B8464C mov ax, "FL" 0 0000B783 E8D706 call dis_stosw_lowercase 0 0000B786 B84F41 mov ax, "OA" 0 0000B789 E8D106 call dis_stosw_lowercase 0 0000B78C B85420 mov ax, "T " 0 0000B78F EB15 jmp short dop38c 2944 2945 ; DOUBLE (=REAL8) mem (OP_MDOUBLE). 2946 2947 dop_mdouble: 0 0000B791 B8444F mov ax, "DO" 0 0000B794 E8C606 call dis_stosw_lowercase 0 0000B797 B85542 mov ax, "UB" 0 0000B79A E8C006 call dis_stosw_lowercase 0 0000B79D B04C mov al, 'L' 0 0000B79F E82706 call dis_lowercase 0 0000B7A2 AA stosb 0 0000B7A3 B84520 mov ax, "E " 2956 dop38c: 0 0000B7A6 E8B406 call dis_stosw_lowercase 0 0000B7A9 E8F506 call showptr 0 0000B7AC EB1B jmp s dop42a 2960 2961 ; TBYTE (=REAL10) mem (OP_M80). 2962 2963 dop_m80: 0 0000B7AE B854FF mov ax,0FF00h+'T' ;print 'T' + "BYTE" 0 0000B7B1 E81506 call dis_lowercase 0 0000B7B4 AA stosb 2967 dop40: 0 0000B7B5 E8F405 call getregmem 0 0000B7B8 3CC0 cmp al,0c0h 0 0000B7BA 7317 jae disbad5 ; if it's a register reference 0 0000B7BC 800E[FA00]80 or byte [disflags], DIS_I_DONTSHOW 2972 ; don't show this 0 0000B7C1 E991FC jmp dop05 2974 2975 %if 0 2976 ; Far memory (OP_FARMEM). 2977 ; This is either a FAR16 (DWORD) or FAR32 (FWORD) pointer. 2978 dop_farmem: 2979 call dischk32d 2980 jz dop41a ; if not dword far 2981 call showdword 2982 dop41a: 2983 mov ax, "FA" ; store "FAR " 2984 call dis_stosw_lowercase 2985 mov ax, "R " 2986 call dis_stosw_lowercase 2987 %endif 2988 2989 ; mem (OP_MXX). 2990 2991 dop_mxx: 0 0000B7C4 800E[FA00]80 or byte [disflags], DIS_I_DONTSHOW 2993 ; don't show this 2994 dop42a: 0 0000B7C9 E8E005 call getregmem 0 0000B7CC 3CC0 cmp al,0c0h 0 0000B7CE 7303E993FC jb dop06 ; mem ref, don't show size --> 2998 disbad5: 0 0000B7D3 E97405 jmp disbad 3000 3001 ; Far immediate (OP_FARP). Either FAR16 or FAR32. 3002 dop_farimm: 0 0000B7D6 E87D07 call disgetword 0 0000B7D9 50 push ax 3005 %if _DISASM_32BIT 0 0000B7DA E8F306 call dischk32d 0 0000B7DD 7409 jz dop44_word ; if not 32-bit address 3008 3009 dop44_dword: 3010 %if _PM 3011 test byte [bCSAttr],40h ; for 16-bit code segments 3012 jnz @F ; no need to display "WORD " 3013 %endif 0 0000B7DF E8A706 call showdword 3015 @@: 3016 0 0000B7E2 E87107 call disgetword 0 0000B7E5 50 push ax 0 0000B7E6 EB00 jmp dop44_common 3020 %endif 3021 3022 dop44_word: 3023 %if _PM 3024 %if _DISASM_32BIT 3025 test byte [bCSAttr],40h ; for 32-bit code segments 3026 jz @F ; no need to display "DWORD " 3027 call showword 3028 @@: 3029 %endif 3030 %endif 3031 3032 dop44_common: 0 0000B7E8 E86B07 call disgetword 3034 %if _MEMREF_AMOUNT 0 0000B7EB E89801 call get_free_memref 0 0000B7EE 8987[9800] mov word [memrefs + bx + mrSegmentSelector], ax 3037 %endif 0 0000B7F2 E8[0000] call hexword 3039 %if _IMMASM 0 0000B7F5 A3[0400] mov word [immasm_far_target + 4], ax 0 0000B7F8 31C0 xor ax, ax 0 0000B7FA A3[0200] mov word [immasm_far_target + 2], ax 3043 %endif 0 0000B7FD B03A mov al,':' 0 0000B7FF AA stosb 3046 %if _DISASM_32BIT 0 0000B800 E8CD06 call dischk32d 0 0000B803 7410 jz dop45 ;if not 32-bit address 0 0000B805 58 pop ax 3050 %if _IMMASM 0 0000B806 A3[0200] mov word [immasm_far_target + 2], ax 3052 %endif 3053 %if _MEMREF_AMOUNT 0 0000B809 8987[9600] mov word [memrefs + bx + mrOffset + 2], ax 0 0000B80D 808F[9A00]10 or byte [memrefs + bx + mrFlags], mrfA32 3056 %endif 0 0000B812 E8[0000] call hexword 3058 dop45: 3059 %endif 0 0000B815 58 pop ax 3061 %if _IMMASM 0 0000B816 A3[0000] mov word [immasm_far_target], ax 3063 %endif 3064 %if _MEMREF_AMOUNT 0 0000B819 8987[9400] mov word [memrefs + bx + mrOffset], ax 0 0000B81D 808F[9A00]01 or byte [memrefs + bx + mrFlags], mrfBranchDirect 0 0000B822 E88201 call calc_linear_memref_and_mark_nonfree 3068 %endif 0 0000B825 E9[0000] jmp hexword 3070 3071 3072 %if _COND 3073 ; INP: [presizeflags] & PRE32A, d[reg_ecx] 3074 ; OUT: dx:ax = (e)cx 3075 cond_get_ecx: 0 0000B828 A1[0000] mov ax, word [reg_ecx] 3077 %if _DISASM_32BIT 0 0000B82B F606[E000]20 test byte [presizeflags], PRE32A ; A32 ? 0 0000B830 8B16[0200] mov dx, word [reg_ecx+2] 0 0000B834 7502 jnz .ecx 3081 %endif 0 0000B836 31D2 xor dx, dx 3083 .ecx: 0 0000B838 C3 retn 3085 3086 ; INP: ax = 0..15 condition code, else invalid 3087 ; OUT: w[condmsg] set as appropriate 3088 cond_handle: 0 0000B839 83F80F cmp ax, 15 0 0000B83C 7738 ja .return 0 0000B83E 8B0E[0000] mov cx, word [reg_efl] ; get flags 0 0000B842 89C3 mov bx, ax 0 0000B844 80E3FE and bl, ~1 ; make even 0 0000B847 2401 and al, 1 ; 1 if negated condition 0 0000B849 80FB0C cmp bl, 12 ; L/GE or LE/G? 0 0000B84C 7306 jae .specific ; yes --> 3097 0 0000B84E 858F[4E01] test cx, [cond_table+bx]; flag(s) set ? 0 0000B852 EB14 jmp short .jump_ZF ; NZ if (normal) condition true --> 3100 3101 .specific: 0 0000B854 80FB0E cmp bl, 14 0 0000B857 7205 jb .L_GE 3104 3105 ; Handle LE/NG and G/NLE conditions. 3106 ; The former says ZF | (OF ^ SF). 3107 .LE_G: 0 0000B859 F6C140 test cl, 40h ; ZF | .. 0 0000B85C 750C jnz .jump_true 3110 3111 ; Handle L/NGE and GE/NL conditions. 3112 ; The former says OF ^ SF. 3113 .L_GE: 0 0000B85E 81E18008 and cx, 880h ; OF ^ SF 0 0000B862 7408 jz .jump_false ; both clear --> 0 0000B864 81F18008 xor cx, 880h 3117 .jump_ZF: 0 0000B868 7402 jz .jump_false ; both set --> (or ZR: (normal) condition false) 3119 .jump_true: 0 0000B86A 3401 xor al, 1 ; (negating ^ raw truth) = cooked truth 3121 .jump_false: 0 0000B86C 84C0 test al, al ; true ? 0 0000B86E 7507 jnz .msg_jumping ; yes --> 3124 3125 .msg_notjumping: 0 0000B870 C706[0401][0000] mov word [condmsg], msg.condnotjump 3127 .return: 0 0000B876 C3 retn 3129 3130 .msg_jumping: 0 0000B877 C706[0401][0000] mov word [condmsg], msg.condjump 0 0000B87D C3 retn 3133 %endif 3134 3135 3136 ; 8-bit relative jump (OP_REL8) 3137 3138 dop_rel8: 3139 %if _COND 0 0000B87E A1[E600] mov ax, word [index] 0 0000B881 3DE300 cmp ax, 0E3h 0 0000B884 772C ja .cond_done ; no conditional jump --> 0 0000B886 7211 jb .cond_noncx ; not jcxz, check for other --> 3144 0 0000B888 E89DFF call cond_get_ecx 0 0000B88B 09D0 or ax, dx 0 0000B88D 7405 jz .cond_msg_jumping 3148 .cond_msg_notjumping: 0 0000B88F E8DEFF call cond_handle.msg_notjumping 0 0000B892 EB1E jmp short .cond_done 3151 3152 .cond_msg_jumping: 0 0000B894 E8E0FF call cond_handle.msg_jumping 0 0000B897 EB19 jmp short .cond_done 3155 3156 .cond_noncx: 0 0000B899 3CE0 cmp al, 0E0h 0 0000B89B 7210 jb .cond_nonloop ; not loop, check for other --> 3159 0 0000B89D 50 push ax 0 0000B89E E887FF call cond_get_ecx 0 0000B8A1 48 dec ax ; = 0 if cx is 1 0 0000B8A2 09D0 or ax, dx ; = 0 if cx is 1 and ecx is cx 0 0000B8A4 58 pop ax 0 0000B8A5 74E8 jz .cond_msg_notjumping ; if (e)cx is 1 --> 0 0000B8A7 3CE2 cmp al, 0E2h 0 0000B8A9 74E9 je .cond_msg_jumping ; loop without additional condition --> 0 0000B8AB 3495 xor al, 0E0h^75h ; E0h (loopnz) to 75h (jnz), 3169 ; E1h (loopz) to 74h (jz) 3170 3171 .cond_nonloop: 0 0000B8AD 2C70 sub al, 70h ; (ah = 0) 0 0000B8AF E887FF call cond_handle ; call common code (checks for ax < 16) 3174 .cond_done: 3175 %endif 0 0000B8B2 E88B06 call disgetbyte 0 0000B8B5 98 cbw 0 0000B8B6 A2[E300] mov byte [disp8], al 0 0000B8B9 E98A00 jmp dop48 3180 3181 ; 16/32-bit relative jump (OP_REL1632) 3182 3183 dop_rel1632: 3184 %if _COND 0 0000B8BC A1[E600] mov ax, word [index] 0 0000B8BF 2D[8000] sub ax, SPARSE_BASE+80h 0 0000B8C2 E874FF call cond_handle 3188 %endif 0 0000B8C5 E88E06 call disgetword 3190 %if _DISASM_32BIT 0 0000B8C8 E80506 call dischk32d 0 0000B8CB 745D jz dop48_near ; if not 32-bit offset 0 0000B8CD 92 xchg ax, dx ; mov dx, ax 0 0000B8CE E88506 call disgetword 3195 0 0000B8D1 813E[E600]E800 cmp word [index], 00E8h 0 0000B8D7 7429 je .not_show_keyword ; no need to distinguish NEAR call --> 3198 ; ax:dx between FFFFh:FF80h (-128) .. 0000h:007Fh (127): 3199 ; == show "NEAR" keyword 3200 ; 3201 ; Note: This is not entirely correct. If a jump short is 3202 ; used, the actual opcode is shorter, thus the 3203 ; exact distance that can be reached by the jump short 3204 ; differs from what the jump near can reach with 3205 ; a rel16/32 displacement between -128..127. 0 0000B8D9 83F8FF cmp ax, -1 0 0000B8DC 7410 je .checkminus 0 0000B8DE 85C0 test ax, ax 0 0000B8E0 7520 jnz .not_show_keyword 3210 .checkplus: 0 0000B8E2 83FA7F cmp dx, byte 127 0 0000B8E5 7F1B jg .not_show_keyword 0 0000B8E7 83FA00 cmp dx, 0 0 0000B8EA 7C16 jl .not_show_keyword 0 0000B8EC EB0A jmp .show_keyword 3216 3217 .checkminus: 0 0000B8EE 83FA80 cmp dx, byte -128 0 0000B8F1 7C0F jl .not_show_keyword 0 0000B8F3 83FA00 cmp dx, 0 0 0000B8F6 7D0A jge .not_show_keyword 3222 3223 .show_keyword: 0 0000B8F8 F606[0000]20 testopt [asm_options], disasm_show_near 0 0000B8FD 7503 jnz .not_show_keyword 0 0000B8FF E83604 call dop_show_near 3227 .not_show_keyword: 3228 3229 %if _PM 3230 test byte [bCSAttr],40h ; for 32-bit code segments 3231 jnz @F ; no need to display "DWORD " 3232 %endif 0 0000B902 50 push ax 0 0000B903 E88305 call showdword 0 0000B906 58 pop ax 3236 @@: 3237 0 0000B907 8B1E[0000] mov bx,[u_addr+0] 0 0000B90B 031E[DC00] add bx,[dis_n] 0 0000B90F 1306[DE00] adc ax,[dis_n + 2] 0 0000B913 01DA add dx,bx 3242 %if _PM 3243 adc ax,[u_addr+2] 3244 %else 0 0000B915 83D000 adc ax, 0 3246 %endif 3247 %if _MEMREF_AMOUNT 0 0000B918 E86B00 call get_free_memref 0 0000B91B 8987[9600] mov word [memrefs + bx + mrOffset + 2], ax 0 0000B91F 808F[9A00]10 or byte [memrefs + bx + mrFlags], mrfA32 3251 %endif 0 0000B924 E8[0000] call hexword 0 0000B927 92 xchg ax,dx 0 0000B928 EB42 jmp s dop_branch_word 3255 %endif 3256 3257 dop48_near: 0 0000B92A 813E[E600]E800 cmp word [index], 00E8h 0 0000B930 7414 je @F ; no need to distinguish NEAR call --> 3260 ; ax between FF80h (-128) .. 007Fh (127): 3261 ; == show "NEAR" keyword 3262 ; 3263 ; Note: This is not entirely correct. If a jump short is 3264 ; used, the actual opcode is shorter, thus the 3265 ; exact distance that can be reached by the jump short 3266 ; differs from what the jump near can reach with 3267 ; a rel16/32 displacement between -128..127. 0 0000B932 83F880 cmp ax, byte -128 0 0000B935 7C0F jl @F 0 0000B937 83F87F cmp ax, byte 127 0 0000B93A 7F0A jg @F 0 0000B93C F606[0000]20 testopt [asm_options], disasm_show_near 0 0000B941 7503 jnz @F 0 0000B943 E8F203 call dop_show_near 3275 @@: 3276 3277 %if _PM && _DISASM_32BIT 3278 test byte [bCSAttr],40h ; for 16-bit code segments 3279 jz @F ; no need to display "WORD " 3280 push ax 3281 call showword 3282 pop ax 3283 @@: 3284 %endif 3285 3286 dop48: 0 0000B946 99 cwd 0 0000B947 0306[0000] add ax, word [u_addr] 3289 %if _PM 3290 adc dx, word [u_addr + 2] 3291 %else 0 0000B94B 83D200 adc dx, 0 3293 %endif 0 0000B94E 0306[DC00] add ax, word [dis_n] 0 0000B952 1316[DE00] adc dx, word [dis_n + 2] 3296 %if _DISASM_32BIT 0 0000B956 E87705 call dischk32d ; 32-bit opsize ? 0 0000B959 7411 jz .16 ; no --> 0 0000B95B 92 xchg ax, dx 0 0000B95C E8[0000] call hexword ; yes, display high word 0 0000B95F 92 xchg ax, dx 3302 %if _MEMREF_AMOUNT 0 0000B960 E82300 call get_free_memref 0 0000B963 8997[9600] mov word [memrefs + bx + mrOffset + 2], dx 0 0000B967 808F[9A00]10 or byte [memrefs + bx + mrFlags], mrfA32 3306 %endif 3307 .16: 3308 %endif 3309 3310 dop_branch_word: 3311 %if _MEMREF_AMOUNT 0 0000B96C E81700 call get_free_memref 0 0000B96F 8987[9400] mov word [memrefs + bx + mrOffset], ax 0 0000B973 FF36[0400] push word [u_addr + saSegSel] 0 0000B977 8F87[9800] pop word [memrefs + bx + mrSegmentSelector] 0 0000B97B 808F[9A00]01 or byte [memrefs + bx + mrFlags], mrfBranchDirect 0 0000B980 E82400 call calc_linear_memref_and_mark_nonfree 3318 %endif 0 0000B983 E9[0000] jmp hexword ; call hexword and return 3320 3321 3322 %if _MEMREF_AMOUNT 3323 ; INP: word [memrefs.free] 3324 ; OUT: bx = byte index into memref array 3325 ; CHG: - 3326 ; STT: ss = ds = es 3327 get_free_memref: 0 0000B986 8B1E[D000] mov bx, [memrefs.free] 3329 get_memref_index_bx: 0 0000B98A 83FB04 cmp bx, _MEMREF_AMOUNT 0 0000B98D 7309 jae @F 0 0000B98F 01DB add bx, bx 0 0000B991 01DB add bx, bx 0 0000B993 01DB add bx, bx 0 0000B995 01DB add bx, bx 3336 %if MEMREF_size != 16 3337 %error Adjust multiplication 3338 %endif 0 0000B997 C3 retn 3340 3341 @@: 0 0000B998 B83901 mov ax, 0139h 0 0000B99B E8[0000] call setrc 0 0000B99E BA[0000] mov dx, msg.memrefs_invalid_internal 0 0000B9A1 E8[0000] call putsz 0 0000B9A4 E9[0000] jmp cmd3 3347 3348 3349 ; INP: word [memrefs.free] 3350 ; [memrefs] array entry 3351 ; OUT: NC if valid segmented address (getlinear succeeded), 3352 ; dword [memrefs + x + mrLinear] filled 3353 ; word [memrefs.free] incremented 3354 ; CY if invalid address, 3355 ; [memrefs + x] re-initialised 3356 ; word [memrefs.free] left unmodified 3357 ; CHG: - 3358 ; STT: ss = ds = es 3359 calc_linear_memref_and_mark_nonfree: 0 0000B9A7 50 push ax 0 0000B9A8 53 push bx 3362 _386_PM_o32 0 0000B9A9 52 push dx 0 0000B9AA E8D9FF call get_free_memref 0 0000B9AD 53 push bx 3366 _386_PM_o32 0 0000B9AE 8B97[9400] mov dx, word [memrefs + bx + mrOffset] 0 0000B9B2 8B9F[9800] mov bx, word [memrefs + bx + mrSegmentSelector] 0 0000B9B6 E8[0000] call getlinear_32bit 0 0000B9B9 5B pop bx 0 0000B9BA 7210 jc .error 3372 0 0000B9BC 8987[9000] mov word [memrefs + bx + mrLinear], ax 0 0000B9C0 8997[9200] mov word [memrefs + bx + mrLinear + 2], dx 0 0000B9C4 FF06[D000] inc word [memrefs.free] 3376 3377 ; clc 3378 .return: 3379 _386_PM_o32 0 0000B9C8 5A pop dx 0 0000B9C9 5B pop bx 0 0000B9CA 58 pop ax 0 0000B9CB C3 retn 3384 3385 .error: 0 0000B9CC 57 push di 0 0000B9CD 8DBF[9000] lea di, [memrefs + bx] 0 0000B9D1 E80400 call init_one_memref 0 0000B9D4 5F pop di 0 0000B9D5 F9 stc 0 0000B9D6 EBF0 jmp .return 3392 3393 3394 ; INP: di -> memref to initialise 3395 ; OUT: ax = 0 3396 ; di -> past initialised memref 3397 ; CHG: - 3398 ; STT: ss = ds = es 3399 init_one_memref: 0 0000B9D8 31C0 xor ax, ax 3401 3402 ; INP: di -> memref to initialise 3403 ; ax = 0 3404 ; OUT: di -> past initialised memref 3405 ; CHG: - 3406 ; STT: ss = ds = es 3407 .ax_already_zero: 0 0000B9DA AB stosw ; zero-initialise all memrefs 0 0000B9DB AB stosw ; mrLinear 0 0000B9DC AB stosw 0 0000B9DD AB stosw ; mrOffset 0 0000B9DE AB stosw ; mrSegmentSelector 0 0000B9DF AB stosw ; mrFlags 0 0000B9E0 40 inc ax 0 0000B9E1 AB stosw 0 0000B9E2 48 dec ax 0 0000B9E3 AB stosw ; mrLength = 1 0 0000B9E4 C3 retn 3419 3420 3421 ; INP: si = address of segreg (reg_cs, reg_ds, etc) 3422 ; di = address of index reg (reg_esi or reg_edi) 3423 ; [memrefs] 3424 ; [presizeflags] 3425 ; byte [index] = which opcode 3426 ; [reg_ecx] 3427 ; [reg_efl] & 400h = Direction Flag 3428 ; OUT: memrefs + bx -> current memref (partially filled) 3429 ; CHG: bx, si, di, cx, dx 3430 init_string_memref: 0 0000B9E5 E89EFF call get_free_memref 0 0000B9E8 FF34 push word [si] ; get segment/selector 0 0000B9EA 8F87[9800] pop word [memrefs + bx + mrSegmentSelector] 3434 ; store segment/selector 0 0000B9EE FF35 push word [di] 0 0000B9F0 8F87[9400] pop word [memrefs + bx + mrOffset] 3437 ; store low word of offset 0 0000B9F4 8B0E[D600] mov cx, word [string_memref_counter + 2] 0 0000B9F8 8B16[D400] mov dx, word [string_memref_counter] 3440 0 0000B9FC F606[E000]20 test byte [presizeflags], PRE32A 0 0000BA01 740C jz @F ; if 16-bit addressing --> 0 0000BA03 FF7502 push word [di + 2] 0 0000BA06 8F87[9600] pop word [memrefs + bx + mrOffset + 2] 3445 ; store high word of offset 0 0000BA0A 808F[9A00]10 or byte [memrefs + bx + mrFlags], mrfA32 3447 ; remember that it is a32 3448 @@: 3449 0 0000BA0F F606[E000]02 test byte [preflags], PREREP 0 0000BA14 7505 jnz @F ; if to take (e)cx repetitions --> 0 0000BA16 BA0100 mov dx, 1 0 0000BA19 31C9 xor cx, cx ; cx:dx = 1, just one element 3454 @@: 3455 0 0000BA1B 50 push ax 0 0000BA1C B80100 mov ax, 1 0 0000BA1F F606[E600]01 test byte [index], 1 ; element size is byte ? 0 0000BA24 740A jz @F ; yes, ax = 1 0 0000BA26 40 inc ax ; = 2 3461 %if _DISASM_32BIT 0 0000BA27 F606[E000]10 test byte [presizeflags], PRE32D 3463 ; element size is word ? 0 0000BA2C 7402 jz @F ; yes, ax = 2 0 0000BA2E 01C0 add ax, ax ; = 4 3466 %endif 3467 @@: 3468 0 0000BA30 3C01 cmp al, 1 ; byte size ? 0 0000BA32 7415 je @F ; yes, do not multiply --> 0 0000BA34 01D2 add dx, dx 0 0000BA36 11C9 adc cx, cx ; * 2, word to byte 0 0000BA38 720A jc .carry_counter 0 0000BA3A 3C02 cmp al, 2 ; word size ? 0 0000BA3C 740B je @F ; yes, done multiplying --> 0 0000BA3E 01D2 add dx, dx 0 0000BA40 11C9 adc cx, cx ; * 4, dword to byte 0 0000BA42 7305 jnc @F 3479 .carry_counter: 0 0000BA44 BAFFFF mov dx, -1 0 0000BA47 89D1 mov cx, dx ; in case the counter is large 3482 ; A carry out of an a16 address is not yet handled. 3483 ; Note that eg cx=8000h a16 movsw may be valid to 3484 ; copy exactly 64 KiB. Likewise, technically a 3485 ; size of exactly 4 GiB is valid; however, our 3486 ; memref format cannot store that. 3487 @@: 0 0000BA49 8997[9C00] mov word [memrefs + bx + mrLength], dx 0 0000BA4D 898F[9E00] mov word [memrefs + bx + mrLength + 2], cx 3490 0 0000BA51 F606[0100]04 testopt [reg_efl], 400h ; DF set ? 0 0000BA56 7411 jz @F 3493 0 0000BA58 0187[9400] add word [memrefs + bx + mrOffset], ax 0 0000BA5C 8397[9600]00 adc word [memrefs + bx + mrOffset + 2], 0 0 0000BA61 2997[9400] sub word [memrefs + bx + mrOffset], dx 0 0000BA65 198F[9600] sbb word [memrefs + bx + mrOffset + 2], cx 3498 3499 @@: 0 0000BA69 58 pop ax 0 0000BA6A C3 retn 3502 %endif 3503 3504 3505 ; Check for ST(1) (OP_1CHK). 3506 3507 dop49: 0 0000BA6B 58 pop ax ;discard return address 0 0000BA6C A0[0000] mov al,[regmem] 0 0000BA6F 2407 and al,7 0 0000BA71 3C01 cmp al,1 0 0000BA73 7403 je dop50 ;if it's ST(1) 0 0000BA75 E909F2 jmp da14 ;another operand (but no comma) 3514 3515 dop50: 0 0000BA78 E9A6F2 jmp da_op_end ; end of list --> 3517 3518 ; ST(I) (OP_STI). 3519 3520 dop_sti: 0 0000BA7B A0[0000] mov al, byte [regmem] 0 0000BA7E 2407 and al, 7 0 0000BA80 93 xchg ax, bx ;mov bx,ax 0 0000BA81 B85354 mov ax, 'ST' 0 0000BA84 E8D603 call dis_stosw_lowercase; store ST(bl) 0 0000BA87 B028 mov al, '(' 0 0000BA89 AA stosb 0 0000BA8A B83029 mov ax, '0)' 0 0000BA8D 08D8 or al, bl 0 0000BA8F AB stosw 0 0000BA90 C3 retn 3532 3533 ; CRx (OP_CR). 3534 3535 dop_cr: 0 0000BA91 BB4352 mov bx,'CR' 0 0000BA94 E80B03 call getregmem_r 0 0000BA97 3C04 cmp al,4 0 0000BA99 7713 ja disbad4 ;if too large 0 0000BA9B 7505 jne dop52a 0 0000BA9D C606[0000]05 mov byte [dismach],5 ;CR4 is new to the 586 3542 dop52a: 0 0000BAA2 813E[E600][2200] cmp word [index],SPARSE_BASE+22h 0 0000BAA8 7528 jne dop55 ;if not MOV CRx,xx 0 0000BAAA 3C01 cmp al,1 0 0000BAAC 7524 jne dop55 ;if not CR1 3547 0 0000BAAE E99902 disbad4:jmp disbad ;can't MOV CR1,xx 3549 3550 ; DRx (OP_DR). 3551 3552 dop_dr: 0 0000BAB1 E8EE02 call getregmem_r 0 0000BAB4 BB4452 mov bx,'DR' 0 0000BAB7 B9FFFF mov cx,-1 ;no max or illegal value 0 0000BABA EB16 jmp s dop55 3557 3558 ; TRx (OP_TR). 3559 3560 dop_tr: 0 0000BABC E8E302 call getregmem_r 0 0000BABF 3C03 cmp al,3 0 0000BAC1 7303E98402 jb disbad ;if too small 0 0000BAC6 3C06 cmp al,6 0 0000BAC8 7305 jae dop54a ;if TR6-7 0 0000BACA C606[0000]04 mov byte [dismach],4 ;TR3-5 are new to the 486 3567 dop54a: 0 0000BACF BB5452 mov bx,'TR' 3569 3570 dop55: 0 0000BAD2 93 xchg ax, bx 0 0000BAD3 E88703 call dis_stosw_lowercase; store XX 0 0000BAD6 93 xchg ax, bx 0 0000BAD7 0C30 or al, '0' 0 0000BAD9 AA stosb 0 0000BADA C3 retn 3577 3578 ; Segment register (OP_SEGREG). 3579 3580 dop_segreg: 0 0000BADB E8C402 call getregmem_r 0 0000BADE 3C06 cmp al,6 0 0000BAE0 7203E96502 jae disbad ; if not a segment register --> 0 0000BAE5 F606[0000]80 testopt [asm_options], disasm_nec 0 0000BAEA 7504 jnz .nec ; allow mov from or to any segreg 0 0000BAEC 3C02 cmp al,2 0 0000BAEE 7505 jne @F ; if not SS --> 3588 .nec: 0 0000BAF0 800E[FA00]40 or byte [disflags], DIS_I_MOV_SS ; note this 3590 @@: 0 0000BAF5 3C04 cmp al,4 0 0000BAF7 7205 jb dop57a ;if not FS or GS 0 0000BAF9 C606[0000]03 mov byte [dismach],3;(no new 486-686 instructions involve seg regs) 3594 dop57a: 0 0000BAFE 0410 add al,16 0 0000BB00 E942FC jmp dop35 ;go print it out 3597 3598 ; Sign-extended immediate byte (OP_IMMS8). "push xx" 3599 3600 dop_imms8: 0 0000BB03 E83A04 call disgetbyte 0 0000BB06 3C00 cmp al,0 0 0000BB08 93 xchg ax,bx ;mov bl,al 0 0000BB09 B02B mov al,'+' 0 0000BB0B 7D04 jge dop58a ;if >= 0 0 0000BB0D F6DB neg bl 0 0000BB0F B02D mov al,'-' 3608 dop58a: 0 0000BB11 AA stosb 0 0000BB12 93 xchg ax,bx ;mov al,bl 0 0000BB13 EB03 jmp s dop59a ;call hexbyte and return 3612 3613 3614 ; Immediate byte (OP_IMM8). 3615 3616 dop_imm8: 0 0000BB15 E82804 call disgetbyte 3618 dop59a: 0 0000BB18 E9[0000] jmp hexbyte ;call hexbyte and return 3620 3621 3622 dop_imm8_int: 0 0000BB1B E82204 call disgetbyte 0 0000BB1E 3C03 cmp al, 3 3625 @@: 0 0000BB20 75F6 jne dop59a 0 0000BB22 50 push ax 0 0000BB23 E85803 call showsize.byte 0 0000BB26 58 pop ax 0 0000BB27 EBEF jmp dop59a 3631 3632 dop_imm8_shiftrot: 0 0000BB29 E81404 call disgetbyte 0 0000BB2C 3C01 cmp al, 1 0 0000BB2E EBF0 jmp @B 3636 3637 dop_imm8_optional: 0 0000BB30 E80D04 call disgetbyte 0 0000BB33 3C0A cmp al, 10 0 0000BB35 75E1 jne dop59a 0 0000BB37 58 pop ax 0 0000BB38 E9E6F1 jmp da_op_end 3643 3644 3645 ; Show MMx reg (OP_MMX; previously was "Show ECX if 32-bit LOOPxx"). 3646 dop_mmx: 0 0000BB3B BB4D4D mov bx, "MM" 0 0000BB3E E86102 call getregmem_r 3649 dop55_j: 0 0000BB41 EB8F jmp short dop55 3651 3652 ; MMX register (in ModR/M part) 3653 dop_mmx_mod: 0 0000BB43 BB4D4D mov bx, "MM" 0 0000BB46 E86302 call getregmem 0 0000BB49 3CC0 cmp al, 0C0h 0 0000BB4B 7303E9FA01 jb disbad ; needs to be encoded as register --> 0 0000BB50 2407 and al, 7 0 0000BB52 EBED jmp short dop55_j 3660 3661 3662 dop_x: 0 0000BB54 AC lodsb 0 0000BB55 B400 mov ah, 0 0 0000BB57 93 xchg bx, ax 0 0000BB58 01DB add bx, bx 0 0000BB5A FFA7[7A00] jmp [disjmp_opx + bx] 3668 3669 3670 dop_loop_option: 0 0000BB5E F606[0200]02 testopt [asm_options], disasm_asize_loop_nasm 0 0000BB63 745E jz dop60a_3 0 0000BB65 58 pop ax 3674 %if _LINK 0 0000BB66 BE[0000] mov si, mnlist 3676 wlcalc word_ext_MN_LOOP, equ $ - 2 3677 %else 3678 mov si, mnlist+MN_LOOP 3679 %endif 0 0000BB69 803E[E200]E1 cmp byte [instru], 0E1h 0 0000BB6E 7708 ja @F 3682 %if _LINK 0 0000BB70 BE[0000] mov si, mnlist 3684 wlcalc word_ext_MN_LOOPZ, equ $ - 2 3685 %else 3686 mov si, mnlist+MN_LOOPZ 3687 %endif 0 0000BB73 7403 je @F 3689 %if _LINK 0 0000BB75 BE[0000] mov si, mnlist 3691 wlcalc word_ext_MN_LOOPNZ, equ $ - 2 3692 %else 3693 mov si, mnlist+MN_LOOPNZ 3694 %endif 3695 @@: 3696 %if _LINK 0 0000BB78 B8[0E00] mov ax, fake_oplist.op_loop_nasm 3698 wlcalc word_minusext_oplists, equ $ - 2 3699 %else 3700 mov ax, fake_oplist.op_loop_nasm - oplists 3701 %endif 0 0000BB7B 50 push ax 0 0000BB7C E9EDF0 jmp da13a 3704 3705 3706 dop_mod_force_3: 3707 ; This is used for mov to/from CRx, DRx, TRx. 3708 ; Reference: https://stackoverflow.com/questions/79870726/does-move-to-from-control-debug-registers-ignore-the-mod-field 0 0000BB7F E82A02 call getregmem ; get our ModR/M 0 0000BB82 800E[0000]C0 or byte [regmem], 0C0h ; force it to look like a register (Mod = 3) 0 0000BB87 EB3A jmp dop60a_3 3712 3713 3714 dop_modalways_if_reg: 0 0000BB89 F606[0200]04 testopt [asm_options], disasm_modrm_always 0 0000BB8E 7433 jz dop_no_mod 3717 %if 0 3718 call getregmem ; get our ModR/M 3719 cmp al, 0C0h ; is it a register? 3720 jb dop_no_mod ; no --> 3721 mov ah, al 3722 and ax, 00_111_000_00_000_111b 3723 shr ah, 1 3724 shr ah, 1 3725 shr ah, 1 3726 cmp al, ah 3727 je dop_no_mod 3728 jmp dop_mod 3729 %else 0 0000BB90 EB07 jmp dop_mod_if_reg 3731 %endif 3732 3733 ; Used for inc and dec, that could be encoded using 3734 ; the single byte forms. 3735 dop_mod_if_reg_1632: 0 0000BB92 F606[E200]01 test byte [instru], 1 ; byte size ? 0 0000BB97 742A jz dop_no_mod ; yes, no MODRM keyword --> 3738 ; fall through 3739 3740 ; Used for push, pop, and insts with r,r that we would 3741 ; encode in the opposite order. Also used for mov r,imm 3742 ; when the r is encoded using ModR/M rather than the 3743 ; available one-byte non-ModR/M opcodes. 3744 dop_mod_if_reg: 0 0000BB99 E81002 call getregmem ; get our ModR/M 0 0000BB9C 3CC0 cmp al, 0C0h ; is it a register? 0 0000BB9E 7223 jb dop_no_mod ; no --> 3748 3749 dop_mod: 0 0000BBA0 F606[0200]01 testopt [asm_options], disasm_hide_modrm 0 0000BBA5 751C jnz dop_no_mod 3752 %if 1 0 0000BBA7 D006[E500] rol byte [moddone], 1 ; already displayed ? 0 0000BBAB 7216 jc dop_no_mod ; yes --> 0 0000BBAD F616[E500] not byte [moddone] ; indicate we displayed it 3756 %endif 0 0000BBB1 B84D4F mov ax, "MO" 0 0000BBB4 E8A602 call dis_stosw_lowercase 0 0000BBB7 B84452 mov ax, "DR" 0 0000BBBA E8A002 call dis_stosw_lowercase 0 0000BBBD B84D20 mov ax, "M " 0 0000BBC0 E89A02 call dis_stosw_lowercase 3763 dop_no_mod: 3764 dop60a_3: 0 0000BBC3 E91101 jmp dop60a 3766 3767 ; Used for disp-only memory access with acc operand, 3768 ; which could use the single-byte form (no ModR/M). 3769 dop_mod_if_memoffs_and_other_acc: 0 0000BBC6 E8E301 call getregmem ; get our ModR/M 0 0000BBC9 A838 test al, 111b << 3 ; al/ax/eax ? 0 0000BBCB 75F6 jnz dop_no_mod ; no --> 0 0000BBCD 3C40 cmp al, 40h ; is it a register or mem with displacement ? 0 0000BBCF 73F2 jae dop_no_mod ; yes --> 0 0000BBD1 2407 and al, 7 0 0000BBD3 F606[E000]20 test byte [presizeflags], PRE32A 0 0000BBD8 7506 jnz .a32 3778 .a16: 0 0000BBDA 3C06 cmp al, 6 ; [disp16] without address registers ? 3780 dop_mod_if_ZR: equ $ 0 0000BBDC 75E5 jne dop_no_mod ; no --> 0 0000BBDE EBC0 jmp dop_mod ; yes --> 3783 3784 .a32: 0 0000BBE0 3C05 cmp al, 5 ; trivial [disp32] ? 0 0000BBE2 74F8 je dop_mod_if_ZR 0 0000BBE4 3C04 cmp al, 4 ; SIB byte present ? 0 0000BBE6 75F4 jne dop_mod_if_ZR 0 0000BBE8 E87CF9 call getsibbyte 0 0000BBEB 243F and al, ~0C0h ; mask off the scale 0 0000BBED 3C25 cmp al, 100_101b ; index=4 base=5 special case [disp32] ? 0 0000BBEF EBEB jmp dop_mod_if_ZR 3793 3794 ; Used for xchg, which could use the single-byte xchg 3795 ; with ax or eax forms. 3796 dop_mod_if_other_acc_1632: 0 0000BBF1 F606[E200]01 test byte [instru], 1 ; byte size ? 0 0000BBF6 74CB jz dop_no_mod ; yes, no MODRM keyword --> 0 0000BBF8 E8B101 call getregmem ; get our ModR/M 0 0000BBFB 3CC0 cmp al, 0C0h ; this a memory operand ? 0 0000BBFD 72C4 jb dop_no_mod ; yes, do not show MODRM --> 0 0000BBFF A838 test al, 111b << 3 ; al/ax/eax ? 0 0000BC01 EBD9 jmp dop_mod_if_ZR 3804 3805 ; Used for xchg, which could use the single-byte xchg 3806 ; with ax or eax forms. 3807 dop_mod_if_reg_acc_1632: 0 0000BC03 F606[E200]01 test byte [instru], 1 ; byte size ? 0 0000BC08 74B9 jz dop_no_mod ; yes, no MODRM keyword --> 3810 ; fall through 3811 3812 ; Used for ALU insts that could be the acc shortform. 3813 dop_mod_if_reg_acc: 0 0000BC0A E89F01 call getregmem ; get our ModR/M 0 0000BC0D 24C7 and al, 0C7h ; isolate mod and r/m 0 0000BC0F 3CC0 cmp al, 0C0h ; mod=11b and r/m=000b ? 0 0000BC11 EBC9 jmp dop_mod_if_ZR 3818 3819 3820 %if _MEMREF_AMOUNT 3821 dop_stack_push: 0 0000BC13 B80200 mov ax, 2 3823 .special: 3824 %if _DISASM_32BIT 0 0000BC16 F606[E000]10 test byte [presizeflags], PRE32D 3826 .iso16_if_ZR: 0 0000BC1B 7402 jz .iso16 0 0000BC1D 01C0 add ax, ax 3829 %endif 3830 .iso16: 0 0000BC1F E864FD call get_free_memref ; memrefs + bx -> the memref structure 3832 0 0000BC22 8987[9C00] mov word [memrefs + bx + mrLength], ax 0 0000BC26 8B0E[0200] mov cx, word [reg_esp + 2] 0 0000BC2A 8B16[0000] mov dx, word [reg_esp] 0 0000BC2E 29C2 sub dx, ax 0 0000BC30 83D900 sbb cx, 0 3838 0 0000BC33 8997[9400] mov word [memrefs + bx + mrOffset], dx 3840 0 0000BC37 B20A mov dl, mrfMemDest | mrfMem 3842 0 0000BC39 EB21 jmp dop_stack_common 3844 3845 %if _PM && _DISASM_32BIT 3846 .special_int: 3847 call ispm 3848 jnz .iso16 3849 cmp byte [dpmi32], 0 3850 jmp .iso16_if_ZR 3851 %else 3852 .special_int: equ .iso16 3853 %endif 3854 3855 dop_stack_pop: 0 0000BC3B B80200 mov ax, 2 3857 .special: 0 0000BC3E 8B0E[0200] mov cx, word [reg_esp + 2] 0 0000BC42 8B16[0000] mov dx, word [reg_esp] 3860 .leave: 3861 %if _DISASM_32BIT 0 0000BC46 F606[E000]10 test byte [presizeflags], PRE32D 0 0000BC4B 7402 jz .iso16 0 0000BC4D 01C0 add ax, ax 3865 .iso16: 3866 %endif 0 0000BC4F E834FD call get_free_memref ; memrefs + bx -> the memref structure 3868 0 0000BC52 8987[9C00] mov word [memrefs + bx + mrLength], ax 3870 0 0000BC56 8997[9400] mov word [memrefs + bx + mrOffset], dx 3872 0 0000BC5A B206 mov dl, mrfMemSource | mrfMem 3874 3875 dop_stack_common: 0 0000BC5C A1[0000] mov ax, word [reg_ss] ; get ss selector into ax 0 0000BC5F 8987[9800] mov word [memrefs + bx + mrSegmentSelector], ax 3878 3879 %if _DISASM_32BIT 3880 _386_PM xchg ax, bx ; selector in bx 3881 _386_PM call test_d_b_bit ; check whether a 32-bit ss 3882 _386_PM xchg ax, bx 3883 _386_PM jz .isstack16 3884 _386_PM or dl, mrfA32 3885 _386_PM mov word [memrefs + bx + mrOffset + 2], cx 3886 .isstack16: 3887 %endif 3888 0 0000BC63 0897[9A00] or byte [memrefs + bx + mrFlags], dl 0 0000BC67 E83DFD call calc_linear_memref_and_mark_nonfree 0 0000BC6A EB5B jmp dop_continue_maybe_end 3892 3893 3894 dop_stack_special: 0 0000BC6C A1[E600] mov ax, [index] 0 0000BC6F 3D[0300] cmp ax, GROUP7 + 3 ; call far [mem] ? 0 0000BC72 7414 je .callfar 0 0000BC74 84E4 test ah, ah 0 0000BC76 754C jnz .error 0 0000BC78 57 push di 0 0000BC79 BF[8C01] mov di, .bytes ; list of opcodes 0 0000BC7C B90B00 mov cx, .bytes_amount 0 0000BC7F F2AE repne scasb 0 0000BC81 8A450A mov al, [di + .bytes_amount - 1] 0 0000BC84 5F pop di 0 0000BC85 753D jne .error ; if not one of these --> 3907 0 0000BC87 A9 db __TEST_IMM16 ; (skip mov) 3909 .callfar: 0 0000BC88 B044 mov al, 40h + 4 3911 3912 .haveinfo: 0 0000BC8A 89C3 mov bx, ax 0 0000BC8C 83E01F and ax, 1Fh 0 0000BC8F 80FB80 cmp bl, 80h 0 0000BC92 73AA jae dop_stack_pop.special 0 0000BC94 80FB40 cmp bl, 40h 0 0000BC97 7203E97AFF jae dop_stack_push.special 0 0000BC9C 80FB20 cmp bl, 20h 0 0000BC9F 7203E97BFF jae dop_stack_push.special_int 0 0000BCA4 84C0 test al, al 0 0000BCA6 740F jz .leave 0 0000BCA8 3C01 cmp al, 1 0 0000BCAA 7518 jne .error 3925 .into: 0 0000BCAC F606[0100]08 testopt [reg_efl], 800h 0 0000BCB1 7414 jz .none 0 0000BCB3 B026 mov al, 20h + 6 0 0000BCB5 EBD3 jmp .haveinfo 3930 3931 .leave: 0 0000BCB7 B80200 mov ax, 2 ; pop size = 1 word or 1 dword 0 0000BCBA 8B0E[0200] mov cx, word [reg_ebp + 2] 0 0000BCBE 8B16[0000] mov dx, word [reg_ebp] ; pop from address in (e)bp, not (e)sp 0 0000BCC2 EB82 jmp dop_stack_pop.leave 3936 3937 .error: 0 0000BCC4 E918F0 jmp da_internal_error 3939 3940 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 3940 ------------------ note: usesection lDEBUG_DATA_ENTRY 3941 3942 .bytes: 0 00005B9C CDCE db 0CDh, 0CEh ; int, into 0 00005B9E CCF1 db 0CCh, 0F1h ; int3, int1 0 00005BA0 9A db 9Ah ; call far imm:imm 0 00005BA1 CFCACB db 0CFh, 0CAh, 0CBh ; iret, retf imm, retf 0 00005BA4 60 db 60h ; pusha 0 00005BA5 61 db 61h ; popa 0 00005BA6 C9 db 0C9h ; leave 3950 .bytes_amount: equ $ - .bytes 3951 3952 ; In this table the bits have the following meaning: 3953 ; 3954 ; flag 80h: special pop 3955 ; flag 40h: special push 3956 ; flag 20h: special push for int 3957 ; if neither flag set: unusual, for leave and into 3958 ; else: masked with 1Fh gives amount of bytes to push/pop 3959 ; in o16, which needs to be doubled to get the amount 3960 ; to push/pop in o32 instead. 3961 .info: 0 00005BA7 26 db 20h + 6 ; int 0 00005BA8 01 db 1 ; into 0 00005BA9 26 db 20h + 6 ; int3 0 00005BAA 26 db 20h + 6 ; int1 0 00005BAB 44 db 40h + 4 ; call far imm:imm 0 00005BAC 86 db 80h + 6 ; iret 0 00005BAD 84 db 80h + 4 ; retf imm 0 00005BAE 84 db 80h + 4 ; retf 0 00005BAF 50 db 40h + 16 ; pusha 0 00005BB0 90 db 80h + 16 ; popa 0 00005BB1 00 db 0 ; leave 3973 3974 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 3974 ------------------ note: usesection lDEBUG_CODE 3975 3976 .none: 3977 %else 3978 dop_stack_push: 3979 dop_stack_pop: 3980 dop_stack_special: 3981 %endif 3982 dop_continue_maybe_end: 0 0000BCC7 58 pop ax ; discard return address 0 0000BCC8 E9AEEF jmp da14_check_end ; next --> 3985 3986 3987 dop_m_always_16: 0 0000BCCB 800E[FB00]41 setopt [disflags], DIS_I_M_ALWAYS_16 | DIS_I_NOSIZ 0 0000BCD0 EBF5 jmp dop_continue_maybe_end 3990 3991 3992 ; Set flag to always show size (OP_SHOSIZ). 3993 dop_shosiz: 0 0000BCD2 800E[FA00]10 or byte [disflags],DIS_I_SHOWSIZ 3995 dop60a: 0 0000BCD7 58 pop ax ; discard return address 0 0000BCD8 E9A6EF jmp da14 ; next... 3998 3999 dop_far_m: 0 0000BCDB 800E[FB00]02 setopt [disflags], DIS_I_FAR_M 0 0000BCE0 EBF5 jmp dop60a 4002 4003 dop_double_m: 0 0000BCE2 800E[FB00]04 setopt [disflags], DIS_I_DOUBLE_M 0 0000BCE7 EBEE jmp dop60a 4006 4007 4008 %if _MEMREF_AMOUNT 4009 dop_m_src: 0 0000BCE9 800E[FB00]10 setopt [disflags], DIS_I_M_SRC 0 0000BCEE EBE7 jmp dop60a 4012 4013 dop_m_src_dst: 0 0000BCF0 800E[FB00]10 setopt [disflags], DIS_I_M_SRC 4015 dop_m_dst: 0 0000BCF5 800E[FB00]20 setopt [disflags], DIS_I_M_DST 0 0000BCFA EBDB jmp dop60a 4018 %else 4019 dop_m_src: equ dop60a 4020 dop_m_src_dst: equ dop60a 4021 dop_m_dst: equ dop60a 4022 %endif 4023 4024 4025 dop_short: 0 0000BCFC F606[0000]10 testopt [asm_options], disasm_show_short 0 0000BD01 74D4 jz dop60a 0 0000BD03 B85348 mov ax, "SH" 0 0000BD06 E85401 call dis_stosw_lowercase 0 0000BD09 B84F52 mov ax, "OR" 0 0000BD0C E84E01 call dis_stosw_lowercase 0 0000BD0F B85420 mov ax, "T " 0 0000BD12 E84801 call dis_stosw_lowercase 4034 dop60a_1: 0 0000BD15 EBC0 jmp dop60a 4036 4037 dop_near: 0 0000BD17 F606[0000]20 testopt [asm_options], disasm_show_near 0 0000BD1C 74F7 jz dop60a_1 0 0000BD1E E81700 call dop_show_near 4041 dop60a_2: 0 0000BD21 EBF2 jmp dop60a_1 4043 4044 dop_far: 0 0000BD23 F606[0000]40 testopt [asm_options], disasm_show_far 0 0000BD28 74F7 jz dop60a_2 4047 dop_far_required: 0 0000BD2A B84641 mov ax, "FA" ; store "FAR " 0 0000BD2D E82D01 call dis_stosw_lowercase 0 0000BD30 B85220 mov ax, "R " 0 0000BD33 E82701 call dis_stosw_lowercase 0 0000BD36 EBE9 jmp dop60a_2 4053 4054 dop_show_near: 0 0000BD38 50 push ax 0 0000BD39 B84E45 mov ax, "NE" 0 0000BD3C E81E01 call dis_stosw_lowercase 0 0000BD3F B84152 mov ax, "AR" 0 0000BD42 E81801 call dis_stosw_lowercase 0 0000BD45 B020 mov al, " " 0 0000BD47 AA stosb 0 0000BD48 58 pop ax 0 0000BD49 C3 retn 4064 4065 4066 disbad: 0 0000BD4A 8B26[F800] mov sp,[savesp2] ;pop junk off stack 0 0000BD4E B8[B701] mov ax, da13 0 0000BD51 50 push ax 4070 _386_PM_o32 ; xor eax, eax 0 0000BD52 31C0 xor ax, ax 4072 _386_PM_o32 ; mov dword [dis_n], eax 0 0000BD54 A3[DC00] mov word [dis_n], ax 0 0000BD57 A3[E000] mov word [preflags], ax ; clear preflags and preused 4075 %if _COND 0 0000BD5A A3[0401] mov word [condmsg], ax ; initialize conditions message 4077 %endif 0 0000BD5D C606[F200]80 mov byte [rmsize], 80h ; don't display any memory 0 0000BD62 A3[0000] mov word [dismach], ax ; forget about the machine type 0 0000BD65 8026[FA00]FB and byte [disflags],~DIS_I_SHOW ;and flags 0 0000BD6A E8D301 call disgetbyte 0 0000BD6D BF[3601] mov di,prefixlist 0 0000BD70 B90C00 mov cx,N_PREFIX 0 0000BD73 F2AE repne scasb 0 0000BD75 740B je .namedprefix ;if it's a named prefix 4086 _386_PM_o32 ; dec dword [dis_n] 0 0000BD77 FF0E[DC00] dec word [dis_n] 0 0000BD7B BB[0000] mov bx,MN_DB ;offset of 'DB' mnemonic 4089 %if _LINK 0 0000BD7E BE[0000] mov si, fake_oplist.op_imm8 4091 wlcalc word_minusext_oplists, equ $ - 2 4092 %else 4093 mov si, fake_oplist.op_imm8 - oplists 4094 %endif 0 0000BD81 C3 retn 4096 4097 .namedprefix: 0 0000BD82 800E[FA00]08 or byte [disflags],DIS_I_UNUSED ;print special flag 0 0000BD87 BB0B00 mov bx,N_PREFIX - 1 0 0000BD8A 29CB sub bx,cx 0 0000BD8C D1E3 shl bx,1 0 0000BD8E 83FB0C cmp bx, byte (prefixlist.after_segment - prefixlist) *2 0 0000BD91 7207 jb .segprefix ; if SEG directive --> 4104 %if _PM 4105 cmp bx, byte (prefixlist.size - prefixlist) *2 4106 jb .non16prefix ; if not OSIZE or ASIZE --> 4107 test byte [bCSAttr], 40h; 32-bit code segment ? 4108 jz .non16prefix ; no, O32 or A32 --> 4109 add bx, byte 4 ; yes, change to O16 or A16 4110 .non16prefix: 4111 %endif 0 0000BD93 8B9F[3601] mov bx,[prefixmnem+bx-(prefixlist.after_segment - prefixlist) *2] 0 0000BD97 31F6 xor si, si ; no operand (empty oplist) 0 0000BD99 C3 retn 4115 4116 .segprefix: 4117 %if _LINK 0 0000BD9A 8DB7[0200] lea si, [word bx + fake_oplist.op_segments] 4119 wlcalc word_minusext_oplists, equ $ - 2 4120 %else 4121 lea si, [bx + fake_oplist.op_segments - oplists] 4122 %endif 4123 4124 ; -> fake OPLIST for segments 0 0000BD9E BB[0000] mov bx,MN_SEG 0 0000BDA1 C3 retn 4127 4128 4129 usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 4129 ------------------ note: usesection ASMTABLE1 4130 fake_oplist: 4131 .op_imm8: 0 00007852 1200 db OP_IMM8, 0 4133 .op_segments: 0 00007854 3000 db OP_ES, 0 0 00007856 2E00 db OP_CS, 0 0 00007858 3300 db OP_SS, 0 0 0000785A 2F00 db OP_DS, 0 4138 %ifdef MN_GS 0 0000785C 3100 db OP_FS, 0 0 0000785E 3200 db OP_GS, 0 4141 %endif 4142 .op_loop_nasm: 0 00007860 1B082800 db OP_SHORT, OP_REL8, OP_E_CX, 0 4144 4145 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 4145 ------------------ note: usesection lDEBUG_CODE 4146 4147 4148 ; GETREGMEM_R - Get the reg part of the reg/mem part of the instruction 4149 ; Uses CL 4150 4151 getregmem_r: 0 0000BDA2 E80700 call getregmem 4153 4154 ; INP: al = bits 3 to 5 has value to extract 4155 ; OUT: al = (INP:al >> 3) & 7 4156 ; CHG: cl 4157 da_get_bits_3_to_5: 0 0000BDA5 B103 mov cl,3 0 0000BDA7 D2E8 shr al,cl 0 0000BDA9 2407 and al,7 0 0000BDAB C3 ret 4162 4163 ; GETREGMEM - Get the reg/mem part of the instruction 4164 4165 getregmem: 0 0000BDAC F606[E100]80 test byte [preused],GOTREGM 0 0000BDB1 750B jnz grm1 ;if we have it already 0 0000BDB3 800E[E100]80 or byte [preused],GOTREGM 0 0000BDB8 E88501 call disgetbyte ;get the byte 0 0000BDBB A2[0000] mov [regmem],al ;save it away 4171 0 0000BDBE A0[0000] grm1: mov al,[regmem] 0 0000BDC1 C3 ret 4174 4175 dis_lowercase_w: 0 0000BDC2 86C4 xchg al, ah 0 0000BDC4 E80200 call dis_lowercase 0 0000BDC7 86C4 xchg al, ah 4179 dis_lowercase: 0 0000BDC9 3C41 cmp al, 'A' 0 0000BDCB 720D jb .not 0 0000BDCD 3C5A cmp al, 'Z' 0 0000BDCF 7709 ja .not 0 0000BDD1 F606[0000]01 testopt [asm_options], disasm_lowercase 0 0000BDD6 7402 jz .not 0 0000BDD8 0C20 or al, 20h 4187 .not: 0 0000BDDA C3 retn 4189 4190 4191 dis_lowercase_refmem_w: 0 0000BDDB 86C4 xchg al, ah 0 0000BDDD E80200 call dis_lowercase_refmem 0 0000BDE0 86C4 xchg al, ah 4195 dis_lowercase_refmem: 0 0000BDE2 3C41 cmp al, 'A' 0 0000BDE4 720D jb .not 0 0000BDE6 3C5A cmp al, 'Z' 0 0000BDE8 7709 ja .not 0 0000BDEA F606[0000]08 testopt [asm_options], disasm_lowercase_refmem 0 0000BDEF 7402 jz .not 0 0000BDF1 0C20 or al, 20h 4203 .not: 0 0000BDF3 C3 retn 4205 4206 4207 ; Show the opcode mnemonic 4208 ; 4209 ; INP: si-> Opcode mnemonic string of an mnlist entry. 4210 ; w[si-2] & 0Fh = Length of that string. 4211 ; OUT: di-> next available byte in output line 4212 ; (>= line_out + 32 due to padding) 4213 ; CHG: ax, cx, si 4214 showop: 4215 %if _40COLUMNS 0 0000BDF4 BF[0000] mov di, line_out 0 0000BDF7 033E[D800] add di, word [mnemonofs] 4218 %else 4219 mov di, line_out+MNEMONOFS 4220 %endif 0 0000BDFB 56 push si 4222 0 0000BDFC 8B4CFE mov cx, [si-2] 0 0000BDFF 83E10F and cx, 0Fh 4225 .loop: 0 0000BE02 AC lodsb 0 0000BE03 E8C3FF call dis_lowercase 0 0000BE06 AA stosb 0 0000BE07 E2F9 loop .loop 4230 0 0000BE09 58 pop ax ; ax-> mnemonic 0 0000BE0A 3D[0000] cmp ax, mnlist_a_suffix_allowed ; non-suffixed mnemonic ? 0 0000BE0D 7227 jb .nosuffix ; yes --> 0 0000BE0F 3D[0000] cmp ax, mnlist_o_suffix_allowed ; optional address size suffix ? 0 0000BE12 7208 jb .a_suffix_allowed ; yes --> 0 0000BE14 3D[0000] cmp ax, mnlist_o_suffix_required; optional operand size suffix ? 0 0000BE17 B410 mov ah, PREOSIZE ; (OSIZE: check OSIZE/O32) 0 0000BE19 7309 jae .suffix_decide ; no, it's required --> 0 0000BE1B A9 db __TEST_IMM16 ; (skip mov) 4240 .a_suffix_allowed: 0 0000BE1C B420 mov ah, PREASIZE ; optional ASIZE: check ASIZE/A32 4242 4243 .suffix_decide_optional: ; check whether the suffix is necessary 0 0000BE1E 8426[E000] test byte [preflags], ah ; check if such a prefix occured (ZR if not) 0 0000BE22 740E jz .suffix_invisible ; no, is default form --> (hide suffix) 4246 4247 .suffix_decide: ; suffix will be displayed, now only decide which 0 0000BE24 B057 mov al, 'W' 0 0000BE26 8426[E000] test byte [presizeflags], ah ; 32-bit form ? 0 0000BE2A 7402 jz .got_suffix ; no --> 0 0000BE2C B044 mov al, 'D' 4252 .got_suffix: 0 0000BE2E E898FF call dis_lowercase 0 0000BE31 AA stosb ; store suffix 4255 4256 .suffix_invisible: ; notional suffix either displayed or left hidden, 0 0000BE32 0826[E100] or byte [preused], ah ; in any case, mark opcode prefix as used 4258 4259 .nosuffix: 4260 4261 ; Store blanks to pad to 8 characters, but at least one 4262 %if _40COLUMNS 0 0000BE36 BE[0800] mov si, line_out + 8 0 0000BE39 0336[D800] add si, word [mnemonofs] 4265 %endif 0 0000BE3D B020 mov al, 32 4267 4268 %if _40COLUMNS 0 0000BE3F F606[0100]02 testopt [asm_options], disasm_no_indent 0 0000BE44 7506 jnz @F 4271 %endif 4272 .pad: 0 0000BE46 AA stosb ; store a blank 4274 %if _40COLUMNS 0 0000BE47 39F7 cmp di, si ; past 8 columns already ? 4276 %else 4277 cmp di, line_out+MNEMONOFS+8 4278 %endif 0 0000BE49 72FB jb .pad ; not yet, loop --> 4280 0 0000BE4B C3 retn 4282 4283 %if _40COLUMNS 4284 @@: 0 0000BE4C AA stosb ; store a single blank 0 0000BE4D C3 retn 4287 %endif 4288 4289 4290 ; INP: byte [segmnt] = number of segment register 4291 ; [segrgnam] = uppercase segment register names 4292 ; CHG: bx, ax 4293 ; OUT: ax = uppercase segment register name 4294 showseg_uppercase_ax: 0 0000BE4E A0[F300] mov al,[segmnt] ;segment number 0 0000BE51 98 cbw 0 0000BE52 D1E0 shl ax,1 0 0000BE54 93 xchg ax,bx ;mov bx,ax 0 0000BE55 8B87[0000] mov ax,[segrgnam+bx] ;get register name 0 0000BE59 C3 retn 4301 4302 ; SHOWSEG - Show the segment descriptor in SEGMNT 4303 ; Entry DI Where to put it 4304 ; Exit DI Updated 4305 ; Uses AX, BX 4306 4307 showseg: 0 0000BE5A E8F1FF call showseg_uppercase_ax 4309 dis_stosw_lowercase: 0 0000BE5D E862FF call dis_lowercase_w 0 0000BE60 AB stosw 0 0000BE61 C3 retn 4313 4314 4315 ; Write a size specifier to the buffer 4316 ; and set some flags 4317 ; INP: ah = r/m size value, 4318 ; F0h byte (less than zero) 4319 ; 00h word (equal to zero) 4320 ; 10h dword (greater than zero, but != 20h) 4321 ; 20h qword (greater than zero, == 20h) 4322 ; di-> buffer 4323 ; OUT: di-> behind size specifier in buffer 4324 ; by[rmsize] set 4325 ; wo[sizeloc]-> size specifier in buffer 4326 ; CHG: ax 4327 ; 4328 ; Size specifiers are BYTE, WORD, DWORD, and QWORD. One 4329 ; blank is appended to the size specifier. 4330 ; 4331 ; Size specifiers are lowercased if that option is selected. 4332 showsize_ch_flag_ZR: 0 0000BE62 753C jnz showsize.retn 0 0000BE64 800E[FA00]10 or byte [disflags], DIS_I_SHOWSIZ 0 0000BE69 91 xchg ax, cx 4336 showsize: 0 0000BE6A 8826[F200] mov [rmsize], ah ; save r/m size 0 0000BE6E 893E[FE00] mov [sizeloc], di ; save where we're putting this 0 0000BE72 B051 mov al, 'Q' 0 0000BE74 80FC20 cmp ah, 20h ; QWORD ? 0 0000BE77 7412 je .qword ; yes --> 0 0000BE79 80FC00 cmp ah, 0 0 0000BE7C 7D09 jge .notbyte ; if word or dword --> 4344 .byte: 0 0000BE7E B85445 mov ax, "TE" 0 0000BE81 50 push ax 0 0000BE82 B84259 mov ax, "BY" 0 0000BE85 EB0F jmp s .common 4349 4350 .notbyte: 0 0000BE87 7406 je .word ; if word 4352 .dword: 0 0000BE89 B044 mov al, 'D' 4354 .qword: 0 0000BE8B E83BFF call dis_lowercase 0 0000BE8E AA stosb 4357 .word: 0 0000BE8F B85244 mov ax, "RD" 0 0000BE92 50 push ax 0 0000BE93 B8574F mov ax, "WO" 4361 .common: 0 0000BE96 E8C4FF call dis_stosw_lowercase 0 0000BE99 58 pop ax 0 0000BE9A E8C0FF call dis_stosw_lowercase 0 0000BE9D B020 mov al, 32 0 0000BE9F AA stosb 4367 .retn: 4368 showptr.ret: 0 0000BEA0 C3 retn 4370 4371 ; Write "PTR " to a buffer if NASM syntax is not selected. 4372 ; INP: di-> buffer 4373 ; OUT: di-> behind written string "PTR " (or unchanged) 4374 ; CHG: ax 4375 ; 4376 ; The string is lowercased if that option is selected. 4377 showptr: 0 0000BEA1 F606[0000]04 testopt [asm_options], disasm_nasm 0 0000BEA6 75F8 jnz .ret 0 0000BEA8 B85054 mov ax, "PT" 0 0000BEAB E8AFFF call dis_stosw_lowercase 0 0000BEAE B85220 mov ax, "R " 0 0000BEB1 EBAA jmp s dis_stosw_lowercase 4384 4385 ; Write "DWORD " to a buffer 4386 ; INP: di-> buffer 4387 ; OUT: di-> behind written string "DWORD " 4388 ; CHG: ax 4389 ; 4390 ; The string is lowercased if that option is selected. 4391 showdword: equ showsize.dword 4392 showword: equ showsize.word 4393 4394 ; DISP32 - Print 32-bit displacement for addressing modes. 4395 ; Entry None 4396 ; Exit None 4397 ; Uses AX 4398 4399 disp32: 0 0000BEB3 E8A000 call disgetword 4401 .ax: 0 0000BEB6 50 push ax 0 0000BEB7 E89C00 call disgetword 4404 ; INP: stack -> low word 4405 ; ax = high word 4406 .stack: 0 0000BEBA E8[0000] call hexword 4408 .low_stack: 0 0000BEBD 58 pop ax 0 0000BEBE E9[0000] jmp hexword 4411 4412 ; SHOWREG16 - Show 16-bit register name. 4413 ; 4414 ; INP: al = register number, 0 to 7 4415 ; di -> buffer 4416 ; OUT: register name stored to buffer 4417 ; ax = INP:al * 2 4418 showreg16: 0 0000BEC1 98 cbw 0 0000BEC2 D1E0 shl ax,1 0 0000BEC4 93 xchg ax,bx 0 0000BEC5 50 push ax 0 0000BEC6 8B87[0000] mov ax,[rgnam16+bx] 0 0000BECA E890FF call dis_stosw_lowercase 0 0000BECD 58 pop ax 0 0000BECE 93 xchg ax,bx 0 0000BECF C3 ret 4428 4429 4430 %if _DISASM_32BIT 4431 ; DISCHK32D - Check for O32 (32-bit operand size). 4432 dischk32d: 0 0000BED0 800E[E100]10 or byte [preused], PREOSIZE 0 0000BED5 F606[E000]10 test byte [presizeflags], PRE32D 0 0000BEDA C3 retn 4436 %endif 4437 4438 4439 ; SHOWMACH - Return string "[needs math coprocessor]", etc. 4440 ; Entry di -> table of 5 words 4441 ; cx = instruction 4442 ; Exit si Address of string 4443 ; cx Length of string, or 0 if not needed 4444 ; Uses al, di 4445 4446 showmach: 4447 %if _LINK_COMPAT 4448 %define FORCEWORD word 4449 %else 4450 %define FORCEWORD 4451 %endif 0 0000BEDB BE[0000] mov si,needsmsg ; candidate message 0 0000BEDE F606[0000]01 test byte [dmflags],DM_COPR 0 0000BEE3 741F jz sm1 ; if not a coprocessor instruction 0 0000BEE5 C684[0000]37 mov byte [FORCEWORD si + needsmsg.digit_6_ofs], '7' 4456 ; change message text 0 0000BEEA A0[0000] mov al,[mach_87] 0 0000BEED 803E[0000]00 cmp byte [has_87],0 0 0000BEF2 751B jnz sm2 ; if it has a coprocessor 0 0000BEF4 A0[0000] mov al,[machine] 0 0000BEF7 3A06[0000] cmp al,[dismach] 0 0000BEFB 7218 jb sm3 ; if we display the message 0 0000BEFD BE[0000] mov si,needsmath ; print this message instead 0 0000BF00 B9[0000] mov cx,needsmath_L 0 0000BF03 C3 retn 4466 4467 sm1: 0 0000BF04 BE[0000] mov si,needsmsg ; candidate message 0 0000BF07 C684[0000]36 mov byte [FORCEWORD si + needsmsg.digit_6_ofs], '6' 4470 ; reset message text 0 0000BF0C A0[0000] mov al,[machine] 4472 sm2: 0 0000BF0F 3A06[0000] cmp al,[dismach] 0 0000BF13 730D jae sm4 ; if no message (so far) 4475 sm3: 0 0000BF15 A0[0000] mov al,[dismach] 0 0000BF18 0430 add al,'0' 0 0000BF1A 8884[0000] mov byte [FORCEWORD si + needsmsg.digit_x_ofs], al 0 0000BF1E B9[0000] mov cx,needsmsg_L ; length of the message 0 0000BF21 C3 retn 4481 4482 ; Check for obsolete instruction. 4483 sm4: 0 0000BF22 BE[0000] mov si, obsolete ; candidate message 0 0000BF25 89C8 mov ax, cx ; get info on this instruction 0 0000BF27 B90500 mov cx, 5 0 0000BF2A F2AF repne scasw 0 0000BF2C 7511 jne sm6 ; if no matches 0 0000BF2E BF[0400] mov di, obsmach + 5 - 1 0 0000BF31 29CF sub di, cx 0 0000BF33 31C9 xor cx, cx ; clear CX: no message 0 0000BF35 A0[0000] mov al, byte [mach_87] 0 0000BF38 3A05 cmp al, byte [di] 0 0000BF3A 7E03 jle sm5 ; if this machine is OK 0 0000BF3C B9[0000] mov cx, obsolete_L 4496 sm5: 0 0000BF3F C3 retn 4498 4499 sm6: equ sm5 4500 4501 4502 ; DISGETBYTE - Get byte for disassembler. 4503 ; Entry None 4504 ; Exit AL Next byte in instruction stream 4505 ; Uses None 4506 4507 disgetbyte: 0 0000BF40 1E push ds 4509 _386_PM_o32 ; push esi 0 0000BF41 56 push si ; save ds, (e)si 4511 _386_PM_o32 ; mov esi, dword [u_addr] 0 0000BF42 8B36[0000] mov si, word [u_addr] 4513 _386_PM_o32 ; add esi, dword [dis_n] 0 0000BF46 0336[DC00] add si, word [dis_n] ; index to the right byte 0 0000BF4A 8E1E[0400] mov ds, word [u_addr + saSegSel] 4516 _386_PM_a32 0 0000BF4E AC lodsb ; get the byte 4518 _386_PM_o32 ; pop esi 0 0000BF4F 5E pop si 0 0000BF50 1F pop ds ; restore regs 4521 _386_PM_o32 ; inc dword [dis_n] 0 0000BF51 FF06[DC00] inc word [dis_n] ; indicate that we've gotten this byte 0 0000BF55 C3 retn 4524 4525 4526 ; DISGETWORD - Get word for disassembler. 4527 ; Entry None 4528 ; Exit AX Next word 4529 ; Uses None 4530 4531 disgetword: 0 0000BF56 1E push ds 4533 _386_PM_o32 ; push esi 0 0000BF57 56 push si ; save ds, (e)si 4535 _386_PM_o32 ; mov esi, dword [u_addr] 0 0000BF58 8B36[0000] mov si, word [u_addr] 4537 _386_PM_o32 ; add esi, dword [dis_n] 0 0000BF5C 0336[DC00] add si, word [dis_n] ; index to the right byte 0 0000BF60 8E1E[0400] mov ds, word [u_addr + saSegSel] 4540 _386_PM_a32 0 0000BF64 AD lodsw ; get the word 4542 _386_PM_o32 ; pop esi 0 0000BF65 5E pop si 0 0000BF66 1F pop ds ; restore regs 4545 _386_PM_o32 ; add dword [dis_n], byte 2 0 0000BF67 8306[DC00]02 add word [dis_n], byte 2 ; indicate that we've gotten this word 0 0000BF6C C3 retn 4548 4549 4550 ; DISSHOWBYTES - Show bytes for the disassembler. 4551 ; Entry BX Number of bytes (must be > 0) 4552 ; di-> output line 4553 ; Exit u_addr updated 4554 ; Uses BX, (E)SI. 4555 4556 disshowbytes: 4557 _386_PM_o32 ; mov esi, dword [u_addr] 0 0000BF6D 8B36[0000] mov si, word [u_addr] 0 0000BF71 8E1E[0400] mov ds, word [u_addr + saSegSel] 4560 .loop: 4561 _386_PM_a32 0 0000BF75 AC lodsb 0 0000BF76 E8[0000] call hexbyte 0 0000BF79 4B dec bx 0 0000BF7A 75F9 jnz .loop 0 0000BF7C 16 push ss 0 0000BF7D 1F pop ds 4568 _386_PM_o32 ; mov dword [u_addr], esi 0 0000BF7E 8936[0000] mov word [u_addr], si 0 0000BF82 C3 retn 4571 4572 ; MOVEOVER - Move the line to the right. 4573 ; Entry DI Last address + 1 of line so far 4574 ; CX Number of bytes to move 4575 ; Exit DI Updated 4576 ; Uses SI 4577 moveover: 0 0000BF83 833E[FE00]00 cmp word [sizeloc], byte 0 0 0000BF88 7404 je mo1 ; if sizeloc not saved 0 0000BF8A 010E[FE00] add word [sizeloc], cx 4581 4582 mo1: 0 0000BF8E 89FE mov si, di 0 0000BF90 01CF add di, cx 0 0000BF92 89F9 mov cx, di 4586 %if _40COLUMNS 0 0000BF94 81E9[0000] sub cx, line_out 0 0000BF98 2B0E[D800] sub cx, word [mnemonofs] 4589 %else 4590 sub cx, line_out+MNEMONOFS 4591 %endif 0 0000BF9C 57 push di 0 0000BF9D FD std ; _AMD_ERRATUM_109_WORKAROUND as below 0 0000BF9E 4E dec si 0 0000BF9F 4F dec di 4596 4597 4598 numdef AMD_ERRATUM_109_WORKAROUND, 1 4599 ; Refer to comment in init.asm init_movp. 4600 4601 %if _AMD_ERRATUM_109_WORKAROUND 0 0000BFA0 E308 jcxz @FF 0 0000BFA2 83F914 cmp cx, 20 0 0000BFA5 7703 ja @FF 4605 @@: 0 0000BFA7 A4 movsb 0 0000BFA8 E2FD loop @B 4608 @@: 4609 %endif 0 0000BFAA F3A4 rep movsb 0 0000BFAC 5F pop di 0 0000BFAD FC cld 0 0000BFAE C3 retn 4614 %endif ; _LOADER 4615 4616 ..@uu_access_end: === Trace listing source: ../lst/debug.obj/vv.lst 1 2 %if 0 3 4 lDebug code and command (V) to flip video screens 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 "vv.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00005BB2 ???????? eldhSignature: resb 4 ; "ELD1" 0 00005BB6 ?????? resb 3 ; reserved 0 00005BB9 ?? resb 1 ; 26 (Ctrl-Z) 0 00005BBA ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00005BBE ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00005BC0 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00005BC2 ???????? eldhDataOffset: resd 1 0 00005BC6 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00005BC8 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00005BCA ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00005BCC ???????? eldhReserved: resb 4 ; reserved 0 00005BD0 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00005BD2 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00005BD6 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00005BDA ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00005BDE ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00005BB2 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00005BBA ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00005BBE ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00005BC0 ???? 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 0 00005BB2 ???? 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 0 00005BB4 ???? eldltAmount: resw 1 0 00005BB6 ???????? 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 0 00005BB2 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00005BB4 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00005BB6 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00005BB8 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00005BBA ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00005BC2 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00005BB2 ???? eldlSignature: resw 1 ; 0E1D1h 0 00005BB4 ???????? eldlReserved: resw 2 0 00005BB8 ???? eldlUseLinkHash: resw 1 0 00005BBA ???? eldlDataAmount: resw 1 0 00005BBC ???? eldlDataPrefixes: resw 1 0 00005BBE ???? eldlDataEntries: resw 1 0 00005BC0 ???? eldlDataAddresses: resw 1 0 00005BC2 ???? eldlCodeAmount: resw 1 0 00005BC4 ???? eldlCodePrefixes: resw 1 0 00005BC6 ???? eldlCodeEntries: resw 1 0 00005BC8 ???? 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 0 00005BB2 ???? ifKeyword: resw 1 0 00005BB4 ???? ifDescription: resw 1 0 00005BB6 ???? ifOptions: resw 1 0 00005BB8 ???? ifValue: resw 1 0 00005BBA ???? ifTrying: resw 1 0 00005BBC ???? 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 0 00005BB2 ???????? saOffset: resd 1 0 00005BB6 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00005BB2 ???? so16aOffset: resw 1 0 00005BB4 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00005BB2 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00005BB2 ?????? bsJump: resb 3 0 00005BB5 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00005BB2 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00005BB4 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00005BB5 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00005BB7 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00005BB8 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 00005BBA ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 00005BBC ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 00005BBD ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00005BBF ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00005BC1 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00005BC3 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00005BC7 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 00005BCB ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00005BCF ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00005BD1 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00005BD3 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00005BD7 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 00005BD9 ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00005BB2 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00005BB3 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00005BB4 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00005BB5 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00005BC4 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00005BB2 ???????????????? deName: resb 8 0 00005BBA ?????? deExt: resb 3 0 00005BBD ?? deAttrib: resb 1 0 00005BBE ?? dePlusSize: resb 1 0 00005BBF ?????????????? resb 7 0 00005BC6 ???? deClusterHigh: resw 1 0 00005BC8 ???? deTime: resw 1 0 00005BCA ???? deDate: resw 1 0 00005BCC ???? deClusterLow: resw 1 0 00005BCE ???????? 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 0 100005BA2 ???????? lsvFirstCluster: resd 1 0 100005BA6 ???????? lsvFATSector: resd 1 0 100005BAA ???? lsvFATSeg: resw 1 0 100005BAC ???? lsvLoadSeg: resw 1 0 100005BAE ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100005B92 ???? ldMemoryTop: resw 1 0 100005B94 ???? ldLoadTop: resw 1 0 100005B96 ???? ldSectorSeg: resw 1 0 100005B98 ?? ldFATType: resb 1 92 <2> ldFlags: 0 100005B99 ?? ldHasLBA: resb 1 0 100005B9A ???? ldClusterSize: resw 1 0 100005B9C ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100005B9E ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100005BA0 ?? .partition: resb 1 ; byte 0 100005BA1 ?? .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 <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 0 100005B82 ???????? ldRootSector: resd 1 0 100005B86 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 100005B88 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 100005B8A ???? ldParasLeft: resw 1 0 100005B8C ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 100005B72 ???????? ldMaxCluster: resd 1 0 100005B76 ???????? ldFileSize: resd 1 0 100005B7A ???????? ldCurrentCluster: resd 1 0 100005B7E ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00005BB2 ???????? liiSignature: resb 4 ; "NLDR" 0 00005BB6 ???? liiVersion: resb 2 ; "00" 0 00005BB8 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 00005BBA ???? liiAmountParagraphs: resw 1 0 00005BBC ???????????? liiReserved: resw 3 0 00005BC2 ???? 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 0 00005BC4 ???? 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 0 00005BC6 ???? 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 0 00005BC8 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00005BB2 ???? lpSize: resw 1 0 00005BB4 ???? lpCount: resw 1 0 00005BB6 ???????? lpBuffer: resd 1 0 00005BBA ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00005BB2 ?? piBoot: resb 1 0 00005BB3 ?????? piStartCHS: resb 3 0 00005BB6 ?? piType: resb 1 0 00005BB7 ?????? piEndCHS: resb 3 0 00005BBA ???????? piStart: resd 1 0 00005BBE ???????? 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 0 00005BB2 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00005BB4 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00005BB6 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00005BB8 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 00005BBA ???? lsOptions: resw 1 ; option flags 0 00005BBC ???? lsSegment: resw 1 ; => where to load file 0 00005BBE ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00005BC2 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00005BC6 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00005BC8 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 00005BCA ???????????????? 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 0 00005BB2 ???? exact_struc_at 00h, exeSignature: resw 1 0 00005BB4 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00005BB6 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00005BB8 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 00005BBA ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 00005BBC ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00005BBE ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00005BC0 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00005BC2 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00005BC4 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00005BC6 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00005BC8 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 00005BCA ???? 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. 0 00005BCC ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00005BB2 ???? ifhHandle: resw 1 0 00005BB4 ???? ifhFlags: resw 1 0 00005BB6 ???????? 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 <1> areastrucEntry: resb 24 0 00005BCA ???????? areastrucNext: resd 1 0 00005BCE ???????? areastrucPrev: resd 1 0 00005BD2 ???? areastrucSubAmount: resw 1 0 00005BD4 ???? areastrucSubOffset: resw 1 0 00005BD6 ???? areastrucFunAmount: resw 1 0 00005BD8 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00005BB2 ???????? areastrucsubLinear: resd 1 0 00005BB6 ???????? areastrucsubLinearEnd: resd 1 0 00005BBA ???? areastrucsubListOffset: resw 1 0 00005BBC ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00005BB2 ???????? areastrucfunLinear: resd 1 0 00005BB6 ???????? areastrucfunLinearEnd: resd 1 0 00005BBA ???? areastrucfunListOffset: resw 1 0 00005BBC ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00005BB2 ???? areastart: resw 1 0 00005BB4 ???? areaend: resw 1 0 00005BB6 ???? areamessage: resw 1 0 00005BB8 ???? 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 0 00005BB2 ???? 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.) 0 00005BB4 ???? ivFlags: resw 1 0 00005BB6 ???? 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. 0 00005BB8 ???? 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 0 00005BBA ?? 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. 0 00005BBB ?? 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 0 00005BB2 ???????? mrLinear: resd 1 0 00005BB6 ???????? mrOffset: resd 1 0 00005BBA ???? mrSegmentSelector: resw 1 0 00005BBC ???? mrFlags: resw 1 0 00005BBE ???????? 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 0 00005BB2 ???????? .size_: resd 1 0 00005BB6 ???? .srchdl: resw 1 0 00005BB8 ???????? .srcadr: resd 1 0 00005BBC ???? .dsthdl: resw 1 0 00005BBE ???????? .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 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 23 ------------------ note: usesection lDEBUG_CODE 24 25 %if _VXCHG 26 27 ;--- show debuggee screen, wait for a keypress, then restore debugger screen 28 29 vv: 0 0000BFAF 4E dec si 0 0000BFB0 BA[0000] mov dx, msg.on 0 0000BFB3 E8[0000] call isstring? 0 0000BFB6 750A jne @F 34 vv_on: 0 0000BFB8 AC lodsb 0 0000BFB9 E8[0000] call chkeol 0 0000BFBC 800E[0000]01 setopt [options6], opt6_vv_mode 0 0000BFC1 C3 retn 39 40 @@: 0 0000BFC2 BA[0000] mov dx, msg.off 0 0000BFC5 E8[0000] call isstring? 0 0000BFC8 752C jne @F 44 vv_off: 0 0000BFCA E8[0000] call skipwhite 0 0000BFCD 4E dec si 0 0000BFCE BA[0000] mov dx, msg.keep 0 0000BFD1 E8[0000] call isstring? 0 0000BFD4 7505 jne .notkeep 0 0000BFD6 800E[0000]02 setopt [options6], opt6_vv_keep 51 .notkeep: 0 0000BFDB E8[0000] call skipwhite 0 0000BFDE 4E dec si 0 0000BFDF BA[0000] mov dx, msg.nokeep 0 0000BFE2 E8[0000] call isstring? 0 0000BFE5 7505 jne .notnokeep 0 0000BFE7 8026[0000]FD clropt [options6], opt6_vv_keep 58 .notnokeep: 0 0000BFEC AC lodsb 0 0000BFED E8[0000] call chkeol 0 0000BFF0 8026[0000]FE clropt [options6], opt6_vv_mode 0 0000BFF5 C3 retn 63 64 @@: 0 0000BFF6 AC lodsb 0 0000BFF7 E8[0000] call chkeol 67 0 0000BFFA F606[0000]01 testopt [internalflags6], dif6_vv_mode 0 0000BFFF 750C jnz @F 0 0000C001 B83001 mov ax, 0130h 0 0000C004 E8[0000] call setrc 0 0000C007 BA[0000] mov dx, msg.vv_disabled 0 0000C00A E9[0000] jmp putsz 74 75 @@: 0 0000C00D B000 mov al, 0 0 0000C00F E82000 call swapscreen 78 %if 0 ;n _VXCHGBIOS ; no longer needed, swapscreen has set cursor 79 80 ;--- swapscreen has restored screen and cursor pos, but we want 81 ;--- the cursor be shown on the screen - so set it through BIOS calls. 82 83 mov ah, 0Fh ; get current mode (and video page in BH) 84 int 10h 85 mov ah, 3 ; get cursor pos of page in BH 86 int 10h 87 mov ah, 2 ; set cursor pos of page in BH 88 int 10h 89 %endif 90 0 0000C012 F606[0000]10 testopt [options6], opt6_vv_int16 0 0000C017 750F jnz .int16 93 .terminal: 0 0000C019 800E[0000]10 setopt [internalflags3], dif3_input_terminal_override 95 ; make sure we get terminal input 0 0000C01E E8[0000] call getc 0 0000C021 8026[0000]EF clropt [internalflags3], dif3_input_terminal_override 0 0000C026 EB04 jmp @F 99 100 .int16: 101 ; mov ah, 10h 0 0000C028 31C0 xor ax, ax 0 0000C02A CD16 int 16h 104 @@: 105 0 0000C02C B001 mov al, 1 0 0000C02E E80100 call swapscreen 0 0000C031 C3 retn 109 110 111 ;--- AL=0: save debugger screen, restore debuggee screen 112 ;--- AL=1: save debuggee screen, restore debugger screen 113 114 swapscreen: 0 0000C032 F606[0000]01 testopt [internalflags6], dif6_vv_mode 0 0000C037 7450 jz .done 117 118 %ifn _VXCHGBIOS 0 0000C039 BE[0000] mov si, xmsmove 0 0000C03C 837C0A00 cmp word [si + XMSM.dsthdl], 0 0 0000C040 7447 jz .done 122 0 0000C042 B10E mov cl, 14 0 0000C044 D3E0 shl ax, cl ; 0 -> 0000, 1 -> 4000h 0 0000C046 89440C mov word [si + XMSM.dstadr], ax 126 127 ;--- use offset & size of current video page as src/dst for 128 ;--- xms block move. Also toggle cursor pos debuggee/debugger. 129 0 0000C049 B84000 mov ax, 40h ; bimodal selector/segment 0 0000C04C 8EC0 mov es, ax 0 0000C04E 26A14C00 mov ax, [es:4Ch] 0 0000C052 8904 mov word [si + XMSM.size_], ax 0 0000C054 26A14E00 mov ax, [es:4Eh] 0 0000C058 894406 mov word [si + XMSM.srcadr + 0], ax 136 137 ;--- get/set cursor position manually for speed reasons. 0 0000C05B 268A1E6200 mov bl, [es:62h] 0 0000C060 B700 mov bh, 0 0 0000C062 D1E3 shl bx, 1 0 0000C064 268B5750 mov dx, [es:bx + 50h] ; get cursor position of current page 0 0000C068 8716[0000] xchg dx, [csrpos] 143 %if 0 144 mov [es:bx + 50h], dx 145 %else 0 0000C06C 268A3E6200 mov bh, byte [es:62h] 0 0000C071 B402 mov ah, 2 0 0000C073 CD10 int 10h 149 %endif 150 0 0000C075 B40B mov ah, 0Bh ; save video screen to XMS 0 0000C077 E82C00 call runxms 0 0000C07A E80D00 call swapsrcdst 0 0000C07D 80740740 xor byte [si + XMSM.srcadr + 1], 40h 0 0000C081 B40B mov ah, 0Bh ; restore video screen from XMS 0 0000C083 E82000 call runxms 0 0000C086 E80100 call swapsrcdst 158 ; xor byte [si + XMSM.dstadr + 1], 40h 159 %else 160 mov ah, 05h ; just use BIOS to activate video page 161 int 10h 162 %endif 163 .done: 0 0000C089 C3 retn 165 166 %ifn _VXCHGBIOS 167 swapsrcdst: 0 0000C08A 8B4404 mov ax, [si + XMSM.srchdl] 0 0000C08D 8B4C06 mov cx, word [si + XMSM.srcadr + 0] 0 0000C090 8B5408 mov dx, word [si + XMSM.srcadr + 2] 0 0000C093 87440A xchg ax, [si + XMSM.dsthdl] 0 0000C096 874C0C xchg cx, word [si + XMSM.dstadr + 0] 0 0000C099 87540E xchg dx, word [si + XMSM.dstadr + 2] 0 0000C09C 894404 mov [si + XMSM.srchdl], ax 0 0000C09F 894C06 mov word [si + XMSM.srcadr + 0], cx 0 0000C0A2 895408 mov word [si + XMSM.srcadr + 2], dx 0 0000C0A5 C3 retn 178 runxms: 0 0000C0A6 1E push ds 0 0000C0A7 07 pop es 181 %if _PM 182 call ispm 183 jz @F 184 %endif 0 0000C0A8 FF1E[0000] call far [xmsdrv] 0 0000C0AC C3 retn 187 %if _PM 188 @@: 189 %ifn _ONLYNON386 190 _no386 jmp .286 191 subcpu 386 192 push dword 0 ; ss:sp 193 push dword [xmsdrv] 194 ; cs:ip 195 push dword 0 ; fs,gs 196 push word [pspdbg] 197 ; ds 198 push word 0 ; es 199 pushf 200 pushad 201 mov edi, esp 202 xor cx, cx 203 mov bh, 0 204 mov ax, 0301h 205 int 31h 206 popad 207 add sp, 50 - 32 ; sizeof RMCS - 32 208 ; ie discard fl, segregs, cs:ip, ss:sp 209 retn 210 subcpureset 211 %endif 212 %ifn _ONLY386 213 .286: 214 subcpu 286 215 push word 0 216 push word 0 ; ss:sp 217 push word [xmsdrv + 2] 218 push word [xmsdrv] 219 ; cs:ip 220 push word 0 221 push word 0 ; fs,gs 222 push word [pspdbg] 223 ; ds 224 push word 0 ; es 225 pushf 226 push word 0 227 push ax 228 push word 0 229 push cx 230 push word 0 231 push dx 232 push word 0 233 push bx 234 push word 0 235 push word 0 236 push word 0 ; esp 237 push bp 238 push word 0 239 push si 240 push word 0 241 push di 242 mov di, sp 243 xor cx, cx 244 mov bh, 0 245 mov ax, 0301h 246 int 31h 247 pop di 248 pop ax 249 pop si 250 pop ax 251 pop bp 252 pop ax 253 pop ax ; esp 254 pop ax 255 pop bx 256 pop ax 257 pop dx 258 pop ax 259 pop cx 260 pop ax 261 pop ax ; ax 262 add sp, 50 - 32 + 2 ; sizeof RMCS - 32 + 2 263 ; ie discard eaxh and fl, segregs, cs:ip, ss:sp 264 retn 265 subcpureset 266 %endif 267 %endif 268 %endif 269 270 vv_set: 0 0000C0AD F606[0000]01 testopt [options6], opt6_vv_mode 0 0000C0B2 750B jnz .checkenable 273 274 .checkdisable: 0 0000C0B4 F606[0000]01 testopt [internalflags6], dif6_vv_mode 0 0000C0B9 7403E99300 jnz vv_disable 0 0000C0BE C3 retn 278 279 .checkenable: 0 0000C0BF F606[0000]01 testopt [internalflags6], dif6_vv_mode 0 0000C0C4 7401 jz vv_enable 282 .ret: 0 0000C0C6 C3 retn 284 285 vv_enable: 0 0000C0C7 B02F mov al, 2Fh 0 0000C0C9 E8[0000] call intchk 0 0000C0CC 7470 jz .noxmm 289 290 %ifn _VXCHGBIOS 0 0000C0CE B80043 mov ax, 4300h ; check if XMM is here 292 %if _PM 293 call .call2F 294 %else 0 0000C0D1 CD2F int 2Fh 296 %endif 0 0000C0D3 3C80 cmp al, 80h 0 0000C0D5 7567 jnz .noxmm ; no - no screen flip 0 0000C0D7 B81043 mov ax, 4310h 300 %if _PM 301 call .call2F 302 mov word [xmsdrv + 0], bx 303 mov word [xmsdrv + 2], dx 304 %else 0 0000C0DA CD2F int 2Fh 0 0000C0DC 891E[0000] mov word [xmsdrv + 0], bx 0 0000C0E0 8C06[0200] mov word [xmsdrv + 2], es 308 %endif 309 0 0000C0E4 BA2000 mov dx, 32 ; alloc 32 KiB EMB 0 0000C0E7 B409 mov ah, 9 0 0000C0E9 E8BAFF call runxms 0 0000C0EC 83F801 cmp ax, 1 0 0000C0EF 754D jnz .noxmm 0 0000C0F1 BE[0000] mov si, xmsmove 0 0000C0F4 89540A mov [si + XMSM.dsthdl], dx ; save the handle in block move struct. 0 0000C0F7 C6440D40 mov byte [si + XMSM.dstadr + 1], 40h 318 ; the XMS memory will be used to 319 ; save/restore 2 screens, with a max 320 ; capacity per screen of 16 KiB 0 0000C0FB B84000 mov ax, 40h ; bi-modal segment/selector 0 0000C0FE 8EC0 mov es, ax 0 0000C100 26A14C00 mov ax, [es:4Ch] ; current screen size, might change! 0 0000C104 8904 mov word [si + XMSM.size_], ax 0 0000C106 26A14E00 mov ax, [es:4Eh] ; page start in video memory 0 0000C10A 894406 mov word [si + XMSM.srcadr + 0], ax 0 0000C10D B800B0 mov ax, 0B000h 0 0000C110 26803E6304B4 cmp byte [es:463h], 0B4h 0 0000C116 7403 je @F 0 0000C118 80CC08 or ah, 8 331 @@: 0 0000C11B 894408 mov word [si + XMSM.srcadr + 2], ax 333 0 0000C11E B40F mov ah, 0Fh ; get active video page in BH 0 0000C120 CD10 int 10h 0 0000C122 B403 mov ah, 03h ; get cursor pos in DX of active page 0 0000C124 CD10 int 10h 0 0000C126 8916[0000] mov [csrpos], dx 0 0000C12A 26A08400 mov al, [es:84h] 0 0000C12E A2[0000] mov [vrows], al 0 0000C131 B40B mov ah, 0Bh ; save current screen now 0 0000C133 E870FF call runxms 343 %else 344 ;--- use BIOS to swap page 0/1, a simple approach 345 ;--- that in theory would fit perfectly, but 346 ;--- unfortunately in reality may have quirks. 347 mov ax, 40h 348 mov es, ax 349 mov si, [es:4Eh] 350 mov cx, [es:4Ch] 351 shr cx, 1 352 mov ax, 0501h ; debugger page is 1 353 int 10h 354 mov di, [es:4Eh] 355 mov dx, [es:50h+0*2] 356 mov [es:50h+1*2], dx 357 mov ax, 0B000h 358 cmp byte [es:63h], 0B4h 359 jz @F 360 or ah, 8 361 @@: 362 mov es, ax 363 push ds 364 mov ds, ax 365 rep movsw 366 pop ds 367 %endif 0 0000C136 800E[0000]01 setopt [internalflags6], dif6_vv_mode 0 0000C13B 1E push ds 0 0000C13C 07 pop es 0 0000C13D C3 retn 372 373 .noxmm: 0 0000C13E 8026[0000]FE clropt [options6], opt6_vv_mode 0 0000C143 1E push ds 0 0000C144 07 pop es 0 0000C145 B83101 mov ax, 0131h 0 0000C148 E8[0000] call setrc 0 0000C14B BA[0000] mov dx, msg.vv_enable_failure 0 0000C14E E9[0000] jmp putsz 381 382 %if _PM 383 .call2F: 384 call ispm 385 jz @F 386 push es 387 int 2Fh 388 mov dx, es 389 pop es 390 retn 391 392 @@: 393 subcpu 286 394 push word [pspdbg] 395 push word [pspdbg] 396 push word 2Fh 397 push bp 398 call intcall_return_parameter_es_parameter_ds 399 pop dx ; discard returned ds 400 pop dx ; get es 401 subcpureset 402 retn 403 %endif 404 405 vv_disable: 0 0000C151 F606[0000]01 testopt [internalflags6], dif6_vv_mode 0 0000C156 7428 jz .ret 408 %ifn _VXCHGBIOS 0 0000C158 8B16[0A00] mov dx, word [xmsmove + XMSM.dsthdl] 0 0000C15C 85D2 test dx, dx 0 0000C15E 741B jz @F 412 %endif 0 0000C160 F606[0000]02 testopt [options6], opt6_vv_keep 0 0000C165 7507 jnz .keep 0 0000C167 52 push dx 0 0000C168 B000 mov al, 0 ; restore debuggee screen 0 0000C16A E8C5FE call swapscreen 0 0000C16D 5A pop dx 419 .keep: 420 %ifn _VXCHGBIOS 0 0000C16E B40A mov ah, 0Ah ; and free XMS handle 0 0000C170 E833FF call runxms 0 0000C173 31C0 xor ax, ax 0 0000C175 A3[0A00] mov word [xmsmove + XMSM.dsthdl], ax 0 0000C178 A3[0400] mov word [xmsmove + XMSM.srchdl], ax 426 %endif 427 428 @@: 0 0000C17B 8026[0000]FE clropt [internalflags6], dif6_vv_mode 430 .ret: 0 0000C180 C3 retn 432 %else 433 434 vv equ error 435 436 %endif === Trace listing source: ../lst/debug.obj/ww.lst 1 2 %if 0 3 4 lDebug W commands (write sector, write program) 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 "ww.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 === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 86 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "ASMTABLE1" 86 ------------------ <1> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 86 ------------------ <1> note: usesection ASMTABLE2 === Switch to base=000000h -> "DATASTACKBASE" 86 ------------------ <1> note: usesection DATASTACKBASE === Switch to base=008120h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00EDF0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01D8E0h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=01D8E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=01D8E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=020DF0h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=020E20h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of puts_getline_ext_done 74 <2> section_of puts_copyoutput_ext_done 75 <2> section_of guard_auxbuff, guard_re 76 <2> section_of handle_serial_flags_ctrl_c 77 <2> section_of hexword_high 78 <2> section_of call_int2D 79 <2> section_of copy_single_counted_string 80 <2> section_of intchk 81 <2> section_of IsIISPEntry? 82 <2> section_of dd_store 83 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 84 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 85 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 86 <2> section_of setrmlimit, skipcomm0, unhack 87 <2> section_of skipequals 88 <2> section_of to_errret_pop 89 <2> section_of cmd3.have_cx_convenience 90 <2> section_of verifysegm, verifysegm_or_error 91 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 92 <2> section_of pp_fix32bitflags, proceedbreakpoint 93 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 94 <2> section_of hexdword 95 <2> section_of cmd3_not_inject, cmd3_injected 96 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 97 <2> section_of transfer_ext_cx_nearcall_from_code2 98 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 99 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 100 <2> section_of ia_restore_ds 101 <2> %ifn _SYMBOLIC 102 <2> section_of selector_to_segment 103 <2> %endif 104 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 105 <2> section_of disp_dxax_times_cx_width_bx_size 106 <2> section_of disp_dxax_times_cx_width_bx_size.store 107 <2> section_of disp_message, disp_message_length_cx 108 <2> section_of ispm 109 <2> section_of setrc, error 110 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 111 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 112 <2> section_of yy_reset_buf 113 <2> section_of init_bootcmd 114 <2> 115 <2> section_of InDOS, bootgetmemorysize 116 <2> section_of chkeol, decword, decdword 117 <2> section_of dec_dword_minwidth 118 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 119 <2> section_of getlinearaddr 120 <2> section_of getlinear_d_b 121 <2> section_of getlinear_high_limit 122 <2> section_of getlinear_32bit 123 <2> section_of getlinear_high_limit.do_not_use_test 124 <2> section_of getlinear_common 125 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 126 <2> section_of putc, putsline, putsline_crlf, putsz_error 127 <2> section_of setrmsegm 128 <2> section_of skipwh0, skipwhite 129 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 130 <2> section_of capitalise 131 <2> section_of setes2ax 132 <2> section_of zz_copy_strings_to_str_buffer 133 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 134 <2> section_of code2_to_code_ret_to_ext 135 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 136 <2> section_of yy_common_parse_name 137 <2> section_of yy_common_parse_name_bx_buffer 138 <2> section_of retry_open_scriptspath 139 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 140 <2> section_of yy_boot_parse_name, yy_boot_open_file 141 <2> section_of yy_boot_parse_name_bx_buffer 142 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 143 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 144 <2> section_of ..@yy_filename_empty, boot_parse_fn 145 <2> section_of count_store, count_store.maybe_0 146 <2> section_of loader_get_resident_address, loader_prepare_resident 147 <2> 148 <2> 149 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 150 <2> usesection lDEBUG_CODE2 151 <2> %else 152 <2> usesection lDEBUG_CODE 152 ------------------ <2> note: usesection lDEBUG_CODE 153 <2> %endif 154 <2> section_of bxcx_to_cx_paragraphs 155 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 156 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 157 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 158 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 159 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 160 <2> section_of zz_switch_s, zz_transfer_buffer 161 <2> 162 <2> 163 <2> %if _SYMBOLIC 164 <2> %if _DUALCODE && _SYMBOLICDUALCODE 165 <2> usesection lDEBUG_CODE2 166 <2> %else 167 <2> usesection lDEBUG_CODE 168 <2> %endif 169 <2> section_of shift_left_4_bxcx 170 <2> section_of selector_to_segment 171 <2> 172 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 173 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 174 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 175 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 176 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 177 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 178 <2> section_of move_insert_farpointer.str.sidi 179 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 180 <2> section_of pointer_to_linear 181 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 182 <2> section_of save_slice_farpointer.str 183 <2> section_of segment_to_selector 184 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 185 <2> 186 <2> section_of binsearchhash, binsearchmain 187 <2> section_of check_second_slice 188 <2> section_of disp_size_hash, disp_size_main, disp_size_str 189 <2> section_of displayresult, getstring1, getstring2 190 <2> section_of increment_ss_ref_count 191 <2> section_of list_sym_storage_usage, str_index_to_pointer 192 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 193 <2> section_of zz_compact_expand_check_xms 194 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 195 <2> section_of zz_delete_string, zz_expand, zz_expand_common 196 <2> section_of zz_get_symstr_length_bytes 197 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 198 <2> section_of zz_get_symstr_length_indices 199 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 200 <2> section_of zz_hash, zz_hash.bx_init 201 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 202 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 203 <2> section_of zz_unlink_main_next 204 <2> %endif 205 <2> 206 <2> %if _DUALCODE 207 <2> usesection lDEBUG_CODE2 208 <2> %else 209 <2> usesection lDEBUG_CODE 209 ------------------ <2> note: usesection lDEBUG_CODE 210 <2> %endif 211 <2> section_of FloatToStr 212 <2> 213 <2> 214 <2> %if _DUALCODE && _EXPRDUALCODE 215 <2> usesection lDEBUG_CODE2 216 <2> %else 217 <2> usesection lDEBUG_CODE 217 ------------------ <2> note: usesection lDEBUG_CODE 218 <2> %endif 219 <2> 220 <2> section_of getofsforbx, checkpointer, getrangeX 221 <2> section_of getrangeX_have_address_need_length 222 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 223 <2> section_of remember_bitness, getaddr_taken 224 <2> section_of getstr, get_length, get_length_keyword 225 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 226 <2> section_of ..@call_operator_dispatchers 227 <2> section_of isseparator?, istype?, isunsignedtype? 228 <2> section_of handlesegment, handle3byte, handlebyte, handleword 229 <2> section_of handledword, handlepointer 230 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 231 <2> section_of uoh_not_bitwise, uoh_not_boolean 232 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 233 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 234 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 235 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 236 <2> section_of set_hhtype, of_divide, of_power 237 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 238 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 239 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 240 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 241 <2> section_of of_helper_getshiftdata, of_bit_mirror 242 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 243 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 244 <2> section_of of_helper_retbool, of_helper_getbool 245 <2> 246 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 247 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 248 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 249 <2> section_of var_iok_setup, var_rhcount_setup 250 <2> section_of var_get_psp_segment, var_get_psp_selector 251 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 252 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 253 <2> section_of var_bootunitflags_setup 254 <2> 255 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 256 <2> section_of default_variable_setup 257 <2> section_of var_ext_setup 258 <2> section_of var_ext_setup_done 259 <2> 260 <2> section_of getstmmxdigit 261 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 262 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 263 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 264 <2> section_of getnyb, get_value_range 265 <2> 266 <2> section_of getaddrX, getword, getdword, getexpression 267 <2> 268 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 269 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 270 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 271 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 272 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 273 <2> 274 <2> section_of seg_bx_to_sel 275 <2> section_of getexpression.countsignificantbits 276 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 277 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 278 <2> section_of stack_check.internal 279 <2> 280 <2> 281 <2> usesection INIT === Switch to base=01D8E0h -> "INIT" 281 ------------------ <2> note: usesection INIT 282 <2> section_of init_capitalise 283 <2> section_of init_skipwhite, init_skipwh0 284 <2> section_of init_skipcomma, init_skipcomm0 285 <2> section_of init_skipequals 286 <2> 287 <2> 288 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 288 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 289 <2> section_of entry_retn 290 <2> 291 <2> 292 <2> %if _LINK 293 <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> 294 <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 0 00005BB2 ???????? eldhSignature: resb 4 ; "ELD1" 0 00005BB6 ?????? resb 3 ; reserved 0 00005BB9 ?? resb 1 ; 26 (Ctrl-Z) 0 00005BBA ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00005BBE ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00005BC0 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00005BC2 ???????? eldhDataOffset: resd 1 0 00005BC6 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00005BC8 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00005BCA ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00005BCC ???????? eldhReserved: resb 4 ; reserved 0 00005BD0 ???? 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 <2> eldhxHeader: resb ELD_HEADER_size 0 00005BD2 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00005BD6 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00005BDA ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00005BDE ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00005BB2 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00005BBA ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00005BBE ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00005BC0 ???? 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 0 00005BB2 ???? 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 0 00005BB4 ???? eldltAmount: resw 1 0 00005BB6 ???????? 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 0 00005BB2 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00005BB4 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00005BB6 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00005BB8 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00005BBA ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00005BC2 ???? eldiFlags: resw 1 ; flags 75 <2> eldiListing_size equ 14 76 00000012 <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 0 00005BB2 ???? eldlSignature: resw 1 ; 0E1D1h 0 00005BB4 ???????? eldlReserved: resw 2 0 00005BB8 ???? eldlUseLinkHash: resw 1 0 00005BBA ???? eldlDataAmount: resw 1 0 00005BBC ???? eldlDataPrefixes: resw 1 0 00005BBE ???? eldlDataEntries: resw 1 0 00005BC0 ???? eldlDataAddresses: resw 1 0 00005BC2 ???? eldlCodeAmount: resw 1 0 00005BC4 ???? eldlCodePrefixes: resw 1 0 00005BC6 ???? eldlCodeEntries: resw 1 0 00005BC8 ???? 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 0 00005BB2 ???? ifKeyword: resw 1 0 00005BB4 ???? ifDescription: resw 1 0 00005BB6 ???? ifOptions: resw 1 0 00005BB8 ???? ifValue: resw 1 0 00005BBA ???? ifTrying: resw 1 0 00005BBC ???? 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 0 00005BB2 ???????? saOffset: resd 1 0 00005BB6 ???? saSegSel: resw 1 738 <1> %if _PM 739 <1> saSegment: resw 1 740 <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 0 00005BB2 ???? so16aOffset: resw 1 0 00005BB4 ???? so16aSegSel: resw 1 752 <1> %if _PM 753 <1> so16aSegment: resw 1 754 <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 0 00005BB2 ???? soaSegSel: resw 1 776 <1> %if _PM 777 <1> soaSegment: resw 1 778 <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 0 00005BB2 ?????? bsJump: resb 3 0 00005BB5 ???????????????? bsOEM: resb 8 19 <2> bsBPB: 20 <2> endstruc 21 <2> 22 <2> struc EBPB ; BPB sec 0 00005BB2 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00005BB4 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00005BB5 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00005BB7 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00005BB8 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 00005BBA ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 00005BBC ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 00005BBD ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 00005BBF ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 00005BC1 ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00005BC3 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00005BC7 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 35 <2> bpbNew: ; offset 19h 24h 36 <2> 0 00005BCB ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 00005BCF ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 00005BD1 ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00005BD3 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00005BD7 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 00005BD9 ???? ebpbBackupSector: resw 1 ; offset 27h 32h 43 00000029 <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 0 00005BB2 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00005BB3 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00005BB4 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00005BB5 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 52 00000007 <2> bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00005BC4 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 54 <2> endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 55 <2> 56 <2> struc DIRENTRY 0 00005BB2 ???????????????? deName: resb 8 0 00005BBA ?????? deExt: resb 3 0 00005BBD ?? deAttrib: resb 1 0 00005BBE ?? dePlusSize: resb 1 0 00005BBF ?????????????? resb 7 0 00005BC6 ???? deClusterHigh: resw 1 0 00005BC8 ???? deTime: resw 1 0 00005BCA ???? deDate: resw 1 0 00005BCC ???? deClusterLow: resw 1 0 00005BCE ???????? 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 0 100005BA2 ???????? lsvFirstCluster: resd 1 0 100005BA6 ???????? lsvFATSector: resd 1 0 100005BAA ???? lsvFATSeg: resw 1 0 100005BAC ???? lsvLoadSeg: resw 1 0 100005BAE ???????? lsvDataStart: resd 1 85 <2> endstruc 86 <2> 87 <2> struc LOADDATA, LOADSTACKVARS - 10h 0 100005B92 ???? ldMemoryTop: resw 1 0 100005B94 ???? ldLoadTop: resw 1 0 100005B96 ???? ldSectorSeg: resw 1 0 100005B98 ?? ldFATType: resb 1 92 <2> ldFlags: 0 100005B99 ?? ldHasLBA: resb 1 0 100005B9A ???? ldClusterSize: resw 1 0 100005B9C ???? ldParaPerSector:resw 1 96 <2> ldDirCluster: ; dword 97 <2> ldLoadingSeg: ; word 98 <2> ldQueryPatchValue: ; word 99 <2> lsvCommandLine: ; word 100 <2> .start: equ $ - lsvclBufferLength 0 100005B9E ???? .signature: resw 1 102 <2> ldLoadUntilSeg: ; word 103 <2> lsvExtra: ; word 0 100005BA0 ?? .partition: resb 1 ; byte 0 100005BA1 ?? .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 <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 0 100005B82 ???????? ldRootSector: resd 1 0 100005B86 ???? ldEntriesPerSector: resw 1 131 <2> ldDataSegment: ; word 0 100005B88 ???? ldLastAvailableSector: resw 1 133 <2> ldDataSector: ; dword 0 100005B8A ???? ldParasLeft: resw 1 0 100005B8C ???? ldParasDone: resw 1 136 <2> endstruc 137 <2> 138 <2> struc LOADDATA3, LOADDATA2 - 10h 0 100005B72 ???????? ldMaxCluster: resd 1 0 100005B76 ???????? ldFileSize: resd 1 0 100005B7A ???????? ldCurrentCluster: resd 1 0 100005B7E ???????? ldCurrentSeek: resd 1 143 <2> endstruc 144 <2> 145 <2> struc LOADERIMAGEIDENT 0 00005BB2 ???????? liiSignature: resb 4 ; "NLDR" 0 00005BB6 ???? liiVersion: resb 2 ; "00" 0 00005BB8 ???? liiChecksum: resw 1 ; word sum of first 8 words = 0 0 00005BBA ???? liiAmountParagraphs: resw 1 0 00005BBC ???????????? liiReserved: resw 3 0 00005BC2 ???? 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 0 00005BC4 ???? 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 0 00005BC6 ???? 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 0 00005BC8 ???? liiStackPointer: resw 1 171 <2> endstruc 172 <2> 173 <2> struc LBAPACKET 0 00005BB2 ???? lpSize: resw 1 0 00005BB4 ???? lpCount: resw 1 0 00005BB6 ???????? lpBuffer: resd 1 0 00005BBA ???????????????? lpSector: resq 1 178 <2> endstruc 179 <2> 180 <2> struc PARTINFO 0 00005BB2 ?? piBoot: resb 1 0 00005BB3 ?????? piStartCHS: resb 3 0 00005BB6 ?? piType: resb 1 0 00005BB7 ?????? piEndCHS: resb 3 0 00005BBA ???????? piStart: resd 1 0 00005BBE ???????? 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 0 00005BB2 ???? lsKernelName: resw 1 ; -> kernel file default name 0 00005BB4 ???? lsAddName: resw 1 ; -> additional file default name, may be empty string 0 00005BB6 ???? lsMinPara: resw 1 ; how much to load at least, fail if file smaller 0 00005BB8 ???? lsMaxPara: resw 1 ; how much to load at most (will round up to sector size) 0 00005BBA ???? lsOptions: resw 1 ; option flags 0 00005BBC ???? lsSegment: resw 1 ; => where to load file 0 00005BBE ???????? lsEntry: resd 1 ; relative segment for CS, value for IP 0 00005BC2 ???????? lsBPB: resd 1 ; segment for BPB (-1 auto-BPB), offset for BPB 0 00005BC6 ???? lsCheckOffset: resw 1 ; offset in file segment of word to check 0 00005BC8 ???? lsCheckValue: resw 1 ; value to check for word, 0 if unused 0 00005BCA ???????????????? 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 0 00005BB2 ???? exact_struc_at 00h, exeSignature: resw 1 0 00005BB4 ???? exact_struc_at 02h, exeExtraBytes: resw 1 ; bytes in last page 0 00005BB6 ???? exact_struc_at 04h, exePages: resw 1 ; number of 512-byte pages. includes the header! 0 00005BB8 ???? exact_struc_at 06h, exeRelocItems: resw 1 ; number of relocation items 0 00005BBA ???? exact_struc_at 08h, exeHeaderSize: resw 1 ; header size in 16-byte paragraphs 0 00005BBC ???? exact_struc_at 0Ah, exeMinAlloc: resw 1 ; minimum (bss) allocation in paragraphs 0 00005BBE ???? exact_struc_at 0Ch, exeMaxAlloc: resw 1 ; maximum (bss) allocation in paragraphs 0 00005BC0 ???? exact_struc_at 0Eh, exeInitSS: resw 1 ; init ss (is relocated) 0 00005BC2 ???? exact_struc_at 10h, exeInitSP: resw 1 ; init sp 0 00005BC4 ???? exact_struc_at 12h, exeChecksum: resw 1 29 <2> exact_struc_at 14h, exeInitCSIP: 0 00005BC6 ???? exact_struc_at 14h, exeInitIP: resw 1 ; init ip 0 00005BC8 ???? exact_struc_at 16h, exeInitCS: resw 1 ; init cs (is relocated) 0 00005BCA ???? 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. 0 00005BCC ???? exact_struc_at 1Ah, exeOverlayNum: resw 1 36 <2> exact_struc_at 1Ch 37 <2> endstruc 825 <1> 826 <1> 827 <1> struc INPUTFILEHANDLE 0 00005BB2 ???? ifhHandle: resw 1 0 00005BB4 ???? ifhFlags: resw 1 0 00005BB6 ???????? 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 <1> areastrucEntry: resb 24 0 00005BCA ???????? areastrucNext: resd 1 0 00005BCE ???????? areastrucPrev: resd 1 0 00005BD2 ???? areastrucSubAmount: resw 1 0 00005BD4 ???? areastrucSubOffset: resw 1 0 00005BD6 ???? areastrucFunAmount: resw 1 0 00005BD8 ???? areastrucFunOffset: resw 1 851 <1> endstruc 852 <1> 853 <1> struc AREASTRUCSUB 0 00005BB2 ???????? areastrucsubLinear: resd 1 0 00005BB6 ???????? areastrucsubLinearEnd: resd 1 0 00005BBA ???? areastrucsubListOffset: resw 1 0 00005BBC ???? areastrucsubListAmount: resw 1 858 <1> endstruc 859 <1> 860 <1> struc AREASTRUCFUN 0 00005BB2 ???????? areastrucfunLinear: resd 1 0 00005BB6 ???????? areastrucfunLinearEnd: resd 1 0 00005BBA ???? areastrucfunListOffset: resw 1 0 00005BBC ???? areastrucfunListAmount: resw 1 865 <1> endstruc 866 <1> 867 <1> struc AREA 0 00005BB2 ???? areastart: resw 1 0 00005BB4 ???? areaend: resw 1 0 00005BB6 ???? areamessage: resw 1 0 00005BB8 ???? 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 0 00005BB2 ???? 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.) 0 00005BB4 ???? ivFlags: resw 1 0 00005BB6 ???? 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. 0 00005BB8 ???? 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 0 00005BBA ?? 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. 0 00005BBB ?? 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 0 00005BB2 ???????? mrLinear: resd 1 0 00005BB6 ???????? mrOffset: resd 1 0 00005BBA ???? mrSegmentSelector: resw 1 0 00005BBC ???? mrFlags: resw 1 0 00005BBE ???????? 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 0 00005BB2 ???????? .size_: resd 1 0 00005BB6 ???? .srchdl: resw 1 0 00005BB8 ???????? .srcadr: resd 1 0 00005BBC ???? .dsthdl: resw 1 0 00005BBE ???????? .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 %endif 21 22 23 %if !_LINK || !_LOADER 24 usesection lDEBUG_CODE === Switch to base=00EDF0h -> "LDEBUG_CODE" 24 ------------------ note: usesection lDEBUG_CODE 25 26 27 ; INP: byte [ss:drivenumber] = 0-based drive number 28 ; OUT: CF 29 ; [ss:internalflags6] & dif6_locked 30 ; CHG: - 31 lockdrive: 0 0000C181 50 push ax 0 0000C182 53 push bx 0 0000C183 51 push cx 0 0000C184 52 push dx 0 0000C185 368026[0100]FD clropt [ss:internalflags6], dif6_locked 0 0000C18B 368A1E[0000] mov bl, byte [ss:drivenumber] 0 0000C190 FEC3 inc bl 0 0000C192 B700 mov bh, 0 0 0000C194 B94A08 mov cx, 084Ah 0 0000C197 BA0100 mov dx, 0001h 0 0000C19A B80D44 mov ax, 440Dh 0 0000C19D CD21 int 21h 0 0000C19F 7206 jc @F 0 0000C1A1 36800E[0100]02 setopt [ss:internalflags6], dif6_locked 46 ; NC 47 @@: 0 0000C1A7 5A pop dx 0 0000C1A8 59 pop cx 0 0000C1A9 5B pop bx 0 0000C1AA 58 pop ax 0 0000C1AB C3 retn 53 54 55 ; INP: byte [ss:drivenumber] = 0-based drive number 56 ; [ss:internalflags6] & dif6_locked 57 ; OUT: CF 58 ; CHG: - 59 unlockdrive: 0 0000C1AC 50 push ax 0 0000C1AD 53 push bx 0 0000C1AE 51 push cx 0 0000C1AF 52 push dx 0 0000C1B0 36800E[0100]02 setopt [ss:internalflags6], dif6_locked 0 0000C1B6 741C jz @F ; --> (NC) 0 0000C1B8 368A1E[0000] mov bl, byte [ss:drivenumber] 0 0000C1BD FEC3 inc bl 0 0000C1BF B700 mov bh, 0 0 0000C1C1 B96A08 mov cx, 086Ah 0 0000C1C4 BA0100 mov dx, 0001h 0 0000C1C7 B80D44 mov ax, 440Dh 0 0000C1CA CD21 int 21h 0 0000C1CC 7206 jc @F 0 0000C1CE 368026[0100]FD clropt [ss:internalflags6], dif6_locked 75 ; NC 76 @@: 0 0000C1D4 5A pop dx 0 0000C1D5 59 pop cx 0 0000C1D6 5B pop bx 0 0000C1D7 58 pop ax 0 0000C1D8 C3 retn 82 83 84 ; W command - write a program, or disk sectors, to disk. 85 ww: 86 %if _BOOTLDR 87 %if _APPLICATION || _DEVICE 0 0000C1D9 F606[0100]40 testopt [internalflags], nodosloaded 0 0000C1DE 740C jz @F 90 %endif 0 0000C1E0 BA[0000] mov dx, msg.nobootsupp 0 0000C1E3 B81A01 mov ax, 011Ah 0 0000C1E6 E8[0000] call setrc 0 0000C1E9 E9[0000] jmp putsz 95 @@: 96 %endif 97 98 %if _APPLICATION || _DEVICE 0 0000C1EC E8[0000] call parselw ; parse L and W argument format 0 0000C1EF 7473 jz ww4 ; if request to write program 101 %if _PM && _NOEXTENDER 102 call ispm 103 jnz .rm 104 call isextenderavailable 105 jc nodosextinst 106 .rm: 107 %endif 0 0000C1F1 36A2[0000] mov byte [ss:drivenumber], al 0 0000C1F5 E889FF call lockdrive 0 0000C1F8 36F606[0000]06 testopt [ss:internalflags], newpacket| ntpacket 0 0000C1FE 7423 jz .oldint 0 0000C200 88C2 mov dl, al ; A: = 0, ... 0 0000C202 BE0160 mov si, 6001h ; write, assume "file data" 114 %if _VDD 0 0000C205 F606[0000]04 testopt [internalflags], ntpacket 0 0000C20A 750A jnz .vdd 117 %endif 0 0000C20C FEC2 inc dl ; A: = 1, ... 0 0000C20E B80573 mov ax, 7305h ; ds:(e)bx-> packet 0 0000C211 F9 stc 0 0000C212 CD21 int 21h ; use int 21h here, not doscall 0 0000C214 EB0F jmp short .done 123 %if _VDD 124 .vdd: 0 0000C216 A1[0000] mov ax, word [hVdd] 0 0000C219 B90500 mov cx, 5 127 %if _PM 128 add cl, byte [dpmi32] 129 %endif 0 0000C21C C4C4580290 DispatchCall 0 0000C221 EB02 jmp short .done 132 %endif 133 .oldint: 0 0000C223 CD26 int 26h 135 .done: 0 0000C225 9C pushf 0 0000C226 E883FF call unlockdrive 0 0000C229 9D popf 0 0000C22A BA[0000] mov dx, writing 140 ww1: 0 0000C22D 8CD3 mov bx, ss ; restore segment registers 0 0000C22F 8EDB mov ds, bx 0 0000C231 8B26[0000] mov sp, word [savesp] 0 0000C235 8EC3 mov es, bx 0 0000C237 7328 jnc ww3 ; if no error 0 0000C239 B410 mov ah, 10h 0 0000C23B E8[0000] call setrc 0 0000C23E 3C0C cmp al, 0Ch 0 0000C240 7602 jbe ww2 ; if in range 0 0000C242 B00C mov al, 0Ch 151 ww2: 0 0000C244 98 cbw ; ah = 0 0 0000C245 BB[0000] mov bx, dskerrs ; -> byte table 0 0000C248 D7 xlatb ; get offset from dskerrs 0 0000C249 01D8 add ax, bx ; -> message 0 0000C24B BF[0000] mov di, line_out 0 0000C24E 89C6 mov si, ax 0 0000C250 E8[0000] call showstring 0 0000C253 89D6 mov si, dx 0 0000C255 E8[0000] call showstring 0 0000C258 BE[0000] mov si, drive 0 0000C25B E8[0000] call showstring 0 0000C25E E8[0000] call putsline_crlf 164 ww3: 0 0000C261 E9[0000] jmp cmd3 ; can't return because Int26 leaves stack wrong 166 167 ; Write to file. First check the file extension. 168 ; size of file is in client's BX:CX, 169 ; default start address is DS:100h 170 171 ww4: 0 0000C264 E8[0000] call InDOS 0 0000C267 7403E9[0000] jnz not_while_indos 174 0 0000C26C A0[0000] mov al, byte [fileext] ; get flags of file extension 0 0000C26F F606[0100]04 testopt [options6], opt6_flat_binary 0 0000C274 750C jnz ww5 0 0000C276 A80C test al, EXT_EXE + EXT_HEX 0 0000C278 7408 jz ww5 ; if not EXE or HEX 0 0000C27A B84101 mov ax, 0141h 0 0000C27D BA[0000] mov dx, nowhexe 0 0000C280 EB0A jmp short ww6_specificerror 183 184 ww5: 0 0000C282 3C00 cmp al, 0 0 0000C284 750C jnz ww7 ; if extension exists 0 0000C286 B84201 mov ax, 0142h 0 0000C289 BA[0000] mov dx, nownull 189 ww6_specificerror: 0 0000C28C E8[0000] call setrc 0 0000C28F E9DC00 jmp ww16 192 193 ; File extension is OK; write it. First, create the file. 194 ww7: 195 %if _PM 196 call ispm 197 jnz ww7_1 198 mov ax, 0140h 199 call setrc 200 mov dx, nopmsupp 201 jmp putsz 202 ww7_1: 203 %endif 0 0000C292 BD[0000] mov bp, line_out 0 0000C295 80FEFE cmp dh, 0FEh 0 0000C298 7207 jb ww8 ; if (dx < 0xFE00) 0 0000C29A 80EEFE sub dh, 0FEh ; dx -= 0xFE00; 0 0000C29D 81C3E00F add bx, 0FE0h 209 ww8: 0 0000C2A1 89560A mov word [bp+10], dx ; save lower part of address in line_out+10 0 0000C2A4 89DE mov si, bx ; upper part goes into si 0 0000C2A6 B43C mov ah, 3Ch ; create file 0 0000C2A8 31C9 xor cx, cx ; no attributes 0 0000C2AA BA8000 mov dx, DTA 215 doscall 0 0000C2AD CD21 int 21h 0 0000C2AF 7302 jnc @F 0 0000C2B1 EB7C jmp ww15 ; if error 218 @@: 0 0000C2B3 50 push ax ; save file handle 220 221 ; Print message about writing. 0 0000C2B4 BA[0000] mov dx, wwmsg1 0 0000C2B7 E8[0000] call putsz ; print string 0 0000C2BA A1[0000] mov ax, word [reg_ebx] 0 0000C2BD 83F810 cmp ax, 10h 0 0000C2C0 7202 jb ww9 ; if not too large 0 0000C2C2 31C0 xor ax, ax ; too large: zero it out 228 ww9: 0 0000C2C4 894608 mov word [bp+8], ax 0 0000C2C7 85C0 test ax, ax 0 0000C2C9 7403 jz ww10 0 0000C2CB E8[0000] call hexnyb 233 ww10: 0 0000C2CE A1[0000] mov ax, word [reg_ecx] 0 0000C2D1 894606 mov word [bp+6], ax 0 0000C2D4 E8[0000] call hexword 0 0000C2D7 E8[0000] call putsline ; print size 0 0000C2DA BA[0000] mov dx, wwmsg2 0 0000C2DD E8[0000] call putsz ; print string 240 241 ; Now write the file. Size remaining is in line_out+6. 0 0000C2E0 5B pop bx ; recover file handle 0 0000C2E1 8B560A mov dx, word [bp+10] ; address to write from is si:dx 244 ww11: 0 0000C2E4 B800FE mov ax, 0FE00h 0 0000C2E7 29D0 sub ax, dx 0 0000C2E9 807E0800 cmp byte [bp+8], 0 0 0000C2ED 7508 jnz ww12 ; if more than 0FE00h bytes remaining 0 0000C2EF 3B4606 cmp ax, word [bp+6] 0 0000C2F2 7203 jb ww12 ; ditto 0 0000C2F4 8B4606 mov ax, word [bp+6] 252 ww12: 0 0000C2F7 91 xchg ax, cx ; mov cx, ax 0 0000C2F8 8EDE mov ds, si 0 0000C2FA B440 mov ah, 40h ; write to file 0 0000C2FC CD21 int 21h ; use INT, not doscall 0 0000C2FE 16 push ss ; restore DS 0 0000C2FF 1F pop ds 0 0000C300 39C8 cmp ax, cx 0 0000C302 7515 jne ww13 ; if disk full 0 0000C304 31D2 xor dx, dx ; next time write from xxxx:0 0 0000C306 81C6E00F add si, 0FE0h ; update segment pointer 0 0000C30A 294E06 sub word [bp+6], cx 0 0000C30D 9F lahf 0 0000C30E 805E0800 sbb byte [bp+8], 0 0 0000C312 75D0 jnz ww11 ; if more to go 0 0000C314 9E sahf 0 0000C315 75CD jnz ww11 ; ditto 0 0000C317 EB11 jmp short ww14 ; done 270 271 ww13: 0 0000C319 BA[0000] mov dx, diskful 0 0000C31C E8[0000] call putsz ; print string 0 0000C31F E80800 call ww14 ; close file 275 0 0000C322 B441 mov ah, 41h ; unlink file 0 0000C324 BA8000 mov dx, DTA 278 doscall 0 0000C327 CD21 int 21h 0 0000C329 C3 retn 280 281 ; Close the file. 282 ww14: 0 0000C32A B43E mov ah, 3Eh ; close file 0 0000C32C CD21 int 21h 0 0000C32E C3 retn 286 287 ; Error opening file. This is also called by the load command. 288 ww15: 0 0000C32F 50 push ax 0 0000C330 3D0001 cmp ax, 100h 0 0000C333 B411 mov ah, 11h ; 1100h to 11FEh 0 0000C335 7202 jb @F 0 0000C337 B0FF mov al, 0FFh ; >= 00FFh sets to 11FFh 294 @@: 0 0000C339 E8[0000] call setrc 0 0000C33C 58 pop ax 0 0000C33D 83F802 cmp ax, byte 2 0 0000C340 BA[0000] mov dx, doserr2 ; File not found 0 0000C343 7429 je ww16 0 0000C345 83F803 cmp ax, byte 3 0 0000C348 BA[0000] mov dx, doserr3 ; Path not found 0 0000C34B 7421 je ww16 0 0000C34D 83F805 cmp ax, byte 5 0 0000C350 BA[0000] mov dx, doserr5 ; Access denied 0 0000C353 7419 je ww16 0 0000C355 83F808 cmp ax, byte 8 0 0000C358 BA[0000] mov dx, doserr8 ; Insufficient memory 0 0000C35B 7411 je ww16 0 0000C35D 83F80B cmp ax, byte 11 0 0000C360 BA[0000] mov dx, doserr11 ; Invalid format 0 0000C363 7409 je ww16 0 0000C365 BF[0000] mov di, openerr1 0 0000C368 E8[0000] call hexword 0 0000C36B BA[0000] mov dx, openerr ; Error ____ opening file 315 ww16: 0 0000C36E E9[0000] jmp putsz 317 %endif 318 %endif